BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnGlobalTrack.cxx
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- BmnGlobalTrack source file -----
3// ----- Created S. Merts -----
4// -------------------------------------------------------------------------
5#include "BmnGlobalTrack.h"
6
7#include <iostream>
8
9using std::cout;
10using std::endl;
11
12// ----- Default constructor -------------------------------------------
31// -------------------------------------------------------------------------
32
33// ----- Destructor ----------------------------------------------------
35// -------------------------------------------------------------------------
36
37// ----- Public method Print -------------------------------------------
39{
40 cout << "\nNumber of attached hits : " << this->GetNHits() << endl;
41 cout << "PARAM FIRST: " << endl;
42 this->GetParamFirst()->Print();
43 cout << "PARAM LAST: " << endl;
44 this->GetParamLast()->Print();
45 cout << "Index of inner track: " << fInnerTrack << endl;
46 cout << "Index of ScWall cell: " << fScWallCellId << endl;
47 cout << "Signal of ScWall: " << fScWallSignal << endl;
48 cout << "dE/dx = " << fDedx << endl;
49 cout << "P = " << GetP() << endl;
50 cout << "Q = " << fQ << endl;
51 cout << "chi^2 in vertex = " << fChi2InVertex << endl;
52 cout << "Impact parameter = " << fDCAInVertex << endl;
53 cout << "Time-of-Flight info for different hypothesis [Common, Pi+, Pi-, Proton, Triton]:" << endl;
54 cout << "TOF400 hits indeces: [";
55 for (Int_t i = 0; i < kNumParticleTypes; ++i) {
56 cout << fTof400Hit[i] << " ";
57 }
58 cout << "]" << endl;
59 cout << "TOF700 hits indeces: [";
60 for (Int_t i = 0; i < kNumParticleTypes; ++i) {
61 cout << fTof700Hit[i] << " ";
62 }
63 cout << "]" << endl;
64 cout << "TOF400 residuals: [";
65 for (Int_t i = 0; i < kNumParticleTypes; ++i) {
66 cout << "X: " << fTof400ResX[i] << "\t Y: " << fTof400ResY[i] << endl;
67 }
68 cout << "]" << endl;
69 cout << "TOF700 residuals: [";
70 for (Int_t i = 0; i < kNumParticleTypes; ++i) {
71 cout << "X: " << fTof700ResX[i] << "\t Y: " << fTof700ResY[i] << endl;
72 }
73 cout << "]" << endl;
74 cout << "TOF400 M^2: [";
75 for (Int_t i = 0; i < kNumParticleTypes; ++i) {
76 cout << fMass2Tof400[i] << " ";
77 }
78 cout << "]" << endl;
79 cout << "TOF700 M^2: [";
80 for (Int_t i = 0; i < kNumParticleTypes; ++i) {
81 cout << fMass2Tof700[i] << " ";
82 }
83 cout << "]" << endl;
84}
85// -------------------------------------------------------------------------
86
87// void BmnGlobalTrack::SetBeta(Double_t b, Int_t tofID)
88// {
89// if (tofID == 1)
90// fBeta400 = b;
91// else if (tofID == 2)
92// fBeta700 = b;
93// ;
94// }
95
97{
98 FairTrackParam* par = this->GetParamFirst();
99 return par->GetTx() * this->GetPz();
100}
101
103{
104 FairTrackParam* par = this->GetParamFirst();
105 return par->GetTy() * this->GetPz();
106}
107
109{
110 FairTrackParam* par = this->GetParamFirst();
111 Float_t tx2 = TMath::Sq(par->GetTx());
112 Float_t ty2 = TMath::Sq(par->GetTy());
113 return this->GetP() / TMath::Sqrt(tx2 + ty2 + 1);
114}
115
117{
118 return TMath::ATan2(this->GetPt(), this->GetPz());
119}
120
122{
123 return TMath::ATan2(this->GetPy(), this->GetPx());
124}
125
127{
128 return TMath::Sqrt(this->GetPx() * this->GetPx() + this->GetPy() * this->GetPy());
129}
130
132{
133 return 0.5 * TMath::Log((this->GetP() + this->GetPz()) / (this->GetP() - this->GetPz()));
134}
135
137{
138 if (type == BmnGlobalTrack::kCommon) {
139 return "Common";
140 } else if (type == BmnGlobalTrack::kPion) {
141 return "pi";
142 } else if (type == BmnGlobalTrack::kProton) {
143 return "p";
144 } else if (type == BmnGlobalTrack::kDeutron) {
145 return "d";
146 } else if (type == BmnGlobalTrack::kTriton) {
147 return "t";
148 } else {
149 return "Common";
150 }
151}
int i
Definition P4_F32vec4.h:22
int Int_t
float Float_t
vector< Float_t > fTof400ResY
vector< Float_t > fMass2Tof700
vector< Int_t > fTof700Hit
TString GetParticleName(ParticleType type)
vector< Float_t > fTof700ResY
BmnGlobalTrack()
Default constructor.
virtual ~BmnGlobalTrack()
Destructor.
vector< Float_t > fTof400ResX
vector< Float_t > fMass2Tof400
vector< Float_t > fTof700ResX
Int_t fInnerTrack
Indices of local parts of global track.
vector< Int_t > fTof400Hit
FairTrackParam * GetParamFirst()
Definition BmnTrack.h:63
Int_t GetNHits() const
Accessors.
Definition BmnTrack.h:49
Double_t GetP()
Definition BmnTrack.h:67
FairTrackParam * GetParamLast()
Definition BmnTrack.h:65
Double_t ATan2(Double_t y, Double_t x)
Double_t Log(Double_t x)
Double_t Sq(Double_t x)
Double_t Sqrt(Double_t x)