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