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:
genie::geometry::GeomVolSelectorBasic genie::geometry::GeomVolSelectorFiducial genie::geometry::GeomVolSelectorRockBox

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

August 25, 2009

Copyright (c) 2003-2020, 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 "path" 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 }
static QCString name
Definition: declinfo.cpp:673
bool fNeedPath
selector needs PathSegment "path" string
std::string fName
volume selector name
bool fRemoveEntries
whether selector should remove entries or set hi=lo

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.

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.

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
virtual void TrimSegment(PathSegment &segment) const =0
virtual void BeginPSList(const PathSegmentList *untrimmed) const =0
void AddSegment(const PathSegment &ps)
Object to be filled with the neutrino path-segments representing geometry volume steps (generally bou...
const TVector3 & GetDirection() const
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 void EndPSList() const =0
std::list< PathSegment > PathSegmentV_t
std::string genie::geometry::GeomVolSelectorI::GetName ( void  ) const
inline

Definition at line 66 of file GeomVolSelectorI.h.

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.

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

Definition at line 61 of file GeomVolSelectorI.h.

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.

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.

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

Definition at line 60 of file GeomVolSelectorI.h.

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.

58 { fScale = scale; }
double fScale
SI->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.

Member Data Documentation

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

volume selector name

Definition at line 78 of file GeomVolSelectorI.h.

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

selector needs PathSegment "path" string

Definition at line 77 of file GeomVolSelectorI.h.

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

current neutrino ray's momentum (global)

Definition at line 74 of file GeomVolSelectorI.h.

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

whether selector should remove entries or set hi=lo

Definition at line 76 of file GeomVolSelectorI.h.

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

SI->raydist scale factor.

Definition at line 75 of file GeomVolSelectorI.h.

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

current neutrino ray's start position (global)

Definition at line 73 of file GeomVolSelectorI.h.


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