Structure to expose some drift time and length functions from the CDCGeometryPar to Python.
More...
#include <DriftTimeUtil.h>
|
static double | getDriftV (double driftTime, unsigned short iCLayer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI) |
| Get the realistic drift velocity.
|
|
static double | getDriftLength (double driftTime, unsigned short iCLayer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI) |
| Return the drift length to the sense wire.
|
|
static double | getDriftTime (double dist, unsigned short iCLayer, unsigned short lr, double alpha, double theta) |
| Return the drift time to the sense wire.
|
|
static double | getPropTime (const WireID &wireID, double z) |
| Getter for the in wire propagation time.
|
|
static double | getTimeWalk (const WireID &wireID, unsigned short adcCount) |
| Returns time-walk.
|
|
static double | getMeasuredTime (const WireID &wireID, unsigned short tdcCount, bool smear) |
| Returns the time measured at the readout board.
|
|
Structure to expose some drift time and length functions from the CDCGeometryPar to Python.
Definition at line 22 of file DriftTimeUtil.h.
◆ getDriftLength()
static double getDriftLength |
( |
double |
driftTime, |
|
|
unsigned short |
iCLayer, |
|
|
unsigned short |
lr, |
|
|
double |
alpha = 0. , |
|
|
double |
theta = 0.5 * M_PI |
|
) |
| |
|
inlinestatic |
Return the drift length to the sense wire.
- Parameters
-
driftTime | Drift time (ns). |
iCLayer | Continuous layer id. |
lr | Left/Right boolean. |
alpha | Incident angle (in rphi plane) w.r.t. the cell (rad). |
theta | Incident angle (polar angle) (rad). |
Definition at line 49 of file DriftTimeUtil.h.
54 {
56 }
double getDriftLength(double dt, unsigned short layer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI, bool calculateMinTime=true, double minTime=0.) const
Return the drift dength to the sense wire.
static CDCGeometryPar & Instance(const CDCGeometry *=nullptr)
Static method to get a reference to the CDCGeometryPar instance.
◆ getDriftTime()
static double getDriftTime |
( |
double |
dist, |
|
|
unsigned short |
iCLayer, |
|
|
unsigned short |
lr, |
|
|
double |
alpha, |
|
|
double |
theta |
|
) |
| |
|
inlinestatic |
Return the drift time to the sense wire.
- Parameters
-
dist | Drift length (cm). |
iCLayer | Continuous layer id |
lr | Left/Right boolean |
alpha | Incident angle (in rphi plane) w.r.t. the cell (rad). |
theta | Incident angle (polar angle) (rad). |
Definition at line 66 of file DriftTimeUtil.h.
71 {
73 }
double getDriftTime(double dist, unsigned short layer, unsigned short lr, double alpha, double theta) const
Return the drift time to the sense wire.
◆ getDriftV()
static double getDriftV |
( |
double |
driftTime, |
|
|
unsigned short |
iCLayer, |
|
|
unsigned short |
lr, |
|
|
double |
alpha = 0. , |
|
|
double |
theta = 0.5 * M_PI |
|
) |
| |
|
inlinestatic |
Get the realistic drift velocity.
- Parameters
-
driftTime | Drift time (ns). |
iCLayer | Continuous layer id |
lr | Left/Right |
alpha | Incident angle (in rphi plane) w.r.t. the cell (rad). |
theta | Incident angle (polar angle) (rad). |
Definition at line 32 of file DriftTimeUtil.h.
37 {
39 }
double getDriftV(double dt, unsigned short layer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI) const
Get the realistic drift velocity.
◆ getMeasuredTime()
static double getMeasuredTime |
( |
const WireID & |
wireID, |
|
|
unsigned short |
tdcCount, |
|
|
bool |
smear |
|
) |
| |
|
inlinestatic |
Returns the time measured at the readout board.
- Parameters
-
wireID | wire id |
tdcCount | TDC count |
smear | if true result will be varied randomly |
- Returns
- measured time (in ns)
Definition at line 120 of file DriftTimeUtil.h.
121 {
122 double smearing = 0;
123 if (smear) {
124 smearing = gRandom->Rndm() - 0.5;
125 }
127 double measuredTime =
129 if (measuredTime > 2000) {
130 B2INFO("channelT0 " << channelT0);
131 B2INFO("measuredTime " << measuredTime);
132 }
133 return measuredTime;
134 }
double getTdcBinWidth() const
Return TDC bin width (nsec).
float getT0(const WireID &wireID) const
Returns t0 parameter of the specified sense wire.
◆ getPropTime()
static double getPropTime |
( |
const WireID & |
wireID, |
|
|
double |
z |
|
) |
| |
|
inlinestatic |
Getter for the in wire propagation time.
- Parameters
-
wireID | wire id |
z | start location of the signal propagation on the wire |
Definition at line 80 of file DriftTimeUtil.h.
81 {
82 unsigned short iCLayer = wireID.getICLayer();
86 geometryPar.wireBackwardPosition(wireID, CDC::CDCGeometryPar::c_Aligned);
88 geometryPar.wireForwardPosition(wireID, CDC::CDCGeometryPar::c_Aligned);
89 double zDistance = z - backwardWirePos.Z();
90
91
92 double stereoFactor =
93 (forwardWirePos - backwardWirePos).Mag() / (forwardWirePos.Z() - backwardWirePos.Z());
94
95 double distance = zDistance * stereoFactor;
96 if (controlPar.getSenseWireZposMode() == 1) {
97 distance += geometryPar.getBwdDeltaZ(iCLayer);
98 }
99 return distance * geometryPar.getPropSpeedInv(iCLayer);
100 }
static CDCGeoControlPar & getInstance()
Static method to get a reference to the CDCGeoControlPar instance.
B2Vector3< double > B2Vector3D
typedef for common usage with double
◆ getTimeWalk()
static double getTimeWalk |
( |
const WireID & |
wireID, |
|
|
unsigned short |
adcCount |
|
) |
| |
|
inlinestatic |
Returns time-walk.
- Parameters
-
wireID | wire id |
adcCount | ADC count |
- Returns
- time-walk (in ns)
Definition at line 108 of file DriftTimeUtil.h.
109 {
111 }
double getTimeWalk(const WireID &wID, unsigned short adcCount) const
Returns time-walk.
The documentation for this struct was generated from the following file: