BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnDchPoint.cxx
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- BmnDchPoint source file -----
3// -------------------------------------------------------------------------
4
5#include "BmnDchPoint.h"
6
7#include <iostream>
8
9//------------------------------------------------------------------------------------------------------------------------
13//------------------------------------------------------------------------------------------------------------------------
15 Int_t detID,
16 TVector3 pos,
17 Double_t radius,
18 TVector3 mom,
19 Double_t tof,
20 Double_t length,
21 Double_t eLoss,
22 Int_t isPrimary,
23 Double_t charge,
24 Int_t pdgId,
25 TVector3 trackPos)
26 : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss)
27 , fIsPrimary(isPrimary)
28 , fCharge(charge)
29 , fRadius(radius)
30 , fPdgId(pdgId)
31{
32 fTX = trackPos.X();
33 fTY = trackPos.Y();
34 fTZ = trackPos.Z();
35
36 fPlaneNumber = -1;
37}
38//------------------------------------------------------------------------------------------------------------------------
40//------------------------------------------------------------------------------------------------------------------------
42{
43 TVector3 dist = TVector3(fX, fY, fZ) - TVector3(fTX, fTY, fTZ);
44 return dist.Mag();
45}
46//------------------------------------------------------------------------------------------------------------------------
47void BmnDchPoint::Print(const Option_t* opt) const
48{
49 cout << "-I- BmnDchPoint: DCH point for track " << fTrackID << " in detector " << fDetectorID << endl;
50 cout << " Position (" << fX << ", " << fY << ", " << fZ << ") cm" << endl;
51 cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV" << endl;
52 cout << " Time " << fTime << " ns, Length " << fLength << " cm, Energy loss " << fELoss * 1.0e06 << " keV"
53 << endl;
54}
55//------------------------------------------------------------------------------------------------------------------------
vector< Double_t > dist(vector< Double_t > qp, Double_t mu)
Definition BmnMath.cxx:869
int Int_t
double Double_t
const char Option_t
Double_t fTZ
Definition BmnDchPoint.h:69
Double_t fCharge
Definition BmnDchPoint.h:66
Int_t fIsPrimary
Definition BmnDchPoint.h:65
Double_t fRadius
Definition BmnDchPoint.h:67
virtual void Print(const Option_t *opt) const
Double_t fTY
Definition BmnDchPoint.h:69
Double_t fTX
Definition BmnDchPoint.h:69
Int_t fPlaneNumber
Definition BmnDchPoint.h:71
virtual ~BmnDchPoint()
Double_t GetDistance()
Double_t Z() const
Double_t Y() const
Double_t X() const