LDMX Software
Public Member Functions | Private Attributes | List of all members
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 14 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 16 of file BertiniSingleNeutronModel.h.

18 : BertiniEventTopologyProcess{count_light_ions},
19 threshold_{threshold},
20 Zmin_{Zmin},
21 Emin_{Emin} {}

Member Function Documentation

◆ acceptEvent()

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

Implements simcore::BertiniEventTopologyProcess.

Definition at line 5 of file BertiniSingleNeutronModel.cxx.

5 {
6 int Nhard{0};
7 int Nhard_neutron{0};
8 int secondaries{theParticleChange.GetNumberOfSecondaries()};
9 for (int i{0}; i < secondaries; ++i) {
10 const auto secondary{theParticleChange.GetSecondary(i)->GetParticle()};
11 const auto pdgCode{secondary->GetDefinition()->GetPDGEncoding()};
12 if (skipCountingParticle(pdgCode)) {
13 continue;
14 }
15 const auto energy{secondary->GetKineticEnergy()};
16 if (energy > threshold_) {
17 Nhard++;
18 if (pdgCode == 2112) {
19 Nhard_neutron++;
20 }
21 }
22 }
23 return Nhard == 1 && Nhard_neutron == 1;
24}
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 23 of file BertiniSingleNeutronModel.h.

23 {
24 return projectile.GetKineticEnergy() >= Emin_;
25 }

◆ acceptTarget()

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

Implements simcore::BertiniEventTopologyProcess.

Definition at line 26 of file BertiniSingleNeutronModel.h.

26 {
27 return targetNucleus.GetZ_asInt() >= Zmin_;
28 }

Member Data Documentation

◆ Emin_

double simcore::BertiniSingleNeutronProcess::Emin_
private

Definition at line 34 of file BertiniSingleNeutronModel.h.

◆ threshold_

double simcore::BertiniSingleNeutronProcess::threshold_
private

Definition at line 32 of file BertiniSingleNeutronModel.h.

◆ Zmin_

int simcore::BertiniSingleNeutronProcess::Zmin_
private

Definition at line 33 of file BertiniSingleNeutronModel.h.


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