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

Generates the final state hadronic system in v IBD interactions. Is a concrete implementation of the EventRecordVisitorI interface. More...

#include <IBDHadronicSystemGenerator.h>

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

Public Member Functions

 IBDHadronicSystemGenerator ()
 IBDHadronicSystemGenerator (string config)
virtual ~IBDHadronicSystemGenerator ()
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 AddRecoilBaryon (GHepRecord *event_rec) const

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 IBD interactions. Is a concrete implementation of the EventRecordVisitorI interface.

Author
Corey Reed <cjreed \at nikhef.nl> - October 29, 2009 using code from the QELKinematicGenerator written by Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n October 29, 2009
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 29 of file IBDHadronicSystemGenerator.h.

Constructor & Destructor Documentation

◆ IBDHadronicSystemGenerator() [1/2]

IBDHadronicSystemGenerator::IBDHadronicSystemGenerator ( )

Definition at line 29 of file IBDHadronicSystemGenerator.cxx.

29 :
30HadronicSystemGenerator("genie::IBDHadronicSystemGenerator")
31{
32
33}

References genie::HadronicSystemGenerator::HadronicSystemGenerator().

◆ IBDHadronicSystemGenerator() [2/2]

IBDHadronicSystemGenerator::IBDHadronicSystemGenerator ( string config)

Definition at line 35 of file IBDHadronicSystemGenerator.cxx.

35 :
36HadronicSystemGenerator("genie::IBDHadronicSystemGenerator", config)
37{
38
39}

References genie::HadronicSystemGenerator::HadronicSystemGenerator().

◆ ~IBDHadronicSystemGenerator()

IBDHadronicSystemGenerator::~IBDHadronicSystemGenerator ( )
virtual

Definition at line 41 of file IBDHadronicSystemGenerator.cxx.

42{
43
44}

Member Function Documentation

◆ AddRecoilBaryon()

void IBDHadronicSystemGenerator::AddRecoilBaryon ( GHepRecord * event_rec) const
private

Definition at line 57 of file IBDHadronicSystemGenerator.cxx.

58{
59 //-- Determine the pdg & status code of the recoil baryon
60 Interaction * interaction = evrec->Summary();
61 const int pdgc = interaction->RecoilNucleonPdg();
62 assert(pdgc!=0);
63
64 //-- Determine the status code
65 const Target & tgt = interaction->InitState().Tgt();
66 const GHepStatus_t ist = (tgt.IsNucleus()) ?
68
69 //-- Get the vtx position
70 const GHepParticle * neutrino = evrec->Probe();
71 const TLorentzVector & vtx = *(neutrino->X4());
72
73 //-- Get nucleon 4-momentum (in the LAB frame) & position
74 const TLorentzVector p4 = this->Hadronic4pLAB(evrec);
75
76 //-- Get mother position
77 const int mom = evrec->HitNucleonPosition();
78
79 //-- Add the final state recoil baryon at the EventRecord
80 LOG("IBD", pINFO)
81 << "Adding recoil baryon [pdgc = " << pdgc << "]";
82
83 GHepParticle p(pdgc, ist, mom,-1,-1,-1, p4, vtx);
84 const double w = evrec->Particle(mom)->RemovalEnergy();
85 p.SetRemovalEnergy(w);
86 evrec->AddParticle(p);
87}
#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
const TLorentzVector * X4(void) const
TLorentzVector Hadronic4pLAB(GHepRecord *event_rec) const
const Target & Tgt(void) const
int RecoilNucleonPdg(void) const
recoil nucleon pdg
const InitialState & InitState(void) const
Definition Interaction.h:69
bool IsNucleus(void) const
Definition Target.cxx:272
@ kIStHadronInTheNucleus
Definition GHepStatus.h:37
@ kIStStableFinalState
Definition GHepStatus.h:30
enum genie::EGHepStatus GHepStatus_t

References genie::GHepRecord::AddParticle(), genie::HadronicSystemGenerator::Hadronic4pLAB(), genie::GHepRecord::HitNucleonPosition(), genie::Interaction::InitState(), genie::Target::IsNucleus(), genie::kIStHadronInTheNucleus, genie::kIStStableFinalState, LOG, genie::GHepRecord::Particle(), pINFO, genie::GHepRecord::Probe(), genie::Interaction::RecoilNucleonPdg(), genie::GHepParticle::RemovalEnergy(), genie::GHepParticle::SetRemovalEnergy(), genie::GHepRecord::Summary(), genie::InitialState::Tgt(), and genie::GHepParticle::X4().

Referenced by ProcessEventRecord().

◆ ProcessEventRecord()

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

Implements genie::EventRecordVisitorI.

Definition at line 46 of file IBDHadronicSystemGenerator.cxx.

47{
48// This method generates the final state hadronic system
49
50 // Add the recoil baryon
51 // (p or n)
52 // Its 4-momentum is computed by requiring the energy + momentum to be
53 // conserved.
54 this->AddRecoilBaryon(evrec);
55}
void AddRecoilBaryon(GHepRecord *event_rec) const

References AddRecoilBaryon().


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