AliPhysics  master (3d17d9d)
Go to the documentation of this file.
1 #ifndef AliClusterContainer_H
2 #define AliClusterContainer_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
6 class TLorentzVector;
8 class AliVCaloCells;
9 class AliVEvent;
11 #include <map>
12 #include <TArrayI.h>
13 #include <AliVCluster.h>
15 #include "AliEmcalContainer.h"
16 #if !(defined(__CINT__) || defined(__MAKECINT__))
18 #endif
20 #if !(defined(__CINT__) || defined(__MAKECINT__))
23 #endif
35  public:
36  typedef enum AliVCluster::VCluUserDefEnergy_t VCluUserDefEnergy_t;
39  static const std::map <std::string, VCluUserDefEnergy_t> fgkClusterEnergyTypeMap;
42  AliClusterContainer(const char *name);
43  virtual ~AliClusterContainer(){;}
45  virtual TObject *operator[] (int index) const { return GetCluster(index); }
47  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptCluster(i, rejectionReason);}
48  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptCluster(dynamic_cast<const AliVCluster*>(obj), rejectionReason);}
49  virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const;
50  virtual Bool_t AcceptCluster(const AliVCluster* vp, UInt_t &rejectionReason) const;
51  virtual Bool_t ApplyClusterCuts(const AliVCluster* clus, UInt_t &rejectionReason) const;
52  AliVCluster *GetAcceptCluster(Int_t i) const;
53  AliVCluster *GetAcceptClusterWithLabel(Int_t lab) const;
54  void SetClusECut(Double_t cut) { SetMinE(cut) ; }
55  void SetClusPtCut(Double_t cut) { SetMinPt(cut) ; }
56  Double_t GetClusPtCut() const { return GetMinPt(); }
57  AliVCluster *GetCluster(Int_t i) const;
58  AliVCluster *GetClusterWithLabel(Int_t lab) const;
59  AliVCluster *GetLeadingCluster(const char* opt="") ;
60  Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster* vc, Double_t mass) const;
61  Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster* clus) const;
62  Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
63  Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
64  Bool_t GetNextMomentum(TLorentzVector &mom);
65  Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
66  AliVCluster *GetNextAcceptCluster();
67  AliVCluster *GetNextCluster();
68  Int_t GetNClusters() const { return GetNEntries(); }
70  void SetClusTimeCut(Double_t min, Double_t max) { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
71  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
72  void SetMaxMCLabel(Int_t s) { fMaxMCLabel = s ; }
73  void SetMCLabelRange(Int_t min, Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
74  void SetExoticCut(Bool_t e) { fExoticCut = e ; }
79  void SetEmcalM02Range(Double_t min, Double_t max) { fEmcalMinM02 = min; fEmcalMaxM02 = max; }
82  void SetArray(const AliVEvent * event);
86  void SetClusNonLinCorrEnergyCut(Double_t cut) { SetClusUserDefEnergyCut(AliVCluster::kNonLinCorr, cut); }
87  void SetClusHadCorrEnergyCut(Double_t cut) { SetClusUserDefEnergyCut(AliVCluster::kHadCorr, cut) ; }
92  const char* GetTitle() const;
94 #if !(defined(__CINT__) || defined(__MAKECINT__))
98  const AliClusterIterableContainer all() const;
103 #endif
105  protected:
114  virtual TString GetDefaultArrayName(const AliVEvent * const ev) const;
117 #if !(defined(__CINT__) || defined(__MAKECINT__))
119 #endif
121  AliVCaloCells *fEMCALCells;
125  Double_t fUserDefEnergyCut[AliVCluster::kLastUserDefEnergy+1];
136  private:
137  AliClusterContainer(const AliClusterContainer& obj); // copy constructor
138  AliClusterContainer& operator=(const AliClusterContainer& other); // assignment
141  ClassDef(AliClusterContainer,12);
143 };
154 int TestClusterContainerIterator(const AliClusterContainer *const cont, int iteratorType = 0, bool verbose = false);
156 #endif
AliVCluster * GetAcceptClusterWithLabel(Int_t lab) const
void SetIncludePHOSonly(Bool_t b)
virtual TString GetDefaultArrayName(const AliVEvent *const ev) const
virtual Bool_t ApplyClusterCuts(const AliVCluster *clus, UInt_t &rejectionReason) const
Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
const char * GetTitle() const
double Double_t
Definition: External.C:58
AliClusterContainer & operator=(const AliClusterContainer &other)
EMCALIterableContainer::AliEmcalIterableContainerT< AliVCluster, EMCALIterableContainer::operator_star_object< AliVCluster > > AliClusterIterableContainer
void SetEmcalM02Range(Double_t min, Double_t max)
Bool_t GetNextMomentum(TLorentzVector &mom)
const AliClusterIterableMomentumContainer accepted_momentum() const
void SetMinE(Double_t min)
Double_t mass
Bool_t fIncludePHOS
flag to accept PHOS clusters in addition to EMCal clusters
Double_t fClusTimeCutLow
low time cut for clusters
void SetMinPt(Double_t min)
Double_t fUserDefEnergyCut[AliVCluster::kLastUserDefEnergy+1]
cut on the energy of the cluster after higher level corrections (see AliVCluster.h) ...
void SetPhosMinM02(Double_t m)
void SetClusUserDefEnergyCut(Int_t t, Double_t cut)
AliVCluster * GetLeadingCluster(const char *opt="")
Double_t GetClusUserDefEnergyCut(Int_t t) const
Int_t GetDefaultClusterEnergy() const
Double_t fMaxFracEnergyLeadingCell
max fraction of energy in the leading cell
const AliClusterIterableContainer all() const
enum AliVCluster::VCluUserDefEnergy_t VCluUserDefEnergy_t
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const
Double_t fEmcalMaxM02CutEnergy
max EMCal cluster energy for which to apply M02 cut
Double_t GetClusPtCut() const
int Int_t
Definition: External.C:63
Double_t fEmcalMaxM02
max value of M02 for EMCAL clusters
Double_t fEmcalMinM02
min value of M02 for EMCAL clusters
unsigned int UInt_t
Definition: External.C:33
Double_t GetMinPt() const
void SetClusNonLinCorrEnergyCut(Double_t cut)
static const AliEmcalContainerIndexMap< TClonesArray, AliVCluster > & GetEmcalContainerIndexMap()
Get the EMCal container utils associated with particle containers.
Base class for container structures within the EMCAL framework.
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
AliVCluster * GetAcceptCluster(Int_t i) const
Int_t GetNClusters() const
Int_t GetNAcceptedClusters() const
const AliClusterIterableContainer accepted() const
void SetIncludePHOS(Bool_t b)
void SetMaxFractionEnergyLeadingCell(Double_t max)
Double_t fClusTimeCutUp
up time cut for clusters
AliVCluster * GetCluster(Int_t i) const
AliVCaloCells * fEMCALCells
pointer to EMCAL cells object
Bool_t fExoticCut
reject clusters marked as "exotic"
AliVCluster * GetNextCluster()
Int_t fMinMCLabel
minimum MC label
EMCALIterableContainer::AliEmcalIterableContainerT< AliVCluster, EMCALIterableContainer::operator_star_pair< AliVCluster > > AliClusterIterableMomentumContainer
void SetMaxMCLabel(Int_t s)
const AliClusterIterableMomentumContainer all_momentum() const
Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
void SetMinMCLabel(Int_t s)
AliVCluster * GetClusterWithLabel(Int_t lab) const
Double_t fPhosMinM02
min value of M02 for phos clusters
int TestClusterContainerIterator(const AliClusterContainer *const cont, int iteratorType=0, bool verbose=false)
virtual TObject * operator[](int index) const
Index operator.
void SetMCLabelRange(Int_t min, Int_t max)
Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster *vc, Double_t mass) const
Int_t fMaxMCLabel
maximum MC label
void SetArray(const AliVEvent *event)
void SetClusPtCut(Double_t cut)
Bool_t fIncludePHOSonly
flag to accept only PHOS clusters (and reject EMCal clusters)
void SetEmcalMaxM02Energy(Double_t max)
virtual Bool_t AcceptObject(const TObject *obj, UInt_t &rejectionReason) const
Int_t GetNEntries() const
bool Bool_t
Definition: External.C:53
Int_t fDefaultClusterEnergy
default cluster energy: -1 for clus->E(); otherwise clus->GetUserDefEnergy(fDefaultClusterEnergy) ...
void SetClusECut(Double_t cut)
void SetDefaultClusterEnergy(Int_t d)
void SetClusTimeCut(Double_t min, Double_t max)
static AliEmcalContainerIndexMap< TClonesArray, AliVCluster > fgEmcalContainerIndexMap
! Mapping from containers to indices
Container structure for EMCAL clusters.
static const std::map< std::string, VCluUserDefEnergy_t > fgkClusterEnergyTypeMap
Relates string to the cluster energy enumeration for YAML configuration.
AliVCluster * GetNextAcceptCluster()
Int_t fPhosMinNcells
min number of phos cells per cluster
void SetExoticCut(Bool_t e)
void SetPhosMinNcells(Int_t n)
void SetClusHadCorrEnergyCut(Double_t cut)