]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSRecParticle.cxx
Modifications to follow the Coding Convention Rules (make check)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecParticle.cxx
CommitLineData
6ad0bfa0 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
29ClassImp(AliPHOSRecParticle)
30
31
32//____________________________________________________________________________
33 AliPHOSRecParticle::AliPHOSRecParticle(AliPHOSTrackSegment * ts)
34{
35 // ctor
36
37 fPHOSTrackSegment = new AliPHOSTrackSegment(*ts) ;
38 fType = ts->GetPartType() ;
39 fE = ts->GetEnergy() ;
40 TVector3 momdir = ts->GetMomentumDirection() ;
41 fPx = fE * momdir.X() ;
42 fPy = fE * momdir.Y() ;
43 fPz = fE * momdir.Z() ;
44
45}
46
47//____________________________________________________________________________
48TString AliPHOSRecParticle::Name()
49{
50 TString name ;
51 switch (fType) {
92862013 52 case kGAMMA :
6ad0bfa0 53 name = "PHOTON" ;
54 break ;
92862013 55 case kELECTRON :
6ad0bfa0 56 name = "ELECTRON" ;
57 break ;
92862013 58 case kNEUTRAL :
6ad0bfa0 59 name = "NEUTRAL" ;
60 break ;
92862013 61 case kCHARGEDHADRON:
6ad0bfa0 62 name = "CHARGED HADRON" ;
63 break ;
64 }
65 return name ;
66}
67
68//____________________________________________________________________________
69void AliPHOSRecParticle::Print()
70{
71 cout << "AliPHOSRecParticle > " << "type is " << Name() << endl
72 << " " << "Energy = " << fE << endl
73 << " " << "Px = " << fPx << endl
74 << " " << "Py = " << fPy << endl
75 << " " << "Pz = " << fPz << endl ;
76}