]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSRecParticle.cxx
Spelling
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecParticle.cxx
index 34bc0d47a3de03fa78dac7909d7358a4b39185dc..f4ce52bc2964a1b84f9c30e284b7d0d348e56fc4 100644 (file)
@@ -46,7 +46,7 @@ AliPHOSRecParticle::AliPHOSRecParticle():
   fPos()
 {
   // ctor
-  const Int_t nSPECIES = AliPID::kSPECIESN;
+  const Int_t nSPECIES = AliPID::kSPECIESCN;
   for(Int_t i = 0; i<nSPECIES ; i++)
     fPID[i]=0.;
 }
@@ -82,11 +82,18 @@ AliPHOSRecParticle::AliPHOSRecParticle(const AliPHOSRecParticle & rp):
   fPolarTheta  = rp.fPolarTheta;
   fPolarPhi    = rp.fPolarPhi;
   fParticlePDG = rp.fParticlePDG; 
-  const Int_t nSPECIES = AliPID::kSPECIESN;
+  const Int_t nSPECIES = AliPID::kSPECIESCN;
   for(Int_t i = 0; i<nSPECIES ; i++)
     fPID[i]=rp.fPID[i];
 }
 
+//____________________________________________________________________________
+AliPHOSRecParticle & AliPHOSRecParticle::operator = (const AliPHOSRecParticle &)
+{
+  Fatal("operator =", "not implemented");
+  return *this;
+}
+
 //____________________________________________________________________________
 Int_t AliPHOSRecParticle::GetNPrimaries() const  
 { 
@@ -99,9 +106,9 @@ Int_t AliPHOSRecParticle::GetNPrimariesToRecParticles() const
   // Get the number of primaries at the origine of the RecParticle
   Int_t rv = 0 ;
   AliRunLoader* rl = AliRunLoader::Instance() ;
-  AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
-  Int_t emcRPindex = dynamic_cast<AliPHOSTrackSegment*>(phosLoader->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex();
-  dynamic_cast<AliPHOSEmcRecPoint*>(phosLoader->EmcRecPoints()->At(emcRPindex))->GetPrimaries(rv) ; 
+  AliPHOSLoader * phosLoader = static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+  Int_t emcRPindex = static_cast<AliPHOSTrackSegment*>(phosLoader->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex();
+  static_cast<AliPHOSEmcRecPoint*>(phosLoader->EmcRecPoints()->At(emcRPindex))->GetPrimaries(rv) ; 
   return rv ; 
 }
 
@@ -111,7 +118,7 @@ const TParticle * AliPHOSRecParticle::GetPrimary() const
   // Get the primary particle at the origine of the RecParticle and 
   // which has deposited the largest energy in SDigits
   AliRunLoader* rl = AliRunLoader::Instance() ;
-  AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+  AliPHOSLoader * phosLoader = static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
   rl->GetEvent(rl->GetEventNumber()) ;
   rl->LoadKinematics("READ");
   rl->LoadSDigits("READ");
@@ -166,7 +173,7 @@ Int_t AliPHOSRecParticle::GetPrimaryIndex() const
 
 
   AliRunLoader* rl = AliRunLoader::Instance() ;
-  AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+  AliPHOSLoader * phosLoader = static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
   rl->GetEvent(rl->GetEventNumber()) ;
   rl->LoadHits("READ");
   rl->LoadDigits("READ");
@@ -276,10 +283,10 @@ const TParticle * AliPHOSRecParticle::GetPrimary(Int_t index) const
   else { 
     Int_t dummy ; 
     AliRunLoader* rl = AliRunLoader::Instance() ;
-    AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+    AliPHOSLoader * phosLoader = static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
 
-    Int_t emcRPindex = dynamic_cast<AliPHOSTrackSegment*>(phosLoader->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex();
-    Int_t primaryindex = dynamic_cast<AliPHOSEmcRecPoint*>(phosLoader->EmcRecPoints()->At(emcRPindex))->GetPrimaries(dummy)[index] ; 
+    Int_t emcRPindex = static_cast<AliPHOSTrackSegment*>(phosLoader->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex();
+    Int_t primaryindex = static_cast<AliPHOSEmcRecPoint*>(phosLoader->EmcRecPoints()->At(emcRPindex))->GetPrimaries(dummy)[index] ; 
     return rl->Stack()->Particle(primaryindex) ;
    } 
   //  return 0 ;