AliPhysics  a9863a5 (a9863a5)
 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 
16 
27  public:
28  typedef enum AliVCluster::VCluUserDefEnergy_t VCluUserDefEnergy_t;
29 
31  AliClusterContainer(const char *name);
32  virtual ~AliClusterContainer(){;}
33 
34  virtual TObject *operator[] (int index) const { return GetCluster(index); }
35 
36  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptCluster(i, rejectionReason);}
37  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptCluster(dynamic_cast<const AliVCluster*>(obj), rejectionReason);}
38  virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const;
39  virtual Bool_t AcceptCluster(const AliVCluster* vp, UInt_t &rejectionReason) const;
40  virtual Bool_t ApplyClusterCuts(const AliVCluster* clus, UInt_t &rejectionReason) const;
41  AliVCluster *GetAcceptCluster(Int_t i) const;
42  AliVCluster *GetAcceptClusterWithLabel(Int_t lab) const;
43  void SetClusECut(Double_t cut) { SetMinE(cut) ; }
44  void SetClusPtCut(Double_t cut) { SetMinPt(cut) ; }
45  Double_t GetClusPtCut() const { return GetMinPt(); }
46  AliVCluster *GetCluster(Int_t i) const;
47  AliVCluster *GetClusterWithLabel(Int_t lab) const;
48  AliVCluster *GetLeadingCluster(const char* opt="") ;
49  Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster* vc, Double_t mass) const;
50  Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster* clus) const;
51  Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
52  Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
53  Bool_t GetNextMomentum(TLorentzVector &mom);
54  Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
55  AliVCluster *GetNextAcceptCluster();
56  AliVCluster *GetNextCluster();
57  Int_t GetNClusters() const { return GetNEntries(); }
58  Int_t GetNAcceptedClusters() const;
59  void SetClusTimeCut(Double_t min, Double_t max) { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
60  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
61  void SetMaxMCLabel(Int_t s) { fMaxMCLabel = s ; }
62  void SetMCLabelRange(Int_t min, Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
63  void SetExoticCut(Bool_t e) { fExoticCut = e ; }
64 
65  void SetClusUserDefEnergyCut(Int_t t, Double_t cut);
66  Double_t GetClusUserDefEnergyCut(Int_t t) const;
67 
68  void SetClusNonLinCorrEnergyCut(Double_t cut) { SetClusUserDefEnergyCut(AliVCluster::kNonLinCorr, cut); }
69  void SetClusHadCorrEnergyCut(Double_t cut) { SetClusUserDefEnergyCut(AliVCluster::kHadCorr, cut) ; }
71 
73 
74  const char* GetTitle() const;
75 
76  const AliClusterIterableContainer all() const;
78 
83 
88 
89  protected:
90 
91  Double_t fClusTimeCutLow;
92  Double_t fClusTimeCutUp;
93  Bool_t fExoticCut;
94  Double_t fUserDefEnergyCut[AliVCluster::kLastUserDefEnergy+1];
96 
97  private:
98  AliClusterContainer(const AliClusterContainer& obj); // copy constructor
99  AliClusterContainer& operator=(const AliClusterContainer& other); // assignment
100 
102  ClassDef(AliClusterContainer,5);
104 };
105 
115 int TestClusterContainerIterator(const AliClusterContainer *const cont, int iteratorType = 0, bool verbose = false);
116 
117 #endif
118 
AliVCluster * GetAcceptClusterWithLabel(Int_t lab) const
AliClusterIterableContainer::iterator begin() const
virtual Bool_t ApplyClusterCuts(const AliVCluster *clus, UInt_t &rejectionReason) const
Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
AliClusterIterableContainer::iterator end() const
const char * GetTitle() const
AliClusterContainer & operator=(const AliClusterContainer &other)
AliClusterIterableContainer::iterator accept_end() const
Bool_t GetNextMomentum(TLorentzVector &mom)
AliClusterIterableContainer::iterator accept_rend() const
void SetMinE(Double_t min)
AliClusterIterableContainer::iterator accept_rbegin() const
Double_t mass
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 SetClusUserDefEnergyCut(Int_t t, Double_t cut)
AliClusterIterableContainer::iterator rbegin() const
AliVCluster * GetLeadingCluster(const char *opt="")
Double_t GetClusUserDefEnergyCut(Int_t t) const
bidirectional stl iterator over the EMCAL iterable container
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 GetClusPtCut() const
Double_t GetMinPt() const
void SetClusNonLinCorrEnergyCut(Double_t cut)
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
AliClusterIterableContainer::iterator rend() const
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
void SetMaxMCLabel(Int_t s)
Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
AliClusterIterableContainer::iterator accept_begin() const
void SetMinMCLabel(Int_t s)
AliVCluster * GetClusterWithLabel(Int_t lab) const
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
Int_t fMaxMCLabel
maximum MC label
void SetClusPtCut(Double_t cut)
virtual Bool_t AcceptObject(const TObject *obj, UInt_t &rejectionReason) const
Int_t GetNEntries() const
Int_t fDefaultClusterEnergy
default cluster energy: -1 for clus->E(); otherwise clus->GetUserDefEnergy(fDefaultClusterEnergy) ...
void SetClusECut(Double_t cut)
void SetDefaultClusterEnergy(Int_t d)
AliEmcalIterableContainerT< AliVCluster > AliClusterIterableContainer
void SetClusTimeCut(Double_t min, Double_t max)
Container structure for EMCAL clusters.
AliVCluster * GetNextAcceptCluster()
void SetExoticCut(Bool_t e)
void SetClusHadCorrEnergyCut(Double_t cut)