LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
artg4tk::DetectorBase Class Referenceabstract

#include "DetectorBase.hh"

Inheritance diagram for artg4tk::DetectorBase:
larg4::LArG4DetectorService

Public Member Functions

 DetectorBase (fhicl::ParameterSet const &p, std::string myName, std::string category, std::string motherCategory)
 
virtual ~DetectorBase ()=default
 
virtual void initialize ()
 
void buildLVs ()
 
std::vector< G4VPhysicalVolume * > placeToPVs (std::vector< G4LogicalVolume * > motherLVs)
 
void callArtProduces (art::ProducesCollector &produces_coll)
 
void fillEventWithArtHits (G4HCofThisEvent *hc)
 
std::vector< G4VPhysicalVolume * > pvs () const
 
std::vector< G4LogicalVolume * > lvs () const
 
std::string const & myName () const
 
std::string const & category () const
 
std::string const & motherCategory () const
 
fhicl::ParameterSet const & parameters () const
 

Private Member Functions

virtual std::vector< G4LogicalVolume * > doBuildLVs ()=0
 
virtual std::vector< G4VPhysicalVolume * > doPlaceToPVs (std::vector< G4LogicalVolume * > motherLV)=0
 
virtual void doCallArtProduces (art::ProducesCollector &produces_coll)
 
virtual void doFillEventWithArtHits (G4HCofThisEvent *)
 

Private Attributes

fhicl::ParameterSet _myParams
 
std::string _myName
 
std::string _category
 
std::string _motherCategory
 
std::vector< G4LogicalVolume * > _myLVs
 
std::vector< G4VPhysicalVolume * > _myPVs
 

Detailed Description

Definition at line 64 of file DetectorBase.hh.

Constructor & Destructor Documentation

artg4tk::DetectorBase::DetectorBase ( fhicl::ParameterSet const &  p,
std::string  myName,
std::string  category,
std::string  motherCategory 
)
inline

Definition at line 75 of file DetectorBase.hh.

80  , _myName(myName)
83  , _myLVs(0)
84  , _myPVs(0)
85  {
86  // Register ourselves
88  detectorHolder->registerDetector(this);
89  }
std::string _motherCategory
std::vector< G4VPhysicalVolume * > _myPVs
std::string const & myName() const
fhicl::ParameterSet _myParams
std::string const & motherCategory() const
std::string const & category() const
std::vector< G4LogicalVolume * > _myLVs
virtual artg4tk::DetectorBase::~DetectorBase ( )
virtualdefault

Member Function Documentation

void artg4tk::DetectorBase::buildLVs ( )
inline

Definition at line 100 of file DetectorBase.hh.

101  {
102  _myLVs = doBuildLVs();
103  }
virtual std::vector< G4LogicalVolume * > doBuildLVs()=0
std::vector< G4LogicalVolume * > _myLVs
void artg4tk::DetectorBase::callArtProduces ( art::ProducesCollector produces_coll)
inline

Definition at line 118 of file DetectorBase.hh.

119  {
120  doCallArtProduces(produces_coll);
121  }
virtual void doCallArtProduces(art::ProducesCollector &produces_coll)
std::string const& artg4tk::DetectorBase::category ( ) const
inline
virtual std::vector<G4LogicalVolume*> artg4tk::DetectorBase::doBuildLVs ( )
privatepure virtual

Implemented in larg4::LArG4DetectorService.

virtual void artg4tk::DetectorBase::doCallArtProduces ( art::ProducesCollector produces_coll)
inlineprivatevirtual

Reimplemented in larg4::LArG4DetectorService.

Definition at line 190 of file DetectorBase.hh.

191  {}
virtual void artg4tk::DetectorBase::doFillEventWithArtHits ( G4HCofThisEvent )
inlineprivatevirtual

Reimplemented in larg4::LArG4DetectorService.

Definition at line 196 of file DetectorBase.hh.

197  {}
virtual std::vector<G4VPhysicalVolume*> artg4tk::DetectorBase::doPlaceToPVs ( std::vector< G4LogicalVolume * >  motherLV)
privatepure virtual

Implemented in larg4::LArG4DetectorService.

void artg4tk::DetectorBase::fillEventWithArtHits ( G4HCofThisEvent hc)
inline

Definition at line 126 of file DetectorBase.hh.

127  {
129  }
virtual void doFillEventWithArtHits(G4HCofThisEvent *)
virtual void artg4tk::DetectorBase::initialize ( )
inlinevirtual

Definition at line 95 of file DetectorBase.hh.

95 {};
std::vector<G4LogicalVolume*> artg4tk::DetectorBase::lvs ( ) const
inline

Definition at line 142 of file DetectorBase.hh.

143  {
144  return _myLVs;
145  }
std::vector< G4LogicalVolume * > _myLVs
std::string const& artg4tk::DetectorBase::motherCategory ( ) const
inline

Definition at line 163 of file DetectorBase.hh.

Referenced by artg4tk::DetectorHolderService::placeDetector().

164  {
165  return _motherCategory;
166  }
std::string _motherCategory
std::string const& artg4tk::DetectorBase::myName ( ) const
inline

Definition at line 149 of file DetectorBase.hh.

Referenced by larg4::LArG4DetectorService::instanceName(), and artg4tk::DetectorHolderService::registerDetector().

150  {
151  return _myName;
152  }
fhicl::ParameterSet const& artg4tk::DetectorBase::parameters ( ) const
inline

Definition at line 170 of file DetectorBase.hh.

Referenced by artg4tk::DetectorHolderService::getParametersForCategory().

171  {
172  return _myParams;
173  }
fhicl::ParameterSet _myParams
std::vector<G4VPhysicalVolume*> artg4tk::DetectorBase::placeToPVs ( std::vector< G4LogicalVolume * >  motherLVs)
inline

Definition at line 109 of file DetectorBase.hh.

Referenced by artg4tk::DetectorHolderService::placeDetector().

110  {
111  _myPVs = doPlaceToPVs(motherLVs);
112  return _myPVs;
113  }
std::vector< G4VPhysicalVolume * > _myPVs
virtual std::vector< G4VPhysicalVolume * > doPlaceToPVs(std::vector< G4LogicalVolume * > motherLV)=0
std::vector<G4VPhysicalVolume*> artg4tk::DetectorBase::pvs ( ) const
inline

Definition at line 135 of file DetectorBase.hh.

136  {
137  return _myPVs;
138  }
std::vector< G4VPhysicalVolume * > _myPVs

Member Data Documentation

std::string artg4tk::DetectorBase::_category
private

Definition at line 208 of file DetectorBase.hh.

std::string artg4tk::DetectorBase::_motherCategory
private

Definition at line 211 of file DetectorBase.hh.

std::vector<G4LogicalVolume*> artg4tk::DetectorBase::_myLVs
private

Definition at line 214 of file DetectorBase.hh.

std::string artg4tk::DetectorBase::_myName
private

Definition at line 205 of file DetectorBase.hh.

fhicl::ParameterSet artg4tk::DetectorBase::_myParams
private

Definition at line 202 of file DetectorBase.hh.

std::vector<G4VPhysicalVolume*> artg4tk::DetectorBase::_myPVs
private

Definition at line 217 of file DetectorBase.hh.


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