LDMX Software
SimCore
include
SimCore
Bertini
LDMXCascadeInterface.h
Go to the documentation of this file.
1
6
#ifndef SIMCORE_BERTINI_LDMXCASCADEINTERFACE_H
7
#define SIMCORE_BERTINI_LDMXCASCADEINTERFACE_H
8
9
// Include the hack header first to expose private Geant4 members
10
#include "Framework/Logger.h"
11
#include "
SimCore/Bertini/G4BertiniHack.h
"
12
#include "
SimCore/Event/CascadeHistory.h
"
13
14
class
G4HadProjectile;
15
class
G4Nucleus;
16
class
G4HadFinalState;
17
18
namespace
simcore
{
19
namespace
bertini {
20
28
class
LDMXCascadeInterface
:
public
G4CascadeInterface {
29
public
:
30
LDMXCascadeInterface
(
const
G4String& name =
"LDMXBertiniCascade"
);
31
virtual
~LDMXCascadeInterface
();
32
33
G4HadFinalState* ApplyYourself(
const
G4HadProjectile& projectile,
34
G4Nucleus& targetNucleus)
override
;
35
36
void
setEnergyThreshold(
double
threshold) {
energy_threshold_
= threshold; }
37
double
getEnergyThreshold()
const
{
return
energy_threshold_
; }
38
40
const
ldmx::CascadeHistory
*
getLastCascadeHistory
()
const
{
41
return
last_history_
.empty() ? nullptr : &
last_history_
;
42
}
43
45
ldmx::CascadeHistory
extractHistory
() {
return
std::move(
last_history_
); }
46
47
bool
hasHistory()
const
{
return
!
last_history_
.empty(); }
48
49
void
setIncidentTrackId(
int
trackId) {
incident_track_id_
= trackId; }
50
51
private
:
57
void
ensureCascadeHistoryExists
();
58
63
void
captureHistory
();
64
73
void
captureDeexcitationProducts
(G4HadFinalState* finalState);
74
76
double
energy_threshold_
{5000.0};
77
79
int
incident_track_id_
{-1};
80
82
ldmx::CascadeHistory
last_history_
;
83
84
enableLogging(
"LDMXCascadeInterface"
)
85
};
86
87
}
// namespace bertini
88
}
// namespace simcore
89
90
#endif
// SIMCORE_BERTINI_LDMXCASCADEINTERFACE_H
CascadeHistory.h
Container for the complete history of a Bertini intranuclear cascade.
G4BertiniHack.h
Preprocessor hacks to access private Geant4 Bertini cascade internals.
ldmx::CascadeHistory
All CascadeSteps from a single photonuclear interaction.
Definition
CascadeHistory.h:24
simcore::bertini::LDMXCascadeInterface
G4CascadeInterface that captures cascade history via preprocessor hack.
Definition
LDMXCascadeInterface.h:28
simcore::bertini::LDMXCascadeInterface::last_history_
ldmx::CascadeHistory last_history_
Captured history from last cascade.
Definition
LDMXCascadeInterface.h:82
simcore::bertini::LDMXCascadeInterface::captureDeexcitationProducts
void captureDeexcitationProducts(G4HadFinalState *finalState)
Capture de-excitation products from G4HadFinalState.
Definition
LDMXCascadeInterface.cxx:439
simcore::bertini::LDMXCascadeInterface::ensureCascadeHistoryExists
void ensureCascadeHistoryExists()
Ensure the G4CascadeHistory object exists in the cascader Geant4 only creates this if G4CASCADE_SHOW_...
Definition
LDMXCascadeInterface.cxx:256
simcore::bertini::LDMXCascadeInterface::incident_track_id_
int incident_track_id_
Track ID of incident particle.
Definition
LDMXCascadeInterface.h:79
simcore::bertini::LDMXCascadeInterface::captureHistory
void captureHistory()
Extract history from the internal G4CascadeHistory Navigates: this->collider->theIntraNucleiCascader-...
Definition
LDMXCascadeInterface.cxx:280
simcore::bertini::LDMXCascadeInterface::getLastCascadeHistory
const ldmx::CascadeHistory * getLastCascadeHistory() const
Returns nullptr if no history was captured.
Definition
LDMXCascadeInterface.h:40
simcore::bertini::LDMXCascadeInterface::energy_threshold_
double energy_threshold_
Minimum photon energy threshold for recording [MeV].
Definition
LDMXCascadeInterface.h:76
simcore::bertini::LDMXCascadeInterface::extractHistory
ldmx::CascadeHistory extractHistory()
Move the captured history out.
Definition
LDMXCascadeInterface.h:45
simcore
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...
Definition
APrimeConversionToFCPs.h:20
Generated by
1.12.0