Project
Loading...
Searching...
No Matches
ModelGEM.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16// ================================================================================
17// How are the electron efficiencies obtained?
18// ================================================================================
19// Within the scope of two PhD thesis models have been derived in order to
20// describe the collection as well as the extraction efficiencies for GEM
21// foils. In the following you can find a brief sketch about the procedure behind this.
22// Details can be found in the following two papers which emerged out of this
23// research:
24// [1] Paper Jonathan,
25// [2] Paper Viktor.
26//
27// Simulations / Measurements [1]:
28// For different GEM geometries (standard, medium, large pitch) the electric potentials
29// and fieldmaps were obtained by numerical calculations in Ansys. The fieldmaps were
30// then used in Garfield++ in order to simulate the drift of the charge carriers
31// and the amplification processes. In order to obtain the efficiencies a fixed
32// amount of electrons has been randomely distributed above the GEM for the simulations.
33// The efficiencies were thereupon derived by counting where the initial electrons and
34// electrons from the amplification region ended, e.g. Copper top / bottom, anode etc.
35// Indeed the simulated efficiencies are in a good agreement to measurements. See [1] for
36// more details.
37//
38// Calculations [2]:
39// In oder to get an analytic understanding of the efficiencies a simplified and
40// two-dimensional model has been investigated. Simplified means: No differentian
41// between an inner and an outer diameter, no Polyimide layer, no gas/no diffusion
42// and two-dimensional cut of the hexagonal 3D GEM structure.
43// The resulting equations are in a good agreement to the results from the simulations
44// in terms of limits, offsets and curves for different pitches (in case of no diffusion).
45// Nevertheless differences can be found due to the simplifications in the model.
46// By introducing three fit parameter (s1, s2 and s3) the calculations can be tuned
47// in a way to describe the simulated datapoints. The resulting equations
48// describe the efficiencies in a full region and for different GEM geometries.
49//
50// The results from the fitted equations are implemented in this class.
51
52// ================================================================================
53// Remarks for naming of the variables:
54// ================================================================================
55//
56// mFitElecEffNumberHoles (in PhD/paper: N)
57// Describes the number of holes for the 2D model calculations. The number
58// of holes is given by 2N-1, i.e. mFitElecEffNumberHoles=2 refers to 3 GEM holes (one
59// central GEM hole and two GEM holes at the outside).
60//
61// mFitElecEffThickness (in PhD/paper: d) [unit: micrometers]
62// Thickness of the GEM foil which
63//
64// mFitElecEffPitch (in PhD/paper: p) [unit: micrometers]
65// Pitch of the GEM foil.
66//
67// mFitElecEffHoleDiameter (in PhD/paper: L) [unit: micrometers]
68// Hole diameter for the GEM hole. There is no differentiation between an inner
69// and an outer hole diameter for the 2D model calculations.
70//
71// mFitElecEffWidth (in PhD/paper: w) [unit: micrometers]
72// Describes the width for a unit cell (pitch) + 2x the distance to the end of the
73// GEM electrodes. This variable can be expressed in terms of the pitch and the hole
74// diameter according to w=2p-L. It is only used for internal calculations and no
75// definition is required by the user.
76//
77// mFitElecEffDistancePrevStage (in PhD/paper: g1) [unit: micrometers]
78// Here g1/2 describes the distance from the center of the GEM foil to the cathode
79// or the previous amplification stage.
80//
81// mFitElecEffDistanceNextStage (in PhD/paper: g2) [unit: micrometers]
82// Here g2/2 describes the distance from the center of the GEM foil to the anode
83// or the next amplification stage.
84//
85// mGeometryTuneEta1 (in PhD/paper: s1) [unitless]
86// This is a fit parameter which has been used in order to scale eta1 for the fit
87// of the calculations to the simulations.
88//
89// mGeometryTuneEta2 (in PhD/paper: s2) [unitless]
90// This is a fit parameter which has been used in order to scale eta2 for the fit
91// of the calculations to the simulations.
92//
93// mGeometryTuneDiffusion (in PhD/paper: s3) [unitless]
94// This is a fit parameter which has been used in order to tune the equations to
95// describe diffusion.
96
97#ifndef ALICEO2_TPC_ModelGEM_H_
98#define ALICEO2_TPC_ModelGEM_H_
99
100#include <array>
101
102namespace o2
103{
104namespace tpc
105{
106
108
110{
111 public:
113 ModelGEM();
114
116 ~ModelGEM() = default;
117
122 float getElectronCollectionEfficiency(float elecFieldAbove, float gemPotential, int geom);
123
128 float getElectronExtractionEfficiency(float elecFieldBelow, float gemPotential, int geom);
129
133 float getAbsoluteGain(float gemPotential, int geom);
134
138 void setAbsGainScalingFactor(float absGainScaling) { mAbsGainScaling = absGainScaling; };
139
143 float getSingleGainFluctuation(float gemPotential, int geom);
144
150 void setStackProperties(const std::array<int, 4>& geometry, const std::array<float, 5>& distance, const std::array<float, 4>& potential, const std::array<float, 5>& electricField);
151
154
156 float getStackEffectiveGain();
157
160 void setAttachment(float attachment) { mAttachment = attachment; };
161
162 private:
165 float getParameterC1(int geom);
166
169 float getParameterC2(int geom);
170
173 float getParameterC3(int geom);
174
177 float getParameterC4(int geom);
178
181 float getParameterC5(int geom);
182
184 float getParameterC6();
185
190 float getParameterC7(float eta1, float eta2, int geom);
191
196 float getParameterC8(float eta1, float eta2, int geom);
197
202 float getParameterC9(float eta1, float eta2, int geom);
203
208 float getParameterC7Bar(float eta1, float eta2, int geom);
209
214 float getParameterC8Bar(float eta1, float eta2, int geom);
215
220 float getParameterC9Bar(float eta1, float eta2, int geom);
221
229 float getParameterC7BarFromX(float intXStart, float intXEnd, int geom);
230
236 float getParameterC8BarFromX(float intXStart, float intXEnd, int geom);
237
243 float getParameterC9BarFromX(float intXStart, float intXEnd, int geom);
244
247 float getLambdaCathode(int geom);
248
251 float getLambdaCathodef2(int geom);
252
256 float getLambdaCathodeF2(int n, int geom);
257
260 float getMu1Cathode(int geom);
261
264 float getMu1Cathodef2(int geom);
265
269 float getMu1CathodeF2(int n, int geom);
270
273 float getMu2Cathode(int geom);
274
277 float getMu2Cathodef2(int geom);
278
282 float getMu2CathodeF2(int n, int geom);
283
291 float getMu2Top(float intXStart, float intXEnd, int geom);
292
296 float getMu2Topf2(float intXStart, float intXEnd);
297
301 float getMu2TopfTaylorTerm0(int geom);
302
306 float getMu2TopfTaylorTerm2(int geom);
307
313 float getMu2TopF2(int n, float intXStart, float intXEnd, int geom);
314
318 float getMu2TopFTaylorTerm0(int n, int geom);
319
323 float getMu2TopFTaylorTerm2(int n, int geom);
324
330 float getIntXEndBot(float eta1, float eta2, int geom);
331
337 float getIntXEndTop(float eta1, float eta2, int geom);
338
342 float getEta1Kink1(float eta2, int geom);
343
347 float getEta1Kink2(float eta2, int geom);
348
352 float getEta2Kink1(float eta1, int geom);
353
357 float getEta2Kink2(float eta1, int geom);
358
362 float getHtop0(int geom);
363
367 float getHtop2(int geom);
368
373 void flipDistanceNextPrevStage();
374
376 const int mFitElecEffNumberHoles = 200;
377 const float mFitElecEffThickness = 50.0;
378 const float mFitElecEffHoleDiameter = 60.0;
379 float mFitElecEffDistancePrevStage = 2110.0;
380 float mFitElecEffDistanceNextStage = 2110.0;
381
382 const std::array<float, 3> mFitElecEffPitch;
383 const std::array<float, 3> mFitElecEffWidth;
384
386 const float mFitElecEffFieldAbove = 2000.0;
387 const float mFitElecEffFieldBelow = 0.0;
388 const float mFitElecEffPotentialGEM = 300.0;
389 const float mFitElecEffFieldGEM = mFitElecEffPotentialGEM / (mFitElecEffThickness * 0.0001);
390
392 const std::array<float, 3> mFitElecEffTuneEta1;
393 const std::array<float, 3> mFitElecEffTuneEta2;
394 const std::array<float, 3> mFitElecEffTuneDiffusion;
395
397 const std::array<float, 3> mFitAbsGainConstant;
398 const std::array<float, 3> mFitAbsGainSlope;
399 float mAbsGainScaling;
400
402 const std::array<float, 3> mFitSingleGainF0;
403 const std::array<float, 3> mFitSingleGainU0;
404 const std::array<float, 3> mFitSingleGainQ;
405
407 std::array<float, 3> mParamC1;
408 std::array<float, 3> mParamC2;
409 std::array<float, 3> mParamC3;
410 std::array<float, 3> mParamC4;
411 std::array<float, 3> mParamC5;
412 std::array<float, 3> mParamC6;
413
415 std::array<int, 4> mGeometry;
416 std::array<float, 5> mDistance;
417 std::array<float, 4> mPotential;
418 std::array<float, 5> mElectricField;
419
421 float mStackEffectiveGain;
422
427 int mStackEnergyCalculated;
428
432 float mAttachment;
433
434 const float Pi = 3.1415926;
435
436 // Energy of incident photons (eV)
437 const float PhotonEnergy = 5900.0;
438
439 // Mean energy to create electron-ion pair in gas (here NeCO2N2, in eV)
440 const float Wi = 37.3;
441
442 // Fano factor for NeCO2N2 90-10-5 (Please check this!)
443 const float Fano = 0.13;
444};
445} // namespace tpc
446} // namespace o2
447
448#endif // ALICEO2_TPC_ModelGEM_H_
~ModelGEM()=default
Destructor.
void setAbsGainScalingFactor(float absGainScaling)
Definition ModelGEM.h:138
void setStackProperties(const std::array< int, 4 > &geometry, const std::array< float, 5 > &distance, const std::array< float, 4 > &potential, const std::array< float, 5 > &electricField)
Definition ModelGEM.cxx:106
void setAttachment(float attachment)
Definition ModelGEM.h:160
float getStackEffectiveGain()
Calculate the total effective gain for a given GEM stack (defined with setStackProperties)
Definition ModelGEM.cxx:156
float getSingleGainFluctuation(float gemPotential, int geom)
Definition ModelGEM.cxx:101
float getAbsoluteGain(float gemPotential, int geom)
Definition ModelGEM.cxx:95
ModelGEM()
Constructor.
Definition ModelGEM.cxx:22
float getStackEnergyResolution()
Calculate the energy resolution for a given GEM stack (defined with setStackProperties)
Definition ModelGEM.cxx:114
float getElectronExtractionEfficiency(float elecFieldBelow, float gemPotential, int geom)
Definition ModelGEM.cxx:78
float getElectronCollectionEfficiency(float elecFieldAbove, float gemPotential, int geom)
Definition ModelGEM.cxx:61
GLdouble n
Definition glcorearb.h:1982
GLsizei GLsizei GLfloat distance
Definition glcorearb.h:5506
GLenum attachment
Definition glcorearb.h:1302
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...