added potential cut on energy
authorloizides <cloizides@lbl.gov>
Tue, 21 Jan 2014 14:37:54 +0000 (15:37 +0100)
committerloizides <cloizides@lbl.gov>
Tue, 21 Jan 2014 14:40:56 +0000 (15:40 +0100)
PWG/EMCAL/AliClusterContainer.cxx
PWG/EMCAL/AliClusterContainer.h

index e912f8c..79b03d4 100644 (file)
@@ -17,6 +17,7 @@ ClassImp(AliClusterContainer)
 AliClusterContainer::AliClusterContainer():
   AliEmcalContainer("AliClusterContainer"),
   fClusPtCut(0.15),
+  fClusECut(0.15),
   fClusTimeCutLow(-10),
   fClusTimeCutUp(10),
   fClusterBitMap(0),
@@ -32,6 +33,7 @@ AliClusterContainer::AliClusterContainer():
 AliClusterContainer::AliClusterContainer(const char *name):
   AliEmcalContainer(name),
   fClusPtCut(0.15),
+  fClusECut(0.15),
   fClusTimeCutLow(-10),
   fClusTimeCutUp(10),
   fClusterBitMap(0),
@@ -195,6 +197,9 @@ Bool_t AliClusterContainer::AcceptCluster(AliVCluster *clus) const
   if (clus->GetTOF() > fClusTimeCutUp || clus->GetTOF() < fClusTimeCutLow)
     return kFALSE;
 
+  if (clus->E()<fClusECut)
+    return kFALSE;
+
   TLorentzVector nPart;
   clus->GetMomentum(nPart, const_cast<Double_t*>(fVertex));
 
index db77834..ce598b6 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef AliClusterContainer_H
 #define AliClusterContainer_H
 
-// $Id$ 
+// $Id$
 
 class TLorentzVector;
 
@@ -16,26 +16,26 @@ class AliClusterContainer : public AliEmcalContainer {
   AliClusterContainer(const char *name); 
   virtual ~AliClusterContainer(){;}
 
-  void SetClusPtCut(Double_t cut)                  { fClusPtCut      = cut ; }
-  void SetClusTimeCut(Double_t min, Double_t max)  { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
-  void SetClusterBitMap(UInt_t m)                  { fClusterBitMap     = m ; }
-  void SetMCClusterBitMap(UInt_t m)                { fMCClusterBitMap   = m ; }
-  void SetMinMCLabel(Int_t s)                      { fMinMCLabel        = s ; }
-
-  AliVCluster                *GetLeadingCluster(const char* opt="")       ;
-  AliVCluster                *GetCluster(Int_t i)                    const;
+  Bool_t                      AcceptCluster(AliVCluster         *vp) const;
   AliVCluster                *GetAcceptCluster(Int_t i)              const;
-  AliVCluster                *GetClusterWithLabel(Int_t lab)         const;
   AliVCluster                *GetAcceptClusterWithLabel(Int_t lab)   const;
+  AliVCluster                *GetCluster(Int_t i)                    const;
+  AliVCluster                *GetClusterWithLabel(Int_t lab)         const;
+  AliVCluster                *GetLeadingCluster(const char* opt="")       ;
+  void                        GetMomentum(TLorentzVector &mom, Int_t i) const;
   AliVCluster                *GetNextAcceptCluster(Int_t i=-1)            ;
   AliVCluster                *GetNextCluster(Int_t i=-1)                  ;
-  void                        GetMomentum(TLorentzVector &mom, Int_t i) const;
-  Bool_t                      AcceptCluster(AliVCluster         *vp) const;
-  Int_t                       GetNClusters()                         const   {return GetNEntries();}
+  Int_t                       GetNClusters()                         const { return GetNEntries();   }
   void                        SetClassName(const char *clname);
+  void                        SetClusPtCut(Double_t cut)                   { fClusPtCut      = cut ; }
+  void                        SetClusTimeCut(Double_t min, Double_t max)   { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
+  void                        SetClusterBitMap(UInt_t m)                   { fClusterBitMap     = m ; }
+  void                        SetMCClusterBitMap(UInt_t m)                 { fMCClusterBitMap   = m ; }
+  void                        SetMinMCLabel(Int_t s)                       { fMinMCLabel        = s ; }
 
  protected:
   Double_t                    fClusPtCut;                  // cut on cluster pt
+  Double_t                    fClusECut;                   // cut on cluster E
   Double_t                    fClusTimeCutLow;             // low time cut for clusters
   Double_t                    fClusTimeCutUp;              // up time cut for clusters
   UInt_t                      fClusterBitMap;              // bit map of accepted clusters (non MC)
@@ -46,8 +46,7 @@ class AliClusterContainer : public AliEmcalContainer {
   AliClusterContainer(const AliClusterContainer& obj); // copy constructor
   AliClusterContainer& operator=(const AliClusterContainer& other); // assignment
 
-  ClassDef(AliClusterContainer,1);
-
+  ClassDef(AliClusterContainer,2);
 };
 
 #endif