Belle II Software  release-05-02-19
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 35 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 118 of file TrackQualityTools.cc.

119 {
120  const CDCTrajectory2D& trajectory2D = track.getStartTrajectory3D().getTrajectory2D();
121  const double radius = trajectory2D.getLocalCircle()->absRadius();
122 
123  // Curler are allowed to have hits on both arms
124  if (trajectory2D.isCurler(outerCylindricalRFactor)) {
125  return;
126  }
127 
128  const Vector2D& outerExitWithFactor = trajectory2D.getOuterExit(outerCylindricalRFactor);
129 
130  double arcLength2DOfExitWithFactor = trajectory2D.calcArcLength2D(outerExitWithFactor);
131  if (arcLength2DOfExitWithFactor < 0) {
132  arcLength2DOfExitWithFactor += 2 * TMath::Pi() * radius;
133  }
134  bool removeAfterThis = false;
135 
136  for (const CDCRecoHit3D& recoHit : track) {
137  if (removeAfterThis) {
138  recoHit.getWireHit().getAutomatonCell().setAssignedFlag();
139  continue;
140  }
141 
142  double currentArcLength2D = recoHit.getArcLength2D();
143  if (currentArcLength2D < 0) {
144  currentArcLength2D += 2 * TMath::Pi() * radius;
145  }
146 
147  if (currentArcLength2D > arcLength2DOfExitWithFactor) {
148  recoHit.getWireHit().getAutomatonCell().setAssignedFlag();
149  removeAfterThis = true;
150  }
151  }
152 }

◆ 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 198 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 154 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 27 of file TrackQualityTools.cc.


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