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