]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSRecParticle.cxx
A new particle specie was created: a PHOTON HADRON
[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) ;
6ad0bfa0 38 fE = ts->GetEnergy() ;
39 TVector3 momdir = ts->GetMomentumDirection() ;
40 fPx = fE * momdir.X() ;
41 fPy = fE * momdir.Y() ;
42 fPz = fE * momdir.Z() ;
0dd37dda 43 fType = kUNDEFINED ;
44
6ad0bfa0 45}
46
47//____________________________________________________________________________
48TString AliPHOSRecParticle::Name()
49{
50 TString name ;
51 switch (fType) {
09fc14a0 52 case kGAMMA:
6ad0bfa0 53 name = "PHOTON" ;
54 break ;
09fc14a0 55 case kELECTRON:
6ad0bfa0 56 name = "ELECTRON" ;
57 break ;
09fc14a0 58 case kNEUTRAL:
6ad0bfa0 59 name = "NEUTRAL" ;
60 break ;
92862013 61 case kCHARGEDHADRON:
6ad0bfa0 62 name = "CHARGED HADRON" ;
63 break ;
b9bbdad1 64 case kNEUTRALHADRON:
65 name = "NEUTRAL HADRON" ;
66 break ;
67 case kNEUTRALEM:
68 name = "NEUTRAL EM" ;
09fc14a0 69 break ;
c1d256cb 70 case kGAMMAHADRON:
71 name = "PHOTON HADRON" ;
72 break ;
73
6ad0bfa0 74 }
75 return name ;
76}
77
78//____________________________________________________________________________
79void AliPHOSRecParticle::Print()
80{
81 cout << "AliPHOSRecParticle > " << "type is " << Name() << endl
82 << " " << "Energy = " << fE << endl
83 << " " << "Px = " << fPx << endl
84 << " " << "Py = " << fPy << endl
85 << " " << "Pz = " << fPz << endl ;
86}