]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG/CaloTrackCorrBase/AliCaloTrackReader.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliCaloTrackReader.h
index da2991a5794d6a3859e6f3e31aaa3dcaa115c7a8..d5b4a591a05b31f3ba964cade5a7e10b77446cc9 100755 (executable)
@@ -2,7 +2,6 @@
 #define ALICALOTRACKREADER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
-/* $Id:  $ */
 
 //_________________________________________________________________________
 // Base class for reading data: MonteCarlo, ESD or AOD, of PHOS EMCAL and 
@@ -22,11 +21,11 @@ class TTree ;
 class TArrayI ;
 
 //--- ANALYSIS system ---
+#include "AliVEvent.h"
 class AliVCaloCells;
 class AliStack; 
 class AliHeader; 
 class AliGenEventHeader; 
-#include "AliVEvent.h"
 class AliAODEvent;
 class AliMCEvent;
 class AliMixedEvent;
@@ -37,9 +36,9 @@ class AliTriggerAnalysis;
 class AliEventplane;
 class AliVCluster;
 
-// --- PartCorr / EMCAL ---
-class AliEMCALRecoUtils;
+// --- CaloTrackCorr / EMCAL ---
 #include "AliFiducialCut.h"
+class AliEMCALRecoUtils;
 class AliCalorimeterUtils;
 
 class AliCaloTrackReader : public TObject {
@@ -74,14 +73,16 @@ public:
   void            SetTaskName(TString name)                { fTaskName = name              ; }
     
   //---------------------------------------
-  //Input/output event setters and getters
+  // Input/output event setters and getters
   //---------------------------------------
-  virtual void    SetInputEvent(AliVEvent* const input) ;
-  virtual void    SetOutputEvent(AliAODEvent* const aod)   { fOutputEvent = aod            ; }
+  
+  virtual void    SetInputEvent(AliVEvent* input) ;
+  virtual void    SetOutputEvent(AliAODEvent*  aod)        { fOutputEvent = aod            ; }
   virtual void    SetMC(AliMCEvent* const mc)              { fMC          = mc             ; }
   virtual void    SetInputOutputMCEvent(AliVEvent* /*esd*/, AliAODEvent* /*aod*/, AliMCEvent* /*mc*/) { ; }
   
   // Delta AODs
+  
   virtual TList * GetAODBranchList()                 const { return fAODBranchList         ; }
   void            SetDeltaAODFileName(TString name )       { fDeltaAODFileName = name      ; }
   TString         GetDeltaAODFileName()              const { return fDeltaAODFileName      ; }
@@ -90,10 +91,11 @@ public:
   Bool_t          WriteDeltaAODToFile()              const { return fWriteOutputDeltaAOD   ; } 
   
   //------------------------------------------------------------
-  //Clusters/Tracks arrays filtering/filling methods and switchs 
+  // Clusters/Tracks arrays filtering/filling methods and switchs 
   //------------------------------------------------------------
   
-  //Minimum pt setters and getters 
+  // Minimum pt setters and getters
+  
   Float_t          GetEMCALPtMin()                   const { return fEMCALPtMin            ; }
   Float_t          GetPHOSPtMin()                    const { return fPHOSPtMin             ; }
   Float_t          GetCTSPtMin()                     const { return fCTSPtMin              ; }
@@ -119,25 +121,70 @@ public:
   void             SetEMCALEMax (Float_t  e)               { SetEMCALPtMax(e)              ; }
   void             SetPHOSEMax  (Float_t  e)               { SetPHOSPtMax (e)              ; }
   
+  // Track DCA cut
+  
+  Bool_t           AcceptDCA(Float_t pt, Float_t dca);
+  Double_t         GetTrackDCACut(Int_t i)           const { if(i >= 0 && i < 3 ) return fTrackDCACut[i] ;
+                                                             else return -999              ; }
+  
+  void             SetTrackDCACut(Int_t i, Float_t cut)    { if(i >= 0 && i < 3 )
+                                                             fTrackDCACut[i] = cut         ; }
+  
+  void             SwitchOnUseTrackDCACut()                { fUseTrackDCACut = kTRUE       ; }
+  void             SwitchOffUseTrackDCACut()               { fUseTrackDCACut = kFALSE      ; }
+  Bool_t           IsDCACutOn()                      const { return fUseTrackDCACut        ; }
+  
+  // Time cut
+  
+  Double_t         GetTrackTimeCutMin()              const { return fTrackTimeCutMin       ; }
+  Double_t         GetTrackTimeCutMax()              const { return fTrackTimeCutMax       ; }
+  
+  void             SetTrackTimeCut(Double_t a, Double_t b) { fTrackTimeCutMin = a ;
+                                                             fTrackTimeCutMax = b          ; } // ns
+  
+  void             SwitchOnUseTrackTimeCut()               { fUseTrackTimeCut = kTRUE      ; }
+  void             SwitchOffUseTrackTimeCut()              { fUseTrackTimeCut = kFALSE     ; }
+  
+  Double_t         GetEMCALTimeCutMin()              const { return fEMCALTimeCutMin       ; }
+  Double_t         GetEMCALTimeCutMax()              const { return fEMCALTimeCutMax       ; } 
+
+  Bool_t           IsInTimeWindow(Double_t tof, Float_t energy)  const ;
+  
+  void             SetEMCALTimeCut(Double_t a, Double_t b) { fEMCALTimeCutMin = a ; 
+                                                             fEMCALTimeCutMax = b          ; } // ns
+  
+  void             SetEMCALParametrizedMinTimeCut(Int_t i, Float_t par) { fEMCALParamTimeCutMin[i] = par ; } 
+  void             SetEMCALParametrizedMaxTimeCut(Int_t i, Float_t par) { fEMCALParamTimeCutMax[i] = par ; } 
+  
+  void             SwitchOnUseEMCALTimeCut()               { fUseEMCALTimeCut = kTRUE      ; }
+  void             SwitchOffUseEMCALTimeCut()              { fUseEMCALTimeCut = kFALSE     ; }
+  
+  void             SwitchOnUseParametrizedTimeCut()        { fUseParamTimeCut = kTRUE      ; }
+  void             SwitchOffUseParametrizedTimeCut()       { fUseParamTimeCut = kFALSE     ; }
+
+  // Fidutial cuts
   
-  // Fidutial cuts  
   virtual AliFiducialCut * GetFiducialCut()                { 
                     if(!fFiducialCut) fFiducialCut = new AliFiducialCut(); 
                     return  fFiducialCut                                                   ; }
-  virtual void     SetFiducialCut(AliFiducialCut * const fc) { fFiducialCut = fc           ; }
+  virtual void     SetFiducialCut(AliFiducialCut * fc)     { fFiducialCut = fc           ; }
   virtual Bool_t   IsFiducialCutOn()                 const { return fCheckFidCut           ; }
   virtual void     SwitchOnFiducialCut()                   { fCheckFidCut = kTRUE          ; 
                                                              fFiducialCut = new AliFiducialCut() ; }
   virtual void     SwitchOffFiducialCut()                  { fCheckFidCut = kFALSE         ; }
   
   // Cluster origin
+  
   Bool_t           IsEMCALCluster(AliVCluster *clus) const;
   Bool_t           IsPHOSCluster (AliVCluster *clus) const;
-  //Patch for cluster origin for Old AODs implementation
+  
+  // Patch for cluster origin for Old AODs implementation
+  
   void             SwitchOnOldAODs()                       { fOldAOD = kTRUE               ; }
   void             SwitchOffOldAODs()                      { fOldAOD = kFALSE              ; }
   
   // Cluster/track/cells switchs
+  
   Bool_t           IsCTSSwitchedOn()                 const { return fFillCTS               ; }
   void             SwitchOnCTS()                           { fFillCTS = kTRUE              ; }
   void             SwitchOffCTS()                          { fFillCTS = kFALSE             ; }
@@ -161,34 +208,39 @@ public:
   Bool_t           AreClustersRecalculated()         const { return fRecalculateClusters   ; }
   void             SwitchOnClusterRecalculation()          { fRecalculateClusters = kTRUE  ; }
   void             SwitchOffClusterRecalculation()         { fRecalculateClusters = kFALSE ; }  
-  
+
+  void             SwitchOnClusterELinearityCorrection()   { fCorrectELinearity = kTRUE    ; }
+  void             SwitchOffClusterELinearityCorrection()  { fCorrectELinearity = kFALSE   ; }
+
   Bool_t           IsEmbeddedClusterSelectionOn()    const { return fSelectEmbeddedClusters   ; }
   void             SwitchOnEmbeddedClustersSelection()     { fSelectEmbeddedClusters = kTRUE  ; }
   void             SwitchOffEmbeddedClustersSelection()    { fSelectEmbeddedClusters = kFALSE ; }
   
   // Filling/ filtering / detector information access methods
-  virtual Bool_t   FillInputEvent(const Int_t iEntry, const char *currentFileName)  ;
+  
+  virtual Bool_t   FillInputEvent(Int_t iEntry, const char *currentFileName)  ;
   virtual void     FillInputCTS() ;
   virtual void     FillInputEMCAL() ;
-  virtual void     FillInputEMCALAlgorithm(AliVCluster * clus, const Int_t iclus) ;
+  virtual void     FillInputEMCALAlgorithm(AliVCluster * clus, Int_t iclus) ;
   virtual void     FillInputPHOS() ;
   virtual void     FillInputEMCALCells() ;
   virtual void     FillInputPHOSCells() ;
   virtual void     FillInputVZERO() ;  
   
-  Int_t            GetV0Signal(Int_t i)              const { return fV0ADC[i]              ; }
-  Int_t            GetV0Multiplicity(Int_t i)        const { return fV0Mul[i]              ; }
+  Int_t            GetV0Signal(Int_t i)              const { return fV0ADC[i]               ; }
+  Int_t            GetV0Multiplicity(Int_t i)        const { return fV0Mul[i]               ; }
   
-  void             SetEMCALClusterListName(TString &name)  { fEMCALClustersListName = name ; }
-  TString          GetEMCALClusterListName()         const { return fEMCALClustersListName ; }
+  void             SetEMCALClusterListName(TString &name)  { fEMCALClustersListName = name  ; }
+  TString          GetEMCALClusterListName()         const { return fEMCALClustersListName  ; }
 
-  // Arrayes with clusters/track/cells access method
-  virtual TObjArray*     GetCTSTracks()              const { return fCTSTracks             ; }
-  virtual TObjArray*     GetEMCALClusters()          const { return fEMCALClusters         ; }
-  virtual TObjArray*     GetPHOSClusters()           const { return fPHOSClusters          ; }
-  virtual AliVCaloCells* GetEMCALCells()             const { return fEMCALCells            ; }
-  virtual AliVCaloCells* GetPHOSCells()              const { return fPHOSCells             ; }
-   
+  // Arrays with clusters/track/cells access method
+  
+  virtual TObjArray*     GetCTSTracks()              const { return fCTSTracks              ; }
+  virtual TObjArray*     GetEMCALClusters()          const { return fEMCALClusters          ; }
+  virtual TObjArray*     GetPHOSClusters()           const { return fPHOSClusters           ; }
+  virtual AliVCaloCells* GetEMCALCells()             const { return fEMCALCells             ; }
+  virtual AliVCaloCells* GetPHOSCells()              const { return fPHOSCells              ; }
+  
   //-------------------------------------
   // Event/track selection methods
   //-------------------------------------
@@ -197,56 +249,201 @@ public:
   void             RejectFastClusterEvents()               { fAcceptFastCluster     = kFALSE ; }  
   Bool_t           IsFastClusterAccepted()           const { return fAcceptFastCluster       ; }   
   
+  Bool_t           AcceptEventWithTriggerBit();
+  Bool_t           RejectEventWithTriggerBit();
+  void             SetAcceptEventsWithBit(UInt_t bit)      { Int_t n = fAcceptEventsWithBit.GetSize();
+                                                             fAcceptEventsWithBit.Set(n+1);
+                                                             fAcceptEventsWithBit.AddAt(bit,n) ; }
+  
+  void             SetRejectEventsWithBit(UInt_t bit)      { Int_t n = fRejectEventsWithBit.GetSize();
+                                                             fRejectEventsWithBit.Set(n+1);
+                                                             fRejectEventsWithBit.AddAt(bit,n) ; }
+
   void             SwitchOnLEDEventsRemoval()              { fRemoveLEDEvents       = kTRUE  ; }
-  void             SwitchOffLEDEventsRemoval()             { fRemoveLEDEvents       = kFALSE ; } 
+  void             SwitchOffLEDEventsRemoval()             { fRemoveLEDEvents       = kFALSE ; }
   Bool_t           IsLEDEventRemoved()               const { return fRemoveLEDEvents         ; }   
-
+  Bool_t           RejectLEDEvents();
+  
   void             SetFiredTriggerClassName(TString name ) { fFiredTriggerClassName = name   ; }
   TString          GetFiredTriggerClassName()        const { return fFiredTriggerClassName   ; }
-  TString          GetFiredTriggerClasses() ;               
-  
+  TString          GetFiredTriggerClasses()          const { return GetInputEvent()->GetFiredTriggerClasses() ; }
+  
+  UInt_t           GetEventTriggerMask()             const { return fEventTriggerMask        ; }
+  void             SetEventTriggerMask(UInt_t evtTrig = AliVEvent::kAny) 
+                                                           { fEventTriggerMask = evtTrig     ; }
+       Bool_t           IsEventTriggerAtSEOn()            const { return fEventTriggerAtSE        ; }
+  void             SwitchOnEventTriggerAtSE()              { fEventTriggerAtSE      = kTRUE  ; }
+  void             SwitchOffEventTriggerAtSE()             { fEventTriggerAtSE      = kFALSE ; }
+               
+       
+  TArrayI          GetTriggerPatches(Int_t tmin, Int_t tmax);
+  void             MatchTriggerCluster(TArrayI patches);
+
+  Bool_t           IsExoticEvent()                         { return fIsExoticEvent           ; }  
+  Bool_t           IsBadCellTriggerEvent()                 { return fIsBadCellEvent          ; }
+  Bool_t           IsBadMaxCellTriggerEvent()              { return fIsBadMaxCellEvent       ; }
+  Bool_t           IsTriggerMatched()                      { return fIsTriggerMatch          ; }
+  Bool_t           IsTriggerMatchedOpenCuts(Int_t i)       { return fIsTriggerMatchOpenCut[i]; }
+  
+  Int_t            GetTriggerClusterBC()                   { return fTriggerClusterBC        ; }
+  Int_t            GetTriggerClusterIndex()                { return fTriggerClusterIndex     ; }
+  Int_t            GetTriggerClusterId()                   { return fTriggerClusterId        ; }
+  
+  Float_t          GetEventTriggerThreshold()              { return fTriggerEventThreshold   ; }
+  void             SetEventTriggerThreshold(Float_t tr)    { fTriggerEventThreshold   = tr   ; }
+
+  void             SetTriggerPatchTimeWindow(Int_t min, Int_t max) { fTriggerPatchTimeWindow[0] = min ;
+                                                                     fTriggerPatchTimeWindow[1] = max ; }
+  
+  void             SwitchOffBadTriggerEventsRemoval()      { fRemoveBadTriggerEvents   = kFALSE ; }
+  void             SwitchOnBadTriggerEventsRemoval()       { fRemoveBadTriggerEvents   = kTRUE  ; }
+
+  void             SwitchOffUnMatchedTriggerEventsRemoval(){ fRemoveUnMatchedTriggers  = kFALSE ; }
+  void             SwitchOnUnMatchedTriggerEventsRemoval() { fRemoveUnMatchedTriggers  = kTRUE  ; }
+  
+  void             SwitchOffTriggerPatchMatching()         { fTriggerPatchClusterMatch = kFALSE ; }
+  void             SwitchOnTriggerPatchMatching()          { fTriggerPatchClusterMatch = kTRUE  ; }
+
+  void             SwitchOnTriggerClusterTimeRecal ()      { fTriggerClusterTimeRecal  = kTRUE  ; }
+  void             SwitchOffTriggerClusterTimeRecal()      { fTriggerClusterTimeRecal  = kFALSE ; }
+  
+  UInt_t           GetMixEventTriggerMask()             const { return fMixEventTriggerMask  ; }
+  void             SetMixEventTriggerMask(UInt_t evtTrig = AliVEvent::kAnyINT) 
+                                                           { fMixEventTriggerMask = evtTrig  ; }
+       void             SetEventTriggerBit();
+       Bool_t           IsEventMinimumBias()              const { return fEventTrigMinBias        ; }
+       Bool_t           IsEventCentral()                  const { return fEventTrigCentral        ; }
+       Bool_t           IsEventSemiCentral()              const { return fEventTrigSemiCentral    ; }
+       Bool_t           IsEventEMCALL0()                  const { return fEventTrigEMCALL0        ; }
+       Bool_t           IsEventEMCALL1Gamma1()            const { return fEventTrigEMCALL1Gamma1  ; }
+       Bool_t           IsEventEMCALL1Gamma2()            const { return fEventTrigEMCALL1Gamma2  ; }
+       Bool_t           IsEventEMCALL1Jet1()              const { return fEventTrigEMCALL1Jet1    ; }
+       Bool_t           IsEventEMCALL1Jet2()              const { return fEventTrigEMCALL1Jet2    ; }
+       Bool_t           IsEventEMCALL1Gamma()             const { return (fEventTrigEMCALL1Gamma1 || fEventTrigEMCALL1Gamma2) ; }
+  Bool_t           IsEventEMCALL1Jet()               const { return (fEventTrigEMCALL1Jet1   || fEventTrigEMCALL1Jet2  ) ; }
+       Bool_t           IsEventEMCALL1()                  const { return (IsEventEMCALL1Gamma()   || IsEventEMCALL1Jet()    ) ; }
+       
+       
   void             SwitchOnEventSelection()                { fDoEventSelection      = kTRUE  ; }
   void             SwitchOffEventSelection()               { fDoEventSelection      = kFALSE ; }
-  Bool_t           IsEventSelectionDone()            const { return fDoEventSelection        ; } 
+  Bool_t           IsEventSelectionDone()            const { return fDoEventSelection        ; }
   
   void             SwitchOnV0ANDSelection()                { fDoV0ANDEventSelection = kTRUE  ; }
   void             SwitchOffV0ANDSelection()               { fDoV0ANDEventSelection = kFALSE ; }
   Bool_t           IsV0ANDEventSelectionDone()       const { return fDoV0ANDEventSelection   ; } 
 
+  void             SwitchOnVertexBCEventSelection()        { fDoVertexBCEventSelection = kTRUE  ; }
+  void             SwitchOffVertexBCEventSelection()       { fDoVertexBCEventSelection = kFALSE ; }
+  Bool_t           IsVertexBCEventSelectionDone()    const { return fDoVertexBCEventSelection   ; }
+  
   void             SwitchOnPrimaryVertexSelection()        { fUseEventsWithPrimaryVertex = kTRUE  ; }
   void             SwitchOffPrimaryVertexSelection()       { fUseEventsWithPrimaryVertex = kFALSE ; }
   Bool_t           IsPrimaryVertexSelectionDone()    const { return fUseEventsWithPrimaryVertex   ; } 
   
+  void             SwitchOnRejectNoTrackEvents()           { fDoRejectNoTrackEvents = kTRUE  ; }
+  void             SwitchOffRejectNoTrackEvents()          { fDoRejectNoTrackEvents = kFALSE ; }
+  Bool_t           IsEventWithNoTrackRejectionDone() const { return fDoRejectNoTrackEvents   ; }
+  
+
+  // Time Stamp
+  
+  Double_t         GetRunTimeStampMin()              const { return fTimeStampRunMin         ; }
+  Double_t         GetRunTimeStampMax()              const { return fTimeStampRunMax         ; }
+  
+  void             SetRunTimeStamp(Double_t a, Double_t b) { fTimeStampRunMin = a            ;
+                                                             fTimeStampRunMax = b            ; } // seconds
+  
+  Float_t          GetEventTimeStampFractionMin()    const { return fTimeStampEventFracMin   ; }
+  Float_t          GetEventTimeStampFractionMax()    const { return fTimeStampEventFracMax   ; }
+  
+  void             SetEventTimeStampFraction(Float_t a, Float_t b) { fTimeStampEventFracMin = a ;
+                                                                     fTimeStampEventFracMax = b ; }
+  
+  void             SwitchOnSelectEventTimeStamp()          { fTimeStampEventSelect = kTRUE   ; }
+  void             SwitchOffSelectEventTimeStamp()         { fTimeStampEventSelect = kFALSE  ; }
+  
+  Bool_t           IsSelectEventTimeStampOn()              {return  fTimeStampEventSelect    ; }
+  
+  Bool_t           IsPileUpFromSPD()               const ;
+  Bool_t           IsPileUpFromEMCal()             const ;
+  Bool_t           IsPileUpFromSPDAndEMCal()       const ;
+  Bool_t           IsPileUpFromSPDOrEMCal()        const ;
+  Bool_t           IsPileUpFromSPDAndNotEMCal()    const ;
+  Bool_t           IsPileUpFromEMCalAndNotSPD()    const ;
+  Bool_t           IsPileUpFromNotSPDAndNotEMCal() const ;
+
+  void             SetPileUpParamForSPD  (Int_t i, Double_t param)
+                                                           { fPileUpParamSPD[i]  = param  ; }
+  void             SetPileUpParamForEMCal(Int_t param)     { fNPileUpClustersCut = param  ; }
+  
+  Int_t            GetNPileUpClusters()                    { return  fNPileUpClusters     ; }
+  Int_t            GetNNonPileUpClusters()                 { return  fNNonPileUpClusters  ; }
+  
+  Int_t            GetEMCalEventBC(Int_t bc)     const     { if(bc >=0 && bc < 19) return  fEMCalBCEvent   [bc] ; else return 0 ; }
+  Int_t            GetTrackEventBC(Int_t bc)     const     { if(bc >=0 && bc < 19) return  fTrackBCEvent   [bc] ; else return 0 ; }
+  Int_t            GetEMCalEventBCcut(Int_t bc)  const     { if(bc >=0 && bc < 19) return  fEMCalBCEventCut[bc] ; else return 0 ; }
+  Int_t            GetTrackEventBCcut(Int_t bc)  const     { if(bc >=0 && bc < 19) return  fTrackBCEventCut[bc] ; else return 0 ; }
+
+  void             SetEMCalEventBC(Int_t bc)               { if(bc >=0 && bc < 19) fEMCalBCEvent   [bc] = 1 ; }
+  void             SetTrackEventBC(Int_t bc)               { if(bc >=0 && bc < 19) fTrackBCEvent   [bc] = 1 ; }
+  void             SetEMCalEventBCcut(Int_t bc)            { if(bc >=0 && bc < 19) fEMCalBCEventCut[bc] = 1 ; }
+  void             SetTrackEventBCcut(Int_t bc)            { if(bc >=0 && bc < 19) fTrackBCEventCut[bc] = 1 ; }
+
+  Int_t            GetVertexBC(const AliVVertex * vtx);
+  Int_t            GetVertexBC()                  const    { return fVertexBC              ; }
+  void             SwitchOnRecalculateVertexBC()           { fRecalculateVertexBC = kTRUE  ; }
+  void             SwitchOffRecalculateVertexBC()          { fRecalculateVertexBC = kFALSE ; }
+  
   // Track selection
-  ULong_t          GetTrackStatus()                  const { return fTrackStatus       ; }
-  void             SetTrackStatus(ULong_t bit)             { fTrackStatus = bit        ; }             
+  
+  ULong_t          GetTrackStatus()                  const { return fTrackStatus          ; }
+  void             SetTrackStatus(ULong_t bit)             { fTrackStatus = bit           ; }          
 
-  ULong_t          GetTrackFilterMask()              const {return fTrackFilterMask    ; }
-  void             SetTrackFilterMask(ULong_t bit)         { fTrackFilterMask = bit    ; }             
+  ULong_t          GetTrackFilterMask()              const { return fTrackFilterMask       ; }
+  void             SetTrackFilterMask(ULong_t bit)         { fTrackFilterMask = bit       ; }
+  
+  ULong_t          GetTrackFilterMaskComplementary() const { return fTrackFilterMaskComplementary       ; }
+  void             SetTrackFilterMaskComplementary(ULong_t bit) {   fTrackFilterMaskComplementary = bit ; }
   
-  AliESDtrackCuts* GetTrackCuts()                    const { return fESDtrackCuts      ; }
+  AliESDtrackCuts* GetTrackCuts()                    const { return fESDtrackCuts         ; }
   void             SetTrackCuts(AliESDtrackCuts * cuts)    ;
+
+  AliESDtrackCuts* GetTrackComplementaryCuts()       const { return fESDtrackComplementaryCuts ; }
+  void             SetTrackComplementaryCuts(AliESDtrackCuts * cuts)  ;
+
+  
+  void             SwitchOnConstrainTrackToVertex()        { fConstrainTrack     = kTRUE  ; } 
+  void             SwitchOffConstrainTrackToVertex()       { fConstrainTrack     = kFALSE ; }
   
-  Int_t            GetTrackMultiplicity()            const { return fTrackMult         ; }
-  Float_t          GetTrackMultiplicityEtaCut()      const { return fTrackMultEtaCut   ; }
-  void             SetTrackMultiplicityEtaCut(Float_t eta) { fTrackMultEtaCut = eta    ; }             
+  void             SwitchOnAODHybridTrackSelection()       { fSelectHybridTracks = kTRUE  ; } 
+  void             SwitchOffAODHybridTrackSelection()      { fSelectHybridTracks = kFALSE ; }      
+
+  void             SwitchOnAODPrimaryTrackSelection()      { fSelectPrimaryTracks = kTRUE  ; }
+  void             SwitchOffAODPrimaryTrackSelection()     { fSelectPrimaryTracks = kFALSE ; }
+  
+  void             SwitchOnTrackHitSPDSelection()          { fSelectSPDHitTracks = kTRUE  ; }
+  void             SwitchOffTrackHitSPDSelection()         { fSelectSPDHitTracks = kFALSE ; }
+
+  void             SwitchOnAODTrackSharedClusterSelection() { fSelectFractionTPCSharedClusters = kTRUE  ; }
+  void             SwitchOffAODTrackSharedClusterSelection(){ fSelectFractionTPCSharedClusters = kFALSE ; }
+
+  void             SetTPCSharedClusterFraction(Float_t fr) { fCutTPCSharedClustersFraction = fr   ; }
+  Float_t          GetTPCSharedClusterFraction() const     { return fCutTPCSharedClustersFraction ; }
+  
+  Int_t            GetTrackMultiplicity()            const { return fTrackMult            ; }
+  Float_t          GetTrackMultiplicityEtaCut()      const { return fTrackMultEtaCut      ; }
+  void             SetTrackMultiplicityEtaCut(Float_t eta) { fTrackMultEtaCut = eta       ; }          
   
   // Calorimeter specific and patches
-  void             AnalyzeOnlyLED()                        { fAnaLED = kTRUE           ; }
-  void             AnalyzeOnlyPhysics()                    { fAnaLED = kFALSE          ; }
-  
-  void             SwitchOnCaloFilterPatch()               { fCaloFilterPatch = kTRUE  ; 
-                                                             fFillCTS = kFALSE         ; }
-  void             SwitchOffCaloFilterPatch()              { fCaloFilterPatch = kFALSE ; }
-  Bool_t           IsCaloFilterPatchOn()             const { 
-                    if(fDataType == kAOD) { return fCaloFilterPatch ; } 
-                    else                  { return kFALSE           ; }                  }
-       
+  void             AnalyzeOnlyLED()                        { fAnaLED             = kTRUE  ; }
+  void             AnalyzeOnlyPhysics()                    { fAnaLED             = kFALSE ; }
+  
   //-------------------------------
-  //Vertex methods
+  // Vertex methods
   //-------------------------------
+
   virtual void      GetVertex(Double_t v[3])         const ;
-  virtual Double_t* GetVertex(const Int_t evtIndex)  const { return fVertex[evtIndex]            ; }
+  virtual Double_t* GetVertex(Int_t evtIndex)        const { return fVertex[evtIndex]            ; }
   virtual void      GetVertex(Double_t vertex[3],    const Int_t evtIndex) const ;
   virtual void      FillVertexArray();
   virtual Bool_t    CheckForPrimaryVertex();
@@ -256,7 +453,9 @@ public:
   //--------------------------
   // Centrality / Event Plane
   //--------------------------
-  virtual AliCentrality* GetCentrality()             const { return fInputEvent->GetCentrality() ; } //Look in AOD reader, different there
+
+  virtual AliCentrality* GetCentrality()             const { if(fDataType!=kMC) return fInputEvent->GetCentrality() ;
+                                                             else               return 0x0       ; } 
   virtual void     SetCentralityClass(TString name)        { fCentralityClass   = name           ; }
   virtual void     SetCentralityOpt(Int_t opt)             { fCentralityOpt     = opt            ; }
   virtual TString  GetCentralityClass()              const { return fCentralityClass             ; }
@@ -268,36 +467,63 @@ public:
   virtual Float_t  GetCentralityBin(Int_t i)         const { if(i < 0 || i > 1) return 0 ; 
                                                              else return fCentralityBin[i]              ; }
   
-  virtual AliEventplane* GetEventPlane()             const { return fInputEvent->GetEventplane() ; }           
+  virtual AliEventplane* GetEventPlane()             const { if(fDataType!=kMC) return fInputEvent->GetEventplane() ;
+                                                             else               return 0x0       ; }  
+  virtual Double_t       GetEventPlaneAngle()        const ;          
   virtual void           SetEventPlaneMethod(TString m)    { fEventPlaneMethod = m               ; }
   virtual TString        GetEventPlaneMethod()       const { return fEventPlaneMethod            ; }
 
+  //--------------------
+  // Mixing
+  //--------------------
+
+  Int_t   GetLastCaloMixedEvent()                    const { return fLastMixedCaloEvent          ; }
+  Int_t   GetLastTracksMixedEvent ()                 const { return fLastMixedTracksEvent        ; }
+  
+  TList * GetListWithMixedEventsForCalo  (Int_t bi)  const { if(fListMixedCaloEvents)   return fListMixedCaloEvents[bi]     ; else return 0 ; }
+  TList * GetListWithMixedEventsForTracks(Int_t bi)  const { if(fListMixedTracksEvents) return fListMixedTracksEvents [bi]  ; else return 0 ; }  
+   
+  Bool_t  ListWithMixedEventsForCaloExists()         const { if(fListMixedCaloEvents) return kTRUE  ;
+                                                             else                     return kFALSE ; }
+
+  Bool_t  ListWithMixedEventsForTracksExists()       const { if(fListMixedTracksEvents) return kTRUE  ;
+                                                             else                       return kFALSE ; }
+  
+  void    SetLastCaloMixedEvent  (Int_t e)                 { fLastMixedCaloEvent    = e          ; }
+  void    SetLastTracksMixedEvent(Int_t e)                 { fLastMixedTracksEvent  = e          ; }
+  
+  void    SetListWithMixedEventsForCalo (TList ** l)       { 
+            if(fListMixedCaloEvents) printf("AliCaloTrackReader::SetListWithMixedEventsForCalo() - Track Mixing event list already set, nothing done\n");
+            else                        fListMixedCaloEvents    = l ; }
+  
+  void    SetListWithMixedEventsForTracks(TList ** l)      { 
+            if(fListMixedTracksEvents)  printf("AliCaloTrackReader::SetListWithMixedEventsForTracks() - Calorimeter Mixing event list already set, nothing done\n");
+            else                        fListMixedTracksEvents  = l ; }
+  
   //-------------------------------------
   // Other methods
   //-------------------------------------
+  
   AliCalorimeterUtils * GetCaloUtils()               const { return fCaloUtils                   ; }
   void             SetCaloUtils(AliCalorimeterUtils * caloutils)  { fCaloUtils = caloutils       ; }  
   
   virtual Double_t GetBField()                       const { return fInputEvent->GetMagneticField()  ; } 
   
-  void    SetImportGeometryFromFile(Bool_t import, 
-                                    TString path = ".")    { 
-                                                             fImportGeometryFromFile = import    ; 
-                                                             fImportGeometryFilePath = path      ; }      
-  
   //------------------------------------------------
   // MC analysis specific methods
   //-------------------------------------------------
   
-  //Kinematics and galice.root available 
+  // Kinematics and galice.root available
+  
   virtual AliStack*          GetStack()              const ;
   virtual AliHeader*         GetHeader()             const ;
   virtual AliGenEventHeader* GetGenEventHeader()     const ;
   
-  //Filtered kinematics in AOD 
-  virtual TClonesArray*     GetAODMCParticles(Int_t input = 0) const ;
-  virtual AliAODMCHeader*   GetAODMCHeader(Int_t input = 0)    const ;
-       
+  // Filtered kinematics in AOD
+  
+  virtual TClonesArray*     GetAODMCParticles()      const ;
+  virtual AliAODMCHeader*   GetAODMCHeader   ()      const ;
+  
   virtual AliVEvent*        GetInputEvent()          const { return fInputEvent            ; }
   virtual AliVEvent*        GetOriginalInputEvent()  const { return 0x0                    ; }
   virtual AliAODEvent*      GetOutputEvent()         const { return fOutputEvent           ; }
@@ -312,14 +538,29 @@ public:
   Bool_t           ReadStack()                       const { return fReadStack             ; }
   Bool_t           ReadAODMCParticles()              const { return fReadAODMCParticles    ; }
        
-  //Select generated events, depending on comparison of pT hard and jets.
+  void             RemapMCLabelForAODs(Int_t &label);
+  
+  // Select generated events, depending on comparison of pT hard and jets
+    
   virtual Bool_t   ComparePtHardAndJetPt() ;
   virtual Bool_t   IsPtHardAndJetPtComparisonSet()       const { return  fComparePtHardAndJetPt   ; }
   virtual void     SetPtHardAndJetPtComparison(Bool_t compare) { fComparePtHardAndJetPt = compare ; }  
   virtual Float_t  GetPtHardAndJetFactor()               const { return  fPtHardAndJetPtFactor    ; }
   virtual void     SetPtHardAndJetPtFactor(Float_t factor)     { fPtHardAndJetPtFactor = factor   ; }          
   
-  //MC reader methods, declared there to allow compilation, they are only used in the MC reader:
+  virtual Bool_t   ComparePtHardAndClusterPt() ;
+  virtual Bool_t   IsPtHardAndClusterPtComparisonSet()       const { return  fComparePtHardAndClusterPt   ; }
+  virtual void     SetPtHardAndClusterPtComparison(Bool_t compare) { fComparePtHardAndClusterPt = compare ; }  
+  virtual Float_t  GetPtHardAndClusterFactor()               const { return  fPtHardAndClusterPtFactor    ; }
+  virtual void     SetPtHardAndClusterPtFactor(Float_t factor)     { fPtHardAndClusterPtFactor = factor   ; }          
+  
+  virtual Bool_t   IsHIJINGLabel(Int_t label);
+  void             SetGeneratorMinMaxParticles();
+  void             SwitchOnAcceptOnlyHIJINGLabels()          { fAcceptOnlyHIJINGLabels = kTRUE  ; }
+  void             SwitchOffAcceptOnlyHIJINGLabels()         { fAcceptOnlyHIJINGLabels = kFALSE ; }
+  Bool_t           AcceptOnlyHIJINGLabels()            const { return fAcceptOnlyHIJINGLabels   ; }
+  
+  // MC reader methods, declared there to allow compilation, they are only used in the MC reader
   
   virtual void AddNeutralParticlesArray(TArrayI & /*array*/) { ; }  
   virtual void AddChargedParticlesArray(TArrayI & /*array*/) { ; } 
@@ -337,95 +578,201 @@ public:
   virtual void SetEMCALOverlapAngle(Float_t /*angle*/)       { ; }
   virtual void SetPHOSOverlapAngle(Float_t /*angle*/)        { ; }
 
+  //-------------
+  // Jets
+  //-------------
+  Bool_t       IsNonStandardJetsSwitchedOn()           const { return fFillInputNonStandardJetBranch   ; }
+  void         SwitchOnNonStandardJets()                     { fFillInputNonStandardJetBranch = kTRUE  ; }
+  void         SwitchOffNonStandardJets()                    { fFillInputNonStandardJetBranch = kFALSE ; }
+  
+  virtual void FillInputNonStandardJets() ;
+  virtual TClonesArray* GetNonStandardJets()            const { return fNonStandardJets                 ; }
+  virtual void SetInputNonStandardJetBranchName(TString name) { fInputNonStandardJetBranchName   = name ; }
+  virtual TString GetInputNonStandardJetBranchName()          { return fInputNonStandardJetBranchName   ; }
   
  protected:
-  Int_t                   fEventNumber;    // Event number
-  Int_t            fDataType ;      // Select MC:Kinematics, Data:ESD/AOD, MCData:Both
-  Int_t            fDebug;          // Debugging level
-  AliFiducialCut * fFiducialCut;    //! Acceptance cuts
-  Bool_t           fCheckFidCut ;   // Do analysis for clusters in defined region         
-
-  Bool_t           fComparePtHardAndJetPt;  // In MonteCarlo, jet events, reject fake events with wrong jet energy.
-  Float_t          fPtHardAndJetPtFactor;   // Factor between ptHard and jet pT to reject/accept event.
-
-  Float_t          fCTSPtMin;       // pT Threshold on charged particles 
-  Float_t          fEMCALPtMin;     // pT Threshold on emcal clusters
-  Float_t          fPHOSPtMin;      // pT Threshold on phos clusters
-  Float_t          fCTSPtMax;       // pT Threshold on charged particles 
-  Float_t          fEMCALPtMax;     // pT Threshold on emcal clusters
-  Float_t          fPHOSPtMax;      // pT Threshold on phos clusters
-  
-  TList          * fAODBranchList ; //-> List with AOD branches created and needed in analysis  
-  TObjArray      * fCTSTracks ;     //-> temporal array with tracks
-  TObjArray      * fEMCALClusters ; //-> temporal array with EMCAL CaloClusters
-  TObjArray      * fPHOSClusters ;  //-> temporal array with PHOS  CaloClusters
-  AliVCaloCells  * fEMCALCells ;    //! temporal array with EMCAL CaloCells
-  AliVCaloCells  * fPHOSCells ;     //! temporal array with PHOS  CaloCells
-
-  AliVEvent      * fInputEvent;     //! pointer to esd or aod input
-  AliAODEvent    * fOutputEvent;    //! pointer to aod output
-  AliMCEvent     * fMC;             //! Monte Carlo Event Handler  
-
-  Bool_t           fFillCTS;        // use data from CTS
-  Bool_t           fFillEMCAL;      // use data from EMCAL
-  Bool_t           fFillPHOS;       // use data from PHOS
-  Bool_t           fFillEMCALCells; // use data from EMCAL
-  Bool_t           fFillPHOSCells;  // use data from PHOS
-  Bool_t           fRecalculateClusters;    // Correct clusters, recalculate them if recalibration parameters is given
-  Bool_t           fSelectEmbeddedClusters; // Use only simulated clusters that come from embedding.
-  
-  ULong_t          fTrackStatus        ; // Track selection bit, select tracks refitted in TPC, ITS ...
-  ULong_t          fTrackFilterMask    ; // Track selection bit, for AODs (any difference with track status?)
-  AliESDtrackCuts *fESDtrackCuts       ; // Track cut  
-  Int_t            fTrackMult          ; // Track multiplicity
-  Float_t          fTrackMultEtaCut    ; // Track multiplicity eta cut
-  Bool_t           fReadStack          ; // Access kine information from stack
-  Bool_t                fReadAODMCParticles ; // Access kine information from filtered AOD MC particles
+  Int_t                   fEventNumber;               // Event number
+  Int_t            fDataType ;                 // Select MC:Kinematics, Data:ESD/AOD, MCData:Both
+  Int_t            fDebug;                     // Debugging level
+  AliFiducialCut * fFiducialCut;               // Acceptance cuts
+  Bool_t           fCheckFidCut ;              // Do analysis for clusters in defined region         
+
+  Bool_t           fComparePtHardAndJetPt;     // In MonteCarlo, jet events, reject fake events with wrong jet energy.
+  Float_t          fPtHardAndJetPtFactor;      // Factor between ptHard and jet pT to reject/accept event.
+
+  Bool_t           fComparePtHardAndClusterPt; // In MonteCarlo, jet events, reject events with too large cluster energy
+  Float_t          fPtHardAndClusterPtFactor;  // Factor between ptHard and cluster pT to reject/accept event.
+  
+  Float_t          fCTSPtMin;                  // pT Threshold on charged particles 
+  Float_t          fEMCALPtMin;                // pT Threshold on emcal clusters
+  Float_t          fPHOSPtMin;                 // pT Threshold on phos clusters
+  Float_t          fCTSPtMax;                  // pT Threshold on charged particles 
+  Float_t          fEMCALPtMax;                // pT Threshold on emcal clusters
+  Float_t          fPHOSPtMax;                 // pT Threshold on phos clusters
+  Bool_t           fUseEMCALTimeCut;           // Do time cut selection
+  Bool_t           fUseParamTimeCut;           // Use simple or parametrized time cut
+  Bool_t           fUseTrackTimeCut;           // Do time cut selection
+  Double_t         fEMCALTimeCutMin;           // Remove clusters/cells with time smaller than this value, in ns
+  Double_t         fEMCALTimeCutMax;           // Remove clusters/cells with time larger than this value, in ns
+  Float_t          fEMCALParamTimeCutMin[4];   // Remove clusters/cells with time smaller than parametrized value, in ns
+  Double_t         fEMCALParamTimeCutMax[4];   // Remove clusters/cells with time larger than parametrized value, in ns
+  Double_t         fTrackTimeCutMin;           // Remove tracks with time smaller than this value, in ns
+  Double_t         fTrackTimeCutMax;           // Remove tracks with time larger than this value, in ns
+  Bool_t           fUseTrackDCACut;            // Do DCA selection
+  Double_t         fTrackDCACut[3];            // Remove tracks with DCA larger than cut, parameters of function stored here
+
+  TList          * fAODBranchList ;            //-> List with AOD branches created and needed in analysis
+  TObjArray      * fCTSTracks ;                //-> temporal array with tracks
+  TObjArray      * fEMCALClusters ;            //-> temporal array with EMCAL CaloClusters
+  TObjArray      * fPHOSClusters ;             //-> temporal array with PHOS  CaloClusters
+  AliVCaloCells  * fEMCALCells ;               //! temporal array with EMCAL CaloCells
+  AliVCaloCells  * fPHOSCells ;                //! temporal array with PHOS  CaloCells
+
+  AliVEvent      * fInputEvent;                //! pointer to esd or aod input
+  AliAODEvent    * fOutputEvent;               //! pointer to aod output
+  AliMCEvent     * fMC;                        //! Monte Carlo Event Handler  
+
+  Bool_t           fFillCTS;                   // use data from CTS
+  Bool_t           fFillEMCAL;                 // use data from EMCAL
+  Bool_t           fFillPHOS;                  // use data from PHOS
+  Bool_t           fFillEMCALCells;            // use data from EMCAL
+  Bool_t           fFillPHOSCells;             // use data from PHOS
+  Bool_t           fRecalculateClusters;       // Correct clusters, recalculate them if recalibration parameters is given
+  Bool_t           fCorrectELinearity;         // Correct cluster linearity, always on
+  Bool_t           fSelectEmbeddedClusters;    // Use only simulated clusters that come from embedding.
+  
+  ULong_t          fTrackStatus        ;       // Track selection bit, select tracks refitted in TPC, ITS ...
+  ULong_t          fTrackFilterMask    ;       // Track selection bit, for AODs (any difference with track status?)
+  ULong_t          fTrackFilterMaskComplementary;       // Complementary Track selection bit, for AODs in case hybrid option selected
+  AliESDtrackCuts *fESDtrackCuts       ;       // Track cut
+  AliESDtrackCuts *fESDtrackComplementaryCuts; // Track cut, complementary cuts for hybrids
+  Bool_t           fConstrainTrack     ;       // Constrain Track to vertex
+  Bool_t           fSelectHybridTracks ;       // Select CTS tracks of type hybrid (only for AODs)
+  Bool_t           fSelectPrimaryTracks ;      // Select CTS tracks of type hybrid (only for AODs)
+  Bool_t           fSelectSPDHitTracks ;       // Ensure that track hits SPD layers
+  Bool_t           fSelectFractionTPCSharedClusters; // Accept only TPC tracks with over a given fraction of shared clusters
+  Float_t          fCutTPCSharedClustersFraction;    // Fraction of TPC shared clusters to be accepted.
+  Int_t            fTrackMult          ;       // Track multiplicity
+  Float_t          fTrackMultEtaCut    ;       // Track multiplicity eta cut
+  Bool_t           fReadStack          ;       // Access kine information from stack
+  Bool_t                fReadAODMCParticles ;       // Access kine information from filtered AOD MC particles
        
-  TString          fDeltaAODFileName   ; // Delta AOD file name
-  TString          fFiredTriggerClassName; // Name of trigger event type used to do the analysis
-
-  Bool_t           fAnaLED;              // Analyze LED data only.
+  TString          fDeltaAODFileName   ;       // Delta AOD file name
+  TString          fFiredTriggerClassName;     // Name of trigger event type used to do the analysis
+
+       // Trigger bit
+  UInt_t           fEventTriggerMask ;         // select this triggerered event
+  UInt_t           fMixEventTriggerMask ;      // select this triggerered event for mixing, tipically kMB or kAnyINT
+  Bool_t           fEventTriggerAtSE;          // select triggered event at SE base task or here
+  
+       Bool_t           fEventTrigMinBias ;         // Event is min bias on its name, it should correspond to AliVEvent::kMB, AliVEvent::kAnyInt
+       Bool_t           fEventTrigCentral ;         // Event is AliVEvent::kCentral on its name,  it should correspond to PbPb
+       Bool_t           fEventTrigSemiCentral ;     // Event is AliVEvent::kSemiCentral on its name,  it should correspond to PbPb 
+       Bool_t           fEventTrigEMCALL0 ;         // Event is EMCal L0 on its name, it should correspond to AliVEvent::kEMC7, AliVEvent::kEMC1
+       Bool_t           fEventTrigEMCALL1Gamma1 ;   // Event is L1-Gamma, threshold 1 on its name,  it should correspond kEMCEGA
+       Bool_t           fEventTrigEMCALL1Gamma2 ;   // Event is L1-Gamma, threshold 2 on its name,  it should correspond kEMCEGA  
+       Bool_t           fEventTrigEMCALL1Jet1 ;     // Event is L1-Gamma, threshold 1 on its name,  it should correspond kEMCEGA
+       Bool_t           fEventTrigEMCALL1Jet2 ;     // Event is L1-Gamma, threshold 2 on its name,  it should correspond kEMCEGA  
+       
+       Int_t            fBitEGA;                    // Trigger bit on VCaloTrigger for EGA
+       Int_t            fBitEJE;                    // Trigger bit on VCaloTrigger for EJE
+       
+  Bool_t           fAnaLED;                    // Analyze LED data only.
 
-  TString          fTaskName;            // Name of task that executes the analysis
+  TString          fTaskName;                  // Name of task that executes the analysis
        
-  AliCalorimeterUtils * fCaloUtils ;     //  Pointer to CalorimeterUtils
+  AliCalorimeterUtils * fCaloUtils ;           //  Pointer to CalorimeterUtils
 
-  AliMixedEvent  * fMixedEvent  ;        //! mixed event object. This class is not the owner
-  Int_t            fNMixedEvent ;        // number of events in mixed event buffer
-  Double_t      ** fVertex      ;        //! vertex array 3 dim for each mixed event buffer
+  AliMixedEvent  * fMixedEvent  ;              //! mixed event object. This class is not the owner
+  Int_t            fNMixedEvent ;              // number of events in mixed event buffer
+  Double_t      ** fVertex      ;              //! vertex array 3 dim for each mixed event buffer
+  
+  TList **         fListMixedTracksEvents ;    //! Container for tracks stored for different events, used in case of own mixing, set in analysis class
+  TList **         fListMixedCaloEvents;       //! Container for photon stored for different events, used in case of own mixing, set in analysis class
+  Int_t            fLastMixedTracksEvent  ;    //  Temporary container with the last event added to the mixing list for tracks
+  Int_t            fLastMixedCaloEvent ;       //  Temporary container with the last event added to the mixing list for photons
   
-  Bool_t           fWriteOutputDeltaAOD; // Write the created delta AOD objects into file  
-       Bool_t           fOldAOD;              // Old AODs, before revision 4.20
+  Bool_t           fWriteOutputDeltaAOD;       // Write the created delta AOD objects into file  
+       Bool_t           fOldAOD;                    // Old AODs, before revision 4.20
   
-  Int_t            fV0ADC[2]    ;        // Integrated V0 signal
-  Int_t            fV0Mul[2]    ;        // Integrated V0 Multiplicity
+  Int_t            fV0ADC[2]    ;              // Integrated V0 signal
+  Int_t            fV0Mul[2]    ;              // Integrated V0 Multiplicity
 
-  Bool_t           fCaloFilterPatch;             // CaloFilter patch
-  TString          fEMCALClustersListName;       // Alternative list of clusters produced elsewhere and not from InputEvent
+  TString          fEMCALClustersListName;     // Alternative list of clusters produced elsewhere and not from InputEvent
   
   // Event selection
   Float_t          fZvtxCut ;                     // Cut on vertex position
   Bool_t           fAcceptFastCluster;           // Accept events from fast cluster, exclude these events for LHC11a
   Bool_t           fRemoveLEDEvents;             // Remove events where LED was wrongly firing - EMCAL LHC11a
+  
+  Bool_t           fRemoveBadTriggerEvents;      // Remove triggered events because trigger was exotic, bad, or out of BC
+  Bool_t           fTriggerPatchClusterMatch;    // Search for the trigger patch and check if associated cluster was the trigger
+  Int_t            fTriggerPatchTimeWindow[2];   // Trigger patch selection window
+  Float_t          fTriggerEventThreshold;       // Threshold to look for triggered events
+  Int_t            fTriggerClusterBC;            // Event triggered by a cluster in BC -5 0 to 5
+  Int_t            fTriggerClusterIndex;         // Index in clusters array of trigger cluster
+  Int_t            fTriggerClusterId;            // Id of trigger cluster (cluster->GetID())
+  Bool_t           fIsExoticEvent;               // Exotic trigger event flag
+  Bool_t           fIsBadCellEvent;              // Bad cell triggered event flag, any cell in cluster is bad
+  Bool_t           fIsBadMaxCellEvent;           // Bad cell triggered event flag, only max energy cell is bad
+  Bool_t           fIsTriggerMatch;              // Could match the event to a trigger patch?
+  Bool_t           fIsTriggerMatchOpenCut[3];    // Could not match the event to a trigger patch?, retry opening cuts
+  Bool_t           fTriggerClusterTimeRecal;     // In case cluster already calibrated, do not try to recalibrate even if recalib on in RecoUtils.
+  Bool_t           fRemoveUnMatchedTriggers;     // Analyze events where trigger patch and cluster where found or not
+  
+  
   Bool_t           fDoEventSelection;            // Select events depending on V0, pileup, vertex well reconstructed, at least 1 track ...
   Bool_t           fDoV0ANDEventSelection;       // Select events depending on V0, fDoEventSelection should be on
+  Bool_t           fDoVertexBCEventSelection;    // Select events with vertex on BC=0 or -100
+  Bool_t           fDoRejectNoTrackEvents;       // Reject events with no selected tracks in event
   Bool_t           fUseEventsWithPrimaryVertex ; // Select events with primary vertex
   AliTriggerAnalysis* fTriggerAnalysis;          // Access to trigger selection algorithm for V0AND calculation
   
+  Bool_t           fTimeStampEventSelect;        // Select events within a fraction of data taking time
+  Float_t          fTimeStampEventFracMin;       // Minimum value of time stamp fraction event
+  Float_t          fTimeStampEventFracMax;       // Maximum value of time stamp fraction event
+  Double_t         fTimeStampRunMin;             // Minimum value of time stamp in run
+  Double_t         fTimeStampRunMax;             // Maximum value of time stamp in run
+  
+  Double_t         fPileUpParamSPD[5];           // Parameters to pass to method IsPileupFromSPD: Int_t minContributors,
+                                                 // Double_t minZdist, 
+                                                 // Double_t nSigmaZdist, 
+                                                 // Double_t nSigmaDiamXY, 
+                                                 // Double_t nSigmaDiamZ)
+  
+  // Pile-up in EMCal
+  Int_t            fNPileUpClusters;             // Number of clusters with time avobe 20 ns
+  Int_t            fNNonPileUpClusters;          // Number of clusters with time below 20 ns
+  Int_t            fNPileUpClustersCut;          // Cut to select event as pile-up
+  Int_t            fEMCalBCEvent[19];            // Fill one entry per event if there is a cluster in a given BC
+  Int_t            fEMCalBCEventCut[19];         // Fill one entry per event if there is a cluster in a given BC, depend on cluster E, acceptance cut
+  Int_t            fTrackBCEvent[19];            // Fill one entry per event if there is a track in a given BC
+  Int_t            fTrackBCEventCut[19];         // Fill one entry per event if there is a track in a given BC, depend on track pT, acceptance cut
+  Int_t            fVertexBC;                    // Vertex BC
+  Bool_t           fRecalculateVertexBC;         // Recalculate vertex BC from tracks pointing to vertex
+  
   //Centrality/Event plane
-  TString          fCentralityClass;     // Name of selected centrality class     
-  Int_t            fCentralityOpt;       // Option for the returned value of the centrality, possible options 5, 10, 100
-  Int_t            fCentralityBin[2];    // Minimum and maximum value of the centrality for the analysis
-  TString          fEventPlaneMethod;    // Name of event plane method, by default "Q"
+  TString          fCentralityClass;            // Name of selected centrality class     
+  Int_t            fCentralityOpt;              // Option for the returned value of the centrality, possible options 5, 10, 100
+  Int_t            fCentralityBin[2];           // Minimum and maximum value of the centrality for the analysis
+  TString          fEventPlaneMethod;           // Name of event plane method, by default "Q"
+
+  Bool_t           fAcceptOnlyHIJINGLabels;     // Select clusters or tracks that where generated by HIJING, reject other generators in case of cocktail
+  Int_t            fNMCProducedMin;             // In case of cocktail, select particles in the list with label from this value
+  Int_t            fNMCProducedMax;             // In case of cocktail, select particles in the list with label up to this value
+  
+  // jets
+  Bool_t           fFillInputNonStandardJetBranch;  // Flag to use data from non standard jets
+  TClonesArray *   fNonStandardJets;                //! temporal array with jets
+  TString          fInputNonStandardJetBranchName;  // Name of non standard jet branch
   
-  Bool_t           fImportGeometryFromFile; // Import geometry settings in geometry.root file
-  TString          fImportGeometryFilePath; // path fo geometry.root file
+  TArrayI          fAcceptEventsWithBit;           // Accept events if trigger bit is on
+  TArrayI          fRejectEventsWithBit;           // Reject events if trigger bit is on
 
-  AliCaloTrackReader(const AliCaloTrackReader & g) ;               // cpy ctor
-  AliCaloTrackReader & operator = (const AliCaloTrackReader & g) ; // cpy assignment
+  AliCaloTrackReader(              const AliCaloTrackReader & r) ; // cpy ctor
+  AliCaloTrackReader & operator = (const AliCaloTrackReader & r) ; // cpy assignment
   
-  ClassDef(AliCaloTrackReader,35)
+  ClassDef(AliCaloTrackReader,64)
   
 } ;