AliPhysics  d3874b5 (d3874b5)
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 AliVEvent;
10 #include <map>
11 #include <TArrayI.h>
12 #include <AliVCluster.h>
14 #include "AliEmcalContainer.h"
15 #if !(defined(__CINT__) || defined(__MAKECINT__))
17 #endif
19 #if !(defined(__CINT__) || defined(__MAKECINT__))
22 #endif
34  public:
35  typedef enum AliVCluster::VCluUserDefEnergy_t VCluUserDefEnergy_t;
38  static const std::map <std::string, VCluUserDefEnergy_t> fgkClusterEnergyTypeMap;
41  AliClusterContainer(const char *name);
42  virtual ~AliClusterContainer(){;}
44  virtual TObject *operator[] (int index) const { return GetCluster(index); }
46  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptCluster(i, rejectionReason);}
47  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptCluster(dynamic_cast<const AliVCluster*>(obj), rejectionReason);}
48  virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const;
49  virtual Bool_t AcceptCluster(const AliVCluster* vp, UInt_t &rejectionReason) const;
50  virtual Bool_t ApplyClusterCuts(const AliVCluster* clus, UInt_t &rejectionReason) const;
51  AliVCluster *GetAcceptCluster(Int_t i) const;
52  AliVCluster *GetAcceptClusterWithLabel(Int_t lab) const;
53  void SetClusECut(Double_t cut) { SetMinE(cut) ; }
54  void SetClusPtCut(Double_t cut) { SetMinPt(cut) ; }
55  Double_t GetClusPtCut() const { return GetMinPt(); }
56  AliVCluster *GetCluster(Int_t i) const;
57  AliVCluster *GetClusterWithLabel(Int_t lab) const;
58  AliVCluster *GetLeadingCluster(const char* opt="") ;
59  Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster* vc, Double_t mass) const;
60  Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster* clus) const;
61  Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
62  Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
63  Bool_t GetNextMomentum(TLorentzVector &mom);
64  Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
65  AliVCluster *GetNextAcceptCluster();
66  AliVCluster *GetNextCluster();
67  Int_t GetNClusters() const { return GetNEntries(); }
69  void SetClusTimeCut(Double_t min, Double_t max) { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
70  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
71  void SetMaxMCLabel(Int_t s) { fMaxMCLabel = s ; }
72  void SetMCLabelRange(Int_t min, Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
73  void SetExoticCut(Bool_t e) { fExoticCut = e ; }
78  void SetEmcalM02Range(Double_t min, Double_t max) { fEmcalMinM02 = min; fEmcalMaxM02 = max; }
80  void SetArray(const AliVEvent * event);
84  void SetClusNonLinCorrEnergyCut(Double_t cut) { SetClusUserDefEnergyCut(AliVCluster::kNonLinCorr, cut); }
85  void SetClusHadCorrEnergyCut(Double_t cut) { SetClusUserDefEnergyCut(AliVCluster::kHadCorr, cut) ; }
90  const char* GetTitle() const;
92 #if !(defined(__CINT__) || defined(__MAKECINT__))
96  const AliClusterIterableContainer all() const;
101 #endif
103  protected:
112  virtual TString GetDefaultArrayName(const AliVEvent * const ev) const;
115 #if !(defined(__CINT__) || defined(__MAKECINT__))
117 #endif
122  Double_t fUserDefEnergyCut[AliVCluster::kLastUserDefEnergy+1];
132  private:
133  AliClusterContainer(const AliClusterContainer& obj); // copy constructor
134  AliClusterContainer& operator=(const AliClusterContainer& other); // assignment
137  ClassDef(AliClusterContainer,11);
139 };
150 int TestClusterContainerIterator(const AliClusterContainer *const cont, int iteratorType = 0, bool verbose = false);
152 #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
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)
Double_t fClusTimeCutUp
up time cut for clusters
AliVCluster * GetCluster(Int_t i) const
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)