 |
Belle II Software
release-05-01-25
|
11 #include <cdc/translators/RealisticTDCCountTranslator.h>
12 #include <framework/dataobjects/FileMetaData.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <mdst/dataobjects/MCParticle.h>
21 RealisticTDCCountTranslator::RealisticTDCCountTranslator(
bool useInWirePropagationDelay) :
22 m_useInWirePropagationDelay(useInWirePropagationDelay), m_gcp(
CDCGeoControlPar::getInstance()),
24 m_tdcBinWidth(m_cdcp.getTdcBinWidth())
28 if (filPtr->getMcEvents() == 0)
m_realData =
true;
44 #if defined(CDC_DEBUG)
46 cout <<
"RealisticTDCCountTranslator constructor" << endl;
47 cout <<
"m_cdcp=" << &
m_cdcp << endl;
55 double timeOfFlightEstimator,
57 unsigned short adcCount)
73 double propLength = z - backWirePos.Z();
74 double dZ = diffWirePos.Z();
76 propLength *= diffWirePos.Mag() / dZ;
91 driftTime -= timeOfFlightEstimator;
108 double timeOfFlightEstimator,
113 unsigned short adcCount)
115 const double driftTime =
getDriftTime(tdcCount, wireID, timeOfFlightEstimator, z, adcCount);
125 #if defined(CDC_DEBUG)
127 cout <<
"RealisticTDCCountTranslator::getDriftLength" << endl;
128 cout <<
"driftTime=" << driftTime << endl;
129 cout <<
"layer=" << layer << endl;
130 cout <<
"leftright=" << leftRight << endl;
131 cout <<
"driftL= " << driftL << endl;
141 double alpha,
double theta)
143 static_cast<void>(z);
147 #if defined(CDC_DEBUG)
149 cout <<
"RealisticTDCCountTranslator::getDriftLengthResolution" << endl;
150 cout <<
"spaceResol= " << resol << endl;
153 return resol * resol;;
Class to identify a wire inside the CDC.
double getDriftLengthResolution(double driftLength, const WireID &wireID=WireID(), bool leftRight=false, double z=0, double alpha=0, double=static_cast< double >(TMath::Pi()/2.)) override
Get position resolution^2 corresponding to the drift length from getDriftLength of this class.
double getPropSpeedInv(const unsigned int layerID) const
Get the inversel of propagation speed in the sense wire.
const TVector3 wireForwardPosition(int layerId, int cellId, EWirePosition set=c_Base) const
Returns the forward position of the input sense wire.
double getSigma(double dist, unsigned short layer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI) const
Return the basic resolution of drift length (cm).
double m_fudgeFactor
Cached fudge factor for space resol.
StoreObjPtr< EventT0 > m_eventTimeStoreObject
Event timing.
const CDCGeometryPar & m_cdcp
Cached reference to CDC GeometryPar object.
const CDCGeoControlPar & m_gcp
Cached reference to CDC GeoControlPar object.
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.
The Class for CDC Geometry Parameters.
const TVector3 wireBackwardPosition(int layerId, int cellId, EWirePosition set=c_Base) const
Returns the backward position of the input sense wire.
Abstract base class for different kinds of events.
The Class for CDC Simulation Control Parameters.
Type-safe access to single objects in the data store.
double getDriftLength(unsigned short tdcCount, const WireID &wireID=WireID(), double timeOfFlightEstimator=0, bool leftRight=false, double z=0, double alpha=0, double theta=static_cast< double >(TMath::Pi()/2.), unsigned short adcCount=0) override
Get Drift length.
float getT0(const WireID &wireID) const
Returns t0 parameter of the specified sense wire.
double getDriftTime(unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short adcCount) override
Get Drift time.
const CDCSimControlPar & m_scp
Cached reference to CDC SimControlPar object.
@ c_Persistent
Object is available during entire execution time.
int getSenseWireZposMode() const
Get sense wire z position mode.
bool m_useInWirePropagationDelay
Flag to activate the propagation delay of the sense wire.
double getTimeWalk(const WireID &wID, unsigned short adcCount) const
Returns time-walk.
double getBwdDeltaZ(unsigned short layerID) const
Return backward 'deltaZ'.
bool m_realData
Flag to distinguish betw.
unsigned short getICLayer() const
Getter for continuous layer numbering.
The Class for CDC Geometry Control Parameters.
double getFudgeFactorForSigma(unsigned short target) const
Return the fuge factor for space resol.
const double m_tdcBinWidth
Cached TDC bin width (ns).
bool getTimeWalk() const
Get time-walk flag.