]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSCpvRecPoint.cxx
coverity fix (Prabhat Pujahari <p.pujahari@gmail.com>)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSCpvRecPoint.cxx
index e528b3fa83e3e3abe175b3dcc6e9b7574a717a68..b5623b623a1e6ca1dcba5ef5fa31012bd8b87899 100644 (file)
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.26  2007/06/18 07:02:44  kharlov
+ * Change the signature of EvalLocalPosition() to obey the method virtuality from the parent class
+ *
  * Revision 1.25  2007/03/06 06:47:28  kharlov
  * DP:Possibility to use actual vertex position added
- *
- * Revision 1.24  2006/08/28 10:01:56  kharlov
- * Effective C++ warnings fixed (Timur Pocheptsov)
- *
- * Revision 1.23  2005/12/20 14:28:47  hristov
- * Additional protection
- *
- * 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   
-//*-- Author: Yuri Kharlov
+//-- Author: Yuri Kharlov
 //  (after Dmitri Peressounko (RRC KI & SUBATECH))
 //  30 October 2000 
 
@@ -86,7 +79,7 @@ Bool_t AliPHOSCpvRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * d
   
   Bool_t aren = kFALSE ;
   
-  AliPHOSGeometry * phosgeom =  AliPHOSLoader::GetPHOSGeometry();
+  AliPHOSGeometry * phosgeom =  AliPHOSGeometry::GetInstance() ;
 
   Int_t relid1[4] ; 
   phosgeom->AbsToRelNumbering(digit1->GetId(), relid1) ; 
@@ -256,16 +249,19 @@ void AliPHOSCpvRecPoint::ExecuteEvent(Int_t, Int_t, Int_t ) /*const*/
 }
 
 //____________________________________________________________________________
-void AliPHOSCpvRecPoint::EvalAll(Float_t logWeight, TClonesArray * digits)
+void AliPHOSCpvRecPoint::EvalAll(TClonesArray * digits)
 {
-  AliPHOSEmcRecPoint::EvalAll(logWeight,digits) ;
-  EvalClusterLengths(digits) ;
+  // Evaluate local coordinate assuming the vertex in (000) and no inclination
+  AliPHOSEmcRecPoint::EvalAll(digits) ;
 }
 //____________________________________________________________________________
 void AliPHOSCpvRecPoint::EvalAll(Float_t logWeight, TVector3 &vtx, TClonesArray * digits)
 {
   // wraps other methods
+  TVector3 vInc(0,1,0);
   AliPHOSEmcRecPoint::EvalAll(logWeight,vtx,digits) ;
+  EvalLocalPosition(logWeight, vtx, digits,vInc) ;
+  EvalClusterLengths(digits) ;
 }
 //____________________________________________________________________________
 void AliPHOSCpvRecPoint::EvalLocalPosition(Float_t logWeight, TVector3 & /*vtx */, TClonesArray * digits, TVector3 &/* vInc */)
@@ -281,7 +277,7 @@ void AliPHOSCpvRecPoint::EvalLocalPosition(Float_t logWeight, TVector3 & /*vtx *
   
   AliPHOSDigit * digit ;
 
-  AliPHOSGeometry * phosgeom =  AliPHOSLoader::GetPHOSGeometry();
+  AliPHOSGeometry * phosgeom =  AliPHOSGeometry::GetInstance();
   
   Int_t iDigit;
 
@@ -314,7 +310,6 @@ void AliPHOSCpvRecPoint::EvalLocalPosition(Float_t logWeight, TVector3 & /*vtx *
   fLocPos.SetX(x)  ;
   fLocPos.SetY(0.) ;
   fLocPos.SetZ(z)  ;
-  fLocPosM = 0 ;
 
 }
 
@@ -332,7 +327,7 @@ void AliPHOSCpvRecPoint::EvalClusterLengths(TClonesArray * digits)
 
   AliPHOSDigit * digit ;
 
-  AliPHOSGeometry * phosgeom =  AliPHOSLoader::GetPHOSGeometry();
+  AliPHOSGeometry * phosgeom =  AliPHOSGeometry::GetInstance();
 
   const Int_t kMaxLeng=20;
   Int_t idX[kMaxLeng], idZ[kMaxLeng];
@@ -372,7 +367,7 @@ void AliPHOSCpvRecPoint::Print(const Option_t *) const
   TString message ; 
   message  =  "AliPHOSCpvRecPoint: " ;
   message +=  "Digits #   " ;
-  AliInfo(Form(message.Data())) ; 
+  AliInfo(message.Data()) ; 
   
   Int_t iDigit;