Concrete Tool to create G4 Physics Regions.
More...
#include "G4AtlasTools/RegionCreator.h"
|
| Gaudi::Property< std::string > | m_regionName {this, "RegionName", "", "Region name (same as the Tool name if not set)"} |
| Gaudi::Property< double > | m_gammaCut {this, "GammaCut", 1.*Gaudi::Units::mm, "Cut to be applied for gammas"} |
| Gaudi::Property< double > | m_electronCut {this, "ElectronCut", 1., "Cut to be applied for electrons"} |
| Gaudi::Property< double > | m_positronCut {this, "PositronCut", 1., "Cut to be applied for positrons"} |
| Gaudi::Property< double > | m_protonCut {this, "ProtonCut", 1., "Cut to be applied for gammas"} |
| Gaudi::Property< std::vector< std::string > > | m_logicalVolumes {this, "VolumeList", {}, "List of volumes to be included in this region"} |
| BooleanProperty | m_dumpRegion {this, "DumpRegion", false, ""} |
Concrete Tool to create G4 Physics Regions.
- Author
- ADA
- Date
- 2015-03-23
Definition at line 25 of file RegionCreator.h.
◆ RegionCreator()
| RegionCreator::RegionCreator |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ ~RegionCreator()
| RegionCreator::~RegionCreator |
( |
| ) |
|
|
inline |
◆ Construct()
| void RegionCreator::Construct |
( |
| ) |
|
|
override |
Definition at line 38 of file RegionCreator.cxx.
39{
40
42
43
44 size_t nVolumes{0};
45 G4LogicalVolumeStore* logStore=G4LogicalVolumeStore::GetInstance();
47 size_t nVolumesCurrent{0};
48 for (auto* it: *logStore)
49 {
50
51 if (vol ==
static_cast<const std::string&
>(
it->GetName()))
52 {
53 nVolumesCurrent++;
54 it->SetRegion(theRegion);
55 theRegion->AddRootLogicalVolume(it);
56 }
57 }
58 if (nVolumesCurrent==0) {
59 ATH_MSG_WARNING(
"No volumes matching \"" << vol <<
"\" found in G4 LogicalVolumeStore. " <<
m_regionName.value() <<
" G4PhysicsRegion may not behave as intended.");
60 }
61 nVolumes += nVolumesCurrent;
62 }
63
65
66
67 G4ProductionCuts*
cuts=
new G4ProductionCuts();
72
73
74 theRegion->SetProductionCuts(cuts);
75
77}
#define ATH_MSG_WARNING(x)
Gaudi::Property< std::string > m_regionName
Gaudi::Property< double > m_electronCut
Gaudi::Property< std::vector< std::string > > m_logicalVolumes
Gaudi::Property< double > m_protonCut
Gaudi::Property< double > m_gammaCut
BooleanProperty m_dumpRegion
Gaudi::Property< double > m_positronCut
◆ Dump()
| void RegionCreator::Dump |
( |
| ) |
|
|
override |
Definition at line 79 of file RegionCreator.cxx.
80{
81 ATH_MSG_INFO(
"+----------------------------------------------------+");
86 {
88 }
96 ATH_MSG_INFO(
"+----------------------------------------------------+");
97}
◆ initialize()
| StatusCode RegionCreator::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 21 of file RegionCreator.cxx.
22{
26
32 }
34 }
35 return StatusCode::SUCCESS;
36}
#define ATH_MSG_VERBOSE(x)
◆ m_dumpRegion
| BooleanProperty RegionCreator::m_dumpRegion {this, "DumpRegion", false, ""} |
|
private |
◆ m_electronCut
| Gaudi::Property<double> RegionCreator::m_electronCut {this, "ElectronCut", 1., "Cut to be applied for electrons"} |
|
private |
Definition at line 40 of file RegionCreator.h.
40{this, "ElectronCut", 1., "Cut to be applied for electrons"};
◆ m_gammaCut
| Gaudi::Property<double> RegionCreator::m_gammaCut {this, "GammaCut", 1.*Gaudi::Units::mm, "Cut to be applied for gammas"} |
|
private |
Definition at line 39 of file RegionCreator.h.
39{this, "GammaCut", 1.*Gaudi::Units::mm, "Cut to be applied for gammas"};
◆ m_logicalVolumes
| Gaudi::Property<std::vector<std::string> > RegionCreator::m_logicalVolumes {this, "VolumeList", {}, "List of volumes to be included in this region"} |
|
private |
Definition at line 43 of file RegionCreator.h.
43{this, "VolumeList", {}, "List of volumes to be included in this region"};
◆ m_positronCut
| Gaudi::Property<double> RegionCreator::m_positronCut {this, "PositronCut", 1., "Cut to be applied for positrons"} |
|
private |
Definition at line 41 of file RegionCreator.h.
41{this, "PositronCut", 1., "Cut to be applied for positrons"};
◆ m_protonCut
| Gaudi::Property<double> RegionCreator::m_protonCut {this, "ProtonCut", 1., "Cut to be applied for gammas"} |
|
private |
Definition at line 42 of file RegionCreator.h.
42{this, "ProtonCut", 1., "Cut to be applied for gammas"};
◆ m_regionName
| Gaudi::Property<std::string> RegionCreator::m_regionName {this, "RegionName", "", "Region name (same as the Tool name if not set)"} |
|
private |
Definition at line 38 of file RegionCreator.h.
38{this, "RegionName", "", "Region name (same as the Tool name if not set)"};
The documentation for this class was generated from the following files: