1 #ifndef ALIPERFITSUTASK_H
2 #define ALIPERFITSUTASK_H
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 ///////////////////////////////////////////////////////////////////////////
22 class AliITSMultRecBg;
23 class AliESDTrackCuts;
24 class AliITSUGeomTGeo;
27 #include "AliAnalysisTaskSE.h"
28 #include "AliTriggerAnalysis.h"
31 class AliTaskITSUPerf : public AliAnalysisTaskSE {
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
38 enum {kITS1TPC1,kITS1TPC0,kITS0TPC1,kITS0TPC0,kITSTPCMismatch,kITSTPCNoMatch,kNLabelTypes};
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
48 enum { // histos defined for each centrality bin (regardless MClabels combination)
50 ,kHMatchStatusNRcblPrim
51 ,kHMatchStatusNRcblSec
58 AliTaskITSUPerf(const char *name = "AliTaskITSUPerf");
59 virtual ~AliTaskITSUPerf();
61 virtual void UserCreateOutputObjects();
62 virtual void UserExec(Option_t *option);
63 virtual void Terminate(Option_t *);
65 Bool_t GetUseSpecialOutput() const {return fUseSpecialOutput;}
66 void SetUseSpecialOutput(Bool_t v=kTRUE) {fUseSpecialOutput=v;}
70 Int_t GetMCLabType(Int_t labMCTPC,Int_t labMCITS, Int_t nClTPC, Int_t nClITS);
71 void SetTrackingConditions(const TObjArray* arr) {fTrackingCond = arr;}
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));}
82 Int_t GetCentralityBin() const;
84 void SetMinTPCClusters(Int_t ncl=70) {fMinTPCclusters = ncl;}
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;}
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
112 //---------------------------------------------------
114 AliITSUGeomTGeo* fGeom; //! general interface to ITS geometry
115 AliITSURecoDet* fITS; //! interface to ITS reco time (for access to clusters, geometry)
118 Int_t fNSelTracksMC; //! number of selected MC tracks
119 TArrayI fMCStatus; //! mc info about every MC particle
121 TObjArray fClLists; //! list of MC clusters for each track
124 Int_t fNPtBins; //! N pt bins for histos
125 Int_t fNResBins; //! N bins for resolution histos
127 Int_t fMinTPCclusters; //! min N tpc clusters to accept
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
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
140 AliESDtrackCuts* fTPCCut; // cut on reference TPC tracks
142 TTree* fTree; // optional tree
144 static const char* fgkLabelTypes[kNLabelTypes]; // label truthness names
146 AliTaskITSUPerf(const AliTaskITSUPerf&); // not implemented
147 AliTaskITSUPerf& operator=(const AliTaskITSUPerf&); // not implemented
149 ClassDef(AliTaskITSUPerf, 1);