k4SimGeant4
Loading...
Searching...
No Matches
SimG4UserLimitRegion.h
Go to the documentation of this file.
1#ifndef SIMG4FULL_SIMG4USERLIMITREGION_H
2#define SIMG4FULL_SIMG4USERLIMITREGION_H
3
4#include <cfloat>
5
6// Gaudi
7#include "GaudiKernel/AlgTool.h"
8#include "GaudiKernel/ToolHandle.h"
9
10// FCCSW
13
14// Geant
15#include "G4UserLimits.hh"
16class G4Region;
17
26class SimG4UserLimitRegion : public AlgTool, virtual public ISimG4RegionTool {
27public:
28 explicit SimG4UserLimitRegion(const std::string& type, const std::string& name, const IInterface* parent);
29 virtual ~SimG4UserLimitRegion();
33 virtual StatusCode initialize() final;
37 virtual StatusCode finalize() final;
41 virtual StatusCode create() final;
42
43private:
46 std::vector<G4Region*> m_g4regions;
48 std::vector<std::unique_ptr<G4UserLimits>> m_userLimits;
50 Gaudi::Property<std::vector<std::string>> m_volumeNames{this, "volumeNames", {}, "Names of the volumes"};
52 Gaudi::Property<double> m_maxStep{this, "maxStep", DBL_MAX, "maximum step"};
54 Gaudi::Property<double> m_maxTrack{this, "maxTrack", DBL_MAX, "maximum total track length"};
56 Gaudi::Property<double> m_maxTime{this, "maxTime", DBL_MAX, "max time"};
58 Gaudi::Property<double> m_minKineticEnergy{this, "minKineticEnergy", 0, "min kinetic energy"};
60 Gaudi::Property<double> m_minRange{this, "minRange", 0, "min remaining range "};
61};
62
63#endif /* SIMG4FULL_SIMG4USERLIMITREGION_H */
Interface to the tool creating region.
Definition ISimG4RegionTool.h:14
Tool for creating regions with user limits.
Definition SimG4UserLimitRegion.h:26
SimG4UserLimitRegion(const std::string &type, const std::string &name, const IInterface *parent)
Definition SimG4UserLimitRegion.cpp:12
Gaudi::Property< double > m_minKineticEnergy
min kinetic energy (only for charged particles) (set by job options)
Definition SimG4UserLimitRegion.h:58
std::vector< std::unique_ptr< G4UserLimits > > m_userLimits
User limits.
Definition SimG4UserLimitRegion.h:48
Gaudi::Property< double > m_maxStep
max allowed Step size in this volume (set by job options)
Definition SimG4UserLimitRegion.h:52
std::vector< G4Region * > m_g4regions
Regions used to set user limits deleted by the G4RegionStore.
Definition SimG4UserLimitRegion.h:46
Gaudi::Property< double > m_maxTrack
max total track length (set by job options)
Definition SimG4UserLimitRegion.h:54
virtual StatusCode create() final
Create regions and fast simulation models.
Definition SimG4UserLimitRegion.cpp:33
Gaudi::Property< double > m_minRange
min remaining range (only for charged particles) (set by job options)
Definition SimG4UserLimitRegion.h:60
Gaudi::Property< std::vector< std::string > > m_volumeNames
Names of the volumes where user limits should be attached (set by job options)
Definition SimG4UserLimitRegion.h:50
virtual StatusCode finalize() final
Finalize.
Definition SimG4UserLimitRegion.cpp:31
virtual StatusCode initialize() final
Initialize.
Definition SimG4UserLimitRegion.cpp:20
Gaudi::Property< double > m_maxTime
max time (set by job options)
Definition SimG4UserLimitRegion.h:56
virtual ~SimG4UserLimitRegion()
Definition SimG4UserLimitRegion.cpp:17