]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/EMCAL/AliAnalysisTaskEmcalDev.h
Transition to new base class (Salvatore/Marta).
[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 ; }
e58333e0 47 void SetHistoBins(Int_t nbins, Double_t min, Double_t max) { fNbins = nbins; fMinBinPt = min; fMaxBinPt = max ; }
48 void SetOffTrigger(UInt_t t) { fOffTrigger = t ; }
e58333e0 49 void SetTrigClass(const char *n) { fTrigClass = n ; }
50 void SetVzRange(Double_t min, Double_t max) { fMinVz = min ; fMaxVz = max ; }
51 void SetForceBeamType(BeamType f) { fForceBeamType = f ; }
52 void SetMakeGeneralHistograms(Bool_t g) { fGeneralHistograms = g ; }
53 void SetMinPtTrackInEmcal(Double_t min) { fMinPtTrackInEmcal = min ; }
54 void SetEventPlaneVsEmcal(Double_t ep) { fEventPlaneVsEmcal = ep ; }
55 void SetCentralityEstimator(const char *c) { fCentEst = c ; }
e58333e0 56 void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
6421eeb0 57 void SetIsEmbedded(Bool_t i) { fIsEmbedded = i ; }
58 void SetIsPythia(Bool_t i) { fIsPythia = i ; }
59 void SetMCLabelShift(Int_t s) { fMCLabelShift = s ; }
e58333e0 60
ef46ebe5 61 void SetCaloCellsName(const char *n) { fCaloCellsName = n ; }
62 void SetCaloTriggersName(const char *n) { fCaloTriggersName = n ; }
63
64 void SetTracksName(const char *n) { AddParticleContainer(n) ; }
65 void SetClusName(const char *n) { AddClusterContainer(n) ; }
66
67 void SetClusPtCut(Double_t cut, Int_t c=0);
68 void SetClusTimeCut(Double_t min, Double_t max, Int_t c=0);
69 void SetTrackPtCut(Double_t cut, Int_t c=0);
70 void SetTrackEtaLimits(Double_t min, Double_t max, Int_t c=0);
71 void SetTrackPhiLimits(Double_t min, Double_t max, Int_t c=0);
72
6421eeb0 73 AliParticleContainer *AddParticleContainer(const char *n);
74 AliClusterContainer *AddClusterContainer(const char *n);
85d48773 75 void RemoveParticleContainer(Int_t i=0) { fParticleCollArray.RemoveAt(i);}
76 void RemoveClusterContainer(Int_t i=0) { fClusterCollArray.RemoveAt(i);}
e58333e0 77
6421eeb0 78 AliParticleContainer *GetParticleContainer(const Int_t i=0) const;
79 AliClusterContainer *GetClusterContainer(const Int_t i=0) const;
80 AliParticleContainer *GetParticleContainer(const char* name) const;
81 AliClusterContainer *GetClusterContainer(const char* name) const;
e58333e0 82
ef46ebe5 83 protected:
84 BeamType GetBeamType();
85 TClonesArray *GetArrayFromEvent(const char *name, const char *clname=0);
86 Bool_t PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard);
87
88 TClonesArray *GetParticleArray(const Int_t i=0) const;
89 TClonesArray *GetClusterArray(const Int_t i=0) const;
e58333e0 90
ef46ebe5 91 AliVParticle *GetAcceptParticleFromArray(Int_t p, Int_t c=0) const;
92 AliVCluster *GetAcceptClusterFromArray(Int_t cl, Int_t c=0) const;
e58333e0 93
ef46ebe5 94 Int_t GetNParticles(Int_t i=0) const;
95 Int_t GetNClusters(Int_t i=0) const;
e58333e0 96
ef46ebe5 97 Bool_t AcceptCluster(AliVCluster *clus, Int_t c = 0) const;
98 Bool_t AcceptTrack(AliVParticle *track, Int_t c = 0) const;
99
100 // Virtual functions, to be overloaded in derived classes
e58333e0 101 virtual void ExecOnce();
102 virtual Bool_t FillGeneralHistograms();
e58333e0 103 virtual Bool_t IsEventSelected();
104 virtual Bool_t RetrieveEventObjects();
ef46ebe5 105 virtual Bool_t FillHistograms() { return kTRUE ; }
e58333e0 106 virtual Bool_t Run() { return kTRUE ; }
ef46ebe5 107
e58333e0 108
e58333e0 109 BeamType fForceBeamType; // forced beam type
110 Bool_t fGeneralHistograms; // whether or not it should fill some general histograms
111 Bool_t fInitialized; // whether or not the task has been already initialized
112 Bool_t fCreateHisto; // whether or not create histograms
e58333e0 113 TString fCaloCellsName; // name of calo cell collection
6421eeb0 114 TString fCaloTriggersName; // name of calo triggers collection
e58333e0 115 Double_t fMinCent; // min centrality for event selection
116 Double_t fMaxCent; // max centrality for event selection
117 Double_t fMinVz; // min vertex for event selection
118 Double_t fMaxVz; // max vertex for event selection
119 UInt_t fOffTrigger; // offline trigger for event selection
120 TString fTrigClass; // trigger class name for event selection
121 Int_t fNbins; // no. of pt bins
122 Double_t fMinBinPt; // min pt in histograms
123 Double_t fMaxBinPt; // max pt in histograms
e58333e0 124 Double_t fMinPtTrackInEmcal; // min pt track in emcal
125 Double_t fEventPlaneVsEmcal; // select events which have a certain event plane wrt the emcal
126 Double_t fMinEventPlane; // minimum event plane value
127 Double_t fMaxEventPlane; // maximum event plane value
128 TString fCentEst; // name of V0 centrality estimator
6421eeb0 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
e58333e0 132 Int_t fMinMCLabel; // minimum MC label value for the tracks/clusters being considered MC particles
6421eeb0 133 Int_t fMCLabelShift; // if MC label > fMCLabelShift, MC label -= fMCLabelShift
9fcbc218 134 Int_t fNcentBins; // how many centrality bins
e58333e0 135 AliEMCALGeometry *fGeom; //!emcal geometry
136 TClonesArray *fTracks; //!tracks
137 TClonesArray *fCaloClusters; //!clusters
138 AliVCaloCells *fCaloCells; //!cells
6421eeb0 139 AliVCaloTrigger *fCaloTriggers; //!calo triggers
e58333e0 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
148
6421eeb0 149 // PYTHIA
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
154
e58333e0 155 TObjArray fParticleCollArray; // particle/track collection array
156 TObjArray fClusterCollArray; // cluster collection array
157
6421eeb0 158 // Histograms
e58333e0 159 TList *fOutput; //!output list
160
6421eeb0 161 // PYTHIA
162 TH1 *fHistTrialsAfterSel; //!total number of trials per pt hard bin after selection
163 TH1 *fHistEventsAfterSel; //!total number of events per pt hard bin after selection
164 TH1 *fHistTrials; //!trials from pyxsec.root
165 TProfile *fHistXsection; //!x section from pyxsec.root
166 TH1 *fHistEvents; //!total number of events per pt hard bin
167 TH1 *fHistPtHard; //!pt hard distribution
168
169 // General histograms
9fcbc218 170 TH1 *fHistCentrality; //!event centrality distribution
171 TH1 *fHistZVertex; //!z vertex position
172 TH1 *fHistEventPlane; //!event plane distribution
e58333e0 173
174 private:
175 AliAnalysisTaskEmcalDev(const AliAnalysisTaskEmcalDev&); // not implemented
176 AliAnalysisTaskEmcalDev &operator=(const AliAnalysisTaskEmcalDev&); // not implemented
177
ef46ebe5 178 ClassDef(AliAnalysisTaskEmcalDev, 4) // EMCAL base analysis task
e58333e0 179};
180#endif