Belle II Software development
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 TrackingUtilities::CDCWireHit * > &foundAxialWireHits, const std::vector< const TrackingUtilities::CDCWireHit * > &allAxialWireHits, std::vector< TrackingUtilities::CDCTrack > &axialTracks, bool fromOrigin=true, bool straight=true, bool withPostprocessing=true)
 Create CDCTrack using CDCWireHit hits and store it in the list.
 
static bool postprocessTrack (TrackingUtilities::CDCTrack &track, const std::vector< const TrackingUtilities::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 26 of file LowHitsAxialTrackUtil.h.

Member Function Documentation

◆ addCandidateFromHits()

void addCandidateFromHits ( const std::vector< const TrackingUtilities::CDCWireHit * > & foundAxialWireHits,
const std::vector< const TrackingUtilities::CDCWireHit * > & allAxialWireHits,
std::vector< TrackingUtilities::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 21 of file LowHitsAxialTrackUtil.cc.

27{
28 if (foundAxialWireHits.empty()) return;
29
30 // New track
31 CDCTrack track;
32
33 // Fit trajectory
34 const CDCRiemannFitter& fitter = CDCRiemannFitter::getFitter(fromOrigin, straight);
35 CDCTrajectory2D trajectory2D = fitter.fit(foundAxialWireHits);
36 track.setStartTrajectory3D(CDCTrajectory3D(trajectory2D, CDCTrajectorySZ::basicAssumption()));
37
38 // Reconstruct and add hits
39 for (const CDCWireHit* wireHit : foundAxialWireHits) {
40 AutomatonCell& automatonCell = wireHit->getAutomatonCell();
41 if (automatonCell.hasTakenFlag()) continue;
42 CDCRecoHit3D recoHit3D = CDCRecoHit3D::reconstructNearest(wireHit, trajectory2D);
43 track.push_back(std::move(recoHit3D));
44
45 automatonCell.setTakenFlag(true);
46 }
47 track.sortByArcLength2D();
48
49 // Change everything again in the postprocessing, if desired
50 bool success = withPostprocessing ? postprocessTrack(track, allAxialWireHits) : true;
51 if (success) {
53 for (const CDCRecoHit3D& recoHit3D : track) {
54 recoHit3D.getWireHit().getAutomatonCell().setTakenFlag(true);
55 }
56 axialTracks.emplace_back(std::move(track));
57 } else {
59 for (const CDCRecoHit3D& recoHit3D : track) {
60 recoHit3D.getWireHit().getAutomatonCell().setMaskedFlag(true);
61 recoHit3D.getWireHit().getAutomatonCell().setTakenFlag(false);
62 }
63 }
64}
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
void setTakenFlag(bool setTo=true)
Sets the taken flag to the given value. Default value true.
void setMaskedFlag(bool setTo=true)
Sets the masked flag to the given value. Default value true.
bool hasTakenFlag() const
Gets the current state of the taken marker flag.
const CDCWireHit & getWireHit() const
Getter for the wire hit.
static CDCRecoHit3D reconstructNearest(const CDCWireHit *axialWireHit, const CDCTrajectory2D &trajectory2D)
Reconstruct a three dimensional hit from a wire hit (as in reconstruct(rlWireHit, trajectory2D)),...
static CDCTrajectorySZ basicAssumption()
Constructs a basic assumption, what the z0 start position and the sz slope are, including some broad ...
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition CDCWireHit.h:289
static bool postprocessTrack(TrackingUtilities::CDCTrack &track, const std::vector< const TrackingUtilities::CDCWireHit * > &allAxialWireHits)
Perform all track postprocessing - return whether the track is considered good after the postprocessi...

◆ postprocessTrack()

bool postprocessTrack ( TrackingUtilities::CDCTrack & track,
const std::vector< const TrackingUtilities::CDCWireHit * > & allAxialWireHits )
static

Perform all track postprocessing - return whether the track is considered good after the postprocessing.

Definition at line 66 of file LowHitsAxialTrackUtil.cc.

68{
69 // No postprocessing yet
70 return true;
71}

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