GeomVolSelectorI.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::geometry::GeomVolSelectorI
5 
6 \brief GENIE Interface for user-defined volume selector functors
7 
8 \author Robert Hatcher <rhatcher@fnal.gov>
9  FNAL
10 
11 \created August 25, 2009
12 
13 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _GEOM_VOL_SELECTOR_I_H_
19 #define _GEOM_VOL_SELECTOR_I_H_
20 
21 #include <string>
22 #include "TLorentzVector.h"
23 
24 namespace genie {
25 namespace geometry {
26 
27 class PathSegment;
28 class PathSegmentList;
29 
31 
32 public :
33  virtual ~GeomVolSelectorI();
34  //
35  // define the GeomVolSelectorI interface:
36  //
37 
38  /// create and return a new PathSegmentList from the old list
39  /// relinquishes ownership of returned object
40  virtual PathSegmentList* GenerateTrimmedList(const PathSegmentList* untrimmed) const;
41 
42  /// This is the method every derived version must implement
43  /// To reject a segment outright: segment.fStepRangeSet.clear()
44  virtual void TrimSegment(PathSegment& segment) const = 0;
45 
46  /// Every derived version must also respond to a signal that starts
47  /// a new path segment list processing and ends it.
48  /// In general they can simply ignore the signal.
49  /// If the derived class needs to cache something, make it mutable
50  virtual void BeginPSList(const PathSegmentList* untrimmed) const = 0;
51  virtual void EndPSList() const = 0;
52 
53  /// configure for individual neutrino ray
54  void SetCurrentRay(const TLorentzVector& x4, const TLorentzVector& p4)
55  { fX4 = x4; fP4 = p4; }
56 
57  /// set scale factor for SI to "raydist" units of PathSegmentList
58  void SetSI2Local(double scale) { fScale = scale; }
59 
60  void SetRemoveEntries(bool rmset) { fRemoveEntries = rmset; }
61  bool GetRemoveEntries() { return fRemoveEntries; }
62 
63  void SetNeedPath() { fNeedPath = true; } /// allow toggle *on* only
64  bool GetNeedPath() const { return fNeedPath; }
65 
66  std::string GetName() const { return fName; }
67 
68 protected:
69 
72 
73  TLorentzVector fX4; ///< current neutrino ray's start position (global)
74  TLorentzVector fP4; ///< current neutrino ray's momentum (global)
75  double fScale; ///< SI->raydist scale factor
76  bool fRemoveEntries; ///< whether selector should remove entries or set hi=lo
77  bool fNeedPath; ///< selector needs PathSegment "path" string
78  std::string fName; ///< volume selector name
79 
80 };
81 
82 } // geometry namespace
83 } // genie namespace
84 
85 #endif // _GEOM_VOL_SELECTOR_I_H_
static QCString name
Definition: declinfo.cpp:673
TLorentzVector fP4
current neutrino ray&#39;s momentum (global)
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
virtual void TrimSegment(PathSegment &segment) const =0
bool fNeedPath
selector needs PathSegment "path" string
std::string string
Definition: nybbler.cc:12
virtual void BeginPSList(const PathSegmentList *untrimmed) const =0
Object to be filled with the neutrino path-segments representing geometry volume steps (generally bou...
GENIE Interface for user-defined volume selector functors.
std::string fName
volume selector name
bool fRemoveEntries
whether selector should remove entries or set hi=lo
virtual void EndPSList() const =0
bool GetNeedPath() const
allow toggle on only
double fScale
SI->raydist scale factor.
void SetCurrentRay(const TLorentzVector &x4, const TLorentzVector &p4)
configure for individual neutrino ray
virtual PathSegmentList * GenerateTrimmedList(const PathSegmentList *untrimmed) const
TLorentzVector fX4
current neutrino ray&#39;s start position (global)
void SetSI2Local(double scale)
set scale factor for SI to "raydist" units of PathSegmentList