1 #ifndef ALIANALYSISTASKEMCAL_H
2 #define ALIANALYSISTASKEMCAL_H
4 // $Id: AliAnalysisTaskEmcal.h 56756 2012-05-30 05:03:02Z loizides $
9 class AliEmcalParticle;
17 class AliEMCALGeometry;
18 class AliGenPythiaEventHeader;
19 class AliVCaloTrigger;
21 #include "AliAnalysisTaskSE.h"
23 class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
27 kTPC = 0, // TPC acceptance
28 kEMCAL = 1, // EMCal acceptance
29 kUser = 2, // User defined acceptance
39 AliAnalysisTaskEmcal();
40 AliAnalysisTaskEmcal(const char *name, Bool_t histo=kFALSE);
41 virtual ~AliAnalysisTaskEmcal();
43 void UserExec(Option_t *option);
44 void UserCreateOutputObjects();
47 void SetAnaType(EmcalAnaType type) { fAnaType = type ; }
48 void SetNCentBins(Int_t n) { fNcentBins = n ; }
49 void SetCentRange(Double_t min, Double_t max) { fMinCent = min ; fMaxCent = max ; }
50 void SetClusName(const char *n) { fCaloName = n ; }
51 void SetCaloCellsName(const char *n) { fCaloCellsName = n ; }
52 void SetCaloTriggersName(const char *n) { fCaloTriggersName = n ; }
53 void SetClusPtCut(Double_t cut) { fClusPtCut = cut ; }
54 void SetClusTimeCut(Double_t min, Double_t max) { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
55 void SetHistoBins(Int_t nbins, Double_t min, Double_t max) { fNbins = nbins; fMinBinPt = min; fMaxBinPt = max ; }
56 void SetOffTrigger(UInt_t t) { fOffTrigger = t ; }
57 void SetPtCut(Double_t cut) { SetClusPtCut(cut) ; SetTrackPtCut(cut) ; }
58 void SetTrackPtCut(Double_t cut) { fTrackPtCut = cut ; }
59 void SetTrackEtaLimits(Double_t min, Double_t max) { fTrackMaxEta = max ; fTrackMinEta = min ; }
60 void SetTrackPhiLimits(Double_t min, Double_t max) { fTrackMaxPhi = max ; fTrackMinPhi = min ; }
61 void SetTracksName(const char *n) { fTracksName = n ; }
62 void SetTrigClass(const char *n) { fTrigClass = n ; }
63 void SetVzRange(Double_t min, Double_t max) { fMinVz = min ; fMaxVz = max ; }
64 void SetForceBeamType(BeamType f) { fForceBeamType = f ; }
65 void SetMakeGeneralHistograms(Bool_t g) { fGeneralHistograms = g ; }
66 void SetMinPtTrackInEmcal(Double_t min) { fMinPtTrackInEmcal = min ; }
67 void SetEventPlaneVsEmcal(Double_t ep) { fEventPlaneVsEmcal = ep ; }
68 void SetCentralityEstimator(const char *c) { fCentEst = c ; }
69 void SetTrackBitMap(UInt_t m) { fTrackBitMap = m ; }
70 void SetClusterBitMap(UInt_t m) { fClusterBitMap = m ; }
71 void SetParticleBitMap(UInt_t m) { fClusterBitMap = m ; fTrackBitMap = m ; }
72 void SetMCTrackBitMap(UInt_t m) { fMCTrackBitMap = m ; }
73 void SetMCClusterBitMap(UInt_t m) { fMCClusterBitMap = m ; }
74 void SetMCParticleBitMap(UInt_t m) { fMCClusterBitMap = m ; fMCTrackBitMap = m ; }
75 void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
76 void SetIsEmbedded(Bool_t i) { fIsEmbedded = i ; }
77 void SetIsPythia(Bool_t i) { fIsPythia = i ; }
78 void SetMCLabelShift(Int_t s) { fMCLabelShift = s ; }
81 Bool_t AcceptCluster(AliVCluster *clus) const;
82 Bool_t AcceptEmcalPart(AliEmcalParticle *part) const;
83 Bool_t AcceptTrack(AliVParticle *track) const;
84 virtual void ExecOnce();
85 virtual Bool_t FillGeneralHistograms();
86 virtual Bool_t FillHistograms() { return kTRUE ; }
87 BeamType GetBeamType();
88 TClonesArray *GetArrayFromEvent(const char *name, const char *clname=0);
89 virtual Bool_t IsEventSelected();
90 virtual Bool_t RetrieveEventObjects();
91 virtual Bool_t Run() { return kTRUE ; }
92 Bool_t PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard);
94 EmcalAnaType fAnaType; // analysis type
95 BeamType fForceBeamType; // forced beam type
96 Bool_t fGeneralHistograms; // whether or not it should fill some general histograms
97 Bool_t fInitialized; // whether or not the task has been already initialized
98 Bool_t fCreateHisto; // whether or not create histograms
99 TString fTracksName; // name of track collection
100 TString fCaloName; // name of calo cluster collection
101 TString fCaloCellsName; // name of calo cell collection
102 TString fCaloTriggersName; // name of calo triggers collection
103 Double_t fMinCent; // min centrality for event selection
104 Double_t fMaxCent; // max centrality for event selection
105 Double_t fMinVz; // min vertex for event selection
106 Double_t fMaxVz; // max vertex for event selection
107 UInt_t fOffTrigger; // offline trigger for event selection
108 TString fTrigClass; // trigger class name for event selection
109 Int_t fNbins; // no. of pt bins
110 Double_t fMinBinPt; // min pt in histograms
111 Double_t fMaxBinPt; // max pt in histograms
112 Double_t fClusPtCut; // cut on cluster pt
113 Double_t fTrackPtCut; // cut on track pt
114 Double_t fTrackMinEta; // cut on track eta
115 Double_t fTrackMaxEta; // cut on track eta
116 Double_t fTrackMinPhi; // cut on track phi
117 Double_t fTrackMaxPhi; // cut on track phi
118 Double_t fClusTimeCutLow; // low time cut for clusters
119 Double_t fClusTimeCutUp; // up time cut for clusters
120 Double_t fMinPtTrackInEmcal; // min pt track in emcal
121 Double_t fEventPlaneVsEmcal; // select events which have a certain event plane wrt the emcal
122 Double_t fMinEventPlane; // minimum event plane value
123 Double_t fMaxEventPlane; // maximum event plane value
124 TString fCentEst; // name of V0 centrality estimator
125 UInt_t fTrackBitMap; // bit map of accepted tracks (non MC)
126 UInt_t fClusterBitMap; // bit map of accepted clusters (non MC)
127 UInt_t fMCTrackBitMap; // bit map of accepted MC tracks
128 UInt_t fMCClusterBitMap; // bit map of accepted MC clusters
129 Bool_t fIsEmbedded; // trigger, embedded signal
130 Bool_t fIsPythia; // trigger, if it is a PYTHIA production
131 Int_t fSelectPtHardBin; // select one pt hard bin for analysis
132 Int_t fMinMCLabel; // minimum MC label value for the tracks/clusters being considered MC particles
133 Int_t fMCLabelShift; // if MC label > fMCLabelShift, MC label -= fMCLabelShift
134 Int_t fNcentBins; // how many centrality bins
135 AliEMCALGeometry *fGeom; //!emcal geometry
136 TClonesArray *fTracks; //!tracks
137 TClonesArray *fCaloClusters; //!clusters
138 AliVCaloCells *fCaloCells; //!cells
139 AliVCaloTrigger *fCaloTriggers; //!calo triggers
140 Double_t fCent; //!event centrality
141 Int_t fCentBin; //!event centrality bin
142 Double_t fEPV0; //!event plane V0
143 Double_t fEPV0A; //!event plane V0A
144 Double_t fEPV0C; //!event plane V0C
145 Double_t fVertex[3]; //!event vertex
146 Int_t fNVertCont; //!event vertex number of contributors
147 BeamType fBeamType; //!event beam type
150 AliGenPythiaEventHeader *fPythiaHeader; //!event Pythia header
151 Double_t fPtHard; //!event pt hard
152 Int_t fPtHardBin; //!event pt hard bin
153 Int_t fNTrials; //!event trials
156 TList *fOutput; //!output list
159 TH1 *fHistTrialsAfterSel; //!total number of trials per pt hard bin after selection
160 TH1 *fHistEventsAfterSel; //!total number of events per pt hard bin after selection
161 TH1 *fHistTrials; //!trials from pyxsec.root
162 TProfile *fHistXsection; //!x section from pyxsec.root
163 TH1 *fHistEvents; //!total number of events per pt hard bin
164 TH1 *fHistPtHard; //!pt hard distribution
166 // General histograms
167 TH1 *fHistCentrality; //!Event centrality distribution
168 TH1 *fHistZVertex; //!Z vertex position
169 TH1 *fHistEventPlane; //!Event plane distribution
172 AliAnalysisTaskEmcal(const AliAnalysisTaskEmcal&); // not implemented
173 AliAnalysisTaskEmcal &operator=(const AliAnalysisTaskEmcal&); // not implemented
175 ClassDef(AliAnalysisTaskEmcal, 17) // EMCAL base analysis task