Skip to content

Commit 41dae51

Browse files
ritzratzsawenzel
authored andcommitted
Implement a GEM Model to calculate the response from the potentials
Allows calculation of * electron collection efficiencies * electron extraction efficiencies * effective gain * energy resolution
1 parent 05ab2a3 commit 41dae51

8 files changed

Lines changed: 1457 additions & 60 deletions

File tree

Detectors/TPC/base/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(SRCS
1010
src/CRU.cxx
1111
src/Digit.cxx
1212
src/DigitPos.cxx
13+
src/ModelGEM.cxx
1314
src/FECInfo.cxx
1415
src/Mapper.cxx
1516
src/PadInfo.cxx
@@ -36,6 +37,7 @@ set(HEADERS
3637
include/TPCBase/CRU.h
3738
include/TPCBase/Digit.h
3839
include/TPCBase/DigitPos.h
40+
include/TPCBase/ModelGEM.h
3941
include/TPCBase/FECInfo.h
4042
include/TPCBase/Mapper.h
4143
include/TPCBase/PadInfo.h

Detectors/TPC/base/include/TPCBase/ModelGEM.h

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

Detectors/TPC/base/include/TPCBase/ParameterGEM.h

Lines changed: 152 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
/// \brief Definition of the parameter class for the GEM stack
1313
/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de
1414

15+
// Remark: This file has been modified by Viktor Ratza in order to
16+
// implement the electron efficiency models for the collection and the
17+
// extraction efficiency.
18+
1519
#ifndef ALICEO2_TPC_ParameterGEM_H_
1620
#define ALICEO2_TPC_ParameterGEM_H_
1721

@@ -39,6 +43,68 @@ class ParameterGEM
3943
/// Destructor
4044
~ParameterGEM() = default;
4145

46+
/// Set GEM geometry for the stack (0 standard pitch, 1 medium pitch, 2 large pitch)
47+
/// \param geom1 Geometry for GEM 1
48+
/// \param geom2 Geometry for GEM 2
49+
/// \param geom3 Geometry for GEM 3
50+
/// \param geom4 Geometry for GEM 4
51+
void setGeometry(int geom1, int geom2, int geom3, int geom4);
52+
53+
/// Set GEM geometry for a single GEM in the stack (0 standard pitch, 1 medium pitch, 2 large pitch)
54+
/// \param geom Geometry for GEM
55+
/// \param GEM GEM of interest in the stack (1 - 4)
56+
void setGeometry(int geom, int gem)
57+
{
58+
mGeometry[gem - 1] = geom;
59+
}
60+
61+
/// Set distances between cathode-GEM1, between GEMs and GEM4-anode
62+
/// \param distance1 Distance cathode-GEM1 (drift region) in cm
63+
/// \param distance2 Distance GEM1-GEM2 (ET1) in cm
64+
/// \param distance3 Distance GEM2-GEM3 (ET2) in cm
65+
/// \param distance4 Distance GEM3-GEM4 (ET3) in cm
66+
/// \param distance5 Distance GEM4-anode (induction region) in cm
67+
void setDistance(float distance1, float distance2, float distance3, float distance4, float distance5);
68+
69+
/// Set the distance for a single region in the stack
70+
/// \param distance Distance for the region in cm
71+
/// \param region Region of interest in the stack (1 Drift, 2 ET1, 3 ET2, 4 ET3, 5 Induction)
72+
void setDistance(float distance, int region)
73+
{
74+
mDistance[region - 1] = distance;
75+
}
76+
77+
/// Set potential for the stack (in volt)
78+
/// \param pot1 Potential for GEM 1
79+
/// \param pot2 Potential for GEM 2
80+
/// \param pot3 Potential for GEM 3
81+
/// \param pot4 Potential for GEM 4
82+
void setPotential(float pot1, float pot2, float pot3, float pot4);
83+
84+
/// Set potential for a single GEM in the stack (in volt)
85+
/// \param pot Potential for GEM
86+
/// \param GEM GEM of interest in the stack (1 - 4)
87+
void setPotential(float pot, int gem)
88+
{
89+
mPotential[gem - 1] = pot;
90+
}
91+
92+
/// Set electric field configuration for the stack (in kV/cm)
93+
/// \param elecField1 Electric field in drift region
94+
/// \param elecField2 Electric field between GEM1 and GEM2 (ET1)
95+
/// \param elecField3 Electric field between GEM2 and GEM3 (ET2)
96+
/// \param elecField4 Electric field between GEM3 and GEM4 (ET3)
97+
/// \param elecField5 Electric field in induction region
98+
void setElectricField(float elecField1, float elecField2, float elecField3, float elecField4, float elecField5);
99+
100+
/// Set electric field for a single region in the stack (in kV/cm)
101+
/// \param elecField Electric field for the region
102+
/// \param region Region of interest in the stack (1 Drift, 2 ET1, 3 ET2, 4 ET3, 5 Induction)
103+
void setElectricField(float elecField, int region)
104+
{
105+
mElectricField[region - 1] = elecField;
106+
}
107+
42108
/// Set absolute gain for the stack
43109
/// \param absGain1 Absolute gain in GEM 1
44110
/// \param absGain2 Absolute gain in GEM 2
@@ -49,7 +115,10 @@ class ParameterGEM
49115
/// Set absolute gain for a single GEM in the stack
50116
/// \param absGain Absolute gain
51117
/// \param GEM GEM of interest in the stack (1 - 4)
52-
void setAbsoluteGain(float absGain, int gem) { mAbsoluteGain[gem - 1] = absGain; }
118+
void setAbsoluteGain(float absGain, int gem)
119+
{
120+
mAbsoluteGain[gem - 1] = absGain;
121+
}
53122

54123
/// Set collection efficiency for the stack
55124
/// \param collEff1 Collection efficiency in GEM 1
@@ -58,10 +127,13 @@ class ParameterGEM
58127
/// \param collEff4 Collection efficiency in GEM 4
59128
void setCollectionEfficiency(float collEff1, float collEff2, float collEff3, float collEff4);
60129

61-
/// Set collection efficiency for a single GEM inthe stack
130+
/// Set collection efficiency for a single GEM in the stack
62131
/// \param collEff Collection efficiency
63132
/// \param GEM GEM of interest in the stack (1 - 4)
64-
void setCollectionEfficiency(float collEff, int gem) { mCollectionEfficiency[gem - 1] = collEff; }
133+
void setCollectionEfficiency(float collEff, int gem)
134+
{
135+
mCollectionEfficiency[gem - 1] = collEff;
136+
}
65137

66138
/// Set extraction efficiency for the stack
67139
/// \param extrEff1 Extraction efficiency in GEM 1
@@ -70,10 +142,45 @@ class ParameterGEM
70142
/// \param extrEff4 Extraction efficiency in GEM 4
71143
void setExtractionEfficiency(float extrEff1, float extrEff2, float extrEff3, float extrEff4);
72144

73-
/// Set extraction efficiency for a single GEM inthe stack
145+
/// Set extraction efficiency for a single GEM in the stack
74146
/// \param extrEff Extraction efficiency
75147
/// \param GEM GEM of interest in the stack (1 - 4)
76-
void setExtractionEfficiency(float extrEff, int gem) { mExtractionEfficiency[gem - 1] = extrEff; }
148+
void setExtractionEfficiency(float extrEff, int gem)
149+
{
150+
mExtractionEfficiency[gem - 1] = extrEff;
151+
}
152+
153+
/// Get the geometry type of a given GEM in the stack
154+
/// \param GEM GEM of interest in the stack (1 - 4)
155+
/// \return Geometry type (0 standard, 1 medium, 2 large)
156+
int getGeometry(int gem) const
157+
{
158+
return mGeometry[gem - 1];
159+
}
160+
161+
/// Get the distance between cathode-GEM1, between GEMs or GEM4-anode
162+
/// \param region Region of interest in the stack (1 Drift, 2 ET1, 3 ET2, 4 ET3, 5 Induction)
163+
/// \return Distance of region in cm
164+
float getDistance(int region) const
165+
{
166+
return mDistance[region - 1];
167+
}
168+
169+
/// Get the electric potential of a given GEM in the stack
170+
/// \param GEM GEM of interest in the stack (1 - 4)
171+
/// \return Electric potential of GEM in Volts
172+
float getPotential(int gem) const
173+
{
174+
return mPotential[gem - 1];
175+
}
176+
177+
/// Get the electric field configuration for a given GEM stack
178+
/// \param region Region of interest in the stack (1 Drift, 2 ET1, 3 ET2, 4 ET3, 5 Induction)
179+
/// \return Electric field in kV/cm
180+
float getElectricField(int region) const
181+
{
182+
return mElectricField[region - 1];
183+
}
77184

78185
/// Get the effective gain of a given GEM in the stack
79186
/// \param GEM GEM of interest in the stack (1 - 4)
@@ -86,25 +193,60 @@ class ParameterGEM
86193
/// Get the absolute gain of a given GEM in the stack
87194
/// \param GEM GEM of interest in the stack (1 - 4)
88195
/// \return Absolute gain of a given GEM in the stack
89-
float getAbsoluteGain(int gem) const { return mAbsoluteGain[gem - 1]; }
196+
float getAbsoluteGain(int gem) const
197+
{
198+
return mAbsoluteGain[gem - 1];
199+
}
90200

91201
/// Get the collection efficiency of a given GEM in the stack
92202
/// \param GEM GEM of interest in the stack (1 - 4)
93203
/// \return Collection efficiency of a given GEM in the stack
94-
float getCollectionEfficiency(int gem) const { return mCollectionEfficiency[gem - 1]; }
204+
float getCollectionEfficiency(int gem) const
205+
{
206+
return mCollectionEfficiency[gem - 1];
207+
}
95208

96209
/// Get the extraction efficiency of a given GEM in the stack
97210
/// \param GEM GEM of interest in the stack (1 - 4)
98211
/// \return Extraction efficiency of a given GEM in the stack
99-
float getExtractionEfficiency(int gem) const { return mExtractionEfficiency[gem - 1]; }
212+
float getExtractionEfficiency(int gem) const
213+
{
214+
return mExtractionEfficiency[gem - 1];
215+
}
100216

101217
private:
102218
/// \todo Remove hard-coded number of GEMs in a stack
219+
std::array<int, 4> mGeometry; ///< GEM geometry (0 standard, 1 medium, 2 large)
220+
std::array<float, 5> mDistance; ///< Distances between cathode/anode and stages (in cm)
221+
std::array<float, 4> mPotential; ///< Potential (in Volts)
222+
std::array<float, 5> mElectricField; ///< Electric field configuration (in kV/cm)
103223
std::array<float, 4> mAbsoluteGain; ///< Absolute gain
104224
std::array<float, 4> mCollectionEfficiency; ///< Collection efficiency
105225
std::array<float, 4> mExtractionEfficiency; ///< Extraction efficiency
106226
};
107227

228+
inline void ParameterGEM::setGeometry(int geom1, int geom2, int geom3, int geom4)
229+
{
230+
mGeometry = { { geom1, geom2, geom3, geom4 } };
231+
}
232+
233+
inline void ParameterGEM::setDistance(float distance1, float distance2, float distance3, float distance4,
234+
float distance5)
235+
{
236+
mDistance = { { distance1, distance2, distance3, distance4, distance5 } };
237+
}
238+
239+
inline void ParameterGEM::setPotential(float pot1, float pot2, float pot3, float pot4)
240+
{
241+
mPotential = { { pot1, pot2, pot3, pot4 } };
242+
}
243+
244+
inline void ParameterGEM::setElectricField(float elecField1, float elecField2, float elecField3, float elecField4,
245+
float elecField5)
246+
{
247+
mElectricField = { { elecField1, elecField2, elecField3, elecField4, elecField5 } };
248+
}
249+
108250
inline void ParameterGEM::setAbsoluteGain(float absGain1, float absGain2, float absGain3, float absGain4)
109251
{
110252
mAbsoluteGain = { { absGain1, absGain2, absGain3, absGain4 } };
@@ -119,7 +261,7 @@ inline void ParameterGEM::setExtractionEfficiency(float extrEff1, float extrEff2
119261
{
120262
mExtractionEfficiency = { { extrEff1, extrEff2, extrEff3, extrEff4 } };
121263
}
122-
}
123-
}
264+
} // namespace TPC
265+
} // namespace o2
124266

125267
#endif // ALICEO2_TPC_ParameterGEM_H_

0 commit comments

Comments
 (0)