HerdSoftware  0.4.0
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

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 m_processFit = false
 
bool m_processScd = false
 
float m_maxDistance = 5.0f
 
std::string m_trackType {"calo"}
 
std::string m_fitHitsCollName {"fitHitsCollADC"}
 
std::string m_fitGeoParCollName {"fitDigitizedGeoParamsColl"}
 
std::string m_fitNearHitsAlias {"fitHitsCollADC"}
 
std::string m_scdHitsCollName {"scdHitsCollMC"}
 
std::string m_scdGeoParCollName {"scdGeoParamsColl"}
 
std::string m_scdNearHitsAlias {"scdHitsCollMC"}
 
EA::StorePtr m_evStore
 
EA::StorePtr m_globStore
 
Herd::FitHitsColl m_fitNearHits
 
Herd::ScdHitsColl m_scdNearHits
 
bool m_useMCTrack {true}
 
bool m_useEntranceInfo {false}
 

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 the useEntranceInfo parameter is set as true then the algorithm look for an EntranceInfo object in the eventStore and use the entrance octant to remove all the hits on the particle exit side, regardless of their distance from the track. If no CALO axis is present and if "calo" is used for track type 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")
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.
useEntranceInfo bool true Enable the use of entrance info for the selection.
fitHitsColl std::string "fitHitsCollADC" The name of the FIT hits collection to be processed.
fitGeoParColl std::string "fitDigitizedGeoParamsColl</td> <td class="markdownTableBodyNone"> The name of the FIT geometry parameters collection to be used.</td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone"> fitNearHitsAlias</td> <td class="markdownTableBodyNone"> std::string</td> <td class="markdownTableBodyNone"> "fitHitsCollADC"</td> <td class="markdownTableBodyNone"> Alias for the near FIT hits object.</td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone"> scdHitsColl</td> <td class="markdownTableBodyNone"> std::string</td> <td class="markdownTableBodyNone"> "scdHitsCollMC"</td> <td class="markdownTableBodyNone"> The name of the SCD hits collection to be processed.</td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone"> scdGeoParColl</td> <td class="markdownTableBodyNone"> std::string</td> <td class="markdownTableBodyNone"> "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

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 FitGeoParams geoParams,
const Line trajectory 
)
private

◆ FilterHits() [2/2]

void Herd::FarHitsRemoverAlgo::FilterHits ( const Hits origHits,
Hits nearHits,
const ScdGeoParams 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

◆ m_evStore

EA::StorePtr Herd::FarHitsRemoverAlgo::m_evStore
private

◆ m_fitGeoParCollName

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

◆ m_fitHitsCollName

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

◆ m_fitNearHits

Herd::FitHitsColl Herd::FarHitsRemoverAlgo::m_fitNearHits
private

◆ m_fitNearHitsAlias

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

◆ m_globStore

EA::StorePtr Herd::FarHitsRemoverAlgo::m_globStore
private

◆ m_maxDistance

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

◆ m_processFit

bool Herd::FarHitsRemoverAlgo::m_processFit = false
private

◆ m_processScd

bool Herd::FarHitsRemoverAlgo::m_processScd = false
private

◆ m_scdGeoParCollName

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

◆ m_scdHitsCollName

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

◆ m_scdNearHits

Herd::ScdHitsColl Herd::FarHitsRemoverAlgo::m_scdNearHits
private

◆ m_scdNearHitsAlias

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

◆ m_trackType

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

◆ m_useEntranceInfo

bool Herd::FarHitsRemoverAlgo::m_useEntranceInfo {false}
private

◆ m_useMCTrack

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

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