]>
Commit | Line | Data |
---|---|---|
c7ef1c47 | 1 | #ifndef ALIANALYSISTASKESDFILTER_H |
2 | #define ALIANALYSISTASKESDFILTER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | ||
9 | #include <TList.h> | |
10 | #include <TF1.h> | |
11 | #include "AliAnalysisTaskSE.h" | |
12 | #include "AliESDtrack.h" | |
13 | #include "AliAODTrack.h" | |
14 | #include "AliAODPid.h" | |
15 | #include "AliESDpid.h" | |
16 | ||
17 | class AliAnalysisFilter; | |
18 | class AliStack; | |
19 | class AliESDtrack; | |
20 | class AliMCEventHandler; | |
21 | class TRefArray; | |
22 | class AliAODHeader; | |
2f5ee3b7 | 23 | class AliESDtrackCuts; |
c7ef1c47 | 24 | |
25 | class AliAnalysisTaskESDfilter : public AliAnalysisTaskSE | |
26 | { | |
27 | public: | |
28 | AliAnalysisTaskESDfilter(); | |
29 | AliAnalysisTaskESDfilter(const char* name); | |
75a996ab | 30 | virtual ~AliAnalysisTaskESDfilter(); |
c7ef1c47 | 31 | // Implementation of interface methods |
32 | virtual void UserCreateOutputObjects(); | |
33 | virtual void Init(); | |
34 | virtual void LocalInit() {Init();} | |
dc893135 | 35 | virtual Bool_t Notify(); |
c7ef1c47 | 36 | virtual void UserExec(Option_t *option); |
37 | virtual void Terminate(Option_t *option); | |
38 | ||
39 | virtual void ConvertESDtoAOD(); | |
40 | // Setters | |
41 | virtual void SetTrackFilter (AliAnalysisFilter* trackF) {fTrackFilter = trackF;} | |
67abcce9 | 42 | virtual void SetTPCOnlyFilterMask (UInt_t filterMask) {SetTPCConstrainedFilterMask(filterMask);} |
43 | ||
44 | virtual void SetTPCConstrainedFilterMask (UInt_t filterMask) {fTPCConstrainedFilterMask = filterMask;} | |
45 | virtual void SetHybridFilterMaskTPCConstrainedGlobal(UInt_t filterMask) {fHybridFilterMaskTPCCG = filterMask;} | |
46 | virtual void SetWriteHybridTPCConstrainedOnly(bool b){fWriteHybridTPCCOnly = b;} | |
47 | ||
48 | virtual void SetGlobalConstrainedFilterMask (UInt_t filterMask) {fGlobalConstrainedFilterMask = filterMask;} | |
49 | virtual void SetHybridFilterMaskGlobalConstrainedGlobal(UInt_t filterMask) {fHybridFilterMaskGCG = filterMask;} | |
50 | virtual void SetWriteHybridGlobalConstrainedOnly(bool b){fWriteHybridGCOnly = b;} | |
51 | ||
52 | ||
c7ef1c47 | 53 | virtual void SetKinkFilter (AliAnalysisFilter* KinkF) {fKinkFilter = KinkF;} |
54 | virtual void SetV0Filter (AliAnalysisFilter* V0F) {fV0Filter = V0F;} | |
55 | virtual void SetCascadeFilter (AliAnalysisFilter* CascadeF) {fCascadeFilter = CascadeF;} | |
56 | virtual void SetPthreshold (Double_t p) {fHighPthreshold = p;} | |
57 | virtual void SetPshape (TF1 *func) {fPtshape = func;} | |
58 | virtual void SetEnableFillAOD (Bool_t b) {fEnableFillAOD = b;} | |
59 | ||
1a3579a6 | 60 | virtual void SetAODPID(AliESDtrack *esdtrack, AliAODTrack *aodtrack, AliAODPid *detpid); |
61 | void SetDetectorRawSignals(AliAODPid *aodpid, AliESDtrack *track); | |
c7ef1c47 | 62 | |
b8d29a28 | 63 | void SetV0Cuts(const Double_t cuts[7]) {for (Int_t icut = 0; icut<7; icut++) fV0Cuts[icut] = cuts[icut];} |
64 | ||
65 | void SetCascadeCuts(const Double_t cuts[8]) {for (Int_t icut = 0; icut<8; icut++) fCascadeCuts[icut] = cuts[icut];} | |
66 | ||
67 | void GetV0Cuts(Double_t cuts[7]) const {for (Int_t icut = 0; icut<7; icut++) cuts[icut] = fV0Cuts[icut];} | |
68 | ||
69 | void GetCascadeCuts(Double_t cuts[8]) const {for (Int_t icut = 0; icut<8; icut++) cuts[icut] = fCascadeCuts[icut];} | |
70 | ||
71 | ||
dc893135 | 72 | Bool_t AddMetadataToUserInfo(); |
c7ef1c47 | 73 | void PrintTask(Option_t *option="all", Int_t indent=0) const; |
74 | ||
75 | void DisableVZERO() { fIsVZEROEnabled = kFALSE; } | |
a1f96974 | 76 | void DisableTZERO() { fIsTZEROEnabled = kFALSE; } |
8c87d22c | 77 | void DisableZDC() { fIsZDCEnabled = kFALSE; } |
c7ef1c47 | 78 | void DisableCascades() { fAreCascadesEnabled = kFALSE; } |
79 | void DisableV0s() { fAreV0sEnabled = kFALSE; } | |
80 | void DisableKinks() { fAreKinksEnabled = kFALSE; } | |
81 | void DisableTracks() { fAreTracksEnabled = kFALSE; } | |
82 | void DisablePmdClusters() { fArePmdClustersEnabled = kFALSE; } | |
83 | void DisableCaloClusters() { fAreCaloClustersEnabled = kFALSE; } | |
84 | void DisableCells() { fAreEMCALCellsEnabled = fArePHOSCellsEnabled = kFALSE; } | |
720f7306 | 85 | void DisableCaloTrigger(TString calo = "PHOS") { if (calo.Contains("EMCAL")) fAreEMCALTriggerEnabled = kFALSE; else fArePHOSTriggerEnabled = kFALSE; } |
c7ef1c47 | 86 | void DisableTracklets() { fAreTrackletsEnabled = kFALSE; } |
08b38f3f | 87 | void DisableHMPID() { fIsHMPIDEnabled = kFALSE; } |
c7ef1c47 | 88 | |
b8d29a28 | 89 | void EnableV0CascadeVerticesReco() { fIsV0CascadeRecoEnabled = kTRUE; } |
90 | ||
ed15417e | 91 | void SetPropagateTrackToEMCal(Bool_t propagate) {fDoPropagateTrackToEMCal = propagate;} |
a29b2a8a | 92 | void SetEMCalSurfaceDistance(Double_t d) {fEMCalSurfaceDistance = d;} |
ed15417e | 93 | |
c7ef1c47 | 94 | |
95 | private: | |
96 | AliAnalysisTaskESDfilter(const AliAnalysisTaskESDfilter&); | |
97 | AliAnalysisTaskESDfilter& operator=(const AliAnalysisTaskESDfilter&); | |
98 | void PrintMCInfo(AliStack *pStack,Int_t label); // for debugging | |
99 | Double_t Chi2perNDF(AliESDtrack* track); | |
100 | ||
101 | AliAODHeader* ConvertHeader(const AliESDEvent& esd); | |
102 | void ConvertCascades(const AliESDEvent& esd); | |
103 | void ConvertV0s(const AliESDEvent& esd); | |
104 | void ConvertKinks(const AliESDEvent& esd); | |
105 | void ConvertPrimaryVertices(const AliESDEvent& esd); | |
106 | void ConvertTracks(const AliESDEvent& esd); | |
107 | void ConvertPmdClusters(const AliESDEvent& esd); | |
108 | void ConvertCaloClusters(const AliESDEvent& esd); | |
109 | void ConvertEMCALCells(const AliESDEvent& esd); | |
110 | void ConvertPHOSCells(const AliESDEvent& esd); | |
720f7306 | 111 | void ConvertCaloTrigger(TString calo, const AliESDEvent& esd); |
c7ef1c47 | 112 | void ConvertTracklets(const AliESDEvent& esd); |
113 | void ConvertTPCOnlyTracks(const AliESDEvent& esd); | |
67abcce9 | 114 | void ConvertGlobalConstrainedTracks(const AliESDEvent& esd); |
c7ef1c47 | 115 | void ConvertVZERO(const AliESDEvent& esd); |
a1f96974 | 116 | void ConvertTZERO(const AliESDEvent& esd); |
8c87d22c | 117 | void ConvertZDC(const AliESDEvent& esd); |
08b38f3f | 118 | Int_t ConvertHMPID(const AliESDEvent& esd); |
37b92631 | 119 | void PropagateTrackToEMCal(AliESDtrack *esdTrack); |
120 | ||
c7ef1c47 | 121 | TClonesArray& Tracks(); |
122 | TClonesArray& V0s(); | |
123 | TClonesArray& Vertices(); | |
124 | TClonesArray& Cascades(); | |
125 | ||
126 | // Filtering | |
127 | AliAnalysisFilter* fTrackFilter; // Track Filter | |
128 | AliAnalysisFilter* fKinkFilter; // Kink Filter | |
129 | AliAnalysisFilter* fV0Filter; // V0 Filter | |
130 | AliAnalysisFilter* fCascadeFilter; // Cascade Filter | |
131 | // PID | |
132 | Double_t fHighPthreshold; // Pt threshold for detector signal setting | |
133 | TF1 * fPtshape; // Pt spectrum distribution | |
134 | Bool_t fEnableFillAOD; // value that decides if this task activates AOD filling | |
135 | Bool_t* fUsedTrack; //! indices of used tracks | |
136 | Bool_t* fUsedKink; //! indices of used kinks | |
137 | Bool_t* fUsedV0; //! indices of used V0s | |
138 | TRefArray* fAODTrackRefs; // array of track references | |
139 | TRefArray* fAODV0VtxRefs; // array of v0 vertices references | |
140 | TRefArray* fAODV0Refs ; // array of v0s references | |
141 | AliMCEventHandler* fMChandler; // pointer to MC handler (if any) | |
142 | Int_t fNumberOfTracks; // current number of tracks | |
143 | Int_t fNumberOfPositiveTracks; // current number of positive tracks | |
144 | Int_t fNumberOfV0s; // current number of v0s | |
145 | Int_t fNumberOfVertices; // current number of vertices | |
146 | Int_t fNumberOfCascades; // current number of cascades | |
147 | Int_t fNumberOfKinks; // current number of kinks | |
148 | Bool_t fOldESDformat; // is the ESD in old format ? | |
149 | AliAODVertex* fPrimaryVertex; // pointer to primary vertex of the event | |
67abcce9 | 150 | UInt_t fTPCConstrainedFilterMask; // Filter Mask used to select and store refitted TPC only tracks |
151 | UInt_t fHybridFilterMaskTPCCG; // Filter Mask used to mark global tracks as hybrid | |
152 | Bool_t fWriteHybridTPCCOnly;// write only the complent tracks not all global constrained | |
153 | ||
154 | UInt_t fGlobalConstrainedFilterMask; // Filter Mask used to select and store refitted TPC only tracks | |
155 | UInt_t fHybridFilterMaskGCG; // Filter Mask used to mark global tracks as hybrid | |
156 | Bool_t fWriteHybridGCOnly;// write only the complent tracks not all global constrained | |
25a60d41 | 157 | |
c7ef1c47 | 158 | Bool_t fIsVZEROEnabled; // whether or not to fill the vzero branch (true by default) |
a1f96974 | 159 | Bool_t fIsTZEROEnabled; // whether or not to fill the tzero branch (true by default) |
8c87d22c | 160 | Bool_t fIsZDCEnabled; // whether or not to fill the zdc branch (true by default) |
08b38f3f | 161 | Bool_t fIsHMPIDEnabled; // whether or not to fill the hmpid branch (true by default) |
b8d29a28 | 162 | Bool_t fIsV0CascadeRecoEnabled; // whether or not to reconstruct again V0s and cascades (false by default) |
c7ef1c47 | 163 | Bool_t fAreCascadesEnabled; // whether or not to fill the cascades branch (true by default) |
164 | Bool_t fAreV0sEnabled; // whether or not to fill the v0 branch (true by default) | |
165 | Bool_t fAreKinksEnabled; // whether or not to fill the kinks (true by default) | |
166 | Bool_t fAreTracksEnabled; // whether or not to fill the (central) tracks branch (true by default) | |
167 | Bool_t fArePmdClustersEnabled; // whether or not to fill the pmd clusters (true by default) | |
168 | Bool_t fAreCaloClustersEnabled; // whether or not to fill the calo clusters (true by default) | |
169 | Bool_t fAreEMCALCellsEnabled; // whether or not to fill the emcal cells (true by default) | |
170 | Bool_t fArePHOSCellsEnabled; // whether or not to fill the phos cells (true by default) | |
720f7306 | 171 | Bool_t fAreEMCALTriggerEnabled; // whether or not to fill the emcal trigger (true by default) |
172 | Bool_t fArePHOSTriggerEnabled; // whether or not to fill the phos trigger (true by default) | |
c7ef1c47 | 173 | Bool_t fAreTrackletsEnabled; // whether or not to fill the tracklets (true by default) |
174 | AliESDpid* fESDpid; // esd pid | |
175 | Bool_t fIsPidOwner; // whether we own fESDpid | |
2f5ee3b7 | 176 | AliESDtrackCuts* fTPCaloneTrackCuts; // TPC stand-alone track cuts |
b8d29a28 | 177 | Double_t fV0Cuts[7]; // Array to store the values for the different reco selections V0 related |
178 | Double_t fCascadeCuts[8]; // Array to store the values for the different reco selections cascades related | |
a29b2a8a | 179 | Bool_t fDoPropagateTrackToEMCal; // whether or not to propagate the tracks to the EMCal surface -- true by default |
180 | Double_t fEMCalSurfaceDistance; // EMCal surface distance from the center of the detector (r = 440 by default) | |
b8d29a28 | 181 | |
c7ef1c47 | 182 | |
37cf883a | 183 | ClassDef(AliAnalysisTaskESDfilter, 17); // Analysis task for standard ESD filtering |
c7ef1c47 | 184 | }; |
b8d29a28 | 185 | |
c7ef1c47 | 186 | #endif |