23#include <TClonesArray.h>
24#include <TParticlePDG.h>
32#include "Physics/Decay/PythiaDecayer.h"
45using std::setprecision;
49ostream &
operator<< (ostream & stream,
const TClonesArray * particle_list);
53void Decay(
const Decayer * decayer,
int pdgc,
double E,
int ndecays);
67 <<
"Asking the AlgFactory for a genie::PythiaDecayer\\Default instance";
94 <<
" **** Inhibiting all but the `tau- --> nu_mu_bar + mu- + nu_tau' decay channel"
159 <<
" **** Restoring all tau- decay channels"
170 <<
" **** Inhibit all tau- decay channels"
181 DecayerInputs_t dinp;
192 TParticlePDG * pp = pdglib->
Find(pdgc);
196 <<
"Decaying a " << pp->GetName() <<
" with E = " << p4.Energy();
199 for(
int idec = 0; idec < ndecays; idec++) {
202 TClonesArray * particle_list = decayer->Decay(dinp);
206 <<
"\n ** Decay nu.: " << idec <<
" ==> NULL particle list";
212 <<
"\n ** Decay nu.: " << idec
213 <<
" (weight = " << decayer->Weight() <<
") : \n "
217 particle_list->Delete();
218 delete particle_list;
223ostream &
operator<< (ostream & stream,
const TClonesArray * particle_list)
226 TObjArrayIter particle_iter(particle_list);
230 << setfill(
' ') << setw(10) <<
"name "
231 << setfill(
' ') << setw(10) <<
"PDG"
232 << setfill(
' ') << setw(10) <<
"Status"
233 << setfill(
' ') << setw(15) <<
"E (GeV)"
234 << setfill(
' ') << setw(15) <<
"Px (GeV/c)"
235 << setfill(
' ') << setw(15) <<
"Py (GeV/c)"
236 << setfill(
' ') << setw(15) <<
"Pz (GeV/c)"
237 << setfill(
' ') << setw(15) <<
"t (mm/c)"
238 << setfill(
' ') << setw(15) <<
"x (mm)"
239 << setfill(
' ') << setw(15) <<
"y (mm)"
240 << setfill(
' ') << setw(15) <<
"z (mm)"
243 while( (p = (
GHepParticle *) particle_iter.Next()) ) stream << p;
245 stream << setfill(
'-') << setw(100) <<
"|";
253 << std::scientific << setprecision(6);
256 << setfill(
' ') << setw(10) << p->
Name()
257 << setfill(
' ') << setw(10) << p->
Pdg()
258 << setfill(
' ') << setw(10) << p->
Status()
259 << setfill(
' ') << setw(15) << p->
Energy()
260 << setfill(
' ') << setw(15) << p->
Px()
261 << setfill(
' ') << setw(15) << p->
Py()
262 << setfill(
' ') << setw(15) << p->
Pz()
263 << setfill(
' ') << setw(15) << p->
Vt() /(
units::mm)
264 << setfill(
' ') << setw(15) << p->
Vx() /(
units::mm)
265 << setfill(
' ') << setw(15) << p->
Vy() /(
units::mm)
266 << setfill(
' ') << setw(15) << p->
Vz() /(
units::mm)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
The GENIE Algorithm Factory.
const Algorithm * GetAlgorithm(const AlgId &algid)
static AlgFactory * Instance()
string Config(void) const
virtual const Registry & GetConfig(void) const
virtual const AlgId & Id(void) const
Get algorithm ID.
Base class for decayer classes. Implements common configuration, allowing users to toggle on/off flag...
virtual void UnInhibitDecay(int pdgc, TDecayChannel *dc=0) const =0
virtual void InhibitDecay(int pdgc, TDecayChannel *dc=0) const =0
STDHEP-like event record entry that can fit a particle or a nucleus.
string Name(void) const
Name that corresponds to the PDG code.
double Vy(void) const
Get production y.
double Px(void) const
Get Px.
double Pz(void) const
Get Pz.
double Py(void) const
Get Py.
double Vz(void) const
Get production z.
double Energy(void) const
Get energy.
GHepStatus_t Status(void) const
double Vx(void) const
Get production x.
double Vt(void) const
Get production time.
Singleton class to load & serve a TDatabasePDG.
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
A registry. Provides the container for algorithm configuration parameters.
ostream & operator<<(ostream &stream, const TClonesArray *particle_list)
void TestPythiaTauDecays(void)
void Decay(const Decayer *decayer, int pdgc, double E, int ndecays)
static constexpr double mm
THE MAIN GENIE PROJECT NAMESPACE