FairRoot/PandaRoot
PndHypGePoint.cxx
Go to the documentation of this file.
1 //
3 // PndHypGePoint
4 //
5 // Geant point for HypGe detector
6 //
7 
8 //
10 
11 #include <iostream>
12 #include "PndHypGePoint.h"
13 
14 // ----- Default constructor -------------------------------------------
15 PndHypGePoint::PndHypGePoint() : FairMCPoint() {
16  fTrackID = -1;
17  //fDetectorID = -1;
18  fEventID = -1;
19  fX = fY = fZ = 0.;
20  fPx = fPy = fPz = 0.;
21  fTime = fcharge = 0.;
22  fLength = 0.;
23  fELoss = 0.;
24  fpdgCode = 0;
25  fnCopy = -1;
26 }
27 // -------------------------------------------------------------------------
28 
29 
30 
31 // ----- Standard constructor ------------------------------------------
32 PndHypGePoint::PndHypGePoint(Int_t trackID, Int_t evtID, Int_t pdgCode,Double_t charge,
33  TVector3 pos,TVector3 mom, Double_t tof, Double_t length,
34  Double_t eLoss, Short_t copy) {
35  fTrackID = trackID;
36  //fDetectorID = detID; '
37  fcharge = charge;
38  fpdgCode = pdgCode;
39 
40  fEventID = evtID;
41  fX = pos.X();
42  fY = pos.Y();
43  fZ = pos.Z();
44  fPx = mom.Px();
45  fPy = mom.Py();
46  fPz = mom.Pz();
47  fTime = tof;
48  fLength = length;
49  fELoss = eLoss;
50 
51  fnCopy = copy;
52 }
53 
54 
55 // ----- Destructor ----------------------------------------------------
57 // -------------------------------------------------------------------------
58 
59 // ----- Public method Print -------------------------------------------
60 void PndHypGePoint::Print(const Option_t* opt) const {
61  cout << "-I- PndHypGePoint: HYPGE Point for track " << fTrackID
62  << endl;
63  cout << " Position (" << fX << ", " << fY << ", " << fZ
64  << ") cm" << endl;
65  cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz
66  << ") GeV" << endl;
67  cout << " Time " << fTime << " ns, Length " << fLength
68  << " cm, Energy loss " << fELoss*1.0e06 << " keV" << endl;
69 }
70 // -------------------------------------------------------------------------
71 
72 
73 
TVector3 pos
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t fTime
Definition: PndHypGePoint.h:88
Double_t mom
Definition: plot_dirc.C:14
Double_t fELoss
Definition: PndHypGePoint.h:88
Double_t fZ
Definition: PndCaloDraw.cxx:34
Double_t fcharge
Definition: PndHypGePoint.h:88
virtual ~PndHypGePoint()
Double_t
virtual void Print(const Option_t *opt) const
Double_t fY
Definition: PndCaloDraw.cxx:34
ClassImp(PndAnaContFact)
Short_t fnCopy
Definition: PndHypGePoint.h:89