]>
Commit | Line | Data |
---|---|---|
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 | ||
29 | ClassImp(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 | //____________________________________________________________________________ | |
59 | TString 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 ; | |
b9bbdad1 | 75 | case kNEUTRALHADRON: |
76 | name = "NEUTRAL HADRON" ; | |
77 | break ; | |
78 | case kNEUTRALEM: | |
79 | name = "NEUTRAL EM" ; | |
09fc14a0 | 80 | break ; |
6ad0bfa0 | 81 | } |
82 | return name ; | |
83 | } | |
84 | ||
85 | //____________________________________________________________________________ | |
86 | void AliPHOSRecParticle::Print() | |
87 | { | |
88 | cout << "AliPHOSRecParticle > " << "type is " << Name() << endl | |
89 | << " " << "Energy = " << fE << endl | |
90 | << " " << "Px = " << fPx << endl | |
91 | << " " << "Py = " << fPy << endl | |
92 | << " " << "Pz = " << fPz << endl ; | |
93 | } |