Belle II Software  release-08-01-10
TrackQualityTools Class Reference

Tools to apply post corrections to a track after finding. More...

#include <TrackQualityTools.h>

Public Member Functions

 TrackQualityTools ()=delete
 Static class only.
 
 TrackQualityTools (const TrackQualityTools &copy)=delete
 Static class only.
 
TrackQualityToolsoperator= (const TrackQualityTools &)=delete
 Static class only.
 

Static Public Member Functions

static void normalizeHitsAndResetTrajectory (CDCTrack &track)
 Update all hits to have a positive perpS, a taken flag and no background flag Also set the trajectory to start from the first hit position and point towards the second hit.
 
static void removeHitsAfterCDCWall (CDCTrack &track, double outerCylindricalRFactor=1.1)
 Remove all hits which can not belong to the track, as the particle can not exit and enter the CDC again. More...
 
static void removeHitsIfSmall (CDCTrack &track, unsigned int minimalHits=7)
 Delete a track fully of the number of hits is below minimalHits.
 
static void removeHitsAfterLayerBreak (CDCTrack &track, double m_maximumArcLength2DDistance=10)
 Delete all hits after a large layer break. More...
 
static void removeHitsAfterLayerBreak2 (CDCTrack &track)
 Delete all hits after a large layer break. More...
 
static void removeHitsInTheBeginningIfAngleLarge (CDCTrack &track, double maximalAngle=0.7)
 If the angle between two following hits is larger than maximalAngle, delete all hits before (!!) the second hit.
 
static void removeHitsIfOnlyOneSuperLayer (CDCTrack &track)
 Remove the whole track if it only consists of one superlayer.
 
static void removeHitsOnTheWrongSide (CDCTrack &track)
 Remove all hits that are on the wrong side of the detector (so to say: "beyond the IP").
 
static void removeArcLength2DHoles (CDCTrack &track, double m_maximumArcLength2DDistance=10)
 Remove all hits that come after a large hole in the two dimensional arc length.
 
static void splitSecondHalfOfTrack (CDCTrack &track, std::vector< CDCTrack > &tracks)
 Trasan did output curlers in split two halves - this method can be used to mimic this. More...
 
static void moveToNextAxialLayer (CDCTrack &track)
 Delete hits of the first superlayer if it is a stereo one (fitting does not work very well when starting with a stereo hit).
 

Detailed Description

Tools to apply post corrections to a track after finding.

"Removing" of hits means always to mark then as assigned. The deletion has to be done later.

Definition at line 25 of file TrackQualityTools.h.

Member Function Documentation

◆ removeHitsAfterCDCWall()

void removeHitsAfterCDCWall ( CDCTrack track,
double  outerCylindricalRFactor = 1.1 
)
static

Remove all hits which can not belong to the track, as the particle can not exit and enter the CDC again.

The radius of the CDC can be "scaled" with the given factor. Works not very good.

Definition at line 125 of file TrackQualityTools.cc.

126 {
127  const CDCTrajectory2D& trajectory2D = track.getStartTrajectory3D().getTrajectory2D();
128  const double radius = trajectory2D.getLocalCircle()->absRadius();
129 
130  // Curler are allowed to have hits on both arms
131  if (trajectory2D.isCurler(outerCylindricalRFactor)) {
132  return;
133  }
134 
135  const Vector2D& outerExitWithFactor = trajectory2D.getOuterExit(outerCylindricalRFactor);
136 
137  double arcLength2DOfExitWithFactor = trajectory2D.calcArcLength2D(outerExitWithFactor);
138  if (arcLength2DOfExitWithFactor < 0) {
139  arcLength2DOfExitWithFactor += 2 * TMath::Pi() * radius;
140  }
141  bool removeAfterThis = false;
142 
143  for (const CDCRecoHit3D& recoHit : track) {
144  if (removeAfterThis) {
145  recoHit.getWireHit().getAutomatonCell().setAssignedFlag();
146  continue;
147  }
148 
149  double currentArcLength2D = recoHit.getArcLength2D();
150  if (currentArcLength2D < 0) {
151  currentArcLength2D += 2 * TMath::Pi() * radius;
152  }
153 
154  if (currentArcLength2D > arcLength2DOfExitWithFactor) {
155  recoHit.getWireHit().getAutomatonCell().setAssignedFlag();
156  removeAfterThis = true;
157  }
158  }
159 }
Class representing a three dimensional reconstructed hit.
Definition: CDCRecoHit3D.h:52
Particle trajectory as it is seen in xy projection represented as a circle.
Vector2D getOuterExit(double factor=1) const
Calculates the point where the trajectory meets the outer wall of the CDC.
double calcArcLength2D(const Vector2D &point) const
Calculate the travel distance from the start position of the trajectory.
bool isCurler(double factor=1) const
Checks if the trajectory leaves the outer radius of the CDC times the given tolerance factor.
const UncertainPerigeeCircle & getLocalCircle() const
Getter for the cirlce in local coordinates.
double absRadius() const
Gives the signed radius of the circle. If it was a line this will be infinity.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:35

◆ removeHitsAfterLayerBreak()

void removeHitsAfterLayerBreak ( CDCTrack track,
double  m_maximumArcLength2DDistance = 10 
)
static

Delete all hits after a large layer break.

Works quite well for finding large "breaks" in the track. Implementation one (it is not sure which one is better in the moment.)

Definition at line 205 of file TrackQualityTools.cc.

◆ removeHitsAfterLayerBreak2()

void removeHitsAfterLayerBreak2 ( CDCTrack track)
static

Delete all hits after a large layer break.

Works quite well for finding large "breaks" in the track. Implementation two (it is not sure which one is better in the moment.)

Definition at line 161 of file TrackQualityTools.cc.

◆ splitSecondHalfOfTrack()

void splitSecondHalfOfTrack ( CDCTrack track,
std::vector< CDCTrack > &  tracks 
)
static

Trasan did output curlers in split two halves - this method can be used to mimic this.

The new track is automatically added to the list of tracks.

Definition at line 34 of file TrackQualityTools.cc.


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