LDMX Software
Public Member Functions | Private Attributes | List of all members
simcore::GammaPhysics Class Reference

extra gamma particle physics for simulation and sets up the photonuclear model to use from the configuration More...

Public Member Functions

 GammaPhysics (const G4String &name, const framework::config::Parameters &parameters)
 Class constructor.
 
virtual ~GammaPhysics ()=default
 Class destructor.
 
void ConstructParticle () final
 Construct particles.
 
void ConstructProcess () final
 We do two things for this call back during initialization.
 

Private Attributes

G4GammaConversionToMuons gammaConvProcess
 The gamma to muons process.
 
framework::config::Parameters modelParameters
 Parameters from the configuration to pass along to the photonuclear model.
 

Detailed Description

extra gamma particle physics for simulation and sets up the photonuclear model to use from the configuration

Note

Is responsible for selecting the photonuclear model from the python configuration. Currently adds gamma -> mumu reaction using the G4GammaConversionToMuons process. Also changes ordering of gamma processes such that photonNuclear and GammaToMuMu are called first.

Definition at line 36 of file GammaPhysics.h.

Constructor & Destructor Documentation

◆ GammaPhysics()

simcore::GammaPhysics::GammaPhysics ( const G4String &  name,
const framework::config::Parameters parameters 
)

Class constructor.

Parameters
nameThe name of the physics.
parametersThe python configuration

Definition at line 12 of file GammaPhysics.cxx.

14 : G4VPhysicsConstructor(name),
16 "photonuclear_model")} {}
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:89
framework::config::Parameters modelParameters
Parameters from the configuration to pass along to the photonuclear model.

Member Function Documentation

◆ ConstructParticle()

void simcore::GammaPhysics::ConstructParticle ( )
final

Construct particles.

We don't do anything here since we are just attaching/updating the photon physics.

Definition at line 18 of file GammaPhysics.cxx.

18{}

◆ ConstructProcess()

void simcore::GammaPhysics::ConstructProcess ( )
final

We do two things for this call back during initialization.

  1. We add the muon-conversion process to the photon's process table, enabling it to be one of the processes that can happen.
  2. We move the photonNuclear process to be the first process in the photon's ordering so that the bias operator has a chance to lower its cross-section before any EM process is called (if need be).

Put the PN process first in the ordering in case PN biasing is happening.

Process ordering is a complicated concept and unfortunately its affect on biasing is poorly documented. What has been said is that some processes need to be called last[1]. In addition, the practical experience of working on defining a custom process for G4DarkBreM showed that sometimes Geant4 does not get through the full list of processes but it always starts at the beginning. For these reasons, we put the PN process first in the ordering so that we can insure it is always check by Geant4 before continuing.

[1] https://indico.cern.ch/event/58317/contributions/2047449/attachments/992300/1411062/PartDef-ProcMan-AS.pdf

Definition at line 20 of file GammaPhysics.cxx.

20 {
21 G4ProcessManager* processManager = G4Gamma::Gamma()->GetProcessManager();
22 if (processManager == nullptr) {
23 EXCEPTION_RAISE("GammaPhysics",
24 "Was unable to access the process manager for photons, "
25 "something is very wrong!");
26 }
27 // configure our PN model based on runtime parameters
29 modelParameters.getParameter<std::string>("class_name"),
30 modelParameters.getParameter<std::string>("instance_name"),
32 pn->removeExistingModel(processManager);
33 pn->ConstructGammaProcess(processManager);
52 const auto processes{processManager->GetProcessList()};
53 for (int i{0}; i < processes->size(); i++) {
54 const auto process{(*processes)[i]};
55 if (process->GetProcessName() == "photonNuclear") {
56 processManager->SetProcessOrderingToFirst(
57 process, G4ProcessVectorDoItIndex::idxAll);
58 }
59 }
60 // Add the gamma -> mumu to the physics list.
61 processManager->AddDiscreteProcess(&gammaConvProcess);
62}
static Factory & get()
get the factory instance
Definition Factory.h:217
PrototypePtr make(const std::string &full_name, PrototypeConstructorArgs... maker_args)
make a new object by name
Definition Factory.h:265
G4GammaConversionToMuons gammaConvProcess
The gamma to muons process.

References gammaConvProcess, simcore::Factory< Prototype, PrototypePtr, PrototypeConstructorArgs >::get(), framework::config::Parameters::getParameter(), simcore::Factory< Prototype, PrototypePtr, PrototypeConstructorArgs >::make(), and modelParameters.

Member Data Documentation

◆ gammaConvProcess

G4GammaConversionToMuons simcore::GammaPhysics::gammaConvProcess
private

The gamma to muons process.

Definition at line 75 of file GammaPhysics.h.

Referenced by ConstructProcess().

◆ modelParameters

framework::config::Parameters simcore::GammaPhysics::modelParameters
private

Parameters from the configuration to pass along to the photonuclear model.

Definition at line 80 of file GammaPhysics.h.

Referenced by ConstructProcess().


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