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 "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Tools/Geometry/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-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 31 of file GeomVolSelectorI.h.

Constructor & Destructor Documentation

GeomVolSelectorI::~GeomVolSelectorI ( )
virtual

Definition at line 50 of file GeomVolSelectorI.cxx.

51 {
52 
53 }
GeomVolSelectorI::GeomVolSelectorI ( )
protected

Definition at line 38 of file GeomVolSelectorI.cxx.

Referenced by GetName().

39  : fRemoveEntries(false), fNeedPath(false), fName("no-name")
40 {
41 }
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 44 of file GeomVolSelectorI.cxx.

45  : fRemoveEntries(false), fNeedPath(false), fName(name)
46 {
47 }
const XML_Char * name
Definition: expat.h:151
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.

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

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

58 {
59  this->BeginPSList(untrimmed);
60 
61  PathSegmentList* trimmed = new PathSegmentList();
62  trimmed->SetStartInfo(untrimmed->GetStartPos(),untrimmed->GetDirection());
63 
65  untrimmed->GetPathSegmentV();
67  genie::geometry::PathSegmentList::PathSegVCItr_t sitr_end = segments.end();
68 
69  for ( ; sitr != sitr_end ; ++sitr ) {
70  PathSegment ps = *sitr; // new PathSegment is a copy of old
71  this->TrimSegment(ps);
72  if ( fRemoveEntries && ps.GetSummedStepRange() == 0 ) continue; // remove null segments
73  // now put (adjusted) entry on trimmed list
74  trimmed->AddSegment(ps);
75  }
76 
77  this->EndPSList();
78 
79  return trimmed;
80 }
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)
const PathSegmentV_t & GetPathSegmentV(void) const
virtual void EndPSList() const =0
std::list< PathSegment > PathSegmentV_t
std::string genie::geometry::GeomVolSelectorI::GetName ( ) const
inline

Definition at line 67 of file GeomVolSelectorI.h.

References fName, GeomVolSelectorI(), and string.

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

allow toggle on only

Definition at line 65 of file GeomVolSelectorI.h.

References fNeedPath.

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

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

Definition at line 62 of file GeomVolSelectorI.h.

References fRemoveEntries.

62 { 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 55 of file GeomVolSelectorI.h.

References fP4, fX4, and make_associated_cosmic_defs::p4.

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

56  { 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 64 of file GeomVolSelectorI.h.

References fNeedPath.

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

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

Definition at line 61 of file GeomVolSelectorI.h.

References fRemoveEntries.

Referenced by CreateFidSelection(), and CreateRockBoxSelection().

61 { 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 59 of file GeomVolSelectorI.h.

References fScale, and scale.

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

59 { fScale = scale; }
Double_t scale
Definition: plot.C:25
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.

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 78 of file GeomVolSelectorI.h.

Referenced by GetNeedPath(), and SetNeedPath().

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

current neutrino ray's momentum (global)

Definition at line 75 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 76 of file GeomVolSelectorI.h.

Referenced by SetSI2Local().

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

current neutrino ray's start position (global)

Definition at line 74 of file GeomVolSelectorI.h.

Referenced by SetCurrentRay().


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