1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //_________________________________________________________________________
17 // Reconstructed Particle
18 //*-- Y. Schutz: SUBATECH
19 //////////////////////////////////////////////////////////////////////////////
21 // --- ROOT system ---
23 // --- Standard library ---
25 // --- AliRoot header files ---
27 #include "AliPHOSRecParticle.h"
30 ClassImp(AliPHOSRecParticle)
33 //____________________________________________________________________________
34 AliPHOSRecParticle::AliPHOSRecParticle(AliPHOSTrackSegment * ts)
38 fPHOSTrackSegment = new AliPHOSTrackSegment(*ts) ;
39 Float_t kenergy = ts->GetEnergy() ;
40 TVector3 momdir = ts->GetMomentumDirection() ;
41 fPx = kenergy * momdir.X() ;
42 fPy = kenergy * momdir.Y() ;
43 fPz = kenergy * momdir.Z() ;
45 fE = kenergy ; // !!! all particles have mass = 0
48 //____________________________________________________________________________
49 AliPHOSRecParticle::AliPHOSRecParticle(const AliPHOSRecParticle & rp)
51 fPHOSTrackSegment = new AliPHOSTrackSegment( *( rp.GetPHOSTrackSegment()) ) ;
53 fPdgCode = rp.fPdgCode;
54 fStatusCode = rp.fStatusCode;
55 fMother[0] = rp.fMother[0];
56 fMother[1] = rp.fMother[1];
57 fDaughter[0] = rp.fDaughter[0];
58 fDaughter[1] = rp.fDaughter[1];
60 fCalcMass = rp.fCalcMass;
69 fPolarTheta = rp.fPolarTheta;
70 fPolarPhi = rp.fPolarPhi;
71 fParticlePDG = rp.fParticlePDG;
74 //____________________________________________________________________________
75 AliPHOSRecParticle::~AliPHOSRecParticle()
77 if(!fPHOSTrackSegment) {
78 delete fPHOSTrackSegment ;
79 fPHOSTrackSegment = 0 ;