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 */
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.
10 // Mother class of : AliCaloTrackESDReader: Fills ESD data in 3 TObjArrays (PHOS, EMCAL, CTS)
11 // : AliCaloTrackMCReader : Fills Kinematics data in 3 TObjArrays (PHOS, EMCAL, CTS)
12 // : AliCaloTrackAODReader: Fills AOD data in 3 TObjArrays (PHOS, EMCAL, CTS)
13 // -- Author: Gustavo Conesa (INFN-LNF)
14 //////////////////////////////////////////////////////////////////////////////
16 // --- ROOT system ---
23 //--- ANALYSIS system ---
24 #include "AliVEvent.h"
28 class AliGenEventHeader;
33 class AliESDtrackCuts;
35 class AliTriggerAnalysis;
39 // --- CaloTrackCorr / EMCAL ---
40 #include "AliFiducialCut.h"
41 class AliEMCALRecoUtils;
42 class AliCalorimeterUtils;
44 class AliCaloTrackReader : public TObject {
48 AliCaloTrackReader() ; // ctor
49 virtual ~AliCaloTrackReader() ; // virtual dtor
51 //--------------------------------
53 //--------------------------------
57 virtual void InitParameters();
59 virtual void Print(const Option_t * opt) const;
61 virtual void ResetLists();
63 virtual Int_t GetDebug() const { return fDebug ; }
64 virtual void SetDebug(Int_t d) { fDebug = d ; }
66 enum inputDataType {kESD, kAOD, kMC};
67 virtual Int_t GetDataType() const { return fDataType ; }
68 virtual void SetDataType(Int_t data ) { fDataType = data ; }
70 virtual Int_t GetEventNumber() const { return fEventNumber ; }
72 TString GetTaskName() const { return fTaskName ; }
73 void SetTaskName(TString name) { fTaskName = name ; }
75 //---------------------------------------
76 //Input/output event setters and getters
77 //---------------------------------------
78 virtual void SetInputEvent(AliVEvent* const input) ;
79 virtual void SetOutputEvent(AliAODEvent* const aod) { fOutputEvent = aod ; }
80 virtual void SetMC(AliMCEvent* const mc) { fMC = mc ; }
81 virtual void SetInputOutputMCEvent(AliVEvent* /*esd*/, AliAODEvent* /*aod*/, AliMCEvent* /*mc*/) { ; }
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 ; }
91 //------------------------------------------------------------
92 //Clusters/Tracks arrays filtering/filling methods and switchs
93 //------------------------------------------------------------
95 //Minimum pt setters and getters
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 ; }
103 void SetEMCALPtMin(Float_t pt) { fEMCALPtMin = pt ; }
104 void SetPHOSPtMin (Float_t pt) { fPHOSPtMin = pt ; }
105 void SetCTSPtMin (Float_t pt) { fCTSPtMin = pt ; }
107 void SetEMCALPtMax(Float_t pt) { fEMCALPtMax = pt ; }
108 void SetPHOSPtMax (Float_t pt) { fPHOSPtMax = pt ; }
109 void SetCTSPtMax (Float_t pt) { fCTSPtMax = pt ; }
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() ; }
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) ; }
122 Bool_t AcceptDCA(const Float_t pt, const Float_t dca);
123 Double_t GetTrackDCACut(Int_t i) const { if(i >= 0 && i < 3 ) return fTrackDCACut[i] ;
126 void SetTrackDCACut(Int_t i, Float_t cut) { if(i >= 0 && i < 3 )
127 fTrackDCACut[i] = cut ; }
129 void SwitchOnUseTrackDCACut() { fUseTrackDCACut = kTRUE ; }
130 void SwitchOffUseTrackDCACut() { fUseTrackDCACut = kFALSE ; }
131 Bool_t IsDCACutOn() const { return fUseTrackDCACut ; }
135 Double_t GetTrackTimeCutMin() const { return fTrackTimeCutMin ; }
136 Double_t GetTrackTimeCutMax() const { return fTrackTimeCutMax ; }
138 void SetTrackTimeCut(Double_t a, Double_t b) { fTrackTimeCutMin = a ;
139 fTrackTimeCutMax = b ; } // ns
141 void SwitchOnUseTrackTimeCut() { fUseTrackTimeCut = kTRUE ; }
142 void SwitchOffUseTrackTimeCut() { fUseTrackTimeCut = kFALSE ; }
144 Double_t GetEMCALTimeCutMin() const { return fEMCALTimeCutMin ; }
145 Double_t GetEMCALTimeCutMax() const { return fEMCALTimeCutMax ; }
147 Bool_t IsInTimeWindow(const Double_t tof, const Float_t energy) const ;
149 void SetEMCALTimeCut(Double_t a, Double_t b) { fEMCALTimeCutMin = a ;
150 fEMCALTimeCutMax = b ; } // ns
152 void SetEMCALParametrizedMinTimeCut(Int_t i, Float_t par) { fEMCALParamTimeCutMin[i] = par ; }
153 void SetEMCALParametrizedMaxTimeCut(Int_t i, Float_t par) { fEMCALParamTimeCutMax[i] = par ; }
155 void SwitchOnUseEMCALTimeCut() { fUseEMCALTimeCut = kTRUE ; }
156 void SwitchOffUseEMCALTimeCut() { fUseEMCALTimeCut = kFALSE ; }
158 void SwitchOnUseParametrizedTimeCut() { fUseParamTimeCut = kTRUE ; }
159 void SwitchOffUseParametrizedTimeCut() { fUseParamTimeCut = kFALSE ; }
162 virtual AliFiducialCut * GetFiducialCut() {
163 if(!fFiducialCut) fFiducialCut = new AliFiducialCut();
164 return fFiducialCut ; }
165 virtual void SetFiducialCut(AliFiducialCut * const fc) { fFiducialCut = fc ; }
166 virtual Bool_t IsFiducialCutOn() const { return fCheckFidCut ; }
167 virtual void SwitchOnFiducialCut() { fCheckFidCut = kTRUE ;
168 fFiducialCut = new AliFiducialCut() ; }
169 virtual void SwitchOffFiducialCut() { fCheckFidCut = kFALSE ; }
172 Bool_t IsEMCALCluster(AliVCluster *clus) const;
173 Bool_t IsPHOSCluster (AliVCluster *clus) const;
174 //Patch for cluster origin for Old AODs implementation
175 void SwitchOnOldAODs() { fOldAOD = kTRUE ; }
176 void SwitchOffOldAODs() { fOldAOD = kFALSE ; }
178 // Cluster/track/cells switchs
179 Bool_t IsCTSSwitchedOn() const { return fFillCTS ; }
180 void SwitchOnCTS() { fFillCTS = kTRUE ; }
181 void SwitchOffCTS() { fFillCTS = kFALSE ; }
183 Bool_t IsEMCALSwitchedOn() const { return fFillEMCAL ; }
184 void SwitchOnEMCAL() { fFillEMCAL = kTRUE ; }
185 void SwitchOffEMCAL() { fFillEMCAL = kFALSE ; }
187 Bool_t IsPHOSSwitchedOn() const { return fFillPHOS ; }
188 void SwitchOnPHOS() { fFillPHOS = kTRUE ; }
189 void SwitchOffPHOS() { fFillPHOS = kFALSE ; }
191 Bool_t IsEMCALCellsSwitchedOn() const { return fFillEMCALCells ; }
192 void SwitchOnEMCALCells() { fFillEMCALCells = kTRUE ; }
193 void SwitchOffEMCALCells() { fFillEMCALCells = kFALSE ; }
195 Bool_t IsPHOSCellsSwitchedOn() const { return fFillPHOSCells ; }
196 void SwitchOnPHOSCells() { fFillPHOSCells = kTRUE ; }
197 void SwitchOffPHOSCells() { fFillPHOSCells = kFALSE ; }
199 Bool_t AreClustersRecalculated() const { return fRecalculateClusters ; }
200 void SwitchOnClusterRecalculation() { fRecalculateClusters = kTRUE ; }
201 void SwitchOffClusterRecalculation() { fRecalculateClusters = kFALSE ; }
203 Bool_t IsEmbeddedClusterSelectionOn() const { return fSelectEmbeddedClusters ; }
204 void SwitchOnEmbeddedClustersSelection() { fSelectEmbeddedClusters = kTRUE ; }
205 void SwitchOffEmbeddedClustersSelection() { fSelectEmbeddedClusters = kFALSE ; }
207 // Filling/ filtering / detector information access methods
208 virtual Bool_t FillInputEvent(const Int_t iEntry, const char *currentFileName) ;
209 virtual void FillInputCTS() ;
210 virtual void FillInputEMCAL() ;
211 virtual void FillInputEMCALAlgorithm(AliVCluster * clus, const Int_t iclus) ;
212 virtual void FillInputPHOS() ;
213 virtual void FillInputEMCALCells() ;
214 virtual void FillInputPHOSCells() ;
215 virtual void FillInputVZERO() ;
217 Int_t GetV0Signal(Int_t i) const { return fV0ADC[i] ; }
218 Int_t GetV0Multiplicity(Int_t i) const { return fV0Mul[i] ; }
220 void SetEMCALClusterListName(TString &name) { fEMCALClustersListName = name ; }
221 TString GetEMCALClusterListName() const { return fEMCALClustersListName ; }
223 // Arrayes with clusters/track/cells access method
224 virtual TObjArray* GetCTSTracks() const { return fCTSTracks ; }
225 virtual TObjArray* GetEMCALClusters() const { return fEMCALClusters ; }
226 virtual TObjArray* GetPHOSClusters() const { return fPHOSClusters ; }
227 virtual AliVCaloCells* GetEMCALCells() const { return fEMCALCells ; }
228 virtual AliVCaloCells* GetPHOSCells() const { return fPHOSCells ; }
230 //-------------------------------------
231 // Event/track selection methods
232 //-------------------------------------
234 void AcceptFastClusterEvents() { fAcceptFastCluster = kTRUE ; }
235 void RejectFastClusterEvents() { fAcceptFastCluster = kFALSE ; }
236 Bool_t IsFastClusterAccepted() const { return fAcceptFastCluster ; }
238 void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; }
239 void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; }
240 Bool_t IsLEDEventRemoved() const { return fRemoveLEDEvents ; }
241 Bool_t RejectLEDEvents();
243 void SetFiredTriggerClassName(TString name ) { fFiredTriggerClassName = name ; }
244 TString GetFiredTriggerClassName() const { return fFiredTriggerClassName ; }
245 TString GetFiredTriggerClasses() ;
247 UInt_t GetEventTriggerMask() const { return fEventTriggerMask ; }
248 void SetEventTriggerMaks(UInt_t evtTrig = AliVEvent::kAny)
249 { fEventTriggerMask = evtTrig ; }
251 void RejectExoticEvents();
252 Bool_t IsExoticEvent() { return fIsExoticEvent ; }
253 void SwitchOnExoticEventsRemoval(Bool_t all = kFALSE)
254 { fRemoveExoticEvents = kTRUE ;
255 fForceExoticRejection = all ; }
256 void SwitchOffExoticEventsRemoval() { fRemoveExoticEvents = kFALSE ; }
257 void SetExoticEventTrigger(Float_t tr) { fExoticTrigger = tr ; }
259 void SwitchOffExoticEventsFromTriggerPatch() { fTriggerPatchExoticRejection = kFALSE ; }
260 void SwitchOnExoticEventsFromTriggerPatch() { fTriggerPatchExoticRejection = kTRUE ; }
262 void SetTriggerPatchTimeWindow(Int_t min, Int_t max) { fTriggerPatchTimeWindow[0] = min ;
263 fTriggerPatchTimeWindow[1] = max ; }
265 UInt_t GetMixEventTriggerMask() const { return fMixEventTriggerMask ; }
266 void SetMixEventTriggerMaks(UInt_t evtTrig = AliVEvent::kAnyINT)
267 { fMixEventTriggerMask = evtTrig ; }
270 Bool_t IsEventTriggerAtSEOn() const { return fEventTriggerAtSE ; }
271 void SwitchOnEventTriggerAtSE() { fEventTriggerAtSE = kTRUE ; }
272 void SwitchOffEventTriggerAtSE() { fEventTriggerAtSE = kFALSE ; }
274 void SwitchOnEventSelection() { fDoEventSelection = kTRUE ; }
275 void SwitchOffEventSelection() { fDoEventSelection = kFALSE ; }
276 Bool_t IsEventSelectionDone() const { return fDoEventSelection ; }
278 void SwitchOnV0ANDSelection() { fDoV0ANDEventSelection = kTRUE ; }
279 void SwitchOffV0ANDSelection() { fDoV0ANDEventSelection = kFALSE ; }
280 Bool_t IsV0ANDEventSelectionDone() const { return fDoV0ANDEventSelection ; }
282 void SwitchOnVertexBCEventSelection() { fDoVertexBCEventSelection = kTRUE ; }
283 void SwitchOffVertexBCEventSelection() { fDoVertexBCEventSelection = kFALSE ; }
284 Bool_t IsVertexBCEventSelectionDone() const { return fDoVertexBCEventSelection ; }
286 void SwitchOnPrimaryVertexSelection() { fUseEventsWithPrimaryVertex = kTRUE ; }
287 void SwitchOffPrimaryVertexSelection() { fUseEventsWithPrimaryVertex = kFALSE ; }
288 Bool_t IsPrimaryVertexSelectionDone() const { return fUseEventsWithPrimaryVertex ; }
290 void SwitchOnRejectNoTrackEvents() { fDoRejectNoTrackEvents = kTRUE ; }
291 void SwitchOffRejectNoTrackEvents() { fDoRejectNoTrackEvents = kFALSE ; }
292 Bool_t IsEventWithNoTrackRejectionDone() const { return fDoRejectNoTrackEvents ; }
296 Double_t GetRunTimeStampMin() const { return fTimeStampRunMin ; }
297 Double_t GetRunTimeStampMax() const { return fTimeStampRunMax ; }
299 void SetRunTimeStamp(Double_t a, Double_t b) { fTimeStampRunMin = a ;
300 fTimeStampRunMax = b ; } // seconds
302 Float_t GetEventTimeStampFractionMin() const { return fTimeStampEventFracMin ; }
303 Float_t GetEventTimeStampFractionMax() const { return fTimeStampEventFracMax ; }
305 void SetEventTimeStampFraction(Float_t a, Float_t b) { fTimeStampEventFracMin = a ;
306 fTimeStampEventFracMax = b ; }
308 void SwitchOnSelectEventTimeStamp() { fTimeStampEventSelect = kTRUE ; }
309 void SwitchOffSelectEventTimeStamp() { fTimeStampEventSelect = kFALSE ; }
311 Bool_t IsSelectEventTimeStampOn() {return fTimeStampEventSelect ; }
313 Bool_t IsPileUpFromSPD() const ;
314 Bool_t IsPileUpFromEMCal() const ;
315 Bool_t IsPileUpFromSPDAndEMCal() const ;
316 Bool_t IsPileUpFromSPDOrEMCal() const ;
317 Bool_t IsPileUpFromSPDAndNotEMCal() const ;
318 Bool_t IsPileUpFromEMCalAndNotSPD() const ;
319 Bool_t IsPileUpFromNotSPDAndNotEMCal() const ;
321 void SetPileUpParamForSPD (Int_t i, Double_t param)
322 { fPileUpParamSPD[i] = param ; }
323 void SetPileUpParamForEMCal(Int_t param) { fNPileUpClustersCut = param ; }
325 Int_t GetNPileUpClusters() { return fNPileUpClusters ; }
326 Int_t GetNNonPileUpClusters() { return fNNonPileUpClusters ; }
328 Int_t GetEMCalEventBC(Int_t bc) const { if(bc >=0 && bc < 19) return fEMCalBCEvent [bc] ; else return 0 ; }
329 Int_t GetTrackEventBC(Int_t bc) const { if(bc >=0 && bc < 19) return fTrackBCEvent [bc] ; else return 0 ; }
330 Int_t GetEMCalEventBCcut(Int_t bc) const { if(bc >=0 && bc < 19) return fEMCalBCEventCut[bc] ; else return 0 ; }
331 Int_t GetTrackEventBCcut(Int_t bc) const { if(bc >=0 && bc < 19) return fTrackBCEventCut[bc] ; else return 0 ; }
333 void SetEMCalEventBC(Int_t bc) { if(bc >=0 && bc < 19) fEMCalBCEvent [bc] = 1 ; }
334 void SetTrackEventBC(Int_t bc) { if(bc >=0 && bc < 19) fTrackBCEvent [bc] = 1 ; }
335 void SetEMCalEventBCcut(Int_t bc) { if(bc >=0 && bc < 19) fEMCalBCEventCut[bc] = 1 ; }
336 void SetTrackEventBCcut(Int_t bc) { if(bc >=0 && bc < 19) fTrackBCEventCut[bc] = 1 ; }
338 Int_t GetVertexBC(const AliVVertex * vtx);
339 Int_t GetVertexBC() const { return fVertexBC ; }
340 void SwitchOnRecalculateVertexBC() { fRecalculateVertexBC = kTRUE ; }
341 void SwitchOffRecalculateVertexBC() { fRecalculateVertexBC = kFALSE ; }
344 ULong_t GetTrackStatus() const { return fTrackStatus ; }
345 void SetTrackStatus(ULong_t bit) { fTrackStatus = bit ; }
347 ULong_t GetTrackFilterMask() const {return fTrackFilterMask ; }
348 void SetTrackFilterMask(ULong_t bit) { fTrackFilterMask = bit ; }
350 AliESDtrackCuts* GetTrackCuts() const { return fESDtrackCuts ; }
351 void SetTrackCuts(AliESDtrackCuts * cuts) ;
353 AliESDtrackCuts* GetTrackComplementaryCuts() const { return fESDtrackComplementaryCuts ; }
354 void SetTrackComplementaryCuts(AliESDtrackCuts * cuts) ;
357 void SwitchOnConstrainTrackToVertex() { fConstrainTrack = kTRUE ; }
358 void SwitchOffConstrainTrackToVertex() { fConstrainTrack = kFALSE ; }
360 void SwitchOnAODHybridTrackSelection() { fSelectHybridTracks = kTRUE ; }
361 void SwitchOffAODHybridTrackSelection() { fSelectHybridTracks = kFALSE ; }
363 void SwitchOnTrackHitSPDSelection() { fSelectSPDHitTracks = kTRUE ; }
364 void SwitchOffTrackHitSPDSelection() { fSelectSPDHitTracks = kFALSE ; }
366 Int_t GetTrackMultiplicity() const { return fTrackMult ; }
367 Float_t GetTrackMultiplicityEtaCut() const { return fTrackMultEtaCut ; }
368 void SetTrackMultiplicityEtaCut(Float_t eta) { fTrackMultEtaCut = eta ; }
370 // Calorimeter specific and patches
371 void AnalyzeOnlyLED() { fAnaLED = kTRUE ; }
372 void AnalyzeOnlyPhysics() { fAnaLED = kFALSE ; }
374 void SwitchOnCaloFilterPatch() { fCaloFilterPatch = kTRUE ;
375 fFillCTS = kFALSE ; }
376 void SwitchOffCaloFilterPatch() { fCaloFilterPatch = kFALSE ; }
377 Bool_t IsCaloFilterPatchOn() const {
378 if(fDataType == kAOD) { return fCaloFilterPatch ; }
379 else { return kFALSE ; } }
381 //-------------------------------
383 //-------------------------------
384 virtual void GetVertex(Double_t v[3]) const ;
385 virtual Double_t* GetVertex(const Int_t evtIndex) const { return fVertex[evtIndex] ; }
386 virtual void GetVertex(Double_t vertex[3], const Int_t evtIndex) const ;
387 virtual void FillVertexArray();
388 virtual Bool_t CheckForPrimaryVertex();
389 virtual Float_t GetZvertexCut() const { return fZvtxCut ; } //cut on vertex position
390 virtual void SetZvertexCut(Float_t zcut=10.) { fZvtxCut=zcut ; } //cut on vertex position
392 //--------------------------
393 // Centrality / Event Plane
394 //--------------------------
395 virtual AliCentrality* GetCentrality() const { if(fDataType!=kMC) return fInputEvent->GetCentrality() ;
397 virtual void SetCentralityClass(TString name) { fCentralityClass = name ; }
398 virtual void SetCentralityOpt(Int_t opt) { fCentralityOpt = opt ; }
399 virtual TString GetCentralityClass() const { return fCentralityClass ; }
400 virtual Int_t GetCentralityOpt() const { return fCentralityOpt ; }
401 virtual Int_t GetEventCentrality() const ;
402 virtual void SetCentralityBin(Int_t min, Int_t max) //Set the centrality bin to select the event. If used, then need to get percentile
403 { fCentralityBin[0]=min; fCentralityBin[1]=max;
404 if(min>=0 && max > 0) fCentralityOpt = 100 ; }
405 virtual Float_t GetCentralityBin(Int_t i) const { if(i < 0 || i > 1) return 0 ;
406 else return fCentralityBin[i] ; }
408 virtual AliEventplane* GetEventPlane() const { if(fDataType!=kMC) return fInputEvent->GetEventplane() ;
410 virtual Double_t GetEventPlaneAngle() const ;
411 virtual void SetEventPlaneMethod(TString m) { fEventPlaneMethod = m ; }
412 virtual TString GetEventPlaneMethod() const { return fEventPlaneMethod ; }
414 //--------------------
416 //--------------------
418 Int_t GetLastCaloMixedEvent() const { return fLastMixedCaloEvent ; }
419 Int_t GetLastTracksMixedEvent () const { return fLastMixedTracksEvent ; }
421 TList * GetListWithMixedEventsForCalo (Int_t bi) const { if(fListMixedCaloEvents) return fListMixedCaloEvents[bi] ; else return 0 ; }
422 TList * GetListWithMixedEventsForTracks(Int_t bi) const { if(fListMixedTracksEvents) return fListMixedTracksEvents [bi] ; else return 0 ; }
424 Bool_t ListWithMixedEventsForCaloExists() const { if(fListMixedCaloEvents) return kTRUE ;
425 else return kFALSE ; }
427 Bool_t ListWithMixedEventsForTracksExists() const { if(fListMixedTracksEvents) return kTRUE ;
428 else return kFALSE ; }
430 void SetLastCaloMixedEvent (Int_t e) { fLastMixedCaloEvent = e ; }
431 void SetLastTracksMixedEvent(Int_t e) { fLastMixedTracksEvent = e ; }
433 void SetListWithMixedEventsForCalo (TList ** l) {
434 if(fListMixedCaloEvents) printf("AliCaloTrackReader::SetListWithMixedEventsForCalo() - Track Mixing event list already set, nothing done\n");
435 else fListMixedCaloEvents = l ; }
437 void SetListWithMixedEventsForTracks(TList ** l) {
438 if(fListMixedTracksEvents) printf("AliCaloTrackReader::SetListWithMixedEventsForTracks() - Calorimeter Mixing event list already set, nothing done\n");
439 else fListMixedTracksEvents = l ; }
441 //-------------------------------------
443 //-------------------------------------
444 AliCalorimeterUtils * GetCaloUtils() const { return fCaloUtils ; }
445 void SetCaloUtils(AliCalorimeterUtils * caloutils) { fCaloUtils = caloutils ; }
447 virtual Double_t GetBField() const { return fInputEvent->GetMagneticField() ; }
449 void SetImportGeometryFromFile(Bool_t import,
451 fImportGeometryFromFile = import ;
452 fImportGeometryFilePath = path ; }
454 //------------------------------------------------
455 // MC analysis specific methods
456 //-------------------------------------------------
458 //Kinematics and galice.root available
459 virtual AliStack* GetStack() const ;
460 virtual AliHeader* GetHeader() const ;
461 virtual AliGenEventHeader* GetGenEventHeader() const ;
463 //Filtered kinematics in AOD
464 virtual TClonesArray* GetAODMCParticles() const ;
465 virtual AliAODMCHeader* GetAODMCHeader () const ;
467 virtual AliVEvent* GetInputEvent() const { return fInputEvent ; }
468 virtual AliVEvent* GetOriginalInputEvent() const { return 0x0 ; }
469 virtual AliAODEvent* GetOutputEvent() const { return fOutputEvent ; }
470 virtual AliMCEvent* GetMC() const { return fMC ; }
471 virtual AliMixedEvent* GetMixedEvent() const { return fMixedEvent ; }
472 virtual Int_t GetNMixedEvent() const { return fNMixedEvent ; }
474 void SwitchOnStack() { fReadStack = kTRUE ; }
475 void SwitchOffStack() { fReadStack = kFALSE ; }
476 void SwitchOnAODMCParticles() { fReadAODMCParticles = kTRUE ; }
477 void SwitchOffAODMCParticles() { fReadAODMCParticles = kFALSE ; }
478 Bool_t ReadStack() const { return fReadStack ; }
479 Bool_t ReadAODMCParticles() const { return fReadAODMCParticles ; }
481 //Select generated events, depending on comparison of pT hard and jets.
482 virtual Bool_t ComparePtHardAndJetPt() ;
483 virtual Bool_t IsPtHardAndJetPtComparisonSet() const { return fComparePtHardAndJetPt ; }
484 virtual void SetPtHardAndJetPtComparison(Bool_t compare) { fComparePtHardAndJetPt = compare ; }
485 virtual Float_t GetPtHardAndJetFactor() const { return fPtHardAndJetPtFactor ; }
486 virtual void SetPtHardAndJetPtFactor(Float_t factor) { fPtHardAndJetPtFactor = factor ; }
488 virtual Bool_t ComparePtHardAndClusterPt() ;
489 virtual Bool_t IsPtHardAndClusterPtComparisonSet() const { return fComparePtHardAndClusterPt ; }
490 virtual void SetPtHardAndClusterPtComparison(Bool_t compare) { fComparePtHardAndClusterPt = compare ; }
491 virtual Float_t GetPtHardAndClusterFactor() const { return fPtHardAndClusterPtFactor ; }
492 virtual void SetPtHardAndClusterPtFactor(Float_t factor) { fPtHardAndClusterPtFactor = factor ; }
495 //MC reader methods, declared there to allow compilation, they are only used in the MC reader:
497 virtual void AddNeutralParticlesArray(TArrayI & /*array*/) { ; }
498 virtual void AddChargedParticlesArray(TArrayI & /*array*/) { ; }
499 virtual void AddStatusArray(TArrayI & /*array*/) { ; }
501 virtual void SwitchOnPi0Decay() { ; }
502 virtual void SwitchOffPi0Decay() { ; }
503 virtual void SwitchOnStatusSelection() { ; }
504 virtual void SwitchOffStatusSelection() { ; }
505 virtual void SwitchOnOverlapCheck() { ; }
506 virtual void SwitchOffOverlapCheck() { ; }
507 virtual void SwitchOnOnlyGeneratorParticles() { ; }
508 virtual void SwitchOffOnlyGeneratorParticles() { ; }
510 virtual void SetEMCALOverlapAngle(Float_t /*angle*/) { ; }
511 virtual void SetPHOSOverlapAngle(Float_t /*angle*/) { ; }
515 Int_t fEventNumber; // Event number
516 Int_t fDataType ; // Select MC:Kinematics, Data:ESD/AOD, MCData:Both
517 Int_t fDebug; // Debugging level
518 AliFiducialCut * fFiducialCut; // Acceptance cuts
519 Bool_t fCheckFidCut ; // Do analysis for clusters in defined region
521 Bool_t fComparePtHardAndJetPt; // In MonteCarlo, jet events, reject fake events with wrong jet energy.
522 Float_t fPtHardAndJetPtFactor; // Factor between ptHard and jet pT to reject/accept event.
524 Bool_t fComparePtHardAndClusterPt; // In MonteCarlo, jet events, reject events with too large cluster energy
525 Float_t fPtHardAndClusterPtFactor; // Factor between ptHard and cluster pT to reject/accept event.
527 Float_t fCTSPtMin; // pT Threshold on charged particles
528 Float_t fEMCALPtMin; // pT Threshold on emcal clusters
529 Float_t fPHOSPtMin; // pT Threshold on phos clusters
530 Float_t fCTSPtMax; // pT Threshold on charged particles
531 Float_t fEMCALPtMax; // pT Threshold on emcal clusters
532 Float_t fPHOSPtMax; // pT Threshold on phos clusters
533 Bool_t fUseEMCALTimeCut; // Do time cut selection
534 Bool_t fUseParamTimeCut; // Use simple or parametrized time cut
535 Bool_t fUseTrackTimeCut; // Do time cut selection
536 Double_t fEMCALTimeCutMin; // Remove clusters/cells with time smaller than this value, in ns
537 Double_t fEMCALTimeCutMax; // Remove clusters/cells with time larger than this value, in ns
538 Float_t fEMCALParamTimeCutMin[4];// Remove clusters/cells with time smaller than parametrized value, in ns
539 Double_t fEMCALParamTimeCutMax[4];// Remove clusters/cells with time larger than parametrized value, in ns
540 Double_t fTrackTimeCutMin; // Remove tracks with time smaller than this value, in ns
541 Double_t fTrackTimeCutMax; // Remove tracks with time larger than this value, in ns
542 Bool_t fUseTrackDCACut; // Do DCA selection
543 Double_t fTrackDCACut[3]; // Remove tracks with DCA larger than cut, parameters of function stored here
545 TList * fAODBranchList ; //-> List with AOD branches created and needed in analysis
546 TObjArray * fCTSTracks ; //-> temporal array with tracks
547 TObjArray * fEMCALClusters ; //-> temporal array with EMCAL CaloClusters
548 TObjArray * fPHOSClusters ; //-> temporal array with PHOS CaloClusters
549 AliVCaloCells * fEMCALCells ; //! temporal array with EMCAL CaloCells
550 AliVCaloCells * fPHOSCells ; //! temporal array with PHOS CaloCells
552 AliVEvent * fInputEvent; //! pointer to esd or aod input
553 AliAODEvent * fOutputEvent; //! pointer to aod output
554 AliMCEvent * fMC; //! Monte Carlo Event Handler
556 Bool_t fFillCTS; // use data from CTS
557 Bool_t fFillEMCAL; // use data from EMCAL
558 Bool_t fFillPHOS; // use data from PHOS
559 Bool_t fFillEMCALCells; // use data from EMCAL
560 Bool_t fFillPHOSCells; // use data from PHOS
561 Bool_t fRecalculateClusters; // Correct clusters, recalculate them if recalibration parameters is given
562 Bool_t fSelectEmbeddedClusters; // Use only simulated clusters that come from embedding.
564 ULong_t fTrackStatus ; // Track selection bit, select tracks refitted in TPC, ITS ...
565 ULong_t fTrackFilterMask ; // Track selection bit, for AODs (any difference with track status?)
566 AliESDtrackCuts *fESDtrackCuts ; // Track cut
567 AliESDtrackCuts *fESDtrackComplementaryCuts; // Track cut, complementary cuts for hybrids
568 Bool_t fConstrainTrack ; // Constrain Track to vertex
569 Bool_t fSelectHybridTracks ; // Select CTS tracks of type hybrid (only for AODs)
570 Bool_t fSelectSPDHitTracks ; // Ensure that track hits SPD layers
571 Int_t fTrackMult ; // Track multiplicity
572 Float_t fTrackMultEtaCut ; // Track multiplicity eta cut
573 Bool_t fReadStack ; // Access kine information from stack
574 Bool_t fReadAODMCParticles ; // Access kine information from filtered AOD MC particles
576 TString fDeltaAODFileName ; // Delta AOD file name
577 TString fFiredTriggerClassName; // Name of trigger event type used to do the analysis
579 UInt_t fEventTriggerMask ; // select this triggerered event
580 UInt_t fMixEventTriggerMask ; // select this triggerered event for mixing, tipically kMB or kAnyINT
581 Bool_t fEventTriggerAtSE; // select triggered event at SE base task or here
583 Bool_t fAnaLED; // Analyze LED data only.
585 TString fTaskName; // Name of task that executes the analysis
587 AliCalorimeterUtils * fCaloUtils ; // Pointer to CalorimeterUtils
589 AliMixedEvent * fMixedEvent ; //! mixed event object. This class is not the owner
590 Int_t fNMixedEvent ; // number of events in mixed event buffer
591 Double_t ** fVertex ; //! vertex array 3 dim for each mixed event buffer
593 TList ** fListMixedTracksEvents ; //! Container for tracks stored for different events, used in case of own mixing, set in analysis class
594 TList ** fListMixedCaloEvents; //! Container for photon stored for different events, used in case of own mixing, set in analysis class
595 Int_t fLastMixedTracksEvent ; // Temporary container with the last event added to the mixing list for tracks
596 Int_t fLastMixedCaloEvent ; // Temporary container with the last event added to the mixing list for photons
598 Bool_t fWriteOutputDeltaAOD; // Write the created delta AOD objects into file
599 Bool_t fOldAOD; // Old AODs, before revision 4.20
601 Int_t fV0ADC[2] ; // Integrated V0 signal
602 Int_t fV0Mul[2] ; // Integrated V0 Multiplicity
604 Bool_t fCaloFilterPatch; // CaloFilter patch
605 TString fEMCALClustersListName; // Alternative list of clusters produced elsewhere and not from InputEvent
608 Float_t fZvtxCut ; // Cut on vertex position
609 Bool_t fAcceptFastCluster; // Accept events from fast cluster, exclude these events for LHC11a
610 Bool_t fRemoveLEDEvents; // Remove events where LED was wrongly firing - EMCAL LHC11a
612 Bool_t fRemoveExoticEvents; // Remove events triggered by exotic cluster
613 Bool_t fTriggerPatchExoticRejection; // Search for the trigger patch and check if associated cluster was the trigger
614 Int_t fTriggerPatchTimeWindow[2]; // Trigger patch selection window
615 Float_t fExoticTrigger; // Threshold to look for triggered events by exotic clusters
616 Bool_t fIsExoticEvent; // Exotic event flag
617 Bool_t fForceExoticRejection; // Reject events triggered by exotic only on EMC triggered events, except in MC to study false rejections
619 Bool_t fDoEventSelection; // Select events depending on V0, pileup, vertex well reconstructed, at least 1 track ...
620 Bool_t fDoV0ANDEventSelection; // Select events depending on V0, fDoEventSelection should be on
621 Bool_t fDoVertexBCEventSelection; // Select events with vertex on BC=0 or -100
622 Bool_t fDoRejectNoTrackEvents; // Reject events with no selected tracks in event
623 Bool_t fUseEventsWithPrimaryVertex ; // Select events with primary vertex
624 AliTriggerAnalysis* fTriggerAnalysis; // Access to trigger selection algorithm for V0AND calculation
626 Bool_t fTimeStampEventSelect; // Select events within a fraction of data taking time
627 Float_t fTimeStampEventFracMin; // Minimum value of time stamp fraction event
628 Float_t fTimeStampEventFracMax; // Maximum value of time stamp fraction event
629 Double_t fTimeStampRunMin; // Minimum value of time stamp in run
630 Double_t fTimeStampRunMax; // Maximum value of time stamp in run
632 Double_t fPileUpParamSPD[5]; // Parameters to pass to method IsPileupFromSPD: Int_t minContributors,
633 // Double_t minZdist,
634 // Double_t nSigmaZdist,
635 // Double_t nSigmaDiamXY,
636 // Double_t nSigmaDiamZ)
639 Int_t fNPileUpClusters; // Number of clusters with time avobe 20 ns
640 Int_t fNNonPileUpClusters; // Number of clusters with time below 20 ns
641 Int_t fNPileUpClustersCut; // Cut to select event as pile-up
642 Int_t fEMCalBCEvent[19]; // Fill one entry per event if there is a cluster in a given BC
643 Int_t fEMCalBCEventCut[19]; // Fill one entry per event if there is a cluster in a given BC, depend on cluster E, acceptance cut
644 Int_t fTrackBCEvent[19]; // Fill one entry per event if there is a track in a given BC
645 Int_t fTrackBCEventCut[19]; // Fill one entry per event if there is a track in a given BC, depend on track pT, acceptance cut
646 Int_t fVertexBC; // Vertex BC
647 Bool_t fRecalculateVertexBC; // Recalculate vertex BC from tracks pointing to vertex
649 //Centrality/Event plane
650 TString fCentralityClass; // Name of selected centrality class
651 Int_t fCentralityOpt; // Option for the returned value of the centrality, possible options 5, 10, 100
652 Int_t fCentralityBin[2]; // Minimum and maximum value of the centrality for the analysis
653 TString fEventPlaneMethod; // Name of event plane method, by default "Q"
655 Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file
656 TString fImportGeometryFilePath; // path fo geometry.root file
659 AliCaloTrackReader( const AliCaloTrackReader & r) ; // cpy ctor
660 AliCaloTrackReader & operator = (const AliCaloTrackReader & r) ; // cpy assignment
662 ClassDef(AliCaloTrackReader,53)
667 #endif //ALICALOTRACKREADER_H