#include <TimeDetHit.h>
|
| Bool_t | flag {true} |
| | flag
|
| |
| Float_t | t_1 |
| |
| Float_t | t_2 |
| | 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 |
( |
| ) |
|
◆ 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 31 of file TimeDetHit.cxx.
32 if (!p) {
33 LOG(error) << "TimeDetHit: null TimeDetPoint pointer";
34 return;
35 }
37 Float_t lpos, lneg;
38 Dist(
p->GetX(), lpos, lneg);
40 t_1 = gRandom->Gaus(0, sigma) + lneg /
v_drift +
t0 +
p->GetTime();
42 t_2 = gRandom->Gaus(0, sigma) + lpos /
v_drift +
t0 +
p->GetTime();
43}
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 |
◆ ClassDef()
◆ Dist()
| void TimeDetHit::Dist |
( |
Float_t |
x, |
|
|
Float_t & |
lpos, |
|
|
Float_t & |
lneg |
|
) |
| const |
Definition at line 80 of file TimeDetHit.cxx.
80 {
82 auto shape = dynamic_cast<TGeoBBox*>(node->GetVolume()->GetShape());
84 lpos = TMath::Abs(
pos.X() + shape->GetDX() - x);
85 lneg = TMath::Abs(
pos.X() - shape->GetDX() - x);
86}
TGeoNode * GetNode() const
◆ GetMeasurements()
| std::vector< double > TimeDetHit::GetMeasurements |
( |
| ) |
const |
◆ GetNode()
| TGeoNode * TimeDetHit::GetNode |
( |
| ) |
const |
Definition at line 115 of file TimeDetHit.cxx.
115 {
116 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
117 TString
path =
"/Timing Detector_1/TimeDet_";
119 nav->cd(path);
120 return nav->GetCurrentNode();
121}
◆ GetTime() [1/2]
| std::vector< double > TimeDetHit::GetTime |
( |
| ) |
const |
Definition at line 60 of file TimeDetHit.cxx.
60 {
61 TGeoBBox* shape =
62 dynamic_cast<TGeoBBox*>(gGeoManager->GetVolume("TimeDet")->GetShape());
64 Float_t lpos, lneg;
69 Double_t dt = TMath::Sqrt(r1 * r1 + r2 * r2);
71}
◆ GetTime() [2/2]
| std::vector< double > TimeDetHit::GetTime |
( |
Double_t |
x | ) |
const |
Definition at line 46 of file TimeDetHit.cxx.
46 {
47
48 Float_t lpos, lneg;
50 Double_t r =
Resol(lneg);
51 Double_t w1 = 1. / (r * r);
53 Double_t w2 = 1. / (r * r);
54 Double_t dt = 1. / TMath::Sqrt(w1 + w2);
58}
◆ GetX()
| Double_t TimeDetHit::GetX |
( |
| ) |
const |
◆ GetXYZ()
| TVector3 TimeDetHit::GetXYZ |
( |
| ) |
const |
Definition at line 88 of file TimeDetHit.cxx.
88 {
89 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
91 auto shape = dynamic_cast<TGeoBBox*>(node->GetVolume()->GetShape());
92 Double_t
origin[3] = {shape->GetOrigin()[0], shape->GetOrigin()[1],
93 shape->GetOrigin()[2]};
94 Double_t master[3] = {0, 0, 0};
95 nav->LocalToMaster(origin, master);
96 TVector3
pos = TVector3(master[0], master[1], master[2]);
98}
◆ GetY()
| Double_t TimeDetHit::GetY |
( |
| ) |
const |
◆ GetZ()
| Double_t TimeDetHit::GetZ |
( |
| ) |
const |
◆ isValid()
| bool TimeDetHit::isValid |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ Print()
| void TimeDetHit::Print |
( |
| ) |
const |
Definition at line 124 of file TimeDetHit.cxx.
124 {
125 cout <<
"-I- TimeDetHit: TimeDet hit " <<
" in detector " <<
fDetectorID
126 << endl;
127 cout <<
" TDC left " <<
t_1 <<
" ns TDC right " <<
t_2 <<
" ns" << endl;
128}
◆ Resol()
| Double_t TimeDetHit::Resol |
( |
Double_t |
x | ) |
const |
Definition at line 73 of file TimeDetHit.cxx.
73 {
74 return par[0] * TMath::Exp((x -
par[2]) /
par[1]) +
par[3];
75}
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
| constexpr Double_t TimeDetHit::par[4] = {0.0272814, 109.303, 0, 0.0539487} |
|
staticconstexprprivate |
◆ t_1
◆ t_2
◆ v_drift
| constexpr Double_t TimeDetHit::v_drift = 15. |
|
staticconstexprprivate |
The documentation for this class was generated from the following files: