GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
genie::geometry::GeomVolSelectorI Class Referenceabstract

GENIE Interface for user-defined volume selector functors. More...

#include <GeomVolSelectorI.h>

Inheritance diagram for genie::geometry::GeomVolSelectorI:
Inheritance graph
[legend]
Collaboration diagram for genie::geometry::GeomVolSelectorI:
Collaboration graph
[legend]

Public Member Functions

virtual ~GeomVolSelectorI ()
 
virtual PathSegmentListGenerateTrimmedList (const PathSegmentList *untrimmed) const
 
virtual void TrimSegment (PathSegment &segment) const =0
 
virtual void BeginPSList (const PathSegmentList *untrimmed) const =0
 
virtual void EndPSList () const =0
 
void SetCurrentRay (const TLorentzVector &x4, const TLorentzVector &p4)
 configure for individual neutrino ray More...
 
void SetSI2Local (double scale)
 set scale factor for SI to "raydist" units of PathSegmentList More...
 
void SetRemoveEntries (bool rmset)
 
bool GetRemoveEntries ()
 
void SetNeedPath ()
 
bool GetNeedPath () const
 allow toggle on only More...
 
std::string GetName () const
 

Protected Member Functions

 GeomVolSelectorI ()
 
 GeomVolSelectorI (std::string name)
 

Protected Attributes

TLorentzVector fX4
 current neutrino ray's start position (global) More...
 
TLorentzVector fP4
 current neutrino ray's momentum (global) More...
 
double fScale
 SI->raydist scale factor. More...
 
bool fRemoveEntries
 whether selector should remove entries or set hi=lo More...
 
bool fNeedPath
 selector needs PathSegment "path" string More...
 
std::string fName
 volume selector name More...
 

Detailed Description

GENIE Interface for user-defined volume selector functors.

Author
Robert Hatcher rhatc.nosp@m.her@.nosp@m.fnal..nosp@m.gov FNAL
Created:
August 25, 2009
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 30 of file GeomVolSelectorI.h.

Constructor & Destructor Documentation

GeomVolSelectorI::~GeomVolSelectorI ( )
virtual

Definition at line 30 of file GeomVolSelectorI.cxx.

31 {
32 
33 }
GeomVolSelectorI::GeomVolSelectorI ( )
protected

Definition at line 18 of file GeomVolSelectorI.cxx.

19  : fRemoveEntries(false), fNeedPath(false), fName("no-name")
20 {
21 }
bool fNeedPath
selector needs PathSegment &quot;path&quot; string
std::string fName
volume selector name
bool fRemoveEntries
whether selector should remove entries or set hi=lo
GeomVolSelectorI::GeomVolSelectorI ( std::string  name)
protected

Definition at line 24 of file GeomVolSelectorI.cxx.

25  : fRemoveEntries(false), fNeedPath(false), fName(name)
26 {
27 }
bool fNeedPath
selector needs PathSegment &quot;path&quot; string
std::string fName
volume selector name
bool fRemoveEntries
whether selector should remove entries or set hi=lo
const char * name

Member Function Documentation

virtual void genie::geometry::GeomVolSelectorI::BeginPSList ( const PathSegmentList untrimmed) const
pure virtual

Every derived version must also respond to a signal that starts a new path segment list processing and ends it. In general they can simply ignore the signal. If the derived class needs to cache something, make it mutable

Implemented in genie::geometry::GeomVolSelectorBasic, genie::geometry::GeomVolSelectorFiducial, and genie::geometry::GeomVolSelectorRockBox.

Referenced by GenerateTrimmedList().

virtual void genie::geometry::GeomVolSelectorI::EndPSList ( ) const
pure virtual
PathSegmentList * GeomVolSelectorI::GenerateTrimmedList ( const PathSegmentList untrimmed) const
virtual

create and return a new PathSegmentList from the old list relinquishes ownership of returned object

Definition at line 37 of file GeomVolSelectorI.cxx.

References genie::geometry::PathSegmentList::AddSegment(), BeginPSList(), EndPSList(), fRemoveEntries, genie::geometry::PathSegmentList::GetDirection(), genie::geometry::PathSegmentList::GetPathSegmentV(), genie::geometry::PathSegmentList::GetStartPos(), genie::geometry::PathSegment::GetSummedStepRange(), genie::units::ps, genie::geometry::PathSegmentList::SetStartInfo(), and TrimSegment().

Referenced by genie::geometry::ROOTGeomAnalyzer::SwimOnce().

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 }
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
std::list< PathSegment > PathSegmentV_t
virtual void BeginPSList(const PathSegmentList *untrimmed) const =0
virtual void TrimSegment(PathSegment &segment) const =0
std::string genie::geometry::GeomVolSelectorI::GetName ( ) const
inline

Definition at line 66 of file GeomVolSelectorI.h.

References fName.

66 { return fName; }
std::string fName
volume selector name
bool genie::geometry::GeomVolSelectorI::GetNeedPath ( ) const
inline

allow toggle on only

Definition at line 64 of file GeomVolSelectorI.h.

References fNeedPath.

Referenced by genie::geometry::ROOTGeomAnalyzer::SwimOnce().

64 { return fNeedPath; }
bool fNeedPath
selector needs PathSegment &quot;path&quot; string
bool genie::geometry::GeomVolSelectorI::GetRemoveEntries ( )
inline

Definition at line 61 of file GeomVolSelectorI.h.

References fRemoveEntries.

61 { return fRemoveEntries; }
bool fRemoveEntries
whether selector should remove entries or set hi=lo
void genie::geometry::GeomVolSelectorI::SetCurrentRay ( const TLorentzVector &  x4,
const TLorentzVector &  p4 
)
inline

configure for individual neutrino ray

Definition at line 54 of file GeomVolSelectorI.h.

References fP4, and fX4.

Referenced by genie::geometry::ROOTGeomAnalyzer::ComputeMatLengths(), and genie::geometry::ROOTGeomAnalyzer::ComputePathLengths().

55  { fX4 = x4; fP4 = p4; }
TLorentzVector fP4
current neutrino ray&#39;s momentum (global)
TLorentzVector fX4
current neutrino ray&#39;s start position (global)
void genie::geometry::GeomVolSelectorI::SetNeedPath ( )
inline

Definition at line 63 of file GeomVolSelectorI.h.

References fNeedPath.

Referenced by genie::geometry::GeomVolSelectorBasic::SetPathSelection().

63 { fNeedPath = true; } /// allow toggle *on* only
bool fNeedPath
selector needs PathSegment &quot;path&quot; string
void genie::geometry::GeomVolSelectorI::SetRemoveEntries ( bool  rmset)
inline

Definition at line 60 of file GeomVolSelectorI.h.

References fRemoveEntries.

Referenced by CreateFidSelection(), and CreateRockBoxSelection().

60 { fRemoveEntries = rmset; }
bool fRemoveEntries
whether selector should remove entries or set hi=lo
void genie::geometry::GeomVolSelectorI::SetSI2Local ( double  scale)
inline

set scale factor for SI to "raydist" units of PathSegmentList

Definition at line 58 of file GeomVolSelectorI.h.

References fScale.

Referenced by genie::geometry::ROOTGeomAnalyzer::ComputeMatLengths(), and genie::geometry::ROOTGeomAnalyzer::ComputePathLengths().

58 { fScale = scale; }
double fScale
SI-&gt;raydist scale factor.
virtual void genie::geometry::GeomVolSelectorI::TrimSegment ( PathSegment segment) const
pure virtual

This is the method every derived version must implement To reject a segment outright: segment.fStepRangeSet.clear()

Implemented in genie::geometry::GeomVolSelectorBasic, genie::geometry::GeomVolSelectorFiducial, and genie::geometry::GeomVolSelectorRockBox.

Referenced by GenerateTrimmedList().

Member Data Documentation

std::string genie::geometry::GeomVolSelectorI::fName
protected
bool genie::geometry::GeomVolSelectorI::fNeedPath
protected

selector needs PathSegment "path" string

Definition at line 77 of file GeomVolSelectorI.h.

Referenced by GetNeedPath(), and SetNeedPath().

TLorentzVector genie::geometry::GeomVolSelectorI::fP4
protected

current neutrino ray's momentum (global)

Definition at line 74 of file GeomVolSelectorI.h.

Referenced by genie::geometry::GeomVolSelectorRockBox::MakeRockBox(), and SetCurrentRay().

bool genie::geometry::GeomVolSelectorI::fRemoveEntries
protected
double genie::geometry::GeomVolSelectorI::fScale
protected

SI->raydist scale factor.

Definition at line 75 of file GeomVolSelectorI.h.

Referenced by SetSI2Local().

TLorentzVector genie::geometry::GeomVolSelectorI::fX4
protected

current neutrino ray's start position (global)

Definition at line 73 of file GeomVolSelectorI.h.

Referenced by SetCurrentRay().


The documentation for this class was generated from the following files: