GENIEGenerator
Loading...
Searching...
No Matches
GeomVolSelectorI.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, 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
14using namespace genie;
15using namespace genie::geometry;
16
17//____________________________________________________________________________
19 : fRemoveEntries(false), fNeedPath(false), fName("no-name")
20{
21}
22
23//____________________________________________________________________________
25 : fRemoveEntries(false), fNeedPath(false), fName(name)
26{
27}
28
29//___________________________________________________________________________
34//___________________________________________________________________________
35
38{
39 this->BeginPSList(untrimmed);
40
41 PathSegmentList* trimmed = new PathSegmentList();
42 trimmed->SetStartInfo(untrimmed->GetStartPos(),untrimmed->GetDirection());
43
45 untrimmed->GetPathSegmentV();
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//___________________________________________________________________________
bool fRemoveEntries
whether selector should remove entries or set hi=lo
virtual void TrimSegment(PathSegment &segment) const =0
virtual PathSegmentList * GenerateTrimmedList(const PathSegmentList *untrimmed) const
bool fNeedPath
selector needs PathSegment "path" string
virtual void BeginPSList(const PathSegmentList *untrimmed) const =0
virtual void EndPSList() const =0
std::string fName
volume selector name
Object to be filled with the neutrino path-segments representing geometry volume steps (generally bou...
const TVector3 & GetDirection() const
const TVector3 & GetStartPos() const
const PathSegmentV_t & GetPathSegmentV(void) const
void SetStartInfo(const TVector3 &pos=TVector3(0, 0, 1e37), const TVector3 &dir=TVector3(0, 0, 0))
void AddSegment(const PathSegment &ps)
std::list< PathSegment > PathSegmentV_t
PathSegmentV_t::const_iterator PathSegVCItr_t
Double_t GetSummedStepRange() const
get the sum of all the step range (in case step has been trimmed or split)
GENIE geometry drivers.
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25