Added some methods for testing purpose
[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;}
6d597ca2 58 Bool_t IsEventSelected(const AliESDEvent* esd);
59 Bool_t IsEventSelected(const AliAODEvent* aod) const;
60
61 Bool_t IsEventPileUp(const AliESDEvent* esd) const;
62
63 Bool_t IsEventCosmic(const AliESDEvent* esd) const;
bf7b8731 64
6d597ca2 65 Bool_t IsVertexValid(const AliESDVertex *vtx);
66 Bool_t IsVertexValid(const AliAODVertex *vtx) const;
67
68 Bool_t IsVertexIn(const AliESDVertex *vtx);
69 Bool_t IsVertexIn(const AliAODVertex *vtx) const;
70
71 enum { kAllTriggered = 0,kTriggeredVertex,kTriggeredVertexIn,kSelectedALICE,kSelectedALICEVertexValid,kSelectedALICEVertexIn,kSelected,kConstraints};
f2dd0695 72
6d597ca2 73 enum { kNoEventCut=1<<0,
74 kPhysicsSelectionCut=1<<1,
75 kContributorsCut1=1<<2,
76 kContributorsCut2=1<<3,
77 kContributorsCut3=1<<4,
78 kVertexTPC=1<<5,
79 kVertexSPD=1<<6,
80 kVertexGlobal=1<<7,
81 kSPDDispersionCut=1<<8,
82 kVertexZCut=1<<9,
83 kVertexRCut=1<<10,
84 kTotalEventCuts=(1<<11)-1};
f2dd0695 85
bf7b8731 86 private:
87
88 AliAnalysisTaskJetServices(const AliAnalysisTaskJetServices&);
89 AliAnalysisTaskJetServices& operator=(const AliAnalysisTaskJetServices&);
90
91 Bool_t fUseAODInput; // take jet from input AOD not from ouptu AOD
cc0649e4 92 Bool_t fUsePhysicsSelection;// decide wether we take into account physicsselction task
3493c3a9 93 Bool_t fMC; // true for MC data to allow correct trigger slection
39e7e8ab 94 UInt_t fPhysicsSelectionFlag; // defines the glag for acceptance of events from physics selection
d49d814a 95 UInt_t fSelectionInfoESD; // slection info bit mask
6d597ca2 96 UInt_t fEventCutInfoESD; // event selection info of what is cutted after physics selection
bf7b8731 97 Float_t fAvgTrials; // Average number of trials
d49d814a 98 Float_t fVtxXMean; // mean x for cuts
99 Float_t fVtxYMean; // mean y for cuts
100 Float_t fVtxZMean; // mean z for cuts
101 Float_t fVtxRCut; // vtx cut in R
102 Float_t fVtxZCut; // vtzx cut in Z
103 Float_t fPtMinCosmic; // Minimum pT to be considered as cosmic candidate
104 Float_t fRIsolMinCosmic; // Minimum R = sqrt{deltaPhi^2 + deltaEta^2} to be considered as cosmic candidate
105 Float_t fMaxCosmicAngle; // Max deviation from pi (angle between two tracks) in case of cosmic candidate
b5a3f310 106 Float_t fRunRange[2]; // only important for real data for
3493c3a9 107 TProfile* fh1Xsec; //! pythia cross section and trials
108 TH1F* fh1Trials; //! trials are added
109 TH1F* fh1PtHard; //! Pt har of the event...
110 TH1F* fh1PtHardTrials; //! Number of trials
111 TH1F* fh1SelectionInfoESD; //! Masks that satisfy fSelectionInfo
112 TH1F* fh1EventCutInfoESD; //! Masks that satisfy fSelectionInfo
113 TH2F* fh2TriggerCount; //! number of fire triggers in each case
114 TH2F* fh2ESDTriggerCount; //! number of fire triggers in each case
115 TH2F* fh2TriggerVtx; //! vtx. position vs. trigger decision
116 TH2F* fh2ESDTriggerVtx; //! vtx. position vs. trigger decision
117 TH2F* fh2ESDTriggerRun; //! fired triggers vs. run number
118 TH2F* fh2VtxXY; //! XY position of VTX were available
119 TH1F* fh1NCosmicsPerEvent; //! Number of coscmic candidates found in event
120 AliTriggerAnalysis *fTriggerAnalysis; //! Trigger Analysis to get the background rates etc.
121
bf7b8731 122 TList *fHistList; // Output list
123
39e7e8ab 124 ClassDef(AliAnalysisTaskJetServices,9)
bf7b8731 125};
126
127#endif