15 using namespace genie;
18 #include <TGeoVolume.h> 19 #include <TGeoMaterial.h> 20 #include <TGeoMedium.h> 52 #ifdef PATHSEG_KEEP_PATH 56 <<
"PathSegment is not defined to hold fPathString -- selectors can not cut on it";
98 #ifdef PATHSEG_KEEP_PATH 111 vector<string>& forbidden)
116 size_t n = pieces.size();
117 for (
size_t i = 0; i <
n; ++i ) {
118 string& strone = pieces[i];
119 if ( strone ==
"" )
continue;
120 if ( strone.find(
"-") == 0 ) forbidden.push_back(strone.substr(1,std::string::npos));
121 else if ( strone.find(
"+") == 0 ) required.push_back(strone.substr(1,std::string::npos));
122 else required.push_back(strone);
128 const vector<string>& forbidden)
const 133 size_t nrequired = required.size();
134 if ( nrequired > 0 ) {
136 for (
size_t jr = 0; jr < nrequired; ++jr) {
137 if ( str.find(required[jr]) != std::string::npos ) {
142 if ( ! found ) reject =
true;
146 size_t nforbidden = forbidden.size();
147 if ( nforbidden > 0 ) {
148 for (
size_t jf = 0; jf < nforbidden; ++jf) {
149 if ( str.find(forbidden[jf]) != std::string::npos ) {
vector< string > fRequiredVol
THE MAIN GENIE PROJECT NAMESPACE
void SetVolumeSelection(string volstr)
StepRangeSet fStepRangeSet
collection of {steplo,stephi} pairs
void SetMaterialSelection(string matstr)
void SetMediumSelection(string medstr)
Object to be filled with the neutrino path-segments representing geometry volume steps (generally bou...
GENIE Interface for user-defined volume selector functors.
vector< string > fForbiddenVol
vector< string > fRequiredPath
const TGeoMaterial * fMaterial
ref only ptr to TGeoMaterial
vector< string > fRequiredMat
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
vector< string > fRequiredMed
const TGeoVolume * fVolume
ref only ptr to TGeoVolume
const TGeoMedium * fMedium
ref only ptr to TGeoMedium
static constexpr double ps
void ParseSelection(const string &str, vector< string > &required, vector< string > &forbidden)
virtual ~GeomVolSelectorBasic()
vector< string > fForbiddenPath
vector< string > Split(string input, string delim)
vector< string > fForbiddenMat
void TrimSegment(PathSegment &segment) const
vector< string > fForbiddenMed
bool RejectString(const string &str, const vector< string > &required, const vector< string > &forbidden) const
void SetPathSelection(string pathstr)
void BeginPSList(const PathSegmentList *untrimmed) const
std::string fPathString
full path names