]>
Commit | Line | Data |
---|---|---|
fa10255f | 1 | #ifndef ALIPERFITSUTASK_H |
2 | #define ALIPERFITSUTASK_H | |
3 | ||
4 | /////////////////////////////////////////////////////////////////////////// | |
5 | // Class AliTaskITSUPerf // | |
6 | // Analysis task to produce data and MC histos needed for tracklets // | |
7 | // dNdEta extraction in multiple bins in one go // | |
8 | // Author: ruben.shahoyan@cern.ch // | |
9 | /////////////////////////////////////////////////////////////////////////// | |
10 | ||
097e4cdf | 11 | //#define _CLUS_LIST_ |
12 | ||
fa10255f | 13 | class TH1F; |
14 | class TH2F; | |
15 | class TH3F; | |
16 | class AliESDEvent; | |
17 | class TList; | |
18 | class TNtuple; | |
7bc38dea | 19 | class TTree; |
fa10255f | 20 | |
21 | class AliMCParticle; | |
22 | class AliITSMultRecBg; | |
23 | class AliESDTrackCuts; | |
24 | class AliITSUGeomTGeo; | |
25 | class AliITSURecoDet; | |
26 | ||
27 | #include "AliAnalysisTaskSE.h" | |
28 | #include "AliTriggerAnalysis.h" | |
29 | #include <TMath.h> | |
30 | ||
31 | class AliTaskITSUPerf : public AliAnalysisTaskSE { | |
32 | public: | |
33 | enum {kMCPrimBit=31 // flag for primaries | |
34 | ,kTrCondFail=30 // does not correspond to any tracking condition | |
35 | ,kITSHitBits=0 // ITS hits pattern stored starting from this bit | |
36 | }; | |
37 | // | |
38 | enum {kITS1TPC1,kITS1TPC0,kITS0TPC1,kITS0TPC0,kITSTPCMismatch,kITSTPCNoMatch,kNLabelTypes}; | |
39 | // | |
40 | enum { // standard histo ID's defined for each centrality and MClabels combination bin | |
41 | kHResPTvsPTMC // pt resolution | |
42 | ,kHResDCARvsPTMC // DCA R resolution | |
43 | ,kHResDCAZvsPTMC // DCA Z resolution | |
44 | ,kHNStdHistosCentMC | |
45 | // | |
46 | }; | |
47 | // | |
48 | enum { // histos defined for each centrality bin (regardless MClabels combination) | |
097e4cdf | 49 | kHMatchStatusRcbl |
50 | ,kHMatchStatusNRcblPrim | |
51 | ,kHMatchStatusNRcblSec | |
7bc38dea | 52 | ,kHMCLrPresPrim |
53 | ,kHMCLrPresSec | |
fa10255f | 54 | ,kHNStdHistosCent |
55 | }; | |
56 | ||
57 | // | |
58 | AliTaskITSUPerf(const char *name = "AliTaskITSUPerf"); | |
59 | virtual ~AliTaskITSUPerf(); | |
60 | ||
61 | virtual void UserCreateOutputObjects(); | |
62 | virtual void UserExec(Option_t *option); | |
63 | virtual void Terminate(Option_t *); | |
64 | // | |
65 | Bool_t GetUseSpecialOutput() const {return fUseSpecialOutput;} | |
66 | void SetUseSpecialOutput(Bool_t v=kTRUE) {fUseSpecialOutput=v;} | |
67 | // | |
68 | void CheckTracks(); | |
69 | void BuildMCInfo(); | |
70 | Int_t GetMCLabType(Int_t labMCTPC,Int_t labMCITS, Int_t nClTPC, Int_t nClITS); | |
71 | void SetTrackingConditions(const TObjArray* arr) {fTrackingCond = arr;} | |
72 | // | |
73 | //------------------------------------------------------------- | |
74 | void SetUseMC(Bool_t mc = kFALSE) {fUseMC = mc;} | |
75 | void BookHistos(Int_t bin); | |
76 | void AddHisto(TObjArray* array, TObject* h, Int_t at=-1); | |
77 | void BookStandardHistosCentMCLb(Int_t bin, Int_t mcLb); | |
78 | void BookStandardHistosCent(Int_t bin); | |
79 | Int_t GetHistoID(Int_t htype, Int_t mcStat=-1, Int_t centBin=0) const; | |
80 | TH1* GetHisto(const TObjArray* array, Int_t htype, Int_t mcStat=-1, Int_t centBin=0) const {return (TH1*)array->At(GetHistoID(htype,mcStat,centBin));} | |
81 | // | |
82 | Int_t GetCentralityBin() const; | |
83 | // | |
60b14b59 | 84 | void SetMinTPCClusters(Int_t ncl=70) {fMinTPCclusters = ncl;} |
fa10255f | 85 | void SetEtaCut(Float_t etaCut) {fEtaMax = TMath::Abs(etaCut); fEtaMin= -fEtaMax;} |
86 | void SetEtaMin(Float_t etaMin) {fEtaMin = etaMin;} | |
87 | void SetEtaMax(Float_t etaMax) {fEtaMax = etaMax;} | |
88 | void SetPtMin(Float_t ptMin) {fPtMin = ptMin;} | |
89 | void SetPtMax(Float_t ptMax) {fPtMax = ptMax;} | |
90 | void SetNPtBins(Int_t n=20) {fNPtBins = n;} | |
91 | void SetZVertexMin(Float_t z) {fZVertexMin = z;} | |
92 | void SetZVertexMax(Float_t z) {fZVertexMax = z;} | |
93 | void SetNResBins(Int_t n=100) {fNResBins = n;} | |
94 | // | |
95 | protected: | |
96 | // | |
97 | protected: | |
98 | TList* fOutput; // output list send on output slot 1 | |
99 | TObjArray fHistosCentMCLb; //! local array for histos management, centrality&MClabel selective | |
100 | TObjArray fHistosCent; //! local array for histos management, centrality selective | |
101 | TTree* fRPTree; //! tree of recpoints | |
102 | AliStack* fStack; //! MC stack | |
103 | AliMCEvent* fMCEvent; //! MC Event | |
104 | Float_t fVtxMC[3]; //! MC gen vertex | |
105 | const AliESDVertex* fVtxSPD; //! SPD vertex | |
106 | const AliESDVertex* fVtxTrc; //! Tracks vertex | |
107 | AliESDEvent* fESDEvent; //! ESDEvent | |
108 | Bool_t fUseSpecialOutput; // flag to open special output | |
109 | Bool_t fUseMC; // do we use MC info? | |
110 | const TObjArray* fTrackingCond; //! tracking conditions used | |
111 | // | |
112 | //--------------------------------------------------- | |
113 | // | |
114 | AliITSUGeomTGeo* fGeom; //! general interface to ITS geometry | |
115 | AliITSURecoDet* fITS; //! interface to ITS reco time (for access to clusters, geometry) | |
116 | // | |
117 | // MC info | |
118 | Int_t fNSelTracksMC; //! number of selected MC tracks | |
119 | TArrayI fMCStatus; //! mc info about every MC particle | |
097e4cdf | 120 | #ifdef _CLUS_LIST_ |
121 | TObjArray fClLists; //! list of MC clusters for each track | |
122 | #endif | |
fa10255f | 123 | // |
124 | Int_t fNPtBins; //! N pt bins for histos | |
125 | Int_t fNResBins; //! N bins for resolution histos | |
126 | // | |
60b14b59 | 127 | Int_t fMinTPCclusters; //! min N tpc clusters to accept |
128 | // | |
fa10255f | 129 | Double_t fPtMin; //! min pt for histos |
130 | Double_t fPtMax; //! max pt for histos | |
131 | Double_t fEtaMin; //! min eta range | |
132 | Double_t fEtaMax; //! max eta range | |
133 | Double_t fZVertexMin; //! min Z vtx to process | |
134 | Double_t fZVertexMax; //! max Z vtx to process | |
135 | // | |
136 | Int_t fCurrCentBin; // current centrality bin | |
137 | Int_t fNCentBins; // N of mult bins | |
138 | Int_t fUseCentralityVar; // what is used to determine the centrality | |
139 | // | |
60b14b59 | 140 | AliESDtrackCuts* fTPCCut; // cut on reference TPC tracks |
141 | // | |
7bc38dea | 142 | TTree* fTree; // optional tree |
143 | // | |
fa10255f | 144 | static const char* fgkLabelTypes[kNLabelTypes]; // label truthness names |
145 | private: | |
146 | AliTaskITSUPerf(const AliTaskITSUPerf&); // not implemented | |
147 | AliTaskITSUPerf& operator=(const AliTaskITSUPerf&); // not implemented | |
148 | // | |
149 | ClassDef(AliTaskITSUPerf, 1); | |
150 | }; | |
151 | ||
152 | ||
153 | #endif | |
154 |