added error messages when task does not post data in UserCreateOutputObjects for...
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskESDfilter.h
CommitLineData
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
17class AliAnalysisFilter;
18class AliStack;
19class AliESDtrack;
20class AliMCEventHandler;
21class TRefArray;
22class AliAODHeader;
23
24class AliAnalysisTaskESDfilter : public AliAnalysisTaskSE
25{
26 public:
27 AliAnalysisTaskESDfilter();
28 AliAnalysisTaskESDfilter(const char* name);
75a996ab 29 virtual ~AliAnalysisTaskESDfilter();
c7ef1c47 30 // Implementation of interface methods
31 virtual void UserCreateOutputObjects();
32 virtual void Init();
33 virtual void LocalInit() {Init();}
34 virtual void UserExec(Option_t *option);
35 virtual void Terminate(Option_t *option);
36
37 virtual void ConvertESDtoAOD();
38 // Setters
39 virtual void SetTrackFilter (AliAnalysisFilter* trackF) {fTrackFilter = trackF;}
40 virtual void SetTPCOnlyFilterMask (UInt_t filterMask) {fTPCOnlyFilterMask = filterMask;}
41 virtual void SetKinkFilter (AliAnalysisFilter* KinkF) {fKinkFilter = KinkF;}
42 virtual void SetV0Filter (AliAnalysisFilter* V0F) {fV0Filter = V0F;}
43 virtual void SetCascadeFilter (AliAnalysisFilter* CascadeF) {fCascadeFilter = CascadeF;}
44 virtual void SetPthreshold (Double_t p) {fHighPthreshold = p;}
45 virtual void SetPshape (TF1 *func) {fPtshape = func;}
46 virtual void SetEnableFillAOD (Bool_t b) {fEnableFillAOD = b;}
47
48 virtual void SetAODPID(AliESDtrack *esdtrack, AliAODTrack *aodtrack, AliAODPid *detpid, Double_t bfield);
49 void SetDetectorRawSignals(AliAODPid *aodpid, AliESDtrack *track, Double_t bfield);
50
51 void PrintTask(Option_t *option="all", Int_t indent=0) const;
52
53 void DisableVZERO() { fIsVZEROEnabled = kFALSE; }
54 void DisableCascades() { fAreCascadesEnabled = kFALSE; }
55 void DisableV0s() { fAreV0sEnabled = kFALSE; }
56 void DisableKinks() { fAreKinksEnabled = kFALSE; }
57 void DisableTracks() { fAreTracksEnabled = kFALSE; }
58 void DisablePmdClusters() { fArePmdClustersEnabled = kFALSE; }
59 void DisableCaloClusters() { fAreCaloClustersEnabled = kFALSE; }
60 void DisableCells() { fAreEMCALCellsEnabled = fArePHOSCellsEnabled = kFALSE; }
61 void DisableTracklets() { fAreTrackletsEnabled = kFALSE; }
62
63 virtual void SetTimeZeroType(AliESDpid::EStartTimeType_t tofTimeZeroType) {fTimeZeroType = tofTimeZeroType;}
64
65private:
66 AliAnalysisTaskESDfilter(const AliAnalysisTaskESDfilter&);
67 AliAnalysisTaskESDfilter& operator=(const AliAnalysisTaskESDfilter&);
68 void PrintMCInfo(AliStack *pStack,Int_t label); // for debugging
69 Double_t Chi2perNDF(AliESDtrack* track);
70
71 AliAODHeader* ConvertHeader(const AliESDEvent& esd);
72 void ConvertCascades(const AliESDEvent& esd);
73 void ConvertV0s(const AliESDEvent& esd);
74 void ConvertKinks(const AliESDEvent& esd);
75 void ConvertPrimaryVertices(const AliESDEvent& esd);
76 void ConvertTracks(const AliESDEvent& esd);
77 void ConvertPmdClusters(const AliESDEvent& esd);
78 void ConvertCaloClusters(const AliESDEvent& esd);
79 void ConvertEMCALCells(const AliESDEvent& esd);
80 void ConvertPHOSCells(const AliESDEvent& esd);
81 void ConvertTracklets(const AliESDEvent& esd);
82 void ConvertTPCOnlyTracks(const AliESDEvent& esd);
83 void ConvertVZERO(const AliESDEvent& esd);
84
85 TClonesArray& Tracks();
86 TClonesArray& V0s();
87 TClonesArray& Vertices();
88 TClonesArray& Cascades();
89
90 // Filtering
91 AliAnalysisFilter* fTrackFilter; // Track Filter
92 AliAnalysisFilter* fKinkFilter; // Kink Filter
93 AliAnalysisFilter* fV0Filter; // V0 Filter
94 AliAnalysisFilter* fCascadeFilter; // Cascade Filter
95 // PID
96 Double_t fHighPthreshold; // Pt threshold for detector signal setting
97 TF1 * fPtshape; // Pt spectrum distribution
98 Bool_t fEnableFillAOD; // value that decides if this task activates AOD filling
99 Bool_t* fUsedTrack; //! indices of used tracks
100 Bool_t* fUsedKink; //! indices of used kinks
101 Bool_t* fUsedV0; //! indices of used V0s
102 TRefArray* fAODTrackRefs; // array of track references
103 TRefArray* fAODV0VtxRefs; // array of v0 vertices references
104 TRefArray* fAODV0Refs ; // array of v0s references
105 AliMCEventHandler* fMChandler; // pointer to MC handler (if any)
106 Int_t fNumberOfTracks; // current number of tracks
107 Int_t fNumberOfPositiveTracks; // current number of positive tracks
108 Int_t fNumberOfV0s; // current number of v0s
109 Int_t fNumberOfVertices; // current number of vertices
110 Int_t fNumberOfCascades; // current number of cascades
111 Int_t fNumberOfKinks; // current number of kinks
112 Bool_t fOldESDformat; // is the ESD in old format ?
113 AliAODVertex* fPrimaryVertex; // pointer to primary vertex of the event
114 UInt_t fTPCOnlyFilterMask; // Filter Mask used to select and store refitted TPC only tracks
115 Bool_t fIsVZEROEnabled; // whether or not to fill the vzero branch (true by default)
116 Bool_t fAreCascadesEnabled; // whether or not to fill the cascades branch (true by default)
117 Bool_t fAreV0sEnabled; // whether or not to fill the v0 branch (true by default)
118 Bool_t fAreKinksEnabled; // whether or not to fill the kinks (true by default)
119 Bool_t fAreTracksEnabled; // whether or not to fill the (central) tracks branch (true by default)
120 Bool_t fArePmdClustersEnabled; // whether or not to fill the pmd clusters (true by default)
121 Bool_t fAreCaloClustersEnabled; // whether or not to fill the calo clusters (true by default)
122 Bool_t fAreEMCALCellsEnabled; // whether or not to fill the emcal cells (true by default)
123 Bool_t fArePHOSCellsEnabled; // whether or not to fill the phos cells (true by default)
124 Bool_t fAreTrackletsEnabled; // whether or not to fill the tracklets (true by default)
125 AliESDpid* fESDpid; // esd pid
126 Bool_t fIsPidOwner; // whether we own fESDpid
127 Int_t fTimeZeroType; // time zero type
128
129 ClassDef(AliAnalysisTaskESDfilter, 8); // Analysis task for standard ESD filtering
130};
131
132#endif