AliPhysics  fe039ad (fe039ad)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliClusterContainer.h
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 */
5 
6 class TLorentzVector;
7 
8 class AliVEvent;
9 
10 #include <TArrayI.h>
11 #include <AliVCluster.h>
12 
13 #include "AliEmcalContainer.h"
14 #if !(defined(__CINT__) || defined(__MAKECINT__))
16 #endif
17 
18 #if !(defined(__CINT__) || defined(__MAKECINT__))
21 #endif
22 
32 class AliClusterContainer : public AliEmcalContainer {
33  public:
34  typedef enum AliVCluster::VCluUserDefEnergy_t VCluUserDefEnergy_t;
35 
37  AliClusterContainer(const char *name);
38  virtual ~AliClusterContainer(){;}
39 
40  virtual TObject *operator[] (int index) const { return GetCluster(index); }
41 
42  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptCluster(i, rejectionReason);}
43  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptCluster(dynamic_cast<const AliVCluster*>(obj), rejectionReason);}
44  virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const;
45  virtual Bool_t AcceptCluster(const AliVCluster* vp, UInt_t &rejectionReason) const;
46  virtual Bool_t ApplyClusterCuts(const AliVCluster* clus, UInt_t &rejectionReason) const;
47  AliVCluster *GetAcceptCluster(Int_t i) const;
48  AliVCluster *GetAcceptClusterWithLabel(Int_t lab) const;
49  void SetClusECut(Double_t cut) { SetMinE(cut) ; }
50  void SetClusPtCut(Double_t cut) { SetMinPt(cut) ; }
51  Double_t GetClusPtCut() const { return GetMinPt(); }
52  AliVCluster *GetCluster(Int_t i) const;
53  AliVCluster *GetClusterWithLabel(Int_t lab) const;
54  AliVCluster *GetLeadingCluster(const char* opt="") ;
55  Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster* vc, Double_t mass) const;
56  Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster* clus) const;
57  Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
58  Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
59  Bool_t GetNextMomentum(TLorentzVector &mom);
60  Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
61  AliVCluster *GetNextAcceptCluster();
62  AliVCluster *GetNextCluster();
63  Int_t GetNClusters() const { return GetNEntries(); }
65  void SetClusTimeCut(Double_t min, Double_t max) { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
66  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
67  void SetMaxMCLabel(Int_t s) { fMaxMCLabel = s ; }
68  void SetMCLabelRange(Int_t min, Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
69  void SetExoticCut(Bool_t e) { fExoticCut = e ; }
74  void SetEmcalM02Range(Double_t min, Double_t max) { fEmcalMinM02 = min; fEmcalMaxM02 = max; }
76  void SetArray(const AliVEvent * event);
79 
80  void SetClusNonLinCorrEnergyCut(Double_t cut) { SetClusUserDefEnergyCut(AliVCluster::kNonLinCorr, cut); }
81  void SetClusHadCorrEnergyCut(Double_t cut) { SetClusUserDefEnergyCut(AliVCluster::kHadCorr, cut) ; }
83 
85 
86  const char* GetTitle() const;
87 
88 #if !(defined(__CINT__) || defined(__MAKECINT__))
91 
92  const AliClusterIterableContainer all() const;
94 
97 #endif
98 
99  protected:
108  virtual TString GetDefaultArrayName(const AliVEvent * const ev) const;
109 
110 
111 #if !(defined(__CINT__) || defined(__MAKECINT__))
113 #endif
114 
118  Double_t fUserDefEnergyCut[AliVCluster::kLastUserDefEnergy+1];
127 
128  private:
129  AliClusterContainer(const AliClusterContainer& obj); // copy constructor
130  AliClusterContainer& operator=(const AliClusterContainer& other); // assignment
131 
133  ClassDef(AliClusterContainer,11);
135 };
136 
146 int TestClusterContainerIterator(const AliClusterContainer *const cont, int iteratorType = 0, bool verbose = false);
147 
148 #endif
149 
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
Double_t mass
Bool_t fIncludePHOS
flag to accept PHOS clusters in addition to EMCal clusters
Double_t fClusTimeCutLow
low time cut for clusters
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
void SetClusNonLinCorrEnergyCut(Double_t cut)
static const AliEmcalContainerIndexMap< TClonesArray, AliVCluster > & GetEmcalContainerIndexMap()
Get the EMCal container utils associated with particle containers.
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()
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
void SetMCLabelRange(Int_t min, Int_t max)
Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster *vc, Double_t mass) const
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
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.
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)