GENIEGenerator
Loading...
Searching...
No Matches
SpectralFunction2p2h.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 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
47using namespace genie;
48using namespace genie::constants;
49
50//___________________________________________________________________________
52SecondNucleonEmissionI("genie::SpectralFunction2p2h")
53{
54
55}
56//___________________________________________________________________________
58 SecondNucleonEmissionI("genie::SpectralFunction2p2h", config)
59{
60
61}
62//___________________________________________________________________________
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
78 FermiMoverInteractionType_t interaction_type = fNuclModel->GetFermiMoverInteractionType();
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{
93 this->LoadConfig();
94}
95//____________________________________________________________________________
97{
99 this->LoadConfig();
100}
101//____________________________________________________________________________
106//____________________________________________________________________________
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62
STDHEP-like event record entry that can fit a particle or a nucleus.
int Pdg(void) const
GENIE's GHEP MC event record.
Definition GHepRecord.h:45
virtual GHepParticle * HitNucleon(void) const
Initial State information.
Summary information for an interaction.
Definition Interaction.h:56
A registry. Provides the container for algorithm configuration parameters.
Definition Registry.h:65
const NuclearModelI * fNuclModel
nuclear model
virtual bool EmitSecondNucleon(GHepRecord *evrec, const int eject_nucleon_pdg) const
void ProcessEventRecord(GHepRecord *event_rec) const
void Configure(const Registry &config)
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition Target.h:40
Basic constants.
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
enum genie::EFermiMoverInteractionType FermiMoverInteractionType_t
const int kPdgProton
Definition PDGCodes.h:81
const int kPdgNeutron
Definition PDGCodes.h:83
@ kFermiMoveEffectiveSF2p2h_eject