Belle II Software  release-05-01-25
ReattachCDCWireHitsToRecoTracksModule.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2019 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Cyrille Praz, Tracking group *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/modules/reattachCDCWireHitsToRecoTracks/ReattachCDCWireHitsToRecoTracksModule.h>
11 
12 #include <tracking/trackFindingCDC/topology/CDCWire.h>
13 #include <tracking/trackFindingCDC/geometry/Vector3D.h>
14 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
15 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory3D.h>
16 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
17 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectorySZ.h>
18 #include <tracking/trackFitting/fitter/base/TrackFitter.h>
19 #include <tracking/dataobjects/RecoHitInformation.h>
20 
21 using namespace Belle2;
22 using namespace TrackFindingCDC;
23 
24 REG_MODULE(ReattachCDCWireHitsToRecoTracks)
25 
27  Module()
28 {
29  setDescription(R"DOC(
30 Module to loop over low-ADC/TOT CDCWireHits and RecoTracks
31 and reattach the hits to the tracks if they are closer
32 than a given distance.)DOC");
33  setPropertyFlags(c_ParallelProcessingCertified); // parallel processing
34 
35  addParam("CDCWireHitsStoreArrayName", m_CDCWireHitsStoreArrayName,
36  "Name of the input CDCWireHit StoreArray", m_CDCWireHitsStoreArrayName);
37  addParam("inputRecoTracksStoreArrayName", m_inputRecoTracksStoreArrayName,
38  "Name of the input RecoTrack StoreArray", m_inputRecoTracksStoreArrayName);
39  addParam("outputRecoTracksStoreArrayName", m_outputRecoTracksStoreArrayName,
40  "Name of the output RecoTrack StoreArray", m_outputRecoTracksStoreArrayName);
41  addParam("MaximumDistance", m_maximumDistance,
42  "Distance (cm) below which (exclusive) a CDC hit can be reattached to a track", m_maximumDistance);
43  addParam("MinimumADC", m_minimumADC,
44  "ADC above which (inclusive) a CDC hit can be reattached to a track", m_minimumADC);
45  addParam("MinimumTOT", m_minimumTOT,
46  "TOT above which (inclusive) a CDC hit can be reattached to a track", m_minimumTOT);
47  addParam("MaximumAbsD0", m_maximumAbsD0,
48  "Only tracks with an absolute value of d0 below (exclusive) this parameter (cm) are considered", m_maximumAbsD0);
49  addParam("MaximumAbsZ0", m_maximumAbsZ0,
50  "Only tracks with an absolute value of z0 below (exclusive) this parameter (cm) are considered", m_maximumAbsZ0);
51 }
52 
53 
55 {
60 }
61 
62 
64 {
65  m_mapToHitsOnTrack.clear();
66  m_mapToHitsToAdd.clear();
67  findHits();
68  addHits();
69 }
70 
72 {
73 
74  TrackFitter trackFitter;
75 
76  for (RecoTrack& recoTrack : m_inputRecoTracks) {
77  // only fit tracks coming from the IP (d0 and z0 from Helix)
78  const Vector3D trackPosition(recoTrack.getPositionSeed());
79  const Vector3D trackMomentum(recoTrack.getMomentumSeed());
80  const CDCTrajectory3D trajectory(trackPosition, recoTrack.getTimeSeed(), trackMomentum, recoTrack.getChargeSeed());
81  const CDCTrajectory2D& trajectory2D(trajectory.getTrajectory2D());
82  const CDCTrajectorySZ& trajectorySZ(trajectory.getTrajectorySZ());
83  const double d0Estimate((trajectory2D.getClosest(Vector2D(0, 0))).norm());
84  const double z0Estimate(trajectorySZ.getZ0());
85  if (abs(d0Estimate) < m_maximumAbsD0 and abs(z0Estimate) < m_maximumAbsZ0) {
86  if (trackFitter.fit(recoTrack)) {
87  m_mapToHitsOnTrack[&recoTrack] = recoTrack.getSortedCDCHitList();
88  }
89  }
90  }
91 
92  // Loop over the CDC hits and find the closest track (if any) whose distance to the hit is smaller than the threshold.
93  // Only the hits with the BadADCOrTOTFlag are considered (these are hits rejected by the TFCDC_WireHitPreparer module).
94  for (CDCWireHit& wireHit : *m_CDCWireHits) {
95  if ((wireHit.getAutomatonCell().hasBadADCOrTOTFlag()) and
96  (wireHit.getHit()->getADCCount() >= m_minimumADC) and
97  (wireHit.getHit()->getTOT() >= m_minimumTOT)) {
98 
99  double currentMinimalDistance(m_maximumDistance);
100  RecoTrack* currentClosestTrack(nullptr);
101  ERightLeft currentRlInfo(ERightLeft::c_Unknown);
102 
103  for (RecoTrack& recoTrack : m_inputRecoTracks) {
104  if (m_mapToHitsOnTrack.find(&recoTrack) == m_mapToHitsOnTrack.end()) { // Track not considered
105  continue;
106  }
107 
108  bool neighborFound(false);
109  for (CDCHit* hitOnTrack : m_mapToHitsOnTrack[&recoTrack]) {
110 
111  if (neighborFound) {
112  continue;
113  }
114  // To be added, the hit off track needs to be a neighbor of at least one hit on track
115  if (wireHit.getWire().isPrimaryNeighborWith(*CDCWire::getInstance(*hitOnTrack))) {
116  neighborFound = true;
117  } else {
118  continue;
119  }
120 
121  const ReconstructionResults results(reconstruct(wireHit,
122  recoTrack,
123  recoTrack.getRecoHitInformation(hitOnTrack)));
124 
125  if (not results.isValid) {
126  continue;
127  }
128 
129  if (std::abs(results.distanceToTrack) < currentMinimalDistance) {
130 
131  currentMinimalDistance = std::abs(results.distanceToTrack);
132  currentClosestTrack = &recoTrack;
133  currentRlInfo = results.rlInfo;
134 
135  B2DEBUG(29, "Background hit close to the track found..." << std::endl
136  << "Layer of the hit on track: " << hitOnTrack->getICLayer() << std::endl
137  << "Layer of the background hit: " << wireHit.getHit()->getICLayer() << std::endl
138  << "ID of the background hit: " << wireHit.getHit()->getID() << std::endl
139  << "ADC of the background hit: " << wireHit.getHit()->getADCCount() << std::endl
140  << "TOT of the background hit: " << wireHit.getHit()->getTOT() << std::endl
141  << "Distance from track to hit: " << results.distanceToTrack << std::endl);
142  }
143  }
144  }
145 
146  if (currentMinimalDistance < m_maximumDistance) { // This hit needs to be added to a RecoTrack
147  HitToAddInfo hitToAddInfo;
148  hitToAddInfo.hit = &wireHit;
149  hitToAddInfo.rlInfo = currentRlInfo;
150  m_mapToHitsToAdd[currentClosestTrack].emplace_back(hitToAddInfo);
151  }
152  }
153  }
154 }
155 
156 
158 {
159 
160  for (RecoTrack& recoTrack : m_inputRecoTracks) {
161 
162  RecoTrack* newRecoTrack = recoTrack.copyToStoreArray(m_outputRecoTracks);
163 
164  if (m_mapToHitsToAdd.find(&recoTrack) == m_mapToHitsToAdd.end()) { // No hit to add
165 
166  newRecoTrack->addHitsFromRecoTrack(&recoTrack);
167 
168  } else { // At least one hit to add
169 
170  std::unordered_map<CDCWireHit*, double> previousArcLength;
171  std::unordered_map<CDCWireHit*, double> currentArcLength;
172  // Initialise the arc-length maps to zero and unset the taken and background flags.
173  for (HitToAddInfo& hitToAddInfo : m_mapToHitsToAdd[&recoTrack]) {
174  previousArcLength[hitToAddInfo.hit] = 0.0;
175  currentArcLength[hitToAddInfo.hit] = 0.0;
176  (hitToAddInfo.hit)->getAutomatonCell().setTakenFlag(false);
177  (hitToAddInfo.hit)->getAutomatonCell().setBackgroundFlag(false);
178  }
179 
180  unsigned int sortingParameter(0);
181  for (CDCHit* hitOnTrack : m_mapToHitsOnTrack[&recoTrack]) {
182  for (HitToAddInfo& hitToAddInfo : m_mapToHitsToAdd[&recoTrack]) {
183  CDCWireHit& hitToAdd = *(hitToAddInfo.hit);
184  if (not hitToAdd.getAutomatonCell().hasTakenFlag()) {
185 
186  const ReconstructionResults results(reconstruct(hitToAdd,
187  recoTrack,
188  recoTrack.getRecoHitInformation(hitOnTrack)));
189 
190  previousArcLength[&hitToAdd] = currentArcLength[&hitToAdd];
191  currentArcLength[&hitToAdd] = results.arcLength;
192 
193  B2DEBUG(29, "Hit to be added..." << std::endl
194  << "Layer of the hit on track: " << hitOnTrack->getICLayer() << std::endl
195  << "Layer of the background hit: " << hitToAdd.getHit()->getICLayer() << std::endl
196  << "ID of the background hit: " << hitToAdd.getHit()->getID() << std::endl
197  << "ADC of the background hit: " << hitToAdd.getHit()->getADCCount() << std::endl
198  << "TOT of the background hit: " << hitToAdd.getHit()->getTOT() << std::endl
199  << "Distance from track to hit: " << results.distanceToTrack << std::endl
200  << "Previous arc lenght of the hit: " << previousArcLength[&hitToAdd] << std::endl
201  << "Current arc lenght of the hit: " << currentArcLength[&hitToAdd] << std::endl);
202 
203  if ((previousArcLength[&hitToAdd] > 0) and (currentArcLength[&hitToAdd] < 0)) { // Hit needs to be added here.
204 
206  newRecoTrack->addCDCHit(hitToAdd.getHit(), sortingParameter, rl, RecoHitInformation::c_ReattachCDCWireHitsToRecoTracks);
207  hitToAdd.getAutomatonCell().setTakenFlag(true);
208  ++sortingParameter;
209 
210  }
211  }
212  }
213  const RecoHitInformation::RightLeftInformation rl = recoTrack.getRecoHitInformation(hitOnTrack)->getRightLeftInformation();
214  const RecoHitInformation::OriginTrackFinder foundBy = recoTrack.getRecoHitInformation(hitOnTrack)->getFoundByTrackFinder();
215  newRecoTrack->addCDCHit(hitOnTrack, sortingParameter, rl, foundBy);
216  //TODO: In the (rare) case where more than one hit are added between the same 2 hits on track, one should order them w.r.t. the arcLength.
217  ++sortingParameter;
218  }
219  }
220  }
221 }
222 
223 
225  const CDCWireHit& wireHit,
226  const RecoTrack& recoTrack, const RecoHitInformation* const recoHitInformation) const
227 {
228  ReconstructionResults results;
229 
230  try {
231 
232  const genfit::MeasuredStateOnPlane& mSoP(recoTrack.getMeasuredStateOnPlaneFromRecoHit(recoHitInformation));
233  const Vector3D trackPosition(mSoP.getPos());
234  const Vector3D trackMomentum(mSoP.getMom());
235  const CDCTrajectory3D trajectory(trackPosition, mSoP.getTime(), trackMomentum, mSoP.getCharge());
236 
237  const CDCTrajectory2D& trajectory2D(trajectory.getTrajectory2D());
238  const CDCTrajectorySZ& trajectorySZ(trajectory.getTrajectorySZ());
239 
240  Vector2D recoPos2D;
241  if (wireHit.isAxial()) {
242  recoPos2D = wireHit.reconstruct2D(trajectory2D);
243  } else {
244  const CDCWire& wire(wireHit.getWire());
245  const Vector2D& posOnXYPlane(wireHit.reconstruct2D(trajectory2D));
246 
247  const double arcLength(trajectory2D.calcArcLength2D(posOnXYPlane));
248  const double z(trajectorySZ.mapSToZ(arcLength));
249 
250  const Vector2D& wirePos2DAtZ(wire.getWirePos2DAtZ(z));
251 
252  const Vector2D& recoPosOnTrajectory(trajectory2D.getClosest(wirePos2DAtZ));
253  const double driftLength(wireHit.getRefDriftLength());
254  Vector2D disp2D(recoPosOnTrajectory - wirePos2DAtZ);
255  disp2D.normalizeTo(driftLength);
256  recoPos2D = wirePos2DAtZ + disp2D;
257  }
258 
259 
260  results.arcLength = trajectory2D.calcArcLength2D(recoPos2D);
261  results.z = trajectorySZ.mapSToZ(results.arcLength);
262  results.distanceToTrack = trajectory2D.getDist2D(recoPos2D);
263 
264  const Vector3D hitPosition(wireHit.getWire().getWirePos3DAtZ(trackPosition.z()));
265 
266  Vector3D trackPosToWire{hitPosition - trackPosition};
267  results.rlInfo = trackPosToWire.xy().isRightOrLeftOf(trackMomentum.xy());
268 
269  results.isValid = true;
270 
271  } catch (...) {
272  B2WARNING("Distance measurement does not work.");
273  results.isValid = false;
274  }
275 
276  return results;
277 }
278 
279 
281  ERightLeft rlInfo) const
282 {
283  using RightLeftInformation = RecoHitInformation::RightLeftInformation;
284  if (rlInfo == ERightLeft::c_Left) {
285  return RightLeftInformation::c_left;
286  } else if (rlInfo == ERightLeft::c_Right) {
287  return RightLeftInformation::c_right;
288  } else if (rlInfo == ERightLeft::c_Invalid) {
289  return RightLeftInformation::c_invalidRightLeftInformation;
290  } else {
291  return RightLeftInformation::c_undefinedRightLeftInformation;
292  }
293 }
Belle2::TrackFindingCDC::CDCWireHit::getAutomatonCell
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCWireHit.h:294
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_maximumDistance
double m_maximumDistance
Distance (cm) below which (exclusive) a CDC hit can be reattached to a track.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:103
Belle2::RecoTrack::registerRequiredRelations
static void registerRequiredRelations(StoreArray< RecoTrack > &recoTracks, std::string const &pxdHitsStoreArrayName="", std::string const &svdHitsStoreArrayName="", std::string const &cdcHitsStoreArrayName="", std::string const &bklmHitsStoreArrayName="", std::string const &eklmHitsStoreArrayName="", std::string const &recoHitInformationStoreArrayName="")
Convenience method which registers all relations required to fully use a RecoTrack.
Definition: RecoTrack.cc:42
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_inputRecoTracksStoreArrayName
std::string m_inputRecoTracksStoreArrayName
Name of the input RecoTrack StoreArray.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:99
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::ReconstructionResults
Internal structure to store the results of the reconstruction.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:59
Belle2::RecoTrack::addHitsFromRecoTrack
size_t addHitsFromRecoTrack(const RecoTrack *recoTrack, unsigned int sortingParameterOffset=0, bool reversed=false, boost::optional< double > optionalMinimalWeight=boost::none)
Add all hits from another RecoTrack to this RecoTrack.
Definition: RecoTrack.cc:230
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_outputRecoTracks
StoreArray< RecoTrack > m_outputRecoTracks
Output tracks.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:118
Belle2::TrackFindingCDC::CDCWire::getWirePos3DAtZ
Vector3D getWirePos3DAtZ(const double z) const
Gives position of the wire at the given z coordinate.
Definition: CDCWire.h:198
Belle2::TrackFindingCDC::Vector2D::normalizeTo
double normalizeTo(const double toLength)
Normalizes the vector to the given length.
Definition: Vector2D.h:327
Belle2::TrackFitter::fit
bool fit(RecoTrack &recoTrack, genfit::AbsTrackRep *trackRepresentation) const
Fit a reco track with a given non-default track representation.
Definition: TrackFitter.cc:109
Belle2::TrackFindingCDC::Vector2D
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:37
genfit::MeasuredStateOnPlane
#StateOnPlane with additional covariance matrix.
Definition: MeasuredStateOnPlane.h:39
Belle2::TrackFindingCDC::CDCWireHit::getRefDriftLength
double getRefDriftLength() const
Getter for the drift length at the reference position of the wire.
Definition: CDCWireHit.h:232
Belle2::CDCHit::getID
unsigned short getID() const
Getter for encoded wire number.
Definition: CDCHit.h:204
Belle2::RecoTrack::getMeasuredStateOnPlaneFromRecoHit
const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlaneFromRecoHit(const RecoHitInformation *recoHitInfo, const genfit::AbsTrackRep *representation=nullptr) const
Return genfit's MeasuredStateOnPlane on plane for associated with one RecoHitInformation.
Definition: RecoTrack.cc:554
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_maximumAbsD0
double m_maximumAbsD0
Only tracks with an absolute value of d0 below (exclusive) this parameter (cm) are considered.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:109
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::initialize
void initialize() override
Declare required StoreArray.
Definition: ReattachCDCWireHitsToRecoTracksModule.cc:54
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::CDCHit
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:51
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_minimumADC
int m_minimumADC
ADC above which (inclusive) a CDC hit can be reattached to a track.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:105
Belle2::TrackFindingCDC::AutomatonCell::setTakenFlag
void setTakenFlag(bool setTo=true)
Sets the taken flag to the given value. Default value true.
Definition: AutomatonCell.h:234
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule
Module to loop over low-ADC/TOT CDCWireHits and fitted RecoTracks, and reattach the hits to the track...
Definition: ReattachCDCWireHitsToRecoTracksModule.h:43
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_mapToHitsToAdd
std::unordered_map< RecoTrack *, std::vector< HitToAddInfo > > m_mapToHitsToAdd
Map from a RecoTrack ptr to the vector of the hits that need to be added to this track.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:123
Belle2::CDCHit::getICLayer
unsigned short getICLayer() const
Getter for iCLayer (0-55).
Definition: CDCHit.h:189
Belle2::TrackFindingCDC::CDCWireHit::getHit
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
Definition: CDCWireHit.h:167
Belle2::TrackFindingCDC::CDCTrajectorySZ
Linear trajectory in sz space.
Definition: CDCTrajectorySZ.h:41
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_CDCWireHitsStoreArrayName
std::string m_CDCWireHitsStoreArrayName
Name of the input CDCWireHit StoreWrappedObjPtr.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:97
Belle2::TrackFindingCDC::CDCTrajectory2D::getClosest
Vector2D getClosest(const Vector2D &point) const
Calculates the closest approach on the trajectory to the given point.
Definition: CDCTrajectory2D.cc:173
Belle2::RecoTrack::copyToStoreArray
RecoTrack * copyToStoreArray(StoreArray< RecoTrack > &storeArray) const
Append a new RecoTrack to the given store array and copy its general properties, but not the hits the...
Definition: RecoTrack.cc:506
Belle2::TrackFindingCDC::CDCTrajectory2D
Particle trajectory as it is seen in xy projection represented as a circle.
Definition: CDCTrajectory2D.h:46
Belle2::TrackFindingCDC::CDCWire::getWirePos2DAtZ
Vector2D getWirePos2DAtZ(const double z) const
Gives the xy projected position of the wire at the given z coordinate.
Definition: CDCWire.h:194
Belle2::CDCHit::getTOT
unsigned short getTOT() const
Getter for TOT.
Definition: CDCHit.h:259
Belle2::TrackFindingCDC::CDCTrajectorySZ::mapSToZ
double mapSToZ(const double s=0) const
Translates the travel distance to the z coordinate.
Definition: CDCTrajectorySZ.h:65
Belle2::CDCHit::getADCCount
unsigned short getADCCount() const
Getter for integrated charge.
Definition: CDCHit.h:241
Belle2::RecoTrack::addCDCHit
bool addCDCHit(const UsedCDCHit *cdcHit, const unsigned int sortingParameter, RightLeftInformation rightLeftInformation=RightLeftInformation::c_undefinedRightLeftInformation, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
Adds a cdc hit with the given information to the reco track.
Definition: RecoTrack.h:240
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::RecoHitInformation::OriginTrackFinder
OriginTrackFinder
The TrackFinder which has added the hit to the track.
Definition: RecoHitInformation.h:80
Belle2::TrackFitter
Algorithm class to handle the fitting of RecoTrack objects.
Definition: TrackFitter.h:116
Belle2::RecoTrack
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:78
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::reconstruct
ReconstructionResults reconstruct(const CDCWireHit &wireHit, const RecoTrack &recoTrack, const RecoHitInformation *recoHitInformation) const
Compute distance from a CDCWireHit to a RecoTrack using the mSoP found with a RecoHitInformation.
Definition: ReattachCDCWireHitsToRecoTracksModule.cc:224
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_inputRecoTracks
StoreArray< RecoTrack > m_inputRecoTracks
Input tracks.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:116
Belle2::TrackFindingCDC::CDCTrajectory3D::getTrajectory2D
CDCTrajectory2D getTrajectory2D() const
Getter for the two dimensional trajectory.
Definition: CDCTrajectory3D.cc:336
Belle2::TrackFindingCDC::CDCTrajectory3D::getTrajectorySZ
CDCTrajectorySZ getTrajectorySZ() const
Getter for the sz trajectory.
Definition: CDCTrajectory3D.cc:343
Belle2::TrackFindingCDC::CDCTrajectorySZ::getZ0
double getZ0() const
Getter for the z coordinate at zero travel distance.
Definition: CDCTrajectorySZ.h:118
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::event
void event() override
Event processing, combine store array.
Definition: ReattachCDCWireHitsToRecoTracksModule.cc:63
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_mapToHitsOnTrack
std::unordered_map< RecoTrack *, std::vector< CDCHit * > > m_mapToHitsOnTrack
Map from a RecoTrack ptr to the vector of the hits that belong to this track.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:121
Belle2::TrackFindingCDC::Vector3D
A three dimensional vector.
Definition: Vector3D.h:34
Belle2::TrackFindingCDC::CDCWire::getInstance
static const CDCWire * getInstance(const WireID &wireID)
Getter from the wireID convinience object. Does not construct a new object.
Definition: CDCWire.cc:26
Belle2::TrackFindingCDC::NRightLeft::ERightLeft
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Definition: ERightLeft.h:35
Belle2::RecoHitInformation
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
Definition: RecoHitInformation.h:48
Belle2::TrackFindingCDC::AutomatonCell::hasTakenFlag
bool hasTakenFlag() const
Gets the current state of the taken marker flag.
Definition: AutomatonCell.h:249
Belle2::TrackFindingCDC::Vector3D::xy
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
Definition: Vector3D.h:500
Belle2::TrackFindingCDC::CDCWireHit::getWire
const CDCWire & getWire() const
Getter for the CDCWire the hit is located on.
Definition: CDCWireHit.h:176
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::HitToAddInfo
Internal structure to store the information about a hit to be added.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:73
Belle2::TrackFindingCDC::CDCWire
Class representing a sense wire in the central drift chamber.
Definition: CDCWire.h:60
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::addHits
void addHits()
Add the selected CDC hits to the RecoTracks.
Definition: ReattachCDCWireHitsToRecoTracksModule.cc:157
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::rightLeftInformationTranslator
RecoHitInformation::RightLeftInformation rightLeftInformationTranslator(ERightLeft rlInfo) const
Translate a TrackFindingCDC::ERightLeft into a RecoHitInformation::RightLeftInformation.
Definition: ReattachCDCWireHitsToRecoTracksModule.cc:280
Belle2::TrackFindingCDC::CDCTrajectory2D::getDist2D
double getDist2D(const Vector2D &point) const
Calculates the distance from the point to the trajectory as seen from the xy projection.
Definition: CDCTrajectory2D.h:419
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::HitToAddInfo::hit
CDCWireHit * hit
Pointer the hit to be added.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:75
Belle2::TrackFindingCDC::Vector3D::z
double z() const
Getter for the z coordinate.
Definition: Vector3D.h:488
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_outputRecoTracksStoreArrayName
std::string m_outputRecoTracksStoreArrayName
Name of the output RecoTrack StoreArray.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:101
Belle2::TrackFindingCDC::CDCWireHit
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:65
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_maximumAbsZ0
double m_maximumAbsZ0
Only tracks with an absolute value of z0 below (exclusive) this parameter (cm) are considered.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:111
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::findHits
void findHits()
Find the hits that can be added to the RecoTracks.
Definition: ReattachCDCWireHitsToRecoTracksModule.cc:71
Belle2::RecoHitInformation::RightLeftInformation
RightLeftInformation
The RightLeft information of the hit which is only valid for CDC hits.
Definition: RecoHitInformation.h:72
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_minimumTOT
int m_minimumTOT
TOT above which (inclusive) a CDC hit can be reattached to a track.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:107
Belle2::TrackFindingCDC::CDCWireHit::reconstruct2D
Vector2D reconstruct2D(const CDCTrajectory2D &trajectory2D) const
Reconstructs a position of primary ionisation on the drift circle.
Definition: CDCWireHit.cc:168
Belle2::TrackFindingCDC::CDCTrajectory2D::calcArcLength2D
double calcArcLength2D(const Vector2D &point) const
Calculate the travel distance from the start position of the trajectory.
Definition: CDCTrajectory2D.h:270
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::HitToAddInfo::rlInfo
ERightLeft rlInfo
Right-left information of the hit.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:77
Belle2::TrackFindingCDC::CDCTrajectory3D
Particle full three dimensional trajectory.
Definition: CDCTrajectory3D.h:47
Belle2::TrackFindingCDC::CDCWireHit::isAxial
bool isAxial() const
Indicator if the underlying wire is axial.
Definition: CDCWireHit.h:205
Belle2::TrackFindingCDC::ReattachCDCWireHitsToRecoTracksModule::m_CDCWireHits
StoreWrappedObjPtr< std::vector< CDCWireHit > > m_CDCWireHits
Input CDCWireHits.
Definition: ReattachCDCWireHitsToRecoTracksModule.h:114