// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSCpvRecPoint.h"
-#include "AliPHOSPpsdRecPoint.h"
-
+#include "AliPHOSGetter.h"
ClassImp(AliPHOSCpvRecPoint)
//____________________________________________________________________________
fLengZ = -1;
}
+//____________________________________________________________________________
+AliPHOSCpvRecPoint::AliPHOSCpvRecPoint(const char * opt) : AliPHOSEmcRecPoint(opt)
+{
+ // ctor
+
+ fLengX = -1;
+ fLengZ = -1;
+ }
+
//____________________________________________________________________________
AliPHOSCpvRecPoint::~AliPHOSCpvRecPoint()
{
// dtor
}
-
//____________________________________________________________________________
Bool_t AliPHOSCpvRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) const
{
Bool_t aren = kFALSE ;
- AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+ AliPHOSGeometry * phosgeom = (AliPHOSGeometry*)gime->PHOSGeometry();
+
Int_t relid1[4] ;
phosgeom->AbsToRelNumbering(digit1->GetId(), relid1) ;
Int_t rv ;
- if( (strcmp(obj->ClassName() , "AliPHOSPpsdRecPoint" )) == 0) // PPSD Rec Point
- {
- AliPHOSPpsdRecPoint * clu = (AliPHOSPpsdRecPoint *)obj ;
- if(this->GetPHOSMod() < clu->GetPHOSMod() )
- rv = -1 ;
- else
- rv = 1 ;
- return rv ;
- }
- else
- {
- AliPHOSCpvRecPoint * clu = (AliPHOSCpvRecPoint *) obj ;
-
- Int_t phosmod1 = GetPHOSMod() ;
- Int_t phosmod2 = clu->GetPHOSMod() ;
-
- TVector3 locpos1;
- GetLocalPosition(locpos1) ;
- TVector3 locpos2;
- clu->GetLocalPosition(locpos2) ;
-
- if(phosmod1 == phosmod2 ) {
- Int_t rowdif = (Int_t)TMath::Ceil(locpos1.X()/delta)-(Int_t)TMath::Ceil(locpos2.X()/delta) ;
- if (rowdif> 0)
- rv = 1 ;
- else if(rowdif < 0)
- rv = -1 ;
- else if(locpos1.Z()>locpos2.Z())
- rv = -1 ;
- else
- rv = 1 ;
- }
-
- else {
- if(phosmod1 < phosmod2 )
- rv = -1 ;
- else
- rv = 1 ;
- }
-
- return rv ;
- }
+ AliPHOSCpvRecPoint * clu = (AliPHOSCpvRecPoint *) obj ;
+
+ Int_t phosmod1 = GetPHOSMod() ;
+ Int_t phosmod2 = clu->GetPHOSMod() ;
+
+ TVector3 locpos1;
+ GetLocalPosition(locpos1) ;
+ TVector3 locpos2;
+ clu->GetLocalPosition(locpos2) ;
+
+ if(phosmod1 == phosmod2 ) {
+ Int_t rowdif = (Int_t)TMath::Ceil(locpos1.X()/delta)-(Int_t)TMath::Ceil(locpos2.X()/delta) ;
+ if (rowdif> 0)
+ rv = 1 ;
+ else if(rowdif < 0)
+ rv = -1 ;
+ else if(locpos1.Z()>locpos2.Z())
+ rv = -1 ;
+ else
+ rv = 1 ;
+ }
+
+ else {
+ if(phosmod1 < phosmod2 )
+ rv = -1 ;
+ else
+ rv = 1 ;
+ }
+
+ return rv ;
+
}
//______________________________________________________________________________
-void AliPHOSCpvRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py)
+void AliPHOSCpvRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) const
{
// // Execute action corresponding to one event
// // This member function is called when a AliPHOSRecPoint is clicked with the locator
// // static Int_t pxold, pyold;
-// AliPHOSIndexToObject * please = AliPHOSIndexToObject::GetInstance() ;
+// AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
// static TGraph * digitgraph = 0 ;
// Float_t zimin = 999. ;
// for(iDigit=0; iDigit<kMulDigit; iDigit++) {
-// digit = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigit]) ) ;
+// digit = (AliPHOSDigit *) ( gime->Digit(fDigitsList[iDigit]) ) ;
// phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
// phosgeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]);
// if ( xi[iDigit] > ximax )
// Float_t x, z ;
// for(iDigit=0; iDigit<kMulDigit; iDigit++) {
-// digit = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigit]) ) ;
+// digit = (AliPHOSDigit *) ( gime->Digit(fDigitsList[iDigit]) ) ;
// phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
// phosgeom->RelPosInModule(relid, x, z);
// histo->Fill(x, z, fEnergyList[iDigit] ) ;
}
//____________________________________________________________________________
-void AliPHOSCpvRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits){
+void AliPHOSCpvRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits)
+{
+ // wraps other methods
AliPHOSEmcRecPoint::EvalAll(logWeight,digits) ;
EvalClusterLengths(digits) ;
}
AliPHOSDigit * digit ;
- AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+ AliPHOSGeometry * phosgeom = (AliPHOSGeometry*)gime->PHOSGeometry();
Int_t iDigit;
} else {
x = -1e6 ;
z = -1e6 ;
- if (fMulDigit != 0) cout << "AliPHOSCpvRecPoint: too low log weight factor "
- << "to evaluate cluster's center\n";
+ if (fMulDigit != 0)
+ Warning(":EvalLocalPosition", "Too low log weight factor to evaluate cluster's center" ) ;
}
fLocPos.SetX(x) ;
fLocPos.SetY(0.) ;
fLocPos.SetZ(z) ;
+ fLocPosM = 0 ;
}
AliPHOSDigit * digit ;
- AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+ AliPHOSGeometry * phosgeom = (AliPHOSGeometry*)gime->PHOSGeometry();
const Int_t kMaxLeng=20;
Int_t idX[kMaxLeng], idZ[kMaxLeng];
{
// Print the list of digits belonging to the cluster
- cout << "AliPHOSCpvRecPoint: " << endl ;
-
+ TString message ;
+ message = "AliPHOSCpvRecPoint: " ;
+ message += "Digits # " ;
+ Info("Print", message.Data()) ;
+
Int_t iDigit;
- cout << "Digits # " ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- cout << fDigitsList[iDigit] << " " ;
- cout << endl ;
+ Info("Print", " %d ", fDigitsList[iDigit]) ;
- cout << "Energies: " ;
+ Info("Print", "Energies: ") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- cout << fEnergyList[iDigit] << " " ;
- cout << endl ;
+ Info("Print", " %f ", fEnergyList[iDigit]) ;
- cout << " Multiplicity = " << fMulDigit << endl ;
- cout << " Cluster Energy = " << fAmp << endl ;
- cout << " Stored at position " << GetIndexInList() << endl ;
+ message = " Multiplicity = %d\n" ;
+ message += " Cluster Energy = %f\n" ;
+ message += " Stored at position %d\n" ;
+ Info("Print", message.Data(), fMulDigit, fAmp, GetIndexInList() ) ;
+
}