BmnRoot
Loading...
Searching...
No Matches
BmnDchPoint.cxx
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- BmnDchPoint source file -----
3// -------------------------------------------------------------------------
4
5#include <iostream>
6#include "BmnDchPoint.h"
7
8//------------------------------------------------------------------------------------------------------------------------
9BmnDchPoint::BmnDchPoint() : FairMCPoint() { }
10//------------------------------------------------------------------------------------------------------------------------
11BmnDchPoint::BmnDchPoint(Int_t trackID, Int_t detID, TVector3 pos, Double_t radius, TVector3 mom, Double_t tof,
12 Double_t length, Double_t eLoss, Int_t isPrimary, Double_t charge, Int_t pdgId, TVector3 trackPos)
13 : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss),
14 fIsPrimary(isPrimary), fCharge(charge), fRadius(radius), fPdgId(pdgId)
15{
16 fTX = trackPos.X();
17 fTY = trackPos.Y();
18 fTZ = trackPos.Z();
19
20 fPlaneNumber = -1;
21}
22//------------------------------------------------------------------------------------------------------------------------
24//------------------------------------------------------------------------------------------------------------------------
26 TVector3 dist = TVector3(fX, fY, fZ) - TVector3(fTX,fTY,fTZ);
27 return dist.Mag();
28}
29//------------------------------------------------------------------------------------------------------------------------
30void BmnDchPoint::Print(const Option_t* opt) const
31{
32 cout << "-I- BmnDchPoint: DCH point for track " << fTrackID
33 << " in detector " << fDetectorID << endl;
34 cout << " Position (" << fX << ", " << fY << ", " << fZ
35 << ") cm" << endl;
36 cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz
37 << ") GeV" << endl;
38 cout << " Time " << fTime << " ns, Length " << fLength
39 << " cm, Energy loss " << fELoss*1.0e06 << " keV" << endl;
40}
41//------------------------------------------------------------------------------------------------------------------------
vector< Double_t > dist(vector< Double_t > qp, Double_t mu)
Definition BmnMath.cxx:869
Double_t fTZ
Definition BmnDchPoint.h:59
virtual void Print(const Option_t *opt) const
Double_t fTY
Definition BmnDchPoint.h:59
Double_t fTX
Definition BmnDchPoint.h:59
Int_t fPlaneNumber
Definition BmnDchPoint.h:61
virtual ~BmnDchPoint()
Double_t GetDistance()