ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_ElectronPidTool_ToTcalculation.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TRT_ElectronPidTool_ToTcalculation.h, (c) ATLAS Detector software
8
9/****************************************************************************************\
10
11 This class is only instantiated once in the constuctor of the Pid Tool.
12 It was created in order to encapsulate the code that is used for
13 the Time over Threshold calulation that forms part of the Pid Tool.
14 It is not true singleton as this was deemed unnecessary.
15
16 Original creator: Simon Heisterkamp (simon.heisterkamp@cern.ch)
17
18\****************************************************************************************/
20
22 public AthMessaging {
23 public:
24
25 static const int my_CurrentVersion = 4;
26
28 virtual ~ToTcalculator();
29
30 // set constants to hard coded defaults
32
33 // get the ToT from the bitpattern and correct for local variations
34 double GetToT(unsigned int bitpattern, double HitZ, double HitR, int BEC, int Layer, int Strawlayer);
35
36 // get the distance used to normalize the ToT
37 double GetD(double R_track);
38
39 // get the likelyhood based on the sumToT/sumD we found for all hits on this track
40 double GetElProb(double ToTbyD);
41 //float Limit(float prob);
42
43 //void PrintBlob();
44 // bool FillBlob(const unsigned char*);
45
46 private:
47 // as long has reading from database does not work well yet, do this check:
48 // bool HasDataBeenInitialized;
49 //void checkIntialization();
50
51 // primary extraction of ToT from Bitpattern
52 double ExtractToT(unsigned int bitpattern);
53
54 // apply local corrections to the ToT
55 double correctToT(double ToT, double HitZ, double HitR, int BEC, int Layer, int Strawlayer);
56
57 // the following functions correct the ToT in various parts of the detector.
58 // the right one is selected by correctToT
59 double BarrelLongToTCorrection(double, double, const float*);
60 double BarrelShortToTCorrection(double, double, const float*);
61 double EndcapToTCorrection(double, double, const float*);
62
63 // to linearize the indices of all calibration constants
64 int resolveIndex(int BEC, int Layer, int Strawlayer);
65
66 // /------------------------------------------------------------------------
67 // | The following code describes the internal structure of the blob
68 // |
69 // | Sizes:
70 static const int NparsBarrel = 3;
71 static const int NparsEndcap = 4;
72
73 static const int NparametrizedSectionsBarrel = 73;
74 static const int NparametrizedSectionsEndcap = 14;
75
76 static const int SIZE_OF_HEADER = 16;
77 static const int SIZE_GAUS_PARS = 9 * sizeof(float);
80 static const int SIZE_TOT_CONSTANTS = N_TOT_CONSTANTS * sizeof(float);
81
82 static const int SIZE_PAR_VAL = 4 * sizeof(float);
83
88
89 // parameter offsets
90 static const int PAR0 = 0;
91 static const int PAR1 = 1;
92 static const int PAR2 = 2;
93 static const int PAR3 = 3;
94 //static const int PARVAL = 0;
95
96 // |
97 // | End of Blob structure
98 // \------------------------------------------------------------------------
99
100 // unsigned char ToTBlob[ BLOB_SIZE ];
101
102 // the following are handles on the various sections of the ToTBlob
104
107
108 //The following look like detector specific offsets,
109 // but in reality the first one is a global offset and the others are not used
114
115 // float & UpperLimit;
116 // float & LowerLimit;
117};
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
double BarrelShortToTCorrection(double, double, const float *)
double BarrelLongToTCorrection(double, double, const float *)
double correctToT(double ToT, double HitZ, double HitR, int BEC, int Layer, int Strawlayer)
double ExtractToT(unsigned int bitpattern)
int resolveIndex(int BEC, int Layer, int Strawlayer)
double EndcapToTCorrection(double, double, const float *)
double GetToT(unsigned int bitpattern, double HitZ, double HitR, int BEC, int Layer, int Strawlayer)