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

20 : BertiniEventTopologyProcess{count_light_ions},
21 threshold_{threshold},
22 Zmin_{Zmin},
23 Emin_{Emin} {}

Member Function Documentation

◆ acceptEvent()

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

Implements simcore::BertiniEventTopologyProcess.

Definition at line 4 of file BertiniNothingHardModel.cxx.

4 {
5 int secondaries{theParticleChange.GetNumberOfSecondaries()};
6 for (int i{0}; i < secondaries; ++i) {
7 const auto secondary{theParticleChange.GetSecondary(i)->GetParticle()};
8 const auto pdgCode{secondary->GetDefinition()->GetPDGEncoding()};
9 if (skipCountingParticle(pdgCode)) {
10 continue;
11 }
12 const auto energy{secondary->GetKineticEnergy()};
13 if (energy > threshold_) {
14 return false;
15 }
16 }
17 return true;
18}
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 25 of file BertiniNothingHardModel.h.

25 {
26 return projectile.GetKineticEnergy() >= Emin_;
27 }

◆ acceptTarget()

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

Implements simcore::BertiniEventTopologyProcess.

Definition at line 28 of file BertiniNothingHardModel.h.

28 {
29 return targetNucleus.GetZ_asInt() >= Zmin_;
30 }

Member Data Documentation

◆ Emin_

double simcore::BertiniNothingHardProcess::Emin_
private

Definition at line 36 of file BertiniNothingHardModel.h.

◆ threshold_

double simcore::BertiniNothingHardProcess::threshold_
private

Definition at line 34 of file BertiniNothingHardModel.h.

◆ Zmin_

int simcore::BertiniNothingHardProcess::Zmin_
private

Definition at line 35 of file BertiniNothingHardModel.h.


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