 |
Belle II Software
release-05-01-25
|
10 #include <tracking/trackFindingCDC/eventdata/utils/DriftLengthEstimator.h>
12 #include <tracking/trackFindingCDC/eventdata/utils/FlightTimeEstimator.h>
14 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
16 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment3D.h>
17 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
19 #include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit3D.h>
20 #include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit2D.h>
21 #include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
22 #include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHit.h>
23 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
25 #include <tracking/trackFindingCDC/topology/CDCWire.h>
27 #include <tracking/trackFindingCDC/geometry/UncertainParameterLine2D.h>
28 #include <tracking/trackFindingCDC/geometry/ParameterLine2D.h>
29 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
30 #include <tracking/trackFindingCDC/geometry/Vector3D.h>
32 #include <tracking/trackFindingCDC/numerics/ERightLeft.h>
33 #include <tracking/trackFindingCDC/numerics/Quadratic.h>
35 #include <framework/core/ModuleParamList.templateDetails.h>
36 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
38 #include <cdc/translators/RealisticTDCCountTranslator.h>
39 #include <cdc/dataobjects/CDCHit.h>
42 using namespace TrackFindingCDC;
47 moduleParamList->
addParameter(prefixed(prefix,
"useAlphaInDriftLength"),
49 "Switch to serve the alpha angle to the drift length translator",
52 moduleParamList->
addParameter(prefixed(prefix,
"tofMassScale"),
54 "Mass to estimate the velocity in the flight time to the hit",
65 double alpha = recoPos2D.
angleWith(flightDirection);
66 const double beta = 1;
67 double flightTimeEstimate = flightTimeEstimator.
getFlightTime2D(recoPos2D, alpha, beta);
71 const bool rl = recoHit2D.
getRLInfo() == ERightLeft::c_Right;
77 double driftLength = tdcCountTranslator.
getDriftLength(hit->getTDCCount(),
83 if (driftLength > -2 and driftLength < 16) {
84 bool snapRecoPos =
true;
96 Vector2D flightDirection = line->tangential();
98 double alpha = centralPos2D.
angleWith(flightDirection);
106 const bool rl = rlWireHit.
getRLInfo() == ERightLeft::c_Right;
107 const double beta = 1;
108 double flightTimeEstimate = flightTimeEstimator.
getFlightTime2D(recoPos2D, alpha, beta);
109 double driftLength = tdcCountTranslator.
getDriftLength(hit->getTDCCount(),
149 double alpha = recoPos2D.
angleWith(flightDirection);
150 const double beta = 1;
151 double flightTimeEstimate = flightTimeEstimator.
getFlightTime2D(recoPos2D, alpha, beta);
153 if (std::isnan(tanLambda)) {
156 const double theta = M_PI / 2 - std::atan(tanLambda);
157 flightTimeEstimate *= hypot2(1, tanLambda);
161 const bool rl = recoHit3D.
getRLInfo() == ERightLeft::c_Right;
171 if (driftLength > -2 and driftLength < 16) {
172 bool snapRecoPos =
true;
180 const double tanLambda)
188 const double tanLambda)
190 for (CDCRecoHit3D& recoHit3D : track) {
const CDCWire & getWire() const
Getter for the wire.
Vector2D getStartRecoPos2D() const
Getter for the reconstructed position at the first hit on the fit line.
Class representing a three dimensional reconstructed hit.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
virtual double getFlightTime2D(const Vector2D &, double, double=1) const
Default estimator for the flight time.
Translator mirroring the realistic Digitization.
const Vector2D & getRefPos2D() const
Getter for the wire reference position for 2D tracking Gives the wire's reference position projected ...
Vector2D getRecoPos2D() const
Getter for the position in the reference plane.
const CDCWireHit & getWireHit() const
Getter for the wire hit associated with the oriented hit.
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
double getRefZ() const
Getter for the wire reference z coordinate Gives the wire's reference z coordinate.
const CDCWire & getWire() const
Getter for the wire the oriented hit associated to.
double m_param_tofMassScale
Parameter : Mass to estimate the velocity in the flight time to the hit.
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
const CDCWireHit & getWireHit() const
Getter for the wire hit.
A segment consisting of three dimensional reconstructed hits.
Helper struct to provide consistent flight time estimation throughout the CDC track finding.
ERightLeft getRLInfo() const
Getter for the right left passage information.
bool m_param_useAlphaInDriftLength
Parameter : Switch to serve the alpha angle to the drift length translator.
void setRefDriftLength(double driftLength, bool snapRecoPos)
Setter for the drift length at the wire reference position.
double updateDriftLength(CDCRecoHit2D &recoHit2D)
Update the drift length of the reconstructed hit in place.
const CDCWire & getWire() const
Getter for the wire the reconstructed hit assoziated to.
Vector2D getFlightDirection2D() const
Getter for the direction of flight.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Class representing a two dimensional reconstructed hit in the central drift chamber.
ERightLeft getRLInfo() const
Getter for the right left passage information.
Abstract base class for different kinds of events.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
A three dimensional vector.
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.
const CDCWire & getMiddleWire() const
Getter for the wire the second oriented wire hit is based on.
Vector2D getEndRecoPos2D() const
Getter for the reconstructed position at the third hit on the fit line.
void setRefDriftLength(double driftLength)
Setter for the drift length at the reference position of the wire.
CDCRLWireHit & getMiddleRLWireHit()
Getter for the second oriented wire hit.
const WireID & getWireID() const
Getter for the wire id.
Class representing a triple of neighboring oriented wire with additional trajectory information.
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
static const FlightTimeEstimator & instance(std::unique_ptr< FlightTimeEstimator > replacement=nullptr)
Getter for the instance.
Class representing a sense wire in the central drift chamber.
A reconstructed sequence of two dimensional hits in one super layer.
CDCRLWireHit & getEndRLWireHit()
Getter for the third oriented wire hit.
void setRecoDriftLength(double driftLength, bool snapRecoPos)
Setter to update the drift length of the hit.
double angleWith(const Vector2D &rhs) const
The angle between this and rhs.
double z() const
Getter for the z coordinate.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Add the parameters of the estimator to the module.
A parameter line including including an line covariance matrix which is interpreted as located in the...
The Module parameter list class.
const Vector3D & getRecoPos3D() const
Getter for the 3d position of the hit.
Vector2D getFlightDirection2D() const
Getter for the direction of flight.
CDCRLWireHit & getStartRLWireHit()
Getter for the first oriented wire hit.
double cylindricalR() const
Getter for the cylindrical radius ( xy projected norm )
Vector2D getMiddleRecoPos2D() const
Getter for the reconstructed position at the second hit on the fit line.
const CDCWireHit & getWireHit() const
Getter for the wire hit assoziated with the reconstructed hit.
const UncertainParameterLine2D & getFitLine() const
Getter for the contained line fit information.
ERightLeft getRLInfo() const
Getter for the right left passage information.