HerdSoftware  0.4.0
Public Member Functions | Private Attributes | List of all members
Herd::TracksDistanceSorterAlgo Class Reference

Algorithm that sort tracks according to their proximity to the CALO axis. More...

#include <TracksDistanceSorterAlgo.h>

Inheritance diagram for Herd::TracksDistanceSorterAlgo:

Public Member Functions

 TracksDistanceSorterAlgo (const std::string &name)
 Constructor. More...
 
bool Initialize () override
 Initializes the algo. More...
 
bool Process () override
 Processes an event. More...
 
bool Finalize () override
 Finalizes the algo. More...
 

Private Attributes

std::string m_axisType
 
float m_maxDistance
 
bool m_controlPlots
 
std::vector< float > m_meanDistPlotsBins
 
std::shared_ptr< TH1I > m_meanDistXZ
 
std::shared_ptr< TH1I > m_meanDistYZ
 
std::shared_ptr< TH1I > m_meanDistXY
 
std::shared_ptr< TH2I > m_meanDistSctXZ
 
std::shared_ptr< TH2I > m_meanDistSctYZ
 
std::shared_ptr< TH2I > m_meanDistSctXY
 
EA::StorePtr m_evStore
 
EA::StorePtr m_globStore
 

Detailed Description

Algorithm that sort tracks according to their proximity to the CALO axis.

This algorithm sorts the tracks found by the Hough finder according to the proximity to the CALO axis. The absolute values of the track-axis distance are evaluated in each projection on a set of reference layers, and their mean is used to classify and order the tracks, the nearest ones being placed at the beginning of the tracks arrays.

The algorithm can optionally eliminate the tracks lying too far from the CALO axis: by setting the maxDistance parameter to a value greater than 0, the tracks whose mean distance from the axis on the reference layers is greater than maxDistance will be removed from the tracks vector.

By setting the controlPlots parameter to true the algorithm will also produce some control plots.

Needed event objects:

name type store optional description
HoughTracks Track2DColl evStore No The Hough tracks.
caloAxes Tracks evStore No The CALO axes.
mcTruth MCTruth evStore Yes The MC truth

Needed global objects: name | type | store | optional | description -----------------------—|-----------------—|----------—|-------—|----------------------—

Modified event objects:

name type alias store description
tracks2DColl Track2DColl evStore Tracks will be sorted and eventually eliminated according to their proximity to the CALO axis.

Produced global objects:

name type alias store description
<algoName>_meanDist_{XZ,YZ,XY} TH1I evStore Control plots with mean axis-track absolute distances on the three views.
<algoName>_meanDistSct_{XZ,YZ,XY} TH2I evStore Scatter plots with mean (axis-track vs mctrack-track) absolute distances on the three views.

Parameters:

name type default value description
mainAxisType std::string "caloaxis" "caloaxis" or "mctruth"
maxDistance float 0. The maximum allowed track-axis distance (cm).
controlPlots bool false If set to true then control plots will be produced.
meanDistPlotsBins std::vector<float> {100, 0., 5} Bins for the mean absolute distance control plots {nBins, minDist (cm), maxDist (cm)}.

Constructor & Destructor Documentation

◆ TracksDistanceSorterAlgo()

Herd::TracksDistanceSorterAlgo::TracksDistanceSorterAlgo ( const std::string &  name)

Constructor.

Parameters
nameThe name of the algorithm object.

Member Function Documentation

◆ Finalize()

bool Herd::TracksDistanceSorterAlgo::Finalize ( )
override

Finalizes the algo.

Returns
true if no error occurs during finalization, false otherwise.

◆ Initialize()

bool Herd::TracksDistanceSorterAlgo::Initialize ( )
override

Initializes the algo.

Returns
true if initialization is done without errors, false otherwise.

◆ Process()

bool Herd::TracksDistanceSorterAlgo::Process ( )
override

Processes an event.

Returns
true if no error occurs during processing, false otherwise.

Member Data Documentation

◆ m_axisType

std::string Herd::TracksDistanceSorterAlgo::m_axisType
private

◆ m_controlPlots

bool Herd::TracksDistanceSorterAlgo::m_controlPlots
private

◆ m_evStore

EA::StorePtr Herd::TracksDistanceSorterAlgo::m_evStore
private

◆ m_globStore

EA::StorePtr Herd::TracksDistanceSorterAlgo::m_globStore
private

◆ m_maxDistance

float Herd::TracksDistanceSorterAlgo::m_maxDistance
private

◆ m_meanDistPlotsBins

std::vector<float> Herd::TracksDistanceSorterAlgo::m_meanDistPlotsBins
private

◆ m_meanDistSctXY

std::shared_ptr<TH2I> Herd::TracksDistanceSorterAlgo::m_meanDistSctXY
private

◆ m_meanDistSctXZ

std::shared_ptr<TH2I> Herd::TracksDistanceSorterAlgo::m_meanDistSctXZ
private

◆ m_meanDistSctYZ

std::shared_ptr<TH2I> Herd::TracksDistanceSorterAlgo::m_meanDistSctYZ
private

◆ m_meanDistXY

std::shared_ptr<TH1I> Herd::TracksDistanceSorterAlgo::m_meanDistXY
private

◆ m_meanDistXZ

std::shared_ptr<TH1I> Herd::TracksDistanceSorterAlgo::m_meanDistXZ
private

◆ m_meanDistYZ

std::shared_ptr<TH1I> Herd::TracksDistanceSorterAlgo::m_meanDistYZ
private

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