]>
Commit | Line | Data |
---|---|---|
d4945a3b | 1 | #ifndef DETECTORK_H\r |
2 | #define DETECTORK_H\r | |
3 | \r | |
4 | #include <TNamed.h>\r | |
5 | #include <TList.h>\r | |
6 | #include <TGraph.h>\r | |
7 | #include <Riostream.h>\r | |
8 | \r | |
9 | /***********************************************************\r | |
10 | \r | |
11 | Fast Simulation tool for Inner Tracker Systems\r | |
12 | \r | |
13 | original code of using the billoir technique was developed\r | |
14 | for the HFT (STAR), James H. Thomas, jhthomas@lbl.gov\r | |
15 | http://rnc.lbl.gov/~jhthomas\r | |
16 | \r | |
17 | Changes by S. Rossegger\r | |
18 | \r | |
19 | July 2011 - Adding the possibility of "fake calculation" and "efficiency calculation" \r | |
20 | with a number of "at least correct clusters on the track"\r | |
21 | Done using the complete combinatorics table with 3^nLayer track outcomes.\r | |
22 | \r | |
23 | April 2011 - Now uses the Kalman method (aliroot implementation) instead of the Billoir\r | |
24 | technique ... (changes by Ruben Shahoyan)\r | |
25 | \r | |
26 | March 2011 - Changes to comply with the Alice Offline coding conventions\r | |
27 | \r | |
28 | Feb. 2011 - Improvement in "lowest pt allowed" -> now uses helix param. for calc. of a,b\r | |
29 | \r | |
30 | - Adding a more sophisticaed efficiency calculation which includes\r | |
31 | the possibility to make chi2 cuts via Confidence Levels (method of Ruben Shahoyan)\r | |
32 | plus adding 'basic' detection efficiencies per layer ...\r | |
33 | \r | |
34 | - Adding "ITS Stand alone" tracking capabilities via \r | |
35 | forward+backward tracking -> Kalman smoothing is then \r | |
36 | used for the parameter estimates (important for efficiencies)\r | |
37 | \r | |
38 | Jan. 2011 - Inclusion of ImpactParameter Plots (with vtx estimates)\r | |
39 | to allow comparison with ITS performances in pp data\r | |
40 | \r | |
41 | Dec. 2010 - Translation into C++ class format \r | |
42 | - Adding various Setters and Getters to build the geometry \r | |
43 | (based on cylinders) plus handling of the layer properties \r | |
44 | \r | |
45 | \r | |
46 | ***********************************************************/\r | |
47 | \r | |
48 | class AliExternalTrackParam; \r | |
49 | #include <TMatrixD.h>\r | |
50 | \r | |
51 | class DetectorK : public TNamed {\r | |
52 | \r | |
53 | public:\r | |
54 | \r | |
55 | DetectorK();\r | |
56 | DetectorK(char *name,char *title);\r | |
57 | virtual ~DetectorK();\r | |
58 | \r | |
59 | enum {kNptBins = 100}; // less then 400 !!\r | |
60 | \r | |
c218d480 | 61 | void AddLayer(char *name, Float_t radius, Float_t radL, Float_t phiRes=999999, Float_t zRes=999999, Float_t eff=0.95);\r |
d4945a3b | 62 | \r |
63 | void KillLayer(char *name);\r | |
64 | void SetRadius(char *name, Float_t radius);\r | |
65 | void SetRadiationLength(char *name, Float_t radL);\r | |
66 | void SetResolution(char *name, Float_t phiRes=999999, Float_t zRes=999999);\r | |
c218d480 | 67 | void SetLayerEfficiency(char *name, Float_t eff=0.95);\r |
d4945a3b | 68 | void RemoveLayer(char *name);\r |
69 | \r | |
70 | Float_t GetRadius(char *name);\r | |
71 | Float_t GetRadiationLength(char *name);\r | |
72 | Float_t GetResolution(char *name, Int_t axis=0);\r | |
73 | Float_t GetLayerEfficiency(char *name);\r | |
74 | \r | |
75 | void PrintLayout(); \r | |
76 | void PlotLayout(Int_t plotDead = kTRUE);\r | |
77 | \r | |
78 | void MakeAliceAllNew(Bool_t flagTPC =1,Bool_t flagMon=1);\r | |
79 | void MakeAliceCurrent(Int_t AlignResiduals = 0, Bool_t flagTPC =1);\r | |
80 | void AddTPC(Float_t phiResMean, Float_t zResMean, Int_t skip=1);\r | |
81 | void RemoveTPC();\r | |
82 | \r | |
83 | void SetBField(Float_t bfield) {fBField = bfield; }\r | |
84 | Float_t GetBField() const {return fBField; }\r | |
85 | void SetLhcUPCscale(Float_t lhcUPCscale) {fLhcUPCscale = lhcUPCscale; }\r | |
86 | Float_t GetLhcUPCscale() const { return fLhcUPCscale; }\r | |
87 | void SetParticleMass(Float_t particleMass) {fParticleMass = particleMass; }\r | |
88 | Float_t GetParticleMass() const { return fParticleMass; }\r | |
89 | void SetIntegrationTime(Float_t integrationTime) {fIntegrationTime = integrationTime; }\r | |
90 | Float_t GetIntegrationTime() const { return fIntegrationTime; }\r | |
91 | void SetMaxRadiusOfSlowDetectors(Float_t maxRadiusSlowDet) {fMaxRadiusSlowDet = maxRadiusSlowDet; }\r | |
92 | Float_t GetMaxRadiusOfSlowDetectors() const { return fMaxRadiusSlowDet; }\r | |
93 | void SetAvgRapidity(Float_t avgRapidity) {fAvgRapidity = avgRapidity; }\r | |
94 | Float_t GetAvgRapidity() const { return fAvgRapidity; }\r | |
95 | void SetConfidenceLevel(Float_t confLevel) {fConfLevel = confLevel; }\r | |
96 | Float_t GetConfidenceLevel() const { return fConfLevel; }\r | |
97 | void SetAtLeastCorr(Int_t atLeastCorr ) {fAtLeastCorr = atLeastCorr; }\r | |
98 | Int_t GetAtLeastCorr() const { return fAtLeastCorr; }\r | |
99 | void SetAtLeastFake(Int_t atLeastFake ) {fAtLeastFake = atLeastFake; }\r | |
100 | Int_t GetAtLeastFake() const { return fAtLeastFake; }\r | |
101 | \r | |
c218d480 | 102 | void SetMaxSeedRadius(Double_t maxSeedRadius ) {fMaxSeedRadius = maxSeedRadius; }\r |
103 | Int_t GetMaxSeedRadius() const { return fMaxSeedRadius; }\r | |
104 | \r | |
105 | void SetptScale(Double_t ptScale ) {fptScale = ptScale; }\r | |
106 | Int_t GetptScale() const { return fptScale; }\r | |
107 | \r | |
108 | \r | |
109 | \r | |
d4945a3b | 110 | void SetdNdEtaCent(Int_t dNdEtaCent ) {fdNdEtaCent = dNdEtaCent; }\r |
111 | Float_t GetdNdEtaCent() const { return fdNdEtaCent; }\r | |
c218d480 | 112 | \r |
113 | \r | |
d4945a3b | 114 | \r |
115 | Float_t GetNumberOfActiveLayers() const {return fNumberOfActiveLayers; }\r | |
116 | Float_t GetNumberOfActiveITSLayers() const {return fNumberOfActiveITSLayers; }\r | |
117 | \r | |
c218d480 | 118 | void SolveViaBilloir(Int_t flagD0=1,Int_t print=1, Bool_t allPt=1, Double_t meanPt =0.250, char* detLayer=((char*)""));\r |
d4945a3b | 119 | \r |
120 | // Helper functions\r | |
121 | Double_t ThetaMCS ( Double_t mass, Double_t RadLength, Double_t momentum ) const;\r | |
122 | Double_t ProbGoodHit ( Double_t radius, Double_t searchRadiusRPhi, Double_t searchRadiusZ ) ; \r | |
123 | Double_t ProbGoodChiSqHit ( Double_t radius, Double_t searchRadiusRPhi, Double_t searchRadiusZ ) ; \r | |
124 | Double_t ProbGoodChiSqPlusConfHit ( Double_t radius, Double_t leff, Double_t searchRadiusRPhi, Double_t searchRadiusZ ) ; \r | |
125 | Double_t ProbNullChiSqPlusConfHit ( Double_t radius, Double_t leff, Double_t searchRadiusRPhi, Double_t searchRadiusZ ) ; \r | |
126 | \r | |
127 | // Howard W. hit distribution and convolution integral\r | |
128 | Double_t Dist ( Double_t Z, Double_t radius ) ; \r | |
129 | Double_t HitDensity ( Double_t radius ) ;\r | |
130 | Double_t UpcHitDensity ( Double_t radius ) ;\r | |
131 | Double_t IntegratedHitDensity ( Double_t multiplicity, Double_t radius ) ;\r | |
132 | Double_t OneEventHitDensity ( Double_t multiplicity, Double_t radius ) const ;\r | |
133 | Double_t D0IntegratedEfficiency( Double_t pt, Double_t corrEfficiency[][400] ) const ;\r | |
134 | \r | |
135 | TGraph* GetGraphMomentumResolution(Int_t color, Int_t linewidth=1);\r | |
136 | TGraph* GetGraphPointingResolution(Int_t axis,Int_t color, Int_t linewidth=1);\r | |
137 | TGraph* GetGraphPointingResolutionTeleEqu(Int_t axis,Int_t color, Int_t linewidth=1);\r | |
c218d480 | 138 | TGraph* GetGraphLayerInfo(Int_t plot, Int_t color, Int_t linewidth=1);\r |
d4945a3b | 139 | \r |
140 | TGraph* GetGraphImpactParam(Int_t mode, Int_t axis, Int_t color, Int_t linewidth=1);\r | |
141 | \r | |
142 | TGraph* GetGraphRecoEfficiency(Int_t particle, Int_t color, Int_t linewidth=1); \r | |
143 | TGraph* GetGraphRecoFakes(Int_t particle,Int_t color, Int_t linewidth);\r | |
144 | TGraph* GetGraphRecoPurity(Int_t particle,Int_t color, Int_t linewidth);\r | |
145 | \r | |
146 | TGraph* GetGraph(Int_t number, Int_t color, Int_t linewidth=1);\r | |
147 | \r | |
148 | void MakeStandardPlots(Bool_t add =0, Int_t color=1, Int_t linewidth=1,Bool_t onlyPionEff=0);\r | |
149 | \r | |
150 | // method to extend AliExternalTrackParam functionality\r | |
c218d480 | 151 | static Bool_t GetXatLabR(AliExternalTrackParam* tr,Double_t r,Double_t &x, Double_t bz, Int_t dir=0);\r |
152 | static Bool_t PropagateToR(AliExternalTrackParam* trc, double r, double b, int dir=0);\r | |
d4945a3b | 153 | Double_t* PrepareEffFakeKombinations(TMatrixD *probKomb, TMatrixD *probLay);\r |
154 | \r | |
155 | protected:\r | |
156 | \r | |
157 | Int_t fNumberOfLayers; // total number of layers in the model\r | |
158 | Int_t fNumberOfActiveLayers; // number of active layers in the model\r | |
159 | Int_t fNumberOfActiveITSLayers; // number of active ITS layers in the model\r | |
160 | TList fLayers; // List of layer pointers\r | |
161 | Float_t fBField; // Magnetic Field in Tesla\r | |
162 | Float_t fLhcUPCscale; // UltraPeripheralElectrons: scale from RHIC to LHC\r | |
163 | Float_t fIntegrationTime; // electronics integration time\r | |
164 | Float_t fConfLevel; // Confidence Level for the tracking\r | |
165 | Float_t fAvgRapidity; // rapidity of the track (= mean)\r | |
166 | Float_t fParticleMass; // Particle used for tracking. Standard: mass of pion\r | |
167 | Double_t fMaxRadiusSlowDet; // Maximum radius for slow detectors. Fast detectors \r | |
168 | // and only fast detectors reside outside this radius.\r | |
169 | Int_t fAtLeastCorr; // min. number of correct hits for the track to be "good"\r | |
170 | Int_t fAtLeastFake; // min. number of fake hits for the track to be "fake"\r | |
171 | \r | |
c218d480 | 172 | Double_t fMaxSeedRadius; // max seeding radius, e.g. to exclude TRD\r |
173 | Double_t fptScale; // used for maxPt\r | |
174 | \r | |
d4945a3b | 175 | Int_t fdNdEtaCent; // Multiplicity\r |
176 | \r | |
177 | enum {kMaxNumberOfDetectors = 200};\r | |
178 | \r | |
179 | Double_t fTransMomenta[kNptBins]; // array of transverse momenta\r | |
180 | Double_t fMomentumRes[kNptBins]; // array of momentum resolution\r | |
181 | Double_t fResolutionRPhi[kNptBins]; // array of rphi resolution\r | |
182 | Double_t fResolutionZ[kNptBins]; // array of z resolution\r | |
183 | Double_t fDetPointRes[kMaxNumberOfDetectors][kNptBins]; // array of rphi resolution per layer\r | |
184 | Double_t fDetPointZRes[kMaxNumberOfDetectors][kNptBins]; // array of z resolution per layer\r | |
185 | Double_t fEfficiency[3][kNptBins]; // efficiency for different particles\r | |
186 | Double_t fFake[3][kNptBins]; // fake prob for different particles\r | |
187 | \r | |
c218d480 | 188 | Int_t kDetLayer; // layer for which a few more details are extracted\r |
189 | Double_t fResolutionRPhiLay[kNptBins]; // array of rphi resolution\r | |
190 | Double_t fResolutionZLay[kNptBins]; // array of z resolution\r | |
191 | Double_t fEfficProlongLay[kNptBins]; // array of z resolution\r | |
192 | \r | |
d4945a3b | 193 | ClassDef(DetectorK,1);\r |
194 | };\r | |
195 | \r | |
196 | #endif\r |