ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
RHadronPythiaDecayer Class Reference

#include <RHadronPythiaDecayer.h>

Inheritance diagram for RHadronPythiaDecayer:
Collaboration diagram for RHadronPythiaDecayer:

Public Member Functions

 RHadronPythiaDecayer (const std::string &s)
 
virtual G4DecayProducts * ImportDecayProducts (const G4Track &)
 

Private Attributes

Pythia8ForDecays m_pythia
 

Detailed Description

Definition at line 16 of file RHadronPythiaDecayer.h.

Constructor & Destructor Documentation

◆ RHadronPythiaDecayer()

RHadronPythiaDecayer::RHadronPythiaDecayer ( const std::string &  s)

Definition at line 17 of file RHadronPythiaDecayer.cxx.

18  : G4VExtDecayer(s)
19 {
20 }

Member Function Documentation

◆ ImportDecayProducts()

G4DecayProducts * RHadronPythiaDecayer::ImportDecayProducts ( const G4Track &  aTrack)
virtual

Definition at line 22 of file RHadronPythiaDecayer.cxx.

22  {
23  G4DecayProducts * dp = new G4DecayProducts();
24  dp->SetParentParticle( *(aTrack.GetDynamicParticle()) );
25 
26  // get properties for later print outs
27  G4double etot = aTrack.GetDynamicParticle()->GetTotalEnergy();
28  G4int pdgEncoding = aTrack.GetDefinition()->GetPDGEncoding();
29 
30  // Outgoing particle
31  std::vector<G4DynamicParticle*> particles;
32 
33  // Pythia8 decay the particle and import the decay products
34  m_pythia.Py1ent(aTrack, particles);
35 
36  G4cout << "Decayed an RHadron with ID " << pdgEncoding << " and momentum " << aTrack.GetMomentum() << " in Pythia. Decay products are:" << G4endl;
37  double totalE=0.0;
38  for (unsigned int i=0; i<particles.size(); ++i){
39  if (particles[i]) {
40  dp->PushProducts(particles[i]);
41  totalE += particles[i]->GetTotalEnergy();
42  }
43  else {
44  G4cout << i << " null pointer!" << G4endl;
45  }
46  }
47 
48  G4cout << "Total energy in was "<<etot << G4endl;
49  G4cout << "Total energy out is "<<totalE << G4endl;
50 
51  dp->DumpInfo();
52 
53  return dp;
54 }

Member Data Documentation

◆ m_pythia

Pythia8ForDecays RHadronPythiaDecayer::m_pythia
private

Definition at line 22 of file RHadronPythiaDecayer.h.


The documentation for this class was generated from the following files:
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:840
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
RHadronPythiaDecayer::m_pythia
Pythia8ForDecays m_pythia
Definition: RHadronPythiaDecayer.h:22
lumiFormat.i
int i
Definition: lumiFormat.py:85
Pythia8ForDecays::Py1ent
void Py1ent(const G4Track &, std::vector< G4DynamicParticle * > &)
Function that decays the RHadron; returns products in G4 format.
Definition: Pythia8ForDecays.cxx:185
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84