]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
a) Implemented energy threshold on cells to be assigned to clusters
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Mar 2011 14:15:21 +0000 (14:15 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Mar 2011 14:15:21 +0000 (14:15 +0000)
   In order to be fully consistent (ie before this gets ported to the
   release) the rec param should be updated to be zero.
   (it is 10 GeV right now the code used a hard coded value of zero)

b) Implemented switch (default off) to also use the energy gradient
   to decide whether a cell is considered to be neighbor or not.
   At the moment I am only playing with this option so it is not
   interfaced with the rec param.

EMCAL/AliEMCALClusterizerNxN.cxx
EMCAL/AliEMCALClusterizerNxN.h

index ce248cee10da8ab6cd4bd4290755077f06c9dd98..3fae8d5e14c41c7c75f55f95c7955ab89cc74408 100644 (file)
@@ -67,14 +67,14 @@ ClassImp(AliEMCALClusterizerNxN)
 
 //____________________________________________________________________________
 AliEMCALClusterizerNxN::AliEMCALClusterizerNxN()
-: AliEMCALClusterizer(), fNRowDiff(1), fNColDiff(1)
+  : AliEMCALClusterizer(), fNRowDiff(1), fNColDiff(1), fEnergyGrad(0)
 {
   // ctor with the indication of the file where header Tree and digits Tree are stored
 }
 
 //____________________________________________________________________________
 AliEMCALClusterizerNxN::AliEMCALClusterizerNxN(AliEMCALGeometry* geometry)
-  : AliEMCALClusterizer(geometry), fNRowDiff(1), fNColDiff(1)
+  : AliEMCALClusterizer(geometry), fNRowDiff(1), fNColDiff(1), fEnergyGrad(0)
 {
   // ctor with the indication of the file where header Tree and digits Tree are stored
   // use this contructor to avoid usage of Init() which uses runloader
@@ -83,7 +83,7 @@ AliEMCALClusterizerNxN::AliEMCALClusterizerNxN(AliEMCALGeometry* geometry)
 
 //____________________________________________________________________________
 AliEMCALClusterizerNxN::AliEMCALClusterizerNxN(AliEMCALGeometry* geometry, AliEMCALCalibData * calib, AliCaloCalibPedestal * caloped)
-: AliEMCALClusterizer(geometry, calib, caloped), fNRowDiff(1), fNColDiff(1)
+: AliEMCALClusterizer(geometry, calib, caloped), fNRowDiff(1), fNColDiff(1), fEnergyGrad(0)
 {
   // ctor, geometry and calibration are initialized elsewhere.
 }
@@ -167,6 +167,11 @@ Int_t AliEMCALClusterizerNxN::AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit *
   // The order of d1 and d2 is important: first (d1) should be a digit already in a cluster 
   //                                      which is compared to a digit (d2)  not yet in a cluster  
   
+  if (fEnergyGrad) { //false by default
+    if (d2->GetCalibAmp()>d1->GetCalibAmp())
+      return 3; // energy of neighboring cell should be smaller in order to become a neighbor
+  }
+
   Int_t nSupMod1=0, nModule1=0, nIphi1=0, nIeta1=0, iphi1=0, ieta1=0;
   Int_t nSupMod2=0, nModule2=0, nIphi2=0, nIeta2=0, iphi2=0, ieta2=0;
   Int_t rowdiff=0, coldiff=0;
@@ -255,8 +260,8 @@ void AliEMCALClusterizerNxN::MakeClusters()
     { // scan over the list of digitsC
       Float_t dEnergyCalibrated = digit->GetCalibAmp();
 
-      if (fGeom->CheckAbsCellId(digit->GetId()) && dEnergyCalibrated > 0.0) // no threshold!
-      {
+      if (fGeom->CheckAbsCellId(digit->GetId()) && dEnergyCalibrated > fMinECut) // no threshold by default!
+      {                                                                          // needs to be set in OCDB!
         if (dEnergyCalibrated > dMaxEnergyDigit) 
         {
           dMaxEnergyDigit = dEnergyCalibrated;
index d5b2491a827982d2fd13da8907a3a8a194731eba..a01ad867a0e07df8825ea2346b0f430798e5a8dc 100644 (file)
@@ -41,6 +41,8 @@ public:
   void SetNColDiff(Int_t nd) { fNColDiff = nd; }
   Int_t GetNRowDiff() const { return fNRowDiff; } 
   Int_t GetNColDiff() const { return fNColDiff; } 
+  void SetEnergyGrad(Bool_t b) { fEnergyGrad= b; }
+  Bool_t GetEnergyGrad() const { return fEnergyGrad; }
 
 protected:
 
@@ -52,8 +54,9 @@ private:
 
   Int_t  fNRowDiff;  //how many neighbors to consider along row (phi)
   Int_t  fNColDiff;  //how many neighbors to consider along col (eta)
+  Bool_t fEnergyGrad; //if true only cluster if neighboring cell has less energy
 
-  ClassDef(AliEMCALClusterizerNxN,3)   // Clusterizer implementation version 1
+  ClassDef(AliEMCALClusterizerNxN,4)   // Clusterizer implementation version 1
 };
 
 #endif // AliEMCALCLUSTERIZERNXN_H