/* $Id$ */
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.22 2005/05/28 14:19:04 schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
//_________________________________________________________________________
// RecPoint implementation for PHOS-CPV
// An CpvRecPoint is a cluster of digits
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSDigit.h"
#include "AliPHOSCpvRecPoint.h"
}
//______________________________________________________________________________
-void AliPHOSCpvRecPoint::ExecuteEvent(Int_t, Int_t, Int_t ) const
+void AliPHOSCpvRecPoint::ExecuteEvent(Int_t, Int_t, Int_t ) /*const*/
{
// // Execute action corresponding to one event
// // This member function is called when a AliPHOSRecPoint is clicked with the locator
Float_t zi ;
phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
phosgeom->RelPosInModule(relid, xi, zi);
- Float_t w = TMath::Max( 0., logWeight + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
- x += xi * w ;
- z += zi * w ;
- wtot += w ;
+ if (fAmp>0 && fEnergyList[iDigit]>0) {
+ Float_t w = TMath::Max( 0., logWeight + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
+ x += xi * w ;
+ z += zi * w ;
+ wtot += w ;
+ }
+ else
+ AliError(Form("Wrong energy %f and/or amplitude %f\n", fEnergyList[iDigit], fAmp));
}
if (wtot != 0) {
x = -1e6 ;
z = -1e6 ;
if (fMulDigit != 0)
- Warning(":EvalLocalPosition", "Too low log weight factor to evaluate cluster's center" ) ;
+ AliWarning(Form("Too low log weight factor to evaluate cluster's center" )) ;
}
fLocPos.SetX(x) ;
fLocPos.SetY(0.) ;
//____________________________________________________________________________
-void AliPHOSCpvRecPoint::Print()
+void AliPHOSCpvRecPoint::Print(const Option_t *) const
{
// Print the list of digits belonging to the cluster
TString message ;
message = "AliPHOSCpvRecPoint: " ;
message += "Digits # " ;
- Info("Print", message.Data()) ;
+ AliInfo(Form(message.Data())) ;
Int_t iDigit;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- Info("Print", " %d ", fDigitsList[iDigit]) ;
+ printf(" %d \n", fDigitsList[iDigit]) ;
- Info("Print", "Energies: ") ;
+ printf("Energies: \n") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- Info("Print", " %f ", fEnergyList[iDigit]) ;
+ printf(" %f ", fEnergyList[iDigit]) ;
message = " Multiplicity = %d\n" ;
message += " Cluster Energy = %f\n" ;
message += " Stored at position %d\n" ;
- Info("Print", message.Data(), fMulDigit, fAmp, GetIndexInList() ) ;
+ printf(message.Data(), fMulDigit, fAmp, GetIndexInList() ) ;
}