X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSEvalRecPoint.cxx;h=f0e46c64260b2a21a1bbfcd81112db33decdf7e4;hb=f8b468657705805f0c80bc532ebeedc2823f7103;hp=92c8a228ed1957c66060df7a6201a6601a276251;hpb=43fbaae18931c22a35378afb5192d998d24a2c9d;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSEvalRecPoint.cxx b/PHOS/AliPHOSEvalRecPoint.cxx index 92c8a228ed1..f0e46c64260 100644 --- a/PHOS/AliPHOSEvalRecPoint.cxx +++ b/PHOS/AliPHOSEvalRecPoint.cxx @@ -12,10 +12,9 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ -/* $Id: */ -/* $Log: - */ +/* $Id$ */ + //*-- Author: Boris Polichtchouk, IHEP ////////////////////////////////////////////////////////////////////////////// // Reconstructed point operations for the Clusterization class for IHEP reconstruction. @@ -23,11 +22,12 @@ // It differs from AliPHOSClusterizerv1 in neighbour definition only // ---- ROOT system --- -#include "TDirectory.h" -#include "TBranch.h" -#include "TTree.h" -#include "TROOT.h" -#include "TFolder.h" +#include +#include +#include +#include +#include +#include // --- AliRoot header files --- #include "AliLog.h" @@ -244,7 +244,9 @@ void AliPHOSEvalRecPoint::Init() logWeight = clusterizer->GetCpvLogWeight(); } - EvalLocalPosition(logWeight,digits); // evaluate initial position + TVector3 vtx(0.,0.,0.) ; + TVector3 inc(0.,0.,0.) ; + EvalLocalPosition(logWeight,vtx,digits,inc); // evaluate initial position } @@ -311,7 +313,7 @@ void AliPHOSEvalRecPoint::InitTwoGam(Float_t* gamma1, Float_t* gamma2) Float_t cos2fi = 1.; AliPHOSLoader* fLoader = AliPHOSLoader::GetPHOSLoader(fEventFolderName); - const AliPHOSGeometry* fGeom = fLoader->PHOSGeometry(); + AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ; Int_t iDigit; //loop variable @@ -319,8 +321,8 @@ void AliPHOSEvalRecPoint::InitTwoGam(Float_t* gamma1, Float_t* gamma2) { digit = (AliPHOSDigit*)fLoader->Digits()->At( digits[iDigit] ); eDigit = energies[iDigit]; - fGeom->AbsToRelNumbering(digit->GetId(), relid) ; - fGeom->RelPosInModule(relid, iy, ix); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, iy, ix); Float_t dx = ix - xx; Float_t dy = iy - yy; @@ -342,8 +344,8 @@ void AliPHOSEvalRecPoint::InitTwoGam(Float_t* gamma1, Float_t* gamma2) { digit = (AliPHOSDigit*)fLoader->Digits()->At( digits[iDigit] ); eDigit = energies[iDigit]; - fGeom->AbsToRelNumbering(digit->GetId(), relid) ; - fGeom->RelPosInModule(relid, iy, ix); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, iy, ix); Float_t dx = ix - xx; Float_t dy = iy - yy; @@ -441,7 +443,7 @@ void AliPHOSEvalRecPoint::TwoGam(Float_t* gamma1, Float_t* gamma2) Int_t relid[4] ; AliPHOSLoader* fLoader = AliPHOSLoader::GetPHOSLoader(fEventFolderName); - const AliPHOSGeometry* fGeom = fLoader->PHOSGeometry(); + AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ; for(Int_t iter=0; iterDigits()->At( digits[iDigit] ); eDigit = energies[iDigit]; - fGeom->AbsToRelNumbering(digit->GetId(), relid) ; - fGeom->RelPosInModule(relid, iy, ix); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, iy, ix); Float_t a1,gx1,gy1; Float_t a2,gx2,gy2; @@ -600,15 +602,15 @@ void AliPHOSEvalRecPoint::UnfoldTwoMergedPoints(Float_t* gamma1, Float_t* gamma2 Float_t* eFit = new Float_t[nDigits]; AliPHOSLoader* fLoader = AliPHOSLoader::GetPHOSLoader(fEventFolderName); - const AliPHOSGeometry* fGeom = fLoader->PHOSGeometry(); + AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ; for(Int_t iDigit=0; iDigitDigits()->At( digits[iDigit] ); Int_t relid[4] ; - fGeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; Float_t x,z; - fGeom->RelPosInModule(relid, x, z); + phosgeom->RelPosInModule(relid, x, z); Float_t gain = 0.; for(Int_t iMax=0; iMaxDigits()->At( digits[iDigit] ); Float_t eDigit = energies[iDigit]; Int_t relid[4] ; - fGeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; Float_t ix,iz; - fGeom->RelPosInModule(relid, ix, iz); + phosgeom->RelPosInModule(relid, ix, iz); Float_t dx = xMax - ix; Float_t dz = zMax - iz; @@ -718,7 +720,7 @@ void AliPHOSEvalRecPoint::EvaluatePosition() Float_t chisqc; AliPHOSLoader* fLoader = AliPHOSLoader::GetPHOSLoader(fEventFolderName); - const AliPHOSGeometry* fGeom = fLoader->PHOSGeometry(); + AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ; for(Int_t iter=0; iterDigits()->At( digits[iDigit] ); eDigit = energies[iDigit]; - fGeom->AbsToRelNumbering(digit->GetId(), relid) ; - fGeom->RelPosInModule(relid, iy, ix); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, iy, ix); dx = xc - ix; dy = yc - iy; @@ -946,7 +948,7 @@ Int_t AliPHOSEvalRecPoint::UnfoldLocalMaxima() } AliPHOSLoader* fLoader = AliPHOSLoader::GetPHOSLoader(fEventFolderName); - const AliPHOSGeometry* fGeom = fLoader->PHOSGeometry(); + AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ; TClonesArray* digits = fLoader->Digits(); // if number of local maxima less then 2 - nothing to unfold @@ -969,16 +971,16 @@ Int_t AliPHOSEvalRecPoint::UnfoldLocalMaxima() { AliPHOSDigit* digit = (AliPHOSDigit*)fLoader->Digits()->At( digitsList[iDigit] ); - fGeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; Float_t x,z; - fGeom->RelPosInModule(relid, x, z); + phosgeom->RelPosInModule(relid, x, z); for(Int_t iMax=0; iMaxAbsToRelNumbering(digitMax->GetId(), relid) ; - fGeom->RelPosInModule(relid, xMax, zMax); + phosgeom->AbsToRelNumbering(digitMax->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xMax, zMax); Float_t dx = xMax - x; Float_t dz = zMax - z; Float_t amp,gx,gy; @@ -992,21 +994,21 @@ Int_t AliPHOSEvalRecPoint::UnfoldLocalMaxima() for(Int_t iMax=0; iMaxAbsToRelNumbering(digitMax->GetId(), relid) ; - fGeom->RelPosInModule(relid, xMax, zMax); + phosgeom->AbsToRelNumbering(digitMax->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xMax, zMax); Float_t eMax = maxAtEnergy[iMax]; AliPHOSEvalRecPoint* newRP = new AliPHOSEvalRecPoint(IsCPV(),this); newRP->AddDigit(*digitMax,maxAtEnergy[iMax]); //Neighbous ( matrix 3x3 around the local maximum) - for(Int_t iDigit=0; iDigitDigits()->At( digitsList[iDigit] ); Float_t eDigit = energies[iDigit]; - fGeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; Float_t ix,iz; - fGeom->RelPosInModule(relid, ix, iz); + phosgeom->RelPosInModule(relid, ix, iz); if(AreNeighbours(digitMax,digit)) { @@ -1022,7 +1024,9 @@ Int_t AliPHOSEvalRecPoint::UnfoldLocalMaxima() } } - newRP->EvalLocalPosition(logWeight,digits); + TVector3 vtx(0.,0.,0.) ; + TVector3 inc(0.,0.,0.) ; + newRP->EvalLocalPosition(logWeight,vtx,digits,inc); AliInfo(Form("======= Unfold: daughter rec point %d =================", iMax)) ; newRP->Print();