]>
Commit | Line | Data |
---|---|---|
54fc064a | 1 | #ifndef DETECTOR_H |
2 | #define DETECTOR_H | |
3 | ||
4 | #include <TNamed.h> | |
5 | #include <TList.h> | |
6 | #include <TGraph.h> | |
7 | ||
8 | /*********************************************************** | |
9 | ||
10 | Fast Simulation tool for Inner Tracker Systems | |
11 | ||
12 | original code of using the billoir technique was developed | |
13 | for the HFT (STAR), James H. Thomas, jhthomas@lbl.gov | |
14 | http://rnc.lbl.gov/~jhthomas | |
15 | ||
16 | Changes by S. Rossegger | |
c40d3fcb | 17 | |
18 | March 2011 - Changes to comply with the Alice Offline coding conventions | |
19 | ||
20 | Feb. 2011 - Improvement in "lowest pt allowed" -> now uses helix param. for calc. of a,b | |
21 | ||
22 | - Adding a more sophisticaed efficiency calculation which includes | |
23 | the possibility to make chi2 cuts via Confidence Levels (method of Ruben Shahoyan) | |
24 | plus adding 'basic' detection efficiencies per layer ... | |
25 | ||
26 | - Adding "ITS Stand alone" tracking capabilities via | |
27 | forward+backward tracking -> Kalman smoothing is then | |
28 | used for the parameter estimates (important for efficiencies) | |
29 | ||
30 | Jan. 2011 - Inclusion of ImpactParameter Plots (with vtx estimates) | |
31 | to allow comparison with ITS performances in pp data | |
32 | ||
54fc064a | 33 | Dec. 2010 - Translation into C++ class format |
34 | - Adding various Setters and Getters to build the geometry | |
35 | (based on cylinders) plus handling of the layer properties | |
36 | ||
54fc064a | 37 | |
38 | ***********************************************************/ | |
39 | ||
40 | ||
41 | class Detector : public TNamed { | |
42 | public: | |
43 | Detector(); | |
44 | Detector(char *name,char *title); | |
45 | virtual ~Detector(); | |
46 | ||
c40d3fcb | 47 | void AddLayer(char *name, Float_t radius, Float_t radL, Float_t phiRes=999999, Float_t zRes=999999, Float_t eff=1.); |
54fc064a | 48 | |
49 | void KillLayer(char *name); | |
50 | void SetRadius(char *name, Float_t radius); | |
51 | void SetRadiationLength(char *name, Float_t radL); | |
c40d3fcb | 52 | void SetResolution(char *name, Float_t phiRes=999999, Float_t zRes=999999); |
53 | void SetLayerEfficiency(char *name, Float_t eff=1.0); | |
54fc064a | 54 | void RemoveLayer(char *name); |
55 | ||
56 | Float_t GetRadius(char *name); | |
57 | Float_t GetRadiationLength(char *name); | |
58 | Float_t GetResolution(char *name, Int_t axis=0); | |
c40d3fcb | 59 | Float_t GetLayerEfficiency(char *name); |
54fc064a | 60 | |
61 | void PrintLayout(); | |
c40d3fcb | 62 | void PlotLayout(Int_t plotDead = kTRUE); |
63 | ||
54fc064a | 64 | void MakeAliceCurrent(Int_t AlignResiduals = 0, Bool_t flagTPC =1); |
65 | void AddTPC(Float_t phiResMean, Float_t zResMean, Int_t skip=1); | |
c40d3fcb | 66 | void RemoveTPC(); |
54fc064a | 67 | |
68 | void SetBField(Float_t bfield) {fBField = bfield; } | |
c40d3fcb | 69 | Float_t GetBField() const {return fBField; } |
54fc064a | 70 | void SetLhcUPCscale(Float_t lhcUPCscale) {fLhcUPCscale = lhcUPCscale; } |
c40d3fcb | 71 | Float_t GetLhcUPCscale() const { return fLhcUPCscale; } |
54fc064a | 72 | void SetParticleMass(Float_t particleMass) {fParticleMass = particleMass; } |
c40d3fcb | 73 | Float_t GetParticleMass() const { return fParticleMass; } |
54fc064a | 74 | void SetIntegrationTime(Float_t integrationTime) {fIntegrationTime = integrationTime; } |
c40d3fcb | 75 | Float_t GetIntegrationTime() const { return fIntegrationTime; } |
76 | void SetMaxRadiusOfSlowDetectors(Float_t maxRadiusSlowDet) {fMaxRadiusSlowDet = maxRadiusSlowDet; } | |
77 | Float_t GetMaxRadiusOfSlowDetectors() const { return fMaxRadiusSlowDet; } | |
54fc064a | 78 | void SetAvgRapidity(Float_t avgRapidity) {fAvgRapidity = avgRapidity; } |
c40d3fcb | 79 | Float_t GetAvgRapidity() const { return fAvgRapidity; } |
80 | void SetConfidenceLevel(Float_t confLevel) {fConfLevel = confLevel; } | |
81 | Float_t GetConfidenceLevel() const { return fConfLevel; } | |
54fc064a | 82 | |
c40d3fcb | 83 | Float_t GetNumberOfActiveLayers() const {return fNumberOfActiveLayers; } |
54fc064a | 84 | |
c40d3fcb | 85 | void SolveViaBilloir(Int_t flagD0=1,Int_t print=1, Bool_t allPt=1, Double_t meanPt =0.750); |
86 | void SolveDOFminusOneAverage(); | |
54fc064a | 87 | |
54fc064a | 88 | // Helper functions |
c40d3fcb | 89 | Double_t ThetaMCS ( Double_t mass, Double_t RadLength, Double_t momentum ) const; |
90 | Double_t ProbGoodHit ( Double_t radius, Double_t searchRadiusRPhi, Double_t searchRadiusZ ) ; | |
91 | Double_t ProbGoodChiSqHit ( Double_t radius, Double_t searchRadiusRPhi, Double_t searchRadiusZ ) ; | |
92 | Double_t ProbGoodChiSqPlusConfHit ( Double_t radius, Double_t leff, Double_t searchRadiusRPhi, Double_t searchRadiusZ ) ; | |
93 | ||
54fc064a | 94 | // Howard W. hit distribution and convolution integral |
c40d3fcb | 95 | Double_t Dist ( Double_t Z, Double_t radius ) ; |
96 | Double_t HitDensity ( Double_t radius ) ; | |
97 | Double_t UpcHitDensity ( Double_t radius ) ; | |
98 | Double_t IntegratedHitDensity ( Double_t multiplicity, Double_t radius ) ; | |
99 | Double_t OneEventHitDensity ( Double_t multiplicity, Double_t radius ) const ; | |
100 | Double_t D0IntegratedEfficiency( Double_t pt, Double_t corrEfficiency[][400] ) const ; | |
54fc064a | 101 | |
102 | TGraph* GetGraphMomentumResolution(Int_t color, Int_t linewidth=1); | |
103 | TGraph* GetGraphPointingResolution(Int_t axis,Int_t color, Int_t linewidth=1); | |
104 | TGraph* GetGraphPointingResolutionTeleEqu(Int_t axis,Int_t color, Int_t linewidth=1); | |
105 | ||
106 | TGraph* GetGraphImpactParam(Int_t mode, Int_t axis, Int_t color, Int_t linewidth=1); | |
107 | ||
108 | TGraph* GetGraphRecoEfficiency(Int_t particle, Int_t color, Int_t linewidth=1); | |
109 | ||
110 | TGraph* GetGraph(Int_t number, Int_t color, Int_t linewidth=1); | |
c40d3fcb | 111 | |
112 | void MakeStandardPlots(Bool_t add =0, Int_t color=1, Int_t linewidth=1,Bool_t onlyPionEff=0); | |
113 | ||
54fc064a | 114 | |
115 | protected: | |
116 | ||
c40d3fcb | 117 | Int_t fNumberOfLayers; // total number of layers in the model |
118 | Int_t fNumberOfActiveLayers; // number of active layers in the model | |
119 | TList fLayers; // List of layer pointers | |
120 | Float_t fBField; // Magnetic Field in Tesla | |
121 | Float_t fLhcUPCscale; // UltraPeripheralElectrons: scale from RHIC to LHC | |
122 | Float_t fIntegrationTime; // electronics integration time | |
123 | Float_t fConfLevel; // Confidence Level for the tracking | |
124 | Float_t fAvgRapidity; // rapidity of the track (= mean) | |
125 | Float_t fParticleMass; // Particle used for tracking. Standard: mass of pion | |
126 | Double_t fMaxRadiusSlowDet; // Maximum radius for slow detectors. Fast detectors | |
127 | // and only fast detectors reside outside this radius. | |
128 | ||
129 | enum {kMaxNumberOfDetectors = 200}; | |
54fc064a | 130 | |
c40d3fcb | 131 | Double_t fTransMomenta[400]; // array of transverse momenta |
132 | Double_t fMomentumRes[400]; // array of momentum resolution | |
133 | Double_t fResolutionRPhi[400]; // array of rphi resolution | |
134 | Double_t fResolutionZ[400]; // array of z resolution | |
135 | Double_t fDetPointRes[kMaxNumberOfDetectors][400]; // array of rphi resolution per layer | |
136 | Double_t fDetPointZRes[kMaxNumberOfDetectors][400]; // array of z resolution per layer | |
137 | Double_t fEfficiency[3][400]; // efficiency for different particles | |
54fc064a | 138 | |
139 | ClassDef(Detector,1); | |
140 | }; | |
141 | ||
142 | #endif |