From 303ff65cea3657f062c5342f6edba99c10d9cda8 Mon Sep 17 00:00:00 2001 From: loizides Date: Wed, 23 Mar 2011 14:15:21 +0000 Subject: [PATCH] a) Implemented energy threshold on cells to be assigned to clusters 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 | 15 ++++++++++----- EMCAL/AliEMCALClusterizerNxN.h | 5 ++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/EMCAL/AliEMCALClusterizerNxN.cxx b/EMCAL/AliEMCALClusterizerNxN.cxx index ce248cee10d..3fae8d5e14c 100644 --- a/EMCAL/AliEMCALClusterizerNxN.cxx +++ b/EMCAL/AliEMCALClusterizerNxN.cxx @@ -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; diff --git a/EMCAL/AliEMCALClusterizerNxN.h b/EMCAL/AliEMCALClusterizerNxN.h index d5b2491a827..a01ad867a0e 100644 --- a/EMCAL/AliEMCALClusterizerNxN.h +++ b/EMCAL/AliEMCALClusterizerNxN.h @@ -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 -- 2.43.0