TPCCondData
TPCConditions.cc
Go to the documentation of this file.
1 /* TPCConditions.cc
2  * $Id$
3  */
4 
5 #include "TPCConditions.h"
6 
7 namespace tpcconddata{
8 
10  return std::string("$Rev: 3427 $");
11 }
12 
14  return std::string("TPCConditions");
15 }
16 
19  setTimeOffset(0);
26 }
27 
29 
31  return getFloatVal( 0 ) ;
32 }
33 
35  return getFloatVal( 1 ) ;
36 }
37 
39  return getFloatVal( 2 ) ;
40 }
41 
43  return getFloatVal( 3 ) ;
44 }
45 
47  return getFloatVal( 4 ) ;
48 }
49 
51  return getFloatVal( 5 ) ;
52 }
53 
55  return getFloatVal( 6 ) ;
56 }
57 
59  return getFloatVal( 7 ) ;
60 }
61 
63  obj()->setFloatVal( 0 , Value ) ;
64 }
65 
67  obj()->setFloatVal( 1 , Value ) ;
68 }
69 
71  obj()->setFloatVal( 2 , Value ) ;
72 }
73 
75  obj()->setFloatVal( 3 , Value ) ;
76 }
77 
79  obj()->setFloatVal( 4 , Value ) ;
80 }
81 
83  obj()->setFloatVal( 5 , Value ) ;
84 }
85 
87  obj()->setFloatVal( 6 , Value ) ;
88 }
89 
90 void TPCConditions::setTimeOffset(float Value) {
91  obj()->setFloatVal( 7 , Value ) ;
92 }
93 
94 void TPCConditions::print( std::ostream& os ) const {
95 
96  os<<"amplification: "<<getAmplification()<<std::endl;
97  os<<"drift velocity: ";
98  if (getDriftVelocity()>0){
99  os<<getDriftVelocity()<<"mm/us";
100  }
101  else{
102  os<<" not set";
103  }
104  os<<std::endl;
105  os<<"time offset: ";
106  if (getTimeOffset()>0){
107  os<<getTimeOffset()<<"us";
108  }
109  else{
110  os<<" not set";
111  }
112  os<<std::endl;
113  os<<"transversal diffusion: ";
114  if (getLongDiffusionCoef()>0){
115  os<<"sigma^2 = "<<getLongDiffusionCoef()<<"^2* z (mm) + "<<getLongDefocussing()<<"^2 (mm^2)";
116  }
117  else{
118  os<<"not set";
119  }
120  os<<std::endl;
121  os<<"longitudinal diffusion: ";
122  if (getTransDiffusionCoef()>0){
123  os<<"sigma^2 = "<<getTransDiffusionCoef()<<"^2* z (mm) + "<<getTransDefocussing()<<"^2 (mm^2)";
124  }
125  else{
126  os<<"not set";
127  }
128  os<<std::endl;
129  os<<"ADC counts to primary electrons conversion factor: ";
132  }
133  else{
134  os<< "not set.";
135  }
136  os << std::endl;
137 }
138 
139 std::ostream &operator<<(std::ostream &os, const TPCConditions &tc) {
140  tc.print(os);
141  return os;
142 }
143 
144 }
void setTimeOffset(float Value)
set the time offset in us
float getDriftVelocity() const
return the drift velocity (in mm/us)
float getLongDiffusionCoef() const
return the diffusion coefficent for the longitudinal diffusion (in sqrt(mm))
void setLongDefocussing(float Value)
set the defocussion constant for the longitudinal diffusion (in mm)
float getADCtoPrimaryElectronsFactor() const
return the conversion factor from ADC counts to primary electrons (ADC * conv.Factor = # primary e) ...
static std::string getDefaultColName()
float getTransDefocussing() const
return the defocussion constant for the transversal diffusion (in mm)
void setTransDefocussing(float Value)
set the defocussion constant for the transversal diffusion (in mm)
void setLongDiffusionCoef(float Value)
set the diffusion coefficient for the longitudinal diffusion (in sqrt(mm))
std::ostream & operator<<(std::ostream &os, const ADCChannelMapping &acm)
void setADCtoPrimaryElectronsFactor(float Value)
set the conversion factor from ADC counts to primary electrons (ADC * conv.Factor = # primary e) ...
float getAmplification() const
return the amplification of the gas amplification device (e.g. GEMs)
void setDriftVelocity(float Value)
set the drift velocity in mm/us
void setAmplification(float Value)
set the amplification of the gas amplification device (e.g. GEMs)
void print(std::ostream &os=std::cout) const
float getTimeOffset() const
return the time offset (in us).
TPCConditions()
Convenient constructor.
float getLongDefocussing() const
return the defocussion constant for the longitudinal diffusion (in mm)
void setTransDiffusionCoef(float Value)
set the diffusion coefficient for the transversal diffusion (in sqrt(mm))
static std::string getRevision()
Definition: TPCConditions.cc:9
float getTransDiffusionCoef() const
return the diffusion coefficent for the transversal diffusion (in sqrt(mm))
virtual ~TPCConditions()
Important for memory handling.