GENIEGenerator
Loading...
Searching...
No Matches
genie::geometry::GeomVolSelectorI Class Referenceabstract

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

#include <GeomVolSelectorI.h>

Inheritance diagram for genie::geometry::GeomVolSelectorI:
[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
void SetSI2Local (double scale)
 set scale factor for SI to "raydist" units of PathSegmentList
void SetRemoveEntries (bool rmset)
bool GetRemoveEntries ()
void SetNeedPath ()
bool GetNeedPath () const
 allow toggle on only
std::string GetName () const

Protected Member Functions

 GeomVolSelectorI ()
 GeomVolSelectorI (std::string name)

Protected Attributes

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

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:\n August 25, 2009
License:\n Copyright (c) 2003-2025, 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::~GeomVolSelectorI ( )
virtual

Definition at line 30 of file GeomVolSelectorI.cxx.

31{
32
33}

◆ GeomVolSelectorI() [1/2]

GeomVolSelectorI::GeomVolSelectorI ( )
protected

Definition at line 18 of file GeomVolSelectorI.cxx.

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

References fName, fNeedPath, and fRemoveEntries.

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

◆ GeomVolSelectorI() [2/2]

GeomVolSelectorI::GeomVolSelectorI ( std::string name)
protected

Definition at line 24 of file GeomVolSelectorI.cxx.

25 : fRemoveEntries(false), fNeedPath(false), fName(name)
26{
27}

References fName, fNeedPath, and fRemoveEntries.

Member Function Documentation

◆ BeginPSList()

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().

◆ EndPSList()

virtual void genie::geometry::GeomVolSelectorI::EndPSList ( ) const
pure virtual

◆ GenerateTrimmedList()

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.

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}
virtual void TrimSegment(PathSegment &segment) const =0
virtual void BeginPSList(const PathSegmentList *untrimmed) const =0
virtual void EndPSList() const =0
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)

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::geometry::PathSegmentList::SetStartInfo(), and TrimSegment().

◆ GetName()

std::string genie::geometry::GeomVolSelectorI::GetName ( ) const
inline

Definition at line 66 of file GeomVolSelectorI.h.

66{ return fName; }

References fName.

◆ GetNeedPath()

bool genie::geometry::GeomVolSelectorI::GetNeedPath ( ) const
inline

allow toggle on only

Definition at line 64 of file GeomVolSelectorI.h.

64{ return fNeedPath; }

References fNeedPath.

◆ GetRemoveEntries()

bool genie::geometry::GeomVolSelectorI::GetRemoveEntries ( )
inline

Definition at line 61 of file GeomVolSelectorI.h.

61{ return fRemoveEntries; }

References fRemoveEntries.

◆ SetCurrentRay()

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.

55 { fX4 = x4; fP4 = p4; }
TLorentzVector fX4
current neutrino ray's start position (global)
TLorentzVector fP4
current neutrino ray's momentum (global)

References fP4, and fX4.

◆ SetNeedPath()

void genie::geometry::GeomVolSelectorI::SetNeedPath ( )
inline

Definition at line 63 of file GeomVolSelectorI.h.

63{ fNeedPath = true; } /// allow toggle *on* only

References fNeedPath.

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

◆ SetRemoveEntries()

void genie::geometry::GeomVolSelectorI::SetRemoveEntries ( bool rmset)
inline

Definition at line 60 of file GeomVolSelectorI.h.

60{ fRemoveEntries = rmset; }

References fRemoveEntries.

Referenced by CreateFidSelection(), and CreateRockBoxSelection().

◆ SetSI2Local()

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.

58{ fScale = scale; }
double fScale
SI->raydist scale factor.

References fScale.

◆ TrimSegment()

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

◆ fName

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

◆ fNeedPath

bool genie::geometry::GeomVolSelectorI::fNeedPath
protected

selector needs PathSegment "path" string

Definition at line 77 of file GeomVolSelectorI.h.

Referenced by GeomVolSelectorI(), GeomVolSelectorI(), GetNeedPath(), and SetNeedPath().

◆ fP4

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().

◆ fRemoveEntries

bool genie::geometry::GeomVolSelectorI::fRemoveEntries
protected

◆ fScale

double genie::geometry::GeomVolSelectorI::fScale
protected

SI->raydist scale factor.

Definition at line 75 of file GeomVolSelectorI.h.

Referenced by SetSI2Local().

◆ fX4

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: