ATLAS Offline Software
Loading...
Searching...
No Matches
LArFastShowerTool Class Reference

NEEDS DOCUMENTATION. More...

#include <LArFastShowerTool.h>

Inheritance diagram for LArFastShowerTool:
Collaboration diagram for LArFastShowerTool:

Public Member Functions

 LArFastShowerTool (const std::string &type, const std::string &name, const IInterface *parent)
 Default constructor.
virtual ~LArFastShowerTool ()=default
StatusCode initialize () override final
StatusCode initializeFastSim () override
 Construct and setup the fast simulation model.
virtual StatusCode BeginOfAthenaEvent () override
 Begin of an athena event - do anything that needs to be done at the beginning of each athena event.
virtual StatusCode EndOfAthenaEvent () override
 End of an athena event - do any tidying up required at the end of each athena event.

Protected Member Functions

virtual G4VFastSimulationModel * makeFastSimModel () override final
 Method to make the actual fast simulation model itself, which will be owned by the tool.
G4Region * getRegion () const

Protected Attributes

Gaudi::Property< std::string > m_regionName {this, "RegionName", ""}
 The region to which this fast sim is assigned.
Gaudi::Property< bool > m_noRegions {this, "NoRegions", false}
 This Fast Simulation has no regions associated with it.

Private Attributes

Gaudi::Property< std::string > m_fastSimDedicatedSD
 Shower library sensitive detector for this shower.
ServiceHandle< ILArG4ShowerLibSvcm_showerLibSvc
 Pointer to the shower library service.
Gaudi::Property< bool > m_e_FlagShowerLib {this, "EFlagToShowerLib", true, "Switch for e+/- frozen showers"}
Gaudi::Property< double > m_e_MinEneShowerLib {this, "EMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for e+/- frozen showers"}
Gaudi::Property< double > m_e_MaxEneShowerLib {this, "EMaxEneShowerLib", 1.0*CLHEP::GeV, "Maximum energy for e+/- frozen showers"}
Gaudi::Property< bool > m_g_FlagShowerLib {this, "GFlagToShowerLib", true, "Switch for photon frozen showers"}
Gaudi::Property< double > m_g_MinEneShowerLib {this, "GMinEneShowerLib", 0.*CLHEP::GeV, "Minimum energy for photon frozen showers"}
Gaudi::Property< double > m_g_MaxEneShowerLib {this, "GMaxEneShowerLib", 0.010*CLHEP::GeV, "Maximum energy for photon frozen showers"}
Gaudi::Property< bool > m_Neut_FlagShowerLib {this, "NeutFlagToShowerLib", true, "Switch for neutron frozen showers"}
Gaudi::Property< double > m_Neut_MinEneShowerLib {this, "NeutMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for neutron frozen showers"}
Gaudi::Property< double > m_Neut_MaxEneShowerLib {this, "NeutMaxEneShowerLib", 0.1*CLHEP::GeV, "Maximum energy for neutron frozen showers"}
Gaudi::Property< bool > m_Pion_FlagShowerLib {this, "PionFlagToShowerLib", true, "Switch for neutron frozen showers"}
Gaudi::Property< double > m_Pion_MinEneShowerLib {this, "PionMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for neutron frozen showers"}
Gaudi::Property< double > m_Pion_MaxEneShowerLib {this, "PionMaxEneShowerLib", 2.0*CLHEP::GeV, "Maximum energy for neutron frozen showers"}
Gaudi::Property< bool > m_containLow {this, "ContainLow", true, "Switch for containment at low eta"}
Gaudi::Property< double > m_absLowEta {this, "AbsLowEta", 3.8, ""}
Gaudi::Property< bool > m_containHigh {this, "ContainHigh", true, "Switch for containment at high eta"}
Gaudi::Property< double > m_absHighEta {this, "AbsHighEta", 4.4, ""}
Gaudi::Property< bool > m_containCrack {this, "ContainCrack", true, "Switch for containment in the crack region"}
Gaudi::Property< double > m_absCrackEta1 {this, "AbsCrackEta1", 0.5, ""}
Gaudi::Property< double > m_absCrackEta2 {this, "AbsCrackEta2", 1.1, ""}
Gaudi::Property< std::string > m_generated_starting_points_file
Gaudi::Property< float > m_generated_starting_points_ratio
Gaudi::Property< int > m_detector_tag {this, "DetectorTag", 0, "Which detector is this?"}
Gaudi::Property< bool > m_applyRRWeights
FastShowerConfigStruct m_configuration

Detailed Description

NEEDS DOCUMENTATION.

Definition at line 20 of file LArFastShowerTool.h.

Constructor & Destructor Documentation

◆ LArFastShowerTool()

LArFastShowerTool::LArFastShowerTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Default constructor.

Definition at line 12 of file LArFastShowerTool.cxx.

15 : FastSimulationBase(type, name, parent)
16{
17}
FastSimulationBase(const std::string &type, const std::string &name, const IInterface *parent)

◆ ~LArFastShowerTool()

virtual LArFastShowerTool::~LArFastShowerTool ( )
virtualdefault

Member Function Documentation

◆ BeginOfAthenaEvent()

virtual StatusCode FastSimulationBase::BeginOfAthenaEvent ( )
inlineoverridevirtualinherited

Begin of an athena event - do anything that needs to be done at the beginning of each athena event.

Definition at line 42 of file FastSimulationBase.h.

42{ return StatusCode::SUCCESS; }

◆ EndOfAthenaEvent()

virtual StatusCode FastSimulationBase::EndOfAthenaEvent ( )
inlineoverridevirtualinherited

End of an athena event - do any tidying up required at the end of each athena event.

Definition at line 45 of file FastSimulationBase.h.

45{ return StatusCode::SUCCESS; }

◆ getRegion()

G4Region * FastSimulationBase::getRegion ( ) const
protectedinherited

Definition at line 18 of file FastSimulationBase.cxx.

19{
20 if (m_regionName.value().empty()) {
21 return nullptr;
22 }
23 return G4RegionStore::GetInstance()->GetRegion(m_regionName.value());
24}
Gaudi::Property< std::string > m_regionName
The region to which this fast sim is assigned.

◆ initialize()

StatusCode LArFastShowerTool::initialize ( )
finaloverride

Definition at line 19 of file LArFastShowerTool.cxx.

20{
21 ATH_MSG_VERBOSE( name() << "::initialize()" );
22 CHECK( m_showerLibSvc.retrieve() );
23
24 m_configuration.m_showerLibSvcName = m_showerLibSvc.name();
25
26 m_configuration.m_e_FlagShowerLib = m_e_FlagShowerLib;
27 m_configuration.m_e_MinEneShowerLib = m_e_MinEneShowerLib;
28 m_configuration.m_e_MaxEneShowerLib = m_e_MaxEneShowerLib;
29
30 m_configuration.m_g_FlagShowerLib = m_g_FlagShowerLib;
31 m_configuration.m_g_MinEneShowerLib = m_g_MinEneShowerLib;
32 m_configuration.m_g_MaxEneShowerLib = m_g_MaxEneShowerLib;
33
34 m_configuration.m_Neut_FlagShowerLib = m_Neut_FlagShowerLib;
35 m_configuration.m_Neut_MinEneShowerLib = m_Neut_MinEneShowerLib;
36 m_configuration.m_Neut_MaxEneShowerLib = m_Neut_MaxEneShowerLib;
37
38 m_configuration.m_Pion_FlagShowerLib = m_Pion_FlagShowerLib;
39 m_configuration.m_Pion_MinEneShowerLib = m_Pion_MinEneShowerLib;
40 m_configuration.m_Pion_MaxEneShowerLib = m_Pion_MaxEneShowerLib;
41
42 m_configuration.m_containLow = m_containLow;
43 m_configuration.m_absLowEta = m_absLowEta;
44 m_configuration.m_containHigh = m_containHigh;
45 m_configuration.m_absHighEta = m_absHighEta;
46 m_configuration.m_containCrack = m_containCrack;
47 m_configuration.m_absCrackEta1 = m_absCrackEta1;
48 m_configuration.m_absCrackEta2 = m_absCrackEta2;
49
50 m_configuration.m_generated_starting_points_file = m_generated_starting_points_file;
51 m_configuration.m_generated_starting_points_ratio = m_generated_starting_points_ratio;
52 m_configuration.m_detector_tag = m_detector_tag;
53 m_configuration.m_applyRRWeights = m_applyRRWeights;
54
55 return FastSimulationBase::initialize();
56}
#define ATH_MSG_VERBOSE(x)
#define CHECK(...)
Evaluate an expression and check for errors.
Gaudi::Property< double > m_g_MinEneShowerLib
Gaudi::Property< double > m_Pion_MinEneShowerLib
Gaudi::Property< double > m_Neut_MaxEneShowerLib
Gaudi::Property< int > m_detector_tag
Gaudi::Property< double > m_e_MinEneShowerLib
Gaudi::Property< bool > m_Neut_FlagShowerLib
Gaudi::Property< bool > m_g_FlagShowerLib
Gaudi::Property< double > m_e_MaxEneShowerLib
Gaudi::Property< float > m_generated_starting_points_ratio
Gaudi::Property< double > m_absCrackEta2
Gaudi::Property< bool > m_containCrack
Gaudi::Property< bool > m_Pion_FlagShowerLib
ServiceHandle< ILArG4ShowerLibSvc > m_showerLibSvc
Pointer to the shower library service.
FastShowerConfigStruct m_configuration
Gaudi::Property< double > m_g_MaxEneShowerLib
Gaudi::Property< bool > m_containHigh
Gaudi::Property< double > m_absCrackEta1
Gaudi::Property< bool > m_e_FlagShowerLib
Gaudi::Property< double > m_Neut_MinEneShowerLib
Gaudi::Property< double > m_Pion_MaxEneShowerLib
Gaudi::Property< bool > m_containLow
Gaudi::Property< std::string > m_generated_starting_points_file
Gaudi::Property< bool > m_applyRRWeights
Gaudi::Property< double > m_absLowEta
Gaudi::Property< double > m_absHighEta

◆ initializeFastSim()

StatusCode FastSimulationBase::initializeFastSim ( )
overrideinherited

Construct and setup the fast simulation model.

This method invokes the makeFastSimModel of the derived concrete tool type. It is the derived class's responsibility to assign the fast simulation model to the correct regions. The fast simulation model is registered for deletion. In multi-threaded jobs, this method is called once on each geant4 worker thread during detector construction (ConstructSDandField).

Definition at line 28 of file FastSimulationBase.cxx.

28 {
29 ATH_MSG_VERBOSE( name() << "::initializeFastSim()" );
30
31 // Instantiate the FastSimModel for this geant4 thread and register it for deletion
32 G4AutoDelete::Register(makeFastSimModel());
33
34 return StatusCode::SUCCESS;
35}

◆ makeFastSimModel()

G4VFastSimulationModel * LArFastShowerTool::makeFastSimModel ( )
finaloverrideprotectedvirtual

Method to make the actual fast simulation model itself, which will be owned by the tool.

Must be implemented in all concrete base classes.

Definition at line 58 of file LArFastShowerTool.cxx.

59{
60 ATH_MSG_DEBUG( "Initializing Fast Sim Model" );
61 IFastSimDedicatedSD* fastSD = dynamic_cast<IFastSimDedicatedSD*>(G4SDManager::GetSDMpointer()->FindSensitiveDetector(m_fastSimDedicatedSD.value(), false));
62 if (fastSD) {
63 ATH_MSG_DEBUG( "SD " << m_fastSimDedicatedSD << " already created." );
64 } else if ("BarrelFastSimDedicatedSD" == m_fastSimDedicatedSD){
65 fastSD = new BarrelFastSimDedicatedSD( &*detStore(), msgLevel(MSG::DEBUG) );
66 } else if ("EndcapFastSimDedicatedSD" == m_fastSimDedicatedSD){
67 fastSD = new EndcapFastSimDedicatedSD( &*detStore(), msgLevel(MSG::DEBUG) );
68 } else if ("FCALFastSimDedicatedSD" == m_fastSimDedicatedSD){
69 fastSD = new FCALFastSimDedicatedSD( &*detStore(), msgLevel(MSG::DEBUG) );
70 } else {
71 ATH_MSG_FATAL( "Fast sim SD type " << m_fastSimDedicatedSD << " not found!" );
72 throw std::runtime_error("Bad SD name");
73 }
74 G4SDManager::GetSDMpointer()->AddNewDetector(fastSD);
75
76 // Create a fresh Fast Sim Model
77 return new LArFastShower(name(), getRegion(), m_configuration, fastSD);
78}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
G4Region * getRegion() const
Gaudi::Property< std::string > m_fastSimDedicatedSD
Shower library sensitive detector for this shower.

Member Data Documentation

◆ m_absCrackEta1

Gaudi::Property<double> LArFastShowerTool::m_absCrackEta1 {this, "AbsCrackEta1", 0.5, ""}
private

Definition at line 63 of file LArFastShowerTool.h.

63{this, "AbsCrackEta1", 0.5, ""};

◆ m_absCrackEta2

Gaudi::Property<double> LArFastShowerTool::m_absCrackEta2 {this, "AbsCrackEta2", 1.1, ""}
private

Definition at line 64 of file LArFastShowerTool.h.

64{this, "AbsCrackEta2", 1.1, ""};

◆ m_absHighEta

Gaudi::Property<double> LArFastShowerTool::m_absHighEta {this, "AbsHighEta", 4.4, ""}
private

Definition at line 61 of file LArFastShowerTool.h.

61{this, "AbsHighEta", 4.4, ""};

◆ m_absLowEta

Gaudi::Property<double> LArFastShowerTool::m_absLowEta {this, "AbsLowEta", 3.8, ""}
private

Definition at line 59 of file LArFastShowerTool.h.

59{this, "AbsLowEta", 3.8, ""};

◆ m_applyRRWeights

Gaudi::Property<bool> LArFastShowerTool::m_applyRRWeights
private
Initial value:
{this, "ApplyRRWeights", false
, "Should the weights set by NRR/PRR be applied to Frozen Shower Energy deposits?"}

Definition at line 72 of file LArFastShowerTool.h.

72 {this, "ApplyRRWeights", false
73 , "Should the weights set by NRR/PRR be applied to Frozen Shower Energy deposits?"};

◆ m_configuration

FastShowerConfigStruct LArFastShowerTool::m_configuration
private

Definition at line 75 of file LArFastShowerTool.h.

◆ m_containCrack

Gaudi::Property<bool> LArFastShowerTool::m_containCrack {this, "ContainCrack", true, "Switch for containment in the crack region"}
private

Definition at line 62 of file LArFastShowerTool.h.

62{this, "ContainCrack", true, "Switch for containment in the crack region"};

◆ m_containHigh

Gaudi::Property<bool> LArFastShowerTool::m_containHigh {this, "ContainHigh", true, "Switch for containment at high eta"}
private

Definition at line 60 of file LArFastShowerTool.h.

60{this, "ContainHigh", true, "Switch for containment at high eta"};

◆ m_containLow

Gaudi::Property<bool> LArFastShowerTool::m_containLow {this, "ContainLow", true, "Switch for containment at low eta"}
private

Definition at line 58 of file LArFastShowerTool.h.

58{this, "ContainLow", true, "Switch for containment at low eta"};

◆ m_detector_tag

Gaudi::Property<int> LArFastShowerTool::m_detector_tag {this, "DetectorTag", 0, "Which detector is this?"}
private

Definition at line 70 of file LArFastShowerTool.h.

70{this, "DetectorTag", 0, "Which detector is this?"};

◆ m_e_FlagShowerLib

Gaudi::Property<bool> LArFastShowerTool::m_e_FlagShowerLib {this, "EFlagToShowerLib", true, "Switch for e+/- frozen showers"}
private

Definition at line 42 of file LArFastShowerTool.h.

42{this, "EFlagToShowerLib", true, "Switch for e+/- frozen showers"};

◆ m_e_MaxEneShowerLib

Gaudi::Property<double> LArFastShowerTool::m_e_MaxEneShowerLib {this, "EMaxEneShowerLib", 1.0*CLHEP::GeV, "Maximum energy for e+/- frozen showers"}
private

Definition at line 44 of file LArFastShowerTool.h.

44{this, "EMaxEneShowerLib", 1.0*CLHEP::GeV, "Maximum energy for e+/- frozen showers"};

◆ m_e_MinEneShowerLib

Gaudi::Property<double> LArFastShowerTool::m_e_MinEneShowerLib {this, "EMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for e+/- frozen showers"}
private

Definition at line 43 of file LArFastShowerTool.h.

43{this, "EMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for e+/- frozen showers"};

◆ m_fastSimDedicatedSD

Gaudi::Property<std::string> LArFastShowerTool::m_fastSimDedicatedSD
private
Initial value:
{this, "SensitiveDetector", ""
, "Fast sim dedicated SD for this setup"}

Shower library sensitive detector for this shower.

Definition at line 37 of file LArFastShowerTool.h.

37 {this, "SensitiveDetector", ""
38 , "Fast sim dedicated SD for this setup"};

◆ m_g_FlagShowerLib

Gaudi::Property<bool> LArFastShowerTool::m_g_FlagShowerLib {this, "GFlagToShowerLib", true, "Switch for photon frozen showers"}
private

Definition at line 46 of file LArFastShowerTool.h.

46{this, "GFlagToShowerLib", true, "Switch for photon frozen showers"};

◆ m_g_MaxEneShowerLib

Gaudi::Property<double> LArFastShowerTool::m_g_MaxEneShowerLib {this, "GMaxEneShowerLib", 0.010*CLHEP::GeV, "Maximum energy for photon frozen showers"}
private

Definition at line 48 of file LArFastShowerTool.h.

48{this, "GMaxEneShowerLib", 0.010*CLHEP::GeV, "Maximum energy for photon frozen showers"};

◆ m_g_MinEneShowerLib

Gaudi::Property<double> LArFastShowerTool::m_g_MinEneShowerLib {this, "GMinEneShowerLib", 0.*CLHEP::GeV, "Minimum energy for photon frozen showers"}
private

Definition at line 47 of file LArFastShowerTool.h.

47{this, "GMinEneShowerLib", 0.*CLHEP::GeV, "Minimum energy for photon frozen showers"};

◆ m_generated_starting_points_file

Gaudi::Property<std::string> LArFastShowerTool::m_generated_starting_points_file
private
Initial value:
{this, "GeneratedStartingPointsFile", "",
"Name of file for generated SPs. Do not touch until you want to produce a new library"}

Definition at line 66 of file LArFastShowerTool.h.

66 {this, "GeneratedStartingPointsFile", "",
67 "Name of file for generated SPs. Do not touch until you want to produce a new library"};

◆ m_generated_starting_points_ratio

Gaudi::Property<float> LArFastShowerTool::m_generated_starting_points_ratio
private
Initial value:
{this, "GeneratedStartingPointsRatio", 0.02f
, "Ratio of SPs that goes to output"}

Definition at line 68 of file LArFastShowerTool.h.

68 {this, "GeneratedStartingPointsRatio", 0.02f
69 , "Ratio of SPs that goes to output"};

◆ m_Neut_FlagShowerLib

Gaudi::Property<bool> LArFastShowerTool::m_Neut_FlagShowerLib {this, "NeutFlagToShowerLib", true, "Switch for neutron frozen showers"}
private

Definition at line 50 of file LArFastShowerTool.h.

50{this, "NeutFlagToShowerLib", true, "Switch for neutron frozen showers"};

◆ m_Neut_MaxEneShowerLib

Gaudi::Property<double> LArFastShowerTool::m_Neut_MaxEneShowerLib {this, "NeutMaxEneShowerLib", 0.1*CLHEP::GeV, "Maximum energy for neutron frozen showers"}
private

Definition at line 52 of file LArFastShowerTool.h.

52{this, "NeutMaxEneShowerLib", 0.1*CLHEP::GeV, "Maximum energy for neutron frozen showers"};

◆ m_Neut_MinEneShowerLib

Gaudi::Property<double> LArFastShowerTool::m_Neut_MinEneShowerLib {this, "NeutMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for neutron frozen showers"}
private

Definition at line 51 of file LArFastShowerTool.h.

51{this, "NeutMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for neutron frozen showers"};

◆ m_noRegions

Gaudi::Property<bool> FastSimulationBase::m_noRegions {this, "NoRegions", false}
protectedinherited

This Fast Simulation has no regions associated with it.

Definition at line 54 of file FastSimulationBase.h.

54{this, "NoRegions", false};

◆ m_Pion_FlagShowerLib

Gaudi::Property<bool> LArFastShowerTool::m_Pion_FlagShowerLib {this, "PionFlagToShowerLib", true, "Switch for neutron frozen showers"}
private

Definition at line 54 of file LArFastShowerTool.h.

54{this, "PionFlagToShowerLib", true, "Switch for neutron frozen showers"};

◆ m_Pion_MaxEneShowerLib

Gaudi::Property<double> LArFastShowerTool::m_Pion_MaxEneShowerLib {this, "PionMaxEneShowerLib", 2.0*CLHEP::GeV, "Maximum energy for neutron frozen showers"}
private

Definition at line 56 of file LArFastShowerTool.h.

56{this, "PionMaxEneShowerLib", 2.0*CLHEP::GeV, "Maximum energy for neutron frozen showers"};

◆ m_Pion_MinEneShowerLib

Gaudi::Property<double> LArFastShowerTool::m_Pion_MinEneShowerLib {this, "PionMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for neutron frozen showers"}
private

Definition at line 55 of file LArFastShowerTool.h.

55{this, "PionMinEneShowerLib", 0.0*CLHEP::GeV, "Minimum energy for neutron frozen showers"};

◆ m_regionName

Gaudi::Property<std::string> FastSimulationBase::m_regionName {this, "RegionName", ""}
protectedinherited

The region to which this fast sim is assigned.

Definition at line 52 of file FastSimulationBase.h.

52{this, "RegionName", ""};

◆ m_showerLibSvc

ServiceHandle<ILArG4ShowerLibSvc> LArFastShowerTool::m_showerLibSvc
private
Initial value:
{this, "ShowerLibSvc", "LArG4ShowerLibSvc"
, "Handle on the shower library service"}

Pointer to the shower library service.

Definition at line 39 of file LArFastShowerTool.h.

39 {this, "ShowerLibSvc", "LArG4ShowerLibSvc"
40 , "Handle on the shower library service"};

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