coverity fixes
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / 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;
bf7b8731 21class AliAODJet;
22class AliGenPythiaEventHeader;
23class AliCFManager;
3493c3a9 24class AliTriggerAnalysis;
bf7b8731 25
26class TList;
80a790fd 27class TClonesArray;
bf7b8731 28class TChain;
c0997643 29class TH1F;
bf7b8731 30class TH2F;
31class TH3F;
32class TProfile;
33
34
35
36class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
37{
38 public:
39 AliAnalysisTaskJetServices();
40 AliAnalysisTaskJetServices(const char* name);
80a790fd 41 virtual ~AliAnalysisTaskJetServices();
bf7b8731 42 // Implementation of interface methods
43 virtual void UserCreateOutputObjects();
44 virtual void Init();
45 virtual void LocalInit() { Init(); }
46 virtual void UserExec(Option_t *option);
47 virtual void Terminate(Option_t *option);
c0997643 48 virtual void SetZVertexCut(Float_t f){fVtxZCut = f;}
d49d814a 49 virtual void SetPtMinCosmic(Float_t ptMin) {fPtMinCosmic = ptMin;}
50 virtual void SetRMinCosmic(Float_t rMin) {fRIsolMinCosmic = rMin;}
51 virtual void SetMaxCosmicAngle(Float_t angle) {fMaxCosmicAngle = angle;}
bf7b8731 52 virtual Bool_t Notify();
53
54 virtual void SetAODInput(Bool_t b){fUseAODInput = b;}
b5a3f310 55 virtual void SetRunRange(Float_t fLo,Float_t fUp){fRunRange[0] = fLo;fRunRange[1] = fUp;}
3493c3a9 56 virtual void SetMCData(Bool_t b){fMC = b;}
cc0649e4 57 virtual void SetUsePhysicsSelection(Bool_t b){fUsePhysicsSelection = b;}
39e7e8ab 58 virtual void SetPhysicsSelectionFlag(Int_t i){fPhysicsSelectionFlag = i;}
f4132e7d 59 virtual void SetFilterAODCollisions(Bool_t b){fFilterAODCollisions = b;}
60
61 virtual void SetNonStdFile(char *c){fNonStdFile = c;}
6d597ca2 62 Bool_t IsEventSelected(const AliESDEvent* esd);
63 Bool_t IsEventSelected(const AliAODEvent* aod) const;
64
65 Bool_t IsEventPileUp(const AliESDEvent* esd) const;
66
67 Bool_t IsEventCosmic(const AliESDEvent* esd) const;
bf7b8731 68
6d597ca2 69 Bool_t IsVertexValid(const AliESDVertex *vtx);
70 Bool_t IsVertexValid(const AliAODVertex *vtx) const;
71
72 Bool_t IsVertexIn(const AliESDVertex *vtx);
73 Bool_t IsVertexIn(const AliAODVertex *vtx) const;
f4132e7d 74 Int_t GetEventClass(AliESDEvent *esd);
ffab794c 75 Int_t GetEventClass(AliAODEvent *aod);
6d597ca2 76
77 enum { kAllTriggered = 0,kTriggeredVertex,kTriggeredVertexIn,kSelectedALICE,kSelectedALICEVertexValid,kSelectedALICEVertexIn,kSelected,kConstraints};
f2dd0695 78
6d597ca2 79 enum { kNoEventCut=1<<0,
80 kPhysicsSelectionCut=1<<1,
81 kContributorsCut1=1<<2,
82 kContributorsCut2=1<<3,
83 kContributorsCut3=1<<4,
84 kVertexTPC=1<<5,
85 kVertexSPD=1<<6,
86 kVertexGlobal=1<<7,
87 kSPDDispersionCut=1<<8,
88 kVertexZCut=1<<9,
89 kVertexRCut=1<<10,
90 kTotalEventCuts=(1<<11)-1};
f2dd0695 91
bf7b8731 92 private:
93
94 AliAnalysisTaskJetServices(const AliAnalysisTaskJetServices&);
95 AliAnalysisTaskJetServices& operator=(const AliAnalysisTaskJetServices&);
96
97 Bool_t fUseAODInput; // take jet from input AOD not from ouptu AOD
cc0649e4 98 Bool_t fUsePhysicsSelection;// decide wether we take into account physicsselction task
3493c3a9 99 Bool_t fMC; // true for MC data to allow correct trigger slection
f4132e7d 100 Bool_t fFilterAODCollisions; // filter out collision canditates to the AOD
39e7e8ab 101 UInt_t fPhysicsSelectionFlag; // defines the glag for acceptance of events from physics selection
d49d814a 102 UInt_t fSelectionInfoESD; // slection info bit mask
6d597ca2 103 UInt_t fEventCutInfoESD; // event selection info of what is cutted after physics selection
bf7b8731 104 Float_t fAvgTrials; // Average number of trials
d49d814a 105 Float_t fVtxXMean; // mean x for cuts
106 Float_t fVtxYMean; // mean y for cuts
107 Float_t fVtxZMean; // mean z for cuts
108 Float_t fVtxRCut; // vtx cut in R
109 Float_t fVtxZCut; // vtzx cut in Z
110 Float_t fPtMinCosmic; // Minimum pT to be considered as cosmic candidate
111 Float_t fRIsolMinCosmic; // Minimum R = sqrt{deltaPhi^2 + deltaEta^2} to be considered as cosmic candidate
112 Float_t fMaxCosmicAngle; // Max deviation from pi (angle between two tracks) in case of cosmic candidate
b5a3f310 113 Float_t fRunRange[2]; // only important for real data for
f4132e7d 114 TString fNonStdFile; // outputName for replication
3493c3a9 115 TProfile* fh1Xsec; //! pythia cross section and trials
116 TH1F* fh1Trials; //! trials are added
117 TH1F* fh1PtHard; //! Pt har of the event...
118 TH1F* fh1PtHardTrials; //! Number of trials
119 TH1F* fh1SelectionInfoESD; //! Masks that satisfy fSelectionInfo
120 TH1F* fh1EventCutInfoESD; //! Masks that satisfy fSelectionInfo
121 TH2F* fh2TriggerCount; //! number of fire triggers in each case
122 TH2F* fh2ESDTriggerCount; //! number of fire triggers in each case
123 TH2F* fh2TriggerVtx; //! vtx. position vs. trigger decision
124 TH2F* fh2ESDTriggerVtx; //! vtx. position vs. trigger decision
125 TH2F* fh2ESDTriggerRun; //! fired triggers vs. run number
126 TH2F* fh2VtxXY; //! XY position of VTX were available
127 TH1F* fh1NCosmicsPerEvent; //! Number of coscmic candidates found in event
128 AliTriggerAnalysis *fTriggerAnalysis; //! Trigger Analysis to get the background rates etc.
f4132e7d 129 TList *fHistList; //! Output list
130
131 // Provisions for replication
132 static AliAODHeader* fgAODHeader; //! Header for replication
80a790fd 133 static TClonesArray* fgAODVertices; //! primary vertex for replication
134 ClassDef(AliAnalysisTaskJetServices,12)
bf7b8731 135};
136
137#endif