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() ; |
0dd37dda |
43 | fType = kUNDEFINED ; |
44 | |
6ad0bfa0 |
45 | } |
46 | |
47 | //____________________________________________________________________________ |
48 | TString 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 ; |
6ad0bfa0 |
70 | } |
71 | return name ; |
72 | } |
73 | |
74 | //____________________________________________________________________________ |
75 | void AliPHOSRecParticle::Print() |
76 | { |
77 | cout << "AliPHOSRecParticle > " << "type is " << Name() << endl |
78 | << " " << "Energy = " << fE << endl |
79 | << " " << "Px = " << fPx << endl |
80 | << " " << "Py = " << fPy << endl |
81 | << " " << "Pz = " << fPz << endl ; |
82 | } |