Int_t iPoint; //loop variable
for(iPoint=0; iPoint<gime->CpvRecPoints()->GetEntriesFast(); iPoint++) {
- rp = new AliPHOSEvalRecPoint(iPoint,AliPHOSEvalRecPoint::cpv);
+ rp = new AliPHOSEvalRecPoint(iPoint,AliPHOSEvalRecPoint::kCpv);
rp->MakeJob();
}
wPoolF->Add(recEmc);
for(iPoint=0; iPoint<gime->EmcRecPoints()->GetEntriesFast(); iPoint++) {
- rp = new AliPHOSEvalRecPoint(iPoint,(Bool_t)AliPHOSEvalRecPoint::emc);
+ rp = new AliPHOSEvalRecPoint(iPoint,(Bool_t)AliPHOSEvalRecPoint::kEmc);
rp->MakeJob();
}
AliPHOSCpvRecPoint() ;
AliPHOSCpvRecPoint(const char * opt) ;
AliPHOSCpvRecPoint(const AliPHOSCpvRecPoint & rp) {
- // cpy ctor requested by Coding Convention
- // but not yet needed
- assert(0==1) ;
+ // cpy ctor requested by Coding Convention but not yet needed
+ Fatal("cpy ctor", "not implemented") ;
}
virtual ~AliPHOSCpvRecPoint() ;
AliPHOSCpvRecPoint & operator = (const AliPHOSCpvRecPoint & rvalue) {
// assignement operator requested by coding convention but not needed
- assert(0==1) ;
- return *this ;
+ Fatal("operator =", "not implemented") ; return *this ;
}
protected:
// Modified: Yuri Kharlov (IHEP, Protvino)
// 15 September 2000
-#include <assert.h>
-
// --- ROOT system ---
#include "TObject.h"
class TObjArray ;
class AliPHOSEMCAGeometry : public TObject {
public:
-
- AliPHOSEMCAGeometry();
- AliPHOSEMCAGeometry(const AliPHOSEMCAGeometry & cpv) {
- // cpy ctor requested by Coding Convention but not yet needed
- assert(0==1) ;
- }
+
+ AliPHOSEMCAGeometry();
+ AliPHOSEMCAGeometry(const AliPHOSEMCAGeometry & cpv) {
+ // cpy ctor requested by Coding Convention but not yet needed
+ Fatal("cpy ctor", "not implemented") ;
+ }
virtual ~AliPHOSEMCAGeometry(void) {}
AliPHOSEMCAGeometry & operator = (const AliPHOSEMCAGeometry & rvalue) {
// assignement operator requested by coding convention but not needed
- assert(0==1) ;
+ Fatal("operator =", "not implemented") ;
return *this ;
}
private:
- Float_t fStripHalfSize[3] ;
- Float_t fAirCellHalfSize[3] ;
- Float_t fWrappedHalfSize[3] ;
- Float_t fSupportPlateHalfSize[3] ;
- Float_t fSupportPlateInHalfSize[3] ;
- Float_t fCrystalHalfSize[3] ;
- Float_t fAirGapLed ;
- Float_t fStripWallWidthOut ; // Side to another strip
- Float_t fStripWallWidthIn ;
- Float_t fTyvecThickness ;
- Float_t fTSupport1HalfSize[3] ;
- Float_t fTSupport2HalfSize[3] ;
- Float_t fPreampHalfSize[3] ;
- Float_t fPinDiodeHalfSize[3] ; // Size of the PIN Diode
-
- Float_t fOuterThermoParams[4] ;
- Float_t fCoolerHalfSize[3] ;
- Float_t fAirGapHalfSize[3] ;
- Float_t fInnerThermoHalfSize[3] ;
- Float_t fAlCoverParams[4] ;
- Float_t fFiberGlassHalfSize[3] ;
-
-
- Float_t fInnerThermoWidthX ;
- Float_t fInnerThermoWidthY ;
- Float_t fInnerThermoWidthZ ;
- Float_t fAirGapWidthX ;
- Float_t fAirGapWidthY ;
- Float_t fAirGapWidthZ ;
- Float_t fCoolerWidthX ;
- Float_t fCoolerWidthY ;
- Float_t fCoolerWidthZ ;
- Float_t fAlCoverThickness ;
- Float_t fOuterThermoWidthXUp ;
- Float_t fOuterThermoWidthXLow;
- Float_t fOuterThermoWidthY ;
- Float_t fOuterThermoWidthZ ;
- Float_t fAlFrontCoverX ;
- Float_t fAlFrontCoverZ ;
- Float_t fFiberGlassSup2X ;
- Float_t fFiberGlassSup1X ;
- Float_t fFrameHeight ;
- Float_t fFrameThickness ;
- Float_t fAirSpaceFeeX ;
- Float_t fAirSpaceFeeZ ;
- Float_t fAirSpaceFeeY ;
- Float_t fTCables2HalfSize[3] ;
- Float_t fTCables1HalfSize[3] ;
- Float_t fWarmUpperThickness ;
- Float_t fWarmBottomThickness ;
- Float_t fWarmAlCoverWidthX ;
- Float_t fWarmAlCoverWidthY ;
- Float_t fWarmAlCoverWidthZ ;
- Float_t fWarmAlCoverHalfSize[3] ;
- Float_t fWarmThermoHalfSize[3] ;
- Float_t fFiberGlassSup1Y ;
- Float_t fFiberGlassSup2Y ;
- Float_t fTSupportDist ;
- Float_t fTSupport1Thickness ;
- Float_t fTSupport2Thickness ;
- Float_t fTSupport1Width ;
- Float_t fTSupport2Width ;
- Float_t fFrameXHalfSize[3] ;
- Float_t fFrameZHalfSize[3] ;
- Float_t fFrameXPosition[3] ;
- Float_t fFrameZPosition[3] ;
- Float_t fFGupXHalfSize[3] ;
- Float_t fFGupXPosition[3] ;
- Float_t fFGupZHalfSize[3] ;
- Float_t fFGupZPosition[3] ;
- Float_t fFGlowXHalfSize[3] ;
- Float_t fFGlowXPosition[3] ;
- Float_t fFGlowZHalfSize[3] ;
- Float_t fFGlowZPosition[3] ;
- Float_t fFEEAirHalfSize[3] ;
- Float_t fFEEAirPosition[3] ;
- Float_t fEMCParams[4] ;
- Float_t fIPtoOuterCoverDistance ; // Distances from interaction point to outer cover
- Float_t fIPtoCrystalSurface ; // Distances from interaction point to Xtal surface
-
- Float_t fSupportPlateThickness ; // Thickness of the Aluminium support plate for Strip
-
- Int_t fNCellsInStrip ;
- Int_t fNStripX ;
- Int_t fNStripZ ;
- Int_t fNTSupports ;
- Int_t fNPhi ; // Number of crystal units in X (phi) direction
- Int_t fNZ ; // Number of crystal units in Z direction
-
- ClassDef(AliPHOSEMCAGeometry,1) // EMCA geometry class
+ Float_t fStripHalfSize[3] ; // Strip unit size/2
+ Float_t fAirCellHalfSize[3] ; // geometry parameter
+ Float_t fWrappedHalfSize[3] ; // geometry parameter
+ Float_t fSupportPlateHalfSize[3] ; // geometry parameter
+ Float_t fSupportPlateInHalfSize[3] ; // geometry parameter
+ Float_t fCrystalHalfSize[3] ; // crystal size/2
+ Float_t fAirGapLed ; // geometry parameter
+ Float_t fStripWallWidthOut ; // Side to another strip
+ Float_t fStripWallWidthIn ; // geometry parameter
+ Float_t fTyvecThickness ; // geometry parameter
+ Float_t fTSupport1HalfSize[3] ; // geometry parameter
+ Float_t fTSupport2HalfSize[3] ; // geometry parameter
+ Float_t fPreampHalfSize[3] ; // geometry parameter
+ Float_t fPinDiodeHalfSize[3] ; // Size of the PIN Diode
+
+ Float_t fOuterThermoParams[4] ; // geometry parameter
+ Float_t fCoolerHalfSize[3] ; // geometry parameter
+ Float_t fAirGapHalfSize[3] ; // geometry parameter
+ Float_t fInnerThermoHalfSize[3] ; // geometry parameter
+ Float_t fAlCoverParams[4] ; // geometry parameter
+ Float_t fFiberGlassHalfSize[3] ; // geometry parameter
+
+
+ Float_t fInnerThermoWidthX ; // geometry parameter
+ Float_t fInnerThermoWidthY ; // geometry parameter
+ Float_t fInnerThermoWidthZ ; // geometry parameter
+ Float_t fAirGapWidthX ; // geometry parameter
+ Float_t fAirGapWidthY ; // geometry parameter
+ Float_t fAirGapWidthZ ; // geometry parameter
+ Float_t fCoolerWidthX ; // geometry parameter
+ Float_t fCoolerWidthY ; // geometry parameter
+ Float_t fCoolerWidthZ ; // geometry parameter
+ Float_t fAlCoverThickness ; // geometry parameter
+ Float_t fOuterThermoWidthXUp ; // geometry parameter
+ Float_t fOuterThermoWidthXLow; // geometry parameter
+ Float_t fOuterThermoWidthY ; // geometry parameter
+ Float_t fOuterThermoWidthZ ; // geometry parameter
+ Float_t fAlFrontCoverX ; // geometry parameter
+ Float_t fAlFrontCoverZ ; // geometry parameter
+ Float_t fFiberGlassSup2X ; // geometry parameter
+ Float_t fFiberGlassSup1X ; // geometry parameter
+ Float_t fFrameHeight ; // geometry parameter
+ Float_t fFrameThickness ; // geometry parameter
+ Float_t fAirSpaceFeeX ; // geometry parameter
+ Float_t fAirSpaceFeeZ ; // geometry parameter
+ Float_t fAirSpaceFeeY ; // geometry parameter
+ Float_t fTCables2HalfSize[3] ; // geometry parameter
+ Float_t fTCables1HalfSize[3] ; // geometry parameter
+ Float_t fWarmUpperThickness ; // geometry parameter
+ Float_t fWarmBottomThickness ; // geometry parameter
+ Float_t fWarmAlCoverWidthX ; // geometry parameter
+ Float_t fWarmAlCoverWidthY ; // geometry parameter
+ Float_t fWarmAlCoverWidthZ ; // geometry parameter
+ Float_t fWarmAlCoverHalfSize[3] ; // geometry parameter
+ Float_t fWarmThermoHalfSize[3] ; // geometry parameter
+ Float_t fFiberGlassSup1Y ; // geometry parameter
+ Float_t fFiberGlassSup2Y ; // geometry parameter
+ Float_t fTSupportDist ; // geometry parameter
+ Float_t fTSupport1Thickness ; // geometry parameter
+ Float_t fTSupport2Thickness ; // geometry parameter
+ Float_t fTSupport1Width ; // geometry parameter
+ Float_t fTSupport2Width ; // geometry parameter
+ Float_t fFrameXHalfSize[3] ; // geometry parameter
+ Float_t fFrameZHalfSize[3] ; // geometry parameter
+ Float_t fFrameXPosition[3] ; // geometry parameter
+ Float_t fFrameZPosition[3] ; // geometry parameter
+ Float_t fFGupXHalfSize[3] ; // geometry parameter
+ Float_t fFGupXPosition[3] ; // geometry parameter
+ Float_t fFGupZHalfSize[3] ; // geometry parameter
+ Float_t fFGupZPosition[3] ; // geometry parameter
+ Float_t fFGlowXHalfSize[3] ; // geometry parameter
+ Float_t fFGlowXPosition[3] ; // geometry parameter
+ Float_t fFGlowZHalfSize[3] ; // geometry parameter
+ Float_t fFGlowZPosition[3] ; // geometry parameter
+ Float_t fFEEAirHalfSize[3] ; // geometry parameter
+ Float_t fFEEAirPosition[3] ; // geometry parameter
+ Float_t fEMCParams[4] ; // geometry parameter
+ Float_t fIPtoOuterCoverDistance ; // Distances from interaction point to outer cover
+ Float_t fIPtoCrystalSurface ; // Distances from interaction point to Xtal surface
+
+ Float_t fSupportPlateThickness ; // Thickness of the Aluminium support plate for Strip
+
+ Int_t fNCellsInStrip ; // Number of cells in a strip unit
+ Int_t fNStripX ; // Number of strip units in X
+ Int_t fNStripZ ; // Number of strip units in Z
+ Int_t fNTSupports ; // geometry parameter
+ Int_t fNPhi ; // Number of crystal units in X (phi) direction
+ Int_t fNZ ; // Number of crystal units in Z direction
+
+ ClassDef(AliPHOSEMCAGeometry,1) // EMCA geometry class
} ;
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+/* $Id: */
+
+/* $Log:
+ */
+//*-- Author: Boris Polichtchouk, IHEP
+//////////////////////////////////////////////////////////////////////////////
+// Reconstructed point operations for the Clusterization class for IHEP reconstruction.
+// Performs clusterization (collects neighbouring active cells)
+// It differs from AliPHOSClusterizerv1 in neighbour definition only
+
// ---- ROOT system ---
#include "TDirectory.h"
#include "TBranch.h"
AliPHOSEvalRecPoint::AliPHOSEvalRecPoint(): AliPHOSCpvRecPoint()
{
+ // default ctor
fParent=-333;
fChi2Dof=-111;
fIsCpv = kTRUE;
AliPHOSEvalRecPoint::AliPHOSEvalRecPoint(Bool_t cpv, AliPHOSEvalRecPoint* parent) : AliPHOSCpvRecPoint()
{
-
+ // ctor
fParent=-333;
fChi2Dof=-111;
AliPHOSEvalRecPoint::AliPHOSEvalRecPoint(Int_t i, Bool_t cpv) : AliPHOSCpvRecPoint()
{
-
+ // ctor
fChi2Dof=-111;
fParent=-333;
fIsCpv = kFALSE;
}
- Int_t* Digits = rp->GetDigitsList();
- Float_t* Energies = rp->GetEnergiesList();
+ Int_t* digits = rp->GetDigitsList();
+ Float_t* energies = rp->GetEnergiesList();
Int_t nDigits = rp->GetMultiplicity();
for(Int_t iDigit=0; iDigit<nDigits; iDigit++) {
- AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
- Float_t eDigit = Energies[iDigit];
+ AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( digits[iDigit] );
+ Float_t eDigit = energies[iDigit];
this->AddDigit(*digit,eDigit);
}
AliPHOSClusterizer* AliPHOSEvalRecPoint::GetClusterizer()
{
+ // returns clusterizer task
TFolder* aliceF = (TFolder*)gROOT->FindObjectAny("YSAlice");
TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
AliPHOSClusterizer* clu = (AliPHOSClusterizer*)wPoolF->FindObject("PHOS:clu-v1");
Bool_t AliPHOSEvalRecPoint::TooClose(AliPHOSRecPoint* pt) const
{
- TVector3 her_pos;
- TVector3 my_pos;
- pt->GetLocalPosition(her_pos);
- this->GetLocalPosition(my_pos);
- Float_t dx = her_pos.X() - my_pos.X();
- Float_t dz = her_pos.Z() - my_pos.Z();
+ // check if a rec.point pt is too close to this one
+ TVector3 herPos;
+ TVector3 myPos;
+ pt->GetLocalPosition(herPos);
+ this->GetLocalPosition(myPos);
+ Float_t dx = herPos.X() - myPos.X();
+ Float_t dz = herPos.Z() - myPos.Z();
Float_t dr = TMath::Sqrt(dx*dx + dz*dz);
if(dr<GetReconstructionManager()->MergeGammasMinDistanceCut())
Bool_t AliPHOSEvalRecPoint::NeedToSplit() const
{
+ // rec.point needs to be split
return kFALSE;
}
void AliPHOSEvalRecPoint::DeleteParent()
{
+ // delete parent
fParent=-333;
}
void AliPHOSEvalRecPoint::UpdateWorkingPool()
{
-
+ // update pool of rec.points
Int_t i; //loop variable
for(i=0; i<this->InWorkingPool(); i++) {
Int_t AliPHOSEvalRecPoint::HasChild(TObjArray& children)
{
+ // returns the number of children
for(Int_t iChild=0; iChild<InWorkingPool(); iChild++)
{
AliPHOSEvalRecPoint* child = (AliPHOSEvalRecPoint*)GetFromWorkingPool(iChild);
void AliPHOSEvalRecPoint::Init()
{
-
+ // initialization
AliPHOSClusterizer* clusterizer = GetClusterizer();
if(!clusterizer) {
Error("Init", "Cannot get clusterizer. Exit.") ;
}
TClonesArray* digits = AliPHOSGetter::GetInstance()->Digits();
- Float_t LogWeight=0;
+ Float_t logWeight=0;
if(this->IsEmc()) {
- LogWeight = clusterizer->GetEmcLogWeight();
+ logWeight = clusterizer->GetEmcLogWeight();
}
else {
- LogWeight = clusterizer->GetCpvLogWeight();
+ logWeight = clusterizer->GetCpvLogWeight();
}
- EvalLocalPosition(LogWeight,digits); // evaluate initial position
+ EvalLocalPosition(logWeight,digits); // evaluate initial position
}
GetLocalPosition(lpos);
Float_t xx = lpos.Z();
Float_t yy = lpos.X();
- Float_t E = GetEnergy();
+ Float_t e = GetEnergy();
- Info("InitTwoGam", "(x,z,E)[old] = (%f, %f, %f)", yy, xx, E) ;
+ Info("InitTwoGam", "(x,z,e)[old] = (%f, %f, %f)", yy, xx, e) ;
-// xx = XY(xx/E);
-// yy = XY(yy/E);
+// xx = XY(xx/e);
+// yy = XY(yy/e);
Float_t eDigit ;
AliPHOSDigit * digit ;
Int_t nDigits = GetMultiplicity();
- Int_t * Digits = GetDigitsList();
- Float_t * Energies = GetEnergiesList();
+ Int_t * digits = GetDigitsList();
+ Float_t * energies = GetEnergiesList();
Float_t ix ;
Float_t iy ;
for(iDigit = 0 ; iDigit < nDigits ; iDigit ++)
{
- digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
- eDigit = Energies[iDigit];
+ digit = (AliPHOSDigit*)fGetter->Digits()->At( digits[iDigit] );
+ eDigit = energies[iDigit];
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
fGeom->RelPosInModule(relid, iy, ix);
Float_t eu3 = 0;
for(iDigit = 0 ; iDigit < nDigits ; iDigit ++)
{
- digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
- eDigit = Energies[iDigit];
+ digit = (AliPHOSDigit*)fGetter->Digits()->At( digits[iDigit] );
+ eDigit = energies[iDigit];
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
fGeom->RelPosInModule(relid, iy, ix);
eu3 += eDigit*du*du*du;
}
- Float_t c = E*eu3*eu3/(euu*euu*euu)/2.;
+ Float_t c = e*eu3*eu3/(euu*euu*euu)/2.;
Float_t sign = 1.;
if(eu3<0) sign = -1.;
Float_t r = 1.+ c + sign*TMath::Sqrt(2.*c + c*c);
Float_t u = 0;
if(TMath::Abs(r-1.)>0.1) u = eu3/euu*(r+1.)/(r-1.);
- if(TMath::Abs(r-1.)<0.1) u = TMath::Sqrt(sqr/E/r)*(1.+r);
+ if(TMath::Abs(r-1.)<0.1) u = TMath::Sqrt(sqr/e/r)*(1.+r);
- Float_t e2c = E/(1.+r);
- Float_t e1c = E-e2c;
+ Float_t e2c = e/(1.+r);
+ Float_t e1c = e-e2c;
Float_t u1 = -u/(1.+r);
Float_t u2 = u+u1;
Float_t chmin = GetReconstructionManager()->TwoGamChisqMin();
Float_t emin = GetReconstructionManager()->TwoGamEmin();
Float_t stpmin = GetReconstructionManager()->TwoGamStepMin();
- Int_t Niter = GetReconstructionManager()->TwoGamNumOfIterations(); // Number of iterations.
+ Int_t nIter = GetReconstructionManager()->TwoGamNumOfIterations(); // Number of iterations.
Float_t chisq = 100.; //Initial chisquare.
Float_t y2c = gamma2[1];
Float_t x2c = gamma2[2];
- Float_t E = GetEnergy();
+ Float_t e = GetEnergy();
Float_t eDigit ;
AliPHOSDigit * digit ;
Int_t nDigits = GetMultiplicity();
- Int_t * Digits = GetDigitsList();
- Float_t * Energies = GetEnergiesList();
+ Int_t * digits = GetDigitsList();
+ Float_t * energies = GetEnergiesList();
Float_t ix ;
Float_t iy ;
AliPHOSGetter* fGetter = AliPHOSGetter::GetInstance();
const AliPHOSGeometry* fGeom = fGetter->PHOSGeometry();
- for(Int_t Iter=0; Iter<Niter; Iter++)
+ for(Int_t iter=0; iter<nIter; iter++)
{
Float_t chisqc = 0.;
Float_t grx1c = 0.;
for(Int_t iDigit = 0 ; iDigit < nDigits ; iDigit ++)
{
- digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
- eDigit = Energies[iDigit];
+ digit = (AliPHOSDigit*)fGetter->Digits()->At( digits[iDigit] );
+ eDigit = energies[iDigit];
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
fGeom->RelPosInModule(relid, iy, ix);
// AG(e2c,dx2,dy2,a2,gx2,gy2);
GetReconstructionManager()->AG(e2c,dx2,dy2,a2,gx2,gy2);
- Float_t A = a1+a2;
-// Float_t D = Const*A*(1. - A/E);
+ Float_t a = a1+a2;
+// Float_t D = Const*a*(1. - a/e);
// if(D<0) D=0;
// // D = 9.; // ????
-// Float_t da = A - eDigit;
+// Float_t da = a - eDigit;
// chisqc += da*da/D;
// Float_t dd = da/D;
-// dd = dd*(2.-dd*Const*(1.-2.*A/E));
+// dd = dd*(2.-dd*Const*(1.-2.*a/e));
Float_t dd;
- chisqc += GetReconstructionManager()->TwoGamChi2(A,eDigit,E,dd);
+ chisqc += GetReconstructionManager()->TwoGamChi2(a,eDigit,e,dd);
grx1c += gx1*dd;
gry1c += gy1*dd;
grx2c += gx2*dd;
gry2c += gy2*dd;
- grec += (a1/e1c - a2/e2c)*E*dd;
+ grec += (a1/e1c - a2/e2c)*e*dd;
}
Float_t step = st*gr;
Info("TwoGam", "Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpmin %d",
- Iter, dof, ch/dof, chstop/dof, step, stpmin) ;
+ iter, dof, ch/dof, chstop/dof, step, stpmin) ;
if(step<stpmin)
goto loop101;
- Float_t de = st*gre*E;
+ Float_t de = st*gre*e;
e1c = ee1 - de;
e2c = ee2 + de;
gamma2[1] = yy2;
gamma2[2] = xx2;
- Float_t x1_new = yy1;
- Float_t z1_new = xx1;
- Float_t e1_new = ee1;
- Float_t x2_new = yy2;
- Float_t z2_new = xx2;
- Float_t e2_new = ee2;
+ Float_t x1New = yy1;
+ Float_t z1New = xx1;
+ Float_t e1New = ee1;
+ Float_t x2New = yy2;
+ Float_t z2New = xx2;
+ Float_t e2New = ee2;
TString message ;
- message = " (x,z,E)[1 fit] = (%f, %f, %f)\n" ;
- message = " (x,z,E)[2 fit] = (%f, %f, %f)\n" ;
+ message = " (x,z,e)[1 fit] = (%f, %f, %f)\n" ;
+ message = " (x,z,e)[2 fit] = (%f, %f, %f)\n" ;
Info("TwoGam", message.Data(),
- x1_new, z1_new, e1_new,
- x2_new, z2_new, e2_new) ;
+ x1New, z1New, e1New,
+ x2New, z2New, e2New) ;
fChi2Dof = chisq;
// Use TwoGam() to estimate the positions and energies of merged points.
- Int_t Nmax = 2;
+ Int_t nMax = 2;
Float_t* gamma;
- Int_t* Digits = GetDigitsList();
+ Int_t* digits = GetDigitsList();
Int_t nDigits = GetMultiplicity();
- Float_t* Energies = GetEnergiesList();
+ Float_t* energies = GetEnergiesList();
Float_t* eFit = new Float_t[nDigits];
AliPHOSGetter* fGetter = AliPHOSGetter::GetInstance();
for(Int_t iDigit=0; iDigit<nDigits; iDigit++)
{
- AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
+ AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( digits[iDigit] );
Int_t relid[4] ;
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
Float_t x,z;
fGeom->RelPosInModule(relid, x, z);
Float_t gain = 0.;
- for(Int_t iMax=0; iMax<Nmax; iMax++)
+ for(Int_t iMax=0; iMax<nMax; iMax++)
{
if(iMax==0)
gamma = gamma1;
Float_t dx = xMax - x;
Float_t dz = zMax - z;
- Float_t Amp,gx,gy;
- GetReconstructionManager()->AG(eMax,dz,dx,Amp,gx,gy);
- gain += Amp;
+ Float_t amp,gx,gy;
+ GetReconstructionManager()->AG(eMax,dz,dx,amp,gx,gy);
+ gain += amp;
}
eFit[iDigit] = gain;
}
- for( Int_t iMax=0; iMax<Nmax; iMax++)
+ for( Int_t iMax=0; iMax<nMax; iMax++)
{
if(iMax==0)
gamma = gamma1;
for( Int_t iDigit = 0 ; iDigit < nDigits ; iDigit ++)
{
- AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
- Float_t eDigit = Energies[iDigit];
+ AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( digits[iDigit] );
+ Float_t eDigit = energies[iDigit];
Int_t relid[4] ;
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
Float_t ix,iz;
Float_t dx = xMax - ix;
Float_t dz = zMax - iz;
- Float_t single_shower_gain,gxMax,gyMax;
- GetReconstructionManager()->AG(eMax,dz,dx,single_shower_gain,gxMax,gyMax);
- Float_t total_gain = eFit[iDigit];
- Float_t ratio = single_shower_gain/total_gain;
+ Float_t singleShowerGain,gxMax,gyMax;
+ GetReconstructionManager()->AG(eMax,dz,dx,singleShowerGain,gxMax,gyMax);
+ Float_t totalGain = eFit[iDigit];
+ Float_t ratio = singleShowerGain/totalGain;
eDigit = eDigit*ratio;
newRP->AddDigit(*digit,eDigit);
}
if(nDigits<2)
return;
- Int_t Niter = GetReconstructionManager()->OneGamNumOfIterations(); // number of iterations
- Float_t St0 = GetReconstructionManager()->OneGamInitialStep(); // initial step
-// const Float_t Stpmin = 0.005;
- Float_t Stpmin = GetReconstructionManager()->OneGamStepMin();
+ Int_t nIter = GetReconstructionManager()->OneGamNumOfIterations(); // number of iterations
+ Float_t st0 = GetReconstructionManager()->OneGamInitialStep(); // initial step
+// const Float_t stpMin = 0.005;
+ Float_t stpMin = GetReconstructionManager()->OneGamStepMin();
Float_t chmin = GetReconstructionManager()->OneGamChisqMin();
TVector3 locpos;
Float_t ix, iy;
GetLocalPosition(locpos);
- Float_t E = GetEnergy();
+ Float_t e = GetEnergy();
Float_t xc = locpos.Z();
Float_t yc = locpos.X();
Float_t dx,dy,gx,gy,grxc,gryc;
- Float_t st = St0;
+ Float_t st = st0;
Float_t chisq = 1.e+20;
Float_t gr = 1.;
Float_t grx = 0.;
AliPHOSGetter* fGetter = AliPHOSGetter::GetInstance();
const AliPHOSGeometry* fGeom = fGetter->PHOSGeometry();
- for(Int_t Iter=0; Iter<Niter; Iter++)
+ for(Int_t iter=0; iter<nIter; iter++)
{
chisqc = 0.;
for(Int_t iDigit = 0 ; iDigit < nDigits ; iDigit ++)
{
- Float_t* Energies = GetEnergiesList();
- Int_t* Digits = GetDigitsList();
- digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
- eDigit = Energies[iDigit];
+ Float_t* energies = GetEnergiesList();
+ Int_t* digits = GetDigitsList();
+ digit = (AliPHOSDigit*)fGetter->Digits()->At( digits[iDigit] );
+ eDigit = energies[iDigit];
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
fGeom->RelPosInModule(relid, iy, ix);
if(!dx) dx=dy;
if(!dy) dy=dx;
- Float_t A;
- GetReconstructionManager()->AG(E,dx,dy,A,gx,gy);
+ Float_t a;
+ GetReconstructionManager()->AG(e,dx,dy,a,gx,gy);
Float_t dd;
Info("EvaluatePosition", " (ix iy xc yc dx dy) %f %f %f %f %f %f", ix, iy, xc, yc, dx, dy) ;
- Float_t chi2dg = GetReconstructionManager()->OneGamChi2(A,eDigit,E,dd);
+ Float_t chi2dg = GetReconstructionManager()->OneGamChi2(a,eDigit,e,dd);
// Exclude digit with too large chisquare.
if(chi2dg > 10) { continue; }
loop20: ;
Float_t step = st*gr;
- Info("EvaluatePosition", " Iteration %d dof %d chisq/dof %f chstop/dof %f step %d Stpmin %d",
- Iter, dof, chisq/dof, chisq/dof, chstop/dof, step, Stpmin) ;
+ Info("EvaluatePosition", " Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpMin %d",
+ iter, dof, chisq/dof, chisq/dof, chstop/dof, step, stpMin) ;
- if(step<Stpmin)
+ if(step<stpMin)
goto loop101;
if(step>1.)
// }
Float_t gamma1[3];
- gamma1[0] = E;
+ gamma1[0] = e;
gamma1[1] = y1;
gamma1[2] = x1;
//SetLocalPosition(newpos);
fLocPos=newpos;
- fAmp=E;
+ fAmp=e;
// TVector3 pos;
// RP->GetLocalPosition(pos);
// Remove this point from further procession
// if it's energy is too small.
- Float_t Thr0 = GetReconstructionManager()->KillGamMinEnergy();
+ Float_t thr0 = GetReconstructionManager()->KillGamMinEnergy();
- if(GetEnergy()<Thr0) {
+ if(GetEnergy()<thr0) {
Info("KillWeakPoint", "+++++++ Killing this rec point ++++++++++") ;
RemoveFromWorkingPool(this);
return kTRUE;
void AliPHOSEvalRecPoint::MergeClosePoint()
{
-
+ // merge rec.points if they are too close
AliPHOSGetter* fGetter = AliPHOSGetter::GetInstance();
// AliPHOSDigitizer* digitizer = fGetter->Digitizer();
// Float_t fPedestal = digitizer->GetPedestal(); // YVK 30.09.2001
this->GetLocalPosition(lpos1);
rp->GetLocalPosition(lpos2);
- Int_t* Digits = rp->GetDigitsList();
+ Int_t* digits = rp->GetDigitsList();
Float_t dE = rp->GetEnergy()/(rp->GetEnergy()+this->GetEnergy());
- Float_t new_x = lpos1.X()*dE + lpos2.X()*(1.-dE);
- Float_t new_z = lpos1.Z()*dE + lpos2.Z()*(1.-dE);
- Float_t new_E = rp->GetEnergy()+this->GetEnergy();
- Float_t* Energies = ((AliPHOSEmcRecPoint*)rp)->GetEnergiesList();
+ Float_t newX = lpos1.X()*dE + lpos2.X()*(1.-dE);
+ Float_t newZ = lpos1.Z()*dE + lpos2.Z()*(1.-dE);
+ Float_t newE = rp->GetEnergy()+this->GetEnergy();
+ Float_t* energies = ((AliPHOSEmcRecPoint*)rp)->GetEnergiesList();
for(Int_t iDigit=0; iDigit<rp->GetDigitsMultiplicity(); iDigit++)
{
- AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At(Digits[iDigit]);
- Float_t eDigit = Energies[iDigit];
+ AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At(digits[iDigit]);
+ Float_t eDigit = energies[iDigit];
this->AddDigit(*digit,eDigit);
}
- TVector3 newpos(new_x,0,new_z);
+ TVector3 newpos(newX,0,newZ);
fLocPos = newpos;
- fAmp = new_E;
+ fAmp = newE;
RemoveFromWorkingPool(rp);
delete rp;
AliPHOSDigit * maxAt[1000];
Float_t maxAtEnergy[1000];
- Float_t LocMaxCut, LogWeight;
+ Float_t locMaxCut, logWeight;
Int_t relid[4] ;
Float_t xMax;
Float_t zMax;
}
if(this->IsEmc()) {
- LocMaxCut = clusterizer->GetEmcLocalMaxCut();
- LogWeight = clusterizer->GetEmcLogWeight();
+ locMaxCut = clusterizer->GetEmcLocalMaxCut();
+ logWeight = clusterizer->GetEmcLogWeight();
}
else {
- LocMaxCut = clusterizer->GetCpvLocalMaxCut();
- LogWeight = clusterizer->GetCpvLogWeight();
+ locMaxCut = clusterizer->GetCpvLocalMaxCut();
+ logWeight = clusterizer->GetCpvLogWeight();
}
AliPHOSGetter* fGetter = AliPHOSGetter::GetInstance();
TClonesArray* digits = fGetter->Digits();
// if number of local maxima less then 2 - nothing to unfold
- Int_t Nmax = GetNumberOfLocalMax(maxAt,maxAtEnergy,LocMaxCut,digits);
- if(Nmax<2) return Nmax;
+ Int_t nMax = GetNumberOfLocalMax(maxAt,maxAtEnergy,locMaxCut,digits);
+ if(nMax<2) return nMax;
- Int_t* Digits = GetDigitsList();
+ Int_t* digitsList = GetDigitsList();
Int_t nDigits = GetMultiplicity();
- Float_t* Energies = GetEnergiesList();
+ Float_t* energies = GetEnergiesList();
Float_t* eFit = new Float_t[nDigits];
Int_t iDigit; //loop variable
for(iDigit=0; iDigit<nDigits; iDigit++)
{
- AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
+ AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( digitsList[iDigit] );
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
Float_t x,z;
fGeom->RelPosInModule(relid, x, z);
- for(Int_t iMax=0; iMax<Nmax; iMax++)
+ for(Int_t iMax=0; iMax<nMax; iMax++)
{
AliPHOSDigit* digitMax = maxAt[iMax];
Float_t eMax = maxAtEnergy[iMax];
fGeom->RelPosInModule(relid, xMax, zMax);
Float_t dx = xMax - x;
Float_t dz = zMax - z;
- Float_t Amp,gx,gy;
- GetReconstructionManager()->AG(eMax,dz,dx,Amp,gx,gy);
-// Amp = Amp + 0.5;
- eFit[iDigit] += Amp;
+ Float_t amp,gx,gy;
+ GetReconstructionManager()->AG(eMax,dz,dx,amp,gx,gy);
+// amp = amp + 0.5;
+ eFit[iDigit] += amp;
}
}
- for(Int_t iMax=0; iMax<Nmax; iMax++)
+ for(Int_t iMax=0; iMax<nMax; iMax++)
{
AliPHOSDigit* digitMax = maxAt[iMax];
fGeom->AbsToRelNumbering(digitMax->GetId(), relid) ;
//Neighbous ( matrix 3x3 around the local maximum)
for(Int_t iDigit=0; iDigit<nDigits; iDigit++)
{
- AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( Digits[iDigit] );
- Float_t eDigit = Energies[iDigit];
+ AliPHOSDigit* digit = (AliPHOSDigit*)fGetter->Digits()->At( digitsList[iDigit] );
+ Float_t eDigit = energies[iDigit];
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
Float_t ix,iz;
fGeom->RelPosInModule(relid, ix, iz);
{
Float_t dx = xMax - ix;
Float_t dz = zMax - iz;
- Float_t single_shower_gain,gxMax,gyMax;
- GetReconstructionManager()->AG(eMax,dz,dx,single_shower_gain,gxMax,gyMax);
- Float_t total_gain = eFit[iDigit];
- Float_t ratio = single_shower_gain/total_gain;
+ Float_t singleShowerGain,gxMax,gyMax;
+ GetReconstructionManager()->AG(eMax,dz,dx,singleShowerGain,gxMax,gyMax);
+ Float_t totalGain = eFit[iDigit];
+ Float_t ratio = singleShowerGain/totalGain;
Info("UnfoldLocalMaxima", " ratio -> %f", ratio) ;
eDigit = eDigit*ratio;
newRP->AddDigit(*digit,eDigit);
}
}
- newRP->EvalLocalPosition(LogWeight,digits);
+ newRP->EvalLocalPosition(logWeight,digits);
Info("UnfoldLocalMaxima", "======= Unfold: daughter rec point %d =================", iMax) ;
newRP->Print("");
}
delete[] eFit;
- return Nmax;
+ return nMax;
}
void AliPHOSEvalRecPoint::PrintPoint(Option_t* opt)
{
+ // print rec.point to stdout
AliPHOSCpvRecPoint::Print(opt);
TVector3 lpos;
AliPHOSRecManager* AliPHOSEvalRecPoint::GetReconstructionManager() const
{
-
+ // returns reconstruction manager
TFolder* aliceF = (TFolder*)gROOT->FindObjectAny("YSAlice");
TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
AliPHOSRecManager* recMng = (AliPHOSRecManager*)wPoolF->FindObject("AliPHOSRecManager");
AliPHOSRecPoint* AliPHOSEvalRecPoint::Parent()
{
+ // returns a parent
if(fParent<0) return NULL;
else
return (AliPHOSRecPoint*)GetFromWorkingPool(fParent);
Float_t AliPHOSEvalRecPoint::Chi2Dof() const
{
+ // returns a chi^2 per degree of freedom
return fChi2Dof;
}
const TObject* AliPHOSEvalRecPoint::GetWorkingPool()
{
-
+ // returns a pool of rec.points
TFolder* aliceF = (TFolder*)gROOT->FindObjectAny("YSAlice");
TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
TObject* wPool = wPoolF->FindObject("SmartPoints");
void AliPHOSEvalRecPoint::AddToWorkingPool(TObject* obj)
{
+ // add a rec.point to a pool
((TObjArray*)GetWorkingPool())->Add(obj);
}
TObject* AliPHOSEvalRecPoint::GetFromWorkingPool(Int_t i)
{
+ // return a rec.point from a pool at an index i
// return fWorkingPool->At(i);
return ((TObjArray*)GetWorkingPool())->At(i);
}
Int_t AliPHOSEvalRecPoint::InWorkingPool()
{
+ // return the number of rec.points in a pool
return ((TObjArray*)GetWorkingPool())->GetEntries();
}
void AliPHOSEvalRecPoint::RemoveFromWorkingPool(TObject* obj)
{
+ // remove a rec.point from a pool
((TObjArray*)GetWorkingPool())->Remove(obj);
((TObjArray*)GetWorkingPool())->Compress();
}
void AliPHOSEvalRecPoint::PrintWorkingPool()
{
+ // print pool of rec.points to stdout
((TObjArray*)GetWorkingPool())->Print("");
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
void RemoveFromWorkingPool(TObject* obj);
void PrintWorkingPool();
- enum RecPointType {emc,cpv};
+ enum RecPointType {kEmc,kCpv};
private:
private:
- Bool_t fIsEmc;
- Bool_t fIsCpv;
- Int_t fParent;
- Float_t fChi2Dof;
+ Bool_t fIsEmc; // true if EMC
+ Bool_t fIsCpv; // true if CPV
+ Int_t fParent; // parent
+ Float_t fChi2Dof; // chi^2 per degree of freedom
ClassDef(AliPHOSEvalRecPoint,1)
return kFALSE ;
}
- Bool_t IsPhotonHiPu_LoEf() {
+ Bool_t IsPhotonHiPuLoEf() {
Bool_t pid=kFALSE ;
if(TestPIDBit(8)&& //PCA
TestPIDBit(5)&& //TOF
return pid ;
}
- Bool_t IsPhotonMed_Pu_Ef(){
+ Bool_t IsPhotonMedPuEf(){
Bool_t pid=kFALSE ;
if(TestPIDBit(7)&& //PCA
TestPIDBit(4)&& //TOF
return pid ;
}
- Bool_t IsPhotonHiEf_LoPu() {
+ Bool_t IsPhotonHiEfLoPu() {
Bool_t pid=kFALSE ;
if(TestPIDBit(6)&& //PCA
TestPIDBit(3)&& //TOF
}
Bool_t IsPhoton() {
Bool_t pid=kFALSE ;
- if(IsPhotonHiEf_LoPu()) pid = kTRUE ;
+ if(IsPhotonHiEfLoPu()) pid = kTRUE ;
return pid ;
}
//____________________________________________________________________________
AliPHOSPIDv1::AliPHOSPIDv1(AliPHOSPIDv1 & pid ):AliPHOSPID(pid)
{
+ // ctor
InitParameters() ;
Init() ;
//____________________________________________________________________________
const Int_t AliPHOSPIDv1::GetCPVBit(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * cpv,const Int_t EffPur, const Float_t e) const
{
+ // return 1 if a combination of EMC and CPV is neutral rec.points matches a neutral particle
+ // return 0 otherwise
if(EffPur>2 || EffPur<0)
Error("GetCPVBit","Invalid Efficiency-Purity choice %d",EffPur);
// Relative Distance CPV-EMC
const Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ;
const Int_t GetCPVBit(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv,const Int_t EffPur, const Float_t e) const;
- const Int_t GetPrincipalBit (const Double_t* P, const Int_t eff_pur, const Float_t E)const ; //Principal cut
- const Int_t GetPrincipalPi0Bit(const Double_t* P, const Int_t eff_pur, const Float_t E)const ; //Principal cut
+ const Int_t GetPrincipalBit (const Double_t* P, const Int_t effPur, const Float_t E)const ; //Principal cut
+ const Int_t GetPrincipalPi0Bit(const Double_t* P, const Int_t effPur, const Float_t E)const ; //Principal cut
TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ;
void PrintRecParticles(Option_t * option) ;
virtual void WriteRecParticles(Int_t event) ;
**************************************************************************/
- //_________________________________________________________________________
+//_________________________________________________________________________
// Class for the management by the CPV reconstruction.
-//
+////
//*-- Author : Boris Polichtchouk (IHEP, Protvino) 6 Mar 2001
//
// --- ROOT system ---
return kConst*ai*(1.-ai/etot);
}
-Float_t AliPHOSRecCpvManager::OneGamChi2(Float_t ai, Float_t ei, Float_t etot, Float_t& Gi)
+Float_t AliPHOSRecCpvManager::OneGamChi2(Float_t ai, Float_t ei, Float_t etot, Float_t& Gi) const
{
//"Chi2" for one cell.
// etot is the total "shower" energy, ai is the
- TMath::ATan(x*y/(7*kb*TMath::Sqrt((7*kb)*(7*kb) + x*x+y*y)))
+ TMath::ATan(x*y/(9*kb*TMath::Sqrt((9*kb)*(9*kb) + x*x+y*y)));
- Float_t fcml = ka*fff/6.2831853071796;
+ Float_t fcml = ka*fff/TMath::TwoPi();
// Info("Fcml", "fcml: %f", fcml) ;
return fcml;
- y*(1.-x*x/skv)*7*kb*TMath::Sqrt(skv)/((7*kb)*(7*kb)*skv+x*x*y*y)
+ y*(1.-x*x/skv)*9*kb*TMath::Sqrt(skv)/((9*kb)*(9*kb)*skv+x*x*y*y);
- Float_t grad = ka*gradient/6.2831853071796;
+ Float_t grad = ka*gradient/TMath::TwoPi();
return grad;
}
{
// Put a comment here
- const Float_t a = 1.0;
+ const Float_t ka = 1.0;
const Float_t kb = 0.70;
Float_t skv = kb*kb + x*x + y*y;
- x*(1.-y*y/skv)*7*kb*TMath::Sqrt(skv)/((7*kb)*(7*kb)*skv+x*x*y*y)
+ x*(1.-y*y/skv)*9*kb*TMath::Sqrt(skv)/((9*kb)*(9*kb)*skv+x*x*y*y);
- Float_t grad = a*gradient/6.2831853071796;
+ Float_t grad = ka*gradient/TMath::TwoPi();
return grad;
}
void AG(Float_t e, Float_t dx, Float_t dy, Float_t& a, Float_t& gradx, Float_t& grady );
Float_t Dispersion(Float_t etot, Float_t ai, Float_t ei) const;
- Float_t OneGamChi2(Float_t ai, Float_t ei, Float_t etot, Float_t& gi) ;
+ Float_t OneGamChi2(Float_t ai, Float_t ei, Float_t etot, Float_t& gi) const ;
Float_t TwoGamChi2(Float_t ai, Float_t ei, Float_t etot, Float_t& gi) const ;
Float_t OneGamChisqCut() const { return fOneGamChisqCut; }
//_________________________________________________________________________
// Class for the management by the Emc reconstruction.
-//
+////
//*-- Author : Boris Polichtchouk (IHEP, Protvino) 6 Mar 2001
//
// --- ROOT system ---
AliPHOSRecEmcManager::AliPHOSRecEmcManager()
{
-
+ // default ctor
// fOneGamChisqCut = 3.;
fOneGamChisqCut = 1.3; // bvp 31.08.2001
AliPHOSRecEmcManager::~AliPHOSRecEmcManager(void) {}
-Float_t AliPHOSRecEmcManager::Dispersion(Float_t Etot, Float_t Ai, Float_t Ei) const
+Float_t AliPHOSRecEmcManager::Dispersion(Float_t eTot, Float_t ai, Float_t ei) const
{
//"Dispresion" of energy deposition in the cell.
- // Etot is the total shower energy, Ai is the
+ // eTot is the total shower energy, ai is the
// calculated cell response,
- // Ei is the measured cell response.
+ // ei is the measured cell response.
- return Ei;
+ return ei;
}
-Float_t AliPHOSRecEmcManager::OneGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi)
+Float_t AliPHOSRecEmcManager::OneGamChi2(Float_t ai, Float_t ei, Float_t eTot, Float_t& gi) const
{
// Chi2 used in OneGam (one-gamma fitting).
- // Gi is d(Chi2)/d(Ai).
+ // gi is d(Chi2)/d(ai).
- Float_t da = Ai - Ei;
- Float_t D = Ei; // we assume that sigma(E) = sqrt(E)
- Gi = 2.*(Ai-Ei)/D;
+ Float_t da = ai - ei;
+ Float_t d = ei; // we assume that sigma(E) = sqrt(E)
+ gi = 2.*(ai-ei)/d;
- return da*da/D;
+ return da*da/d;
}
-Float_t AliPHOSRecEmcManager::TwoGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi) const
+Float_t AliPHOSRecEmcManager::TwoGamChi2(Float_t ai, Float_t ei, Float_t eTot, Float_t& gi) const
{
+ // calculates chi^2
+ Float_t da = ai - ei;
+ Float_t d = ei; // we assume that sigma(E) = sqrt(E)
+ gi = 2.*(ai-ei)/d;
- Float_t da = Ai - Ei;
- Float_t D = Ei; // we assume that sigma(E) = sqrt(E)
- Gi = 2.*(Ai-Ei)/D;
-
- return da*da/D;
+ return da*da/d;
}
-void AliPHOSRecEmcManager::AG(Float_t Ei, Float_t Xi, Float_t Yi, Float_t& Ai, Float_t& GXi, Float_t& GYi )
+void AliPHOSRecEmcManager::AG(Float_t ei, Float_t xi, Float_t yi, Float_t& ai, Float_t& gxi, Float_t& gyi )
{
- //Calculates amplitude (Ai) and gradients (GXi, GYi) of CPV pad response.
+ //Calculates amplitude (ai) and gradients (gxi, gyi) of CPV pad response.
//Integrated response (total "shower energy") is E,
- //Xi and Yi are the distances along x and y from reference point
+ //xi and yi are the distances along x and y from reference point
// to the pad center.
//Shape of the shower is from PHOS TDR.
- Float_t r = TMath::Sqrt(Xi*Xi + Yi*Yi);
+ Float_t r = TMath::Sqrt(xi*xi + yi*yi);
Float_t r4 = r*r*r*r ;
Float_t r295 = TMath::Power(r, 2.95) ;
- Float_t shape = Ei*TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
- Ai = shape;
+ Float_t shape = ei*TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
+ ai = shape;
- //d(shape)/d(Xi)
- GXi = (-(TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2)*
- ((-0.006077944*Xi*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),
+ //d(shape)/d(xi)
+ gxi = (-(TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)*
+ ((-0.006077944*xi*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),
0.4750000000000001))/
- TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475),2) -
- (1.04*Xi*(TMath::Power(Xi,2) + TMath::Power(Yi,2)))/
- TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2),2))) -
- 4*Xi*(TMath::Power(Xi,2) + TMath::Power(Yi,2))*
- (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475)) +
- 1./(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2))))/
- TMath::Power(TMath::E(),TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2)*
- (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475)) +
- 1./(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2))));
+ TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475),2) -
+ (1.04*xi*(TMath::Power(xi,2) + TMath::Power(yi,2)))/
+ TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2),2))) -
+ 4*xi*(TMath::Power(xi,2) + TMath::Power(yi,2))*
+ (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) +
+ 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))))/
+ TMath::Power(TMath::E(),TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)*
+ (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) +
+ 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))));
- GXi = GXi*Ei;
+ gxi = gxi*ei;
- //d(shape)/d(Yi)
- GYi = (-(TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2)*
- ((-0.006077944*Yi*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),
+ //d(shape)/d(yi)
+ gyi = (-(TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)*
+ ((-0.006077944*yi*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),
0.4750000000000001))/
- TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475),2) -
- (1.04*Yi*(TMath::Power(Xi,2) + TMath::Power(Yi,2)))/
- TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2),2))) -
- 4*Yi*(TMath::Power(Xi,2) + TMath::Power(Yi,2))*
- (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475)) +
- 1./(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2))))/
- TMath::Power(TMath::E(),TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2)*
- (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475)) +
- 1./(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2))));
-
-
- GYi = GYi*Ei;
+ TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475),2) -
+ (1.04*yi*(TMath::Power(xi,2) + TMath::Power(yi,2)))/
+ TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2),2))) -
+ 4*yi*(TMath::Power(xi,2) + TMath::Power(yi,2))*
+ (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) +
+ 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))))/
+ TMath::Power(TMath::E(),TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)*
+ (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) +
+ 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))));
+
+
+ gyi = gyi*ei;
}
~AliPHOSRecEmcManager(void);
- void AG(Float_t E, Float_t dx, Float_t dy, Float_t& A, Float_t& grad_x, Float_t& grad_y );
- Float_t Dispersion(Float_t Etot, Float_t Ai, Float_t Ei) const;
+ void AG(Float_t e, Float_t dx, Float_t dy, Float_t& a, Float_t& gradx, Float_t& grady );
+ Float_t Dispersion(Float_t eTot, Float_t ai, Float_t ei) const;
- Float_t OneGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi);
- Float_t TwoGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi)const;
+ Float_t OneGamChi2(Float_t ai, Float_t ei, Float_t eTot, Float_t& gi)const;
+ Float_t TwoGamChi2(Float_t ai, Float_t ei, Float_t eTot, Float_t& gi)const;
Float_t OneGamChisqCut() const{ return fOneGamChisqCut; }
Float_t OneGamInitialStep() const{ return fOneGamInitialStep; }
private:
- Float_t fOneGamChisqCut;
+ Float_t fOneGamChisqCut; // what is it ?
- Float_t fOneGamInitialStep;
- Float_t fOneGamChisqMin;
- Float_t fOneGamStepMin;
- Int_t fOneGamNumOfIterations;
+ Float_t fOneGamInitialStep; // what is it ?
+ Float_t fOneGamChisqMin; // what is it ?
+ Float_t fOneGamStepMin; // what is it ?
+ Int_t fOneGamNumOfIterations; // what is it ?
- Float_t fTwoGamInitialStep;
- Float_t fTwoGamChisqMin;
- Float_t fTwoGamEmin;
- Float_t fTwoGamStepMin;
- Int_t fTwoGamNumOfIterations;
+ Float_t fTwoGamInitialStep; // what is it ?
+ Float_t fTwoGamChisqMin; // what is it ?
+ Float_t fTwoGamEmin; // what is it ?
+ Float_t fTwoGamStepMin; // what is it ?
+ Int_t fTwoGamNumOfIterations; // what is it ?
- Float_t fThr0;
- Float_t fSqdCut;
-
- public:
+ Float_t fThr0; // what is it ?
+ Float_t fSqdCut; // what is it ?
ClassDef(AliPHOSRecEmcManager,1) // Emc reconstruction management class
AliPHOSRecManager();
virtual ~AliPHOSRecManager(void) {}
- virtual void AG(Float_t E, Float_t dx, Float_t dy, Float_t& A, Float_t& grad_x, Float_t& grad_y ) = 0;
- virtual Float_t Dispersion(Float_t Etot, Float_t Ai, Float_t Ei) const = 0;
+ virtual void AG(Float_t e, Float_t dx, Float_t dy, Float_t& A, Float_t& gradX, Float_t& gradY ) = 0;
+ virtual Float_t Dispersion(Float_t eTot, Float_t ai, Float_t ei) const = 0;
- virtual Float_t OneGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi) = 0;
- virtual Float_t TwoGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi) const = 0;
+ virtual Float_t OneGamChi2(Float_t ai, Float_t ei, Float_t eTot, Float_t& gi) const = 0 ;
+ virtual Float_t TwoGamChi2(Float_t ai, Float_t ei, Float_t eTot, Float_t& gi) const = 0;
virtual Float_t OneGamChisqCut()const = 0 ;
virtual Float_t OneGamInitialStep() const = 0;
private:
Int_t fPHOSTrackSegment ; // pointer to the associated track segment in PHOS
- Bool_t fDebug ;
+ Bool_t fDebug ; // debug flug: silent of =0
ClassDef(AliPHOSRecParticle,2) // Reconstructed Particle
};