]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/EMCAL/AliAnalysisTaskEmcalDev.h
fix
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliAnalysisTaskEmcalDev.h
CommitLineData
e58333e0 1#ifndef ALIANALYSISTASKEMCALDEV_H
2#define ALIANALYSISTASKEMCALDEV_H
3
4// $Id$
5
6class TClonesArray;
7class TString;
8class TList;
9class AliEmcalParticle;
10class AliMCParticle;
11class AliVCluster;
12class AliVTrack;
13class AliVParticle;
14class AliVCaloCells;
6421eeb0 15class TH1;
16class TProfile;
e58333e0 17class AliEMCALGeometry;
18class AliParticleContainer;
19class AliClusterContainer;
6421eeb0 20class AliGenPythiaEventHeader;
21class AliVCaloTrigger;
e58333e0 22
23#include "Rtypes.h"
24
25#include "AliAnalysisTaskSE.h"
26
27class AliAnalysisTaskEmcalDev : public AliAnalysisTaskSE {
28 public:
e58333e0 29
30 enum BeamType {
31 kNA = -1,
32 kpp = 0,
33 kAA = 1,
34 kpA = 2
35 };
36
37 AliAnalysisTaskEmcalDev();
38 AliAnalysisTaskEmcalDev(const char *name, Bool_t histo=kFALSE);
39 virtual ~AliAnalysisTaskEmcalDev();
40
41 void UserExec(Option_t *option);
42 void UserCreateOutputObjects();
6421eeb0 43 Bool_t UserNotify();
e58333e0 44
e304c410 45 void SetNCentBins(Int_t n) { fNcentBins = n ; }
e58333e0 46 void SetCentRange(Double_t min, Double_t max) { fMinCent = min ; fMaxCent = max ; }
6421eeb0 47 void SetClusName(const char *n) { AddClusterContainer(n) ; }
e58333e0 48 void SetCaloCellsName(const char *n) { fCaloCellsName = n ; }
6421eeb0 49 void SetCaloTriggersName(const char *n) { fCaloTriggersName = n ; }
e58333e0 50 void SetClusPtCut(Double_t cut) { fClusPtCut = cut ; }
51 void SetClusTimeCut(Double_t min, Double_t max) { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
52 void SetHistoBins(Int_t nbins, Double_t min, Double_t max) { fNbins = nbins; fMinBinPt = min; fMaxBinPt = max ; }
53 void SetOffTrigger(UInt_t t) { fOffTrigger = t ; }
54 void SetPtCut(Double_t cut) { SetClusPtCut(cut) ; SetTrackPtCut(cut) ; }
55 void SetTrackPtCut(Double_t cut) { fTrackPtCut = cut ; }
56 void SetTrackEtaLimits(Double_t min, Double_t max) { fTrackMaxEta = max ; fTrackMinEta = min ; }
57 void SetTrackPhiLimits(Double_t min, Double_t max) { fTrackMaxPhi = max ; fTrackMinPhi = min ; }
6421eeb0 58 void SetTracksName(const char *n) { AddParticleContainer(n) ; }
e58333e0 59 void SetTrigClass(const char *n) { fTrigClass = n ; }
60 void SetVzRange(Double_t min, Double_t max) { fMinVz = min ; fMaxVz = max ; }
61 void SetForceBeamType(BeamType f) { fForceBeamType = f ; }
62 void SetMakeGeneralHistograms(Bool_t g) { fGeneralHistograms = g ; }
63 void SetMinPtTrackInEmcal(Double_t min) { fMinPtTrackInEmcal = min ; }
64 void SetEventPlaneVsEmcal(Double_t ep) { fEventPlaneVsEmcal = ep ; }
65 void SetCentralityEstimator(const char *c) { fCentEst = c ; }
66 void SetTrackBitMap(UInt_t m) { fTrackBitMap = m ; }
67 void SetClusterBitMap(UInt_t m) { fClusterBitMap = m ; }
68 void SetParticleBitMap(UInt_t m) { fClusterBitMap = m ; fTrackBitMap = m ; }
69 void SetMCTrackBitMap(UInt_t m) { fMCTrackBitMap = m ; }
70 void SetMCClusterBitMap(UInt_t m) { fMCClusterBitMap = m ; }
71 void SetMCParticleBitMap(UInt_t m) { fMCClusterBitMap = m ; fMCTrackBitMap = m ; }
72 void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
6421eeb0 73 void SetIsEmbedded(Bool_t i) { fIsEmbedded = i ; }
74 void SetIsPythia(Bool_t i) { fIsPythia = i ; }
75 void SetMCLabelShift(Int_t s) { fMCLabelShift = s ; }
e58333e0 76
6421eeb0 77 AliParticleContainer *AddParticleContainer(const char *n);
78 AliClusterContainer *AddClusterContainer(const char *n);
85d48773 79 void RemoveParticleContainer(Int_t i=0) { fParticleCollArray.RemoveAt(i);}
80 void RemoveClusterContainer(Int_t i=0) { fClusterCollArray.RemoveAt(i);}
e58333e0 81
6421eeb0 82 AliParticleContainer *GetParticleContainer(const Int_t i=0) const;
83 AliClusterContainer *GetClusterContainer(const Int_t i=0) const;
84 AliParticleContainer *GetParticleContainer(const char* name) const;
85 AliClusterContainer *GetClusterContainer(const char* name) const;
e58333e0 86
85d48773 87 TClonesArray *GetParticleArray(const Int_t i=0) const;
88 TClonesArray *GetClusterArray(const Int_t i=0) const;
e58333e0 89
85d48773 90 AliVParticle *GetAcceptParticleFromArray(Int_t p, Int_t c=0) const;
91 AliVCluster *GetAcceptClusterFromArray(Int_t cl, Int_t c=0) const;
e58333e0 92
85d48773 93 Int_t GetNParticles(Int_t i=0) const;
94 Int_t GetNClusters(Int_t i=0) const;
e58333e0 95
96 protected:
97 Bool_t AcceptCluster(AliVCluster *clus, Int_t c = 0) const;
98 Bool_t AcceptEmcalPart(AliEmcalParticle *part) const;
99 Bool_t AcceptTrack(AliVParticle *track, Int_t c = 0) const;
100 virtual void ExecOnce();
101 virtual Bool_t FillGeneralHistograms();
102 virtual Bool_t FillHistograms() { return kTRUE ; }
103 BeamType GetBeamType();
104 TClonesArray *GetArrayFromEvent(const char *name, const char *clname=0);
105 virtual Bool_t IsEventSelected();
106 virtual Bool_t RetrieveEventObjects();
107 virtual Bool_t Run() { return kTRUE ; }
6421eeb0 108 Bool_t PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard);
e58333e0 109
e58333e0 110 BeamType fForceBeamType; // forced beam type
111 Bool_t fGeneralHistograms; // whether or not it should fill some general histograms
112 Bool_t fInitialized; // whether or not the task has been already initialized
113 Bool_t fCreateHisto; // whether or not create histograms
e58333e0 114 TString fCaloCellsName; // name of calo cell collection
6421eeb0 115 TString fCaloTriggersName; // name of calo triggers collection
e58333e0 116 Double_t fMinCent; // min centrality for event selection
117 Double_t fMaxCent; // max centrality for event selection
118 Double_t fMinVz; // min vertex for event selection
119 Double_t fMaxVz; // max vertex for event selection
120 UInt_t fOffTrigger; // offline trigger for event selection
121 TString fTrigClass; // trigger class name for event selection
122 Int_t fNbins; // no. of pt bins
123 Double_t fMinBinPt; // min pt in histograms
124 Double_t fMaxBinPt; // max pt in histograms
125 Double_t fClusPtCut; // cut on cluster pt
126 Double_t fTrackPtCut; // cut on track pt
127 Double_t fTrackMinEta; // cut on track eta
128 Double_t fTrackMaxEta; // cut on track eta
129 Double_t fTrackMinPhi; // cut on track phi
130 Double_t fTrackMaxPhi; // cut on track phi
131 Double_t fClusTimeCutLow; // low time cut for clusters
132 Double_t fClusTimeCutUp; // up time cut for clusters
133 Double_t fMinPtTrackInEmcal; // min pt track in emcal
134 Double_t fEventPlaneVsEmcal; // select events which have a certain event plane wrt the emcal
135 Double_t fMinEventPlane; // minimum event plane value
136 Double_t fMaxEventPlane; // maximum event plane value
137 TString fCentEst; // name of V0 centrality estimator
138 UInt_t fTrackBitMap; // bit map of accepted tracks (non MC)
139 UInt_t fClusterBitMap; // bit map of accepted clusters (non MC)
140 UInt_t fMCTrackBitMap; // bit map of accepted MC tracks
141 UInt_t fMCClusterBitMap; // bit map of accepted MC clusters
6421eeb0 142 Bool_t fIsEmbedded; // trigger, embedded signal
143 Bool_t fIsPythia; // trigger, if it is a PYTHIA production
144 Int_t fSelectPtHardBin; // select one pt hard bin for analysis
e58333e0 145 Int_t fMinMCLabel; // minimum MC label value for the tracks/clusters being considered MC particles
6421eeb0 146 Int_t fMCLabelShift; // if MC label > fMCLabelShift, MC label -= fMCLabelShift
e58333e0 147 Int_t fNcentBins; //!how many centrality bins
148 AliEMCALGeometry *fGeom; //!emcal geometry
149 TClonesArray *fTracks; //!tracks
150 TClonesArray *fCaloClusters; //!clusters
151 AliVCaloCells *fCaloCells; //!cells
6421eeb0 152 AliVCaloTrigger *fCaloTriggers; //!calo triggers
e58333e0 153 Double_t fCent; //!event centrality
154 Int_t fCentBin; //!event centrality bin
155 Double_t fEPV0; //!event plane V0
156 Double_t fEPV0A; //!event plane V0A
157 Double_t fEPV0C; //!event plane V0C
158 Double_t fVertex[3]; //!event vertex
159 Int_t fNVertCont; //!event vertex number of contributors
160 BeamType fBeamType; //!event beam type
161
6421eeb0 162 // PYTHIA
163 AliGenPythiaEventHeader *fPythiaHeader; //!event Pythia header
164 Double_t fPtHard; //!event pt hard
165 Int_t fPtHardBin; //!event pt hard bin
166 Int_t fNTrials; //!event trials
167
e58333e0 168 TObjArray fParticleCollArray; // particle/track collection array
169 TObjArray fClusterCollArray; // cluster collection array
170
6421eeb0 171 // Histograms
e58333e0 172 TList *fOutput; //!output list
173
6421eeb0 174 // PYTHIA
175 TH1 *fHistTrialsAfterSel; //!total number of trials per pt hard bin after selection
176 TH1 *fHistEventsAfterSel; //!total number of events per pt hard bin after selection
177 TH1 *fHistTrials; //!trials from pyxsec.root
178 TProfile *fHistXsection; //!x section from pyxsec.root
179 TH1 *fHistEvents; //!total number of events per pt hard bin
180 TH1 *fHistPtHard; //!pt hard distribution
181
182 // General histograms
183 TH1 *fHistCentrality; //!Event centrality distribution
184 TH1 *fHistZVertex; //!Z vertex position
185 TH1 *fHistEventPlane; //!Event plane distribution
e58333e0 186
187 private:
188 AliAnalysisTaskEmcalDev(const AliAnalysisTaskEmcalDev&); // not implemented
189 AliAnalysisTaskEmcalDev &operator=(const AliAnalysisTaskEmcalDev&); // not implemented
190
6421eeb0 191 ClassDef(AliAnalysisTaskEmcalDev, 2) // EMCAL base analysis task
e58333e0 192};
193#endif