X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALClusterizerNxN.cxx;h=0e5ee37236fe223c2332135fee650d0e79cfc4ba;hb=ea12701f2f35e3e60c95a672542f2de4ada91bc3;hp=a47c2008e3297c39d7173e95c640e410d0cdad64;hpb=c828bc97b4f0f1bca42d23d898869eba3475079d;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALClusterizerNxN.cxx b/EMCAL/AliEMCALClusterizerNxN.cxx index a47c2008e32..0e5ee37236f 100644 --- a/EMCAL/AliEMCALClusterizerNxN.cxx +++ b/EMCAL/AliEMCALClusterizerNxN.cxx @@ -233,13 +233,16 @@ void AliEMCALClusterizerNxN::MakeClusters() fNumberOfECAClusters = 0; fRecPoints->Delete(); - // Set up TObjArray with pointers to digits to work on + // Set up TObjArray with pointers to digits to work on, calibrate digits TObjArray digitsC; TIter nextdigit(fDigitsArr); AliEMCALDigit *digit = 0; while ( (digit = static_cast(nextdigit())) ) { - Float_t dEnergyCalibrated = Calibrate(digit->GetAmplitude(), digit->GetTime(),digit->GetId()); + Float_t dEnergyCalibrated = digit->GetAmplitude(); + Float_t time = digit->GetTime(); + Calibrate(dEnergyCalibrated,time ,digit->GetId()); digit->SetCalibAmp(dEnergyCalibrated); + digit->SetTime(time); digitsC.AddLast(digit); } @@ -259,9 +262,12 @@ void AliEMCALClusterizerNxN::MakeClusters() while ( (digit = static_cast(nextdigitC())) ) { // scan over the list of digitsC Float_t dEnergyCalibrated = digit->GetCalibAmp(); - - if (fGeom->CheckAbsCellId(digit->GetId()) && dEnergyCalibrated > fMinECut) // no threshold by default! - { // needs to be set in OCDB! + Float_t time = digit->GetTime(); + if (fGeom->CheckAbsCellId(digit->GetId()) && + dEnergyCalibrated > fMinECut && + time < fTimeMax && + time > fTimeMin ) // no threshold by default! + { // needs to be set in OCDB! if (dEnergyCalibrated > dMaxEnergyDigit) { dMaxEnergyDigit = dEnergyCalibrated; @@ -326,10 +332,9 @@ void AliEMCALClusterizerNxN::MakeClusters() for (Int_t idig = 0; idig < clusterDigitList.GetEntries(); idig++) { digit = (AliEMCALDigit*)clusterDigitList.At(idig); - Float_t dEnergyCalibrated = digit->GetCalibAmp(); AliDebug(5, Form(" Adding digit %d", digit->GetId())); // note: this way the sharing info is lost! - recPoint->AddDigit(*digit, dEnergyCalibrated, kFALSE); //Time or TimeR? + recPoint->AddDigit(*digit, digit->GetCalibAmp(), kFALSE); //Time or TimeR? digitsC.Remove(digit); } }// recpoint