Belle II Software  release-05-02-19
LowHitsAxialTrackUtil Struct Reference

Utility structure gathering heuristic functions used during the search for non-helix or low hit count tracks. More...

#include <LowHitsAxialTrackUtil.h>

Static Public Member Functions

static void addCandidateFromHits (const std::vector< const CDCWireHit * > &foundAxialWireHits, const std::vector< const CDCWireHit * > &allAxialWireHits, std::vector< CDCTrack > &axialTracks, bool fromOrigin=true, bool straight=true, bool withPostprocessing=true)
 Create CDCTrack using CDCWireHit hits and store it in the list. More...
 
static bool postprocessTrack (CDCTrack &track, const std::vector< const CDCWireHit * > &allAxialWireHits)
 Perform all track postprocessing - return whether the track is considered good after the postprocessing.
 

Detailed Description

Utility structure gathering heuristic functions used during the search for non-helix or low hit count tracks.

Definition at line 34 of file LowHitsAxialTrackUtil.h.

Member Function Documentation

◆ addCandidateFromHits()

void addCandidateFromHits ( const std::vector< const CDCWireHit * > &  foundAxialWireHits,
const std::vector< const CDCWireHit * > &  allAxialWireHits,
std::vector< CDCTrack > &  axialTracks,
bool  fromOrigin = true,
bool  straight = true,
bool  withPostprocessing = true 
)
static

Create CDCTrack using CDCWireHit hits and store it in the list.

Then call the postprocessing on it if need be. Uses extra assumptions like track coming from origin

Mark hits as taken and add the new track to the track list

Masked bad hits

Definition at line 22 of file LowHitsAxialTrackUtil.cc.

28 {
29  if (foundAxialWireHits.empty()) return;
30 
31  // New track
32  CDCTrack track;
33 
34  // Fit trajectory
35  const CDCRiemannFitter& fitter = CDCRiemannFitter::getFitter(fromOrigin, straight);
36  CDCTrajectory2D trajectory2D = fitter.fit(foundAxialWireHits);
37  track.setStartTrajectory3D(CDCTrajectory3D(trajectory2D, CDCTrajectorySZ::basicAssumption()));
38 
39  // Reconstruct and add hits
40  for (const CDCWireHit* wireHit : foundAxialWireHits) {
41  AutomatonCell& automatonCell = wireHit->getAutomatonCell();
42  if (automatonCell.hasTakenFlag()) continue;
43  CDCRecoHit3D recoHit3D = CDCRecoHit3D::reconstructNearest(wireHit, trajectory2D);
44  track.push_back(std::move(recoHit3D));
45 
46  automatonCell.setTakenFlag(true);
47  }
48  track.sortByArcLength2D();
49 
50  // Change everything again in the postprocessing, if desired
51  bool success = withPostprocessing ? postprocessTrack(track, allAxialWireHits) : true;
52  if (success) {
54  for (const CDCRecoHit3D& recoHit3D : track) {
55  recoHit3D.getWireHit().getAutomatonCell().setTakenFlag(true);
56  }
57  axialTracks.emplace_back(std::move(track));
58  } else {
60  for (const CDCRecoHit3D& recoHit3D : track) {
61  recoHit3D.getWireHit().getAutomatonCell().setMaskedFlag(true);
62  recoHit3D.getWireHit().getAutomatonCell().setTakenFlag(false);
63  }
64  }
65 }

The documentation for this struct was generated from the following files:
Belle2::TrackFindingCDC::CDCTrajectorySZ::basicAssumption
static CDCTrajectorySZ basicAssumption()
Constucts a basic assumption, what the z0 start position and the sz slope are, including some broad v...
Definition: CDCTrajectorySZ.cc:29
Belle2::TrackFindingCDC::LowHitsAxialTrackUtil::postprocessTrack
static bool postprocessTrack(CDCTrack &track, const std::vector< const CDCWireHit * > &allAxialWireHits)
Perform all track postprocessing - return whether the track is considered good after the postprocessi...
Definition: LowHitsAxialTrackUtil.cc:67
Belle2::TrackFindingCDC::CDCRecoHit3D::reconstructNearest
static CDCRecoHit3D reconstructNearest(const CDCWireHit *axialWireHit, const CDCTrajectory2D &trajectory2D)
Reconstruct a three dimensional hit from a wire hit (as in reconstruct(rlWireHit, trajectory2D)),...
Definition: CDCRecoHit3D.cc:132
Belle2::TrackFindingCDC::CDCRiemannFitter::getFitter
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
Definition: CDCRiemannFitter.cc:22
Belle2::TrackFindingCDC::CDCWireHit
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:65