From 6b9b768e84f69814f2806347d79e6747ab37b5ce Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 21 Jul 2000 14:18:14 +0000 Subject: [PATCH] Data member fGeom added --- PHOS/AliPHOSClusterizerv1.cxx | 18 ++++++------------ PHOS/AliPHOSClusterizerv1.h | 2 ++ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/PHOS/AliPHOSClusterizerv1.cxx b/PHOS/AliPHOSClusterizerv1.cxx index 9936bbdd519..8a5a6e02914 100644 --- a/PHOS/AliPHOSClusterizerv1.cxx +++ b/PHOS/AliPHOSClusterizerv1.cxx @@ -47,6 +47,7 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1() fA = 0.; fB = 0.01 ; + fGeom = AliPHOSGeometry::GetInstance(); fNumberOfEmcClusters = 0 ; fNumberOfPpsdClusters = 0 ; fEmcClusteringThreshold = 0.1; @@ -69,13 +70,11 @@ Int_t AliPHOSClusterizerv1::AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2) Int_t rv = 0 ; - AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ; - Int_t relid1[4] ; - geom->AbsToRelNumbering(d1->GetId(), relid1) ; + fGeom->AbsToRelNumbering(d1->GetId(), relid1) ; Int_t relid2[4] ; - geom->AbsToRelNumbering(d2->GetId(), relid2) ; + fGeom->AbsToRelNumbering(d2->GetId(), relid2) ; if ( (relid1[0] == relid2[0]) && (relid1[1]==relid2[1]) ) { // inside the same PHOS module and the same PPSD Module Int_t rowdiff = TMath::Abs( relid1[2] - relid2[2] ) ; @@ -106,7 +105,6 @@ void AliPHOSClusterizerv1::FillandSort(const DigitsList * dl, TObjArray * tl) // Copies the digits with energy above thershold and sorts the list // according to increasing Id number - AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ; Int_t relid[4] ; TIter next(dl) ; @@ -125,7 +123,7 @@ void AliPHOSClusterizerv1::FillandSort(const DigitsList * dl, TObjArray * tl) Int_t id = digit->GetId() ; Float_t ene = Calibrate(digit->GetAmp()) ; - geom->AbsToRelNumbering(id, relid) ; + fGeom->AbsToRelNumbering(id, relid) ; if(relid[1]==0){ // EMC if ( ene > fEmcEnergyThreshold ) tl->Add(digit) ; @@ -157,10 +155,8 @@ Bool_t AliPHOSClusterizerv1::IsInEmc(AliPHOSDigit * digit) Bool_t rv = kFALSE ; - AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ; - Int_t relid[4] ; - geom->AbsToRelNumbering(digit->GetId(), relid) ; + fGeom->AbsToRelNumbering(digit->GetId(), relid) ; if ( relid[1] == 0 ) rv = kTRUE; @@ -200,15 +196,13 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, // new ((*emcl)[fNumberOfEmcClusters]) AliPHOSEmcRecPoint(fW0, fLocMaxCut) ; if TClonesArray (*emcl)[fNumberOfEmcClusters] = new AliPHOSEmcRecPoint(fW0, fLocMaxCut) ; - clu = (AliPHOSEmcRecPoint *) (*emcl)[fNumberOfEmcClusters] ; + clu = (AliPHOSEmcRecPoint *) emcl->At(fNumberOfEmcClusters) ; fNumberOfEmcClusters++ ; clu->AddDigit(*digit, Calibrate(digit->GetAmp())) ; - clusterdigitslist[iDigitInCluster] = digit ; iDigitInCluster++ ; tempodigitslist.Remove(digit) ; - } else { diff --git a/PHOS/AliPHOSClusterizerv1.h b/PHOS/AliPHOSClusterizerv1.h index 0e71c957e0e..a433f24c847 100644 --- a/PHOS/AliPHOSClusterizerv1.h +++ b/PHOS/AliPHOSClusterizerv1.h @@ -18,6 +18,7 @@ #include "AliPHOSClusterizer.h" #include "AliPHOSDigit.h" +#include "AliPHOSGeometry.h" @@ -58,6 +59,7 @@ private: Float_t fA ; // offset of the energy calibration Float_t fB ; // gain of the energy calibration + AliPHOSGeometry * fGeom ; // pointer to geometry Float_t fEmcClusteringThreshold ; // minimum energy to include a EMC digit in a cluster Float_t fEmcEnergyThreshold ; // minimum energy of EMC digit to be considered Float_t fLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster -- 2.31.1