QELHadronicSystemGenerator.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2020, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
7  University of Liverpool & STFC Rutherford Appleton Laboratory
8 */
9 //____________________________________________________________________________
10 
19 
20 using namespace genie;
21 
22 //___________________________________________________________________________
24 HadronicSystemGenerator("genie::QELHadronicSystemGenerator")
25 {
26 
27 }
28 //___________________________________________________________________________
30 HadronicSystemGenerator("genie::QELHadronicSystemGenerator", config)
31 {
32 
33 }
34 //___________________________________________________________________________
36 {
37 
38 }
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 
85  p.SetRemovalEnergy(w);
86  evrec->AddParticle(p);
87 }
88 //___________________________________________________________________________
virtual GHepParticle * Particle(int position) const
Definition: GHepRecord.cxx:104
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
TLorentzVector Hadronic4pLAB(GHepRecord *event_rec) const
virtual Interaction * Summary(void) const
Definition: GHepRecord.cxx:91
int RecoilNucleonPdg(void) const
recoil nucleon pdg
int CharmHadronPdg(void) const
Definition: XclsTag.h:52
bool IsStrangeEvent(void) const
Definition: XclsTag.h:53
bool IsNucleus(void) const
Definition: Target.cxx:272
virtual int HitNucleonPosition(void) const
Definition: GHepRecord.cxx:410
double RemovalEnergy(void) const
Get removal energy.
Definition: GHepParticle.h:100
void AddRecoilBaryon(GHepRecord *event_rec) const
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:39
virtual GHepParticle * Probe(void) const
Definition: GHepRecord.cxx:277
bool IsCharmEvent(void) const
Definition: XclsTag.h:50
Summary information for an interaction.
Definition: Interaction.h:56
int StrangeHadronPdg(void) const
Definition: XclsTag.h:55
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static Config * config
Definition: config.cpp:1054
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
p
Definition: test.py:223
#define pINFO
Definition: Messenger.h:62
void SetRemovalEnergy(double Erm)
void ProcessEventRecord(GHepRecord *event_rec) const
const TLorentzVector * X4(void) const
Definition: GHepParticle.h:79
const XclsTag & ExclTag(void) const
Definition: Interaction.h:72
virtual void AddParticle(const GHepParticle &p)
Definition: GHepRecord.cxx:491
const InitialState & InitState(void) const
Definition: Interaction.h:69
Abstract class. Is used to pass some commonly recurring methods to all concrete implementations of th...
const Target & Tgt(void) const
Definition: InitialState.h:66
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45
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.
Definition: GHepParticle.h:39
enum genie::EGHepStatus GHepStatus_t