]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/CaloTrackCorrBase/AliCaloTrackReader.h
Fixes for reco
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliCaloTrackReader.h
CommitLineData
1c5acb87 1#ifndef ALICALOTRACKREADER_H
2#define ALICALOTRACKREADER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
1c5acb87 5
6//_________________________________________________________________________
7// Base class for reading data: MonteCarlo, ESD or AOD, of PHOS EMCAL and
8// Central Barrel Tracking detectors.
9// Not all MC particles/tracks/clusters are kept, some kinematical restrictions are done.
591cc579 10// Mother class of : AliCaloTrackESDReader: Fills ESD data in 3 TObjArrays (PHOS, EMCAL, CTS)
743aa53a 11// : AliCaloTrackMCReader : Fills Kinematics data in 3 TObjArrays (PHOS, EMCAL, CTS)
12// : AliCaloTrackAODReader: Fills AOD data in 3 TObjArrays (PHOS, EMCAL, CTS)
1c5acb87 13// -- Author: Gustavo Conesa (INFN-LNF)
743aa53a 14//////////////////////////////////////////////////////////////////////////////
1c5acb87 15
16// --- ROOT system ---
49b53920 17#include <TObject.h>
18#include <TString.h>
cfaba834 19class TObjArray ;
591cc579 20class TTree ;
f3138ecf 21class TArrayI ;
1c5acb87 22
23//--- ANALYSIS system ---
0de1814a 24#include "AliVEvent.h"
c5693f62 25class AliVCaloCells;
26class AliStack;
27class AliHeader;
28class AliGenEventHeader;
8dacfd76 29class AliAODEvent;
477d6cee 30class AliMCEvent;
c8fe2783 31class AliMixedEvent;
591cc579 32class AliAODMCHeader;
c5693f62 33class AliESDtrackCuts;
b6dd6ad2 34class AliCentrality;
48c37e02 35class AliTriggerAnalysis;
72542aba 36class AliEventplane;
f3138ecf 37class AliVCluster;
1c5acb87 38
0de1814a 39// --- CaloTrackCorr / EMCAL ---
cfaba834 40#include "AliFiducialCut.h"
0de1814a 41class AliEMCALRecoUtils;
c5693f62 42class AliCalorimeterUtils;
cfaba834 43
1c5acb87 44class AliCaloTrackReader : public TObject {
45
03190ad7 46public:
f3138ecf 47
48 AliCaloTrackReader() ; // ctor
49 virtual ~AliCaloTrackReader() ; // virtual dtor
cfaba834 50
51 //--------------------------------
52 // General methods
53 //--------------------------------
54
55 virtual void Init();
de0b770d 56
cfaba834 57 virtual void InitParameters();
de0b770d 58
cfaba834 59 virtual void Print(const Option_t * opt) const;
de0b770d 60
cfaba834 61 virtual void ResetLists();
1c5acb87 62
3c75ddf7 63 virtual Int_t GetDebug() const { return fDebug ; }
64 virtual void SetDebug(Int_t d) { fDebug = d ; }
cfaba834 65
66 enum inputDataType {kESD, kAOD, kMC};
3c75ddf7 67 virtual Int_t GetDataType() const { return fDataType ; }
68 virtual void SetDataType(Int_t data ) { fDataType = data ; }
1c5acb87 69
3c75ddf7 70 virtual Int_t GetEventNumber() const { return fEventNumber ; }
a79a2424 71
3c75ddf7 72 TString GetTaskName() const { return fTaskName ; }
73 void SetTaskName(TString name) { fTaskName = name ; }
cfaba834 74
cfaba834 75 //---------------------------------------
76 //Input/output event setters and getters
77 //---------------------------------------
78 virtual void SetInputEvent(AliVEvent* const input) ;
3c75ddf7 79 virtual void SetOutputEvent(AliAODEvent* const aod) { fOutputEvent = aod ; }
80 virtual void SetMC(AliMCEvent* const mc) { fMC = mc ; }
be518ab0 81 virtual void SetInputOutputMCEvent(AliVEvent* /*esd*/, AliAODEvent* /*aod*/, AliMCEvent* /*mc*/) { ; }
cfaba834 82
83 // Delta AODs
3c75ddf7 84 virtual TList * GetAODBranchList() const { return fAODBranchList ; }
85 void SetDeltaAODFileName(TString name ) { fDeltaAODFileName = name ; }
86 TString GetDeltaAODFileName() const { return fDeltaAODFileName ; }
87 void SwitchOnWriteDeltaAOD() { fWriteOutputDeltaAOD = kTRUE ; }
88 void SwitchOffWriteDeltaAOD() { fWriteOutputDeltaAOD = kFALSE ; }
89 Bool_t WriteDeltaAODToFile() const { return fWriteOutputDeltaAOD ; }
cfaba834 90
91 //------------------------------------------------------------
92 //Clusters/Tracks arrays filtering/filling methods and switchs
93 //------------------------------------------------------------
94
95 //Minimum pt setters and getters
3c75ddf7 96 Float_t GetEMCALPtMin() const { return fEMCALPtMin ; }
97 Float_t GetPHOSPtMin() const { return fPHOSPtMin ; }
98 Float_t GetCTSPtMin() const { return fCTSPtMin ; }
99 Float_t GetEMCALPtMax() const { return fEMCALPtMax ; }
100 Float_t GetPHOSPtMax() const { return fPHOSPtMax ; }
101 Float_t GetCTSPtMax() const { return fCTSPtMax ; }
a5fb4114 102
3c75ddf7 103 void SetEMCALPtMin(Float_t pt) { fEMCALPtMin = pt ; }
104 void SetPHOSPtMin (Float_t pt) { fPHOSPtMin = pt ; }
105 void SetCTSPtMin (Float_t pt) { fCTSPtMin = pt ; }
a5fb4114 106
3c75ddf7 107 void SetEMCALPtMax(Float_t pt) { fEMCALPtMax = pt ; }
108 void SetPHOSPtMax (Float_t pt) { fPHOSPtMax = pt ; }
109 void SetCTSPtMax (Float_t pt) { fCTSPtMax = pt ; }
a5fb4114 110
3c75ddf7 111 Float_t GetEMCALEMin() const { return GetEMCALPtMin() ; }
112 Float_t GetPHOSEMin() const { return GetPHOSPtMin() ; }
113 Float_t GetEMCALEMax() const { return GetEMCALPtMax() ; }
114 Float_t GetPHOSEMax() const { return GetPHOSPtMax() ; }
cfaba834 115
3c75ddf7 116 void SetEMCALEMin (Float_t e) { SetEMCALPtMin(e) ; }
117 void SetPHOSEMin (Float_t e) { SetPHOSPtMin (e) ; }
118 void SetEMCALEMax (Float_t e) { SetEMCALPtMax(e) ; }
119 void SetPHOSEMax (Float_t e) { SetPHOSPtMax (e) ; }
cfaba834 120
ff440946 121 //Time cut
122
975b29fa 123 Double_t GetTrackTimeCutMin() const { return fTrackTimeCutMin ; }
124 Double_t GetTrackTimeCutMax() const { return fTrackTimeCutMax ; }
125
126
127 void SetTrackTimeCut(Double_t a, Double_t b) { fTrackTimeCutMin = a ;
128 fTrackTimeCutMax = b ; } // ns
129
ff440946 130 Double_t GetEMCALTimeCutMin() const { return fEMCALTimeCutMin ; }
131 Double_t GetEMCALTimeCutMax() const { return fEMCALTimeCutMax ; }
d2655d46 132
3c1a2e95 133 Bool_t IsInTimeWindow(const Double_t tof, const Float_t energy) const ;
134
ff440946 135 void SetEMCALTimeCut(Double_t a, Double_t b) { fEMCALTimeCutMin = a ;
d2655d46 136 fEMCALTimeCutMax = b ; } // ns
ff440946 137
138 void SetEMCALParametrizedMinTimeCut(Int_t i, Float_t par) { fEMCALParamTimeCutMin[i] = par ; }
139 void SetEMCALParametrizedMaxTimeCut(Int_t i, Float_t par) { fEMCALParamTimeCutMax[i] = par ; }
140
141 void SwitchOnUseParametrizedTimeCut() { fUseParamTimeCut = kTRUE ; }
142 void SwitchOffUseParametrizedTimeCut() { fUseParamTimeCut = kFALSE ; }
143
cfaba834 144 // Fidutial cuts
a5fb4114 145 virtual AliFiducialCut * GetFiducialCut() {
146 if(!fFiducialCut) fFiducialCut = new AliFiducialCut();
3c75ddf7 147 return fFiducialCut ; }
148 virtual void SetFiducialCut(AliFiducialCut * const fc) { fFiducialCut = fc ; }
149 virtual Bool_t IsFiducialCutOn() const { return fCheckFidCut ; }
150 virtual void SwitchOnFiducialCut() { fCheckFidCut = kTRUE ;
151 fFiducialCut = new AliFiducialCut() ; }
152 virtual void SwitchOffFiducialCut() { fCheckFidCut = kFALSE ; }
1c5acb87 153
cfaba834 154 // Cluster origin
a5fb4114 155 Bool_t IsEMCALCluster(AliVCluster *clus) const;
156 Bool_t IsPHOSCluster (AliVCluster *clus) const;
cfaba834 157 //Patch for cluster origin for Old AODs implementation
3c75ddf7 158 void SwitchOnOldAODs() { fOldAOD = kTRUE ; }
159 void SwitchOffOldAODs() { fOldAOD = kFALSE ; }
f37fa8d2 160
cfaba834 161 // Cluster/track/cells switchs
3c75ddf7 162 Bool_t IsCTSSwitchedOn() const { return fFillCTS ; }
163 void SwitchOnCTS() { fFillCTS = kTRUE ; }
164 void SwitchOffCTS() { fFillCTS = kFALSE ; }
1c5acb87 165
3c75ddf7 166 Bool_t IsEMCALSwitchedOn() const { return fFillEMCAL ; }
167 void SwitchOnEMCAL() { fFillEMCAL = kTRUE ; }
168 void SwitchOffEMCAL() { fFillEMCAL = kFALSE ; }
1c5acb87 169
3c75ddf7 170 Bool_t IsPHOSSwitchedOn() const { return fFillPHOS ; }
171 void SwitchOnPHOS() { fFillPHOS = kTRUE ; }
172 void SwitchOffPHOS() { fFillPHOS = kFALSE ; }
1c5acb87 173
3c75ddf7 174 Bool_t IsEMCALCellsSwitchedOn() const { return fFillEMCALCells ; }
175 void SwitchOnEMCALCells() { fFillEMCALCells = kTRUE ; }
176 void SwitchOffEMCALCells() { fFillEMCALCells = kFALSE ; }
1c5acb87 177
3c75ddf7 178 Bool_t IsPHOSCellsSwitchedOn() const { return fFillPHOSCells ; }
179 void SwitchOnPHOSCells() { fFillPHOSCells = kTRUE ; }
180 void SwitchOffPHOSCells() { fFillPHOSCells = kFALSE ; }
1c5acb87 181
3bfc4732 182 Bool_t AreClustersRecalculated() const { return fRecalculateClusters ; }
183 void SwitchOnClusterRecalculation() { fRecalculateClusters = kTRUE ; }
184 void SwitchOffClusterRecalculation() { fRecalculateClusters = kFALSE ; }
185
3c75ddf7 186 Bool_t IsEmbeddedClusterSelectionOn() const { return fSelectEmbeddedClusters ; }
187 void SwitchOnEmbeddedClustersSelection() { fSelectEmbeddedClusters = kTRUE ; }
188 void SwitchOffEmbeddedClustersSelection() { fSelectEmbeddedClusters = kFALSE ; }
6060ed91 189
be518ab0 190 // Filling/ filtering / detector information access methods
a5fb4114 191 virtual Bool_t FillInputEvent(const Int_t iEntry, const char *currentFileName) ;
192 virtual void FillInputCTS() ;
193 virtual void FillInputEMCAL() ;
194 virtual void FillInputEMCALAlgorithm(AliVCluster * clus, const Int_t iclus) ;
195 virtual void FillInputPHOS() ;
196 virtual void FillInputEMCALCells() ;
197 virtual void FillInputPHOSCells() ;
198 virtual void FillInputVZERO() ;
199
21812953 200 Int_t GetV0Signal(Int_t i) const { return fV0ADC[i] ; }
201 Int_t GetV0Multiplicity(Int_t i) const { return fV0Mul[i] ; }
a5fb4114 202
21812953 203 void SetEMCALClusterListName(TString &name) { fEMCALClustersListName = name ; }
204 TString GetEMCALClusterListName() const { return fEMCALClustersListName ; }
cfaba834 205
be518ab0 206 // Arrayes with clusters/track/cells access method
21812953 207 virtual TObjArray* GetCTSTracks() const { return fCTSTracks ; }
208 virtual TObjArray* GetEMCALClusters() const { return fEMCALClusters ; }
209 virtual TObjArray* GetPHOSClusters() const { return fPHOSClusters ; }
210 virtual AliVCaloCells* GetEMCALCells() const { return fEMCALCells ; }
211 virtual AliVCaloCells* GetPHOSCells() const { return fPHOSCells ; }
cfaba834 212
213 //-------------------------------------
214 // Event/track selection methods
215 //-------------------------------------
216
cd2e4ce6 217 void AcceptFastClusterEvents() { fAcceptFastCluster = kTRUE ; }
218 void RejectFastClusterEvents() { fAcceptFastCluster = kFALSE ; }
c5693f62 219 Bool_t IsFastClusterAccepted() const { return fAcceptFastCluster ; }
cd2e4ce6 220
221 void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; }
222 void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; }
c5693f62 223 Bool_t IsLEDEventRemoved() const { return fRemoveLEDEvents ; }
cd2e4ce6 224
a5fb4114 225 void SetFiredTriggerClassName(TString name ) { fFiredTriggerClassName = name ; }
226 TString GetFiredTriggerClassName() const { return fFiredTriggerClassName ; }
43074325 227 TString GetFiredTriggerClasses() ;
cfaba834 228
21812953 229 UInt_t GetEventTriggerMask() const { return fEventTriggerMask ; }
029dea5a 230 void SetEventTriggerMaks(UInt_t evtTrig = AliVEvent::kAny)
231 { fEventTriggerMask = evtTrig ; }
790dea42 232
233 UInt_t GetMixEventTriggerMask() const { return fMixEventTriggerMask ; }
234 void SetMixEventTriggerMaks(UInt_t evtTrig = AliVEvent::kAnyINT)
235 { fMixEventTriggerMask = evtTrig ; }
236
029dea5a 237
21812953 238 Bool_t IsEventTriggerAtSEOn() const { return fEventTriggerAtSE ; }
239 void SwitchOnEventTriggerAtSE() { fEventTriggerAtSE = kTRUE ; }
240 void SwitchOffEventTriggerAtSE() { fEventTriggerAtSE = kFALSE ; }
029dea5a 241
cd2e4ce6 242 void SwitchOnEventSelection() { fDoEventSelection = kTRUE ; }
243 void SwitchOffEventSelection() { fDoEventSelection = kFALSE ; }
a5fb4114 244 Bool_t IsEventSelectionDone() const { return fDoEventSelection ; }
cfaba834 245
a5fb4114 246 void SwitchOnV0ANDSelection() { fDoV0ANDEventSelection = kTRUE ; }
247 void SwitchOffV0ANDSelection() { fDoV0ANDEventSelection = kFALSE ; }
248 Bool_t IsV0ANDEventSelectionDone() const { return fDoV0ANDEventSelection ; }
20218aea 249
a5fb4114 250 void SwitchOnPrimaryVertexSelection() { fUseEventsWithPrimaryVertex = kTRUE ; }
251 void SwitchOffPrimaryVertexSelection() { fUseEventsWithPrimaryVertex = kFALSE ; }
252 Bool_t IsPrimaryVertexSelectionDone() const { return fUseEventsWithPrimaryVertex ; }
20218aea 253
3c1a2e95 254 Bool_t IsPileUpFromSPD() const ;
255 Bool_t IsPileUpFromEMCal() const ;
256 Bool_t IsPileUpFromSPDAndEMCal() const ;
257 Bool_t IsPileUpFromSPDOrEMCal() const ;
258 Bool_t IsPileUpFromSPDAndNotEMCal() const ;
259 Bool_t IsPileUpFromEMCalAndNotSPD() const ;
260 Bool_t IsPileUpFromNotSPDAndNotEMCal() const ;
261
262 void SetPileUpParamForSPD (Int_t i, Double_t param)
f5500c7a 263 { fPileUpParamSPD[i] = param ; }
264 void SetPileUpParamForEMCal(Int_t param) { fNPileUpClustersCut = param ; }
4b75cb39 265
f5500c7a 266 Int_t GetNPileUpClusters() { return fNPileUpClusters ; }
267 Int_t GetNNonPileUpClusters() { return fNNonPileUpClusters ; }
975b29fa 268
269 Int_t GetEMCalEventBC(Int_t bc) const { if(bc >=0 && bc < 19) return fEMCalBCEvent [bc] ; else return 0 ; }
270 Int_t GetTrackEventBC(Int_t bc) const { if(bc >=0 && bc < 19) return fTrackBCEvent [bc] ; else return 0 ; }
271 Int_t GetEMCalEventBCcut(Int_t bc) const { if(bc >=0 && bc < 19) return fEMCalBCEventCut[bc] ; else return 0 ; }
272 Int_t GetTrackEventBCcut(Int_t bc) const { if(bc >=0 && bc < 19) return fTrackBCEventCut[bc] ; else return 0 ; }
273
274 void SetEMCalEventBC(Int_t bc) { if(bc >=0 && bc < 19) fEMCalBCEvent [bc] = 1 ; }
275 void SetTrackEventBC(Int_t bc) { if(bc >=0 && bc < 19) fTrackBCEvent [bc] = 1 ; }
276 void SetEMCalEventBCcut(Int_t bc) { if(bc >=0 && bc < 19) fEMCalBCEventCut[bc] = 1 ; }
277 void SetTrackEventBCcut(Int_t bc) { if(bc >=0 && bc < 19) fTrackBCEventCut[bc] = 1 ; }
3c1a2e95 278
975b29fa 279
3a58eee6 280 // Track selection
f5500c7a 281 ULong_t GetTrackStatus() const { return fTrackStatus ; }
282 void SetTrackStatus(ULong_t bit) { fTrackStatus = bit ; }
a5fb4114 283
f5500c7a 284 ULong_t GetTrackFilterMask() const {return fTrackFilterMask ; }
285 void SetTrackFilterMask(ULong_t bit) { fTrackFilterMask = bit ; }
3a58eee6 286
f5500c7a 287 AliESDtrackCuts* GetTrackCuts() const { return fESDtrackCuts ; }
c5693f62 288 void SetTrackCuts(AliESDtrackCuts * cuts) ;
21812953 289
f5500c7a 290 void SwitchOnConstrainTrackToVertex() { fConstrainTrack = kTRUE ; }
291 void SwitchOffConstrainTrackToVertex() { fConstrainTrack = kFALSE ; }
a9b8c1d0 292
21812953 293 void SwitchOnAODHybridTrackSelection() { fSelectHybridTracks = kTRUE ; }
294 void SwitchOffAODHybridTrackSelection() { fSelectHybridTracks = kFALSE ; }
c5693f62 295
f5500c7a 296 void SwitchOnTrackHitSPDSelection() { fSelectSPDHitTracks = kTRUE ; }
297 void SwitchOffTrackHitSPDSelection() { fSelectSPDHitTracks = kFALSE ; }
298
299 Int_t GetTrackMultiplicity() const { return fTrackMult ; }
300 Float_t GetTrackMultiplicityEtaCut() const { return fTrackMultEtaCut ; }
301 void SetTrackMultiplicityEtaCut(Float_t eta) { fTrackMultEtaCut = eta ; }
c8fe2783 302
a5fb4114 303 // Calorimeter specific and patches
f5500c7a 304 void AnalyzeOnlyLED() { fAnaLED = kTRUE ; }
305 void AnalyzeOnlyPhysics() { fAnaLED = kFALSE ; }
a5fb4114 306
f5500c7a 307 void SwitchOnCaloFilterPatch() { fCaloFilterPatch = kTRUE ;
308 fFillCTS = kFALSE ; }
309 void SwitchOffCaloFilterPatch() { fCaloFilterPatch = kFALSE ; }
a5fb4114 310 Bool_t IsCaloFilterPatchOn() const {
311 if(fDataType == kAOD) { return fCaloFilterPatch ; }
f5500c7a 312 else { return kFALSE ; } }
cfaba834 313
314 //-------------------------------
48c37e02 315 //Vertex methods
cfaba834 316 //-------------------------------
a5fb4114 317 virtual void GetVertex(Double_t v[3]) const ;
318 virtual Double_t* GetVertex(const Int_t evtIndex) const { return fVertex[evtIndex] ; }
319 virtual void GetVertex(Double_t vertex[3], const Int_t evtIndex) const ;
cfaba834 320 virtual void FillVertexArray();
321 virtual Bool_t CheckForPrimaryVertex();
a5fb4114 322 virtual Float_t GetZvertexCut() const { return fZvtxCut ; } //cut on vertex position
323 virtual void SetZvertexCut(Float_t zcut=10.) { fZvtxCut=zcut ; } //cut on vertex position
0b13c1f9 324
05d0d05d 325 //--------------------------
72542aba 326 // Centrality / Event Plane
05d0d05d 327 //--------------------------
ee893147 328 virtual AliCentrality* GetCentrality() const { if(fDataType!=kMC) return fInputEvent->GetCentrality() ;
329 else return 0x0 ; }
a5fb4114 330 virtual void SetCentralityClass(TString name) { fCentralityClass = name ; }
331 virtual void SetCentralityOpt(Int_t opt) { fCentralityOpt = opt ; }
332 virtual TString GetCentralityClass() const { return fCentralityClass ; }
333 virtual Int_t GetCentralityOpt() const { return fCentralityOpt ; }
334 virtual Int_t GetEventCentrality() const ;
335 virtual void SetCentralityBin(Int_t min, Int_t max) //Set the centrality bin to select the event. If used, then need to get percentile
336 { fCentralityBin[0]=min; fCentralityBin[1]=max;
337 if(min>=0 && max > 0) fCentralityOpt = 100 ; }
338 virtual Float_t GetCentralityBin(Int_t i) const { if(i < 0 || i > 1) return 0 ;
339 else return fCentralityBin[i] ; }
340
ee893147 341 virtual AliEventplane* GetEventPlane() const { if(fDataType!=kMC) return fInputEvent->GetEventplane() ;
342 else return 0x0 ; }
9929c80b 343 virtual Double_t GetEventPlaneAngle() const ;
3c75ddf7 344 virtual void SetEventPlaneMethod(TString m) { fEventPlaneMethod = m ; }
345 virtual TString GetEventPlaneMethod() const { return fEventPlaneMethod ; }
72542aba 346
39364a52 347 //--------------------
348 // Mixing
349 //--------------------
350
d783becb 351 Int_t GetLastCaloMixedEvent() const { return fLastMixedCaloEvent ; }
39364a52 352 Int_t GetLastTracksMixedEvent () const { return fLastMixedTracksEvent ; }
353
50551817 354 TList * GetListWithMixedEventsForCalo (Int_t bi) const { if(fListMixedCaloEvents) return fListMixedCaloEvents[bi] ; else return 0 ; }
355 TList * GetListWithMixedEventsForTracks(Int_t bi) const { if(fListMixedTracksEvents) return fListMixedTracksEvents [bi] ; else return 0 ; }
39364a52 356
d783becb 357 Bool_t ListWithMixedEventsForCaloExists() const { if(fListMixedCaloEvents) return kTRUE ;
358 else return kFALSE ; }
39364a52 359
d783becb 360 Bool_t ListWithMixedEventsForTracksExists() const { if(fListMixedTracksEvents) return kTRUE ;
361 else return kFALSE ; }
39364a52 362
d783becb 363 void SetLastCaloMixedEvent (Int_t e) { fLastMixedCaloEvent = e ; }
364 void SetLastTracksMixedEvent(Int_t e) { fLastMixedTracksEvent = e ; }
39364a52 365
d783becb 366 void SetListWithMixedEventsForCalo (TList ** l) {
367 if(fListMixedCaloEvents) printf("AliCaloTrackReader::SetListWithMixedEventsForCalo() - Track Mixing event list already set, nothing done\n");
368 else fListMixedCaloEvents = l ; }
39364a52 369
d783becb 370 void SetListWithMixedEventsForTracks(TList ** l) {
371 if(fListMixedTracksEvents) printf("AliCaloTrackReader::SetListWithMixedEventsForTracks() - Calorimeter Mixing event list already set, nothing done\n");
39364a52 372 else fListMixedTracksEvents = l ; }
373
cfaba834 374 //-------------------------------------
375 // Other methods
376 //-------------------------------------
3c75ddf7 377 AliCalorimeterUtils * GetCaloUtils() const { return fCaloUtils ; }
378 void SetCaloUtils(AliCalorimeterUtils * caloutils) { fCaloUtils = caloutils ; }
48c37e02 379
a5fb4114 380 virtual Double_t GetBField() const { return fInputEvent->GetMagneticField() ; }
cfaba834 381
de0b770d 382 void SetImportGeometryFromFile(Bool_t import,
55d66f31 383 TString path = "") {
de0b770d 384 fImportGeometryFromFile = import ;
385 fImportGeometryFilePath = path ; }
386
cfaba834 387 //------------------------------------------------
388 // MC analysis specific methods
389 //-------------------------------------------------
390
391 //Kinematics and galice.root available
a5fb4114 392 virtual AliStack* GetStack() const ;
393 virtual AliHeader* GetHeader() const ;
394 virtual AliGenEventHeader* GetGenEventHeader() const ;
cfaba834 395
396 //Filtered kinematics in AOD
397 virtual TClonesArray* GetAODMCParticles(Int_t input = 0) const ;
a20fbb55 398 virtual AliAODMCHeader* GetAODMCHeader() const ;
cfaba834 399
3c75ddf7 400 virtual AliVEvent* GetInputEvent() const { return fInputEvent ; }
401 virtual AliVEvent* GetOriginalInputEvent() const { return 0x0 ; }
402 virtual AliAODEvent* GetOutputEvent() const { return fOutputEvent ; }
403 virtual AliMCEvent* GetMC() const { return fMC ; }
404 virtual AliMixedEvent* GetMixedEvent() const { return fMixedEvent ; }
405 virtual Int_t GetNMixedEvent() const { return fNMixedEvent ; }
a5fb4114 406
3c75ddf7 407 void SwitchOnStack() { fReadStack = kTRUE ; }
408 void SwitchOffStack() { fReadStack = kFALSE ; }
409 void SwitchOnAODMCParticles() { fReadAODMCParticles = kTRUE ; }
410 void SwitchOffAODMCParticles() { fReadAODMCParticles = kFALSE ; }
411 Bool_t ReadStack() const { return fReadStack ; }
412 Bool_t ReadAODMCParticles() const { return fReadAODMCParticles ; }
cfaba834 413
414 //Select generated events, depending on comparison of pT hard and jets.
a5fb4114 415 virtual Bool_t ComparePtHardAndJetPt() ;
416 virtual Bool_t IsPtHardAndJetPtComparisonSet() const { return fComparePtHardAndJetPt ; }
417 virtual void SetPtHardAndJetPtComparison(Bool_t compare) { fComparePtHardAndJetPt = compare ; }
418 virtual Float_t GetPtHardAndJetFactor() const { return fPtHardAndJetPtFactor ; }
419 virtual void SetPtHardAndJetPtFactor(Float_t factor) { fPtHardAndJetPtFactor = factor ; }
eb3e2665 420
dbb3de7b 421 virtual Bool_t ComparePtHardAndClusterPt() ;
422 virtual Bool_t IsPtHardAndClusterPtComparisonSet() const { return fComparePtHardAndClusterPt ; }
423 virtual void SetPtHardAndClusterPtComparison(Bool_t compare) { fComparePtHardAndClusterPt = compare ; }
424 virtual Float_t GetPtHardAndClusterFactor() const { return fPtHardAndClusterPtFactor ; }
425 virtual void SetPtHardAndClusterPtFactor(Float_t factor) { fPtHardAndClusterPtFactor = factor ; }
426
427
cfaba834 428 //MC reader methods, declared there to allow compilation, they are only used in the MC reader:
0ae57829 429
a5fb4114 430 virtual void AddNeutralParticlesArray(TArrayI & /*array*/) { ; }
431 virtual void AddChargedParticlesArray(TArrayI & /*array*/) { ; }
432 virtual void AddStatusArray(TArrayI & /*array*/) { ; }
433
434 virtual void SwitchOnPi0Decay() { ; }
435 virtual void SwitchOffPi0Decay() { ; }
436 virtual void SwitchOnStatusSelection() { ; }
437 virtual void SwitchOffStatusSelection() { ; }
438 virtual void SwitchOnOverlapCheck() { ; }
439 virtual void SwitchOffOverlapCheck() { ; }
440 virtual void SwitchOnOnlyGeneratorParticles() { ; }
441 virtual void SwitchOffOnlyGeneratorParticles() { ; }
be518ab0 442
a5fb4114 443 virtual void SetEMCALOverlapAngle(Float_t /*angle*/) { ; }
444 virtual void SetPHOSOverlapAngle(Float_t /*angle*/) { ; }
af7b3903 445
0ae57829 446
1c5acb87 447 protected:
21812953 448 Int_t fEventNumber; // Event number
449 Int_t fDataType ; // Select MC:Kinematics, Data:ESD/AOD, MCData:Both
450 Int_t fDebug; // Debugging level
451 AliFiducialCut * fFiducialCut; //! Acceptance cuts
452 Bool_t fCheckFidCut ; // Do analysis for clusters in defined region
decca433 453
591cc579 454 Bool_t fComparePtHardAndJetPt; // In MonteCarlo, jet events, reject fake events with wrong jet energy.
455 Float_t fPtHardAndJetPtFactor; // Factor between ptHard and jet pT to reject/accept event.
456
dbb3de7b 457 Bool_t fComparePtHardAndClusterPt; // In MonteCarlo, jet events, reject events with too large cluster energy
458 Float_t fPtHardAndClusterPtFactor; // Factor between ptHard and cluster pT to reject/accept event.
459
21812953 460 Float_t fCTSPtMin; // pT Threshold on charged particles
461 Float_t fEMCALPtMin; // pT Threshold on emcal clusters
462 Float_t fPHOSPtMin; // pT Threshold on phos clusters
463 Float_t fCTSPtMax; // pT Threshold on charged particles
464 Float_t fEMCALPtMax; // pT Threshold on emcal clusters
465 Float_t fPHOSPtMax; // pT Threshold on phos clusters
466 Double_t fEMCALTimeCutMin; // Remove clusters/cells with time smaller than this value, in ns
467 Double_t fEMCALTimeCutMax; // Remove clusters/cells with time larger than this value, in ns
ff440946 468 Float_t fEMCALParamTimeCutMin[4];// Remove clusters/cells with time smaller than parametrized value, in ns
469 Double_t fEMCALParamTimeCutMax[4];// Remove clusters/cells with time larger than parametrized value, in ns
470 Bool_t fUseParamTimeCut; // Use simple or parametrized time cut
975b29fa 471 Double_t fTrackTimeCutMin; // Remove tracks with time smaller than this value, in ns
472 Double_t fTrackTimeCutMax; // Remove tracks with time larger than this value, in ns
ff440946 473
975b29fa 474 TList * fAODBranchList ; //-> List with AOD branches created and needed in analysis
21812953 475 TObjArray * fCTSTracks ; //-> temporal array with tracks
476 TObjArray * fEMCALClusters ; //-> temporal array with EMCAL CaloClusters
477 TObjArray * fPHOSClusters ; //-> temporal array with PHOS CaloClusters
478 AliVCaloCells * fEMCALCells ; //! temporal array with EMCAL CaloCells
479 AliVCaloCells * fPHOSCells ; //! temporal array with PHOS CaloCells
480
481 AliVEvent * fInputEvent; //! pointer to esd or aod input
482 AliAODEvent * fOutputEvent; //! pointer to aod output
483 AliMCEvent * fMC; //! Monte Carlo Event Handler
484
485 Bool_t fFillCTS; // use data from CTS
486 Bool_t fFillEMCAL; // use data from EMCAL
487 Bool_t fFillPHOS; // use data from PHOS
488 Bool_t fFillEMCALCells; // use data from EMCAL
489 Bool_t fFillPHOSCells; // use data from PHOS
3bfc4732 490 Bool_t fRecalculateClusters; // Correct clusters, recalculate them if recalibration parameters is given
491 Bool_t fSelectEmbeddedClusters; // Use only simulated clusters that come from embedding.
48c37e02 492
21812953 493 ULong_t fTrackStatus ; // Track selection bit, select tracks refitted in TPC, ITS ...
494 ULong_t fTrackFilterMask ; // Track selection bit, for AODs (any difference with track status?)
495 AliESDtrackCuts *fESDtrackCuts ; // Track cut
a9b8c1d0 496 Bool_t fConstrainTrack ; // Constrain Track to vertex
21812953 497 Bool_t fSelectHybridTracks ; // Select CTS tracks of type hybrid (only for AODs)
f5500c7a 498 Bool_t fSelectSPDHitTracks ; // Ensure that track hits SPD layers
21812953 499 Int_t fTrackMult ; // Track multiplicity
500 Float_t fTrackMultEtaCut ; // Track multiplicity eta cut
501 Bool_t fReadStack ; // Access kine information from stack
502 Bool_t fReadAODMCParticles ; // Access kine information from filtered AOD MC particles
591cc579 503
21812953 504 TString fDeltaAODFileName ; // Delta AOD file name
505 TString fFiredTriggerClassName; // Name of trigger event type used to do the analysis
afabc52f 506
21812953 507 UInt_t fEventTriggerMask ; // select this triggerered event
790dea42 508 UInt_t fMixEventTriggerMask ; // select this triggerered event for mixing, tipically kMB or kAnyINT
21812953 509 Bool_t fEventTriggerAtSE; // select triggered event at SE base task or here
029dea5a 510
21812953 511 Bool_t fAnaLED; // Analyze LED data only.
c1ac3823 512
21812953 513 TString fTaskName; // Name of task that executes the analysis
765d44e7 514
21812953 515 AliCalorimeterUtils * fCaloUtils ; // Pointer to CalorimeterUtils
c8fe2783 516
21812953 517 AliMixedEvent * fMixedEvent ; //! mixed event object. This class is not the owner
518 Int_t fNMixedEvent ; // number of events in mixed event buffer
519 Double_t ** fVertex ; //! vertex array 3 dim for each mixed event buffer
c8fe2783 520
39364a52 521 TList ** fListMixedTracksEvents ; //! Container for tracks stored for different events, used in case of own mixing, set in analysis class
d783becb 522 TList ** fListMixedCaloEvents; //! Container for photon stored for different events, used in case of own mixing, set in analysis class
39364a52 523 Int_t fLastMixedTracksEvent ; // Temporary container with the last event added to the mixing list for tracks
d783becb 524 Int_t fLastMixedCaloEvent ; // Temporary container with the last event added to the mixing list for photons
39364a52 525
21812953 526 Bool_t fWriteOutputDeltaAOD; // Write the created delta AOD objects into file
527 Bool_t fOldAOD; // Old AODs, before revision 4.20
f37fa8d2 528
21812953 529 Int_t fV0ADC[2] ; // Integrated V0 signal
530 Int_t fV0Mul[2] ; // Integrated V0 Multiplicity
798a9b04 531
21812953 532 Bool_t fCaloFilterPatch; // CaloFilter patch
533 TString fEMCALClustersListName; // Alternative list of clusters produced elsewhere and not from InputEvent
cd2e4ce6 534
535 // Event selection
536 Float_t fZvtxCut ; // Cut on vertex position
537 Bool_t fAcceptFastCluster; // Accept events from fast cluster, exclude these events for LHC11a
538 Bool_t fRemoveLEDEvents; // Remove events where LED was wrongly firing - EMCAL LHC11a
20218aea 539 Bool_t fDoEventSelection; // Select events depending on V0, pileup, vertex well reconstructed, at least 1 track ...
540 Bool_t fDoV0ANDEventSelection; // Select events depending on V0, fDoEventSelection should be on
541 Bool_t fUseEventsWithPrimaryVertex ; // Select events with primary vertex
542 AliTriggerAnalysis* fTriggerAnalysis; // Access to trigger selection algorithm for V0AND calculation
3c1a2e95 543 Double_t fPileUpParamSPD[5]; // Parameters to pass to method IsPileupFromSPD: Int_t minContributors,
4b75cb39 544 // Double_t minZdist,
545 // Double_t nSigmaZdist,
546 // Double_t nSigmaDiamXY,
547 // Double_t nSigmaDiamZ)
3c1a2e95 548 // Pile-up in EMCal
549 Int_t fNPileUpClusters; // Number of clusters with time avobe 20 ns
550 Int_t fNNonPileUpClusters; // Number of clusters with time below 20 ns
551 Int_t fNPileUpClustersCut; // Cut to select event as pile-up
975b29fa 552 Int_t fEMCalBCEvent[19]; // Fill one entry per event if there is a cluster in a given BC
553 Int_t fEMCalBCEventCut[19]; // Fill one entry per event if there is a cluster in a given BC, depend on cluster E, acceptance cut
554 Int_t fTrackBCEvent[19]; // Fill one entry per event if there is a track in a given BC
555 Int_t fTrackBCEventCut[19]; // Fill one entry per event if there is a track in a given BC, depend on track pT, acceptance cut
3c1a2e95 556
72542aba 557 //Centrality/Event plane
21812953 558 TString fCentralityClass; // Name of selected centrality class
559 Int_t fCentralityOpt; // Option for the returned value of the centrality, possible options 5, 10, 100
560 Int_t fCentralityBin[2]; // Minimum and maximum value of the centrality for the analysis
561 TString fEventPlaneMethod; // Name of event plane method, by default "Q"
32fd29fe 562
de0b770d 563 Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file
564 TString fImportGeometryFilePath; // path fo geometry.root file
565
3c1a2e95 566
0de1814a 567 AliCaloTrackReader( const AliCaloTrackReader & r) ; // cpy ctor
568 AliCaloTrackReader & operator = (const AliCaloTrackReader & r) ; // cpy assignment
f3138ecf 569
f5500c7a 570 ClassDef(AliCaloTrackReader,47)
f3138ecf 571
1c5acb87 572} ;
573
574
575#endif //ALICALOTRACKREADER_H
576
577
578