X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSRecParticle.cxx;h=dfd80005d4bcfc1541b25b5494dfd120e3ddde51;hb=9a773b96816a2933195238e5fbd6f69ca760aa3f;hp=2d3fc2ad232875b91af6f077780c6fc68c4c453f;hpb=9286201303faf22df30f835f6aa39b6517513db8;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSRecParticle.cxx b/PHOS/AliPHOSRecParticle.cxx index 2d3fc2ad232..dfd80005d4b 100644 --- a/PHOS/AliPHOSRecParticle.cxx +++ b/PHOS/AliPHOSRecParticle.cxx @@ -12,16 +12,22 @@ * 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 kGAMMA : - name = "PHOTON" ; - break ; - case kELECTRON : - name = "ELECTRON" ; - break ; - case kNEUTRAL : - name = "NEUTRAL" ; - break ; - case kCHARGEDHADRON: - 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 ; -} + + +