]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSRecParticle.cxx
Particle identification improved by shower profile analysis
[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() ;
43
09fc14a0 44 fType = kUNDEFINED ; // undefined
45
46 if( ts->GetPpsdUp() == 0 ) { // Neutral
47
48 if( ts->GetPpsdLow() == 0 ) // Neutral
49 fType = kNEUTRAL ;
50 else // Gamma
51 fType = kGAMMA ;
52 }
53 else // Charged
54 fType = kCHARGED ;
55
6ad0bfa0 56}
57
58//____________________________________________________________________________
59TString AliPHOSRecParticle::Name()
60{
61 TString name ;
62 switch (fType) {
09fc14a0 63 case kGAMMA:
6ad0bfa0 64 name = "PHOTON" ;
65 break ;
09fc14a0 66 case kELECTRON:
6ad0bfa0 67 name = "ELECTRON" ;
68 break ;
09fc14a0 69 case kNEUTRAL:
6ad0bfa0 70 name = "NEUTRAL" ;
71 break ;
92862013 72 case kCHARGEDHADRON:
6ad0bfa0 73 name = "CHARGED HADRON" ;
74 break ;
09fc14a0 75 case kNEUTRON:
76 name = "NEUTRAL BARYON" ;
77 break ;
6ad0bfa0 78 }
79 return name ;
80}
81
82//____________________________________________________________________________
83void AliPHOSRecParticle::Print()
84{
85 cout << "AliPHOSRecParticle > " << "type is " << Name() << endl
86 << " " << "Energy = " << fE << endl
87 << " " << "Px = " << fPx << endl
88 << " " << "Py = " << fPy << endl
89 << " " << "Pz = " << fPz << endl ;
90}