]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSRecParticle.cxx
cleanup
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecParticle.cxx
index c60e4a3549fa84c8ff7b76ad99fbb639bd47a811..dfd80005d4bcfc1541b25b5494dfd120e3ddde51 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-
+/* $Id$ */
 //_________________________________________________________________________
-// Reconstructed Particle
-//*-- Y. Schutz:   SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  A Reconstructed Particle in PHOS    
+//  To become a general class of AliRoot ?       
+//  Why should I put meaningless comments
+//  just to satisfy
+//  the code checker                 
+//       
+//*-- Author: Yves Schutz (SUBATECH)
+
 
 // --- ROOT system ---
 
 // --- Standard library ---
 
+
 // --- AliRoot header files ---
 
 #include "AliPHOSRecParticle.h"
@@ -30,47 +36,36 @@ ClassImp(AliPHOSRecParticle)
 
 
 //____________________________________________________________________________
- AliPHOSRecParticle::AliPHOSRecParticle(AliPHOSTrackSegment * ts)
+ AliPHOSRecParticle::AliPHOSRecParticle(const AliPHOSRecParticle & rp)
 {
-  // ctor
-  fPHOSTrackSegment = new AliPHOSTrackSegment(*ts) ; 
-  fType             = ts->GetPartType() ; 
-  fE                = ts->GetEnergy() ; 
-  TVector3 momdir   = ts->GetMomentumDirection() ;
-  fPx               = fE * momdir.X() ; 
-  fPy               = fE * momdir.Y() ; 
-  fPz               = fE * momdir.Z() ; 
+  // copy ctor
 
-}
+  fPHOSTrackSegment = rp.fPHOSTrackSegment ; 
+  fType             = rp.fType ; 
+  fIndexInList      = rp.fIndexInList ;
 
-//____________________________________________________________________________
-TString AliPHOSRecParticle::Name()
-{
-  TString  name ; 
-  switch (fType) {
-  case GAMMA :
-    name = "PHOTON" ;
-    break ; 
-   case ELECTRON :
-     name = "ELECTRON" ;
-    break ; 
-  case NEUTRAL :
-    name = "NEUTRAL" ;
-    break ; 
-   case CHARGEDHADRON:
-    name = "CHARGED HADRON" ;
-    break ; 
-  }
-  return name ; 
+  fPdgCode     = rp.fPdgCode;
+  fStatusCode  = rp.fStatusCode;
+  fMother[0]   = rp.fMother[0];
+  fMother[1]   = rp.fMother[1];
+  fDaughter[0] = rp.fDaughter[0];
+  fDaughter[1] = rp.fDaughter[1];
+  fWeight      = rp.fWeight;
+  fCalcMass    = rp.fCalcMass;
+  fPx          = rp.fPx;
+  fPy          = rp.fPy;
+  fPz          = rp.fPz;
+  fE           = rp.fE;
+  fVx          = rp.fVx;
+  fVy          = rp.fVy;
+  fVz          = rp.fVz;
+  fVt          = rp.fVt;
+  fPolarTheta  = rp.fPolarTheta;
+  fPolarPhi    = rp.fPolarPhi;
+  fParticlePDG = rp.fParticlePDG; 
+  
 }
 
-//____________________________________________________________________________
-void AliPHOSRecParticle::Print()
-{
-  cout << "AliPHOSRecParticle > " << "type is  " << Name() << endl 
-       << "                     " << "Energy = " << fE << endl 
-       << "                     " << "Px     = " << fPx << endl 
-       << "                     " << "Py     = " << fPy << endl 
-       << "                     " << "Pz     = " << fPz << endl ; 
-}
+
+
+