GeomVolSelectorBasic.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::geometry::GeomVolSelectorBasic
5 
6 \brief GENIE Interface for user-defined volume selector functors
7  This basic version allows configurations that depend on PathSegment elements'
8  material/media/volume and/or "path"
9 
10 \author Robert Hatcher <rhatcher@fnal.gov>
11  FNAL
12 
13 \created December 3, 2008
14 
15 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
16  For the full text of the license visit http://copyright.genie-mc.org
17 */
18 //____________________________________________________________________________
19 
20 #ifndef _GEOM_VOL_SELECTOR_BASIC_H_
21 #define _GEOM_VOL_SELECTOR_BASIC_H_
22 
23 #include <string>
24 #include <vector>
25 #include "TLorentzVector.h"
27 
28 using namespace std;
29 
30 namespace genie {
31 namespace geometry {
32 
33 class PathSegmentList;
34 
36 
37 public :
39  virtual ~GeomVolSelectorBasic();
40 
41  ///
42  /// Selections are string based, elements are specified as a list of items separated by
43  /// comma, semicolon or colons. Elements that start with "-" are rejections; elements
44  /// that start with "+" (or nothing) are required, e.g.
45  /// "+N276B,-air0"
46  ///
47  void SetVolumeSelection(string volstr);
48  void SetMediumSelection(string medstr);
49  void SetMaterialSelection(string matstr);
50  void SetPathSelection(string pathstr);
51 
52  //
53  // define the missing parts of the GeomVolSelectorI interface:
54  //
55  void TrimSegment(PathSegment& segment) const;
56  void BeginPSList(const PathSegmentList* untrimmed) const;
57  void EndPSList() const;
58 
59 protected:
60 
61  void ParseSelection(const string& str, vector<string>& required, vector<string>& forbidden);
62  bool RejectString(const string& str, const vector<string>& required, const vector<string>& forbidden) const;
63 
64  // PathSegment must contain one of the things in these lists (if there are any)
65  vector<string> fRequiredVol;
66  vector<string> fRequiredMed;
67  vector<string> fRequiredMat;
68  vector<string> fRequiredPath;
69 
70  // PathSegment must not contain any of the things in these lists
71  vector<string> fForbiddenVol;
72  vector<string> fForbiddenMed;
73  vector<string> fForbiddenMat;
74  vector<string> fForbiddenPath;
75 
76 };
77 
78 } // geometry namespace
79 } // genie namespace
80 
81 #endif // _GEOM_VOL_SELECTOR_BASIC_H_
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
STL namespace.
Object to be filled with the neutrino path-segments representing geometry volume steps (generally bou...
GENIE Interface for user-defined volume selector functors.
GENIE Interface for user-defined volume selector functors This basic version allows configurations th...
static QCString str