GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SpectralFunction2p2h.cxx
Go to the documentation of this file.
1 ///____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Author: Afroditi Papadopoulou <apapadop \at mit.edu>
8  Massachusetts Institute of Technology - October 04, 2019
9 
10  @ October 4, 2019 - Afroditi Papadopoulou (AP)
11  Created this new module that controls the addition of the recoil nucleon in the event record
12  and extracts its kinematics
13 */
14 //____________________________________________________________________________
15 
16 #include <cstdlib>
17 
18 #include <TLorentzVector.h>
19 #include <TVector3.h>
20 #include <TParticlePDG.h>
21 #include <TMath.h>
22 
28 
46 
47 using namespace genie;
48 using namespace genie::constants;
49 
50 //___________________________________________________________________________
52 SecondNucleonEmissionI("genie::SpectralFunction2p2h")
53 {
54 
55 }
56 //___________________________________________________________________________
58  SecondNucleonEmissionI("genie::SpectralFunction2p2h", config)
59 {
60 
61 }
62 //___________________________________________________________________________
64 {
65 
66 }
67 //___________________________________________________________________________
69 {
70 
71  Interaction * interaction = evrec -> Summary();
72  InitialState * init_state = interaction -> InitStatePtr();
73  Target * tgt = init_state -> TgtPtr();
74 
75  if ( tgt -> A() <= 2 ) return ;
76  if ( tgt -> Z() < 2 ) return ;
77 
79 
80  if ( interaction_type == kFermiMoveEffectiveSF2p2h_eject ) {
81 
82  GHepParticle * nucleon = evrec->HitNucleon();
83  int second_nucleon_pdg = nucleon->Pdg() == kPdgProton ? kPdgNeutron : kPdgProton ;
84  SecondNucleonEmissionI::EmitSecondNucleon( evrec, second_nucleon_pdg );
85 
86  }
87 
88 }
89 //____________________________________________________________________________
91 {
92  Algorithm::Configure(config);
93  this->LoadConfig();
94 }
95 //____________________________________________________________________________
97 {
98  Algorithm::Configure(config);
99  this->LoadConfig();
100 }
101 //____________________________________________________________________________
103 {
105 }
106 //____________________________________________________________________________
virtual bool EmitSecondNucleon(GHepRecord *evrec, const int eject_nucleon_pdg) const
FermiMoverInteractionType_t GetFermiMoverInteractionType(void) const
Definition: NuclearModelI.h:80
int Pdg(void) const
Definition: GHepParticle.h:63
Summary information for an interaction.
Definition: Interaction.h:56
static constexpr double A
Definition: Units.h:74
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
enum genie::EFermiMoverInteractionType FermiMoverInteractionType_t
Interface to drive the a second nucleon emission from a nucleus Specfic impelmentations will have dif...
void Configure(const Registry &config)
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
virtual GHepParticle * HitNucleon(void) const
Definition: GHepRecord.cxx:313
const NuclearModelI * fNuclModel
nuclear model
const int kPdgProton
Definition: PDGCodes.h:81
const int kPdgNeutron
Definition: PDGCodes.h:83
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
void ProcessEventRecord(GHepRecord *event_rec) const
Initial State information.
Definition: InitialState.h:48