10#include <cdc/geometry/CDCGeometryPar.h>
12#include <cdc/geometry/CDCGeoControlPar.h>
19 namespace TrackFindingCDC {
33 unsigned short iCLayer,
36 double theta = 0.5 * M_PI)
50 unsigned short iCLayer,
53 double theta = 0.5 * M_PI)
67 unsigned short iCLayer,
89 double zDistance = z - backwardWirePos.
Z();
93 (forwardWirePos - backwardWirePos).Mag() / (forwardWirePos.
Z() - backwardWirePos.
Z());
95 double distance = zDistance * stereoFactor;
124 smearing = gRandom->Rndm() - 0.5;
127 double measuredTime =
129 if (measuredTime > 2000) {
130 B2INFO(
"channelT0 " << channelT0);
131 B2INFO(
"measuredTime " << measuredTime);
DataType Z() const
access variable Z (= .at(2) without boundary check)
The Class for CDC Geometry Control Parameters.
int getSenseWireZposMode() const
Get sense wire z position mode.
static CDCGeoControlPar & getInstance()
Static method to get a reference to the CDCGeoControlPar instance.
The Class for CDC Geometry Parameters.
double getTimeWalk(const WireID &wID, unsigned short adcCount) const
Returns time-walk.
const B2Vector3D wireForwardPosition(uint layerId, int cellId, EWirePosition set=c_Base) const
Returns the forward position of the input sense wire.
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.
const B2Vector3D wireBackwardPosition(uint layerId, int cellId, EWirePosition set=c_Base) const
Returns the backward position of the input sense wire.
double getTdcBinWidth() const
Return TDC bin width (nsec).
float getT0(const WireID &wireID) const
Returns t0 parameter of the specified sense wire.
double getBwdDeltaZ(unsigned short layerID) const
Return backward 'deltaZ'.
double getPropSpeedInv(const unsigned int layerID) const
Get the inversel of propagation speed in the sense wire.
double getDriftTime(double dist, unsigned short layer, unsigned short lr, double alpha, double theta) const
Return the drift time to the sense wire.
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.
Class to identify a wire inside the CDC.
unsigned short getICLayer() const
Getter for continuous layer numbering.
Abstract base class for different kinds of events.
Structure to expose some drift time and length functions from the CDCGeometryPar to Python.
static double getPropTime(const WireID &wireID, double z)
Getter for the in wire propagation time.
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 getMeasuredTime(const WireID &wireID, unsigned short tdcCount, bool smear)
Returns the time measured at the readout board.
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 getTimeWalk(const WireID &wireID, unsigned short adcCount)
Returns time-walk.
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.