* 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.
// 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 <TMath.h>
+#include <TDirectory.h>
+#include <TBranch.h>
+#include <TTree.h>
+#include <TROOT.h>
+#include <TFolder.h>
// --- AliRoot header files ---
#include "AliLog.h"
Fatal("ctor", "Couldn't find working pool") ;
}
- fParent = wPool->IndexOf((TObject*)parent);
+ if(wPool)
+ fParent = wPool->IndexOf((TObject*)parent);
+
fChi2Dof = parent->Chi2Dof();
if(cpv) {
// initialization
AliPHOSClusterizer* clusterizer = GetClusterizer();
if(!clusterizer) {
- Fatal("Init", "Cannot get clusterizer") ;
+ AliFatal("Cannot get clusterizer") ;
}
TClonesArray* digits = AliPHOSLoader::GetPHOSLoader(fEventFolderName)->Digits();
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
}
Float_t cos2fi = 1.;
AliPHOSLoader* fLoader = AliPHOSLoader::GetPHOSLoader(fEventFolderName);
- const AliPHOSGeometry* fGeom = fLoader->PHOSGeometry();
+ AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ;
Int_t iDigit; //loop variable
{
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;
{
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;
Int_t relid[4] ;
AliPHOSLoader* fLoader = AliPHOSLoader::GetPHOSLoader(fEventFolderName);
- const AliPHOSGeometry* fGeom = fLoader->PHOSGeometry();
+ AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ;
for(Int_t iter=0; iter<nIter; iter++)
{
{
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 a1,gx1,gy1;
Float_t a2,gx2,gy2;
loop20: ;
Float_t step = st*gr;
- AliInfo(Form("Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpmin %d",
+ AliInfo(Form("Iteration %d dof %d chisq/dof %f chstop/dof %f step %f stpmin %f",
iter, dof, ch/dof, chstop/dof, step, stpmin)) ;
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; iDigit<nDigits; iDigit++)
{
AliPHOSDigit* digit = (AliPHOSDigit*)fLoader->Digits()->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; iMax<nMax; iMax++)
AliPHOSDigit* digit = (AliPHOSDigit*)fLoader->Digits()->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;
Float_t chisqc;
AliPHOSLoader* fLoader = AliPHOSLoader::GetPHOSLoader(fEventFolderName);
- const AliPHOSGeometry* fGeom = fLoader->PHOSGeometry();
+ AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ;
for(Int_t iter=0; iter<nIter; iter++)
{
Int_t* digits = GetDigitsList();
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);
dx = xc - ix;
dy = yc - iy;
loop20: ;
Float_t step = st*gr;
- AliInfo(Form(" Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpMin %d",
- iter, dof, chisq/dof, chisq/dof, chstop/dof, step, stpMin)) ;
+ AliInfo(Form(" Iteration %d dof %d chisq/dof %f chstop/dof %f step %f stpMin %f",
+ iter, dof, chisq/dof, chstop/dof, step, stpMin)) ;
if(step<stpMin)
}
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
{
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; iMax<nMax; iMax++)
{
AliPHOSDigit* digitMax = maxAt[iMax];
Float_t eMax = maxAtEnergy[iMax];
- fGeom->AbsToRelNumbering(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;
for(Int_t iMax=0; iMax<nMax; iMax++)
{
AliPHOSDigit* digitMax = maxAt[iMax];
- fGeom->AbsToRelNumbering(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; iDigit<nDigits; iDigit++)
+ for(iDigit=0; iDigit<nDigits; iDigit++)
{
AliPHOSDigit* digit = (AliPHOSDigit*)fLoader->Digits()->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))
{
}
}
- 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();