FairRoot/PandaRoot
PndDskParticle.cxx
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // ----- PndDskParticle source file -----
3 // ----- Created 21/03/08 by P. Koch -----
4 // ----------------------------------------------------------------------------
5 
6 #include <iostream>
7 using std::cout;
8 using std::endl;
9 
10 #include "PndDskParticle.h"
11 
12 
13 
14 // ----- Default constructor ----------------------------------------------
16  : FairMCPoint(),
17  fPdgCode(-1),
18  fPdgName(TString()),
19  fEnergy(0.),
20  fMass(0.),
21  fMotherTrackID(-1),
22  fMotherPdgCode(-1),
23  fMotherPdgName(TString()),
24  fExitPosition(TVector3()),
25  fExitMomentum(TVector3()),
26  fExitTime(0.),
27  fExitEnergy(0.),
28  fThetaC(0.),
29  fAngIn(0.),
30  fNPhot(-1)
31 {
32 }
33 // ----------------------------------------------------------------------------
34 
35 
36 
37 // ----- Standard constructor ---------------------------------------------
38 PndDskParticle::PndDskParticle(Int_t trackID, Int_t detectorID,
39  TVector3 position, TVector3 momentum, Double_t time,
40  Int_t pdgCode, TString pdgName, Double_t energy,
41  Int_t motherTrackID, Int_t motherPdgCode, TString motherPdgName, Double_t mass, Double_t angIn, Double_t thetaC, Int_t nPhot)
42  : FairMCPoint(trackID, detectorID, position, momentum, time, 0., 0.),
43  fPdgCode(pdgCode),
44  fPdgName(pdgName),
45  fEnergy(energy),
46  fMass(mass),
47  fMotherTrackID(motherTrackID),
48  fMotherPdgCode(motherPdgCode),
49  fMotherPdgName(motherPdgName),
50  fExitPosition(TVector3()),
51  fExitMomentum(TVector3()),
52  fExitTime(0.),
53  fExitEnergy(0.),
54  fThetaC(thetaC),
55  fAngIn(angIn),
56  fNPhot(nPhot)
57 {
58 }
59 // ----------------------------------------------------------------------------
60 
62  FairMCPoint(particle.fTrackID, particle.fDetectorID, TVector3(particle.fX, particle.fY, particle.fZ), TVector3(particle.fPx, particle.fPy, particle.fPz), particle.fTime, particle.fLength, particle.fELoss, particle.fEventId),
63  fPdgCode(particle.fPdgCode),
64  fPdgName(particle.fPdgName),
65  fEnergy(particle.fEnergy),
66  fMass(particle.fMass),
67  fMotherTrackID(particle.fMotherTrackID),
68  fMotherPdgCode(particle.fMotherPdgCode),
69  fMotherPdgName(particle.fMotherPdgName),
70  fExitPosition(particle.fExitPosition),
71  fExitMomentum(particle.fExitMomentum),
72  fExitTime(particle.fExitTime),
73  fExitEnergy(particle.fExitEnergy),
74  fThetaC(particle.fThetaC),
75  fAngIn(particle.fAngIn),
76  fNPhot(particle.fNPhot)
77 {
78 }
79 
80 // ----- Destructor -------------------------------------------------------
82 {
83 }
84 // ----------------------------------------------------------------------------
85 
86 
87 
88 // ----- Public method Print ----------------------------------------------
89 void
90 PndDskParticle::Print(const Option_t* opt) const {
91  (void)opt; // to remove "unused" warnings
92  cout << "-I- PndDskParticle: track" << fTrackID
93  << " created in detector " << fDetectorID << endl;
94  cout << " at Position (" << fX << ", " << fY << ", " << fZ
95  << ") cm" << endl;
96  cout << " with Momentum (" << fPx << ", " << fPy << ", " << fPz
97  << ") eV" << endl;
98  cout << " at Time " << fTime << " ns" << endl;
99 }
100 // ----------------------------------------------------------------------------
101 
102 
103 
104 // ----- Public method SetFinalValues -------------------------------------
105 void
106 PndDskParticle::SetFinalValues(TVector3 exitPosition, TVector3 exitMomentum,
107  Double_t exitTime, Double_t exitEnergy)
108 {
109  fExitPosition = exitPosition;
110  fExitMomentum = exitMomentum;
111  fExitTime = exitTime;
112  fExitEnergy = exitEnergy;
113 }
114 // ----------------------------------------------------------------------------
115 
116 
117 
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t fZ
Definition: PndCaloDraw.cxx:34
const int particle
TVector3 fExitMomentum
Momentum when particle disappears [GeV].
Double_t
TVector3 fExitPosition
Position when particle disappears [cm].
virtual ~PndDskParticle()
void SetFinalValues(TVector3 exitPosition, TVector3 exitMomentum, Double_t exitTime, Double_t exitEnergy)
Double_t fExitEnergy
Energy when particle disappears [GeV].
Double_t fY
Definition: PndCaloDraw.cxx:34
ClassImp(PndAnaContFact)
Double_t fExitTime
Time when particle disappears [ns].
virtual void Print(const Option_t *opt) const
Double_t thetaC
Definition: plot_dirc.C:16
Double_t energy
Definition: plot_dirc.C:15