Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Generator
src
Physics
NuclearState
SecondNucleonEmissionI.cxx
Go to the documentation of this file.
1
///____________________________________________________________________________
2
/*
3
Copyright (c) 2003-2019, 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
23
#include "
Framework/Algorithm/AlgFactory.h
"
24
#include "
Framework/Algorithm/AlgConfigPool.h
"
25
#include "
Framework/Conventions/Constants.h
"
26
#include "
Framework/Conventions/Units.h
"
27
#include "
Physics/NuclearState/SecondNucleonEmissionI.h
"
28
29
#include "
Physics/NuclearState/NuclearModel.h
"
30
#include "
Physics/NuclearState/NuclearModelI.h
"
31
#include "
Framework/EventGen/EVGThreadException.h
"
32
#include "
Framework/GHEP/GHepRecord.h
"
33
#include "
Framework/GHEP/GHepParticle.h
"
34
#include "
Framework/GHEP/GHepStatus.h
"
35
#include "
Framework/GHEP/GHepFlags.h
"
36
#include "
Framework/Interaction/Interaction.h
"
37
#include "
Framework/Messenger/Messenger.h
"
38
#include "
Physics/NuclearState/FermiMomentumTablePool.h
"
39
#include "
Physics/NuclearState/FermiMomentumTable.h
"
40
#include "
Framework/Numerical/RandomGen.h
"
41
#include "
Framework/ParticleData/PDGLibrary.h
"
42
#include "
Framework/ParticleData/PDGUtils.h
"
43
#include "
Framework/ParticleData/PDGCodes.h
"
44
#include "
Framework/Utils/KineUtils.h
"
45
#include "
Physics/NuclearState/NuclearUtils.h
"
46
47
using namespace
genie
;
48
using namespace
genie::constants
;
49
50
SecondNucleonEmissionI::SecondNucleonEmissionI
(
string
name
) :
51
EventRecordVisitorI
( name )
52
{
53
54
}
55
//___________________________________________________________________________
56
SecondNucleonEmissionI::SecondNucleonEmissionI
(
string
name
,
string
config
) :
57
EventRecordVisitorI
( name, config)
58
{
59
60
}
61
//___________________________________________________________________________
62
SecondNucleonEmissionI::~SecondNucleonEmissionI
()
63
{
64
65
}
66
67
//___________________________________________________________________________
68
bool
SecondNucleonEmissionI::EmitSecondNucleon
(
GHepRecord
* evrec,
const
int
eject_nucleon_pdg )
const
{
69
70
LOG
(
"SecondNucleonEmissionI"
,
pINFO
) <<
"Adding a recoil nucleon with PDG "
<< eject_nucleon_pdg ;
71
72
GHepParticle
* nucleon = evrec->
HitNucleon
();
73
74
GHepStatus_t
status
=
kIStHadronInTheNucleus
;
75
int
imom = evrec->
TargetNucleusPosition
();
76
77
//-- Has opposite momentum from the struck nucleon
78
double
vx = nucleon->
Vx
();
79
double
vy = nucleon->
Vy
();
80
double
vz = nucleon->
Vz
();
81
double
px
= -1.* nucleon->
Px
();
82
double
py
= -1.* nucleon->
Py
();
83
double
pz
= -1.* nucleon->
Pz
();
84
double
M =
PDGLibrary::Instance
()->
Find
(eject_nucleon_pdg)->Mass();
85
double
E
= TMath::Sqrt(px*px+py*py+pz*pz+M*M);
86
87
evrec->
AddParticle
( eject_nucleon_pdg, status, imom, -1, -1, -1, px, py, pz, E, vx, vy, vz, 0 );
88
89
return
true ;
90
}
91
//____________________________________________________________________________
92
void
SecondNucleonEmissionI::LoadConfig
(
void
)
93
{
94
95
RgKey
nuclkey =
"NuclearModel"
;
96
fNuclModel
= 0;
97
fNuclModel
=
dynamic_cast<
const
NuclearModelI
*
>
(this->
SubAlg
(nuclkey));
98
assert(
fNuclModel
);
99
100
}
101
//____________________________________________________________________________
name
static QCString name
Definition:
declinfo.cpp:673
genie::SecondNucleonEmissionI::LoadConfig
void LoadConfig(void)
Definition:
SecondNucleonEmissionI.cxx:92
FermiMomentumTablePool.h
EVGThreadException.h
genie::constants
Basic constants.
genie::SecondNucleonEmissionI::EmitSecondNucleon
virtual bool EmitSecondNucleon(GHepRecord *evrec, const int eject_nucleon_pdg) const
Definition:
SecondNucleonEmissionI.cxx:68
GHepStatus.h
reco_momentum_tuples.py
py
Definition:
reco_momentum_tuples.py:219
SecondNucleonEmissionI.h
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition:
AlgCmp.h:25
genie::EventRecordVisitorI
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the 'Visito...
Definition:
EventRecordVisitorI.h:29
NuclearUtils.h
GHepRecord.h
genie::NuclearModelI
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
Definition:
NuclearModelI.h:46
NuclearModel.h
Constants.h
reco_momentum_tuples.px
px
Definition:
reco_momentum_tuples.py:218
AlgConfigPool.h
genie::SecondNucleonEmissionI::~SecondNucleonEmissionI
virtual ~SecondNucleonEmissionI()
Definition:
SecondNucleonEmissionI.cxx:62
genie::GHepParticle::Pz
double Pz(void) const
Get Pz.
Definition:
GHepParticle.h:90
NuclearModelI.h
genie::GHepParticle::Px
double Px(void) const
Get Px.
Definition:
GHepParticle.h:88
Interaction.h
LOG
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition:
Messenger.h:96
config
static Config * config
Definition:
config.cpp:1054
create_imaplist.status
int status
Definition:
create_imaplist.py:5
GHepParticle.h
GHepFlags.h
pINFO
#define pINFO
Definition:
Messenger.h:62
Messenger.h
KineUtils.h
Units.h
PDGUtils.h
E
Definition:
pointersEqual_t.cc:12
reco_momentum_tuples.pz
pz
Definition:
reco_momentum_tuples.py:220
genie::SecondNucleonEmissionI::SecondNucleonEmissionI
SecondNucleonEmissionI(string name)
Definition:
SecondNucleonEmissionI.cxx:50
genie::PDGLibrary::Instance
static PDGLibrary * Instance(void)
Definition:
PDGLibrary.cxx:57
PDGLibrary.h
genie::GHepParticle::Vz
double Vz(void) const
Get production z.
Definition:
GHepParticle.h:96
RgKey
string RgKey
Definition:
RegistryItemTypeDef.h:33
genie::GHepRecord::HitNucleon
virtual GHepParticle * HitNucleon(void) const
Definition:
GHepRecord.cxx:306
genie::kIStHadronInTheNucleus
Definition:
GHepStatus.h:37
genie::SecondNucleonEmissionI::fNuclModel
const NuclearModelI * fNuclModel
nuclear model
Definition:
SecondNucleonEmissionI.h:43
FermiMomentumTable.h
RandomGen.h
genie::GHepRecord::AddParticle
virtual void AddParticle(const GHepParticle &p)
Definition:
GHepRecord.cxx:491
genie::PDGLibrary::Find
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition:
PDGLibrary.cxx:75
genie::GHepParticle::Vy
double Vy(void) const
Get production y.
Definition:
GHepParticle.h:95
AlgFactory.h
genie::GHepRecord
GENIE's GHEP MC event record.
Definition:
GHepRecord.h:45
PDGCodes.h
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
genie::GHepParticle
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition:
GHepParticle.h:39
genie::GHepRecord::TargetNucleusPosition
virtual int TargetNucleusPosition(void) const
Definition:
GHepRecord.cxx:362
genie::GHepStatus_t
enum genie::EGHepStatus GHepStatus_t
genie::GHepParticle::Vx
double Vx(void) const
Get production x.
Definition:
GHepParticle.h:94
genie::GHepParticle::Py
double Py(void) const
Get Py.
Definition:
GHepParticle.h:89
genie::Algorithm::SubAlg
const Algorithm * SubAlg(const RgKey ®istry_key) const
Definition:
Algorithm.cxx:345
Generated by
1.8.11