Belle II Software  release-08-01-10
RealisticTDCCountTranslator Class Reference

Translator mirroring the realistic Digitization. More...

#include <RealisticTDCCountTranslator.h>

Inheritance diagram for RealisticTDCCountTranslator:
Collaboration diagram for RealisticTDCCountTranslator:

Public Member Functions

 RealisticTDCCountTranslator (bool useInWirePropagationDelay=false)
 Constructor, with the additional information, if propagation in the wire shall be considered.
 
 ~RealisticTDCCountTranslator ()
 Destructor.
 
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. More...
 
double getDriftTime (unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short adcCount) override
 Get Drift time. More...
 
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. More...
 

Private Attributes

bool m_useInWirePropagationDelay
 Flag to activate the propagation delay of the sense wire. More...
 
bool m_realData = false
 Flag to distinguish betw. More...
 
StoreObjPtr< EventT0m_eventTimeStoreObject
 Event timing. More...
 
const CDCGeoControlParm_gcp
 Cached reference to CDC GeoControlPar object.
 
const CDCSimControlParm_scp
 Cached reference to CDC SimControlPar object.
 
const CDCGeometryParm_cdcp
 Cached reference to CDC GeometryPar object.
 
const double m_tdcBinWidth
 Cached TDC bin width (ns). More...
 
double m_fudgeFactor = 1.
 Cached fudge factor for space resol.
 

Detailed Description

Translator mirroring the realistic Digitization.

Definition at line 25 of file RealisticTDCCountTranslator.h.

Member Function Documentation

◆ getDriftLength()

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 
)
overridevirtual

Get Drift length.

Parameters
tdcCountTDC count (ns).
wireIDEncoded sense wire ID.
timeOfFlightEstimatorTime of flight (ns).
leftRightleft/right flag.
zz-position on the wire (cm).
alphaTrack incident angle in r-phi plane (rad).
thetaTrack incident angle in s-z plane (=polar angle) (rad).
adcCountADC count.
Returns
Drift length (cm) if drift time >= 0; v*(drift time) (i.e. negative value) otherwise, where v is set to one (cm/ns) for simplicity.

Implements TDCCountTranslatorBase.

Definition at line 92 of file RealisticTDCCountTranslator.cc.

100 {
101  const double driftTime = getDriftTime(tdcCount, wireID, timeOfFlightEstimator, z, adcCount);
102 
103  unsigned short layer = wireID.getICLayer();
104 
105  //Now we have an estimate for the time it took from the ionisation to the hitting of the wire.
106  //Need to reverse calculate the relation between drift lenght and drift time.
107  // double driftL = std::copysign(m_cdcp.getDriftLength(fabs(driftTime), layer, leftRight, alpha, theta), driftTime);
108  //Note: The above treatment for negative drifttime is now done in m_cdcp.getDriftLength, so the line is commented out
109  double driftL = m_cdcp.getDriftLength(driftTime, layer, leftRight, alpha, theta);
110 
111 #if defined(CDC_DEBUG)
112  cout << " " << endl;
113  cout << "RealisticTDCCountTranslator::getDriftLength" << endl;
114  cout << "driftTime=" << driftTime << endl;
115  cout << "layer=" << layer << endl;
116  cout << "leftright=" << leftRight << endl;
117  cout << "driftL= " << driftL << endl;
118 #endif
119 
120  return driftL;
121 }
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.
const CDCGeometryPar & m_cdcp
Cached reference to CDC GeometryPar object.
double getDriftTime(unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short adcCount) override
Get Drift time.
unsigned short getICLayer() const
Getter for continuous layer numbering.
Definition: WireID.cc:24

◆ getDriftLengthResolution()

double getDriftLengthResolution ( double  driftLength,
const WireID wireID = WireID(),
bool  leftRight = false,
double  z = 0,
double  alpha = 0,
double  theta = static_cast<double>(TMath::Pi() / 2.) 
)
overridevirtual

Get position resolution^2 corresponding to the drift length from getDriftLength of this class.

this function returns the variance that is used as the CDC measurment resolution in track fitting

Parameters
driftLengthDrift length (cm).
wireIDEncoded sense wire ID.
leftRightLeft/right flag.
zz-position on the wire (cm).
alphaTrack incident angle in r-phi plane (rad).
thetaTrack incident angle in s-z plane (=polar angle) (rad).
Returns
Uncertainty^2 (cm^2) on the drift length.

Implements TDCCountTranslatorBase.

Definition at line 126 of file RealisticTDCCountTranslator.cc.

◆ getDriftTime()

double getDriftTime ( unsigned short  tdcCount,
const WireID wireID,
double  timeOfFlightEstimator,
double  z,
unsigned short  adcCount 
)
overridevirtual

Get Drift time.

Parameters
tdcCountTDC count (ns).
wireIDEncoded sense wire ID.
timeOfFlightEstimatorTime of flight (ns).
zz-position on the wire (cm).
adcCountADC count.
Returns
Drift time (ns)

Implements TDCCountTranslatorBase.

Definition at line 39 of file RealisticTDCCountTranslator.cc.

Member Data Documentation

◆ m_eventTimeStoreObject

StoreObjPtr<EventT0> m_eventTimeStoreObject
private

Event timing.

The event time is fetched from the data store using this pointer.

Definition at line 104 of file RealisticTDCCountTranslator.h.

◆ m_realData

bool m_realData = false
private

Flag to distinguish betw.

data and MC.

Definition at line 99 of file RealisticTDCCountTranslator.h.

◆ m_tdcBinWidth

const double m_tdcBinWidth
private

Cached TDC bin width (ns).

N.B. The declaration should be after m_cdcp for proper initialization.

Definition at line 130 of file RealisticTDCCountTranslator.h.

◆ m_useInWirePropagationDelay

bool m_useInWirePropagationDelay
private

Flag to activate the propagation delay of the sense wire.

true : activated, false : the propagation delay is not used.

Definition at line 94 of file RealisticTDCCountTranslator.h.


The documentation for this class was generated from the following files: