]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRecParticle.cxx
Merged ITS-working with HEAD. Improved some of the documentation and
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecParticle.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16 //_________________________________________________________________________
17 // Reconstructed Particle
18 //*-- Y. Schutz:   SUBATECH 
19 //////////////////////////////////////////////////////////////////////////////
20
21 // --- ROOT system ---
22
23 // --- Standard library ---
24
25 // --- AliRoot header files ---
26
27 #include "AliPHOSRecParticle.h"
28 #include "TPad.h"
29
30 ClassImp(AliPHOSRecParticle)
31
32
33 //____________________________________________________________________________
34  AliPHOSRecParticle::AliPHOSRecParticle(AliPHOSTrackSegment * ts)
35 {
36   // ctor
37  
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() ; 
44   fType             = kUNDEFINED ;  
45   fE                = kenergy ;    // !!! all particles have mass = 0 
46 }
47
48 //____________________________________________________________________________
49  AliPHOSRecParticle::AliPHOSRecParticle(const AliPHOSRecParticle & rp)
50 {
51   fPHOSTrackSegment = new AliPHOSTrackSegment( *( rp.GetPHOSTrackSegment()) ) ; 
52   fType             = rp.fType ; 
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];
59   fWeight      = rp.fWeight;
60   fCalcMass    = rp.fCalcMass;
61   fPx          = rp.fPx;
62   fPy          = rp.fPy;
63   fPz          = rp.fPz;
64   fE           = rp.fE;
65   fVx          = rp.fVx;
66   fVy          = rp.fVy;
67   fVz          = rp.fVz;
68   fVt          = rp.fVt;
69   fPolarTheta  = rp.fPolarTheta;
70   fPolarPhi    = rp.fPolarPhi;
71   fParticlePDG = rp.fParticlePDG; 
72 }
73
74 //____________________________________________________________________________
75  AliPHOSRecParticle::~AliPHOSRecParticle()
76 {
77   if(!fPHOSTrackSegment) {
78     delete fPHOSTrackSegment ;
79     fPHOSTrackSegment = 0 ; 
80   } 
81 }