GENIEGenerator
Loading...
Searching...
No Matches
QELHadronicSystemGenerator.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, The GENIE Collaboration
4 For the full text of the license visit http://copyright.genie-mc.org
5
6 Costas Andreopoulos <c.andreopoulos \at cern.ch>
7 University of Liverpool
8*/
9//____________________________________________________________________________
10
19
20using namespace genie;
21
22//___________________________________________________________________________
24HadronicSystemGenerator("genie::QELHadronicSystemGenerator")
25{
26
27}
28//___________________________________________________________________________
30HadronicSystemGenerator("genie::QELHadronicSystemGenerator", config)
31{
32
33}
34//___________________________________________________________________________
39//___________________________________________________________________________
41{
42// This method generates the final state hadronic system
43
44 // Add the recoil baryon
45 // (p or n - Lambda_c+,Sigma_c+,Sigma_c++ in charm/QEL)
46 // Its 4-momentum is computed by requiring the energy + momentum to be
47 // conserved.
48 this->AddRecoilBaryon(evrec);
49}
50//___________________________________________________________________________
52{
53 //-- Determine the pdg & status code of the recoil baryon
54 Interaction * interaction = evrec->Summary();
55 const XclsTag & xcls = interaction->ExclTag();
56 int pdgc = 0;
57 if (xcls.IsCharmEvent()) { pdgc = xcls.CharmHadronPdg(); }
58 else if(xcls.IsStrangeEvent()) { pdgc = xcls.StrangeHadronPdg(); }
59 else { pdgc = interaction->RecoilNucleonPdg(); }
60 assert(pdgc!=0);
61
62 //-- Determine the status code
63 const Target & tgt = interaction->InitState().Tgt();
64 GHepStatus_t ist = (tgt.IsNucleus()) ?
66
67 //-- Get the vtx position
68 GHepParticle * neutrino = evrec->Probe();
69 const TLorentzVector & vtx = *(neutrino->X4());
70
71 //-- Get nucleon 4-momentum (in the LAB frame) & position
72 TLorentzVector p4 = this->Hadronic4pLAB(evrec);
73
74 //-- Get mother position
75 int mom = evrec->HitNucleonPosition();
76
77 //-- Add the final state recoil baryon at the EventRecord
78 LOG("QELHadronicVtx", pINFO)
79 << "Adding recoil baryon [pdgc = " << pdgc << "]";
80
81 GHepParticle p(pdgc, ist, mom,-1,-1,-1, p4, vtx);
82 double w = ( xcls.IsCharmEvent() || xcls.IsStrangeEvent()) ?
83 0. : evrec->Particle(mom)->RemovalEnergy();
84
86 evrec->AddParticle(p);
87}
88//___________________________________________________________________________
#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
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
STDHEP-like event record entry that can fit a particle or a nucleus.
void SetRemovalEnergy(double Erm)
double RemovalEnergy(void) const
Get removal energy.
const TLorentzVector * X4(void) const
GENIE's GHEP MC event record.
Definition GHepRecord.h:45
virtual GHepParticle * Probe(void) const
virtual Interaction * Summary(void) const
virtual void AddParticle(const GHepParticle &p)
virtual GHepParticle * Particle(int position) const
virtual int HitNucleonPosition(void) const
TLorentzVector Hadronic4pLAB(GHepRecord *event_rec) const
const Target & Tgt(void) const
Summary information for an interaction.
Definition Interaction.h:56
const XclsTag & ExclTag(void) const
Definition Interaction.h:72
int RecoilNucleonPdg(void) const
recoil nucleon pdg
const InitialState & InitState(void) const
Definition Interaction.h:69
void AddRecoilBaryon(GHepRecord *event_rec) const
void ProcessEventRecord(GHepRecord *event_rec) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition Target.h:40
bool IsNucleus(void) const
Definition Target.cxx:272
Contains minimal information for tagging exclusive processes.
Definition XclsTag.h:39
bool IsStrangeEvent(void) const
Definition XclsTag.h:53
bool IsCharmEvent(void) const
Definition XclsTag.h:50
int StrangeHadronPdg(void) const
Definition XclsTag.h:55
int CharmHadronPdg(void) const
Definition XclsTag.h:52
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
@ kIStHadronInTheNucleus
Definition GHepStatus.h:37
@ kIStStableFinalState
Definition GHepStatus.h:30
enum genie::EGHepStatus GHepStatus_t