TPCCondData
FieldSetting.h
Go to the documentation of this file.
1 #ifndef FieldSettings_h
2 #define FieldSettings_h 1
3 
4 //C++
5 #include "iostream"
6 #include "string"
7 
8 //LCIO
9 #include "lcio.h"
10 #include "EVENT/LCGenericObject.h"
11 #include "IMPL/LCGenericObjectImpl.h"
12 
13 namespace tpcconddata{
14 
15 class FieldSetting ;
16 
19 class FieldSetting : public EVENT::LCGenericObject {
20 
21 public:
22 
23  FieldSetting( int NGEMs );
24 
25  FieldSetting(EVENT::LCObject* Obj);
26 
27  ~FieldSetting();
28 
30  int getNGEMs() const;
31 
40  int getGEMStatus() const;
41 
48  int getDriftFieldStatus() const;
49 
56  int getMagneticFieldStatus() const;
57 
61  float getGEMVoltage( int GEMID ) const;
62 
65  float getTransferField( int GEMID ) const;
66 
69  float getInductionField() const;
70 
73  float getGuardRingVoltage() const;
74 
77  float getCathodeVoltage() const;
78 
82  float getAnodeVoltage() const;
83 
86  float getDriftField( float maxDriftLegth ) const;
87 
89  float getMagneticField() const;
90 
92  void setGEMStatus( int Value );
93 
95  void setDriftFieldStatus( int Value );
96 
98  void setMagneticFieldStatus( int Value );
99 
103  void setGEMVoltage( int GEMID, float Value );
104 
107  void setTransferField( int GEMID, float Value );
108 
111  void setInductionField( float Value );
112 
115  void setCathodeVoltage( float Value );
116 
119  void setGuardRingVoltage( float Value );
120 
124  void setAnodeVoltage( float Value );
125 
127  void setMagneticField( float Value );
128 
129  IMPL::LCGenericObjectImpl* obj();
130 
131  virtual int id();
132 
133  static std::string getRevision();
134  static std::string getDefaultColName();
135 
136  void print ( std::ostream& os = std::cout ) const;
137 
138  // ---- need to implement LCGenericObject interface:
139 
140  int getNInt() const;
141  int getNFloat() const;
142  int getNDouble() const;
143 
144  int getIntVal(int index) const;
145  float getFloatVal(int index) const;
146  double getDoubleVal(int index) const;
147 
148  bool isFixedSize() const { return false; };
149 
150  virtual const std::string getTypeName() const{
151  return std::string("FieldSetting");
152  }
153 
154  virtual const std::string getDataDescription() const{
155  return std::string("i:#GEMs,GEMStatus,DriftFieldStatus,MagnetFieldStatus")+
156  std::string("f:CathodeVoltage,AnodeVoltage,GuardRingVoltage,GEMVoltages,Transferfields,Inductionfield");
157  }
158  // ---- end of LCGenericObject interface
159 
160 protected:
161 
162  bool createObj;
163  IMPL::LCGenericObjectImpl* myObj;
164 
169  void setNGEMs( int Value);
170 };
171 
172  std::ostream &operator<<(std::ostream &os, const FieldSetting &fs);
173 }
174 #endif
float getGuardRingVoltage() const
return voltage (in V) of the guard ring on the gem modules
Definition: FieldSetting.cc:97
float getGEMVoltage(int GEMID) const
return the voltage of the given number GEM 0 is the nearest the drift region
Definition: FieldSetting.cc:77
virtual const std::string getTypeName() const
Definition: FieldSetting.h:150
IMPL::LCGenericObjectImpl * obj()
void setMagneticField(float Value)
return the magnetic field (in T)
float getTransferField(int GEMID) const
return the field (in V/mm) between the GEM N and N+1
Definition: FieldSetting.cc:83
void print(std::ostream &os=std::cout) const
float getFloatVal(int index) const
IMPL::LCGenericObjectImpl * myObj
Definition: FieldSetting.h:163
float getMagneticField() const
return the magnetic field (in T)
int getMagneticFieldStatus() const
return the status of the Magnet 0: off 1: running normally 2: ramping up 3: ramping down ...
Definition: FieldSetting.cc:69
std::ostream & operator<<(std::ostream &os, const ADCChannelMapping &acm)
void setAnodeVoltage(float Value)
set voltage (in V) of the anode of the field cage (e.g.
void setGEMVoltage(int GEMID, float Value)
set the voltage of the given number GEM 0 is the nearest the drift region
static std::string getDefaultColName()
Definition: FieldSetting.cc:18
float getDriftField(float maxDriftLegth) const
return the driftfield (in V/mm) if the length of the driftregion (in mm) is given ...
int getIntVal(int index) const
void setTransferField(int GEMID, float Value)
set the field (in V/mm) between the GEM N and N+1
int getNGEMs() const
return the Number of GEMs
Definition: FieldSetting.cc:61
int getGEMStatus() const
return the status of the GEM System 0: off 1: running normally 2: ramping up 3: ramping down 4: tripp...
Definition: FieldSetting.cc:73
void setCathodeVoltage(float Value)
set voltage (in V) of the cathode of the field cage
static std::string getRevision()
Definition: FieldSetting.cc:14
void setInductionField(float Value)
set the field (in V/mm) between the last GEM and the Pad-Readout-Plane
void setDriftFieldStatus(int Value)
set the status of a drift field (see getDriftFieldStatus)
float getAnodeVoltage() const
return voltage (in V) of the anode of the field cage (e.g.
void setNGEMs(int Value)
set the Number of GEMs is protected, numberof GEMs is to imported for consistence can only be set by ...
virtual const std::string getDataDescription() const
Definition: FieldSetting.h:154
class to store the field setting of a TPC with GEM-based amplification system
Definition: FieldSetting.h:19
float getInductionField() const
return the field (in V/mm) between the last GEM and the Pad-Readout-Plane
Definition: FieldSetting.cc:89
void setGEMStatus(int Value)
set the status of a GEM (see getGEMStatus)
float getCathodeVoltage() const
return voltage (in V) of the cathode of the field cage
Definition: FieldSetting.cc:93
void setMagneticFieldStatus(int Value)
set the status of a magnet (see getMagneticFieldStatus)
int getDriftFieldStatus() const
return the status of the DriftField System 0: off 1: running normally 2: ramping up 3: ramping down ...
Definition: FieldSetting.cc:65
double getDoubleVal(int index) const
void setGuardRingVoltage(float Value)
set voltage (in V) of the guard ring on gem module