]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSvImpacts.cxx
Calibration parameters for ideal calibration, decalibration and inverse calibration...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSvImpacts.cxx
index e8dc33efeed4e96e0bca6e9bb951c15e074293f1..ffa1d92a7f74c72ef0b3566e13a65dcb6df9b274 100644 (file)
 
 /* $Id$ */
 
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.21  2005/05/28 14:19:05  schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
 //_________________________________________________________________________
 // Implementation version vImpacts of PHOS Manager class.
 // This class inherits from v1 and adds impacts storing.
@@ -29,7 +37,7 @@
 
 // --- ROOT system ---
 
-#include <TTree.h>
+//#include <TTree.h>
 #include <TVirtualMC.h>
 
 // --- Standard library ---
@@ -41,6 +49,7 @@
 #include "AliPHOSvImpacts.h"
 #include "AliRun.h"
 #include "AliMC.h"
+#include "AliLog.h"
 
 ClassImp(AliPHOSvImpacts)
 
@@ -117,7 +126,15 @@ AliPHOSvImpacts::~AliPHOSvImpacts()
 }
 
 //____________________________________________________________________________
-void AliPHOSvImpacts::AddImpact( char* det, Int_t shunt, Int_t primary, Int_t track, Int_t module,
+void AliPHOSvImpacts::Copy(TObject & phos) const
+{
+  TObject::Copy(phos) ; 
+  AliPHOS::Copy(phos) ; 
+}
+
+
+//____________________________________________________________________________
+void AliPHOSvImpacts::AddImpact(const char* det, Int_t shunt, Int_t primary, Int_t track, Int_t module,
                           Int_t pid, TLorentzVector p, Float_t *xyz)
 {
   // Add an impact to the impact list.
@@ -138,10 +155,9 @@ void AliPHOSvImpacts::AddImpact( char* det, Int_t shunt, Int_t primary, Int_t tr
 
   new((*impacts)[nImpacts]) AliPHOSImpact(shunt,primary,track,pid,p,xyz) ;
 
-  if (fDebug==1) {
-    printf("Module %d %s: ",module,det);
+  AliDebugClass(1,Form("Module %d %s: ",module,det));
+  if (AliLog::GetGlobalDebugLevel()>0)
     (dynamic_cast<AliPHOSImpact*>((impacts->At(nImpacts))))->Print();
-  }
 }
 
 //____________________________________________________________________________
@@ -198,7 +214,8 @@ void AliPHOSvImpacts::StepManager(void)
 
   // Add impact to EMC
 
-  if( gMC->CurrentVolID(copy) == gMC->VolId("PXTL") &&
+  static Int_t idPXTL = gMC->VolId("PXTL");
+  if( gMC->CurrentVolID(copy) == idPXTL &&
       gMC->IsTrackEntering() ) {
     gMC->TrackMomentum(pmom);
     gMC->TrackPosition(pos) ;
@@ -227,7 +244,8 @@ void AliPHOSvImpacts::StepManager(void)
 
   // Add impact to CPV
 
-  if( gMC->CurrentVolID(copy) == gMC->VolId("PCPQ") &&
+  static Int_t idPCPQ = gMC->VolId("PCPQ");
+  if( gMC->CurrentVolID(copy) == idPCPQ &&
       gMC->IsTrackEntering() ) {
     gMC->TrackMomentum(pmom);
     gMC->TrackPosition(pos) ;