 |
Belle II Software
release-05-02-19
|
10 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
12 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
14 #include <tracking/trackFindingCDC/topology/CDCWireSuperLayer.h>
15 #include <tracking/trackFindingCDC/topology/CDCWire.h>
16 #include <tracking/trackFindingCDC/topology/EStereoKind.h>
18 #include <tracking/trackFindingCDC/geometry/Circle2D.h>
19 #include <tracking/trackFindingCDC/geometry/Vector3D.h>
20 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
22 #include <tracking/trackFindingCDC/numerics/ERightLeft.h>
23 #include <tracking/trackFindingCDC/numerics/Index.h>
25 #include <cdc/translators/RealisticTDCCountTranslator.h>
26 #include <cdc/translators/LinearGlobalADCCountTranslator.h>
28 #include <cdc/dataobjects/TDCCountTranslatorBase.h>
29 #include <cdc/dataobjects/ADCCountTranslatorBase.h>
31 #include <cdc/dataobjects/CDCHit.h>
32 #include <cdc/dataobjects/WireID.h>
33 #include <framework/logging/Logger.h>
39 using namespace TrackFindingCDC;
44 return s_tdcCountTranslator;
50 return s_adcCountTranslator;
54 const double driftLength,
55 const double driftLengthVariance,
56 const double chargeDeposit,
57 const double driftTime)
58 : m_wireID(ptrHit->
getID())
59 , m_wire(
CDCWire::getInstance(*ptrHit))
61 , m_refDriftLength(driftLength)
62 , m_refDriftLengthVariance(driftLengthVariance)
63 , m_refChargeDeposit(chargeDeposit)
64 , m_refDriftTime(driftTime)
72 : m_wireID(ptrHit->
getID())
73 , m_wire(ptrHit ? CDCWire::getInstance(*ptrHit) : nullptr)
78 B2ERROR(
"CDCWireHit constructor invoked with nullptr CDCHit");
81 const CDCHit& hit = *ptrHit;
88 float initialTOFEstimate = 0;
90 float refDriftLengthRight = tdcCountTranslator.
getDriftLength(hit.getTDCCount(),
96 float refDriftLengthLeft = tdcCountTranslator.
getDriftLength(hit.getTDCCount(),
123 const double driftLength,
124 const double driftLengthVariance,
125 const double chargeDeposit)
127 , m_wire(CDCWire::getInstance(wireID))
129 , m_refDriftLength(driftLength)
130 , m_refDriftLengthVariance(driftLengthVariance)
131 , m_refChargeDeposit(chargeDeposit)
148 return wireSuperLayer.getISuperLayer() < wireHit.
getISuperLayer();
176 Vector2D disp2D = recoPos2D - wirePos2D;
180 return wirePos2D + disp2D;
185 const double z)
const
189 if (stereoType == EStereoKind::c_StereoV or stereoType == EStereoKind::c_StereoU) {
191 const double signedDriftLength = isValid(rlInfo) ? rlInfo *
getRefDriftLength() : 0.0;
192 return trajectory2D.
reconstruct3D(wireLine, signedDriftLength, z);
231 return output <<
"CDCWireHit(" << wirehit.
getWireID()
Base class for translation of Drift Time into Drift Length.
EStereoKind getStereoKind() const
Getter for the stereo type of the underlying wire.
virtual float getCharge(unsigned short adcCount=0, const WireID &wireID=WireID(), bool ambiguityDiscrimiator=false, float z=0, float theta=static_cast< float >(TMath::Pi()/2.))=0
Function, for which this actually was meant.
Class to identify a wire inside the CDC.
HepGeom::Vector3D< double > Vector3D
3D Vector
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
const WireID & getWireID() const
Getter for the WireID of the wire the hit is located on.
double normalizeTo(const double toLength)
Normalizes the vector to the given length.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
double getRefDriftLength() const
Getter for the drift length at the reference position of the wire.
Translator mirroring the realistic Digitization.
const CDCWire & attachWire() const
Reestablishes the pointer of the hit to the wire and returns it Since the DataStore only transport th...
unsigned short getID() const
Getter for encoded wire number.
unsigned short getEWire() const
Getter for encoded wire number.
const Vector2D & getRefPos2D() const
Getter for the wire reference position for 2D tracking Gives the wire's reference position projected ...
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
This class simply assumes a linear translation through (0,0)
ISuperLayer getISuperLayer() const
Getter for the super layer id.
double getRefZ() const
Getter for the wire reference z coordinate Gives the wire's reference z coordinate.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
const Vector2D & getRefPos2D() const
The two dimensional reference position (z=0) of the underlying wire.
static CDC::TDCCountTranslatorBase & getTDCCountTranslator()
Return an instance of the used TDC count translator.
virtual double getDriftLength(unsigned short tdcCount=0, const WireID &wireID=WireID(), double timeOfFlightEstimator=0., bool ambiguityDiscrimiator=false, double z=0, double alpha=0, double theta=static_cast< double >(TMath::Pi()/2.), unsigned short adcCount=0)=0
Function for getting a drift length estimation.
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
A two dimensional circle in its natural representation using center and radius as parameters.
Index getStoreIHit() const
Getter for the index of the hit in the StoreArray holding this hit.
ISuperLayer getISuperLayer() const
Getter for the super layer id.
Vector2D getClosest(const Vector2D &point) const
Calculates the closest approach on the trajectory to the given point.
virtual double getDriftLengthResolution(double driftLength=0., const WireID &wireID=WireID(), bool ambiguityDiscrimiator=false, double z=0, double alpha=0, double theta=static_cast< double >(TMath::Pi()/2.))=0
Uncertainty corresponding to drift length from getDriftLength of this class.
Particle trajectory as it is seen in xy projection represented as a circle.
CDCWireHit()=default
Default constructor for ROOT compatibility.
virtual double getDriftTime(unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short adcCount)=0
Get Drift time.
bool operator<(ExpRun a, ExpRun b)
less than for ExpRun
const Vector3D & getRefPos3D() const
Getter for the wire reference position.
CDCWire const * m_wire
Memory for the CDCWire pointer - Trailing comment indicates to not stream this member.
Abstract base class for different kinds of events.
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
A three dimensional vector.
double m_refDriftLengthVariance
Memory for the variance of the drift length at the wire reference point.
Vector3D reconstruct3D(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the one three dimensional postions within the CDC closest to the given z where the given drift ...
static const CDCWire * getInstance(const WireID &wireID)
Getter from the wireID convinience object. Does not construct a new object.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
const WireLine & getWireLine() const
Getter for the wire line represenation of the wire.
int getArrayIndex() const
Returns this object's array index (in StoreArray), or -1 if not found.
Circle2D conformalTransformed(const Vector2D &relativeTo) const
Applys the conformal transformation to the drift circle this hit represents.
double m_refDriftTime
Measured drift time of the CDC hit.
const CDCWire & getWire() const
Getter for the CDCWire the hit is located on.
Class representating a sense wire superlayer in the central drift chamber.
Abstract Base class for the ADC count translator.
void conformalTransform()
Transforms the circle to conformal space inplace.
Class representing a sense wire in the central drift chamber.
const Vector3D & getRefPos3D() const
The three dimensional reference position of the underlying wire.
Class representing a hit wire in the central drift chamber.
static CDC::ADCCountTranslatorBase & getADCCountTranslator()
Return an instance of the used ADC count translator.
double getRefCylindricalR() const
The distance from the beam line at reference position of the underlying wire.
Vector2D reconstruct2D(const CDCTrajectory2D &trajectory2D) const
Reconstructs a position of primary ionisation on the drift circle.
Vector3D reconstruct3D(const CDCTrajectory2D &trajectory2D, ERightLeft rlInfo, double z=0) const
Attempts to reconstruct a three dimensional position (especially of stereo hits).
bool operator<(const CDCWireHit &rhs) const
Total ordering relation based on the wire and the hit id.
double m_refChargeDeposit
Memory for the charge induced by the energy deposit in the drift cell.
double m_refDriftLength
Memory for the drift length at the wire reference point.
WireID m_wireID
Memory for the WireID.
double getRefCylindricalR() const
Getter for the cylindrical radius at the wire reference position.