CbmRoot
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 <FairLogger.h>
// for Logger, LOG
8
#include <FairMCEventHeader.h>
// for FairMCEventHeader
9
#include <FairMCPoint.h>
// for FairMCPoint
10
#include <FairPrimaryGenerator.h>
// for FairPrimaryGenerator
11
#include <FairRunSim.h>
// for FairRunSim
12
13
#include <TVector3.h>
// for TVector3
14
15
// ----- Default constructor -------------------------------------------
16
CbmMvdPoint::CbmMvdPoint
()
17
: FairMCPoint()
18
,
CbmMvdDetectorId
()
19
, fX_out(0)
20
, fY_out(0)
21
, fZ_out(0)
22
, fPx_out(0)
23
, fPy_out(0)
24
, fPz_out(0)
25
, fPdgCode(0)
26
, fPointId(-1)
27
, fFrame(0)
28
, fStartTime(0.) {}
29
// -------------------------------------------------------------------------
30
31
32
// ----- Standard constructor ------------------------------------------
33
CbmMvdPoint::CbmMvdPoint
(Int_t trackID,
34
Int_t pdgCode,
35
Int_t stationNr,
36
TVector3 posIn,
37
TVector3 posOut,
38
TVector3 momIn,
39
TVector3 momOut,
40
Double_t tof,
41
Double_t length,
42
Double_t eLoss,
43
Int_t frame)
44
: FairMCPoint(trackID, stationNr, posIn, momIn, tof, length, eLoss)
45
,
CbmMvdDetectorId
()
46
, fX_out(posOut.X())
47
, fY_out(posOut.Y())
48
, fZ_out(posOut.Z())
49
, fPx_out(momOut.Px())
50
, fPy_out(momOut.Py())
51
, fPz_out(momOut.Pz())
52
, fPdgCode(pdgCode)
53
, fPointId(-1)
54
, fFrame(frame)
55
, fStartTime(0) {
56
FairRunSim* run = FairRunSim::Instance();
57
FairPrimaryGenerator* gen = run->GetPrimaryGenerator();
58
FairMCEventHeader*
event
= gen->GetEvent();
59
60
fStartTime
=
event
->GetT();
61
fDetectorID =
DetectorId
(stationNr);
62
}
63
64
// -------------------------------------------------------------------------
65
66
67
// ----- Destructor ----------------------------------------------------
68
CbmMvdPoint::~CbmMvdPoint
() {}
69
// -------------------------------------------------------------------------
70
71
72
// ----- Public method Print -------------------------------------------
73
void
CbmMvdPoint::Print
(
const
Option_t*
/*opt*/
)
const
{
74
LOG(info) <<
"MVD Point for track "
<< fTrackID <<
" in station "
75
<<
GetStationNr
();
76
LOG(info) <<
" Position ("
<< fX <<
", "
<< fY <<
", "
<< fZ <<
") cm"
;
77
LOG(info) <<
" Momentum ("
<< fPx <<
", "
<< fPy <<
", "
<< fPz <<
") GeV"
;
78
LOG(info) <<
" Time "
<< fTime <<
" ns, Length "
<< fLength
79
<<
" cm, Energy loss "
<< fELoss * 1.0e06 <<
" keV"
;
80
}
81
// -------------------------------------------------------------------------
82
83
// ----- Public method GetAbsTime --------------------------------------
84
Int_t
CbmMvdPoint::GetAbsTime
() {
85
86
87
Int_t absTime = fTime +
fStartTime
;
88
89
return
absTime;
90
}
91
// -------------------------------------------------------------------------
92
93
ClassImp
(
CbmMvdPoint
)
CbmMvdDetectorId
Definition:
CbmMvdDetectorId.h:32
CbmMvdPoint::Print
virtual void Print(const Option_t *opt) const
Definition:
CbmMvdPoint.cxx:73
CbmMvdPoint::~CbmMvdPoint
virtual ~CbmMvdPoint()
Definition:
CbmMvdPoint.cxx:68
CbmMvdPoint::GetStationNr
Int_t GetStationNr() const
Definition:
CbmMvdPoint.h:78
CbmMvdPoint.h
CbmMvdPoint
Definition:
CbmMvdPoint.h:28
CbmMvdPoint::CbmMvdPoint
CbmMvdPoint()
Definition:
CbmMvdPoint.cxx:16
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition:
CbmConverterManager.cxx:12
CbmMvdDetectorId::DetectorId
Int_t DetectorId(Int_t iStation) const
Definition:
CbmMvdDetectorId.h:44
CbmMvdPoint::fStartTime
Double_t fStartTime
Definition:
CbmMvdPoint.h:108
CbmMvdPoint::GetAbsTime
Int_t GetAbsTime()
Definition:
CbmMvdPoint.cxx:84
core
data
mvd
CbmMvdPoint.cxx
Generated on Wed Oct 28 2020 15:11:43 for CbmRoot by
1.8.18