1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 #include "AliTrackReference.h"
5 AliTRDclusterCorrection * gCorrection;
8 TFile f("TRDcorrection.root");
9 gCorrection= (AliTRDclusterCorrection *)f.Get("TRDcorrection");
11 printf("Correction not found");
16 class AliTRDExactPoint: public TObject {
19 Float_t fTX; //x in rotated coordinate in the center of time bin
22 Float_t fTAY; //angle y
23 Float_t fTAZ; //angle z
28 void SetReference(AliTrackReference *ref);
33 Int_t fDetector; // detector (chamber)
34 Int_t fLocalTimeBin; // local time bin
35 Int_t fPlane; // plane (layer)
36 Int_t fSector; // segment
42 ClassDef(AliTRDExactPoint,1)
45 class AliTRDCI: public TObject {
48 virtual ~AliTRDCI(){;}
68 class AliTRDClusterErrAnal: public TObject{
70 AliTRDClusterErrAnal(Char_t *chloader = "galice.root");
71 void SetIO(Int_t event);
72 Int_t Analyze(Int_t trackmax);
74 void MakeExactPoints(Int_t trackmax);
75 void SortReferences();
76 AliTrackReference * FindNearestReference(Int_t lab, Float_t pos[3], Float_t dmax=10.);
78 AliRunLoader * fRunLoader;
79 AliLoader * fTRDLoader;
80 AliTRDparameter *fParam;
81 AliTRDgeometry *fGeometry;
84 TTree * fReferenceTree;
89 AliTRDtracker *fTracker;
91 TObjArray fClusters[12][100][18]; //first plane, second time bin
92 TObjArray fExactPoints;
93 TObjArray *fReferences;
95 ClassDef(AliTRDClusterErrAnal,1)
99 class AliTRDClusterErrDraw: public TObject{
102 AliTRDclusterCorrection* MakeCorrection(TTree * tree, Float_t offset);
103 static TH1F * ResDyVsAmp(TTree* tree, const char* selection, Float_t t0, Float_t ampmin=10, Float_t ampmax=300);
104 static TH1F * ResDyVsRelPos(TTree* tree, const char* selection, Float_t t0, Float_t min=-0.5, Float_t max=0.5);
105 static TH1F * ResDyVsAngleY(TTree* tree, const char* selection, Float_t t0, Float_t min=-1., Float_t max=1.);
106 static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle);
107 static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec);
108 static TH1F* CreateResHisto(TH2F* hRes2, Bool_t draw = kTRUE, Bool_t drawBinFits = kTRUE,
109 Bool_t overflowBinFits = kFALSE);
110 ClassDef(AliTRDClusterErrDraw,1)
116 AliTRDExactPoint::AliTRDExactPoint()
118 fTX=fTY=fTZ=fTAZ=fTAY=fGx=fGy=fGz=fTRefAngleY=0;
119 fRefPos[0]=fRefPos[1]=fRefPos[2]=fRefMom[0]=fRefMom[1]=fRefMom[2]=0;
120 fDetector=fLocalTimeBin=fPlane=fSector=fPlaneMI=0;
124 void AliTRDExactPoint::SetReference(AliTrackReference *ref){
125 fRefPos[0] = ref->X();
126 fRefPos[1] = ref->Y();
127 fRefPos[2] = ref->Z();
129 fRefMom[0] = ref->Px();
130 fRefMom[1] = ref->Py();
131 fRefMom[2] = ref->Pz();
135 void AliTRDCI::Update()
140 fCharge = fP.GetPDG()->Charge();
141 fIsPrim = (fP.GetMother(0)>0)? kFALSE :kTRUE;
142 fCorrection = gCorrection->GetCorrection(fEp.fPlane,fCl.fTimeBin,fEp.fTAY);
150 .L AliTRDclusterErrors.C+
151 gCorrection = AliTRDclusterCorrection::GetCorrection();
152 AliTRDClusterErrAnal ana;
153 ana.Analyze(10000000)
158 .L AliTRDclusterErrors.C+
159 TFile f("trdclusteranal.root");
160 TTree* tree = (TTree*)f.Get("trdcl");
161 AliComparisonDraw comp;
165 tree->SetAlias("shapef","(1.-(0.8+0.06*(6-fEp.fPlane))*(fCl.fSigmaY2/(0.17+0.027*abs(fEp.fTAY))))");
166 tree->SetAlias("shapes","0.08+0.3/sqrt(fCl.fQ)");
167 tree->SetAlias("sfactor","shapef/shapes");
169 tree->SetAlias("shapen","(fCl.fNPads-2.7-0.9*abs(fEp.fTAY))");
171 tree->SetAlias("gshape","sfactor>-2&&fCl.fNPads<6&&shapen<1");
174 tree->SetAlias("dy" , "fEp.fTY-fCl.fY-fDYtilt");
175 tree->SetAlias("angle","abs(fEp.fTAY)");
176 TCut cbase("cbase","(abs(fP.fPdgCode)!=11||fPt>0.2)&&fPt>0.1&&angle<2");
178 tree->SetAlias("erry0","(0.028+0.07*angle)");
179 tree->SetAlias("erry1","erry0*(0.9+15./fCl.fQ)");
180 tree->SetAlias("erry2","erry1*(0.8+0.5*max(-sfactor,0))");
185 TH1F his("resy","resy",100,-0.2,0.2);
186 comp->fTree->Draw("dy:0.028*fEp.fTAY","fStatus==0 && abs(dy)<1.0&&fNTracks<2&&angle<2&&gshape","")
187 comp->DrawXY("sqrt(fCl.fQ)","dy","fStatus==0"+cbase,"gshape",10,0,20,-0.7,0.7);
189 comp->DrawXY("angle","dy/erry1","fStatus==0"+cbase,"gshape",10,0,2,-5.7,5.7);
190 comp->DrawXY("sqrt(cl->fQ)","dy/err1","fStatus==0"+cbase,"gshape",10,2,20,-5.7,5.7);
194 AliTRDClusterErrDraw::ResDyVsAmp(tree,"abs(dy)<0.4&&abs(fEp.fTAY)<0.2&&fNTracks<2&&fPt>0.1"+cbase,-0.03);
195 AliTRDClusterErrDraw::ResDyVsRelPos(tree,"abs(dy)<0.4&&abs(fEp.fTAY)<0.2&&fNTracks<2&&fPt>0.2"+cbase,-0.03);
196 AliTRDClusterErrDraw::ResDyVsAngleY(tree,"abs(fEp.fTY-fCl.fY+fDYtilt)<0.4",0.);
198 AliTRDclusterCorrection * cor = AliTRDClusterErrDraw::MakeCorrection(tree,0.134);
199 tree->Draw("sqrt(fCl.fRmsY)","fStatus==0&&abs(fEp.fTY-fCl.fY+fDYtilt)<0.4&&abs(fEp.fTAY)<0.2&&fNTracks<2&&fPt>0.2&&fCl.fNPads==0");
201 tree->Draw("fEp.fTY-fCl.fY+fDYtilt:fCl.fTimeBin","fStatus==0&&abs(fEp.fTY-fCl.fY+fDYtilt)<0.5&&abs(fEp.fTAY)<0.3&&fEp.fTAY>0.13","prof")