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