LDMX Software
simcore::BertiniNothingHardProcess Class Reference

Public Member Functions

 BertiniNothingHardProcess (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 12 of file BertiniNothingHardModel.h.

Constructor & Destructor Documentation

◆ BertiniNothingHardProcess()

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

Definition at line 14 of file BertiniNothingHardModel.h.

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

Member Function Documentation

◆ acceptEvent()

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

Implements simcore::BertiniEventTopologyProcess.

Definition at line 7 of file BertiniNothingHardModel.cxx.

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

◆ acceptProjectile()

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

Implements simcore::BertiniEventTopologyProcess.

Definition at line 21 of file BertiniNothingHardModel.h.

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

◆ acceptTarget()

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

Implements simcore::BertiniEventTopologyProcess.

Definition at line 24 of file BertiniNothingHardModel.h.

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

Member Data Documentation

◆ emin_

double simcore::BertiniNothingHardProcess::emin_
private

Definition at line 32 of file BertiniNothingHardModel.h.

◆ threshold_

double simcore::BertiniNothingHardProcess::threshold_
private

Definition at line 30 of file BertiniNothingHardModel.h.

◆ zmin_

int simcore::BertiniNothingHardProcess::zmin_
private

Definition at line 31 of file BertiniNothingHardModel.h.


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