GENIEGenerator
Loading...
Searching...
No Matches
genie::RSPPHadronicSystemGenerator Class Reference

Generates the 'final state' hadronic system in v SPP interactions. It adds the remnant nucleus (if any) and the baryon resonance decay products at the GHEP record. The resonance decay products are pre- determined since in this thread we generate exclusive SPP reactions. The module uses a simple phase space decay. Is a concrete implementation of the EventRecordVisitorI interface. More...

#include <RSPPHadronicSystemGenerator.h>

Inheritance diagram for genie::RSPPHadronicSystemGenerator:
[legend]
Collaboration diagram for genie::RSPPHadronicSystemGenerator:
[legend]

Public Member Functions

 RSPPHadronicSystemGenerator ()
 RSPPHadronicSystemGenerator (string config)
 ~RSPPHadronicSystemGenerator ()
void ProcessEventRecord (GHepRecord *event_rec) const
Public Member Functions inherited from genie::HadronicSystemGenerator
void AddTargetNucleusRemnant (GHepRecord *event_rec) const
void AddFinalHadronicSyst (GHepRecord *event_rec) const
void PreHadronTransportDecays (GHepRecord *event_rec) const
TLorentzVector Hadronic4pLAB (GHepRecord *event_rec) const
TLorentzVector MomentumTransferLAB (GHepRecord *event_rec) const
TVector3 HCM2LAB (GHepRecord *event_rec) const
int HadronShowerCharge (GHepRecord *event_rec) const
int ResonanceCharge (GHepRecord *event_rec) const
Public Member Functions inherited from genie::EventRecordVisitorI
virtual ~EventRecordVisitorI ()
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
virtual void Configure (const Registry &config)
virtual void Configure (string config)
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
virtual void SetId (string name, string config)
const AlgorithmSubAlg (const RgKey &registry_key) const
void AdoptConfig (void)
void AdoptSubstructure (void)
virtual void Print (ostream &stream) const
 Print algorithm info.

Private Member Functions

void AddResonanceDecayProducts (GHepRecord *event_rec) const

Private Attributes

TGenPhaseSpace fPhaseSpaceGenerator

Additional Inherited Members

Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)
Protected Member Functions inherited from genie::HadronicSystemGenerator
 HadronicSystemGenerator ()
 HadronicSystemGenerator (string name)
 HadronicSystemGenerator (string name, string config)
 ~HadronicSystemGenerator ()
Protected Member Functions inherited from genie::EventRecordVisitorI
 EventRecordVisitorI ()
 EventRecordVisitorI (string name)
 EventRecordVisitorI (string name, string config)
Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 Algorithm (string name)
 Algorithm (string name, string config)
void Initialize (void)
void DeleteConfig (void)
void DeleteSubstructure (void)
RegistryExtractLocalConfig (const Registry &in) const
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
template<class T>
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
template<class T>
bool GetParamDef (const RgKey &name, T &p, const T &def) const
template<class T>
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.
Protected Attributes inherited from genie::HadronicSystemGenerator
const EventRecordVisitorIfPreINukeDecayer
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Detailed Description

Generates the 'final state' hadronic system in v SPP interactions. It adds the remnant nucleus (if any) and the baryon resonance decay products at the GHEP record. The resonance decay products are pre- determined since in this thread we generate exclusive SPP reactions. The module uses a simple phase space decay. Is a concrete implementation of the EventRecordVisitorI interface.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n November 23, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 32 of file RSPPHadronicSystemGenerator.h.

Constructor & Destructor Documentation

◆ RSPPHadronicSystemGenerator() [1/2]

RSPPHadronicSystemGenerator::RSPPHadronicSystemGenerator ( )

Definition at line 30 of file RSPPHadronicSystemGenerator.cxx.

30 :
31HadronicSystemGenerator("genie::RSPPHadronicSystemGenerator")
32{
33
34}

References genie::HadronicSystemGenerator::HadronicSystemGenerator().

◆ RSPPHadronicSystemGenerator() [2/2]

RSPPHadronicSystemGenerator::RSPPHadronicSystemGenerator ( string config)

Definition at line 36 of file RSPPHadronicSystemGenerator.cxx.

36 :
37HadronicSystemGenerator("genie::RSPPHadronicSystemGenerator", config)
38{
39
40}

References genie::HadronicSystemGenerator::HadronicSystemGenerator().

◆ ~RSPPHadronicSystemGenerator()

RSPPHadronicSystemGenerator::~RSPPHadronicSystemGenerator ( )

Definition at line 42 of file RSPPHadronicSystemGenerator.cxx.

43{
44
45}

Member Function Documentation

◆ AddResonanceDecayProducts()

void RSPPHadronicSystemGenerator::AddResonanceDecayProducts ( GHepRecord * event_rec) const
private

Definition at line 55 of file RSPPHadronicSystemGenerator.cxx.

57{
58// generate momenta for the baryon resonance decay products and add them at
59// the event record
60
61 //-- find out which SPP channel we are generating
62 Interaction * interaction = evrec->Summary();
63 SppChannel_t spp_channel = SppChannel::FromInteraction(interaction);
64
65 //-- get the final state nucleon and pion
66 int nuc_pdgc = SppChannel::FinStateNucleon (spp_channel);
67 int pi_pdgc = SppChannel::FinStatePion (spp_channel);
68
69 //-- get the total 4-p for the two-hadron system (= parent resonance 4-p)
70
71 const InitialState & init_state = interaction->InitState();
72 bool is_nucleus = init_state.Tgt().IsNucleus();
73
74 //-- access the resonance entry at the GHEP record
75 int res_pos = 0;
76 if(is_nucleus) res_pos = 4;
77 else res_pos = 3;
78
79 GHepParticle * res = evrec->Particle(res_pos);
80 const TLorentzVector & x4 = *(res->X4());
81
82 //-- mark the resonance as decayed
84
85 //-- generate 4-p for the two-hadron system
86 double mnuc = PDGLibrary::Instance() -> Find(nuc_pdgc) -> Mass();
87 double mpi = PDGLibrary::Instance() -> Find(pi_pdgc) -> Mass();
88
89 double mass[2] = { mnuc, mpi };
90
91 TLorentzVector * p4 = res->GetP4();
92
93 LOG("RESHadronicVtx", pINFO)
94 << "\n RES 4-P = " << utils::print::P4AsString(p4);
95
96 bool is_permitted = fPhaseSpaceGenerator.SetDecay(*p4, 2, mass);
97 assert(is_permitted);
98
99 fPhaseSpaceGenerator.Generate();
100
101 //-- add the two hadrons at the event record
102 TLorentzVector & p4_nuc = *fPhaseSpaceGenerator.GetDecay(0);
103 TLorentzVector & p4_pi = *fPhaseSpaceGenerator.GetDecay(1);
104 TLorentzVector vdummy(0,0,0,0); // dummy 'vertex'
105
106 // decide the particle status
107 GHepStatus_t ist = (is_nucleus) ?
109 int mom = res_pos;
110 evrec->AddParticle(nuc_pdgc, ist, mom,-1,-1,-1, p4_nuc, x4);
111 evrec->AddParticle(pi_pdgc, ist, mom,-1,-1,-1, p4_pi, x4);
112 delete p4;
113}
#define pINFO
Definition Messenger.h:62
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
TLorentzVector * GetP4(void) const
const TLorentzVector * X4(void) const
void SetStatus(GHepStatus_t s)
const Target & Tgt(void) const
const InitialState & InitState(void) const
Definition Interaction.h:69
static PDGLibrary * Instance(void)
static int FinStatePion(SppChannel_t channel)
Definition SppChannel.h:157
static SppChannel_t FromInteraction(const Interaction *interaction)
Definition SppChannel.h:402
static int FinStateNucleon(SppChannel_t channel)
Definition SppChannel.h:130
bool IsNucleus(void) const
Definition Target.cxx:272
string P4AsString(const TLorentzVector *p)
double Mass(Resonance_t res)
resonance mass (GeV)
@ kIStHadronInTheNucleus
Definition GHepStatus.h:37
@ kIStStableFinalState
Definition GHepStatus.h:30
@ kIStDecayedState
Definition GHepStatus.h:32
enum genie::EGHepStatus GHepStatus_t
enum genie::ESppChannel SppChannel_t

References genie::GHepRecord::AddParticle(), genie::SppChannel::FinStateNucleon(), genie::SppChannel::FinStatePion(), fPhaseSpaceGenerator, genie::SppChannel::FromInteraction(), genie::GHepParticle::GetP4(), genie::Interaction::InitState(), genie::PDGLibrary::Instance(), genie::Target::IsNucleus(), genie::kIStDecayedState, genie::kIStHadronInTheNucleus, genie::kIStStableFinalState, LOG, genie::utils::print::P4AsString(), genie::GHepRecord::Particle(), pINFO, genie::GHepParticle::SetStatus(), genie::GHepRecord::Summary(), genie::InitialState::Tgt(), and genie::GHepParticle::X4().

Referenced by ProcessEventRecord().

◆ ProcessEventRecord()

void RSPPHadronicSystemGenerator::ProcessEventRecord ( GHepRecord * event_rec) const
virtual

Implements genie::EventRecordVisitorI.

Definition at line 47 of file RSPPHadronicSystemGenerator.cxx.

48{
49// This method generates the final state hadronic system
50
51 //-- Add the baryon resonance decay products at the event record
52 this->AddResonanceDecayProducts(evrec);
53}
void AddResonanceDecayProducts(GHepRecord *event_rec) const

References AddResonanceDecayProducts().

Member Data Documentation

◆ fPhaseSpaceGenerator

TGenPhaseSpace genie::RSPPHadronicSystemGenerator::fPhaseSpaceGenerator
mutableprivate

Definition at line 45 of file RSPPHadronicSystemGenerator.h.

Referenced by AddResonanceDecayProducts().


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