HerdSoftware  0.3.2
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Herd::FarHitsRemoverAlgo Class Reference

Algorithm that removes all hits lying far away from a given track. More...

#include <FarHitsRemoverAlgo.h>

Inheritance diagram for Herd::FarHitsRemoverAlgo:

Public Member Functions

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

Private Types

enum  EntranceRecoMethod { EntranceRecoMethod::NONE, EntranceRecoMethod::MC, EntranceRecoMethod::CALO }
 
using Hits = std::vector< Hit >
 

Private Member Functions

void FilterHits (const Hits &origHits, Hits &nearHits, const ScdGeoParams &geoParams, const Line &trajectory)
 
void FilterHits (const Hits &origHits, Hits &nearHits, const FitGeoParams &geoParams, const Line &trajectory)
 

Private Attributes

bool _processFit = false
 
bool _processScd = false
 
float _maxDistance = 5.0f
 
std::string _trackType {"calo"}
 
std::string _entranceSideReco {"calo"}
 
std::string _fitHitsCollName {"fitHitsCollADC"}
 
std::string _fitGeoParCollName {"fitDigitizedGeoParamsColl"}
 
std::string _fitNearHitsAlias {"fitHitsCollADC"}
 
std::string _scdHitsCollName {"scdHitsCollMC"}
 
std::string _scdGeoParCollName {"scdGeoParamsColl"}
 
std::string _scdNearHitsAlias {"scdHitsCollMC"}
 
StorePtr _evStore
 
StorePtr _globStore
 
Herd::FitHitsColl _fitNearHits
 
Herd::ScdHitsColl _scdNearHits
 
bool _useMCTrack {true}
 
EntranceRecoMethod _entranceRecoMethod {EntranceRecoMethod::NONE}
 

Detailed Description

Algorithm that removes all hits lying far away from a given track.

For each detector this algorithm creates hits collection containing only hits that lie within a given distance from a track. By default, the algorithm operates on ADC FIT hits and or MC SCD hits; it is possible to specify a different set of hits by means of algorithm parameters. Also the detectors geometry parameters can be specified in order to be consistent with the hits collection. The track can be currently specified as the "true" primary track from MC truth or as the CALO track by means of the trackType parameter. If an entrance-side-reconstruction criterion is specified by means of the entranceSideReco parameter then all the hits on the particle exit side will be removed, regardless of their distance from the track. Setting entranceSideReco to "mc" will make the algorithm use the MC generation point to determine the entrance side, while setting it to "calo" the reconstructed CALO shower will be used. Setting it to "none" will disable the feature. If no CALO axis is present and if "calo" is used for track type and/or entrance side reconstruction then the output event object with the near hits sill not be provided. The processed hits are published in the event data store with a name built by appending the "_nearToTrack" suffix to the name of the input hits collection; the alias for the provided near hits as specified by the nearHitsAlias parameter will also be set.

Needed event objects:

name type store optional description
<fitHitsColl> FitHitsColl evStore Yes The name of the FIT hits collection to be processed.
<scdHitsColl> ScdHitsColl evStore Yes The name of the SCD hits collection to be processed.
mcTruth MCTruth evStore Yes The MC truth.
caloAxes Tracks evStore Yes The CALO axes.

Needed global objects:

name type store optional description
<fitGeoParColl> FitGeoParamsColl globStore Yes The FIT geometry parameters.
<scdGeoParColl> ScdGeoParamsColl globStore Yes The SCD geometry parameters.

Provided event objects:

name type alias store description
<fitHitsColl>_nearToTrack FitHitsColl <fitNearHitsAlias> evStore Collection of FIT hits lying near to the track (only if at least one CaloAxis is present)
<scdHitsColl>_nearToTrack ScdHitsColl <scdNearHitsAlias> evStore Collection of SCD hits lying near to the track (only if at least one CaloAxis is present)

Parameters:

name type default value description
trackType std::string "calo" The particle track (possible values: "mc", "calo")
entranceSideReco std::sting "calo" The reconstruction method for the entrance side (possible values: "mc", "calo", "none")
maxDistance float 5 Maximum distance (in cm) from hit to track.
processFit bool false Set this to process FIT hits.
processScd bool false Set this to process SCD hits.
fitHitsColl std::string "fitHitsCollADC" The name of the FIT hits collection to be processed.
fitGeoParColl std::string "fitDigitizedGeoParamsColl <td> The name of the FIT geometry parameters collection to be used. <tr><td>fitNearHitsAlias <td> std::string <td> "fitHitsCollADC" <td> Alias for the near FIT hits object. <tr><td>scdHitsColl <td> std::string <td> "scdHitsCollMC" <td> The name of the SCD hits collection to be processed. <tr><td>scdGeoParColl <td> std::string <td> "scdDigitizedGeoParamsColl The name of the SCD geometry parameters collection to be used.
scdNearHitsAlias std::string "scdHitsCollADC" Alias for the near SCD hits object.

Member Typedef Documentation

◆ Hits

using Herd::FarHitsRemoverAlgo::Hits = std::vector<Hit>
private

Member Enumeration Documentation

◆ EntranceRecoMethod

Enumerator
NONE 
MC 
CALO 

Constructor & Destructor Documentation

◆ FarHitsRemoverAlgo()

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

Constructor.

Parameters
nameThe name of the algorithm object.

Member Function Documentation

◆ FilterHits() [1/2]

void Herd::FarHitsRemoverAlgo::FilterHits ( const Hits origHits,
Hits nearHits,
const ScdGeoParams geoParams,
const Line trajectory 
)
private

◆ FilterHits() [2/2]

void Herd::FarHitsRemoverAlgo::FilterHits ( const Hits origHits,
Hits nearHits,
const FitGeoParams geoParams,
const Line trajectory 
)
private

◆ Initialize()

bool Herd::FarHitsRemoverAlgo::Initialize ( )
override

Initializes the algo.

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

◆ Process()

bool Herd::FarHitsRemoverAlgo::Process ( )
override

Processes an event.

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

Member Data Documentation

◆ _entranceRecoMethod

EntranceRecoMethod Herd::FarHitsRemoverAlgo::_entranceRecoMethod {EntranceRecoMethod::NONE}
private

◆ _entranceSideReco

std::string Herd::FarHitsRemoverAlgo::_entranceSideReco {"calo"}
private

◆ _evStore

StorePtr Herd::FarHitsRemoverAlgo::_evStore
private

◆ _fitGeoParCollName

std::string Herd::FarHitsRemoverAlgo::_fitGeoParCollName {"fitDigitizedGeoParamsColl"}
private

◆ _fitHitsCollName

std::string Herd::FarHitsRemoverAlgo::_fitHitsCollName {"fitHitsCollADC"}
private

◆ _fitNearHits

Herd::FitHitsColl Herd::FarHitsRemoverAlgo::_fitNearHits
private

◆ _fitNearHitsAlias

std::string Herd::FarHitsRemoverAlgo::_fitNearHitsAlias {"fitHitsCollADC"}
private

◆ _globStore

StorePtr Herd::FarHitsRemoverAlgo::_globStore
private

◆ _maxDistance

float Herd::FarHitsRemoverAlgo::_maxDistance = 5.0f
private

◆ _processFit

bool Herd::FarHitsRemoverAlgo::_processFit = false
private

◆ _processScd

bool Herd::FarHitsRemoverAlgo::_processScd = false
private

◆ _scdGeoParCollName

std::string Herd::FarHitsRemoverAlgo::_scdGeoParCollName {"scdGeoParamsColl"}
private

◆ _scdHitsCollName

std::string Herd::FarHitsRemoverAlgo::_scdHitsCollName {"scdHitsCollMC"}
private

◆ _scdNearHits

Herd::ScdHitsColl Herd::FarHitsRemoverAlgo::_scdNearHits
private

◆ _scdNearHitsAlias

std::string Herd::FarHitsRemoverAlgo::_scdNearHitsAlias {"scdHitsCollMC"}
private

◆ _trackType

std::string Herd::FarHitsRemoverAlgo::_trackType {"calo"}
private

◆ _useMCTrack

bool Herd::FarHitsRemoverAlgo::_useMCTrack {true}
private

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