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

Generates the 'final state' hadronic system in v RES interactions. It adds the remnant nucleus (if any), the pre-selected resonance and the resonance decay products at the GHEP record. Unlike the SPP thread, in the RES thread the resonance is specified at the time an interaction is selected but its decay products not (semi-inclusive resonance reactions). The off the mass-shell baryon resonance is decayed using a phase space generator. All kinematically available decay channels are being used (not just 1 pi channels). Is a concrete implementation of the EventRecordVisitorI interface. More...

#include <RESHadronicSystemGenerator.h>

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

Public Member Functions

 RESHadronicSystemGenerator ()
 RESHadronicSystemGenerator (string config)
 ~RESHadronicSystemGenerator ()
void ProcessEventRecord (GHepRecord *event_rec) const
void Configure (const Registry &config)
void Configure (string config)
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 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 LoadConfig (void)
int GetResonancePdgCode (GHepRecord *evrec) const
void AddResonance (GHepRecord *evrec, int pdgc) const

Private Attributes

const EventRecordVisitorIfResonanceDecayer

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 RES interactions. It adds the remnant nucleus (if any), the pre-selected resonance and the resonance decay products at the GHEP record. Unlike the SPP thread, in the RES thread the resonance is specified at the time an interaction is selected but its decay products not (semi-inclusive resonance reactions). The off the mass-shell baryon resonance is decayed using a phase space generator. All kinematically available decay channels are being used (not just 1 pi channels). 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 35 of file RESHadronicSystemGenerator.h.

Constructor & Destructor Documentation

◆ RESHadronicSystemGenerator() [1/2]

RESHadronicSystemGenerator::RESHadronicSystemGenerator ( )

Definition at line 41 of file RESHadronicSystemGenerator.cxx.

41 :
42HadronicSystemGenerator("genie::RESHadronicSystemGenerator")
43{
44
45}

References genie::HadronicSystemGenerator::HadronicSystemGenerator().

◆ RESHadronicSystemGenerator() [2/2]

RESHadronicSystemGenerator::RESHadronicSystemGenerator ( string config)

Definition at line 47 of file RESHadronicSystemGenerator.cxx.

47 :
48HadronicSystemGenerator("genie::RESHadronicSystemGenerator", config)
49{
50
51}

References genie::HadronicSystemGenerator::HadronicSystemGenerator().

◆ ~RESHadronicSystemGenerator()

RESHadronicSystemGenerator::~RESHadronicSystemGenerator ( )

Definition at line 53 of file RESHadronicSystemGenerator.cxx.

54{
55
56}

Member Function Documentation

◆ AddResonance()

void RESHadronicSystemGenerator::AddResonance ( GHepRecord * evrec,
int pdgc ) const
private

Definition at line 106 of file RESHadronicSystemGenerator.cxx.

108{
109 //-- Compute RES p4 = p4(neutrino) + p4(hit nucleon) - p4(primary lepton)
110 TLorentzVector p4 = this->Hadronic4pLAB(evrec);
111
112 //-- Add the resonance at the EventRecord
114 int mom = evrec->HitNucleonPosition();
115
116 //-- Get vtx position
117 GHepParticle * neutrino = evrec->Probe();
118 const TLorentzVector & vtx = *(neutrino->X4());
119
120 evrec->AddParticle(pdgc, ist, mom,-1,-1,-1, p4, vtx);
121}
const TLorentzVector * X4(void) const
virtual GHepParticle * Probe(void) const
virtual void AddParticle(const GHepParticle &p)
virtual int HitNucleonPosition(void) const
TLorentzVector Hadronic4pLAB(GHepRecord *event_rec) const
@ kIStPreDecayResonantState
Definition GHepStatus.h:36
enum genie::EGHepStatus GHepStatus_t

References genie::GHepRecord::AddParticle(), genie::HadronicSystemGenerator::Hadronic4pLAB(), genie::GHepRecord::HitNucleonPosition(), genie::kIStPreDecayResonantState, genie::GHepRecord::Probe(), and genie::GHepParticle::X4().

Referenced by ProcessEventRecord().

◆ Configure() [1/2]

void RESHadronicSystemGenerator::Configure ( const Registry & config)
virtual

Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority

Reimplemented from genie::Algorithm.

Definition at line 207 of file RESHadronicSystemGenerator.cxx.

208{
209 Algorithm::Configure(config);
210 this->LoadConfig();
211}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62

References genie::Algorithm::Configure(), and LoadConfig().

◆ Configure() [2/2]

void RESHadronicSystemGenerator::Configure ( string config)
virtual

Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration

Reimplemented from genie::Algorithm.

Definition at line 213 of file RESHadronicSystemGenerator.cxx.

214{
215 Algorithm::Configure(config);
216 this->LoadConfig();
217}

References genie::Algorithm::Configure(), and LoadConfig().

◆ GetResonancePdgCode()

int RESHadronicSystemGenerator::GetResonancePdgCode ( GHepRecord * evrec) const
private

Definition at line 82 of file RESHadronicSystemGenerator.cxx.

83{
84// In the RES thread the resonance is specifed when selecting interaction
85// This method adds it to the GHEP record.
86
87 Interaction * interaction = evrec->Summary();
88
89 // Get resonance id
90 const XclsTag & xcls = interaction->ExclTag();
91 assert(xcls.KnownResonance());
92 Resonance_t res = xcls.Resonance();
93
94 // Get resonance charge
95 int q_res = this->ResonanceCharge(evrec);
96
97 // Find resonance PDG code from resonance charge and id
98 int pdgc = utils::res::PdgCode(res, q_res);
99
100 LOG("RESHadronicVtx", pNOTICE)
101 << "Selected event has RES with PDGC = " << pdgc << ", Q = " << q_res;
102
103 return pdgc;
104}
#define pNOTICE
Definition Messenger.h:61
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
virtual Interaction * Summary(void) const
int ResonanceCharge(GHepRecord *event_rec) const
const XclsTag & ExclTag(void) const
Definition Interaction.h:72
Resonance_t Resonance(void) const
Definition XclsTag.h:69
bool KnownResonance(void) const
Definition XclsTag.h:68
int PdgCode(Resonance_t res, int Q)
(resonance id, charge) -> PDG code
enum genie::EResonance Resonance_t

References genie::Interaction::ExclTag(), genie::XclsTag::KnownResonance(), LOG, genie::utils::res::PdgCode(), pNOTICE, genie::XclsTag::Resonance(), genie::HadronicSystemGenerator::ResonanceCharge(), and genie::GHepRecord::Summary().

Referenced by ProcessEventRecord().

◆ LoadConfig()

void RESHadronicSystemGenerator::LoadConfig ( void )
private

Definition at line 219 of file RESHadronicSystemGenerator.cxx.

220{
222 //fPreINukeDecayer = 0;
223
224 // Get the specified decayers
226 dynamic_cast<const EventRecordVisitorI *> (this->SubAlg("Decayer"));
227 assert(fResonanceDecayer);
228 // fPreINukeDecayer =
229 // dynamic_cast<const EventRecordVisitorI *> (this->SubAlg("PreTransportDecayer"));
230 // assert(fPreINukeDecayer);
231}
const Algorithm * SubAlg(const RgKey &registry_key) const
const EventRecordVisitorI * fResonanceDecayer

References fResonanceDecayer, and genie::Algorithm::SubAlg().

Referenced by Configure(), and Configure().

◆ ProcessEventRecord()

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

Implements genie::EventRecordVisitorI.

Definition at line 58 of file RESHadronicSystemGenerator.cxx.

59{
60// This method generates the final state hadronic system
61
62 // Get the right resonance PDG code so that the selected resonance
63 // conserves charge
64 int pdgc = GetResonancePdgCode(evrec);
65
66 // Add the selected resonance
67 this->AddResonance(evrec,pdgc);
68
69 // Decay the resonance (and its decay products, if they include resonances)
70 fResonanceDecayer->ProcessEventRecord(evrec);
71
72 // Add the baryon resonance decay products at the event record
73 //this->AddResonanceDecayProducts(evrec,pdgc);
74
75 // Handle resonance decay channels to other resonances or short-living
76 // partices
77 //LOG("RESHadronicVtx", pNOTICE)
78 // << "Decay any resonance in the initial resonance decay products";
79 //this->PreHadronTransportDecays(evrec);
80}
void AddResonance(GHepRecord *evrec, int pdgc) const
int GetResonancePdgCode(GHepRecord *evrec) const

References AddResonance(), fResonanceDecayer, and GetResonancePdgCode().

Member Data Documentation

◆ fResonanceDecayer

const EventRecordVisitorI* genie::RESHadronicSystemGenerator::fResonanceDecayer
private

Definition at line 57 of file RESHadronicSystemGenerator.h.

Referenced by LoadConfig(), and ProcessEventRecord().


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