LDMX Software
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"
13
14class G4HadProjectile;
15class G4Nucleus;
16class G4HadFinalState;
17
18namespace simcore {
19namespace bertini {
20
28class 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
41 return last_history_.empty() ? nullptr : &last_history_;
42 }
43
46
47 bool hasHistory() const { return !last_history_.empty(); }
48
49 void setIncidentTrackId(int trackId) { incident_track_id_ = trackId; }
50
51 private:
58
63 void captureHistory();
64
73 void captureDeexcitationProducts(G4HadFinalState* finalState);
74
76 double energy_threshold_{5000.0};
77
80
83
84 enableLogging("LDMXCascadeInterface")
85};
86
87} // namespace bertini
88} // namespace simcore
89
90#endif // SIMCORE_BERTINI_LDMXCASCADEINTERFACE_H
Container for the complete history of a Bertini intranuclear cascade.
Preprocessor hacks to access private Geant4 Bertini cascade internals.
All CascadeSteps from a single photonuclear interaction.
G4CascadeInterface that captures cascade history via preprocessor hack.
ldmx::CascadeHistory last_history_
Captured history from last cascade.
void captureDeexcitationProducts(G4HadFinalState *finalState)
Capture de-excitation products from G4HadFinalState.
void ensureCascadeHistoryExists()
Ensure the G4CascadeHistory object exists in the cascader Geant4 only creates this if G4CASCADE_SHOW_...
int incident_track_id_
Track ID of incident particle.
void captureHistory()
Extract history from the internal G4CascadeHistory Navigates: this->collider->theIntraNucleiCascader-...
const ldmx::CascadeHistory * getLastCascadeHistory() const
Returns nullptr if no history was captured.
double energy_threshold_
Minimum photon energy threshold for recording [MeV].
ldmx::CascadeHistory extractHistory()
Move the captured history out.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...