HerdSoftware  0.3.2
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 _axisType
 
float _maxDistance
 
bool _controlPlots
 
std::vector< float > _meanDistPlotsBins
 
std::shared_ptr< TH1I > _meanDistXZ
 
std::shared_ptr< TH1I > _meanDistYZ
 
std::shared_ptr< TH1I > _meanDistXY
 
std::shared_ptr< TH2I > _meanDistSctXZ
 
std::shared_ptr< TH2I > _meanDistSctYZ
 
std::shared_ptr< TH2I > _meanDistSctXY
 
StorePtr _evStore
 
StorePtr _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

◆ _axisType

std::string Herd::TracksDistanceSorterAlgo::_axisType
private

◆ _controlPlots

bool Herd::TracksDistanceSorterAlgo::_controlPlots
private

◆ _evStore

StorePtr Herd::TracksDistanceSorterAlgo::_evStore
private

◆ _globStore

StorePtr Herd::TracksDistanceSorterAlgo::_globStore
private

◆ _maxDistance

float Herd::TracksDistanceSorterAlgo::_maxDistance
private

◆ _meanDistPlotsBins

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

◆ _meanDistSctXY

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

◆ _meanDistSctXZ

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

◆ _meanDistSctYZ

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

◆ _meanDistXY

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

◆ _meanDistXZ

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

◆ _meanDistYZ

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

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