MCEqParticle#
- class MCEq.particlemanager.MCEqParticle(pdg_id, helicity, energy_grid=None, cs_db=None, init_pdata_defaults=True, A_target=14.65672)[source]#
Bases:
objectBundles different particle properties for simplified availability of particle properties in
MCEq.core.MCEqRun.- Parameters:
pdg_id (int) – PDG ID of the particle
egrid (np.array, optional) – energy grid (centers)
cs_db (object, optional) – reference to an instance of
InteractionYields
Attributes Summary
Returns index range where particle behaves as hadron.
Returns lower index of particle range in state vector.
Returns index range where particle behaves as resonance.
Returns upper index of particle range in state vector.
Methods Summary
add_decay_channel(child, dec_matrix[, force])Add a decay channel.
add_hadronic_production_channel(child, ...)Add a new particle that is produced in hadronic interactions.
dN_dEkin(kin_energy, sec_pdg[, verbose])Returns \(dN/dE_{\rm Kin}\) in lab frame for an interaction energy close to
kin_energy(total) for hadron-air collisions.dN_dxf(energy, prim_pdg, sec_pdg[, ...])Returns \(dN/dx_{\rm F}\) in c.m.
dN_dxlab(kin_energy, sec_pdg[, verbose])Returns \(dN/dx_{\rm Lab}\) for interaction energy close to
kin_energyfor hadron-air collisions.dNdec_dxlab(kin_energy, sec_pdg[, verbose])Returns \(dN/dx_{\rm Lab}\) for interaction energy close to
kin_energyfor hadron-air collisions.init_custom_particle_data(name, pdg_id, ...)Add custom particle type.
inverse_decay_length([cut])Returns inverse decay length (or infinity (np.inf), if particle is stable), where the air density \(\rho\) is factorized out.
Returns inverse interaction length for A_target given by config.
is_child(particle_ref)True if this particle decays into particle_ref.
is_secondary(particle_ref)True if this projectile and produces particle particle_ref.
prod_cross_section([mbarn])Returns production cross section.
set_cs(cs_db)Set cross section adn recalculate the dependent variables
set_decay_channels(decay_db, pmanager)Populates decay channel and energy distributions
set_hadronic_channels(hadronic_db, pmanager)Changes the hadronic interaction model.
track_decays(tracking_particle)track_interactions(tracking_particle)Attributes Documentation
- hadridx#
Returns index range where particle behaves as hadron.
- Returns:
range on energy grid
- Return type:
tuple()(int,int)
- lidx#
Returns lower index of particle range in state vector.
- Returns:
lower index in state vector
MCEqRun.phi- Return type:
(int)
- residx#
Returns index range where particle behaves as resonance.
- Returns:
range on energy grid
- Return type:
tuple()(int,int)
- uidx#
Returns upper index of particle range in state vector.
- Returns:
upper index in state vector
MCEqRun.phi- Return type:
(int)
Methods Documentation
- add_decay_channel(child, dec_matrix, force=False)[source]#
Add a decay channel.
The branching ratios are not renormalized and one needs to take care of this externally.
- add_hadronic_production_channel(child, int_matrix)[source]#
Add a new particle that is produced in hadronic interactions.
The int_matrix is expected to be in the correct shape and scale as the other interaction (dN/dE(i,j)) matrices. Energy conservation is not checked.
- dN_dEkin(kin_energy, sec_pdg, verbose=True, **kwargs)[source]#
Returns \(dN/dE_{\rm Kin}\) in lab frame for an interaction energy close to
kin_energy(total) for hadron-air collisions.The function respects modifications applied via
_set_mod_pprod().- Parameters:
kin_energy (float) – approximate interaction energy
prim_pdg (int) – PDG ID of projectile
sec_pdg (int) – PDG ID of secondary particle
verbose (bool) – print out the closest energy
- Returns:
\(x_{\rm Lab}\), \(dN/dx_{\rm Lab}\)
- Return type:
- dN_dxf(energy, prim_pdg, sec_pdg, pos_only=True, verbose=True, **kwargs)[source]#
Returns \(dN/dx_{\rm F}\) in c.m. for interaction energy close to
energy(lab. not kinetic) for hadron-air collisions.The function respects modifications applied via
_set_mod_pprod().- Parameters:
energy (float) – approximate interaction lab. energy
prim_pdg (int) – PDG ID of projectile
sec_pdg (int) – PDG ID of secondary particle
verbose (bool) – print out the closest energy
- Returns:
\(x_{\rm F}\), \(dN/dx_{\rm F}\)
- Return type:
- dN_dxlab(kin_energy, sec_pdg, verbose=True, **kwargs)[source]#
Returns \(dN/dx_{\rm Lab}\) for interaction energy close to
kin_energyfor hadron-air collisions.The function respects modifications applied via
_set_mod_pprod().- Parameters:
kin_energy (float) – approximate interaction kin_energy
prim_pdg (int) – PDG ID of projectile
sec_pdg (int) – PDG ID of secondary particle
verbose (bool) – print out the closest enerkin_energygy
- Returns:
\(x_{\rm Lab}\), \(dN/dx_{\rm Lab}\)
- Return type:
- dNdec_dxlab(kin_energy, sec_pdg, verbose=True, **kwargs)[source]#
Returns \(dN/dx_{\rm Lab}\) for interaction energy close to
kin_energyfor hadron-air collisions.The function respects modifications applied via
_set_mod_pprod().- Parameters:
kin_energy (float) – approximate interaction energy
prim_pdg (int) – PDG ID of projectile
sec_pdg (int) – PDG ID of secondary particle
verbose (bool) – print out the closest energy
- Returns:
\(x_{\rm Lab}\), \(dN/dx_{\rm Lab}\)
- Return type:
- init_custom_particle_data(name, pdg_id, helicity, ctau, mass, **kwargs)[source]#
Add custom particle type. (Incomplete and not debugged)
- inverse_decay_length(cut=True)[source]#
Returns inverse decay length (or infinity (np.inf), if particle is stable), where the air density \(\rho\) is factorized out.
- Parameters:
E (float) – energy in laboratory system in GeV
cut (bool) – set to zero in ‘resonance’ regime
- Returns:
\(\frac{\rho}{\lambda_{dec}}\) in 1/cm
- Return type:
(float)
- inverse_interaction_length()[source]#
Returns inverse interaction length for A_target given by config.
- Returns:
\(\frac{1}{\lambda_{int}}\) in cm**2/g
- Return type:
(float)
- prod_cross_section(mbarn=False)[source]#
Returns production cross section.
- Parameters:
mbarn (bool) – if True cross section in mb otherwise in cm**2
- Returns:
\(\sigma_{\rm prod}\) in mb or cm**2
- Return type:
(float)