]> 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 34c337a2f677f85306023ddab9f51e6e5a504368..ffa1d92a7f74c72ef0b3566e13a65dcb6df9b274 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+
 /* $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.
 
 // --- ROOT system ---
 
-#include "TTree.h"
+//#include <TTree.h>
+#include <TVirtualMC.h>
 
 // --- Standard library ---
 
 // --- AliRoot header files ---
 
-#include "AliRun.h"
-#include "AliPHOSvImpacts.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSImpact.h"
+#include "AliPHOSvImpacts.h"
+#include "AliRun.h"
+#include "AliMC.h"
+#include "AliLog.h"
 
 ClassImp(AliPHOSvImpacts)
 
@@ -114,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.
@@ -135,24 +155,23 @@ 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();
-  }
 }
 
 //____________________________________________________________________________
-void AliPHOSvImpacts::MakeBranch(Option_t *opt, const char *file)
+void AliPHOSvImpacts::MakeBranch(Option_t *opt)
 {  
   // Create new branch in the current Hits Root Tree containing
   // a list of PHOS impacts (exact values of track coming to detector)
 
-  AliDetector::MakeBranch(opt,file);
+  AliDetector::MakeBranch(opt);
   
   Int_t bufferSize = 32000 ;
   Int_t splitlevel = 0 ;
-  gAlice->TreeH()->Branch("PHOSEmcImpacts" , "TList", &fEMCImpacts , bufferSize, splitlevel);
-  gAlice->TreeH()->Branch("PHOSCpvImpacts" , "TList", &fCPVImpacts , bufferSize, splitlevel);
+  TreeH()->Branch("PHOSEmcImpacts" , "TList", &fEMCImpacts , bufferSize, splitlevel);
+  TreeH()->Branch("PHOSCpvImpacts" , "TList", &fCPVImpacts , bufferSize, splitlevel);
   
 }
 
@@ -189,13 +208,14 @@ void AliPHOSvImpacts::StepManager(void)
   TLorentzVector pos      ;           // Lorentz vector of the track current position
   Int_t          copy     ;
 
-  Int_t tracknumber =  gAlice->CurrentTrack() ; 
-  Int_t primary     =  gAlice->GetPrimary( gAlice->CurrentTrack() ); 
+  Int_t tracknumber =  gAlice->GetMCApp()->GetCurrentTrackNumber() ; 
+  Int_t primary     =  gAlice->GetMCApp()->GetPrimary( gAlice->GetMCApp()->GetCurrentTrackNumber() ); 
   TString name      =  GetGeometry()->GetName() ; 
 
   // 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) ;
@@ -224,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) ;