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