LDMX Software
SimCore
include
SimCore
UserEventInformation.h
1
#ifndef SIMCORE_USEREVENTINFORMATION_H
2
#define SIMCORE_USEREVENTINFORMATION_H
3
4
#include "G4VUserEventInformation.hh"
5
namespace
simcore {
6
10
class
UserEventInformation
:
public
G4VUserEventInformation {
11
public
:
13
UserEventInformation
() =
default
;
14
16
virtual
~UserEventInformation
() =
default
;
17
19
void
Print
()
const override
;
20
22
void
incBremCandidateCount
() {
bremCandidateCount_
+= 1; }
23
25
void
decBremCandidateCount
() {
bremCandidateCount_
-= 1; }
26
32
void
setDarkBremMaterialZ
(
double
z) {
db_material_z_
= z; }
33
42
double
getDarkBremMaterialZ
()
const
{
return
db_material_z_
; }
43
49
void
setWeight
(
double
weight) {
weight_
= weight; }
50
54
double
getWeight
() {
return
weight_
; }
55
62
void
incWeight
(
double
step_weight) {
weight_
*= step_weight; }
63
68
int
bremCandidateCount
() {
return
bremCandidateCount_
; }
69
75
void
addPNEnergy
(
double
delta) {
total_photonuclear_energy_
+= delta; }
76
82
void
addENEnergy
(
double
delta) {
total_electronuclear_energy_
+= delta; }
83
88
double
getPNEnergy
()
const
{
return
total_photonuclear_energy_
; }
89
94
double
getENEnergy
()
const
{
return
total_electronuclear_energy_
; }
95
100
void
lastStepWasPN
(
bool
yes) {
last_step_pn_
= yes; }
101
106
bool
wasLastStepPN
()
const
{
return
last_step_pn_
; }
107
112
void
lastStepWasEN
(
bool
yes) {
last_step_en_
= yes; }
113
118
bool
wasLastStepEN
()
const
{
return
last_step_en_
; }
119
120
private
:
122
int
bremCandidateCount_
{0};
123
131
double
weight_
{1.};
132
140
double
total_photonuclear_energy_
{0.};
141
145
bool
last_step_pn_
{
false
};
146
154
double
total_electronuclear_energy_
{0.};
155
159
bool
last_step_en_
{
false
};
160
167
double
db_material_z_
{-1.};
168
};
169
}
// namespace simcore
170
171
#endif
// SIMCORE_USEREVENTINFORMATION_H
simcore::UserEventInformation
Encapsulates user defined information associated with a Geant4 event.
Definition
UserEventInformation.h:10
simcore::UserEventInformation::setWeight
void setWeight(double weight)
Set the event weight.
Definition
UserEventInformation.h:49
simcore::UserEventInformation::setDarkBremMaterialZ
void setDarkBremMaterialZ(double z)
Set the Z of the element in which the dark brem ocurred.
Definition
UserEventInformation.h:32
simcore::UserEventInformation::~UserEventInformation
virtual ~UserEventInformation()=default
Destructor.
simcore::UserEventInformation::total_electronuclear_energy_
double total_electronuclear_energy_
The total energy that went into the electron-nuclear interaction.
Definition
UserEventInformation.h:154
simcore::UserEventInformation::UserEventInformation
UserEventInformation()=default
Constructor.
simcore::UserEventInformation::getPNEnergy
double getPNEnergy() const
Get the total energy that went PN.
Definition
UserEventInformation.h:88
simcore::UserEventInformation::incBremCandidateCount
void incBremCandidateCount()
Increment the number of brem candidates in an event.
Definition
UserEventInformation.h:22
simcore::UserEventInformation::bremCandidateCount
int bremCandidateCount()
Definition
UserEventInformation.h:68
simcore::UserEventInformation::incWeight
void incWeight(double step_weight)
Increment the event weight by the input weight for an individual step.
Definition
UserEventInformation.h:62
simcore::UserEventInformation::wasLastStepPN
bool wasLastStepPN() const
Was the last step a PN interaction?
Definition
UserEventInformation.h:106
simcore::UserEventInformation::addENEnergy
void addENEnergy(double delta)
Add energy to the electronuclear running total.
Definition
UserEventInformation.h:82
simcore::UserEventInformation::addPNEnergy
void addPNEnergy(double delta)
Add energy to the photonuclear running total.
Definition
UserEventInformation.h:75
simcore::UserEventInformation::getDarkBremMaterialZ
double getDarkBremMaterialZ() const
Get the Z of the element in which the dark brem ocurred.
Definition
UserEventInformation.h:42
simcore::UserEventInformation::bremCandidateCount_
int bremCandidateCount_
Total number of brem candidates in the event.
Definition
UserEventInformation.h:122
simcore::UserEventInformation::wasLastStepEN
bool wasLastStepEN() const
Was the last step a EN interaction?
Definition
UserEventInformation.h:118
simcore::UserEventInformation::total_photonuclear_energy_
double total_photonuclear_energy_
The total energy that went into the photon-nuclear interaction.
Definition
UserEventInformation.h:140
simcore::UserEventInformation::decBremCandidateCount
void decBremCandidateCount()
Decrease the number of brem candidates in an event.
Definition
UserEventInformation.h:25
simcore::UserEventInformation::lastStepWasPN
void lastStepWasPN(bool yes)
Tell us if last step was PN.
Definition
UserEventInformation.h:100
simcore::UserEventInformation::last_step_en_
bool last_step_en_
Was the most recent step a electron-nuclear interaction?
Definition
UserEventInformation.h:159
simcore::UserEventInformation::getENEnergy
double getENEnergy() const
Get the total energy that went EN.
Definition
UserEventInformation.h:94
simcore::UserEventInformation::Print
void Print() const override
Print the information associated with the track.
Definition
UserEventInformation.cxx:10
simcore::UserEventInformation::getWeight
double getWeight()
Definition
UserEventInformation.h:54
simcore::UserEventInformation::weight_
double weight_
The event weight.
Definition
UserEventInformation.h:131
simcore::UserEventInformation::db_material_z_
double db_material_z_
atomic Z of the element in which dark brem occurred (-1 if didn't happen)
Definition
UserEventInformation.h:167
simcore::UserEventInformation::last_step_pn_
bool last_step_pn_
Was the most recent step a photon-nuclear interaction?
Definition
UserEventInformation.h:145
simcore::UserEventInformation::lastStepWasEN
void lastStepWasEN(bool yes)
Tell us if last step was EN.
Definition
UserEventInformation.h:112
Generated by
1.9.8