]>
Commit | Line | Data |
---|---|---|
1ee39b3a | 1 | #ifndef ALITRDCHECKESD_H |
2 | #define ALITRDCHECKESD_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliTRDcheckESD.h 27496 2008-07-22 08:35:45Z cblume $ */ | |
7 | ||
8 | ///////////////////////////////////////////////////// | |
9 | // | |
10 | // Check basic detector results at ESD level | |
11 | // | |
12 | // Author | |
13 | // Alex Bercuci <A.Bercuci@gsi.de> | |
14 | // | |
15 | ////////////////////////////////////////////////////// | |
16 | ||
17 | #ifndef ALIANALYSISTASK_H | |
f8f46e4d | 18 | #include "AliAnalysisTaskSE.h" |
1ee39b3a | 19 | #endif |
20 | ||
21 | class AliESDEvent; | |
22 | class AliMCEvent; | |
fb65de21 | 23 | class AliESDpid; |
1ee39b3a | 24 | class TH1; |
f2e89a4c | 25 | class TH2; |
64d57299 | 26 | class TH1F; |
27 | class TH2F; | |
28 | class TH3F; | |
bd97a050 | 29 | class TH3; |
1ee39b3a | 30 | class TObjArray; |
31 | class TGraph; | |
32 | class TGraphErrors; | |
f8f46e4d | 33 | class AliTRDcheckESD : public AliAnalysisTaskSE { |
1ee39b3a | 34 | public: |
35 | enum ETRDcheckESDstatus { | |
36d21092 | 36 | kMC = BIT(0) // use MC info |
97d0ccba | 37 | ,kCollision = BIT(1) // |
1ee39b3a | 38 | }; |
39 | enum ETRDcheckESDhistos { | |
f76b8071 | 40 | kNCl = 0 // number of clusters per track |
41 | ,kTRDstat // TRD tracks status | |
42 | ,kTRDmom // TRD track momentum | |
43 | ,kPtRes // Pt resolution @ vertex for TRD | |
44 | ,kTPCVertex // event vertex from TPC | |
45 | ,kEventVertex // event vertex | |
46 | ,kNTracksAll // ntracks - all | |
47 | ,kNTracksAcc // ntracks - inside acc. and DCA cut | |
48 | ,kNTracksTPC // additional cut on number of TPC clusters | |
49 | ,kDCAxy // transverse DCA | |
50 | ,kDCAz // z - DCA | |
51 | ,kPt1 // Pt distribution, eta and ptmin cuts | |
52 | ,kPt2 // Pt distribution, cuts from kPt1 and DCA cuts | |
53 | ,kPt3pos // Pt distribution, cuts from kPt2 and cut on TPC clusters for positives (>100) | |
54 | ,kPt3neg // Pt distribution, cuts from kPt2 and cut on TPC clusters for negatives (>100) | |
55 | ,kPt4pos // Pt distribution, cuts from kPt3pos and at least one TRD tracklet | |
56 | ,kPt4neg // Pt distribution, cuts from kPt3neg and at least one TRD tracklet | |
57 | ,kTheta // distribution of theta for tracks passing the cuts from kPt4pos and kPt4neg | |
58 | ,kPhi // distribution of phi for tracks passing the cuts from kPt4pos and kPt4neg | |
59 | ,kNTPCCl // number of TPC clusters, cuts from kPt2 | |
60 | ,kNTPCCl2 // number of TPC clusters, cuts from kPt2 + pt>1 GeV/c | |
61 | ,kTPCDedx // TPC dE/dx, cuts from kPt3pos or kPt3neg | |
62 | ,kEtaPhi // (eta,phi) distrib. for tracks after the cuts from kPt3pos or kPt3neg | |
63 | ,kEtaNclsTPC // (TPC_Ncls,eta) distrib. for tracks after the cuts from kPt3pos or kPt3neg | |
64 | ,kPhiNclsTPC // (TPC_Ncls,phi) distrib. for tracks after the cuts from kPt3pos or kPt3neg | |
65 | ,kNTrackletsTRD // (TRD tracklets per track, P) distribution, after cuts from kPt4pos or kPt4neg | |
66 | ,kNClsTrackTRD // (TRD clusters per track, P) distribution, after cuts from kPt4pos or kPt4neg | |
67 | ,kPHSlice // (slicePH,sliceNo) distribution, after cuts from kPt4pos or kPt4neg | |
fb65de21 | 68 | ,kPHSliceTPCpions // (slicePH,sliceNo) distribution for TPC pions, after cuts from kPt4pos or kPt4neg |
69 | ,kTPCdedxPions // (TPC dedx,P) for selected TPC pions | |
70 | ,kPHSliceTPCelectrons // (slicePH,sliceNo) distribution for TPC electrons, after cuts from kPt4pos or kPt4neg | |
71 | ,kTPCdedxElectrons // (TPC dedx,P) for selected TPC electrons | |
f76b8071 | 72 | ,kQtotP // (total Q from slices, momentum) distribution, after cuts from kPt4pos or kPt4neg |
73 | ,kPropagXYvsP // (X,Y,momentum) distribution after AliESDtrack::PropagateTo(r=300.) | |
74 | ,kPropagRZvsP // (R,Z,momentum) distribution after AliESDtrack::PropagateTo(r=300.) | |
bd97a050 | 75 | ,kTPCRefTracksPos // (eta,detector phi,Pt) distribution of reference TPC positive tracks (fulfill cuts from kPt3pos) |
76 | ,kTPCRefTracksNeg // (eta,detector phi,Pt) distribution of reference TPC negative tracks (fulfill cuts from kPt3neg) | |
77 | ,kTRDRefTracksPos // (eta,detector phi,Pt) distribution of reference TRD positive tracks (fulfill cuts from kPt4pos) | |
78 | ,kTRDRefTracksNeg // (eta,detector phi,Pt) distribution of reference TRD negative tracks (fulfill cuts from kPt4neg) | |
f76b8071 | 79 | ,kTRDEtaPhiAvNtrkl // (eta, detector phi) profile of average number of tracklets |
80 | ,kTRDEtaDeltaPhiAvNtrkl // (eta, delta-phi) profile of average number of tracklets | |
81 | // delta-phi is the angle made by the track with the normal to the chamber entrance plane | |
bd97a050 | 82 | ,kTRDEtaPhiAvQtot // (eta, detector phi) profile of total tracklet charge from slices |
fb65de21 | 83 | ,kNhistos = 49 // number of histograms |
84 | ,kNrefs = 7 // number of reference plots | |
1ee39b3a | 85 | }; |
86 | enum ETRDcheckESDbits { | |
87 | kTPCout = 1 // track left TPC | |
88 | ,kTRDin // track reach TRD fiducial volume | |
89 | ,kTRDout // track reconstructed in TRD | |
90 | ,kTRDpid // PID calculated in TRD | |
91 | ,kTRDref // track refitted in TRD | |
1ee39b3a | 92 | }; |
93 | AliTRDcheckESD(); | |
f8f46e4d | 94 | AliTRDcheckESD(char* name); |
1ee39b3a | 95 | virtual ~AliTRDcheckESD(); |
96 | ||
f8f46e4d | 97 | void UserCreateOutputObjects(); |
e2e3cec2 | 98 | Bool_t GetRefFigure(Int_t ifig); |
36d21092 | 99 | Int_t GetNRefFigures() const { return fNRefFigures; } |
f8f46e4d | 100 | void UserExec(Option_t *); |
1ee39b3a | 101 | |
102 | Bool_t HasMC() const { return TESTBIT(fStatus, kMC);} | |
36d21092 | 103 | Bool_t IsCollision() const {return TESTBIT(fStatus, kCollision);} |
104 | void SetCollision(Bool_t set=kTRUE) {set ? SETBIT(fStatus, kCollision) : CLRBIT(fStatus, kCollision);} | |
1ee39b3a | 105 | TObjArray* Histos(); |
97d0ccba | 106 | Bool_t Load(const Char_t *fn="AnalysisResults.root", const Char_t *dir="TRD_Performance", const Char_t *name=NULL); |
1ee39b3a | 107 | void SetMC(Bool_t mc = kTRUE) { mc ? SETBIT(fStatus, kMC) : CLRBIT(fStatus, kMC);} |
108 | Bool_t PutTrendValue(const Char_t *name, Double_t val); | |
109 | void Terminate(Option_t *); | |
b795b480 | 110 | void MakeSummary(); |
1ee39b3a | 111 | |
112 | private: | |
113 | static const Float_t fgkxTPC; // end radial position of TPC | |
114 | static const Float_t fgkxTOF; // start radial position of TOF | |
629ae9b8 | 115 | static const UChar_t fgkNgraph[kNrefs]; // number of graphs/ref plot |
1ee39b3a | 116 | |
117 | AliTRDcheckESD(const AliTRDcheckESD&); | |
118 | AliTRDcheckESD& operator=(const AliTRDcheckESD&); | |
f3ef94fc | 119 | Int_t Pdg2Idx(Int_t pdg) const; |
1ee39b3a | 120 | void Process(TH1 **h, TGraphErrors *g); |
629ae9b8 | 121 | void Process2D(TH2 * const h, TGraphErrors **g); |
1ee39b3a | 122 | void PrintStatus(ULong_t s); |
bd97a050 | 123 | TH2F* Proj3D(TH3F* hist, TH2F* accMap, Int_t binLow, Int_t binHigh, Float_t &entries); |
fb65de21 | 124 | TH1F* Proj2D(TH2F* hist); |
64d57299 | 125 | TH1F* EfficiencyTRD(Short_t positives=1); |
bd97a050 | 126 | |
1ee39b3a | 127 | Int_t fStatus; // bit mask for controlling the task |
629ae9b8 | 128 | Int_t fNRefFigures; // number of current ref plots |
a96ac33a | 129 | AliESDEvent *fESD; //! ESD event |
130 | AliMCEvent *fMC; //! MC event | |
fb65de21 | 131 | AliESDpid *fESDpid; // ESD pid object |
a96ac33a | 132 | TObjArray *fHistos; //! QA histos |
1ee39b3a | 133 | TObjArray *fResults; // QA graphs |
629ae9b8 | 134 | static FILE *fgFile; //! trend file streamer |
36d21092 | 135 | // Vertex selection |
136 | static const Float_t fgkEvVertexZ;// cm | |
137 | static const Int_t fgkEvVertexN;// cm | |
138 | // Track selection | |
139 | static const Float_t fgkTrkDCAxy; // cm | |
140 | static const Float_t fgkTrkDCAz; // cm | |
141 | static const Int_t fgkNclTPC; // N clusters TPC | |
142 | static const Float_t fgkPt; // min. pt | |
143 | static const Float_t fgkEta; // eta range | |
f76b8071 | 144 | |
145 | static const Float_t fgkQs; // scale for the total charge | |
97d0ccba | 146 | |
36d21092 | 147 | ClassDef(AliTRDcheckESD, 5) // user oriented TRD analysis based on ESD-MC data |
1ee39b3a | 148 | }; |
02281b83 | 149 | #endif |