BmnRoot
Loading...
Searching...
No Matches
CbmMvdPoint.cxx
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmMvdPoint source file -----
3// ----- Created 06/11/06 by V. Friese -----
4// -------------------------------------------------------------------------
5#include "CbmMvdPoint.h"
6
7#include <iostream>
8
9using std::cout;
10using std::endl;
11
12
13// ----- Default constructor -------------------------------------------
15 : FairMCPoint(),
17 fX_out(0),
18 fY_out(0),
19 fZ_out(0),
20 fPx_out(0),
21 fPy_out(0),
22 fPz_out(0),
23 fPdgCode(0),
24 fPointId(-1)
25{
26}
27// -------------------------------------------------------------------------
28
29
30
31// ----- Standard constructor ------------------------------------------
32CbmMvdPoint::CbmMvdPoint(Int_t trackID, Int_t pdgCode, Int_t stationNr,
33 TVector3 posIn, TVector3 posOut, TVector3 momIn,
34 TVector3 momOut, Double_t tof, Double_t length,
35 Double_t eLoss)
36 : FairMCPoint(trackID, stationNr, posIn, momIn, tof, length, eLoss),
38 fX_out(posOut.X()),
39 fY_out(posOut.Y()),
40 fZ_out(posOut.Z()),
41 fPx_out(momOut.Px()),
42 fPy_out(momOut.Py()),
43 fPz_out(momOut.Pz()),
44 fPdgCode(pdgCode),
45 fPointId(-1)
46{
47 SetLink(FairLink(kMCTrack, trackID));
48 fDetectorID = DetectorId(stationNr);
49}
50
51// -------------------------------------------------------------------------
52
53
54
55// ----- Destructor ----------------------------------------------------
57// -------------------------------------------------------------------------
58
59
60
61
62// ----- Public method Print -------------------------------------------
63void CbmMvdPoint::Print(const Option_t* opt) const {
64 cout << "-I- CbmMvdPoint: MVD Point for track " << fTrackID
65 << " in station " << GetStationNr() << endl;
66 cout << " Position (" << fX << ", " << fY << ", " << fZ
67 << ") cm" << endl;
68 cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz
69 << ") GeV" << endl;
70 cout << " Time " << fTime << " ns, Length " << fLength
71 << " cm, Energy loss " << fELoss*1.0e06 << " keV" << endl;
72}
73// -------------------------------------------------------------------------
DetectorId
@ kMCTrack
Int_t GetStationNr() const
Definition CbmMvdPoint.h:70
virtual ~CbmMvdPoint()
virtual void Print(const Option_t *opt) const