]>
Commit | Line | Data |
---|---|---|
d8d3b5b8 | 1 | #if !defined(__CINT__) || defined(__MAKECINT__) |
289478c7 | 2 | #include "AliTrackReference.h" |
d8d3b5b8 | 3 | #endif |
289478c7 | 4 | |
aec95541 | 5 | AliTRDclusterCorrection * gCorrection; |
6 | ||
7 | void ReadCorrection(){ | |
8 | TFile f("TRDcorrection.root"); | |
9 | gCorrection= (AliTRDclusterCorrection *)f.Get("TRDcorrection"); | |
10 | if (gCorrection==0){ | |
11 | printf("Correction not found"); | |
12 | } | |
13 | } | |
14 | ||
15 | ||
289478c7 | 16 | class AliTRDExactPoint: public TObject { |
17 | public : | |
18 | AliTRDExactPoint(); | |
19 | Float_t fTX; //x in rotated coordinate in the center of time bin | |
20 | Float_t fTY; //y | |
21 | Float_t fTZ; //z | |
22 | Float_t fTAY; //angle y | |
23 | Float_t fTAZ; //angle z | |
24 | Float_t fGx; | |
25 | Float_t fGy; | |
26 | Float_t fGz; | |
27 | // | |
28 | void SetReference(AliTrackReference *ref); | |
29 | Float_t fTRefAngleY; | |
30 | Float_t fRefPos[3]; | |
31 | Float_t fRefMom[3]; | |
32 | // | |
33 | Int_t fDetector; // detector (chamber) | |
34 | Int_t fLocalTimeBin; // local time bin | |
35 | Int_t fPlane; // plane (layer) | |
36 | Int_t fSector; // segment | |
37 | Int_t fPlaneMI; | |
38 | // | |
39 | Float_t fTQ; | |
40 | Float_t fTPrim; | |
41 | // | |
42 | ClassDef(AliTRDExactPoint,1) | |
43 | }; | |
44 | ||
289478c7 | 45 | class AliTRDCI: public TObject { |
46 | public : | |
47 | AliTRDCI(){;} | |
48 | virtual ~AliTRDCI(){;} | |
49 | // | |
50 | AliTRDclusterMI fCl; | |
51 | AliTRDExactPoint fEp; | |
52 | TParticle fP; | |
53 | Char_t fStatus; | |
54 | // | |
55 | Float_t fDYtilt; | |
56 | Float_t fTDistZ; | |
57 | // | |
58 | Int_t fNTracks; | |
59 | Float_t fPt; | |
60 | Float_t fCharge; | |
61 | Bool_t fIsPrim; | |
aec95541 | 62 | Float_t fCorrection; |
289478c7 | 63 | void Update(); |
64 | ClassDef(AliTRDCI,1) | |
65 | }; | |
66 | ||
289478c7 | 67 | class AliTRDClusterErrAnal: public TObject{ |
68 | public: | |
69 | AliTRDClusterErrAnal(Char_t *chloader = "galice.root"); | |
70 | void SetIO(Int_t event); | |
71 | Int_t Analyze(Int_t trackmax); | |
72 | void LoadClusters(); | |
73 | void MakeExactPoints(Int_t trackmax); | |
74 | void SortReferences(); | |
75 | AliTrackReference * FindNearestReference(Int_t lab, Float_t pos[3], Float_t dmax=10.); | |
76 | public: | |
77 | AliRunLoader * fRunLoader; | |
78 | AliLoader * fTRDLoader; | |
79 | AliTRDparameter *fParam; | |
80 | AliTRDgeometry *fGeometry; | |
81 | TTree * fHitTree; | |
82 | TTree * fClusterTree; | |
83 | TTree * fReferenceTree; | |
84 | AliTRDv1 * fTRD; | |
85 | // | |
86 | TTree * fTreeA; | |
87 | TFile * fFileA; | |
88 | AliTRDtracker *fTracker; | |
89 | AliStack *fStack; | |
90 | TObjArray fClusters[12][100][18]; //first plane, second time bin | |
91 | TObjArray fExactPoints; | |
92 | TObjArray *fReferences; | |
93 | ||
94 | ClassDef(AliTRDClusterErrAnal,1) | |
95 | }; | |
96 | ||
97 | ||
98 | class AliTRDClusterErrDraw: public TObject{ | |
99 | public: | |
aec95541 | 100 | AliTRDclusterCorrection* MakeCorrection(TTree * tree, Float_t offset); |
101 | ||
289478c7 | 102 | static TH1F * ResDyVsAmp(TTree* tree, const char* selection, Float_t t0, Float_t ampmin=10, Float_t ampmax=300); |
103 | static TH1F * ResDyVsRelPos(TTree* tree, const char* selection, Float_t t0, Float_t min=-0.5, Float_t max=0.5); | |
104 | static TH1F * ResDyVsAngleY(TTree* tree, const char* selection, Float_t t0, Float_t min=-1., Float_t max=1.); | |
105 | static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle); | |
106 | static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec); | |
107 | static TH1F* CreateResHisto(TH2F* hRes2, Bool_t draw = kTRUE, Bool_t drawBinFits = kTRUE, | |
108 | Bool_t overflowBinFits = kFALSE); | |
289478c7 | 109 | ClassDef(AliTRDClusterErrDraw,1) |
110 | }; | |
111 | ||
112 | ||
113 | ||
114 | ||
aec95541 | 115 | AliTRDExactPoint::AliTRDExactPoint() |
116 | { | |
117 | fTX=fTY=fTZ=fTAZ=fTAY=fGx=fGy=fGz=fTRefAngleY=0; | |
118 | fRefPos[0]=fRefPos[1]=fRefPos[2]=fRefMom[0]=fRefMom[1]=fRefMom[2]=0; | |
119 | fDetector=fLocalTimeBin=fPlane=fSector=fPlaneMI=0; | |
120 | fTQ=fTPrim=0; | |
121 | } | |
122 | ||
123 | void AliTRDExactPoint::SetReference(AliTrackReference *ref){ | |
124 | fRefPos[0] = ref->X(); | |
125 | fRefPos[1] = ref->Y(); | |
126 | fRefPos[2] = ref->Z(); | |
127 | // | |
128 | fRefMom[0] = ref->Px(); | |
129 | fRefMom[1] = ref->Py(); | |
130 | fRefMom[2] = ref->Pz(); | |
131 | } | |
132 | ||
133 | ||
134 | void AliTRDCI::Update() | |
135 | { | |
136 | // | |
137 | //thanks to root | |
138 | fPt = fP.Pt(); | |
139 | fCharge = fP.GetPDG()->Charge(); | |
140 | fIsPrim = (fP.GetMother(0)>0)? kFALSE :kTRUE; | |
141 | fCorrection = gCorrection->GetCorrection(fEp.fPlane,fCl.fTimeBin,fEp.fTAY); | |
142 | } | |
143 |