#include <TimeDetHit.h>
|
| Bool_t | flag {true} |
| | flag
|
| Float_t | t_1 {0} |
| Float_t | t_2 {0} |
| | TDC on both sides.
|
|
| static constexpr Double_t | v_drift = 15. |
| static constexpr Double_t | par [4] = {0.0272814, 109.303, 0, 0.0539487} |
Definition at line 11 of file TimeDetHit.h.
◆ TimeDetHit() [1/3]
| TimeDetHit::TimeDetHit |
( |
| ) |
|
Default constructor
Definition at line 23 of file TimeDetHit.cxx.
23: SHiP::DetectorHit() {}
◆ TimeDetHit() [2/3]
Constructor from TimeDetHit
- Parameters
-
| detID | Detector ID |
| t_1,t_2 | TDC on both sides |
| flag | True/False, in case of pile up |
Definition at line 27 of file TimeDetHit.cxx.
27 : SHiP::DetectorHit() {
28 if (!p) {
29 LOG(error) << "TimeDetHit: null TimeDetPoint pointer";
30 return;
31 }
33 Float_t lpos, lneg;
34 Dist(
p->GetX(), lpos, lneg);
36 t_1 = gRandom->Gaus(0, sigma) + lneg /
v_drift +
t0 +
p->GetTime();
38 t_2 = gRandom->Gaus(0, sigma) + lpos /
v_drift +
t0 +
p->GetTime();
39}
Int_t fDetectorID
Detector unique identifier.
static constexpr Double_t v_drift
Double_t Resol(Double_t x) const
void Dist(Float_t x, Float_t &lpos, Float_t &lneg) const
Float_t t_2
TDC on both sides.
◆ ~TimeDetHit()
| TimeDetHit::~TimeDetHit |
( |
| ) |
|
|
overridedefault |
◆ TimeDetHit() [3/3]
| TimeDetHit::TimeDetHit |
( |
const TimeDetHit & | point | ) |
|
|
default |
◆ ClassDefOverride()
◆ Dist()
| void TimeDetHit::Dist |
( |
Float_t | x, |
|
|
Float_t & | lpos, |
|
|
Float_t & | lneg ) const |
Definition at line 76 of file TimeDetHit.cxx.
76 {
78 auto shape = dynamic_cast<TGeoBBox*>(node->GetVolume()->GetShape());
80 lpos = TMath::Abs(
pos.X() + shape->GetDX() - x);
81 lneg = TMath::Abs(
pos.X() - shape->GetDX() - x);
82}
TGeoNode * GetNode() const
◆ GetMeasurements()
| std::vector< double > TimeDetHit::GetMeasurements |
( |
| ) |
const |
◆ GetNode()
| TGeoNode * TimeDetHit::GetNode |
( |
| ) |
const |
Definition at line 111 of file TimeDetHit.cxx.
111 {
112 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
113 TString
path =
"/Timing Detector_1/TimeDet_";
115 nav->cd(path);
116 return nav->GetCurrentNode();
117}
◆ GetTime() [1/2]
| std::vector< double > TimeDetHit::GetTime |
( |
| ) |
const |
Definition at line 56 of file TimeDetHit.cxx.
56 {
57 TGeoBBox* shape =
58 dynamic_cast<TGeoBBox*>(gGeoManager->GetVolume("TimeDet")->GetShape());
60 Float_t lpos, lneg;
65 Double_t dt = TMath::Sqrt(r1 * r1 + r2 * r2);
67}
◆ GetTime() [2/2]
| std::vector< double > TimeDetHit::GetTime |
( |
Double_t | x | ) |
const |
Definition at line 42 of file TimeDetHit.cxx.
42 {
43
44 Float_t lpos, lneg;
46 Double_t r =
Resol(lneg);
47 Double_t w1 = 1. / (r * r);
49 Double_t w2 = 1. / (r * r);
50 Double_t dt = 1. / TMath::Sqrt(w1 + w2);
54}
◆ GetX()
| Double_t TimeDetHit::GetX |
( |
| ) |
const |
◆ GetXYZ()
| TVector3 TimeDetHit::GetXYZ |
( |
| ) |
const |
Definition at line 84 of file TimeDetHit.cxx.
84 {
85 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
87 auto shape = dynamic_cast<TGeoBBox*>(node->GetVolume()->GetShape());
88 Double_t
origin[3] = {shape->GetOrigin()[0], shape->GetOrigin()[1],
89 shape->GetOrigin()[2]};
90 Double_t master[3] = {0, 0, 0};
91 nav->LocalToMaster(origin, master);
92 TVector3
pos = TVector3(master[0], master[1], master[2]);
94}
◆ GetY()
| Double_t TimeDetHit::GetY |
( |
| ) |
const |
◆ GetZ()
| Double_t TimeDetHit::GetZ |
( |
| ) |
const |
◆ isValid()
| bool TimeDetHit::isValid |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ Print() [1/2]
| void TimeDetHit::Print |
( |
| ) |
const |
Definition at line 120 of file TimeDetHit.cxx.
120 {
121 cout <<
"-I- TimeDetHit: TimeDet hit " <<
" in detector " <<
fDetectorID
122 << endl;
123 cout <<
" TDC left " <<
t_1 <<
" ns TDC right " <<
t_2 <<
" ns" << endl;
124}
◆ Print() [2/2]
◆ Resol()
| Double_t TimeDetHit::Resol |
( |
Double_t | x | ) |
const |
Definition at line 69 of file TimeDetHit.cxx.
69 {
70 return par[0] * TMath::Exp((x -
par[2]) /
par[1]) +
par[3];
71}
static constexpr Double_t par[4]
◆ setInvalid()
| void TimeDetHit::setInvalid |
( |
| ) |
|
|
inline |
◆ setIsValid()
| void TimeDetHit::setIsValid |
( |
| ) |
|
|
inline |
◆ SetTDC()
| void TimeDetHit::SetTDC |
( |
Float_t | val1, |
|
|
Float_t | val2 ) |
|
inline |
◆ flag
| Bool_t TimeDetHit::flag {true} |
|
private |
◆ par
| Double_t TimeDetHit::par[4] = {0.0272814, 109.303, 0, 0.0539487} |
|
staticconstexprprivate |
Definition at line 57 of file TimeDetHit.h.
57{0.0272814, 109.303, 0, 0.0539487};
◆ t_1
| Float_t TimeDetHit::t_1 {0} |
|
private |
◆ t_2
| Float_t TimeDetHit::t_2 {0} |
|
private |
◆ v_drift
| Double_t TimeDetHit::v_drift = 15. |
|
staticconstexprprivate |
The documentation for this class was generated from the following files: