]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/CaloTrackCorrBase/AliCaloTrackReader.h
Add option to switch off primary track selection or to use filter bits for hybrid...
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliCaloTrackReader.h
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     */
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.
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 //////////////////////////////////////////////////////////////////////////////
15
16 // --- ROOT system ---
17 #include <TObject.h> 
18 #include <TString.h>
19 class TObjArray ; 
20 class TTree ;
21 class TArrayI ;
22
23 //--- ANALYSIS system ---
24 #include "AliVEvent.h"
25 class AliVCaloCells;
26 class AliStack; 
27 class AliHeader; 
28 class AliGenEventHeader; 
29 class AliAODEvent;
30 class AliMCEvent;
31 class AliMixedEvent;
32 class AliAODMCHeader;
33 class AliESDtrackCuts;
34 class AliCentrality;
35 class AliTriggerAnalysis;
36 class AliEventplane;
37 class AliVCluster;
38
39 // --- CaloTrackCorr / EMCAL ---
40 #include "AliFiducialCut.h"
41 class AliEMCALRecoUtils;
42 class AliCalorimeterUtils;
43
44 class AliCaloTrackReader : public TObject {
45
46 public: 
47   
48   AliCaloTrackReader() ;          // ctor
49   virtual ~AliCaloTrackReader() ; // virtual dtor
50   
51   //--------------------------------
52   // General methods
53   //--------------------------------
54
55   virtual void    Init();
56     
57   virtual void    InitParameters();
58   
59   virtual void    Print(const Option_t * opt) const;
60   
61   virtual void    ResetLists();
62
63   virtual Int_t   GetDebug()                         const { return fDebug                 ; }
64   virtual void    SetDebug(Int_t d)                        { fDebug = d                    ; }
65   
66   enum inputDataType {kESD, kAOD, kMC};
67   virtual Int_t   GetDataType()                      const { return fDataType              ; }
68   virtual void    SetDataType(Int_t data )                 { fDataType = data              ; }
69
70   virtual Int_t   GetEventNumber()                   const { return fEventNumber           ; }
71         
72   TString         GetTaskName()                      const { return fTaskName              ; }
73   void            SetTaskName(TString name)                { fTaskName = name              ; }
74     
75   //---------------------------------------
76   // Input/output event setters and getters
77   //---------------------------------------
78   
79   virtual void    SetInputEvent(AliVEvent* input) ;
80   virtual void    SetOutputEvent(AliAODEvent*  aod)        { fOutputEvent = aod            ; }
81   virtual void    SetMC(AliMCEvent* const mc)              { fMC          = mc             ; }
82   virtual void    SetInputOutputMCEvent(AliVEvent* /*esd*/, AliAODEvent* /*aod*/, AliMCEvent* /*mc*/) { ; }
83   
84   // Delta AODs
85   
86   virtual TList * GetAODBranchList()                 const { return fAODBranchList         ; }
87   void            SetDeltaAODFileName(TString name )       { fDeltaAODFileName = name      ; }
88   TString         GetDeltaAODFileName()              const { return fDeltaAODFileName      ; }
89   void            SwitchOnWriteDeltaAOD()                  { fWriteOutputDeltaAOD = kTRUE  ; }
90   void            SwitchOffWriteDeltaAOD()                 { fWriteOutputDeltaAOD = kFALSE ; }
91   Bool_t          WriteDeltaAODToFile()              const { return fWriteOutputDeltaAOD   ; } 
92   
93   //------------------------------------------------------------
94   // Clusters/Tracks arrays filtering/filling methods and switchs 
95   //------------------------------------------------------------
96   
97   // Minimum pt setters and getters
98   
99   Float_t          GetEMCALPtMin()                   const { return fEMCALPtMin            ; }
100   Float_t          GetPHOSPtMin()                    const { return fPHOSPtMin             ; }
101   Float_t          GetCTSPtMin()                     const { return fCTSPtMin              ; }
102   Float_t          GetEMCALPtMax()                   const { return fEMCALPtMax            ; }
103   Float_t          GetPHOSPtMax()                    const { return fPHOSPtMax             ; }
104   Float_t          GetCTSPtMax()                     const { return fCTSPtMax              ; }
105   
106   void             SetEMCALPtMin(Float_t  pt)              { fEMCALPtMin = pt              ; }
107   void             SetPHOSPtMin (Float_t  pt)              { fPHOSPtMin  = pt              ; }
108   void             SetCTSPtMin  (Float_t  pt)              { fCTSPtMin   = pt              ; }  
109   
110   void             SetEMCALPtMax(Float_t  pt)              { fEMCALPtMax = pt              ; }
111   void             SetPHOSPtMax (Float_t  pt)              { fPHOSPtMax  = pt              ; }
112   void             SetCTSPtMax  (Float_t  pt)              { fCTSPtMax   = pt              ; }  
113    
114   Float_t          GetEMCALEMin()                    const { return GetEMCALPtMin()        ; }
115   Float_t          GetPHOSEMin()                     const { return GetPHOSPtMin()         ; }
116   Float_t          GetEMCALEMax()                    const { return GetEMCALPtMax()        ; }
117   Float_t          GetPHOSEMax()                     const { return GetPHOSPtMax()         ; }
118   
119   void             SetEMCALEMin (Float_t  e)               { SetEMCALPtMin(e)              ; }
120   void             SetPHOSEMin  (Float_t  e)               { SetPHOSPtMin (e)              ; }
121   void             SetEMCALEMax (Float_t  e)               { SetEMCALPtMax(e)              ; }
122   void             SetPHOSEMax  (Float_t  e)               { SetPHOSPtMax (e)              ; }
123   
124   // Track DCA cut
125   
126   Bool_t           AcceptDCA(Float_t pt, Float_t dca);
127   Double_t         GetTrackDCACut(Int_t i)           const { if(i >= 0 && i < 3 ) return fTrackDCACut[i] ;
128                                                              else return -999              ; }
129   
130   void             SetTrackDCACut(Int_t i, Float_t cut)    { if(i >= 0 && i < 3 )
131                                                              fTrackDCACut[i] = cut         ; }
132   
133   void             SwitchOnUseTrackDCACut()                { fUseTrackDCACut = kTRUE       ; }
134   void             SwitchOffUseTrackDCACut()               { fUseTrackDCACut = kFALSE      ; }
135   Bool_t           IsDCACutOn()                      const { return fUseTrackDCACut        ; }
136   
137   // Time cut
138   
139   Double_t         GetTrackTimeCutMin()              const { return fTrackTimeCutMin       ; }
140   Double_t         GetTrackTimeCutMax()              const { return fTrackTimeCutMax       ; }
141   
142   void             SetTrackTimeCut(Double_t a, Double_t b) { fTrackTimeCutMin = a ;
143                                                              fTrackTimeCutMax = b          ; } // ns
144   
145   void             SwitchOnUseTrackTimeCut()               { fUseTrackTimeCut = kTRUE      ; }
146   void             SwitchOffUseTrackTimeCut()              { fUseTrackTimeCut = kFALSE     ; }
147   
148   Double_t         GetEMCALTimeCutMin()              const { return fEMCALTimeCutMin       ; }
149   Double_t         GetEMCALTimeCutMax()              const { return fEMCALTimeCutMax       ; }  
150
151   Bool_t           IsInTimeWindow(Double_t tof, Float_t energy)  const ;
152   
153   void             SetEMCALTimeCut(Double_t a, Double_t b) { fEMCALTimeCutMin = a ; 
154                                                              fEMCALTimeCutMax = b          ; } // ns
155   
156   void             SetEMCALParametrizedMinTimeCut(Int_t i, Float_t par) { fEMCALParamTimeCutMin[i] = par ; } 
157   void             SetEMCALParametrizedMaxTimeCut(Int_t i, Float_t par) { fEMCALParamTimeCutMax[i] = par ; } 
158   
159   void             SwitchOnUseEMCALTimeCut()               { fUseEMCALTimeCut = kTRUE      ; }
160   void             SwitchOffUseEMCALTimeCut()              { fUseEMCALTimeCut = kFALSE     ; }
161   
162   void             SwitchOnUseParametrizedTimeCut()        { fUseParamTimeCut = kTRUE      ; }
163   void             SwitchOffUseParametrizedTimeCut()       { fUseParamTimeCut = kFALSE     ; }
164
165   // Fidutial cuts
166   
167   virtual AliFiducialCut * GetFiducialCut()                { 
168                     if(!fFiducialCut) fFiducialCut = new AliFiducialCut(); 
169                     return  fFiducialCut                                                   ; }
170   virtual void     SetFiducialCut(AliFiducialCut * fc)     { fFiducialCut = fc           ; }
171   virtual Bool_t   IsFiducialCutOn()                 const { return fCheckFidCut           ; }
172   virtual void     SwitchOnFiducialCut()                   { fCheckFidCut = kTRUE          ; 
173                                                              fFiducialCut = new AliFiducialCut() ; }
174   virtual void     SwitchOffFiducialCut()                  { fCheckFidCut = kFALSE         ; }
175   
176   // Cluster origin
177   
178   Bool_t           IsEMCALCluster(AliVCluster *clus) const;
179   Bool_t           IsPHOSCluster (AliVCluster *clus) const;
180   
181   // Patch for cluster origin for Old AODs implementation
182   
183   void             SwitchOnOldAODs()                       { fOldAOD = kTRUE               ; }
184   void             SwitchOffOldAODs()                      { fOldAOD = kFALSE              ; }
185   
186   // Cluster/track/cells switchs
187   
188   Bool_t           IsCTSSwitchedOn()                 const { return fFillCTS               ; }
189   void             SwitchOnCTS()                           { fFillCTS = kTRUE              ; }
190   void             SwitchOffCTS()                          { fFillCTS = kFALSE             ; }
191
192   Bool_t           IsEMCALSwitchedOn()               const { return fFillEMCAL             ; }
193   void             SwitchOnEMCAL()                         { fFillEMCAL = kTRUE            ; }
194   void             SwitchOffEMCAL()                        { fFillEMCAL = kFALSE           ; }
195
196   Bool_t           IsPHOSSwitchedOn()                const { return fFillPHOS              ; }
197   void             SwitchOnPHOS()                          { fFillPHOS = kTRUE             ; }
198   void             SwitchOffPHOS()                         { fFillPHOS = kFALSE            ; }
199
200   Bool_t           IsEMCALCellsSwitchedOn()          const { return fFillEMCALCells        ; }
201   void             SwitchOnEMCALCells()                    { fFillEMCALCells = kTRUE       ; }
202   void             SwitchOffEMCALCells()                   { fFillEMCALCells = kFALSE      ; }
203
204   Bool_t           IsPHOSCellsSwitchedOn()           const { return fFillPHOSCells         ; }
205   void             SwitchOnPHOSCells()                     { fFillPHOSCells = kTRUE        ; }
206   void             SwitchOffPHOSCells()                    { fFillPHOSCells = kFALSE       ; }
207
208   Bool_t           AreClustersRecalculated()         const { return fRecalculateClusters   ; }
209   void             SwitchOnClusterRecalculation()          { fRecalculateClusters = kTRUE  ; }
210   void             SwitchOffClusterRecalculation()         { fRecalculateClusters = kFALSE ; }  
211
212   void             SwitchOnClusterELinearityCorrection()   { fCorrectELinearity = kTRUE    ; }
213   void             SwitchOffClusterELinearityCorrection()  { fCorrectELinearity = kFALSE   ; }
214
215   Bool_t           IsEmbeddedClusterSelectionOn()    const { return fSelectEmbeddedClusters   ; }
216   void             SwitchOnEmbeddedClustersSelection()     { fSelectEmbeddedClusters = kTRUE  ; }
217   void             SwitchOffEmbeddedClustersSelection()    { fSelectEmbeddedClusters = kFALSE ; }
218   
219   // Filling/ filtering / detector information access methods
220   
221   virtual Bool_t   FillInputEvent(Int_t iEntry, const char *currentFileName)  ;
222   virtual void     FillInputCTS() ;
223   virtual void     FillInputEMCAL() ;
224   virtual void     FillInputEMCALAlgorithm(AliVCluster * clus, const Int_t iclus) ;
225   virtual void     FillInputPHOS() ;
226   virtual void     FillInputEMCALCells() ;
227   virtual void     FillInputPHOSCells() ;
228   virtual void     FillInputVZERO() ;  
229   
230   Int_t            GetV0Signal(Int_t i)              const { return fV0ADC[i]               ; }
231   Int_t            GetV0Multiplicity(Int_t i)        const { return fV0Mul[i]               ; }
232   
233   void             SetEMCALClusterListName(TString &name)  { fEMCALClustersListName = name  ; }
234   TString          GetEMCALClusterListName()         const { return fEMCALClustersListName  ; }
235
236   // Arrays with clusters/track/cells access method
237   
238   virtual TObjArray*     GetCTSTracks()              const { return fCTSTracks              ; }
239   virtual TObjArray*     GetEMCALClusters()          const { return fEMCALClusters          ; }
240   virtual TObjArray*     GetPHOSClusters()           const { return fPHOSClusters           ; }
241   virtual AliVCaloCells* GetEMCALCells()             const { return fEMCALCells             ; }
242   virtual AliVCaloCells* GetPHOSCells()              const { return fPHOSCells              ; }
243   
244   //-------------------------------------
245   // Event/track selection methods
246   //-------------------------------------
247   
248   void             AcceptFastClusterEvents()               { fAcceptFastCluster     = kTRUE  ; } 
249   void             RejectFastClusterEvents()               { fAcceptFastCluster     = kFALSE ; }  
250   Bool_t           IsFastClusterAccepted()           const { return fAcceptFastCluster       ; }   
251   
252   Bool_t           AcceptEventWithTriggerBit();
253   Bool_t           RejectEventWithTriggerBit();
254   void             SetAcceptEventsWithBit(UInt_t bit)      { Int_t n = fAcceptEventsWithBit.GetSize();
255                                                              fAcceptEventsWithBit.Set(n+1);
256                                                              fAcceptEventsWithBit.AddAt(bit,n) ; }
257   
258   void             SetRejectEventsWithBit(UInt_t bit)      { Int_t n = fRejectEventsWithBit.GetSize();
259                                                              fRejectEventsWithBit.Set(n+1);
260                                                              fRejectEventsWithBit.AddAt(bit,n) ; }
261
262   void             SwitchOnLEDEventsRemoval()              { fRemoveLEDEvents       = kTRUE  ; }
263   void             SwitchOffLEDEventsRemoval()             { fRemoveLEDEvents       = kFALSE ; }
264   Bool_t           IsLEDEventRemoved()               const { return fRemoveLEDEvents         ; }   
265   Bool_t           RejectLEDEvents();
266   
267   void             SetFiredTriggerClassName(TString name ) { fFiredTriggerClassName = name   ; }
268   TString          GetFiredTriggerClassName()        const { return fFiredTriggerClassName   ; }
269   TString          GetFiredTriggerClasses()          const { return GetInputEvent()->GetFiredTriggerClasses() ; }
270   
271   UInt_t           GetEventTriggerMask()             const { return fEventTriggerMask        ; }
272   void             SetEventTriggerMask(UInt_t evtTrig = AliVEvent::kAny) 
273                                                            { fEventTriggerMask = evtTrig     ; }
274         Bool_t           IsEventTriggerAtSEOn()            const { return fEventTriggerAtSE        ; }
275   void             SwitchOnEventTriggerAtSE()              { fEventTriggerAtSE      = kTRUE  ; }
276   void             SwitchOffEventTriggerAtSE()             { fEventTriggerAtSE      = kFALSE ; }
277                 
278         
279   TArrayI          GetTriggerPatches(Int_t tmin, Int_t tmax);
280   void             MatchTriggerCluster(TArrayI patches);
281
282   Bool_t           IsExoticEvent()                         { return fIsExoticEvent           ; }  
283   Bool_t           IsBadCellTriggerEvent()                 { return fIsBadCellEvent          ; }
284   Bool_t           IsBadMaxCellTriggerEvent()              { return fIsBadMaxCellEvent       ; }
285   Bool_t           IsTriggerMatched()                      { return fIsTriggerMatch          ; }
286   Bool_t           IsTriggerMatchedOpenCuts(Int_t i)       { return fIsTriggerMatchOpenCut[i]; }
287   
288   Int_t            GetTriggerClusterBC()                   { return fTriggerClusterBC        ; }
289   Int_t            GetTriggerClusterIndex()                { return fTriggerClusterIndex     ; }
290   Int_t            GetTriggerClusterId()                   { return fTriggerClusterId        ; }
291   
292   Float_t          GetEventTriggerThreshold()              { return fTriggerEventThreshold   ; }
293   void             SetEventTriggerThreshold(Float_t tr)    { fTriggerEventThreshold   = tr   ; }
294
295   void             SetTriggerPatchTimeWindow(Int_t min, Int_t max) { fTriggerPatchTimeWindow[0] = min ;
296                                                                      fTriggerPatchTimeWindow[1] = max ; }
297   
298   void             SwitchOffBadTriggerEventsRemoval()      { fRemoveBadTriggerEvents   = kFALSE ; }
299   void             SwitchOnBadTriggerEventsRemoval()       { fRemoveBadTriggerEvents   = kTRUE  ; }
300
301   void             SwitchOffUnMatchedTriggerEventsRemoval(){ fRemoveUnMatchedTriggers  = kFALSE ; }
302   void             SwitchOnUnMatchedTriggerEventsRemoval() { fRemoveUnMatchedTriggers  = kTRUE  ; }
303   
304   void             SwitchOffTriggerPatchMatching()         { fTriggerPatchClusterMatch = kFALSE ; }
305   void             SwitchOnTriggerPatchMatching()          { fTriggerPatchClusterMatch = kTRUE  ; }
306
307   void             SwitchOnTriggerClusterTimeRecal ()      { fTriggerClusterTimeRecal  = kTRUE  ; }
308   void             SwitchOffTriggerClusterTimeRecal()      { fTriggerClusterTimeRecal  = kFALSE ; }
309   
310   UInt_t           GetMixEventTriggerMask()             const { return fMixEventTriggerMask  ; }
311   void             SetMixEventTriggerMask(UInt_t evtTrig = AliVEvent::kAnyINT) 
312                                                            { fMixEventTriggerMask = evtTrig  ; }
313         void             SetEventTriggerBit();
314         Bool_t           IsEventMinimumBias()              const { return fEventTrigMinBias        ; }
315         Bool_t           IsEventCentral()                  const { return fEventTrigCentral        ; }
316         Bool_t           IsEventSemiCentral()              const { return fEventTrigSemiCentral    ; }
317         Bool_t           IsEventEMCALL0()                  const { return fEventTrigEMCALL0        ; }
318         Bool_t           IsEventEMCALL1Gamma1()            const { return fEventTrigEMCALL1Gamma1  ; }
319         Bool_t           IsEventEMCALL1Gamma2()            const { return fEventTrigEMCALL1Gamma2  ; }
320         Bool_t           IsEventEMCALL1Jet1()              const { return fEventTrigEMCALL1Jet1    ; }
321         Bool_t           IsEventEMCALL1Jet2()              const { return fEventTrigEMCALL1Jet2    ; }
322         Bool_t           IsEventEMCALL1Gamma()             const { return (fEventTrigEMCALL1Gamma1 || fEventTrigEMCALL1Gamma2) ; }
323   Bool_t           IsEventEMCALL1Jet()               const { return (fEventTrigEMCALL1Jet1   || fEventTrigEMCALL1Jet2  ) ; }
324         Bool_t           IsEventEMCALL1()                  const { return (IsEventEMCALL1Gamma()   || IsEventEMCALL1Jet()    ) ; }
325         
326         
327   void             SwitchOnEventSelection()                { fDoEventSelection      = kTRUE  ; }
328   void             SwitchOffEventSelection()               { fDoEventSelection      = kFALSE ; }
329   Bool_t           IsEventSelectionDone()            const { return fDoEventSelection        ; }
330   
331   void             SwitchOnV0ANDSelection()                { fDoV0ANDEventSelection = kTRUE  ; }
332   void             SwitchOffV0ANDSelection()               { fDoV0ANDEventSelection = kFALSE ; }
333   Bool_t           IsV0ANDEventSelectionDone()       const { return fDoV0ANDEventSelection   ; } 
334
335   void             SwitchOnVertexBCEventSelection()        { fDoVertexBCEventSelection = kTRUE  ; }
336   void             SwitchOffVertexBCEventSelection()       { fDoVertexBCEventSelection = kFALSE ; }
337   Bool_t           IsVertexBCEventSelectionDone()    const { return fDoVertexBCEventSelection   ; }
338   
339   void             SwitchOnPrimaryVertexSelection()        { fUseEventsWithPrimaryVertex = kTRUE  ; }
340   void             SwitchOffPrimaryVertexSelection()       { fUseEventsWithPrimaryVertex = kFALSE ; }
341   Bool_t           IsPrimaryVertexSelectionDone()    const { return fUseEventsWithPrimaryVertex   ; } 
342   
343   void             SwitchOnRejectNoTrackEvents()           { fDoRejectNoTrackEvents = kTRUE  ; }
344   void             SwitchOffRejectNoTrackEvents()          { fDoRejectNoTrackEvents = kFALSE ; }
345   Bool_t           IsEventWithNoTrackRejectionDone() const { return fDoRejectNoTrackEvents   ; }
346   
347
348   // Time Stamp
349   
350   Double_t         GetRunTimeStampMin()              const { return fTimeStampRunMin         ; }
351   Double_t         GetRunTimeStampMax()              const { return fTimeStampRunMax         ; }
352   
353   void             SetRunTimeStamp(Double_t a, Double_t b) { fTimeStampRunMin = a            ;
354                                                              fTimeStampRunMax = b            ; } // seconds
355   
356   Float_t          GetEventTimeStampFractionMin()    const { return fTimeStampEventFracMin   ; }
357   Float_t          GetEventTimeStampFractionMax()    const { return fTimeStampEventFracMax   ; }
358   
359   void             SetEventTimeStampFraction(Float_t a, Float_t b) { fTimeStampEventFracMin = a ;
360                                                                      fTimeStampEventFracMax = b ; }
361   
362   void             SwitchOnSelectEventTimeStamp()          { fTimeStampEventSelect = kTRUE   ; }
363   void             SwitchOffSelectEventTimeStamp()         { fTimeStampEventSelect = kFALSE  ; }
364   
365   Bool_t           IsSelectEventTimeStampOn()              {return  fTimeStampEventSelect    ; }
366   
367   Bool_t           IsPileUpFromSPD()               const ;
368   Bool_t           IsPileUpFromEMCal()             const ;
369   Bool_t           IsPileUpFromSPDAndEMCal()       const ;
370   Bool_t           IsPileUpFromSPDOrEMCal()        const ;
371   Bool_t           IsPileUpFromSPDAndNotEMCal()    const ;
372   Bool_t           IsPileUpFromEMCalAndNotSPD()    const ;
373   Bool_t           IsPileUpFromNotSPDAndNotEMCal() const ;
374
375   void             SetPileUpParamForSPD  (Int_t i, Double_t param)
376                                                            { fPileUpParamSPD[i]  = param  ; }
377   void             SetPileUpParamForEMCal(Int_t param)     { fNPileUpClustersCut = param  ; }
378   
379   Int_t            GetNPileUpClusters()                    { return  fNPileUpClusters     ; }
380   Int_t            GetNNonPileUpClusters()                 { return  fNNonPileUpClusters  ; }
381   
382   Int_t            GetEMCalEventBC(Int_t bc)     const     { if(bc >=0 && bc < 19) return  fEMCalBCEvent   [bc] ; else return 0 ; }
383   Int_t            GetTrackEventBC(Int_t bc)     const     { if(bc >=0 && bc < 19) return  fTrackBCEvent   [bc] ; else return 0 ; }
384   Int_t            GetEMCalEventBCcut(Int_t bc)  const     { if(bc >=0 && bc < 19) return  fEMCalBCEventCut[bc] ; else return 0 ; }
385   Int_t            GetTrackEventBCcut(Int_t bc)  const     { if(bc >=0 && bc < 19) return  fTrackBCEventCut[bc] ; else return 0 ; }
386
387   void             SetEMCalEventBC(Int_t bc)               { if(bc >=0 && bc < 19) fEMCalBCEvent   [bc] = 1 ; }
388   void             SetTrackEventBC(Int_t bc)               { if(bc >=0 && bc < 19) fTrackBCEvent   [bc] = 1 ; }
389   void             SetEMCalEventBCcut(Int_t bc)            { if(bc >=0 && bc < 19) fEMCalBCEventCut[bc] = 1 ; }
390   void             SetTrackEventBCcut(Int_t bc)            { if(bc >=0 && bc < 19) fTrackBCEventCut[bc] = 1 ; }
391
392   Int_t            GetVertexBC(const AliVVertex * vtx);
393   Int_t            GetVertexBC()                  const    { return fVertexBC              ; }
394   void             SwitchOnRecalculateVertexBC()           { fRecalculateVertexBC = kTRUE  ; }
395   void             SwitchOffRecalculateVertexBC()          { fRecalculateVertexBC = kFALSE ; }
396   
397   // Track selection
398   
399   ULong_t          GetTrackStatus()                  const { return fTrackStatus          ; }
400   void             SetTrackStatus(ULong_t bit)             { fTrackStatus = bit           ; }           
401
402   ULong_t          GetTrackFilterMask()              const { return fTrackFilterMask       ; }
403   void             SetTrackFilterMask(ULong_t bit)         { fTrackFilterMask = bit       ; }
404   
405   ULong_t          GetTrackFilterMaskComplementary() const { return fTrackFilterMaskComplementary       ; }
406   void             SetTrackFilterMaskComplementary(ULong_t bit) {   fTrackFilterMaskComplementary = bit ; }
407   
408   AliESDtrackCuts* GetTrackCuts()                    const { return fESDtrackCuts         ; }
409   void             SetTrackCuts(AliESDtrackCuts * cuts)    ;
410
411   AliESDtrackCuts* GetTrackComplementaryCuts()       const { return fESDtrackComplementaryCuts ; }
412   void             SetTrackComplementaryCuts(AliESDtrackCuts * cuts)  ;
413
414   
415   void             SwitchOnConstrainTrackToVertex()        { fConstrainTrack     = kTRUE  ; } 
416   void             SwitchOffConstrainTrackToVertex()       { fConstrainTrack     = kFALSE ; }
417   
418   void             SwitchOnAODHybridTrackSelection()       { fSelectHybridTracks = kTRUE  ; } 
419   void             SwitchOffAODHybridTrackSelection()      { fSelectHybridTracks = kFALSE ; }      
420
421   void             SwitchOnAODPrimaryTrackSelection()      { fSelectPrimaryTracks = kTRUE  ; }
422   void             SwitchOffAODPrimaryTrackSelection()     { fSelectPrimaryTracks = kFALSE ; }
423   
424   void             SwitchOnTrackHitSPDSelection()          { fSelectSPDHitTracks = kTRUE  ; }
425   void             SwitchOffTrackHitSPDSelection()         { fSelectSPDHitTracks = kFALSE ; }
426   
427   Int_t            GetTrackMultiplicity()            const { return fTrackMult            ; }
428   Float_t          GetTrackMultiplicityEtaCut()      const { return fTrackMultEtaCut      ; }
429   void             SetTrackMultiplicityEtaCut(Float_t eta) { fTrackMultEtaCut = eta       ; }           
430   
431   // Calorimeter specific and patches
432   void             AnalyzeOnlyLED()                        { fAnaLED             = kTRUE  ; }
433   void             AnalyzeOnlyPhysics()                    { fAnaLED             = kFALSE ; }
434   
435   //-------------------------------
436   // Vertex methods
437   //-------------------------------
438
439   virtual void      GetVertex(Double_t v[3])         const ;
440   virtual Double_t* GetVertex(Int_t evtIndex)        const { return fVertex[evtIndex]            ; }
441   virtual void      GetVertex(Double_t vertex[3],    const Int_t evtIndex) const ;
442   virtual void      FillVertexArray();
443   virtual Bool_t    CheckForPrimaryVertex();
444   virtual Float_t   GetZvertexCut()                  const { return fZvtxCut                     ; } //cut on vertex position  
445   virtual void      SetZvertexCut(Float_t zcut=10.)        { fZvtxCut=zcut                       ; } //cut on vertex position
446
447   //--------------------------
448   // Centrality / Event Plane
449   //--------------------------
450
451   virtual AliCentrality* GetCentrality()             const { if(fDataType!=kMC) return fInputEvent->GetCentrality() ;
452                                                              else               return 0x0       ; } 
453   virtual void     SetCentralityClass(TString name)        { fCentralityClass   = name           ; }
454   virtual void     SetCentralityOpt(Int_t opt)             { fCentralityOpt     = opt            ; }
455   virtual TString  GetCentralityClass()              const { return fCentralityClass             ; }
456   virtual Int_t    GetCentralityOpt()                const { return fCentralityOpt               ; }
457   virtual Int_t    GetEventCentrality()              const ;
458   virtual void     SetCentralityBin(Int_t min, Int_t max) //Set the centrality bin to select the event. If used, then need to get percentile
459                                                            { fCentralityBin[0]=min; fCentralityBin[1]=max;  
460                                                              if(min>=0 && max > 0) fCentralityOpt = 100 ; }
461   virtual Float_t  GetCentralityBin(Int_t i)         const { if(i < 0 || i > 1) return 0 ; 
462                                                              else return fCentralityBin[i]              ; }
463   
464   virtual AliEventplane* GetEventPlane()             const { if(fDataType!=kMC) return fInputEvent->GetEventplane() ;
465                                                              else               return 0x0       ; }  
466   virtual Double_t       GetEventPlaneAngle()        const ;          
467   virtual void           SetEventPlaneMethod(TString m)    { fEventPlaneMethod = m               ; }
468   virtual TString        GetEventPlaneMethod()       const { return fEventPlaneMethod            ; }
469
470   //--------------------
471   // Mixing
472   //--------------------
473
474   Int_t   GetLastCaloMixedEvent()                    const { return fLastMixedCaloEvent          ; }
475   Int_t   GetLastTracksMixedEvent ()                 const { return fLastMixedTracksEvent        ; }
476   
477   TList * GetListWithMixedEventsForCalo  (Int_t bi)  const { if(fListMixedCaloEvents)   return fListMixedCaloEvents[bi]     ; else return 0 ; }
478   TList * GetListWithMixedEventsForTracks(Int_t bi)  const { if(fListMixedTracksEvents) return fListMixedTracksEvents [bi]  ; else return 0 ; }  
479    
480   Bool_t  ListWithMixedEventsForCaloExists()         const { if(fListMixedCaloEvents) return kTRUE  ;
481                                                              else                     return kFALSE ; }
482
483   Bool_t  ListWithMixedEventsForTracksExists()       const { if(fListMixedTracksEvents) return kTRUE  ;
484                                                              else                       return kFALSE ; }
485   
486   void    SetLastCaloMixedEvent  (Int_t e)                 { fLastMixedCaloEvent    = e          ; }
487   void    SetLastTracksMixedEvent(Int_t e)                 { fLastMixedTracksEvent  = e          ; }
488   
489   void    SetListWithMixedEventsForCalo (TList ** l)       { 
490             if(fListMixedCaloEvents) printf("AliCaloTrackReader::SetListWithMixedEventsForCalo() - Track Mixing event list already set, nothing done\n");
491             else                        fListMixedCaloEvents    = l ; }
492   
493   void    SetListWithMixedEventsForTracks(TList ** l)      { 
494             if(fListMixedTracksEvents)  printf("AliCaloTrackReader::SetListWithMixedEventsForTracks() - Calorimeter Mixing event list already set, nothing done\n");
495             else                        fListMixedTracksEvents  = l ; }
496   
497   //-------------------------------------
498   // Other methods
499   //-------------------------------------
500   
501   AliCalorimeterUtils * GetCaloUtils()               const { return fCaloUtils                   ; }
502   void             SetCaloUtils(AliCalorimeterUtils * caloutils)  { fCaloUtils = caloutils       ; }  
503   
504   virtual Double_t GetBField()                       const { return fInputEvent->GetMagneticField()  ; } 
505   
506   //------------------------------------------------
507   // MC analysis specific methods
508   //-------------------------------------------------
509   
510   // Kinematics and galice.root available
511   
512   virtual AliStack*          GetStack()              const ;
513   virtual AliHeader*         GetHeader()             const ;
514   virtual AliGenEventHeader* GetGenEventHeader()     const ;
515   
516   // Filtered kinematics in AOD
517   
518   virtual TClonesArray*     GetAODMCParticles()      const ;
519   virtual AliAODMCHeader*   GetAODMCHeader   ()      const ;
520   
521   virtual AliVEvent*        GetInputEvent()          const { return fInputEvent            ; }
522   virtual AliVEvent*        GetOriginalInputEvent()  const { return 0x0                    ; }
523   virtual AliAODEvent*      GetOutputEvent()         const { return fOutputEvent           ; }
524   virtual AliMCEvent*       GetMC()                  const { return fMC                    ; }
525   virtual AliMixedEvent*    GetMixedEvent()          const { return fMixedEvent            ; }
526   virtual Int_t             GetNMixedEvent()         const { return fNMixedEvent           ; } 
527   
528   void             SwitchOnStack()                         { fReadStack          = kTRUE   ; }
529   void             SwitchOffStack()                        { fReadStack          = kFALSE  ; }
530   void             SwitchOnAODMCParticles()                { fReadAODMCParticles = kTRUE   ; }
531   void             SwitchOffAODMCParticles()               { fReadAODMCParticles = kFALSE  ; }
532   Bool_t           ReadStack()                       const { return fReadStack             ; }
533   Bool_t           ReadAODMCParticles()              const { return fReadAODMCParticles    ; }
534         
535   void             RemapMCLabelForAODs(Int_t &label);
536   
537   // Select generated events, depending on comparison of pT hard and jets
538     
539   virtual Bool_t   ComparePtHardAndJetPt() ;
540   virtual Bool_t   IsPtHardAndJetPtComparisonSet()       const { return  fComparePtHardAndJetPt   ; }
541   virtual void     SetPtHardAndJetPtComparison(Bool_t compare) { fComparePtHardAndJetPt = compare ; }   
542   virtual Float_t  GetPtHardAndJetFactor()               const { return  fPtHardAndJetPtFactor    ; }
543   virtual void     SetPtHardAndJetPtFactor(Float_t factor)     { fPtHardAndJetPtFactor = factor   ; }           
544   
545   virtual Bool_t   ComparePtHardAndClusterPt() ;
546   virtual Bool_t   IsPtHardAndClusterPtComparisonSet()       const { return  fComparePtHardAndClusterPt   ; }
547   virtual void     SetPtHardAndClusterPtComparison(Bool_t compare) { fComparePtHardAndClusterPt = compare ; }   
548   virtual Float_t  GetPtHardAndClusterFactor()               const { return  fPtHardAndClusterPtFactor    ; }
549   virtual void     SetPtHardAndClusterPtFactor(Float_t factor)     { fPtHardAndClusterPtFactor = factor   ; }           
550   
551   virtual Bool_t   IsHIJINGLabel(const Int_t label);
552   void             SetGeneratorMinMaxParticles();
553   void             SwitchOnAcceptOnlyHIJINGLabels()          { fAcceptOnlyHIJINGLabels = kTRUE  ; }
554   void             SwitchOffAcceptOnlyHIJINGLabels()         { fAcceptOnlyHIJINGLabels = kFALSE ; }
555   Bool_t           AcceptOnlyHIJINGLabels()            const { return fAcceptOnlyHIJINGLabels   ; }
556   
557   // MC reader methods, declared there to allow compilation, they are only used in the MC reader
558   
559   virtual void AddNeutralParticlesArray(TArrayI & /*array*/) { ; }  
560   virtual void AddChargedParticlesArray(TArrayI & /*array*/) { ; } 
561   virtual void AddStatusArray(TArrayI & /*array*/)           { ; }
562   
563   virtual void SwitchOnPi0Decay()                            { ; } 
564   virtual void SwitchOffPi0Decay()                           { ; } 
565   virtual void SwitchOnStatusSelection()                     { ; }
566   virtual void SwitchOffStatusSelection()                    { ; }
567   virtual void SwitchOnOverlapCheck()                        { ; }
568   virtual void SwitchOffOverlapCheck()                       { ; }
569   virtual void SwitchOnOnlyGeneratorParticles()              { ; }
570   virtual void SwitchOffOnlyGeneratorParticles()             { ; }
571
572   virtual void SetEMCALOverlapAngle(Float_t /*angle*/)       { ; }
573   virtual void SetPHOSOverlapAngle(Float_t /*angle*/)        { ; }
574
575   //-------------
576   // Jets
577   //-------------
578   Bool_t       IsNonStandardJetsSwitchedOn()           const { return fFillInputNonStandardJetBranch   ; }
579   void         SwitchOnNonStandardJets()                     { fFillInputNonStandardJetBranch = kTRUE  ; }
580   void         SwitchOffNonStandardJets()                    { fFillInputNonStandardJetBranch = kFALSE ; }
581   
582   virtual void FillInputNonStandardJets() ;
583   virtual TClonesArray* GetNonStandardJets()            const { return fNonStandardJets                 ; }
584   virtual void SetInputNonStandardJetBranchName(TString name) { fInputNonStandardJetBranchName   = name ; }
585   virtual TString GetInputNonStandardJetBranchName()          { return fInputNonStandardJetBranchName   ; }
586   
587  protected:
588   Int_t            fEventNumber;               // Event number
589   Int_t            fDataType ;                 // Select MC:Kinematics, Data:ESD/AOD, MCData:Both
590   Int_t            fDebug;                     // Debugging level
591   AliFiducialCut * fFiducialCut;               // Acceptance cuts
592   Bool_t           fCheckFidCut ;              // Do analysis for clusters in defined region         
593
594   Bool_t           fComparePtHardAndJetPt;     // In MonteCarlo, jet events, reject fake events with wrong jet energy.
595   Float_t          fPtHardAndJetPtFactor;      // Factor between ptHard and jet pT to reject/accept event.
596
597   Bool_t           fComparePtHardAndClusterPt; // In MonteCarlo, jet events, reject events with too large cluster energy
598   Float_t          fPtHardAndClusterPtFactor;  // Factor between ptHard and cluster pT to reject/accept event.
599   
600   Float_t          fCTSPtMin;                  // pT Threshold on charged particles 
601   Float_t          fEMCALPtMin;                // pT Threshold on emcal clusters
602   Float_t          fPHOSPtMin;                 // pT Threshold on phos clusters
603   Float_t          fCTSPtMax;                  // pT Threshold on charged particles 
604   Float_t          fEMCALPtMax;                // pT Threshold on emcal clusters
605   Float_t          fPHOSPtMax;                 // pT Threshold on phos clusters
606   Bool_t           fUseEMCALTimeCut;           // Do time cut selection
607   Bool_t           fUseParamTimeCut;           // Use simple or parametrized time cut
608   Bool_t           fUseTrackTimeCut;           // Do time cut selection
609   Double_t         fEMCALTimeCutMin;           // Remove clusters/cells with time smaller than this value, in ns
610   Double_t         fEMCALTimeCutMax;           // Remove clusters/cells with time larger than this value, in ns
611   Float_t          fEMCALParamTimeCutMin[4];   // Remove clusters/cells with time smaller than parametrized value, in ns
612   Double_t         fEMCALParamTimeCutMax[4];   // Remove clusters/cells with time larger than parametrized value, in ns
613   Double_t         fTrackTimeCutMin;           // Remove tracks with time smaller than this value, in ns
614   Double_t         fTrackTimeCutMax;           // Remove tracks with time larger than this value, in ns
615   Bool_t           fUseTrackDCACut;            // Do DCA selection
616   Double_t         fTrackDCACut[3];            // Remove tracks with DCA larger than cut, parameters of function stored here
617
618   TList          * fAODBranchList ;            //-> List with AOD branches created and needed in analysis
619   TObjArray      * fCTSTracks ;                //-> temporal array with tracks
620   TObjArray      * fEMCALClusters ;            //-> temporal array with EMCAL CaloClusters
621   TObjArray      * fPHOSClusters ;             //-> temporal array with PHOS  CaloClusters
622   AliVCaloCells  * fEMCALCells ;               //! temporal array with EMCAL CaloCells
623   AliVCaloCells  * fPHOSCells ;                //! temporal array with PHOS  CaloCells
624
625   AliVEvent      * fInputEvent;                //! pointer to esd or aod input
626   AliAODEvent    * fOutputEvent;               //! pointer to aod output
627   AliMCEvent     * fMC;                        //! Monte Carlo Event Handler  
628
629   Bool_t           fFillCTS;                   // use data from CTS
630   Bool_t           fFillEMCAL;                 // use data from EMCAL
631   Bool_t           fFillPHOS;                  // use data from PHOS
632   Bool_t           fFillEMCALCells;            // use data from EMCAL
633   Bool_t           fFillPHOSCells;             // use data from PHOS
634   Bool_t           fRecalculateClusters;       // Correct clusters, recalculate them if recalibration parameters is given
635   Bool_t           fCorrectELinearity;         // Correct cluster linearity, always on
636   Bool_t           fSelectEmbeddedClusters;    // Use only simulated clusters that come from embedding.
637   
638   ULong_t          fTrackStatus        ;       // Track selection bit, select tracks refitted in TPC, ITS ...
639   ULong_t          fTrackFilterMask    ;       // Track selection bit, for AODs (any difference with track status?)
640   ULong_t          fTrackFilterMaskComplementary;       // Complementary Track selection bit, for AODs in case hybrid option selected
641   AliESDtrackCuts *fESDtrackCuts       ;       // Track cut
642   AliESDtrackCuts *fESDtrackComplementaryCuts; // Track cut, complementary cuts for hybrids
643   Bool_t           fConstrainTrack     ;       // Constrain Track to vertex
644   Bool_t           fSelectHybridTracks ;       // Select CTS tracks of type hybrid (only for AODs)
645   Bool_t           fSelectPrimaryTracks ;      // Select CTS tracks of type hybrid (only for AODs)
646   Bool_t           fSelectSPDHitTracks ;       // Ensure that track hits SPD layers
647   Int_t            fTrackMult          ;       // Track multiplicity
648   Float_t          fTrackMultEtaCut    ;       // Track multiplicity eta cut
649   Bool_t           fReadStack          ;       // Access kine information from stack
650   Bool_t                 fReadAODMCParticles ;       // Access kine information from filtered AOD MC particles
651         
652   TString          fDeltaAODFileName   ;       // Delta AOD file name
653   TString          fFiredTriggerClassName;     // Name of trigger event type used to do the analysis
654
655         // Trigger bit
656   UInt_t           fEventTriggerMask ;         // select this triggerered event
657   UInt_t           fMixEventTriggerMask ;      // select this triggerered event for mixing, tipically kMB or kAnyINT
658   Bool_t           fEventTriggerAtSE;          // select triggered event at SE base task or here
659   
660         Bool_t           fEventTrigMinBias ;         // Event is min bias on its name, it should correspond to AliVEvent::kMB, AliVEvent::kAnyInt
661         Bool_t           fEventTrigCentral ;         // Event is AliVEvent::kCentral on its name,  it should correspond to PbPb
662         Bool_t           fEventTrigSemiCentral ;     // Event is AliVEvent::kSemiCentral on its name,  it should correspond to PbPb 
663         Bool_t           fEventTrigEMCALL0 ;         // Event is EMCal L0 on its name, it should correspond to AliVEvent::kEMC7, AliVEvent::kEMC1
664         Bool_t           fEventTrigEMCALL1Gamma1 ;   // Event is L1-Gamma, threshold 1 on its name,  it should correspond kEMCEGA
665         Bool_t           fEventTrigEMCALL1Gamma2 ;   // Event is L1-Gamma, threshold 2 on its name,  it should correspond kEMCEGA  
666         Bool_t           fEventTrigEMCALL1Jet1 ;     // Event is L1-Gamma, threshold 1 on its name,  it should correspond kEMCEGA
667         Bool_t           fEventTrigEMCALL1Jet2 ;     // Event is L1-Gamma, threshold 2 on its name,  it should correspond kEMCEGA  
668         
669         Int_t            fBitEGA;                    // Trigger bit on VCaloTrigger for EGA
670         Int_t            fBitEJE;                    // Trigger bit on VCaloTrigger for EJE
671         
672   Bool_t           fAnaLED;                    // Analyze LED data only.
673
674   TString          fTaskName;                  // Name of task that executes the analysis
675         
676   AliCalorimeterUtils * fCaloUtils ;           //  Pointer to CalorimeterUtils
677
678   AliMixedEvent  * fMixedEvent  ;              //! mixed event object. This class is not the owner
679   Int_t            fNMixedEvent ;              // number of events in mixed event buffer
680   Double_t      ** fVertex      ;              //! vertex array 3 dim for each mixed event buffer
681   
682   TList **         fListMixedTracksEvents ;    //! Container for tracks stored for different events, used in case of own mixing, set in analysis class
683   TList **         fListMixedCaloEvents;       //! Container for photon stored for different events, used in case of own mixing, set in analysis class
684   Int_t            fLastMixedTracksEvent  ;    //  Temporary container with the last event added to the mixing list for tracks
685   Int_t            fLastMixedCaloEvent ;       //  Temporary container with the last event added to the mixing list for photons
686   
687   Bool_t           fWriteOutputDeltaAOD;       // Write the created delta AOD objects into file  
688         Bool_t           fOldAOD;                    // Old AODs, before revision 4.20
689   
690   Int_t            fV0ADC[2]    ;              // Integrated V0 signal
691   Int_t            fV0Mul[2]    ;              // Integrated V0 Multiplicity
692
693   TString          fEMCALClustersListName;     // Alternative list of clusters produced elsewhere and not from InputEvent
694   
695   // Event selection
696   Float_t          fZvtxCut ;                      // Cut on vertex position
697   Bool_t           fAcceptFastCluster;           // Accept events from fast cluster, exclude these events for LHC11a
698   Bool_t           fRemoveLEDEvents;             // Remove events where LED was wrongly firing - EMCAL LHC11a
699   
700   Bool_t           fRemoveBadTriggerEvents;      // Remove triggered events because trigger was exotic, bad, or out of BC
701   Bool_t           fTriggerPatchClusterMatch;    // Search for the trigger patch and check if associated cluster was the trigger
702   Int_t            fTriggerPatchTimeWindow[2];   // Trigger patch selection window
703   Float_t          fTriggerEventThreshold;       // Threshold to look for triggered events
704   Int_t            fTriggerClusterBC;            // Event triggered by a cluster in BC -5 0 to 5
705   Int_t            fTriggerClusterIndex;         // Index in clusters array of trigger cluster
706   Int_t            fTriggerClusterId;            // Id of trigger cluster (cluster->GetID())
707   Bool_t           fIsExoticEvent;               // Exotic trigger event flag
708   Bool_t           fIsBadCellEvent;              // Bad cell triggered event flag, any cell in cluster is bad
709   Bool_t           fIsBadMaxCellEvent;           // Bad cell triggered event flag, only max energy cell is bad
710   Bool_t           fIsTriggerMatch;              // Could match the event to a trigger patch?
711   Bool_t           fIsTriggerMatchOpenCut[3];    // Could not match the event to a trigger patch?, retry opening cuts
712   Bool_t           fTriggerClusterTimeRecal;     // In case cluster already calibrated, do not try to recalibrate even if recalib on in RecoUtils.
713   Bool_t           fRemoveUnMatchedTriggers;     // Analyze events where trigger patch and cluster where found or not
714   
715   
716   Bool_t           fDoEventSelection;            // Select events depending on V0, pileup, vertex well reconstructed, at least 1 track ...
717   Bool_t           fDoV0ANDEventSelection;       // Select events depending on V0, fDoEventSelection should be on
718   Bool_t           fDoVertexBCEventSelection;    // Select events with vertex on BC=0 or -100
719   Bool_t           fDoRejectNoTrackEvents;       // Reject events with no selected tracks in event
720   Bool_t           fUseEventsWithPrimaryVertex ; // Select events with primary vertex
721   AliTriggerAnalysis* fTriggerAnalysis;          // Access to trigger selection algorithm for V0AND calculation
722   
723   Bool_t           fTimeStampEventSelect;        // Select events within a fraction of data taking time
724   Float_t          fTimeStampEventFracMin;       // Minimum value of time stamp fraction event
725   Float_t          fTimeStampEventFracMax;       // Maximum value of time stamp fraction event
726   Double_t         fTimeStampRunMin;             // Minimum value of time stamp in run
727   Double_t         fTimeStampRunMax;             // Maximum value of time stamp in run
728   
729   Double_t         fPileUpParamSPD[5];           // Parameters to pass to method IsPileupFromSPD: Int_t minContributors,
730                                                  // Double_t minZdist, 
731                                                  // Double_t nSigmaZdist, 
732                                                  // Double_t nSigmaDiamXY, 
733                                                  // Double_t nSigmaDiamZ)
734   
735   // Pile-up in EMCal
736   Int_t            fNPileUpClusters;             // Number of clusters with time avobe 20 ns
737   Int_t            fNNonPileUpClusters;          // Number of clusters with time below 20 ns
738   Int_t            fNPileUpClustersCut;          // Cut to select event as pile-up
739   Int_t            fEMCalBCEvent[19];            // Fill one entry per event if there is a cluster in a given BC
740   Int_t            fEMCalBCEventCut[19];         // Fill one entry per event if there is a cluster in a given BC, depend on cluster E, acceptance cut
741   Int_t            fTrackBCEvent[19];            // Fill one entry per event if there is a track in a given BC
742   Int_t            fTrackBCEventCut[19];         // Fill one entry per event if there is a track in a given BC, depend on track pT, acceptance cut
743   Int_t            fVertexBC;                    // Vertex BC
744   Bool_t           fRecalculateVertexBC;         // Recalculate vertex BC from tracks pointing to vertex
745   
746   //Centrality/Event plane
747   TString          fCentralityClass;            // Name of selected centrality class     
748   Int_t            fCentralityOpt;              // Option for the returned value of the centrality, possible options 5, 10, 100
749   Int_t            fCentralityBin[2];           // Minimum and maximum value of the centrality for the analysis
750   TString          fEventPlaneMethod;           // Name of event plane method, by default "Q"
751
752   Bool_t           fAcceptOnlyHIJINGLabels;     // Select clusters or tracks that where generated by HIJING, reject other generators in case of cocktail
753   Int_t            fNMCProducedMin;             // In case of cocktail, select particles in the list with label from this value
754   Int_t            fNMCProducedMax;             // In case of cocktail, select particles in the list with label up to this value
755   
756   // jets
757   Bool_t           fFillInputNonStandardJetBranch;  // Flag to use data from non standard jets
758   TClonesArray *   fNonStandardJets;                //! temporal array with jets
759   TString          fInputNonStandardJetBranchName;  // Name of non standard jet branch
760   
761   TArrayI          fAcceptEventsWithBit;           // Accept events if trigger bit is on
762   TArrayI          fRejectEventsWithBit;           // Reject events if trigger bit is on
763
764   AliCaloTrackReader(              const AliCaloTrackReader & r) ; // cpy ctor
765   AliCaloTrackReader & operator = (const AliCaloTrackReader & r) ; // cpy assignment
766   
767   ClassDef(AliCaloTrackReader,63)
768   
769 } ;
770
771
772 #endif //ALICALOTRACKREADER_H
773
774
775