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