LDMX Software
simcore::BertiniSingleNeutronProcess Class Reference

Public Member Functions

 BertiniSingleNeutronProcess (double threshold, int Zmin, double Emin, bool count_light_ions)
 
bool acceptProjectile (const G4HadProjectile &projectile) const override
 
bool acceptTarget (const G4Nucleus &targetNucleus) const override
 
bool acceptEvent () const override
 
- Public Member Functions inherited from simcore::BertiniEventTopologyProcess
 BertiniEventTopologyProcess (bool count_light_ions=true)
 
G4HadFinalState * ApplyYourself (const G4HadProjectile &projectile, G4Nucleus &targetNucleus) override
 
void cleanupSecondaries ()
 
constexpr bool isLightIon (const int pdgCode) const
 Check if the PDG code corresponds to a light ion nucleus.
 
constexpr bool skipCountingParticle (const int pdgcode) const
 Whether or not to include a particular particle type in any counting.
 
virtual void incrementEventWeight (int N)
 

Private Attributes

double threshold_
 
int zmin_
 
double emin_
 

Detailed Description

Definition at line 11 of file BertiniSingleNeutronModel.h.

Constructor & Destructor Documentation

◆ BertiniSingleNeutronProcess()

simcore::BertiniSingleNeutronProcess::BertiniSingleNeutronProcess ( double threshold,
int Zmin,
double Emin,
bool count_light_ions )
inline

Definition at line 13 of file BertiniSingleNeutronModel.h.

15 : BertiniEventTopologyProcess{count_light_ions},
16 threshold_{threshold},
17 zmin_{Zmin},
18 emin_{Emin} {}

Member Function Documentation

◆ acceptEvent()

bool simcore::BertiniSingleNeutronProcess::acceptEvent ( ) const
overridevirtual

Implements simcore::BertiniEventTopologyProcess.

Definition at line 8 of file BertiniSingleNeutronModel.cxx.

8 {
9 int nhard{0};
10 int nhard_neutron{0};
11 int secondaries{theParticleChange.GetNumberOfSecondaries()};
12 for (int i{0}; i < secondaries; ++i) {
13 const auto secondary{theParticleChange.GetSecondary(i)->GetParticle()};
14 const auto pdg_code{secondary->GetDefinition()->GetPDGEncoding()};
15 if (skipCountingParticle(pdg_code)) {
16 continue;
17 }
18 const auto energy{secondary->GetKineticEnergy()};
19 if (energy > threshold_) {
20 nhard++;
21 if (pdg_code == 2112) {
22 nhard_neutron++;
23 }
24 }
25 }
26 return nhard == 1 && nhard_neutron == 1;
27}
constexpr bool skipCountingParticle(const int pdgcode) const
Whether or not to include a particular particle type in any counting.

◆ acceptProjectile()

bool simcore::BertiniSingleNeutronProcess::acceptProjectile ( const G4HadProjectile & projectile) const
inlineoverridevirtual

Implements simcore::BertiniEventTopologyProcess.

Definition at line 20 of file BertiniSingleNeutronModel.h.

20 {
21 return projectile.GetKineticEnergy() >= emin_;
22 }

◆ acceptTarget()

bool simcore::BertiniSingleNeutronProcess::acceptTarget ( const G4Nucleus & targetNucleus) const
inlineoverridevirtual

Implements simcore::BertiniEventTopologyProcess.

Definition at line 23 of file BertiniSingleNeutronModel.h.

23 {
24 return targetNucleus.GetZ_asInt() >= zmin_;
25 }

Member Data Documentation

◆ emin_

double simcore::BertiniSingleNeutronProcess::emin_
private

Definition at line 31 of file BertiniSingleNeutronModel.h.

◆ threshold_

double simcore::BertiniSingleNeutronProcess::threshold_
private

Definition at line 29 of file BertiniSingleNeutronModel.h.

◆ zmin_

int simcore::BertiniSingleNeutronProcess::zmin_
private

Definition at line 30 of file BertiniSingleNeutronModel.h.


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