- Reduce number of bins in order to decrease memory consumption
[u/mrichter/AliRoot.git] / PWGJE / AliAnalysisTaskJetServices.h
CommitLineData
bf7b8731 1#ifndef ALIANALYSISTASKJETSERVICES_H
2#define ALIANALYSISTASKJETSERVICES_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7// **************************************
8// Task used for the correction of determiantion of reconstructed jet spectra
9// Compares input (gen) and output (rec) jets
10// *******************************************
11
12#include "AliAnalysisTaskSE.h"
13#include "THnSparse.h" // cannot forward declare ThnSparseF
14
15////////////////
16class AliJetHeader;
17class AliESDEvent;
6d597ca2 18class AliESDVertex;
bf7b8731 19class AliAODEvent;
6d597ca2 20class AliAODVertex;
2eded560 21class AliAODVZERO;
bf7b8731 22class AliAODJet;
23class AliGenPythiaEventHeader;
24class AliCFManager;
3493c3a9 25class AliTriggerAnalysis;
bf7b8731 26
27class TList;
80a790fd 28class TClonesArray;
3d1dba29 29class TObjArray;
bf7b8731 30class TChain;
c0997643 31class TH1F;
bf7b8731 32class TH2F;
33class TH3F;
34class TProfile;
1d1b304d 35class TRandom3;
bf7b8731 36
37
38
39class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
40{
41 public:
42 AliAnalysisTaskJetServices();
43 AliAnalysisTaskJetServices(const char* name);
80a790fd 44 virtual ~AliAnalysisTaskJetServices();
bf7b8731 45 // Implementation of interface methods
46 virtual void UserCreateOutputObjects();
47 virtual void Init();
48 virtual void LocalInit() { Init(); }
49 virtual void UserExec(Option_t *option);
50 virtual void Terminate(Option_t *option);
c0997643 51 virtual void SetZVertexCut(Float_t f){fVtxZCut = f;}
e5ee1c19 52 virtual void SetDeltaZVertexCut(Float_t f){fVtxDeltaZCut = f;}
d49d814a 53 virtual void SetPtMinCosmic(Float_t ptMin) {fPtMinCosmic = ptMin;}
54 virtual void SetRMinCosmic(Float_t rMin) {fRIsolMinCosmic = rMin;}
55 virtual void SetMaxCosmicAngle(Float_t angle) {fMaxCosmicAngle = angle;}
bf7b8731 56 virtual Bool_t Notify();
57
58 virtual void SetAODInput(Bool_t b){fUseAODInput = b;}
b5a3f310 59 virtual void SetRunRange(Float_t fLo,Float_t fUp){fRunRange[0] = fLo;fRunRange[1] = fUp;}
3493c3a9 60 virtual void SetMCData(Bool_t b){fMC = b;}
21df3cc7 61 virtual void SetCollisionType(Int_t iType){fCollisionType = iType;}
cc0649e4 62 virtual void SetUsePhysicsSelection(Bool_t b){fUsePhysicsSelection = b;}
39e7e8ab 63 virtual void SetPhysicsSelectionFlag(Int_t i){fPhysicsSelectionFlag = i;}
f4132e7d 64 virtual void SetFilterAODCollisions(Bool_t b){fFilterAODCollisions = b;}
65
66 virtual void SetNonStdFile(char *c){fNonStdFile = c;}
6d597ca2 67 Bool_t IsEventSelected(const AliESDEvent* esd);
68 Bool_t IsEventSelected(const AliAODEvent* aod) const;
69
70 Bool_t IsEventPileUp(const AliESDEvent* esd) const;
71
72 Bool_t IsEventCosmic(const AliESDEvent* esd) const;
bf7b8731 73
6d597ca2 74 Bool_t IsVertexValid(const AliESDVertex *vtx);
75 Bool_t IsVertexValid(const AliAODVertex *vtx) const;
76
e5ee1c19 77 Bool_t IsVertexIn(const AliESDVertex *vtx,const AliESDVertex *vtxSPD);
78 Bool_t IsVertexIn(const AliAODVertex *vtx,const AliAODVertex *vtxSPD) const;
f4132e7d 79 Int_t GetEventClass(AliESDEvent *esd);
ffab794c 80 Int_t GetEventClass(AliAODEvent *aod);
6d597ca2 81
40445651 82
83 virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
84 virtual void SetMinTrackPt(Float_t f){fMinTrackPt = f;}
85 virtual void SetTrackEtaWindow(Float_t f){fTrackRecEtaWindow = f;}
2eded560 86 virtual void SetRPMethod(Int_t i){fRPMethod = i;}
b360e4be 87 virtual void SetV0Centroids(TProfile *xa,TProfile *ya,
88 TProfile *xc,TProfile *yc);
89
3d1dba29 90 virtual void SetNTrigger(Int_t n);
91 virtual void SetTrigger(Int_t i,UInt_t it,const char* c = "");
92
40445651 93
2eded560 94 Bool_t CalculateReactionPlaneAngleVZERO(AliAODEvent *aod);
40445651 95 Int_t GetListOfTracks(TList *list);
96
2eded560 97
275d3481 98 enum { kAllTriggered = 0,
99 kTriggeredVertex, //1
100 kTriggeredVertexIn, //2
101 kSelectedALICE, //3
102 kSelectedALICEVertexValid, //4
103 kSelectedALICEVertexIn, //5
104 kSelected, //6
105 kConstraints}; //7
2eded560 106 enum { kRPTracks = 0, kRPVZEROA,kRPVZEROC,kRPMethods};
f2dd0695 107
6d597ca2 108 enum { kNoEventCut=1<<0,
109 kPhysicsSelectionCut=1<<1,
110 kContributorsCut1=1<<2,
111 kContributorsCut2=1<<3,
112 kContributorsCut3=1<<4,
113 kVertexTPC=1<<5,
114 kVertexSPD=1<<6,
115 kVertexGlobal=1<<7,
116 kSPDDispersionCut=1<<8,
117 kVertexZCut=1<<9,
118 kVertexRCut=1<<10,
e5ee1c19 119 kVertexDeltaZCut=1<<11,
120 kTotalEventCuts=(1<<12)-1};
21df3cc7 121 enum {kPbPb = 0,kPP,kPbP};
f2dd0695 122
bf7b8731 123 private:
124
125 AliAnalysisTaskJetServices(const AliAnalysisTaskJetServices&);
126 AliAnalysisTaskJetServices& operator=(const AliAnalysisTaskJetServices&);
127
128 Bool_t fUseAODInput; // take jet from input AOD not from ouptu AOD
cc0649e4 129 Bool_t fUsePhysicsSelection;// decide wether we take into account physicsselction task
3493c3a9 130 Bool_t fMC; // true for MC data to allow correct trigger slection
f4132e7d 131 Bool_t fFilterAODCollisions; // filter out collision canditates to the AOD
39e7e8ab 132 UInt_t fPhysicsSelectionFlag; // defines the glag for acceptance of events from physics selection
d49d814a 133 UInt_t fSelectionInfoESD; // slection info bit mask
6d597ca2 134 UInt_t fEventCutInfoESD; // event selection info of what is cutted after physics selection
40445651 135 UInt_t fFilterMask; // filter bit for slecected tracks
2eded560 136 Int_t fRPMethod; // method for subevent calculation
3d1dba29 137 Int_t fCollisionType; // type of collisions
138 Int_t fNTrigger; // Number of different triggers
bf7b8731 139 Float_t fAvgTrials; // Average number of trials
d49d814a 140 Float_t fVtxXMean; // mean x for cuts
141 Float_t fVtxYMean; // mean y for cuts
142 Float_t fVtxZMean; // mean z for cuts
143 Float_t fVtxRCut; // vtx cut in R
144 Float_t fVtxZCut; // vtzx cut in Z
e5ee1c19 145 Float_t fVtxDeltaZCut; // cut on difference between SPD and Global vtx
d49d814a 146 Float_t fPtMinCosmic; // Minimum pT to be considered as cosmic candidate
147 Float_t fRIsolMinCosmic; // Minimum R = sqrt{deltaPhi^2 + deltaEta^2} to be considered as cosmic candidate
148 Float_t fMaxCosmicAngle; // Max deviation from pi (angle between two tracks) in case of cosmic candidate
b5a3f310 149 Float_t fRunRange[2]; // only important for real data for
40445651 150 Float_t fCentrality; // ! centrality
3d1dba29 151 Float_t fTrackRecEtaWindow; // eta window for rec tracks
152 Float_t fMinTrackPt; // limits the track p_T
153 Float_t fRPAngle; // ! RP angle of the reaction plane
154 Float_t fPsiVZEROA; // ! RP angle from vzeroa
155 Float_t fPsiVZEROC; // ! RP angle from vzeroc
156 UInt_t *fTriggerBit ; //[fNTrigger]
40445651 157
158 TRandom3 *fRandomizer; // ! randomizer
159
f4132e7d 160 TString fNonStdFile; // outputName for replication
3d1dba29 161 TString *fTriggerName; //[fNTrigger] array of trigger names
432abb2b 162 TProfile* fh1Xsec; //! pythia cross section is averaged
163 TH1F* fh1Trials; //! trials are added per notify...
164 TH1F* fh1AvgTrials; //! average trials are added per event
3493c3a9 165 TH1F* fh1PtHard; //! Pt har of the event...
166 TH1F* fh1PtHardTrials; //! Number of trials
167 TH1F* fh1SelectionInfoESD; //! Masks that satisfy fSelectionInfo
168 TH1F* fh1EventCutInfoESD; //! Masks that satisfy fSelectionInfo
742ee86c 169 TH1F* fh1CentralityESD; //! centrality
170 TH1F* fh1Centrality; //! centrality
40445651 171 TH1F* fh1RP; //! RP distribution
e5697f4d 172 TH2F* fh2ReducedTrigger; //! reduced trigger count
3d1dba29 173 TH2F* fh2CentralityTriggerESD; //! centrality
174 TH2F* fh2CentralityTrigger; //! centrality
3493c3a9 175 TH2F* fh2TriggerCount; //! number of fire triggers in each case
176 TH2F* fh2ESDTriggerCount; //! number of fire triggers in each case
177 TH2F* fh2TriggerVtx; //! vtx. position vs. trigger decision
178 TH2F* fh2ESDTriggerVtx; //! vtx. position vs. trigger decision
179 TH2F* fh2ESDTriggerRun; //! fired triggers vs. run number
180 TH2F* fh2VtxXY; //! XY position of VTX were available
2eded560 181 TH1F* fh1NCosmicsPerEvent; //! Number of coscmic candidates found in event
182 TProfile* fp1RPXA; //! mean XA vs run
183 TProfile* fp1RPYA; //! mean YA vs run
184 TProfile* fp1RPXC; //! mean XA vs run
185 TProfile* fp1RPYC; //! mean YA vs run
b360e4be 186 TProfile* fp1CalibRPXA; // calib mean XA vs run
187 TProfile* fp1CalibRPYA; // calib YA vs run
188 TProfile* fp1CalibRPXC; // calib XA vs run
189 TProfile* fp1CalibRPYC; // calib YA vs run
2eded560 190 TH2F* fh2RPAC; //! RP A vs C
191 TH2F* fh2RPAT; //! RP A vs tracks
192 TH2F* fh2RPCT; //! RP C vs tracks
193 TH2F* fh2XYA; //! XY correlations VZERO C
194 TH2F* fh2XYC; //! XY correlations VZERO C
195 TH2F* fh2RPCentrality; //! RP vs centrality
196 TH2F* fh2RPACentrality; //! RP vs centrality
197 TH2F* fh2RPCCentrality; //! RP vs centrality
40445651 198
3493c3a9 199 AliTriggerAnalysis *fTriggerAnalysis; //! Trigger Analysis to get the background rates etc.
f4132e7d 200 TList *fHistList; //! Output list
201
202 // Provisions for replication
203 static AliAODHeader* fgAODHeader; //! Header for replication
2eded560 204 static AliAODVZERO* fgAODVZERO; //! vzero for replication
80a790fd 205 static TClonesArray* fgAODVertices; //! primary vertex for replication
e5ee1c19 206 ClassDef(AliAnalysisTaskJetServices,17)
bf7b8731 207};
208
209#endif