GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GeomVolSelectorI.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Robert Hatcher <rhatcher@fnal.gov>
7 */
8 //____________________________________________________________________________
9 
13 
14 using namespace genie;
15 using namespace genie::geometry;
16 
17 //____________________________________________________________________________
18 GeomVolSelectorI::GeomVolSelectorI()
19  : fRemoveEntries(false), fNeedPath(false), fName("no-name")
20 {
21 }
22 
23 //____________________________________________________________________________
25  : fRemoveEntries(false), fNeedPath(false), fName(name)
26 {
27 }
28 
29 //___________________________________________________________________________
31 {
32 
33 }
34 //___________________________________________________________________________
35 
38 {
39  this->BeginPSList(untrimmed);
40 
41  PathSegmentList* trimmed = new PathSegmentList();
42  trimmed->SetStartInfo(untrimmed->GetStartPos(),untrimmed->GetDirection());
43 
45  untrimmed->GetPathSegmentV();
47  genie::geometry::PathSegmentList::PathSegVCItr_t sitr_end = segments.end();
48 
49  for ( ; sitr != sitr_end ; ++sitr ) {
50  PathSegment ps = *sitr; // new PathSegment is a copy of old
51  this->TrimSegment(ps);
52  if ( fRemoveEntries && ps.GetSummedStepRange() == 0 ) continue; // remove null segments
53  // now put (adjusted) entry on trimmed list
54  trimmed->AddSegment(ps);
55  }
56 
57  this->EndPSList();
58 
59  return trimmed;
60 }
61 //___________________________________________________________________________
const TVector3 & GetStartPos() const
void AddSegment(const PathSegment &ps)
Object to be filled with the neutrino path-segments representing geometry volume steps (generally bou...
const TVector3 & GetDirection() const
virtual void EndPSList() const =0
PathSegmentV_t::const_iterator PathSegVCItr_t
bool fRemoveEntries
whether selector should remove entries or set hi=lo
void SetStartInfo(const TVector3 &pos=TVector3(0, 0, 1e37), const TVector3 &dir=TVector3(0, 0, 0))
Double_t GetSummedStepRange() const
get the sum of all the step range (in case step has been trimmed or split)
static constexpr double ps
Definition: Units.h:99
const PathSegmentV_t & GetPathSegmentV(void) const
virtual PathSegmentList * GenerateTrimmedList(const PathSegmentList *untrimmed) const
std::list< PathSegment > PathSegmentV_t
virtual void BeginPSList(const PathSegmentList *untrimmed) const =0
virtual void TrimSegment(PathSegment &segment) const =0