Belle II Software  release-08-01-10
DriftLengthEstimator Struct Reference

Helper construct implementing the (re)estimation of the drift length for various hit objects. More...

#include <DriftLengthEstimator.h>

Public Member Functions

void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix)
 Add the parameters of the estimator to the module.
 
double updateDriftLength (CDCRecoHit2D &recoHit2D)
 Update the drift length of the reconstructed hit in place.
 
double updateDriftLength (CDCRecoHit3D &recoHit3D, double tanLambda)
 Update the drift length of the reconstructed hit in place.
 
void updateDriftLength (CDCFacet &facet)
 Reestimate the drift length of all three contained drift circles. More...
 
void updateDriftLength (CDCSegment2D &segment)
 Update the drift length of the contained reconstructed hit in place.
 
void updateDriftLength (CDCSegment3D &segment, double tanLambda)
 Update the drift length of the contained reconstructed hit in place.
 
void updateDriftLength (CDCTrack &track, double tanLambda)
 Update the drift length of the contained reconstructed hit in place.
 

Public Attributes

bool m_param_useAlphaInDriftLength = true
 Parameter : Switch to serve the alpha angle to the drift length translator.
 
double m_param_tofMassScale = NAN
 Parameter : Mass to estimate the velocity in the flight time to the hit.
 

Detailed Description

Helper construct implementing the (re)estimation of the drift length for various hit objects.

Definition at line 36 of file DriftLengthEstimator.h.

Member Function Documentation

◆ updateDriftLength()

void updateDriftLength ( CDCFacet facet)

Reestimate the drift length of all three contained drift circles.

Using the additional flight direction information the accuracy of the drift length can be increased alot helping the filters following this step

Definition at line 88 of file DriftLengthEstimator.cc.

89 {
90  CDC::RealisticTDCCountTranslator tdcCountTranslator;
91  const FlightTimeEstimator& flightTimeEstimator = FlightTimeEstimator::instance();
92 
93  const UncertainParameterLine2D& line = facet.getFitLine();
94  Vector2D flightDirection = line->tangential();
95  Vector2D centralPos2D = line->closest(facet.getMiddleWire().getRefPos2D());
96  double alpha = centralPos2D.angleWith(flightDirection);
98  alpha = 0;
99  }
100 
101  auto doUpdate = [&](CDCRLWireHit & rlWireHit, Vector2D recoPos2D) {
102  const CDCWire& wire = rlWireHit.getWire();
103  const CDCHit* hit = rlWireHit.getWireHit().getHit();
104  const bool rl = rlWireHit.getRLInfo() == ERightLeft::c_Right;
105  const double beta = 1;
106  double flightTimeEstimate = flightTimeEstimator.getFlightTime2D(recoPos2D, alpha, beta);
107  double driftLength = tdcCountTranslator.getDriftLength(hit->getTDCCount(),
108  wire.getWireID(),
109  flightTimeEstimate,
110  rl,
111  wire.getRefZ(),
112  alpha);
113  rlWireHit.setRefDriftLength(driftLength);
114  };
115 
116  doUpdate(facet.getStartRLWireHit(), facet.getStartRecoPos2D());
117  doUpdate(facet.getMiddleRLWireHit(), facet.getMiddleRecoPos2D());
118  doUpdate(facet.getEndRLWireHit(), facet.getEndRecoPos2D());
119 
120  // More accurate implementation
121  // double startDriftLength = updateDriftLength(facet.getStartRecoHit2D());
122  // facet.getStartRLWireHit().setRefDriftLength(startDriftLength);
123 
124  // double middleDriftLength = updateDriftLength(facet.getMiddleRecoHit2D());
125  // facet.getMiddleRLWireHit().setRefDriftLength(middleDriftLength);
126 
127  // double endDriftLength = updateDriftLength(facet.getEndRecoHit2D());
128  // facet.getEndRLWireHit().setRefDriftLength(endDriftLength);
129 }
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
Translator mirroring the realistic Digitization.
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 UncertainParameterLine2D & getFitLine() const
Getter for the contained line fit information.
Definition: CDCFacet.h:61
Vector2D getEndRecoPos2D() const
Getter for the reconstructed position at the third hit on the fit line.
Definition: CDCFacet.cc:81
Vector2D getMiddleRecoPos2D() const
Getter for the reconstructed position at the second hit on the fit line.
Definition: CDCFacet.cc:76
Vector2D getStartRecoPos2D() const
Getter for the reconstructed position at the first hit on the fit line.
Definition: CDCFacet.cc:71
CDCRLWireHit & getEndRLWireHit()
Getter for the third oriented wire hit.
const CDCWire & getMiddleWire() const
Getter for the wire the second oriented wire hit is based on.
CDCRLWireHit & getMiddleRLWireHit()
Getter for the second oriented wire hit.
CDCRLWireHit & getStartRLWireHit()
Getter for the first oriented wire hit.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Definition: CDCRLWireHit.h:41
void setRefDriftLength(double driftLength)
Setter for the drift length at the reference position of the wire.
Definition: CDCRLWireHit.h:210
const CDCWire & getWire() const
Getter for the wire the oriented hit associated to.
const CDCWireHit & getWireHit() const
Getter for the wire hit associated with the oriented hit.
Definition: CDCRLWireHit.h:192
ERightLeft getRLInfo() const
Getter for the right left passage information.
Definition: CDCRLWireHit.h:234
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
Definition: CDCWireHit.h:159
Class representing a sense wire in the central drift chamber.
Definition: CDCWire.h:58
const Vector2D & getRefPos2D() const
Getter for the wire reference position for 2D tracking Gives the wire's reference position projected ...
Definition: CDCWire.h:229
const WireID & getWireID() const
Getter for the wire id.
Definition: CDCWire.h:122
double getRefZ() const
Getter for the wire reference z coordinate Gives the wire's reference z coordinate.
Definition: CDCWire.h:236
Helper struct to provide consistent flight time estimation throughout the CDC track finding.
static const FlightTimeEstimator & instance(std::unique_ptr< FlightTimeEstimator > replacement=nullptr)
Getter for the instance.
virtual double getFlightTime2D(const Vector2D &, double, double=1) const
Default estimator for the flight time.
A parameter line including including an line covariance matrix which is interpreted as located in the...
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:35
double angleWith(const Vector2D &rhs) const
The angle between this and rhs.
Definition: Vector2D.h:209
bool m_param_useAlphaInDriftLength
Parameter : Switch to serve the alpha angle to the drift length translator.

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