3 #include "Sti/StiKalmanTrack.h"
4 #include "Sti/StiKalmanTrackNode.h"
12 fgVolumeSelectPatterns()
14 std::string patternFileName(
"save_sti_detectors.txt");
15 std::ifstream volumePatternFile(patternFileName);
18 while ( std::getline(volumePatternFile, pattern) )
21 boost::regex volNameRegex(pattern);
24 catch (boost::regex_error& e) {
25 Warning(__FUNCTION__,
"Regex [%s] found in [%s] is not valid", pattern.c_str(), patternFileName.c_str());
47 if ( node.isDca() )
return true;
51 if ( !node.getDetector() )
return false;
54 std::string volumeName( node.getDetector()->getName() );
57 if ( volumeName.empty() )
return false;
63 StDetectorId stiNodeDetId =
static_cast<StDetectorId
>( node.getDetector()->getGroupId() );
77 if ( boost::regex_match(volumeName, volNamePattern) )
return true;
90 for (
const StiKalmanTrackNode& node : track)
93 if ( node.isDca() )
continue;
StDetectorId fgDetGroupId
Detector group id used in this study.
bool AcceptTrack(const StiKalmanTrack &track) const
bool fgDetActiveOnly
Another selection criteria to save nodes.
std::set< boost::regex > fgVolumeSelectPatterns
A set of regex patterns to select and save track nodes passing through volumes with matching names...
static StiVolumeFilter & GetInstance()
A singleton to manage constraints on save Sti objects such as tracks and track nodes.
StiVolumeFilter()
By default, we set no constraints on tracks w.r.t.
bool AcceptTrackNode(const StiKalmanTrackNode &node) const
bool HasAcceptedNode(const StiKalmanTrack &track) const