]>
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; | |
23 | class TH1; | |
f2e89a4c | 24 | class TH2; |
1ee39b3a | 25 | class TObjArray; |
26 | class TGraph; | |
27 | class TGraphErrors; | |
f8f46e4d | 28 | class AliTRDcheckESD : public AliAnalysisTaskSE { |
1ee39b3a | 29 | public: |
30 | enum ETRDcheckESDstatus { | |
36d21092 | 31 | kMC = BIT(0) // use MC info |
32 | ,kLoad = BIT(1) // container from file | |
33 | ,kCollision = BIT(2) // | |
1ee39b3a | 34 | }; |
35 | enum ETRDcheckESDhistos { | |
36 | kNCl = 0 // number of clusters per track | |
37 | ,kTRDstat // TRD tracks status | |
38 | ,kTRDmom // TRD track momentum | |
fb09668f | 39 | ,kPtRes // Pt resolution @ vertex for TRD |
40 | ,kNhistos = 4 // number of histograms | |
629ae9b8 | 41 | ,kNrefs = 4 // number of reference plots |
1ee39b3a | 42 | }; |
43 | enum ETRDcheckESDbits { | |
44 | kTPCout = 1 // track left TPC | |
45 | ,kTRDin // track reach TRD fiducial volume | |
46 | ,kTRDout // track reconstructed in TRD | |
47 | ,kTRDpid // PID calculated in TRD | |
48 | ,kTRDref // track refitted in TRD | |
1ee39b3a | 49 | }; |
50 | AliTRDcheckESD(); | |
f8f46e4d | 51 | AliTRDcheckESD(char* name); |
1ee39b3a | 52 | virtual ~AliTRDcheckESD(); |
53 | ||
f8f46e4d | 54 | void UserCreateOutputObjects(); |
e2e3cec2 | 55 | Bool_t GetRefFigure(Int_t ifig); |
36d21092 | 56 | Int_t GetNRefFigures() const { return fNRefFigures; } |
f8f46e4d | 57 | void UserExec(Option_t *); |
1ee39b3a | 58 | |
59 | Bool_t HasMC() const { return TESTBIT(fStatus, kMC);} | |
36d21092 | 60 | Bool_t IsCollision() const {return TESTBIT(fStatus, kCollision);} |
61 | void SetCollision(Bool_t set=kTRUE) {set ? SETBIT(fStatus, kCollision) : CLRBIT(fStatus, kCollision);} | |
a96ac33a | 62 | Bool_t IsLoad() const { return TESTBIT(fStatus, kLoad);} |
1ee39b3a | 63 | TObjArray* Histos(); |
629ae9b8 | 64 | Bool_t Load(const Char_t *fn="TRD.Performance.root", const Char_t *name=NULL); |
1ee39b3a | 65 | void SetMC(Bool_t mc = kTRUE) { mc ? SETBIT(fStatus, kMC) : CLRBIT(fStatus, kMC);} |
66 | Bool_t PutTrendValue(const Char_t *name, Double_t val); | |
67 | void Terminate(Option_t *); | |
68 | ||
69 | private: | |
70 | static const Float_t fgkxTPC; // end radial position of TPC | |
71 | static const Float_t fgkxTOF; // start radial position of TOF | |
629ae9b8 | 72 | static const UChar_t fgkNgraph[kNrefs]; // number of graphs/ref plot |
1ee39b3a | 73 | |
74 | AliTRDcheckESD(const AliTRDcheckESD&); | |
75 | AliTRDcheckESD& operator=(const AliTRDcheckESD&); | |
fb09668f | 76 | Int_t Pdg2Idx(Int_t pdg); |
1ee39b3a | 77 | void Process(TH1 **h, TGraphErrors *g); |
629ae9b8 | 78 | void Process2D(TH2 * const h, TGraphErrors **g); |
1ee39b3a | 79 | void PrintStatus(ULong_t s); |
80 | ||
81 | Int_t fStatus; // bit mask for controlling the task | |
629ae9b8 | 82 | Int_t fNRefFigures; // number of current ref plots |
a96ac33a | 83 | AliESDEvent *fESD; //! ESD event |
84 | AliMCEvent *fMC; //! MC event | |
85 | TObjArray *fHistos; //! QA histos | |
1ee39b3a | 86 | TObjArray *fResults; // QA graphs |
629ae9b8 | 87 | static FILE *fgFile; //! trend file streamer |
36d21092 | 88 | // Vertex selection |
89 | static const Float_t fgkEvVertexZ;// cm | |
90 | static const Int_t fgkEvVertexN;// cm | |
91 | // Track selection | |
92 | static const Float_t fgkTrkDCAxy; // cm | |
93 | static const Float_t fgkTrkDCAz; // cm | |
94 | static const Int_t fgkNclTPC; // N clusters TPC | |
95 | static const Float_t fgkPt; // min. pt | |
96 | static const Float_t fgkEta; // eta range | |
97 | ClassDef(AliTRDcheckESD, 5) // user oriented TRD analysis based on ESD-MC data | |
1ee39b3a | 98 | }; |
99 | #endif |