AliPhysics  d565ceb (d565ceb)
AliAnalysisTaskCaloFilter.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKCALOFILTER_H
2 #define ALIANALYSISTASKCALOFILTER_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 //_________________________________________________________________________
30 //_________________________________________________________________________
31 
32 #include "AliAnalysisTaskSE.h"
33 class AliEMCALRecoUtils;
34 class AliEMCALGeometry;
35 class AliESDEvent;
36 class AliAODEvent;
37 
39 {
40  public:
41 
43  AliAnalysisTaskCaloFilter(const char* name);
44  virtual ~AliAnalysisTaskCaloFilter() ;
45 
46  // * General analysis frame methods *
47 
48  virtual void UserCreateOutputObjects();
49  virtual void Init();
50  virtual void LocalInit() { Init() ; }
51  virtual void UserExec(Option_t *option);
52 
53  // * Task own methods *
54 
56 
58 
60 
62 
64 
68 
69  void CorrectionsInEMCAL();
70 
71  void FillAODHeader();
72 
73  void FillAODCaloCells();
74 
75  void FillAODCaloClusters();
76 
77  void FillAODCaloTrigger();
78 
79  void FillAODMCParticles();
80 
81  void FillAODTracks();
82 
83  void FillAODv0s();
84 
85  void FillAODVertices();
86 
87  void FillAODVZERO();
88 
89  void PrintInfo();
90 
91  // * Task settings *
92 
93  // Geometry methods
94 
95  void SetEMCALGeometryName(TString name) { fEMCALGeoName = name ; }
97 
100  void SetEMCALGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fEMCALMatrix[i] = m ; }
101 
102  //void SwitchOnLoadOwnPHOSGeometryMatrices() { fLoadPHOSMatrices = kTRUE ; }
103  //void SwitchOffLoadOwnPHOSGeometryMatrices() { fLoadPHOSMatrices = kFALSE ; }
104  //void SetPHOSGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fPHOSMatrix[i] = m ; }
105 
108 
109  void SwitchOnFillAODFile() { fFillAODFile = kTRUE ; }
110  void SwitchOffFillAODFile() { fFillAODFile = kFALSE ; }
111 
114 
115  void SwitchOnFillTracks() { fFillTracks = kTRUE ; }
116  void SwitchOffFillTracks() { fFillTracks = kFALSE ; }
117 
119  fFillHybridTracks = kTRUE ; }
121 
122  void SwitchOnFillv0s() { fFillv0s = kTRUE ; }
123  void SwitchOffFillv0s() { fFillv0s = kFALSE ; }
124 
125  void SwitchOnFillVZERO() { fFillVZERO = kTRUE ; }
126  void SwitchOffFillVZERO() { fFillVZERO = kFALSE ; }
127 
130 
135  enum caloFilter { kBoth = 0, kEMCAL = 1, kPHOS = 2 } ;
136 
137  void SetCaloFilter(Int_t calo) { fCaloFilter = calo ; }
138  TString GetCaloFilter() const { return fCaloFilter ; }
139 
142  void SetEventSelection(Bool_t emcal, Bool_t phos, Bool_t track) {
143  fEventSelection[0] = emcal ; fEventSelection[1] = phos ; fEventSelection[2] = track ; }
144 
147 
148  void SetMBTriggerMask(UInt_t mask) { fMBTriggerMask = mask ; }
149 
150  void SetEMCALRecoUtils(AliEMCALRecoUtils* ru){ fEMCALRecoUtils = ru ; }
151  AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fEMCALRecoUtils ; }
152 
153  void SwitchOnClusterCorrection() { fCorrect = kTRUE ; }
154  void SwitchOffClusterCorrection() { fCorrect = kFALSE ; }
155 
156  void SetConfigFileName(TString name) { fConfigName = name ; }
157 
162 
165  void SetPHOSNcellsCut(Int_t cut) { fPHOSNcellsCut = cut ; }
166  Int_t GetPHOSNcellsCut() const { return fPHOSNcellsCut ; }
167 
168  void SetTrackPtCut(Float_t cut) { fTrackPtCut = cut ; }
169  Float_t GetTrackPtCut() const { return fTrackPtCut ; }
170 
171  void SetVzCut(Float_t cut) { fVzCut = cut ; }
172  Float_t GetVzCut() const { return fVzCut ; }
173 
174 
175 private:
176 
182 
183  //EMCAL specific
184  AliEMCALGeometry * fEMCALGeo;
186  AliEMCALRecoUtils * fEMCALRecoUtils;
187 
188  //Geometry
190  TGeoHMatrix * fEMCALMatrix[22];
191  //Bool_t fLoadPHOSMatrices; ///< Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
192  //TGeoHMatrix * fPHOSMatrix[5]; ///< Geometry matrices with alignments.
194 
196 
201 
205 
208 
211 
213 
215 
217 
218  AliVEvent* fEvent;
221 
224 
227 
229  ClassDef(AliAnalysisTaskCaloFilter, 12) ;
231 
232 };
233 
234 #endif
AliEMCALGeometry * fEMCALGeo
! EMCAL geometry.
Bool_t fEventSelection[3]
Define which detector is used to select the event: {EMCAL,PHOS,Tracks}.
Int_t fPHOSNcellsCut
At least a PHOS cluster with fNCellsCut cells over fEnergyCut.
Float_t fTrackPtCut
Select events with at least a track with this pT.
void SetEventSelection(Bool_t emcal, Bool_t phos, Bool_t track)
Bool_t fFillVZERO
Fill the output AOD file with VZERO input.
virtual void UserExec(Option_t *option)
Bool_t fFillTracks
Fill the output AOD file with tracks.
Bool_t fCheckEventVertex
Check the primary vertex of the event or not.
Bool_t fAcceptAllMBEvent
Do not select the MB events with same Event selection cuts as other triggers.
Int_t fCorrect
Recalibrate or recalculate different cluster parameters, only for EMCal.
AliAnalysisTaskCaloFilter()
Default constructor.
Bool_t fFillHybridTracks
Fill the output AOD file with hybrid tracks, only when fFillTracks = kTRUE.
void FillAODCaloTrigger()
AliAODCaloTrigger direct copy.
AliEMCALRecoUtils * GetEMCALRecoUtils() const
Int_t fCaloFilter
Calorimeter to filter: kBoth, kEMCAL, kPHOS.
virtual void UserCreateOutputObjects()
Init EMCal geometry and create the AOD MC particles branch.
AliAODEvent * fAODEvent
! AOD event pointer (cast of fEvent).
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
TString fEMCALGeoName
Name of geometry to use.
float Float_t
Definition: External.C:68
TString fConfigName
Name of analysis configuration file.
Filter Calorimeter ESDs into AODs.
Bool_t fLoadEMCALMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
AliEMCALRecoUtils * fEMCALRecoUtils
Pointer to EMCAL utilities for clusterization.
Int_t fEMCALNcellsCut
At least an EMCAL cluster with fNCellsCut cells over fEnergyCut.
AliAnalysisTaskCaloFilter & operator=(const AliAnalysisTaskCaloFilter &)
Assignment operator not implemented.
Float_t fEMCALEnergyCut
At least an EMCAL cluster with this energy in the event.
void FillAODHeader()
AOD Header copy.
AliESDEvent * fESDEvent
! ESD event pointer (cast of fEvent).
AliVEvent * fEvent
! Event pointer.
void FillAODMCParticles()
Copy AOD MC particles.
Bool_t fFillv0s
Fill the output AOD file with v0s.
Float_t fVzCut
At least events with vertex within cut.
Bool_t fFillMCParticles
Fill the output AOD file with MC particles.
UInt_t fMBTriggerMask
Define the mask for MB events, it should be kMB, but not always defined, use kAnyINT instead...
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
void SetEMCALRecoUtils(AliEMCALRecoUtils *ru)
Float_t fPHOSEnergyCut
At least a PHOS cluster with this energy in the event.
virtual ~AliAnalysisTaskCaloFilter()
Destructor.
void SetEMCALGeometryMatrixInSM(TGeoHMatrix *m, Int_t i)
Bool_t fFillAODFile
Fill the output AOD file with clusters.
TGeoHMatrix * fEMCALMatrix[22]
Geometry matrices with alignments.
Bool_t fFillAllVertices
Fill the output AOD file with all vertices.
void FillAODCaloCells()
Fill EMCAL/PHOS cell info.
Bool_t fGeoMatrixSet
Set geometry matrices only once, for the first event.