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 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.
 
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 24 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 20 of file LowHitsAxialTrackUtil.cc.

26{
27 if (foundAxialWireHits.empty()) return;
28
29 // New track
30 CDCTrack track;
31
32 // Fit trajectory
33 const CDCRiemannFitter& fitter = CDCRiemannFitter::getFitter(fromOrigin, straight);
34 CDCTrajectory2D trajectory2D = fitter.fit(foundAxialWireHits);
35 track.setStartTrajectory3D(CDCTrajectory3D(trajectory2D, CDCTrajectorySZ::basicAssumption()));
36
37 // Reconstruct and add hits
38 for (const CDCWireHit* wireHit : foundAxialWireHits) {
39 AutomatonCell& automatonCell = wireHit->getAutomatonCell();
40 if (automatonCell.hasTakenFlag()) continue;
41 CDCRecoHit3D recoHit3D = CDCRecoHit3D::reconstructNearest(wireHit, trajectory2D);
42 track.push_back(std::move(recoHit3D));
43
44 automatonCell.setTakenFlag(true);
45 }
46 track.sortByArcLength2D();
47
48 // Change everything again in the postprocessing, if desired
49 bool success = withPostprocessing ? postprocessTrack(track, allAxialWireHits) : true;
50 if (success) {
52 for (const CDCRecoHit3D& recoHit3D : track) {
53 recoHit3D.getWireHit().getAutomatonCell().setTakenFlag(true);
54 }
55 axialTracks.emplace_back(std::move(track));
56 } else {
58 for (const CDCRecoHit3D& recoHit3D : track) {
59 recoHit3D.getWireHit().getAutomatonCell().setMaskedFlag(true);
60 recoHit3D.getWireHit().getAutomatonCell().setTakenFlag(false);
61 }
62 }
63}
Cell used by the cellular automata.
Definition: AutomatonCell.h:29
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.
Class representing a three dimensional reconstructed hit.
Definition: CDCRecoHit3D.h:52
const CDCWireHit & getWireHit() const
Getter for the wire hit.
Definition: CDCRecoHit3D.h:238
static CDCRecoHit3D reconstructNearest(const CDCWireHit *axialWireHit, const CDCTrajectory2D &trajectory2D)
Reconstruct a three dimensional hit from a wire hit (as in reconstruct(rlWireHit, trajectory2D)),...
Class implementing the Riemann fit for two dimensional trajectory circle.
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
Class representing a sequence of three dimensional reconstructed hits.
Definition: CDCTrack.h:41
Particle trajectory as it is seen in xy projection represented as a circle.
Particle full three dimensional trajectory.
static CDCTrajectorySZ basicAssumption()
Constucts a basic assumption, what the z0 start position and the sz slope are, including some broad v...
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCWireHit.h:286
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...

◆ postprocessTrack()

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

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

Definition at line 65 of file LowHitsAxialTrackUtil.cc.

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

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