diff --git a/.gitignore b/.gitignore
index 855e019c8..8de7e0a0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,4 @@ src/Framework/Conventions/GVersion.h
*~
*.rootmap
*_ROOT_DICT_*
-*.swp
+*.swp
\ No newline at end of file
diff --git a/config/AR23_20i/ModelConfiguration.xml b/config/AR23_20i/ModelConfiguration.xml
index 69e2930a1..63e847358 100644
--- a/config/AR23_20i/ModelConfiguration.xml
+++ b/config/AR23_20i/ModelConfiguration.xml
@@ -44,6 +44,19 @@ STFC, Rutherford Appleton Laboratory
genie::SpectralFunc1d/Default
-->
+
+ genie::BohrElectronVelocity/Default
+
- genie::IMDXSec/Default
+ genie::XSecOnElectron/Default
+ genie::ElectronVelocityMap/Default
+ 10000
+ 0.0001
diff --git a/config/BohrElectronVelocity.xml b/config/BohrElectronVelocity.xml
new file mode 100644
index 000000000..f88208339
--- /dev/null
+++ b/config/BohrElectronVelocity.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/config/EventGenerator.xml b/config/EventGenerator.xml
index 69cd17af2..b31cf5502 100644
--- a/config/EventGenerator.xml
+++ b/config/EventGenerator.xml
@@ -425,34 +425,37 @@ XSecModel alg Yes Cross section model used at the thread
- 5
+ 6
genie::InitialStateAppender/Default
genie::VertexGenerator/Default
- genie::NuEKinematicsGenerator/Default
- genie::NuEPrimaryLeptonGenerator/Default
- genie::NuETargetRemnantGenerator/Default
+ genie::ElectronVelocityMap/Default
+ genie::NuEKinematicsGenerator/Default
+ genie::NuEPrimaryLeptonGenerator/Default
+ genie::NuETargetRemnantGenerator/Default
genie::NuEInteractionListGenerator/IMD
- 5
+ 6
genie::InitialStateAppender/Default
genie::VertexGenerator/Default
- genie::NuEKinematicsGenerator/Default
- genie::NuEPrimaryLeptonGenerator/Default
- genie::NuETargetRemnantGenerator/Default
+ genie::ElectronVelocityMap/Default
+ genie::NuEKinematicsGenerator/Default
+ genie::NuEPrimaryLeptonGenerator/Default
+ genie::NuETargetRemnantGenerator/Default
genie::NuEInteractionListGenerator/IMD-ANH
- 5
+ 6
genie::InitialStateAppender/Default
genie::VertexGenerator/Default
- genie::NuEKinematicsGenerator/Default
- genie::NuEPrimaryLeptonGenerator/Default
- genie::NuETargetRemnantGenerator/Default
+ genie::ElectronVelocityMap/Default
+ genie::NuEKinematicsGenerator/Default
+ genie::NuEPrimaryLeptonGenerator/Default
+ genie::NuETargetRemnantGenerator/Default
genie::NuEInteractionListGenerator/NUE-EL
diff --git a/config/G00_00a/EventGenerator.xml b/config/G00_00a/EventGenerator.xml
index 2d873f1ad..d728bcd00 100644
--- a/config/G00_00a/EventGenerator.xml
+++ b/config/G00_00a/EventGenerator.xml
@@ -300,36 +300,39 @@ XSecModel alg Yes Cross section model used at the thread
genie::DISInteractionListGenerator/CC-Charm-Default
-
+
- 5
+ 6
genie::InitialStateAppender/Default
genie::VertexGenerator/Default
- genie::NuEKinematicsGenerator/Default
- genie::NuEPrimaryLeptonGenerator/Default
- genie::NuETargetRemnantGenerator/Default
+ genie::ElectronVelocityMap/Default
+ genie::NuEKinematicsGenerator/Default
+ genie::NuEPrimaryLeptonGenerator/Default
+ genie::NuETargetRemnantGenerator/Default
genie::NuEInteractionListGenerator/IMD
-
+
- 5
+ 6
genie::InitialStateAppender/Default
genie::VertexGenerator/Default
- genie::NuEKinematicsGenerator/Default
- genie::NuEPrimaryLeptonGenerator/Default
- genie::NuETargetRemnantGenerator/Default
+ genie::ElectronVelocityMap/Default
+ genie::NuEKinematicsGenerator/Default
+ genie::NuEPrimaryLeptonGenerator/Default
+ genie::NuETargetRemnantGenerator/Default
genie::NuEInteractionListGenerator/IMD-ANH
-
+
- 5
+ 6
genie::InitialStateAppender/Default
genie::VertexGenerator/Default
- genie::NuEKinematicsGenerator/Default
- genie::NuEPrimaryLeptonGenerator/Default
- genie::NuETargetRemnantGenerator/Default
+ genie::ElectronVelocityMap/Default
+ genie::NuEKinematicsGenerator/Default
+ genie::NuEPrimaryLeptonGenerator/Default
+ genie::NuETargetRemnantGenerator/Default
genie::NuEInteractionListGenerator/NUE-EL
diff --git a/config/G00_00a/ModelConfiguration.xml b/config/G00_00a/ModelConfiguration.xml
index 106bca2db..b227139fc 100644
--- a/config/G00_00a/ModelConfiguration.xml
+++ b/config/G00_00a/ModelConfiguration.xml
@@ -43,6 +43,17 @@ STFC, Rutherford Appleton Laboratory
genie::SpectralFunc1d/Default
-->
+
+ genie::StaticElectronVelocity/Default
-
+
+
+ genie::StaticElectronVelocity/Default
+
+ genie::StaticElectronVelocity/Default
+
-
-
+
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+
+
+ genie::BohrElectronVelocity/Default
+
-
+
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
+
+ genie::BohrElectronVelocity/Default
-
+
+
+ genie::BohrElectronVelocity/Default
-
+
+
+ genie::BohrElectronVelocity/Default
+
+
+ genie::BohrElectronVelocity/Default
+ genie::BohrElectronVelocity/Default
+
+
- genie::IMDXSec/Default
+ genie::XSecOnElectron/Default
+ genie::ElectronVelocityMap/Default
+ 10000
+ 0.0001
diff --git a/config/IMDXSec.xml b/config/IMDXSec.xml
deleted file mode 100644
index 38eee9e52..000000000
--- a/config/IMDXSec.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
- adaptive
- 40000
- 0.001
-
-
-
-
diff --git a/config/Messenger.xml b/config/Messenger.xml
index 20607f9dd..338504d1c 100644
--- a/config/Messenger.xml
+++ b/config/Messenger.xml
@@ -109,7 +109,6 @@
WARN
WARN
NOTICE
- NOTICE
WARN
WARN
NOTICE
diff --git a/config/Messenger_whisper.xml b/config/Messenger_whisper.xml
index a8450bb2c..efd740454 100644
--- a/config/Messenger_whisper.xml
+++ b/config/Messenger_whisper.xml
@@ -104,7 +104,6 @@
FATAL
FATAL
FATAL
- FATAL
FATAL
FATAL
FATAL
diff --git a/config/NuElectronPXSec.xml b/config/NuElectronPXSec.xml
index 8fe2b2992..55a270038 100644
--- a/config/NuElectronPXSec.xml
+++ b/config/NuElectronPXSec.xml
@@ -7,15 +7,21 @@ Configuration for the NuElectronPXSec xsec algorithm.
Configurable Parameters:
....................................................................................
-Name Type Optional Comment Default
-WeinbergAngle double No CommonParam[WeakInt]
+Name Type Optional Comment Default
+WeinbergAngle double No CommonParam[WeakInt]
+XSec-Integrator alg No genie::XSecOnElectron/Default
+Electron-Velocity alg No genie::ElectronVelocityMap/Default
+N-Integration-Samples int No max iteration in case error doesn't converge 10000
+NuE-XSecRelError double No error to accept xsec in integrator 0.001
....................................................................................
-->
WeakInt
-
- genie::NuElectronXSec/Default
+ genie::XSecOnElectron/Default
+ genie::ElectronVelocityMap/Default
+ 10000
+ 0.001
diff --git a/config/NuElectronXSec.xml b/config/NuElectronXSec.xml
deleted file mode 100644
index 9c30e669a..000000000
--- a/config/NuElectronXSec.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
- adaptive
- 40000
- 0.001
-
-
-
-
diff --git a/config/StaticElectronVelocity.xml b/config/StaticElectronVelocity.xml
new file mode 100644
index 000000000..a48332360
--- /dev/null
+++ b/config/StaticElectronVelocity.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/config/master_config.xml b/config/master_config.xml
index 048508c3f..35194edca 100644
--- a/config/master_config.xml
+++ b/config/master_config.xml
@@ -5,6 +5,9 @@
EventGenerator.xml
FermiMover.xml
+ Default.xml
+ BohrElectronVelocity.xml
+ Default.xml
HadronTransporter.xml
HAIntranuke.xml
HAIntranuke2018.xml
@@ -160,10 +163,8 @@
CEvNSXSec.xml
DFRXSec.xml
AlamSimoAtharVacasSKXSec.xml
- IMDXSec.xml
RESXSec.xml
MECXSec.xml
- NuElectronXSec.xml
DMElectronXSec.xml
DMELXSec.xml
DMDISXSec.xml
diff --git a/src/Apps/gSplineXml2Root.cxx b/src/Apps/gSplineXml2Root.cxx
index 29249200c..af68f10b8 100644
--- a/src/Apps/gSplineXml2Root.cxx
+++ b/src/Apps/gSplineXml2Root.cxx
@@ -630,8 +630,8 @@ void SaveGraphsToRootFile(void)
<< " interaction type has not recongnised: spline not added " ;
continue; }
- if(tgt.HitNucIsSet()) {
- int hitnuc = tgt.HitNucPdg();
+ if(tgt.HitPartIsSet() && tgt.HitPartPdg() != kPdgElectron) {
+ int hitnuc = tgt.HitPartPdg();
if ( pdg::IsProton (hitnuc) ) { title << "_p"; }
else if ( pdg::IsNeutron(hitnuc) ) { title << "_n"; }
else if ( pdg::Is2NucleonCluster(hitnuc) )
@@ -752,22 +752,22 @@ void SaveGraphsToRootFile(void)
const Spline * spl = evg_driver.XSecSpline(interaction);
- if (proc.IsResonant() && proc.IsWeakCC() && pdg::IsProton(tgt.HitNucPdg())) {
+ if (proc.IsResonant() && proc.IsWeakCC() && pdg::IsProton(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsResonant() && proc.IsWeakCC() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsResonant() && proc.IsWeakCC() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsResonant() && proc.IsWeakNC() && pdg::IsProton(tgt.HitNucPdg())) {
+ if (proc.IsResonant() && proc.IsWeakNC() && pdg::IsProton(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsResonant() && proc.IsWeakNC() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsResonant() && proc.IsWeakNC() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
@@ -820,25 +820,25 @@ void SaveGraphsToRootFile(void)
if(xcls.IsCharmEvent()) continue;
- if (proc.IsDeepInelastic() && proc.IsWeakCC() && pdg::IsProton(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsWeakCC() && pdg::IsProton(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
xsdisccp[i] += (spl->Evaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsDeepInelastic() && proc.IsWeakCC() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsWeakCC() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
xsdisccn[i] += (spl->Evaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsDeepInelastic() && proc.IsWeakNC() && pdg::IsProton(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsWeakNC() && pdg::IsProton(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
xsdisncp[i] += (spl->Evaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsDeepInelastic() && proc.IsWeakNC() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsWeakNC() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
xsdisncn[i] += (spl->Evaluate(e[i]) * (1E+38/units::cm2));
@@ -893,25 +893,25 @@ void SaveGraphsToRootFile(void)
if(!xcls.IsCharmEvent()) continue;
- if (proc.IsDeepInelastic() && proc.IsWeakCC() && pdg::IsProton(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsWeakCC() && pdg::IsProton(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
xsdisccp[i] += (spl->Evaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsDeepInelastic() && proc.IsWeakCC() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsWeakCC() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
xsdisccn[i] += (spl->Evaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsDeepInelastic() && proc.IsWeakNC() && pdg::IsProton(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsWeakNC() && pdg::IsProton(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
xsdisncp[i] += (spl->Evaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsDeepInelastic() && proc.IsWeakNC() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsWeakNC() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
xsdisncn[i] += (spl->Evaluate(e[i]) * (1E+38/units::cm2));
@@ -1110,8 +1110,8 @@ void SaveGraphsToRootFile(void)
bool iscc = proc.IsWeakCC();
bool isnc = proc.IsWeakNC();
- bool offp = pdg::IsProton (tgt.HitNucPdg());
- bool offn = pdg::IsNeutron(tgt.HitNucPdg());
+ bool offp = pdg::IsProton (tgt.HitPartPdg());
+ bool offn = pdg::IsNeutron(tgt.HitPartPdg());
if (iscc && offp) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsResonant() && proc.IsEM() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsResonant() && proc.IsEM() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
@@ -1268,12 +1268,12 @@ void SaveGraphsToRootFile(void)
if(xcls.IsCharmEvent()) continue;
- if (proc.IsDeepInelastic() && proc.IsEM() && pdg::IsProton(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsEM() && pdg::IsProton(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsDeepInelastic() && proc.IsEM() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsEM() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
@@ -1307,12 +1307,12 @@ void SaveGraphsToRootFile(void)
if(!xcls.IsCharmEvent()) continue;
- if (proc.IsDeepInelastic() && proc.IsEM() && pdg::IsProton(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsEM() && pdg::IsProton(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
}
- if (proc.IsDeepInelastic() && proc.IsEM() && pdg::IsNeutron(tgt.HitNucPdg())) {
+ if (proc.IsDeepInelastic() && proc.IsEM() && pdg::IsNeutron(tgt.HitPartPdg())) {
for(int i=0; iEvaluate(e[i]) * (1E+38/units::cm2));
}
@@ -1347,8 +1347,8 @@ void SaveGraphsToRootFile(void)
const Spline * spl = evg_driver.XSecSpline(interaction);
bool isem = proc.IsEM();
- bool offp = pdg::IsProton (tgt.HitNucPdg());
- bool offn = pdg::IsNeutron(tgt.HitNucPdg());
+ bool offp = pdg::IsProton (tgt.HitPartPdg());
+ bool offn = pdg::IsNeutron(tgt.HitPartPdg());
if (isem && offp) {
for(int i=0; i 2.0) : false;
diff --git a/src/Framework/Interaction/InitialState.cxx b/src/Framework/Interaction/InitialState.cxx
index b74b5ef75..2d3c89311 100644
--- a/src/Framework/Interaction/InitialState.cxx
+++ b/src/Framework/Interaction/InitialState.cxx
@@ -199,7 +199,7 @@ void InitialState::SetTgtP4(const TLorentzVector & P4)
bool InitialState::IsNuP(void) const
{
int prob = fProbePdg;
- int nucl = fTgt->HitNucPdg();
+ int nucl = fTgt->HitPartPdg();
bool isvp = pdg::IsNeutrino(prob) && pdg::IsProton(nucl);
return isvp;
@@ -208,7 +208,7 @@ bool InitialState::IsNuP(void) const
bool InitialState::IsNuN(void) const
{
int prob = fProbePdg;
- int nucl = fTgt->HitNucPdg();
+ int nucl = fTgt->HitPartPdg();
bool isvn = pdg::IsNeutrino(prob) && pdg::IsNeutron(nucl);
return isvn;
@@ -217,7 +217,7 @@ bool InitialState::IsNuN(void) const
bool InitialState::IsNuBarP(void) const
{
int prob = fProbePdg;
- int nucl = fTgt->HitNucPdg();
+ int nucl = fTgt->HitPartPdg();
bool isvbp = pdg::IsAntiNeutrino(prob) && pdg::IsProton(nucl);
return isvbp;
@@ -226,7 +226,7 @@ bool InitialState::IsNuBarP(void) const
bool InitialState::IsNuBarN(void) const
{
int prob = fProbePdg;
- int nucl = fTgt->HitNucPdg();
+ int nucl = fTgt->HitPartPdg();
bool isvbn = pdg::IsAntiNeutrino(prob) && pdg::IsNeutron(nucl);
return isvbn;
@@ -236,7 +236,7 @@ bool InitialState::IsDMP(void) const
{
// Check if DM - proton interaction
int prob = fProbePdg;
- int nucl = fTgt->HitNucPdg();
+ int nucl = fTgt->HitPartPdg();
bool isdp = pdg::IsDarkMatter(prob) && pdg::IsProton(nucl);
return isdp;
@@ -246,7 +246,7 @@ bool InitialState::IsDMN(void) const
{
// Check if DM - neutron interaction
int prob = fProbePdg;
- int nucl = fTgt->HitNucPdg();
+ int nucl = fTgt->HitPartPdg();
bool isdn = pdg::IsDarkMatter(prob) && pdg::IsNeutron(nucl);
return isdn;
@@ -256,7 +256,7 @@ bool InitialState::IsDMBP(void) const
{
// Check if DM - proton interaction
int prob = fProbePdg;
- int nucl = fTgt->HitNucPdg();
+ int nucl = fTgt->HitPartPdg();
bool isdp = pdg::IsAntiDarkMatter(prob) && pdg::IsProton(nucl);
return isdp;
@@ -266,7 +266,7 @@ bool InitialState::IsDMBN(void) const
{
// Check if DM - neutron interaction
int prob = fProbePdg;
- int nucl = fTgt->HitNucPdg();
+ int nucl = fTgt->HitPartPdg();
bool isdn = pdg::IsAntiDarkMatter(prob) && pdg::IsNeutron(nucl);
return isdn;
@@ -294,8 +294,8 @@ TLorentzVector * InitialState::GetTgtP4(RefFrame_t ref_frame) const
{
// make sure that 'struck nucleon' properties were set in
// the nuclear target object
- assert(fTgt->HitNucIsSet());
- TLorentzVector * pnuc4 = fTgt->HitNucP4Ptr();
+ assert(pdg::IsNucleon(fTgt->HitPartPdg()));
+ TLorentzVector * pnuc4 = fTgt->HitPartP4Ptr();
// compute velocity vector (px/E, py/E, pz/E)
double bx = pnuc4->Px() / pnuc4->Energy();
@@ -346,9 +346,9 @@ TLorentzVector * InitialState::GetProbeP4(RefFrame_t ref_frame) const
// make sure that 'struck nucleon' properties were set in
// the nuclear target object
- assert( fTgt->HitNucP4Ptr() != 0 );
+ assert( pdg::IsNucleon(fTgt->HitPartPdg()) );
- TLorentzVector * pnuc4 = fTgt->HitNucP4Ptr();
+ TLorentzVector * pnuc4 = fTgt->HitPartP4Ptr();
// compute velocity vector (px/E, py/E, pz/E)
@@ -374,6 +374,23 @@ TLorentzVector * InitialState::GetProbeP4(RefFrame_t ref_frame) const
break;
}
+ //----------------- STRUCK ELECTRON REST FRAME
+ case (kRfHitElRest) :
+ {
+ //Ensure target is electron
+ if (!pdg::IsElectron(fTgt->HitPartPdg())){
+ return nullptr;
+ }
+ TLorentzVector * pele4 = fTgt->HitPartP4Ptr();
+
+ // compute velocity vector
+
+ auto boost = pele4->BoostVector();
+ TLorentzVector * p4 = new TLorentzVector(*fProbeP4);
+ p4->Boost(-boost);
+ return p4;
+ break;
+ }
default:
LOG("Interaction", pERROR) << "Uknown reference frame";
@@ -394,7 +411,7 @@ double InitialState::ProbeE(RefFrame_t ref_frame) const
double InitialState::CMEnergy() const
{
TLorentzVector * k4 = this->GetProbeP4(kRfLab);
- TLorentzVector * p4 = fTgt->HitNucP4Ptr();
+ TLorentzVector * p4 = fTgt->HitPartP4Ptr();
*k4 += *p4; // now k4 represents centre-of-mass 4-momentum
double s = k4->Dot(*k4); // dot-product with itself
@@ -443,8 +460,8 @@ void InitialState::Print(ostream & stream) const
}
stream << endl;
- stream << " |--> hit nucleon : ";
- int nuc_pdgc = fTgt->HitNucPdg();
+ stream << " |--> hit particle : ";
+ int nuc_pdgc = fTgt->HitPartPdg();
if ( pdg::IsNeutronOrProton(nuc_pdgc) ) {
TParticlePDG * p = PDGLibrary::Instance()->Find(nuc_pdgc);
@@ -481,11 +498,11 @@ void InitialState::Print(ostream & stream) const
<< ")"
<< endl;
- if ( pdg::IsNeutronOrProton(nuc_pdgc) ) {
+ if ( pdg::IsParticle(nuc_pdgc) ) {
- TLorentzVector * nuc_p4 = fTgt->HitNucP4Ptr();
+ TLorentzVector * nuc_p4 = fTgt->HitPartP4Ptr();
- stream << " |--> nucleon 4P : "
+ stream << " |--> hit particle : "
<< "(E = " << setw(12) << setprecision(6) << nuc_p4->E()
<< ", Px = " << setw(12) << setprecision(6) << nuc_p4->Px()
<< ", Py = " << setw(12) << setprecision(6) << nuc_p4->Py()
diff --git a/src/Framework/Interaction/Interaction.cxx b/src/Framework/Interaction/Interaction.cxx
index 7282c1241..2314898c8 100644
--- a/src/Framework/Interaction/Interaction.cxx
+++ b/src/Framework/Interaction/Interaction.cxx
@@ -183,7 +183,7 @@ int Interaction::RecoilNucleonPdg(void) const
const Target & target = fInitialState->Tgt();
int recoil_nuc = 0;
- int struck_nuc = target.HitNucPdg();
+ int struck_nuc = target.HitPartPdg();
if (fProcInfo->IsQuasiElastic() || fProcInfo->IsInverseBetaDecay() || fProcInfo->IsDarkMatterElastic()) {
bool struck_is_nuc = pdg::IsNucleon(struck_nuc);
@@ -266,8 +266,8 @@ string Interaction::AsString(void) const
}
interaction << "tgt:" << tgt.Pdg() << ";";
- if(tgt.HitNucIsSet()) {
- interaction << "N:" << tgt.HitNucPdg() << ";";
+ if(tgt.HitPartIsSet()) {
+ interaction << "Part:" << tgt.HitPartPdg() << ";";
}
if(tgt.HitQrkIsSet()) {
interaction << "q:" << tgt.HitQrkPdg()
@@ -329,7 +329,7 @@ Interaction * Interaction::DISCC(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -369,7 +369,7 @@ Interaction * Interaction::DISCC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -394,7 +394,7 @@ Interaction * Interaction::DISNC(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -434,7 +434,7 @@ Interaction * Interaction::DISNC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -459,7 +459,7 @@ Interaction * Interaction::DISEM(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -484,7 +484,7 @@ Interaction * Interaction::DISEM(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -509,7 +509,7 @@ Interaction * Interaction::QELCC(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -522,7 +522,7 @@ Interaction * Interaction::QELCC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -534,7 +534,7 @@ Interaction * Interaction::QELNC(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -547,7 +547,7 @@ Interaction * Interaction::QELNC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -559,7 +559,7 @@ Interaction * Interaction::QELEM(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -572,7 +572,7 @@ Interaction * Interaction::QELEM(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -584,7 +584,7 @@ Interaction * Interaction::IBD(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -597,7 +597,7 @@ Interaction * Interaction::IBD(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -609,7 +609,7 @@ Interaction * Interaction::RESCC(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -622,7 +622,7 @@ Interaction * Interaction::RESCC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -634,7 +634,7 @@ Interaction * Interaction::RESNC(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -647,7 +647,7 @@ Interaction * Interaction::RESNC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -659,7 +659,7 @@ Interaction * Interaction::RESEM(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -672,7 +672,7 @@ Interaction * Interaction::RESEM(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -684,7 +684,7 @@ Interaction * Interaction::DFRCC(int tgt,int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -697,7 +697,7 @@ Interaction * Interaction::DFRCC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -820,7 +820,7 @@ Interaction * Interaction::AMNuGamma(int tgt, int nuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(nuc);
+ init_state->TgtPtr()->SetHitPartPdg(nuc);
return interaction;
}
@@ -833,7 +833,7 @@ Interaction * Interaction::AMNuGamma(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(nuc);
+ init_state->TgtPtr()->SetHitPartPdg(nuc);
return interaction;
}
@@ -845,7 +845,7 @@ Interaction * Interaction::MECCC(int tgt, int ncluster, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(ncluster);
+ init_state->TgtPtr()->SetHitPartPdg(ncluster);
return interaction;
}
@@ -858,7 +858,7 @@ Interaction * Interaction::MECCC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(ncluster);
+ init_state->TgtPtr()->SetHitPartPdg(ncluster);
return interaction;
}
@@ -894,7 +894,7 @@ Interaction * Interaction::MECNC(int tgt, int ncluster, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(ncluster);
+ init_state->TgtPtr()->SetHitPartPdg(ncluster);
return interaction;
}
@@ -907,7 +907,7 @@ Interaction * Interaction::MECNC(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(ncluster);
+ init_state->TgtPtr()->SetHitPartPdg(ncluster);
return interaction;
}
@@ -931,7 +931,7 @@ Interaction * Interaction::MECEM(int tgt, int ncluster, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(ncluster);
+ init_state->TgtPtr()->SetHitPartPdg(ncluster);
return interaction;
}
@@ -944,7 +944,7 @@ Interaction * Interaction::MECEM(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(ncluster);
+ init_state->TgtPtr()->SetHitPartPdg(ncluster);
return interaction;
}
@@ -956,7 +956,7 @@ Interaction * Interaction::GLR(int tgt, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(0);
+ init_state->TgtPtr()->SetHitPartPdg(0);
return interaction;
}
@@ -968,7 +968,7 @@ Interaction * Interaction::GLR(int tgt, const TLorentzVector & p4probe)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(0);
+ init_state->TgtPtr()->SetHitPartPdg(0);
return interaction;
}
@@ -980,7 +980,7 @@ Interaction * Interaction::NDecay(int tgt, int decay_mode, int decayed_nucleon)
interaction->ExclTagPtr()->SetDecayMode(decay_mode);
InitialState * init_state = interaction->InitStatePtr();
- init_state->TgtPtr()->SetHitNucPdg(decayed_nucleon);
+ init_state->TgtPtr()->SetHitPartPdg(decayed_nucleon);
return interaction;
}
@@ -1024,7 +1024,7 @@ Interaction * Interaction::DME(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -1038,7 +1038,7 @@ Interaction * Interaction::DME(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -1050,7 +1050,7 @@ Interaction * Interaction::DMDI(int target, int hitnuc, int probe, double E)
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeE(E);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
@@ -1075,7 +1075,7 @@ Interaction * Interaction::DMDI(
InitialState * init_state = interaction->InitStatePtr();
init_state->SetProbeP4(p4probe);
- init_state->TgtPtr()->SetHitNucPdg(hitnuc);
+ init_state->TgtPtr()->SetHitPartPdg(hitnuc);
return interaction;
}
diff --git a/src/Framework/Interaction/KPhaseSpace.cxx b/src/Framework/Interaction/KPhaseSpace.cxx
index f5945f193..804fadb6d 100644
--- a/src/Framework/Interaction/KPhaseSpace.cxx
+++ b/src/Framework/Interaction/KPhaseSpace.cxx
@@ -92,7 +92,7 @@ double KPhaseSpace::Threshold(void) const
if (pi.IsSingleKaon()) {
int kaon_pdgc = xcls.StrangeHadronPdg();
- double Mi = tgt.HitNucP4Ptr()->M(); // initial nucleon mass
+ double Mi = tgt.HitPartP4Ptr()->M(); // initial nucleon mass
// Final nucleon can be different for K0 interaction
double Mf = (xcls.NProtons()==1) ? kProtonMass : kNeutronMass;
double mk = PDGLibrary::Instance()->Find(kaon_pdgc)->Mass();
@@ -134,12 +134,12 @@ double KPhaseSpace::Threshold(void) const
pi.IsDarkMatterDeepInelastic() ||
pi.IsDiffractive())
{
- assert(tgt.HitNucIsSet());
- double Mn = tgt.HitNucP4Ptr()->M();
+ assert(tgt.HitPartIsSet());
+ double Mn = tgt.HitPartP4Ptr()->M();
double Mn2 = TMath::Power(Mn,2);
double Wmin = kNucleonMass + kPionMass;
if ( pi.IsQuasiElastic() || pi.IsDarkMatterElastic() || pi.IsInverseBetaDecay() ) {
- int finalNucPDG = tgt.HitNucPdg();
+ int finalNucPDG = tgt.HitPartPdg();
if ( pi.IsWeakCC() ) finalNucPDG = pdg::SwitchProtonNeutron( finalNucPDG );
Wmin = PDGLibrary::Instance()->Find( finalNucPDG )->Mass();
}
@@ -187,8 +187,8 @@ double KPhaseSpace::Threshold(void) const
return 0;
}
if (pi.IsMEC()) {
- if (tgt.HitNucIsSet()) {
- double Mn = tgt.HitNucP4Ptr()->M();
+ if (tgt.HitPartIsSet()) {
+ double Mn = tgt.HitPartP4Ptr()->M();
double Mn2 = TMath::Power(Mn,2);
double Wmin = fInteraction->RecoilNucleon()->Mass(); // mass of the recoil nucleon cluster
double smin = TMath::Power(Wmin+ml,2.);
@@ -205,7 +205,7 @@ double KPhaseSpace::Threshold(void) const
return TMath::Max(0.,Ethr);
}
if(pi.IsPhotonResonance()) {
- double Mn = tgt.HitNucP4Ptr()->M();
+ double Mn = tgt.HitPartP4Ptr()->M();
double Ethr = 0.5 * (ml*ml-TMath::Power(Mn,2))/Mn;
return TMath::Max(0.,Ethr);
}
@@ -272,9 +272,7 @@ bool KPhaseSpace::IsAboveThreshold(void) const
if (pi.IsCoherentElastic() ||
pi.IsCoherentProduction() ||
- pi.IsInverseMuDecay() ||
- pi.IsIMDAnnihilation() ||
- pi.IsNuElectronElastic() ||
+ pi.IsNuElectronElastic() || //Leave here since there are no thresholds
pi.IsDarkMatterElectronElastic() ||
pi.IsMEC() ||
pi.IsPhotonCoherent() ||
@@ -297,6 +295,12 @@ bool KPhaseSpace::IsAboveThreshold(void) const
E = init_state.ProbeE(kRfHitNucRest);
}
+ if(pi.IsInverseMuDecay() ||
+ pi.IsIMDAnnihilation())
+ {
+ E = init_state.ProbeE(kRfHitElRest);
+ }
+
LOG("KPhaseSpace", pDEBUG) << "E = " << E << ", Ethr = " << Ethr;
return (E>Ethr);
}
@@ -445,7 +449,7 @@ Range1D_t KPhaseSpace::WLim(void) const
if(is_inel) {
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); //can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); //can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
Wl = is_em ? kinematics::electromagnetic::InelWLim(Ev,ml,M) : kinematics::InelWLim(Ev,M,ml);
@@ -468,7 +472,7 @@ Range1D_t KPhaseSpace::WLim(void) const
if(is_dmdis) {
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); //can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); //can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
Wl = kinematics::DarkWLim(Ev,M,ml);
if(fInteraction->ExclTag().IsCharmEvent()) {
@@ -520,7 +524,7 @@ Range1D_t KPhaseSpace::Q2Lim_W(void) const
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
double W = 0;
@@ -573,7 +577,7 @@ Range1D_t KPhaseSpace::Q2Lim(void) const
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
if(is_cevns) {
@@ -685,7 +689,7 @@ Range1D_t KPhaseSpace::XLim(void) const
if(is_inel) {
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
xl = is_em ? kinematics::electromagnetic::InelXLim(Ev,ml,M) : kinematics::InelXLim(Ev,M,ml);
return xl;
@@ -695,7 +699,7 @@ Range1D_t KPhaseSpace::XLim(void) const
if(is_dmdis) {
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
xl = kinematics::DarkXLim(Ev,M,ml);
return xl;
@@ -737,7 +741,7 @@ Range1D_t KPhaseSpace::YLim(void) const
if(is_inel) {
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
yl = is_em ? kinematics::electromagnetic::InelYLim(Ev,ml,M) : kinematics::InelYLim(Ev,M,ml);
return yl;
@@ -747,7 +751,7 @@ Range1D_t KPhaseSpace::YLim(void) const
if(is_dmdis) {
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
yl = kinematics::DarkYLim(Ev,M,ml);
return yl;
@@ -809,7 +813,7 @@ Range1D_t KPhaseSpace::YLim_X(void) const
if(is_inel) {
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
double x = fInteraction->Kine().x();
yl = is_em ? kinematics::electromagnetic::InelYLim_X(Ev,ml,M,x) : kinematics::InelYLim_X(Ev,M,ml,x);
@@ -820,7 +824,7 @@ Range1D_t KPhaseSpace::YLim_X(void) const
if(is_dmdis) {
const InitialState & init_state = fInteraction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double ml = fInteraction->FSPrimLepton()->Mass();
double x = fInteraction->Kine().x();
yl = kinematics::DarkYLim_X(Ev,M,ml,x);
@@ -940,7 +944,7 @@ Range1D_t KPhaseSpace::TLim(void) const
double mpi = pionIsCharged ? kPionMass : kPi0Mass;
double mpi2 = mpi*mpi;
- double M = init_state.Tgt().HitNucMass();
+ double M = init_state.Tgt().HitPartMass();
double M2 = M*M;
double nuSqPlusQ2 = nu*nu + Q2;
double nuOverM = nu / M;
diff --git a/src/Framework/Interaction/SppChannel.h b/src/Framework/Interaction/SppChannel.h
index f811bb99e..c16a19ae6 100644
--- a/src/Framework/Interaction/SppChannel.h
+++ b/src/Framework/Interaction/SppChannel.h
@@ -283,7 +283,7 @@ class SppChannel
if( xcls_tag.NNucleons() != 1 ) return kSppNull;
// get struck nucleon
- int hit_nucl_pdgc = init_state.Tgt().HitNucPdg();
+ int hit_nucl_pdgc = init_state.Tgt().HitPartPdg();
if( ! pdg::IsNeutronOrProton(hit_nucl_pdgc) ) return kSppNull;
bool hit_p = pdg::IsProton(hit_nucl_pdgc);
bool hit_n = !hit_p;
diff --git a/src/Framework/Interaction/Target.cxx b/src/Framework/Interaction/Target.cxx
index e999998eb..61f9b27f5 100644
--- a/src/Framework/Interaction/Target.cxx
+++ b/src/Framework/Interaction/Target.cxx
@@ -58,12 +58,12 @@ TObject()
this->SetId(ZZ,AA);
}
//___________________________________________________________________________
-Target::Target(int ZZ, int AA, int hit_nucleon_pdgc) :
+Target::Target(int ZZ, int AA, int hit_part_pdgc) :
TObject()
{
this->Init();
this->SetId(ZZ,AA);
- this->SetHitNucPdg(hit_nucleon_pdgc);
+ this->SetHitPartPdg(hit_part_pdgc);
}
//___________________________________________________________________________
Target::Target(const Target & tgt) :
@@ -78,9 +78,9 @@ TObject(),
fZ(0),
fA(0),
fTgtPDG(0),
-fHitNucPDG(0),
+fHitPartPDG(0),
fHitSeaQrk(false),
-fHitNucP4(0)
+fHitPartP4(nullptr)
{
}
@@ -98,51 +98,51 @@ void Target::Reset(void)
//___________________________________________________________________________
void Target::Init(void)
{
- fZ = 0;
- fA = 0;
- fTgtPDG = 0;
- fHitNucPDG = 0;
- fHitQrkPDG = 0;
- fHitSeaQrk = false;
- fHitNucP4 = new TLorentzVector(0,0,0,kNucleonMass);
- fHitNucRad = 0.;
+ fZ = 0;
+ fA = 0;
+ fTgtPDG = 0;
+ fHitPartPDG = 0;
+ fHitQrkPDG = 0;
+ fHitSeaQrk = false;
+ fHitPartP4 = new TLorentzVector(0,0,0,kNucleonMass);
+ fHitPartRad = 0.;
}
//___________________________________________________________________________
void Target::CleanUp(void)
{
- delete fHitNucP4;
+ delete fHitPartP4;
}
//___________________________________________________________________________
void Target::Copy(const Target & tgt)
{
fTgtPDG = tgt.fTgtPDG;
+ fHitPartPDG = tgt.fHitPartPDG; // struck nucleon PDG
if( pdg::IsIon(fTgtPDG) ) {
- fZ = tgt.fZ; // copy A,Z
- fA = tgt.fA;
- fHitNucPDG = tgt.fHitNucPDG; // struck nucleon PDG
- fHitQrkPDG = tgt.fHitQrkPDG; // struck quark PDG
- fHitSeaQrk = tgt.fHitSeaQrk; // struck quark is from sea?
+ fZ = tgt.fZ; // copy A,Z
+ fA = tgt.fA;
+ fHitQrkPDG = tgt.fHitQrkPDG; // struck quark PDG
+ fHitSeaQrk = tgt.fHitSeaQrk; // struck quark is from sea?
//// valgrind warns about this ... try something else
- // (*fHitNucP4) = (*tgt.fHitNucP4);
- const TLorentzVector& p4 = *(tgt.fHitNucP4);
- // *fHitNucP4 = p4; // nope
+ // (*fHitPartP4) = (*tgt.fHitPartP4);
+ const TLorentzVector& p4 = *(tgt.fHitPartP4);
+ // *fHitPartP4 = p4; // nope
//// this works for valgrind
- fHitNucP4->SetX(p4.X());
- fHitNucP4->SetY(p4.Y());
- fHitNucP4->SetZ(p4.Z());
- fHitNucP4->SetT(p4.T());
+ fHitPartP4->SetX(p4.X());
+ fHitPartP4->SetY(p4.Y());
+ fHitPartP4->SetZ(p4.Z());
+ fHitPartP4->SetT(p4.T());
- fHitNucRad = tgt.fHitNucRad;
+ fHitPartRad = tgt.fHitPartRad;
// look-up the nucleus in the isotopes chart
this->ForceNucleusValidity();
- // make sure the hit nucleus constituent object is either
- // a nucleon (p or n) or a di-nucleon cluster (p+p, p+n, n+n)
- this->ForceHitNucValidity();
+ // make sure the hit nucleus constituent object is a valid
+ // particle usable in the simulation
+ this->ForceHitPartValidity();
}
}
//___________________________________________________________________________
@@ -155,7 +155,7 @@ void Target::SetId(int pdgc)
}
this->ForceNucleusValidity(); // search at the isotopes chart
- //this->AutoSetHitNuc(); // struck nuc := tgt for free nucleon tgt
+ //this->AutoSetHitPart(); // struck nuc := tgt for free nucleon tgt
}
//___________________________________________________________________________
void Target::SetId(int ZZ, int AA)
@@ -165,19 +165,19 @@ void Target::SetId(int ZZ, int AA)
fA = AA;
this->ForceNucleusValidity(); // search at the isotopes chart
- //this->AutoSetHitNuc(); // struck nuc := tgt for free nucleon tgt
+ //this->AutoSetHitPart(); // struck nuc := tgt for free nucleon tgt
}
//___________________________________________________________________________
-void Target::SetHitNucPdg(int nucl_pdgc)
+void Target::SetHitPartPdg(int pdgc)
{
- fHitNucPDG = nucl_pdgc;
- bool is_valid = this->ForceHitNucValidity(); // p, n or a di-nucleon
+ fHitPartPDG = pdgc;
+ bool is_valid = this->ForceHitPartValidity(); // valid particle
// If it is a valid struck nucleon pdg code, initialize its 4P:
// at-rest + on-mass-shell
if(is_valid) {
- double M = PDGLibrary::Instance()->Find(nucl_pdgc)->Mass();
- fHitNucP4->SetPxPyPzE(0,0,0,M);
+ double M = PDGLibrary::Instance()->Find(pdgc)->Mass();
+ fHitPartP4->SetPxPyPzE(0,0,0,M);
}
}
//___________________________________________________________________________
@@ -186,10 +186,10 @@ void Target::SetHitQrkPdg(int pdgc)
if(pdg::IsQuark(pdgc) || pdg::IsAntiQuark(pdgc)) fHitQrkPDG = pdgc;
}
//___________________________________________________________________________
-void Target::SetHitNucP4(const TLorentzVector & p4)
+void Target::SetHitPartP4(const TLorentzVector & p4)
{
- if(fHitNucP4) delete fHitNucP4;
- fHitNucP4 = new TLorentzVector(p4);
+ if(fHitPartP4) delete fHitPartP4;
+ fHitPartP4 = new TLorentzVector(p4);
}
//___________________________________________________________________________
void Target::SetHitSeaQrk(bool tf)
@@ -197,19 +197,19 @@ void Target::SetHitSeaQrk(bool tf)
fHitSeaQrk = tf;
}
//___________________________________________________________________________
-void Target::ForceHitNucOnMassShell(void)
+void Target::ForceHitPartOnMassShell(void)
{
- if(this->HitNucIsSet()) {
- double m = this->HitNucMass();
- double p = this->HitNucP4Ptr()->P();
+ if(this->HitPartIsSet()) {
+ double m = this->HitPartMass();
+ double p = this->HitPartP4Ptr()->P();
double e = TMath::Sqrt(p*p+m*m);
- this->HitNucP4Ptr()->SetE(e);
+ this->HitPartP4Ptr()->SetE(e);
}
}
//___________________________________________________________________________
-void Target::SetHitNucPosition(double r)
+void Target::SetHitPartPosition(double r)
{
- fHitNucRad = r;
+ fHitPartRad = r;
}
//___________________________________________________________________________
double Target::Charge(void) const
@@ -230,13 +230,13 @@ double Target::Mass(void) const
return 0.;
}
//___________________________________________________________________________
-double Target::HitNucMass(void) const
+double Target::HitPartMass(void) const
{
- if(!fHitNucPDG) {
- LOG("Target", pWARN) << "Returning struck nucleon mass = 0";
+ if(!fHitPartPDG) {
+ LOG("Target", pWARN) << "Returning struck particle mass = 0";
return 0;
}
- return PDGLibrary::Instance()->Find(fHitNucPDG)->Mass();
+ return PDGLibrary::Instance()->Find(fHitPartPDG)->Mass();
}
//___________________________________________________________________________
int Target::HitQrkPdg(void) const
@@ -244,14 +244,14 @@ int Target::HitQrkPdg(void) const
return fHitQrkPDG;
}
//___________________________________________________________________________
-TLorentzVector * Target::HitNucP4Ptr(void) const
+TLorentzVector * Target::HitPartP4Ptr(void) const
{
- if(!fHitNucP4) {
- LOG("Target", pWARN) << "Returning NULL struck nucleon 4-momentum";
+ if(!fHitPartP4) {
+ LOG("Target", pWARN) << "Returning NULL struck particle 4-momentum";
return 0;
}
- return fHitNucP4;
+ return fHitPartP4;
}
//___________________________________________________________________________
bool Target::IsFreeNucleon(void) const
@@ -280,11 +280,12 @@ bool Target::IsParticle(void) const
return (p && fA==0 && fZ==0);
}
//___________________________________________________________________________
-bool Target::HitNucIsSet(void) const
+bool Target::HitPartIsSet(void) const
{
bool ok =
- pdg::IsNucleon(fHitNucPDG) ||
- pdg::Is2NucleonCluster (fHitNucPDG);
+ pdg::IsNucleon(fHitPartPDG) ||
+ pdg::Is2NucleonCluster(fHitPartPDG) ||
+ pdg::IsElectron(fHitPartPDG);
return ok;
}
@@ -301,9 +302,9 @@ bool Target::HitSeaQrk(void) const
return fHitSeaQrk;
}
//___________________________________________________________________________
-int Target::HitNucPdg(void) const
+int Target::HitPartPdg(void) const
{
- return fHitNucPDG;
+ return fHitPartPDG;
}
//___________________________________________________________________________
bool Target::IsValidNucleus(void) const
@@ -347,14 +348,15 @@ bool Target::IsOddOdd(void) const
return false;
}
//___________________________________________________________________________
-bool Target::ForceHitNucValidity(void)
+bool Target::ForceHitPartValidity(void)
{
-// resets the struck nucleon pdg-code if it is found not to be a valid one
+// resets the struck part pdg-code if it is found not to be a valid one
bool valid =
- pdg::IsNucleon(fHitNucPDG) ||
- pdg::Is2NucleonCluster (fHitNucPDG) ||
- (fHitNucPDG==0); /* not set */
+ pdg::IsNucleon(fHitPartPDG) ||
+ pdg::Is2NucleonCluster (fHitPartPDG) ||
+ pdg::IsElectron(fHitPartPDG) ||
+ (fHitPartPDG==0); /* not set */
return valid;
}
@@ -370,13 +372,13 @@ void Target::ForceNucleusValidity(void)
}
}
//___________________________________________________________________________
-void Target::AutoSetHitNuc(void)
+void Target::AutoSetHitPart(void)
{
// for free nucleon targets -> (auto)set struck nucleon = target
if( this->IsFreeNucleon() ) {
- if( this->IsProton() ) this->SetHitNucPdg(kPdgProton);
- else this->SetHitNucPdg(kPdgNeutron);
+ if( this->IsProton() ) this->SetHitPartPdg(kPdgProton);
+ else this->SetHitPartPdg(kPdgNeutron);
}
}
//___________________________________________________________________________
@@ -385,8 +387,8 @@ string Target::AsString(void) const
ostringstream s;
s << this->Pdg();
- if(this->HitNucIsSet())
- s << "[N=" << this->HitNucPdg() << "]";
+ if(this->HitPartIsSet())
+ s << "[Part=" << this->HitPartPdg() << "]";
if(this->HitQrkIsSet()) {
s << "[q=" << this->HitQrkPdg();
s << (this->HitSeaQrk() ? "(s)" : "(v)");
@@ -404,10 +406,10 @@ void Target::Print(ostream & stream) const
stream << " Z = " << fZ << ", A = " << fA << endl;
}
- if( this->HitNucIsSet() ) {
- TParticlePDG * p = PDGLibrary::Instance()->Find(fHitNucPDG);
- stream << " struck nucleon = " << p->GetName()
- << ", P4 = " << utils::print::P4AsString(fHitNucP4) << endl;
+ if( this->HitPartIsSet() ) {
+ TParticlePDG * p = PDGLibrary::Instance()->Find(fHitPartPDG);
+ stream << " struck Part = " << p->GetName()
+ << ", P4 = " << utils::print::P4AsString(fHitPartP4) << endl;
}
if( this->HitQrkIsSet() ) {
@@ -421,15 +423,15 @@ void Target::Print(ostream & stream) const
//___________________________________________________________________________
bool Target::Compare(const Target & target) const
{
- int tgt_pdg = target.Pdg();
- int struck_nuc_pdg = target.HitNucPdg();
- int struck_qrk_pdg = target.HitQrkPdg();
- bool struck_sea_qrk = target.HitSeaQrk();
+ int tgt_pdg = target.Pdg();
+ int struck_part_pdg = target.HitPartPdg();
+ int struck_qrk_pdg = target.HitQrkPdg();
+ bool struck_sea_qrk = target.HitSeaQrk();
- bool equal = ( fTgtPDG == tgt_pdg ) &&
- ( fHitNucPDG == struck_nuc_pdg ) &&
- ( fHitQrkPDG == struck_qrk_pdg ) &&
- ( fHitSeaQrk == struck_sea_qrk );
+ bool equal = ( fTgtPDG == tgt_pdg ) &&
+ ( fHitPartPDG == struck_part_pdg ) &&
+ ( fHitQrkPDG == struck_qrk_pdg ) &&
+ ( fHitSeaQrk == struck_sea_qrk );
return equal;
}
//___________________________________________________________________________
diff --git a/src/Framework/Interaction/Target.h b/src/Framework/Interaction/Target.h
index 1552ca145..85b9b9369 100644
--- a/src/Framework/Interaction/Target.h
+++ b/src/Framework/Interaction/Target.h
@@ -47,21 +47,21 @@ using TObject::Copy;
Target();
Target(int pdgc);
Target(int Z, int A);
- Target(int Z, int A, int hit_nucleon_pdgc);
+ Target(int Z, int A, int hit_particle_pdgc);
Target(const Target & tgt);
Target(TRootIOCtor*);
~Target();
//-- Set target properties
- void SetId (int pdgc);
- void SetId (int Z, int A);
- void SetHitNucPdg (int pdgc);
- void SetHitNucP4 (const TLorentzVector & p4);
- void SetHitNucPosition (double r);
- void SetHitQrkPdg (int pdgc);
- void SetHitSeaQrk (bool tf);
- void ForceHitNucOnMassShell (void);
+ void SetId (int pdgc);
+ void SetId (int Z, int A);
+ void SetHitPartPdg (int pdgc);
+ void SetHitPartP4 (const TLorentzVector & p4);
+ void SetHitPartPosition (double r);
+ void SetHitQrkPdg (int pdgc);
+ void SetHitSeaQrk (bool tf);
+ void ForceHitPartOnMassShell (void);
//-- Query target information
@@ -77,19 +77,19 @@ using TObject::Copy;
bool IsNucleus (void) const;
bool IsParticle (void) const;
bool IsValidNucleus (void) const;
- bool HitNucIsSet (void) const;
+ bool HitPartIsSet (void) const;
bool HitQrkIsSet (void) const;
bool HitSeaQrk (void) const;
bool IsEvenEven (void) const;
bool IsEvenOdd (void) const;
bool IsOddOdd (void) const;
- int HitNucPdg (void) const;
+ int HitPartPdg (void) const;
int HitQrkPdg (void) const;
- double HitNucMass (void) const;
- double HitNucPosition (void) const { return fHitNucRad; }
+ double HitPartMass (void) const;
+ double HitPartPosition(void) const { return fHitPartRad; }
- const TLorentzVector & HitNucP4 (void) const { return *this->HitNucP4Ptr(); }
- TLorentzVector * HitNucP4Ptr (void) const;
+ const TLorentzVector & HitPartP4 (void) const { return *this->HitPartP4Ptr(); }
+ TLorentzVector * HitPartP4Ptr (void) const;
//-- Copy, reset, compare, print itself and build string code
void Reset (void);
@@ -109,21 +109,21 @@ using TObject::Copy;
void CleanUp (void);
//-- Methods assuring nucleus & hit nucleon validity
- void ForceNucleusValidity (void);
- bool ForceHitNucValidity (void);
- void AutoSetHitNuc (void);
+ void ForceNucleusValidity (void);
+ bool ForceHitPartValidity (void);
+ void AutoSetHitPart (void);
//-- Private data members
int fZ; ///< nuclear target Z
int fA; ///< nuclear target A
int fTgtPDG; ///< nuclear target PDG code
- int fHitNucPDG; ///< hit nucleon PDG code
+ int fHitPartPDG; ///< hit particle PDG code
int fHitQrkPDG; ///< hit quark PDG code
bool fHitSeaQrk; ///< hit quark from sea?
- TLorentzVector * fHitNucP4; ///< hit nucleon 4p
- double fHitNucRad; ///< hit nucleon position
+ TLorentzVector *fHitPartP4; ///< hit particle 4p
+ double fHitPartRad; ///< hit particle position
-ClassDef(Target,2)
+ClassDef(Target,3)
};
} // genie namespace
diff --git a/src/Framework/Numerical/MathUtils.cxx b/src/Framework/Numerical/MathUtils.cxx
index 7e3174d6e..1cb4b121f 100644
--- a/src/Framework/Numerical/MathUtils.cxx
+++ b/src/Framework/Numerical/MathUtils.cxx
@@ -15,6 +15,8 @@
#include "Framework/Messenger/Messenger.h"
#include "Framework/Numerical/RandomGen.h"
#include "Framework/Numerical/MathUtils.h"
+#include "TLorentzVector.h"
+#include "TVector3.h"
//____________________________________________________________________________
TMatrixD genie::utils::math::CholeskyDecomposition(const TMatrixD& cov_matrix)
@@ -284,3 +286,20 @@ double genie::utils::math::NonNegative(float x)
return TMath::Max( (float)0., x);
}
//____________________________________________________________________________
+TLorentzVector genie::utils::math::GetOrthogonal(const TLorentzVector &lv, const TVector3 &unitVec) {
+ // Returns TLorentz vector that is orthogonal to a given unit vector in 3d
+ auto lv3d = lv.Vect();
+ auto par_mom_module = lv3d.Dot(unitVec);
+ TVector3 par_mom(0., 0., par_mom_module);
+ par_mom.RotateUz(unitVec);
+ auto orthogonal_mom_3d = lv3d - par_mom;
+ return TLorentzVector(orthogonal_mom_3d, lv.E());
+}
+//____________________________________________________________________________
+TLorentzVector genie::utils::math::GetParallel(const TLorentzVector &lv, const TVector3 &unitVec) {
+ // Returns TLorentz vector that is parallel to a given unit vector in 3d
+ auto lv3d = lv.Vect();
+ auto par_mom_module = lv3d.Dot(unitVec);
+ TVector3 par_mom = par_mom_module * unitVec;
+ return TLorentzVector(par_mom, lv.E());
+}
\ No newline at end of file
diff --git a/src/Framework/Numerical/MathUtils.h b/src/Framework/Numerical/MathUtils.h
index 805a90b75..73c9ecf3f 100644
--- a/src/Framework/Numerical/MathUtils.h
+++ b/src/Framework/Numerical/MathUtils.h
@@ -22,6 +22,7 @@
#include
#include
#include
+#include
#include "Framework/Utils/Range1.h"
#include "cmath"
@@ -128,6 +129,9 @@ namespace math
double NonNegative (double x);
double NonNegative (float x);
+ TLorentzVector GetParallel(const TLorentzVector &lv, const TVector3 &unitVec);
+ TLorentzVector GetOrthogonal(const TLorentzVector &lv, const TVector3 &unitVec);
+
} // math namespace
} // utils namespace
} // genie namespace
diff --git a/src/Framework/Utils/KineUtils.cxx b/src/Framework/Utils/KineUtils.cxx
index 5b5917134..b340518c3 100644
--- a/src/Framework/Utils/KineUtils.cxx
+++ b/src/Framework/Utils/KineUtils.cxx
@@ -86,7 +86,7 @@ double genie::utils::kinematics::PhaseSpaceVolume(
const InitialState & init_state = in->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M();
+ double M = init_state.Tgt().HitPartP4Ptr()->M();
const int kNx = 100;
const int kNy = 100;
@@ -217,7 +217,7 @@ double genie::utils::kinematics::Jacobian(
{
const InitialState & init_state = i->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M();
+ double M = init_state.Tgt().HitPartP4Ptr()->M();
double x = kine.x();
J = 2*x*Ev*M;
}
@@ -230,7 +230,7 @@ double genie::utils::kinematics::Jacobian(
{
const InitialState & init_state = i->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M();
+ double M = init_state.Tgt().HitPartP4Ptr()->M();
double y = kine.y();
J = 2*y*Ev*M;
}
@@ -260,7 +260,7 @@ double genie::utils::kinematics::Jacobian(
{
const InitialState & init_state = i->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M();
+ double M = init_state.Tgt().HitPartP4Ptr()->M();
double y = kine.y();
J = TMath::Power(2*M*Ev,2) * y;
}
@@ -273,7 +273,7 @@ double genie::utils::kinematics::Jacobian(
{
const InitialState & init_state = i->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M();
+ double M = init_state.Tgt().HitPartP4Ptr()->M();
double y = kine.y();
double W = kine.W();
J = 2*TMath::Power(M*Ev,2) * y/W;
@@ -306,7 +306,7 @@ double genie::utils::kinematics::Jacobian(
double pv = std::sqrt( std::max(0., Ev*Ev - mv*mv) );
// Invariant mass of the initial hit nucleon
- const TLorentzVector& hit_nuc_P4 = init_state.Tgt().HitNucP4();
+ const TLorentzVector& hit_nuc_P4 = init_state.Tgt().HitPartP4();
double M = hit_nuc_P4.M();
// Outgoing lepton mass
@@ -1087,7 +1087,7 @@ double genie::utils::kinematics::Q2(const Interaction * const interaction)
}
if (kinematics.KVSet(kKVy)) {
const InitialState & init_state = interaction->InitState();
- double Mn = init_state.Tgt().HitNucP4Ptr()->M(); // can be off m/shell
+ double Mn = init_state.Tgt().HitPartP4Ptr()->M(); // can be off m/shell
double x = kinematics.x();
double y = kinematics.y();
double Ev = init_state.ProbeE(kRfHitNucRest);
@@ -1117,7 +1117,7 @@ double genie::utils::kinematics::W(const Interaction * const interaction)
if(kinematics.KVSet(kKVx) && kinematics.KVSet(kKVy)) {
const InitialState & init_state = interaction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M();
+ double M = init_state.Tgt().HitPartP4Ptr()->M();
double M2 = M*M;
double x = kinematics.x();
double y = kinematics.y();
@@ -1294,7 +1294,7 @@ void genie::utils::kinematics::UpdateWQ2FromXY(const Interaction * in)
if(kine->KVSet(kKVx) && kine->KVSet(kKVy)) {
const InitialState & init_state = in->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off mass shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off mass shell
double x = kine->x();
double y = kine->y();
@@ -1312,7 +1312,7 @@ void genie::utils::kinematics::UpdateXYFromWQ2(const Interaction * in)
if(kine->KVSet(kKVW) && kine->KVSet(kKVQ2)) {
const InitialState & init_state = in->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off mass shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off mass shell
double W = kine->W();
double Q2 = kine->Q2();
@@ -1330,7 +1330,7 @@ void genie::utils::kinematics::UpdateWYFromXQ2(const Interaction * in)
if(kine->KVSet(kKVx) && kine->KVSet(kKVQ2)) {
const InitialState & init_state = in->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4Ptr()->M(); // can be off mass shell
+ double M = init_state.Tgt().HitPartP4Ptr()->M(); // can be off mass shell
double x = kine->x();
double Q2 = kine->Q2();
@@ -1357,7 +1357,7 @@ void genie::utils::kinematics::UpdateXFromQ2Y(const Interaction * in)
Ev = init_state.ProbeE(kRfLab);
}
else {
- M = in->InitState().Tgt().HitNucP4Ptr()->M(); //can be off m/shell
+ M = in->InitState().Tgt().HitPartP4Ptr()->M(); //can be off m/shell
Ev = init_state.ProbeE(kRfHitNucRest);
}
diff --git a/src/Physics/AnomalyMediatedNuGamma/XSection/H3AMNuGammaPXSec.cxx b/src/Physics/AnomalyMediatedNuGamma/XSection/H3AMNuGammaPXSec.cxx
index ada4219dd..8fcf1d933 100644
--- a/src/Physics/AnomalyMediatedNuGamma/XSection/H3AMNuGammaPXSec.cxx
+++ b/src/Physics/AnomalyMediatedNuGamma/XSection/H3AMNuGammaPXSec.cxx
@@ -76,7 +76,7 @@ double H3AMNuGammaPXSec::Integral(const Interaction * interaction) const
if( interaction->TestBit(kIAssumeFreeNucleon) ) return xsec;
// Scale for the number of scattering centers at the target
- int nucpdgc = target.HitNucPdg();
+ int nucpdgc = target.HitPartPdg();
int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N();
xsec*=NNucl;
diff --git a/src/Physics/BoostedDarkMatter/EventGen/DMDISInteractionListGenerator.cxx b/src/Physics/BoostedDarkMatter/EventGen/DMDISInteractionListGenerator.cxx
index 53387fd51..461adf474 100644
--- a/src/Physics/BoostedDarkMatter/EventGen/DMDISInteractionListGenerator.cxx
+++ b/src/Physics/BoostedDarkMatter/EventGen/DMDISInteractionListGenerator.cxx
@@ -82,7 +82,7 @@ InteractionList * DMDISInteractionListGenerator::CreateInteractionList(
Interaction * interaction = new Interaction(init_state, proc_info);
Target * target = interaction->InitStatePtr()->TgtPtr();
- target->SetHitNucPdg(struck_nucleon);
+ target->SetHitPartPdg(struck_nucleon);
if(fIsCharm) {
XclsTag exclusive_tag;
diff --git a/src/Physics/BoostedDarkMatter/EventGen/DMDISKinematicsGenerator.cxx b/src/Physics/BoostedDarkMatter/EventGen/DMDISKinematicsGenerator.cxx
index 581123976..56728b6de 100644
--- a/src/Physics/BoostedDarkMatter/EventGen/DMDISKinematicsGenerator.cxx
+++ b/src/Physics/BoostedDarkMatter/EventGen/DMDISKinematicsGenerator.cxx
@@ -77,7 +77,7 @@ void DMDISKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
//-- Get dark matter energy and hit 'nucleon mass'
const InitialState & init_state = interaction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4().M(); // can be off m-shell
+ double M = init_state.Tgt().HitPartP4().M(); // can be off m-shell
//-- Get the physical W range
const KPhaseSpace & kps = interaction->PhaseSpace();
diff --git a/src/Physics/BoostedDarkMatter/EventGen/DMEInteractionListGenerator.cxx b/src/Physics/BoostedDarkMatter/EventGen/DMEInteractionListGenerator.cxx
index 0f1a9232e..1d6885f17 100644
--- a/src/Physics/BoostedDarkMatter/EventGen/DMEInteractionListGenerator.cxx
+++ b/src/Physics/BoostedDarkMatter/EventGen/DMEInteractionListGenerator.cxx
@@ -65,7 +65,7 @@ InteractionList * DMEInteractionListGenerator::DMEELInteractionList(
// clone init state and de-activate the struck nucleon info
InitialState init(init_state);
- init_state.TgtPtr()->SetHitNucPdg(0);
+ init_state.TgtPtr()->SetHitPartPdg(0);
if(nupdg == kPdgDarkMatter || nupdg == kPdgAntiDarkMatter) {
ProcessInfo proc_info(kScDarkMatterElectron, kIntDarkMatter);
diff --git a/src/Physics/BoostedDarkMatter/EventGen/DMELEventGenerator.cxx b/src/Physics/BoostedDarkMatter/EventGen/DMELEventGenerator.cxx
index ad08646dc..da0a53577 100644
--- a/src/Physics/BoostedDarkMatter/EventGen/DMELEventGenerator.cxx
+++ b/src/Physics/BoostedDarkMatter/EventGen/DMELEventGenerator.cxx
@@ -101,7 +101,7 @@ void DMELEventGenerator::ProcessEventRecord(GHepRecord * evrec) const
// cross section (important when using the local Fermi gas model)
Target* tgt = interaction->InitState().TgtPtr();
double hitNucPos = nucleon->X4()->Vect().Mag();
- tgt->SetHitNucPosition( hitNucPos );
+ tgt->SetHitPartPosition( hitNucPos );
//-- For the subsequent kinematic selection with the rejection method:
// Calculate the max differential cross section or retrieve it from the
@@ -216,7 +216,7 @@ void DMELEventGenerator::ProcessEventRecord(GHepRecord * evrec) const
// struck nucleon mass (can be off the mass shell)
const InitialState & init_state = interaction->InitState();
double E = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4().M();
+ double M = init_state.Tgt().HitPartP4().M();
LOG("DMELKinematics", pNOTICE) << "E = " << E << ", M = "<< M;
// The hadronic inv. mass is equal to the recoil nucleon on-shell mass.
@@ -263,7 +263,7 @@ void DMELEventGenerator::ProcessEventRecord(GHepRecord * evrec) const
-1, -1, -1, interaction->KinePtr()->HadSystP4(), x4l);
// Store struck nucleon momentum and binding energy
- TLorentzVector p4ptr = interaction->InitStatePtr()->TgtPtr()->HitNucP4();
+ TLorentzVector p4ptr = interaction->InitStatePtr()->TgtPtr()->HitPartP4();
LOG("DMELEvent",pNOTICE) << "pn: " << p4ptr.X() << ", "
<< p4ptr.Y() << ", " << p4ptr.Z() << ", " << p4ptr.E();
nucleon->SetMomentum(p4ptr);
@@ -443,7 +443,7 @@ double DMELEventGenerator::ComputeMaxXSec(const Interaction * in) const
// TODO: document this, won't work for spectral functions
double dummy_w = -1.;
double prob = fNuclModel->Prob(pNi_next, dummy_w, tgt,
- tgt.HitNucPosition());
+ tgt.HitPartPosition());
double costh0_max = genie::utils::CosTheta0Max( *interaction );
diff --git a/src/Physics/BoostedDarkMatter/EventGen/DMELInteractionListGenerator.cxx b/src/Physics/BoostedDarkMatter/EventGen/DMELInteractionListGenerator.cxx
index 6fc3cc6fd..d8728979b 100644
--- a/src/Physics/BoostedDarkMatter/EventGen/DMELInteractionListGenerator.cxx
+++ b/src/Physics/BoostedDarkMatter/EventGen/DMELInteractionListGenerator.cxx
@@ -91,7 +91,7 @@ InteractionList * DMELInteractionListGenerator::CreateInteractionListDM(
delete interaction;
continue;
}
- target->SetHitNucPdg(nuclpdg[i]);
+ target->SetHitPartPdg(nuclpdg[i]);
intlist->push_back(interaction);
}
diff --git a/src/Physics/BoostedDarkMatter/EventGen/DMELKinematicsGenerator.cxx b/src/Physics/BoostedDarkMatter/EventGen/DMELKinematicsGenerator.cxx
index 27bac5ecb..96da43432 100644
--- a/src/Physics/BoostedDarkMatter/EventGen/DMELKinematicsGenerator.cxx
+++ b/src/Physics/BoostedDarkMatter/EventGen/DMELKinematicsGenerator.cxx
@@ -77,7 +77,7 @@ void DMELKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
// store the struck nucleon position for use by the xsec method
double hitNucPos = evrec->HitNucleon()->X4()->Vect().Mag();
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPosition(hitNucPos);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPosition(hitNucPos);
//-- Note: The kinematic generator would be using the free nucleon cross
// section (even for nuclear targets) so as not to double-count nuclear
@@ -185,7 +185,7 @@ void DMELKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
// struck nucleon mass (can be off the mass shell)
const InitialState & init_state = interaction->InitState();
double E = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4().M();
+ double M = init_state.Tgt().HitPartP4().M();
LOG("DMELKinematics", pNOTICE) << "E = " << E << ", M = "<< M;
@@ -255,7 +255,7 @@ void DMELKinematicsGenerator::SpectralFuncExperimentalCode(
// store the struck nucleon position for use by the xsec method
double hitNucPos = evrec->HitNucleon()->X4()->Vect().Mag();
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPosition(hitNucPos);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPosition(hitNucPos);
//-- Note: The kinematic generator would be using the free nucleon cross
// section (even for nuclear targets) so as not to double-count nuclear
@@ -267,14 +267,14 @@ void DMELKinematicsGenerator::SpectralFuncExperimentalCode(
interaction->SetBit(kIAssumeFreeNucleon);
//-- Assume scattering off a nucleon on the mass shell (PWIA prescription)
- double Mn = interaction->InitState().Tgt().HitNucMass(); // PDG mass, take it to be on-shell
- double pxn = interaction->InitState().Tgt().HitNucP4().Px();
- double pyn = interaction->InitState().Tgt().HitNucP4().Py();
- double pzn = interaction->InitState().Tgt().HitNucP4().Pz();
- double En = interaction->InitState().Tgt().HitNucP4().Energy();
+ double Mn = interaction->InitState().Tgt().HitPartMass(); // PDG mass, take it to be on-shell
+ double pxn = interaction->InitState().Tgt().HitPartP4().Px();
+ double pyn = interaction->InitState().Tgt().HitPartP4().Py();
+ double pzn = interaction->InitState().Tgt().HitPartP4().Pz();
+ double En = interaction->InitState().Tgt().HitPartP4().Energy();
double En0 = TMath::Sqrt(pxn*pxn + pyn*pyn + pzn*pzn + Mn*Mn);
double Eb = En0 - En;
- interaction->InitStatePtr()->TgtPtr()->HitNucP4Ptr()->SetE(En0);
+ interaction->InitStatePtr()->TgtPtr()->HitPartP4Ptr()->SetE(En0);
double ml = interaction->FSPrimLepton()->Mass();
//-- Get the limits for the generated Q2
diff --git a/src/Physics/BoostedDarkMatter/XSection/AhrensDMELPXSec.cxx b/src/Physics/BoostedDarkMatter/XSection/AhrensDMELPXSec.cxx
index f0dd132e3..084d8d118 100644
--- a/src/Physics/BoostedDarkMatter/XSection/AhrensDMELPXSec.cxx
+++ b/src/Physics/BoostedDarkMatter/XSection/AhrensDMELPXSec.cxx
@@ -66,7 +66,7 @@ double AhrensDMELPXSec::XSec(
double E = init_state.ProbeE(kRfHitNucRest);
double ml = init_state.GetProbeP4(kRfHitNucRest)->M();
double Q2 = kinematics.Q2();
- double M = target.HitNucMass();
+ double M = target.HitPartMass();
double M2 = TMath::Power(M, 2.);
double E2 = TMath::Power(E, 2.);
double ml2 = TMath::Power(ml,2.);
@@ -78,7 +78,7 @@ double AhrensDMELPXSec::XSec(
int nusign = 1;
int nucsign = 1;
int nupdgc = init_state.ProbePdg();
- int nucpdgc = target.HitNucPdg();
+ int nucpdgc = target.HitPartPdg();
if( pdg::IsAntiDarkMatter(nupdgc) ) nusign = -1;
if( pdg::IsNeutron(nucpdgc) ) nucsign = -1;
diff --git a/src/Physics/BoostedDarkMatter/XSection/DMDISXSec.cxx b/src/Physics/BoostedDarkMatter/XSection/DMDISXSec.cxx
index 29be83475..b44169435 100644
--- a/src/Physics/BoostedDarkMatter/XSection/DMDISXSec.cxx
+++ b/src/Physics/BoostedDarkMatter/XSection/DMDISXSec.cxx
@@ -71,9 +71,8 @@ double DMDISXSec::Integrate(
const InitialState & init_state = in->InitState();
double Ed = init_state.ProbeE(kRfHitNucRest);
- int nucpdgc = init_state.Tgt().HitNucPdg();
- int NNucl = (pdg::IsProton(nucpdgc)) ?
- init_state.Tgt().Z() : init_state.Tgt().N();
+ int nucpdgc = init_state.Tgt().HitPartPdg();
+ int NNucl = (pdg::IsProton(nucpdgc)) ? init_state.Tgt().Z() : init_state.Tgt().N();
// If the input interaction is off a nuclear target, then chek whether
// the corresponding free nucleon cross section already exists at the
@@ -230,7 +229,7 @@ void DMDISXSec::CacheFreeNucleonXSec(
// Tweak interaction to be on a free nucleon target
Target * target = interaction->InitStatePtr()->TgtPtr();
- int nucpdgc = target->HitNucPdg();
+ int nucpdgc = target->HitPartPdg();
if(pdg::IsProton(nucpdgc)) { target->SetId(kPdgTgtFreeP); }
else { target->SetId(kPdgTgtFreeN); }
diff --git a/src/Physics/BoostedDarkMatter/XSection/DMELUtils.cxx b/src/Physics/BoostedDarkMatter/XSection/DMELUtils.cxx
index d2d5b83b7..56f986586 100644
--- a/src/Physics/BoostedDarkMatter/XSection/DMELUtils.cxx
+++ b/src/Physics/BoostedDarkMatter/XSection/DMELUtils.cxx
@@ -36,7 +36,7 @@ namespace {
TVector3 COMframe2Lab(const genie::InitialState& initialState)
{
TLorentzVector* k4 = initialState.GetProbeP4( genie::kRfLab );
- TLorentzVector* p4 = initialState.TgtPtr()->HitNucP4Ptr();
+ TLorentzVector* p4 = initialState.TgtPtr()->HitPartP4Ptr();
TLorentzVector totMom = *k4 + *p4;
TVector3 beta = totMom.BoostVector();
@@ -59,7 +59,7 @@ double genie::utils::EnergyDeltaFunctionSolutionDMEL(
// vice-versa
TLorentzVector* probe = inter.InitStatePtr()->GetProbeP4( kRfLab );
const TLorentzVector& hit_nucleon = inter.InitStatePtr()->TgtPtr()
- ->HitNucP4();
+ ->HitPartP4();
TLorentzVector total_p4 = (*probe) + hit_nucleon;
TVector3 beta_COM_to_lab = total_p4.BoostVector();
TVector3 beta_lab_to_COM = -beta_COM_to_lab;
@@ -242,10 +242,10 @@ double genie::utils::CosTheta0Max(const genie::Interaction& interaction) {
// Possibly off-shell initial struck nucleon total energy
// (BindHitNucleon() should have been called previously if needed)
- const TLorentzVector& p4Ni = interaction.InitState().Tgt().HitNucP4();
+ const TLorentzVector& p4Ni = interaction.InitState().Tgt().HitPartP4();
double ENi = p4Ni.E();
// On-shell mass of initial struck nucleon
- double mNi = interaction.InitState().Tgt().HitNucMass();
+ double mNi = interaction.InitState().Tgt().HitPartMass();
// On-shell initial struck nucleon energy
double ENi_on_shell = std::sqrt( mNi*mNi + p4Ni.Vect().Mag2() );
// Energy needed to put initial nucleon on the mass shell
@@ -261,14 +261,14 @@ void genie::utils::BindHitNucleon(genie::Interaction& interaction,
genie::DMELEvGen_BindingMode_t hitNucleonBindingMode)
{
genie::Target* tgt = interaction.InitState().TgtPtr();
- TLorentzVector* p4Ni = tgt->HitNucP4Ptr();
+ TLorentzVector* p4Ni = tgt->HitPartP4Ptr();
// Initial nucleon 3-momentum (lab frame)
TVector3 p3Ni = nucl_model.Momentum3();
// Look up the (on-shell) mass of the initial nucleon
TDatabasePDG* tb = TDatabasePDG::Instance();
- double mNi = tb->GetParticle( tgt->HitNucPdg() )->Mass();
+ double mNi = tb->GetParticle( tgt->HitPartPdg() )->Mass();
// Set the (possibly off-shell) initial nucleon energy based on
// the selected binding energy mode. Always put the initial nucleon
@@ -306,7 +306,7 @@ void genie::utils::BindHitNucleon(genie::Interaction& interaction,
// Determine the mass and proton numbers for the remnant nucleus
int Af = tgt->A() - 1;
int Zf = tgt->Z();
- if ( genie::pdg::IsProton( tgt->HitNucPdg()) ) --Zf;
+ if ( genie::pdg::IsProton( tgt->HitPartPdg()) ) --Zf;
Mf = genie::PDGLibrary::Instance()->Find( genie::pdg::IonPdgCode(Af, Zf) )->Mass();
// Deduce the binding energy from the final nucleus mass
diff --git a/src/Physics/BoostedDarkMatter/XSection/QPMDMDISPXSec.cxx b/src/Physics/BoostedDarkMatter/XSection/QPMDMDISPXSec.cxx
index fe3a6550c..11f81e3c8 100644
--- a/src/Physics/BoostedDarkMatter/XSection/QPMDMDISPXSec.cxx
+++ b/src/Physics/BoostedDarkMatter/XSection/QPMDMDISPXSec.cxx
@@ -78,7 +78,7 @@ double QPMDMDISPXSec::XSec(
double E = init_state.ProbeE(kRfHitNucRest);
double ml = interaction->FSPrimLepton()->Mass();
- double Mnuc = init_state.Tgt().HitNucMass();
+ double Mnuc = init_state.Tgt().HitPartMass();
double x = kinematics.x();
double y = kinematics.y();
@@ -202,7 +202,7 @@ double QPMDMDISPXSec::XSec(
// Compute nuclear cross section (simple scaling here, corrections must
// have been included in the structure functions)
const Target & target = init_state.Tgt();
- int nucpdgc = target.HitNucPdg();
+ int nucpdgc = target.HitPartPdg();
int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N();
xsec *= NNucl;
@@ -240,9 +240,7 @@ bool QPMDMDISPXSec::ValidProcess(const Interaction * interaction) const
int probe_pdg = init_state.ProbePdg();
if(!pdg::IsDarkMatter(probe_pdg) && !pdg::IsAntiDarkMatter(probe_pdg)) return false;
- if(! init_state.Tgt().HitNucIsSet()) return false;
-
- int hitnuc_pdg = init_state.Tgt().HitNucPdg();
+ int hitnuc_pdg = init_state.Tgt().HitPartPdg();
if(!pdg::IsNeutronOrProton(hitnuc_pdg)) return false;
return true;
diff --git a/src/Physics/BoostedDarkMatter/XSection/QPMDMDISStrucFuncBase.cxx b/src/Physics/BoostedDarkMatter/XSection/QPMDMDISStrucFuncBase.cxx
index abe11427c..07e761767 100644
--- a/src/Physics/BoostedDarkMatter/XSection/QPMDMDISStrucFuncBase.cxx
+++ b/src/Physics/BoostedDarkMatter/XSection/QPMDMDISStrucFuncBase.cxx
@@ -145,7 +145,7 @@ void QPMDMDISStrucFuncBase::Calculate(const Interaction * interaction) const
const InitialState & init_state = interaction->InitState();
const Target & tgt = init_state.Tgt();
- int nuc_pdgc = tgt.HitNucPdg();
+ int nuc_pdgc = tgt.HitPartPdg();
int probe_pdgc = init_state.ProbePdg();
bool is_p = pdg::IsProton ( nuc_pdgc );
bool is_n = pdg::IsNeutron ( nuc_pdgc );
@@ -328,7 +328,7 @@ double QPMDMDISStrucFuncBase::Q2(const Interaction * interaction) const
// if Q2 was not set, then compute it from x,y,Ev,Mnucleon
if (kinematics.KVSet(kKVy)) {
const InitialState & init_state = interaction->InitState();
- double Mn = init_state.Tgt().HitNucP4Ptr()->M(); // could be off-shell
+ double Mn = init_state.Tgt().HitPartP4Ptr()->M(); // could be off-shell
//double x = this->ScalingVar(interaction); // could be redefined
double x = kinematics.x();
double y = kinematics.y();
@@ -421,7 +421,7 @@ void QPMDMDISStrucFuncBase::CalcPDFs(const Interaction * interaction) const
// Get the hit nucleon mass (could be off-shell)
const Target & tgt = interaction->InitState().Tgt();
- double M = tgt.HitNucP4().M();
+ double M = tgt.HitPartP4().M();
// Get the Q2 for which PDFs will be evaluated
double Q2pdf = TMath::Max(Q2val, fQ2min);
@@ -526,7 +526,7 @@ void QPMDMDISStrucFuncBase::CalcPDFs(const Interaction * interaction) const
// The above are the proton parton density function. Get the PDFs for the
// hit nucleon (p or n) by swapping u<->d if necessary
- int nuc_pdgc = tgt.HitNucPdg();
+ int nuc_pdgc = tgt.HitPartPdg();
bool isP = pdg::IsProton (nuc_pdgc);
bool isN = pdg::IsNeutron (nuc_pdgc);
assert(isP || isN);
diff --git a/src/Physics/Charm/XSection/AivazisCharmPXSecLO.cxx b/src/Physics/Charm/XSection/AivazisCharmPXSecLO.cxx
index 3b483cb7e..4a83e8bdc 100644
--- a/src/Physics/Charm/XSection/AivazisCharmPXSecLO.cxx
+++ b/src/Physics/Charm/XSection/AivazisCharmPXSecLO.cxx
@@ -64,7 +64,7 @@ double AivazisCharmPXSecLO::XSec(
//----- get target information (hit nucleon and quark)
int nu = init_state.ProbePdg();
- int nuc = target.HitNucPdg();
+ int nuc = target.HitPartPdg();
bool isP = pdg::IsProton (nuc);
bool isN = pdg::IsNeutron(nuc);
bool qset = target.HitQrkIsSet();
@@ -82,7 +82,7 @@ double AivazisCharmPXSecLO::XSec(
double x = kinematics.x();
double y = kinematics.y();
double x2 = TMath::Power(x, 2);
- double Mnuc = target.HitNucMass();
+ double Mnuc = target.HitPartMass();
double Mnuc2 = TMath::Power(Mnuc, 2);
double Q2 = 2*Mnuc*E*x*y;
double inverse_eta = 0.5/x + TMath::Sqrt( 0.25/x2 + Mnuc2/Q2 );
@@ -180,7 +180,7 @@ bool AivazisCharmPXSecLO::ValidProcess(const Interaction * interaction) const
if(!is_inclusive_charm) return false;
int nu = init_state.ProbePdg();
- int nuc = init_state.Tgt().HitNucPdg();
+ int nuc = init_state.Tgt().HitPartPdg();
if (!pdg::IsProton(nuc) && !pdg::IsNeutron(nuc)) return false;
if (!pdg::IsNeutrino(nu) && !pdg::IsAntiNeutrino(nu)) return false;
diff --git a/src/Physics/Charm/XSection/KovalenkoQELCharmPXSec.cxx b/src/Physics/Charm/XSection/KovalenkoQELCharmPXSec.cxx
index 2f7434c5a..0b59d4c6c 100644
--- a/src/Physics/Charm/XSection/KovalenkoQELCharmPXSec.cxx
+++ b/src/Physics/Charm/XSection/KovalenkoQELCharmPXSec.cxx
@@ -50,8 +50,8 @@ KovalenkoQELCharmPXSec::~KovalenkoQELCharmPXSec()
}
//____________________________________________________________________________
-double KovalenkoQELCharmPXSec::XSec(
- const Interaction * interaction, KinePhaseSpace_t kps) const
+double KovalenkoQELCharmPXSec::XSec( const Interaction * interaction,
+ KinePhaseSpace_t kps) const
{
if(! this -> ValidProcess (interaction) ) return 0.;
if(! this -> ValidKinematics (interaction) ) return 0.;
@@ -73,7 +73,7 @@ double KovalenkoQELCharmPXSec::XSec(
//resonance mass & nucleon mass
double MR = this->MRes (interaction);
double MR2 = TMath::Power(MR,2);
- double Mnuc = target.HitNucMass();
+ double Mnuc = target.HitPartMass();
double Mnuc2 = TMath::Power(Mnuc,2);
#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
@@ -110,7 +110,7 @@ double KovalenkoQELCharmPXSec::XSec(
if( interaction->TestBit(kIAssumeFreeNucleon) ) return xsec;
//----- Nuclear cross section (simple scaling here)
- int nuc = target.HitNucPdg();
+ int nuc = target.HitPartPdg();
int NNucl = (pdg::IsProton(nuc)) ? target.Z() : target.N();
xsec *= NNucl;
@@ -129,8 +129,8 @@ double KovalenkoQELCharmPXSec::ZR(const Interaction * interaction) const
const InitialState & init_state = interaction->InitState();
int pdgc = xcls.CharmHadronPdg();
- bool isP = pdg::IsProton ( init_state.Tgt().HitNucPdg() );
- bool isN = pdg::IsNeutron( init_state.Tgt().HitNucPdg() );
+ bool isP = pdg::IsProton ( init_state.Tgt().HitPartPdg() );
+ bool isN = pdg::IsNeutron( init_state.Tgt().HitPartPdg() );
if ( pdgc == kPdgLambdaPc && isN ) return fScLambdaP;
else if ( pdgc == kPdgSigmaPc && isN ) return fScSigmaP;
@@ -150,7 +150,7 @@ double KovalenkoQELCharmPXSec::DR(const Interaction * interaction) const
const Kinematics & kinematics = interaction->Kine();
double Q2 = kinematics.Q2();
- double Mnuc = init_state.Tgt().HitNucMass();
+ double Mnuc = init_state.Tgt().HitPartMass();
double Mnuc2 = TMath::Power(Mnuc,2);
double MR = this->MRes(interaction);
double DeltaR = this->ResDM(interaction);
@@ -167,7 +167,7 @@ double KovalenkoQELCharmPXSec::DR(const Interaction * interaction) const
LOG("QELCharmXSec", pDEBUG)
<< "Integration limits = [" << xi_bar_plus << ", " << xi_bar_minus << "]";
- int pdgc = init_state.Tgt().HitNucPdg();
+ int pdgc = init_state.Tgt().HitPartPdg();
ROOT::Math::IBaseFunctionOneDim * integrand = new
utils::gsl::wrap::KovQELCharmIntegrand(&pdfs,Q2,pdgc);
@@ -251,8 +251,8 @@ bool KovalenkoQELCharmPXSec::ValidProcess(
if(!proc_info.IsQuasiElastic()) return false;
if(!proc_info.IsWeak()) return false;
- bool isP = pdg::IsProton ( init_state.Tgt().HitNucPdg() );
- bool isN = pdg::IsNeutron( init_state.Tgt().HitNucPdg() );
+ bool isP = pdg::IsProton ( init_state.Tgt().HitPartPdg() );
+ bool isN = pdg::IsNeutron( init_state.Tgt().HitPartPdg() );
int pdgc = xcls.CharmHadronPdg();
@@ -275,7 +275,7 @@ bool KovalenkoQELCharmPXSec::ValidKinematics(
//resonance, final state primary lepton & nucleon mass
double MR = this -> MRes (interaction);
double ml = interaction->FSPrimLepton()->Mass();
- double Mnuc = init_state.Tgt().HitNucP4Ptr()->M();
+ double Mnuc = init_state.Tgt().HitPartP4Ptr()->M();
double Mnuc2 = TMath::Power(Mnuc,2);
//resonance threshold
diff --git a/src/Physics/Charm/XSection/SlowRsclCharmDISPXSecLO.cxx b/src/Physics/Charm/XSection/SlowRsclCharmDISPXSecLO.cxx
index 7a749150f..e4f07723b 100644
--- a/src/Physics/Charm/XSection/SlowRsclCharmDISPXSecLO.cxx
+++ b/src/Physics/Charm/XSection/SlowRsclCharmDISPXSecLO.cxx
@@ -62,7 +62,7 @@ double SlowRsclCharmDISPXSecLO::XSec(
const InitialState & init_state = interaction->InitState();
const Target & target = init_state.Tgt();
- double Mnuc = target.HitNucMass();
+ double Mnuc = target.HitPartMass();
double E = init_state.ProbeE(kRfHitNucRest);
double x = kinematics.x();
double y = kinematics.y();
@@ -70,7 +70,7 @@ double SlowRsclCharmDISPXSecLO::XSec(
//----- get target information (hit nucleon and quark)
int nu = init_state.ProbePdg();
- int nuc = target.HitNucPdg();
+ int nuc = target.HitPartPdg();
bool isP = pdg::IsProton (nuc);
bool isN = pdg::IsNeutron(nuc);
bool qset = target.HitQrkIsSet();
@@ -173,7 +173,7 @@ bool SlowRsclCharmDISPXSecLO::ValidProcess(
if(!is_inclusive_charm) return false;
int nu = init_state.ProbePdg();
- int nuc = init_state.Tgt().HitNucPdg();
+ int nuc = init_state.Tgt().HitPartPdg();
if (!pdg::IsProton(nuc) && !pdg::IsNeutron(nuc)) return false;
if (!pdg::IsNeutrino(nu) && !pdg::IsAntiNeutrino(nu)) return false;
diff --git a/src/Physics/Coherent/XSection/AlvarezRusoCOHPiPXSec.cxx b/src/Physics/Coherent/XSection/AlvarezRusoCOHPiPXSec.cxx
index 0d277f832..a19b5f256 100644
--- a/src/Physics/Coherent/XSection/AlvarezRusoCOHPiPXSec.cxx
+++ b/src/Physics/Coherent/XSection/AlvarezRusoCOHPiPXSec.cxx
@@ -146,7 +146,7 @@ bool AlvarezRusoCOHPiPXSec::ValidProcess(const Interaction * interaction) const
if (!proc_info.IsCoherentProduction()) return false;
if (!proc_info.IsWeak()) return false;
- if (target.HitNucIsSet()) return false;
+ if (target.HitPartIsSet()) return false;
if (!(target.A()>1)) return false;
if (!pdg::IsNeutrino(nu) && !pdg::IsAntiNeutrino(nu)) return false;
diff --git a/src/Physics/Coherent/XSection/BergerSehgalCOHPiPXSec2015.cxx b/src/Physics/Coherent/XSection/BergerSehgalCOHPiPXSec2015.cxx
index 276e0e1b2..585995a76 100644
--- a/src/Physics/Coherent/XSection/BergerSehgalCOHPiPXSec2015.cxx
+++ b/src/Physics/Coherent/XSection/BergerSehgalCOHPiPXSec2015.cxx
@@ -275,7 +275,7 @@ bool BergerSehgalCOHPiPXSec2015::ValidProcess(const Interaction * interaction) c
if (!proc_info.IsCoherentProduction()) return false;
if (!proc_info.IsWeak()) return false;
- if (target.HitNucIsSet()) return false;
+ if (target.HitPartIsSet()) return false;
if (!(target.A()>1)) return false;
if (!pdg::IsNeutrino(nu) && !pdg::IsAntiNeutrino(nu)) return false;
diff --git a/src/Physics/Coherent/XSection/BergerSehgalFMCOHPiPXSec2015.cxx b/src/Physics/Coherent/XSection/BergerSehgalFMCOHPiPXSec2015.cxx
index 29753b259..9b7159512 100644
--- a/src/Physics/Coherent/XSection/BergerSehgalFMCOHPiPXSec2015.cxx
+++ b/src/Physics/Coherent/XSection/BergerSehgalFMCOHPiPXSec2015.cxx
@@ -274,7 +274,7 @@ bool BergerSehgalFMCOHPiPXSec2015::ValidProcess(const Interaction * interaction)
if (!proc_info.IsCoherentProduction()) return false;
if (!proc_info.IsWeak()) return false;
- if (target.HitNucIsSet()) return false;
+ if (target.HitPartIsSet()) return false;
if (!(target.A()>1)) return false;
if (!pdg::IsNeutrino(nu) && !pdg::IsAntiNeutrino(nu)) return false;
diff --git a/src/Physics/Coherent/XSection/ReinSehgalCOHPiPXSec.cxx b/src/Physics/Coherent/XSection/ReinSehgalCOHPiPXSec.cxx
index 7c8932ff8..77e96ad0f 100644
--- a/src/Physics/Coherent/XSection/ReinSehgalCOHPiPXSec.cxx
+++ b/src/Physics/Coherent/XSection/ReinSehgalCOHPiPXSec.cxx
@@ -166,7 +166,7 @@ bool ReinSehgalCOHPiPXSec::ValidProcess(const Interaction * interaction) const
if (!proc_info.IsCoherentProduction()) return false;
if (!proc_info.IsWeak()) return false;
- if (target.HitNucIsSet()) return false;
+ if (target.HitPartIsSet()) return false;
if (!(target.A()>1)) return false;
if (!pdg::IsNeutrino(nu) && !pdg::IsAntiNeutrino(nu)) return false;
diff --git a/src/Physics/Common/ElectronVelocityMap.cxx b/src/Physics/Common/ElectronVelocityMap.cxx
new file mode 100644
index 000000000..c3fc0a317
--- /dev/null
+++ b/src/Physics/Common/ElectronVelocityMap.cxx
@@ -0,0 +1,107 @@
+///____________________________________________________________________________
+/*
+ Copyright (c) 2003-2023, The GENIE Collaboration
+ For the full text of the license visit http://copyright.genie-mc.org
+
+ \brief It provides the correct ElectronVelociy model to be used
+ for a given atom.
+
+ \author Marco Roda
+ University of Liverpool
+
+ \created March 28, 2023
+
+ For the class documentation see the corresponding header file.
+*/
+//____________________________________________________________________________
+
+#include "Physics/Common/ElectronVelocityMap.h"
+
+#include "Framework/Algorithm/AlgConfigPool.h"
+#include "Framework/ParticleData/PDGUtils.h"
+
+using namespace genie;
+
+ElectronVelocityMap::ElectronVelocityMap() :
+ ElectronVelocity("genie::ElectronVelocityMap", "Default") { ; }
+//___________________________________________________________________________
+ElectronVelocityMap::ElectronVelocityMap(string config) :
+ElectronVelocity("genie::ElectronVelocityMap", config) { ; }
+//___________________________________________________________________________
+void ElectronVelocityMap::Configure(string config)
+{
+ Algorithm::Configure(config);
+
+ Registry * algos = AlgConfigPool::Instance() -> GlobalParameterList() ;
+ Registry r( "ElectronVelocitylMap", false ) ;
+
+ // copy in local pool relevant configurations
+ RgIMap entries = algos -> GetItemMap();
+ const std::string keyStart = "ElectronVelocity";
+ for( RgIMap::const_iterator it = entries.begin(); it != entries.end(); ++it ) {
+
+ if( it -> first.compare(0, keyStart.size(), keyStart.c_str()) == 0 ) {
+ r.Set( it -> first, algos -> GetAlg(it->first ) ) ;
+ }
+
+ }
+
+ ElectronVelocity::Configure(r) ;
+
+}
+//___________________________________________________________________________
+void ElectronVelocityMap::LoadConfig() {
+ fDefGlobalVelocity = nullptr;
+ fSpecificModels.clear();
+
+ // load default global model (should work for all nuclei)
+ RgAlg dgmodel ;
+ GetParam( "ElectronVelocity", dgmodel ) ;
+
+ LOG("ElcetronVelocity", pINFO)
+ << "Default global electron velocity model: " << dgmodel;
+ fDefGlobalVelocity = dynamic_cast ( this -> SubAlg( "ElectronVelocity" ) ) ;
+ assert(fDefGlobalVelocity);
+
+ // We're looking for keys that match this string
+ const std::string keyStart = "ElectronVelocity@Pdg=";
+ // Looking in both of these registries
+ RgIMap entries = GetConfig().GetItemMap();
+
+ for(RgIMap::const_iterator it = entries.begin(); it != entries.end(); ++it){
+ const std::string& key = it->first;
+ // Does it start with the right string?
+ if(key.compare(0, keyStart.size(), keyStart.c_str()) == 0){
+ // The rest is the PDG code
+ const int pdg = atoi(key.c_str()+keyStart.size());
+ const int Z = pdg::IonPdgCodeToZ(pdg);
+ //const int A = pdg::IonPdgCodeToA(pdg);
+
+ RgAlg rgmodel = GetConfig().GetAlg(key) ;
+ LOG("ElectronVelocity", pNOTICE)
+ << "Atom =" << pdg
+ << " -> refined velocity model: " << rgmodel;
+ const ElectronVelocity * model =
+ dynamic_cast (
+ this -> SubAlg(key) ) ;
+ assert(model);
+ fSpecificModels.insert(map::value_type(Z,model));
+ }
+ }
+}
+//___________________________________________________________________________
+void ElectronVelocityMap::InitializeVelocity(Interaction & interaction) const {
+
+ const auto & model = SelectModel(interaction.InitState().Tgt());
+
+ model.InitializeVelocity(interaction);
+
+}
+//___________________________________________________________________________
+const ElectronVelocity & ElectronVelocityMap::SelectModel(const Target & t) const {
+ auto it = fSpecificModels.find(t.Z());
+
+ if ( it != fSpecificModels.end()) return *(it->second) ;
+ else return * fDefGlobalVelocity;
+}
+
diff --git a/src/Physics/Common/ElectronVelocityMap.h b/src/Physics/Common/ElectronVelocityMap.h
new file mode 100644
index 000000000..85064e666
--- /dev/null
+++ b/src/Physics/Common/ElectronVelocityMap.h
@@ -0,0 +1,59 @@
+//____________________________________________________________________________
+/*!
+
+\class genie::ElectronVelocityMap
+
+\brief This class is a hook for Electron velocity distributions and allows associating each
+ one of them with specific nuclei.
+ Is a concrete implementation of the ElectronVelocity interface.
+
+ \author Marco Roda
+ University of Liverpool
+
+ \created March 28, 2023
+
+\cpright Copyright (c) 2003-2023, The GENIE Collaboration
+ For the full text of the license visit http://copyright.genie-mc.org
+
+*/
+//____________________________________________________________________________
+
+#ifndef _ELECTRON_VELOCITY_MAP_H_
+#define _ELECTRON_VELOCITY_MAP_H_
+
+#include "Physics/NuclearState/ElectronVelocity.h"
+
+namespace genie {
+
+class ElectronVelocityMap : public ElectronVelocity {
+
+public :
+
+ ElectronVelocityMap();
+ ElectronVelocityMap(string config);
+
+ ElectronVelocityMap(const ElectronVelocityMap & ) = delete;
+ ElectronVelocityMap(ElectronVelocityMap && ) = delete;
+
+
+ virtual ~ElectronVelocityMap() {;}
+
+ //-- overload the ElectronVelocity::Configure() methods
+ // to load data from ModelConfig.xml
+ void Configure(string config) override final ;
+
+ void InitializeVelocity(Interaction & interaction) const override; //Give initial velocity
+
+protected:
+ void LoadConfig () override;
+ const ElectronVelocity & SelectModel(const Target &) const;
+
+private:
+ const ElectronVelocity * fDefGlobalVelocity = nullptr;
+ map fSpecificModels ;
+ // the key is the Z of the atom
+
+};
+
+} // genie namespace
+#endif // _ELECTRON_VELOCITY_MAP_H_
diff --git a/src/Physics/Common/HadronicSystemGenerator.cxx b/src/Physics/Common/HadronicSystemGenerator.cxx
index 66611cb0e..eec12b754 100644
--- a/src/Physics/Common/HadronicSystemGenerator.cxx
+++ b/src/Physics/Common/HadronicSystemGenerator.cxx
@@ -200,7 +200,7 @@ int HadronicSystemGenerator::HadronShowerCharge(GHepRecord * evrec) const
Interaction * interaction = evrec->Summary();
const InitialState & init_state = interaction->InitState();
- int hit_nucleon = init_state.Tgt().HitNucPdg();
+ int hit_nucleon = init_state.Tgt().HitPartPdg();
assert( pdg::IsProton(hit_nucleon) || pdg::IsNeutron(hit_nucleon) );
diff --git a/src/Physics/Common/InitialStateAppender.cxx b/src/Physics/Common/InitialStateAppender.cxx
index 57863c5b5..1367bc608 100644
--- a/src/Physics/Common/InitialStateAppender.cxx
+++ b/src/Physics/Common/InitialStateAppender.cxx
@@ -128,7 +128,7 @@ void InitialStateAppender::AddStruckParticle(GHepRecord * evrec) const
return;
}
- int pdgc = init_state.Tgt().HitNucPdg();
+ int pdgc = init_state.Tgt().HitPartPdg();
if(pdgc != 0) {
@@ -138,7 +138,7 @@ void InitialStateAppender::AddStruckParticle(GHepRecord * evrec) const
int imom1 = (is_nucleus) ? 1 : -1;
int imom2 = -1;
- const TLorentzVector p4(init_state.Tgt().HitNucP4());
+ const TLorentzVector p4(init_state.Tgt().HitPartP4());
const TLorentzVector v4(0.,0.,0.,0.);
LOG("ISApp", pINFO)<< "Adding struck nucleon [pdgc = " << pdgc << "]";
diff --git a/src/Physics/Common/LinkDef.h b/src/Physics/Common/LinkDef.h
index 7f12724a5..9d533fc88 100644
--- a/src/Physics/Common/LinkDef.h
+++ b/src/Physics/Common/LinkDef.h
@@ -28,4 +28,5 @@
#pragma link C++ class genie::NormInteractionListGenerator;
+#pragma link C++ class genie::ElectronVelocityMap;
#endif
diff --git a/src/Physics/Common/OutgoingDarkGenerator.cxx b/src/Physics/Common/OutgoingDarkGenerator.cxx
index 8d8564086..f0e04042c 100644
--- a/src/Physics/Common/OutgoingDarkGenerator.cxx
+++ b/src/Physics/Common/OutgoingDarkGenerator.cxx
@@ -135,7 +135,7 @@ TVector3 OutgoingDarkGenerator::NucRestFrame2Lab(GHepRecord * evrec) const
Interaction * interaction = evrec->Summary();
const InitialState & init_state = interaction->InitState();
- const TLorentzVector & pnuc4 = init_state.Tgt().HitNucP4(); //[@LAB]
+ const TLorentzVector & pnuc4 = init_state.Tgt().HitPartP4(); //[@LAB]
TVector3 beta = pnuc4.BoostVector();
return beta;
diff --git a/src/Physics/Common/PrimaryLeptonGenerator.cxx b/src/Physics/Common/PrimaryLeptonGenerator.cxx
index eadf9155d..3a56ae85e 100644
--- a/src/Physics/Common/PrimaryLeptonGenerator.cxx
+++ b/src/Physics/Common/PrimaryLeptonGenerator.cxx
@@ -132,7 +132,7 @@ TVector3 PrimaryLeptonGenerator::NucRestFrame2Lab(GHepRecord * evrec) const
Interaction * interaction = evrec->Summary();
const InitialState & init_state = interaction->InitState();
- const TLorentzVector & pnuc4 = init_state.Tgt().HitNucP4(); //[@LAB]
+ const TLorentzVector & pnuc4 = init_state.Tgt().HitPartP4(); //[@LAB]
TVector3 beta = pnuc4.BoostVector();
return beta;
diff --git a/src/Physics/DeepInelastic/EventGen/DISInteractionListGenerator.cxx b/src/Physics/DeepInelastic/EventGen/DISInteractionListGenerator.cxx
index 61edbf17b..4f044955e 100644
--- a/src/Physics/DeepInelastic/EventGen/DISInteractionListGenerator.cxx
+++ b/src/Physics/DeepInelastic/EventGen/DISInteractionListGenerator.cxx
@@ -78,7 +78,7 @@ InteractionList * DISInteractionListGenerator::CreateInteractionList(
Interaction * interaction = new Interaction(init_state, proc_info);
Target * target = interaction->InitStatePtr()->TgtPtr();
- target->SetHitNucPdg(struck_nucleon);
+ target->SetHitPartPdg(struck_nucleon);
if(fIsCharm) {
XclsTag exclusive_tag;
diff --git a/src/Physics/DeepInelastic/EventGen/DISKinematicsGenerator.cxx b/src/Physics/DeepInelastic/EventGen/DISKinematicsGenerator.cxx
index cf726820d..615a71c8e 100644
--- a/src/Physics/DeepInelastic/EventGen/DISKinematicsGenerator.cxx
+++ b/src/Physics/DeepInelastic/EventGen/DISKinematicsGenerator.cxx
@@ -73,7 +73,7 @@ void DISKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
//-- Get neutrino energy and hit 'nucleon mass'
const InitialState & init_state = interaction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4().M(); // can be off m-shell
+ double M = init_state.Tgt().HitPartP4().M(); // can be off m-shell
//-- Get the physical W range
const KPhaseSpace & kps = interaction->PhaseSpace();
diff --git a/src/Physics/DeepInelastic/XSection/DISXSec.cxx b/src/Physics/DeepInelastic/XSection/DISXSec.cxx
index a38614075..2903444fd 100644
--- a/src/Physics/DeepInelastic/XSection/DISXSec.cxx
+++ b/src/Physics/DeepInelastic/XSection/DISXSec.cxx
@@ -67,7 +67,7 @@ double DISXSec::Integrate(
const InitialState & init_state = in->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- int nucpdgc = init_state.Tgt().HitNucPdg();
+ int nucpdgc = init_state.Tgt().HitPartPdg();
int NNucl = (pdg::IsProton(nucpdgc)) ?
init_state.Tgt().Z() : init_state.Tgt().N();
@@ -226,7 +226,7 @@ void DISXSec::CacheFreeNucleonXSec(
// Tweak interaction to be on a free nucleon target
Target * target = interaction->InitStatePtr()->TgtPtr();
- int nucpdgc = target->HitNucPdg();
+ int nucpdgc = target->HitPartPdg();
if(pdg::IsProton(nucpdgc)) { target->SetId(kPdgTgtFreeP); }
else { target->SetId(kPdgTgtFreeN); }
diff --git a/src/Physics/DeepInelastic/XSection/KNOTunedQPMDISPXSec.cxx b/src/Physics/DeepInelastic/XSection/KNOTunedQPMDISPXSec.cxx
index f2f45a220..5119362b4 100644
--- a/src/Physics/DeepInelastic/XSection/KNOTunedQPMDISPXSec.cxx
+++ b/src/Physics/DeepInelastic/XSection/KNOTunedQPMDISPXSec.cxx
@@ -110,7 +110,7 @@ double KNOTunedQPMDISPXSec::DISRESJoinSuppressionFactor(
const bool is_EM = pi.IsEM();
double E = ist.ProbeE(kRfHitNucRest);
- double Mnuc = ist.Tgt().HitNucMass();
+ double Mnuc = ist.Tgt().HitPartMass();
double x = in->Kine().x();
double y = in->Kine().y();
double Wo = utils::kinematics::XYtoW(E,Mnuc,x,y);
@@ -139,7 +139,7 @@ double KNOTunedQPMDISPXSec::DISRESJoinSuppressionFactor(
ostringstream ikey;
ikey << "nu-pdgc:" << ist.ProbePdg()
- << ";hit-nuc-pdg:"<< ist.Tgt().HitNucPdg() << "/"
+ << ";hit-nuc-pdg:"<< ist.Tgt().HitPartPdg() << "/"
<< pi.InteractionTypeAsString();
string key = cache->CacheBranchKey(algkey, ikey.str());
diff --git a/src/Physics/DeepInelastic/XSection/QPMDISPXSec.cxx b/src/Physics/DeepInelastic/XSection/QPMDISPXSec.cxx
index 41c1ffea9..a0af9c194 100644
--- a/src/Physics/DeepInelastic/XSection/QPMDISPXSec.cxx
+++ b/src/Physics/DeepInelastic/XSection/QPMDISPXSec.cxx
@@ -71,7 +71,7 @@ double QPMDISPXSec::XSec(
double E = init_state.ProbeE(kRfHitNucRest);
double ml = interaction->FSPrimLepton()->Mass();
- double Mnuc = init_state.Tgt().HitNucMass();
+ double Mnuc = init_state.Tgt().HitPartMass();
double x = kinematics.x();
double y = kinematics.y();
@@ -166,7 +166,7 @@ double QPMDISPXSec::XSec(
// Compute nuclear cross section (simple scaling here, corrections must
// have been included in the structure functions)
const Target & target = init_state.Tgt();
- int nucpdgc = target.HitNucPdg();
+ int nucpdgc = target.HitPartPdg();
int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N();
xsec *= NNucl;
@@ -204,9 +204,9 @@ bool QPMDISPXSec::ValidProcess(const Interaction * interaction) const
int probe_pdg = init_state.ProbePdg();
if(!pdg::IsLepton(probe_pdg)) return false;
- if(! init_state.Tgt().HitNucIsSet()) return false;
+ if(! init_state.Tgt().HitPartIsSet()) return false;
- int hitnuc_pdg = init_state.Tgt().HitNucPdg();
+ int hitnuc_pdg = init_state.Tgt().HitPartPdg();
if(!pdg::IsNeutronOrProton(hitnuc_pdg)) return false;
return true;
diff --git a/src/Physics/DeepInelastic/XSection/QPMDISStrucFuncBase.cxx b/src/Physics/DeepInelastic/XSection/QPMDISStrucFuncBase.cxx
index 4f5cef8dc..29a4f8c33 100644
--- a/src/Physics/DeepInelastic/XSection/QPMDISStrucFuncBase.cxx
+++ b/src/Physics/DeepInelastic/XSection/QPMDISStrucFuncBase.cxx
@@ -149,7 +149,7 @@ void QPMDISStrucFuncBase::Calculate(const Interaction * interaction) const
const InitialState & init_state = interaction->InitState();
const Target & tgt = init_state.Tgt();
- int nuc_pdgc = tgt.HitNucPdg();
+ int nuc_pdgc = tgt.HitPartPdg();
int probe_pdgc = init_state.ProbePdg();
bool is_p = pdg::IsProton ( nuc_pdgc );
bool is_n = pdg::IsNeutron ( nuc_pdgc );
@@ -411,7 +411,7 @@ double QPMDISStrucFuncBase::Q2(const Interaction * interaction) const
// if Q2 was not set, then compute it from x,y,Ev,Mnucleon
if (kinematics.KVSet(kKVy)) {
const InitialState & init_state = interaction->InitState();
- double Mn = init_state.Tgt().HitNucP4Ptr()->M(); // could be off-shell
+ double Mn = init_state.Tgt().HitPartP4Ptr()->M(); // could be off-shell
//double x = this->ScalingVar(interaction); // could be redefined
double x = kinematics.x();
double y = kinematics.y();
@@ -504,7 +504,7 @@ void QPMDISStrucFuncBase::CalcPDFs(const Interaction * interaction) const
// Get the hit nucleon mass (could be off-shell)
const Target & tgt = interaction->InitState().Tgt();
- double M = tgt.HitNucP4().M();
+ double M = tgt.HitPartP4().M();
// Get the Q2 for which PDFs will be evaluated
double Q2pdf = TMath::Max(Q2val, fQ2min);
@@ -609,7 +609,7 @@ void QPMDISStrucFuncBase::CalcPDFs(const Interaction * interaction) const
// The above are the proton parton density function. Get the PDFs for the
// hit nucleon (p or n) by swapping u<->d if necessary
- int nuc_pdgc = tgt.HitNucPdg();
+ int nuc_pdgc = tgt.HitPartPdg();
bool isP = pdg::IsProton (nuc_pdgc);
bool isN = pdg::IsNeutron (nuc_pdgc);
assert(isP || isN);
diff --git a/src/Physics/Diffractive/EventGen/DFRHadronicSystemGenerator.cxx b/src/Physics/Diffractive/EventGen/DFRHadronicSystemGenerator.cxx
index fd1254baf..720207edd 100644
--- a/src/Physics/Diffractive/EventGen/DFRHadronicSystemGenerator.cxx
+++ b/src/Physics/Diffractive/EventGen/DFRHadronicSystemGenerator.cxx
@@ -96,7 +96,7 @@ void DFRHadronicSystemGenerator::ProcessEventRecord(GHepRecord * evrec) const
const Target & target = init_state.Tgt();
double E = init_state.ProbeE(kRfHitNucRest); // neutrino energy
- double M = target.HitNucMass();
+ double M = target.HitPartMass();
double mpi = PDGLibrary::Instance()->Find(pion_pdgc)->Mass();
double mpi2 = TMath::Power(mpi,2);
double xo = interaction->Kine().x(true);
diff --git a/src/Physics/Diffractive/EventGen/DFRInteractionListGenerator.cxx b/src/Physics/Diffractive/EventGen/DFRInteractionListGenerator.cxx
index 4083e1663..812e06cdb 100644
--- a/src/Physics/Diffractive/EventGen/DFRInteractionListGenerator.cxx
+++ b/src/Physics/Diffractive/EventGen/DFRInteractionListGenerator.cxx
@@ -117,7 +117,7 @@ InteractionList * DFRInteractionListGenerator::CreateInteractionList(
else if (nuc == kPdgNeutron)
interaction->ExclTagPtr()->SetNNeutrons(1);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(nuc);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(nuc);
intlist->push_back(interaction);
}
diff --git a/src/Physics/Diffractive/EventGen/DFRKinematicsGenerator.cxx b/src/Physics/Diffractive/EventGen/DFRKinematicsGenerator.cxx
index 906a7d719..e7bc6c48d 100644
--- a/src/Physics/Diffractive/EventGen/DFRKinematicsGenerator.cxx
+++ b/src/Physics/Diffractive/EventGen/DFRKinematicsGenerator.cxx
@@ -75,7 +75,7 @@ void DFRKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
//-- Get neutrino energy and hit 'nucleon mass'
const InitialState & init_state = interaction->InitState();
double Ev = init_state.ProbeE(kRfHitNucRest);
- double M = init_state.Tgt().HitNucP4().M(); // can be off m-shell
+ double M = init_state.Tgt().HitPartP4().M(); // can be off m-shell
//-- Get the physical W range
const KPhaseSpace & kps = interaction->PhaseSpace();
diff --git a/src/Physics/Diffractive/XSection/ReinDFRPXSec.cxx b/src/Physics/Diffractive/XSection/ReinDFRPXSec.cxx
index c27c7f034..b1540cd15 100644
--- a/src/Physics/Diffractive/XSection/ReinDFRPXSec.cxx
+++ b/src/Physics/Diffractive/XSection/ReinDFRPXSec.cxx
@@ -61,7 +61,7 @@ double ReinDFRPXSec::XSec(
double x = kinematics.x(); // bjorken x
double y = kinematics.y(); // inelasticity y
double t = kinematics.t(); // (magnitude of) square of four-momentum xferred to proton
- double M = target.HitNucMass(); //
+ double M = target.HitPartMass(); //
double Q2 = 2.*x*y*M*E; // momentum transfer Q2>0
double Gf = kGF2 * M/(16*kPi3); // GF/pi/etc factor
double fp = 0.93 * kPionMass; // pion decay constant (cc)
@@ -111,7 +111,7 @@ double ReinDFRPXSec::XSec(
if( interaction->TestBit(kIAssumeFreeNucleon) ) return xsec;
//----- number of scattering centers in the target
- int nucpdgc = target.HitNucPdg();
+ int nucpdgc = target.HitPartPdg();
int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N();
xsec *= NNucl;
diff --git a/src/Physics/HEDIS/EventGen/HEDISInteractionListGenerator.cxx b/src/Physics/HEDIS/EventGen/HEDISInteractionListGenerator.cxx
index cfb3283a9..d694b51a1 100644
--- a/src/Physics/HEDIS/EventGen/HEDISInteractionListGenerator.cxx
+++ b/src/Physics/HEDIS/EventGen/HEDISInteractionListGenerator.cxx
@@ -98,7 +98,7 @@ InteractionList * HEDISInteractionListGenerator::CreateHEDISlist(
ProcessInfo proc(kScDeepInelastic,*inttype);
Interaction * interaction = new Interaction(*init, proc);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(*inucl);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(*inucl);
multimap hq = this->GetHitQuarks(interaction);
multimap::const_iterator hqi = hq.begin();
for( ; hqi != hq.end(); ++hqi) {
diff --git a/src/Physics/HEDIS/EventGen/HEDISKinematicsGenerator.cxx b/src/Physics/HEDIS/EventGen/HEDISKinematicsGenerator.cxx
index 9c2814397..a6d29731b 100644
--- a/src/Physics/HEDIS/EventGen/HEDISKinematicsGenerator.cxx
+++ b/src/Physics/HEDIS/EventGen/HEDISKinematicsGenerator.cxx
@@ -74,7 +74,7 @@ void HEDISKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
//-- Get neutrino energy and hit 'nucleon mass'
const InitialState & init_state = interaction->InitState();
double Ev = init_state.ProbeE(kRfLab);
- double M = init_state.Tgt().HitNucP4().M(); // can be off m-shell
+ double M = init_state.Tgt().HitPartP4().M(); // can be off m-shell
//-- Get the physical W range
const KPhaseSpace & kps = interaction->PhaseSpace();
diff --git a/src/Physics/HEDIS/XSection/HEDISPXSec.cxx b/src/Physics/HEDIS/XSection/HEDISPXSec.cxx
index 075574b5d..0f471a7ee 100644
--- a/src/Physics/HEDIS/XSection/HEDISPXSec.cxx
+++ b/src/Physics/HEDIS/XSection/HEDISPXSec.cxx
@@ -69,7 +69,7 @@ double HEDISPXSec::XSec(
double Q2 = kinematics.Q2();
double x = kinematics.x();
double E = init_state.ProbeE(kRfLab);
- double Mnuc = init_state.Tgt().HitNucMass();
+ double Mnuc = init_state.Tgt().HitPartMass();
double Mlep2 = TMath::Power(interaction->FSPrimLepton()->Mass(),2);
// Get F1,F2,F3 for particular quark channel and compute differential xsec
@@ -107,7 +107,7 @@ double HEDISPXSec::XSec(
if( interaction->TestBit(kIAssumeFreeNucleon) ) return xsec;
// Compute nuclear cross section (simple scaling here, corrections must have been included in the structure functions)
- int NNucl = (pdg::IsProton(init_state.Tgt().HitNucPdg())) ? init_state.Tgt().Z() : init_state.Tgt().N();
+ int NNucl = (pdg::IsProton(init_state.Tgt().HitPartPdg())) ? init_state.Tgt().Z() : init_state.Tgt().N();
xsec *= NNucl;
return xsec;
@@ -167,9 +167,9 @@ bool HEDISPXSec::ValidProcess(const Interaction * interaction) const
int probe_pdg = init_state.ProbePdg();
if(!pdg::IsLepton(probe_pdg)) return false;
- if(! init_state.Tgt().HitNucIsSet()) return false;
+ if(! init_state.Tgt().HitPartIsSet()) return false;
- int hitnuc_pdg = init_state.Tgt().HitNucPdg();
+ int hitnuc_pdg = init_state.Tgt().HitPartPdg();
if(!pdg::IsNeutronOrProton(hitnuc_pdg)) return false;
return true;
@@ -223,4 +223,4 @@ void HEDISPXSec::LoadConfig(void)
GetParam("Mts", fSFinfo.Vts );
GetParam("Mtb", fSFinfo.Vtb );
-}
\ No newline at end of file
+}
diff --git a/src/Physics/HEDIS/XSection/HEDISStrucFunc.cxx b/src/Physics/HEDIS/XSection/HEDISStrucFunc.cxx
index c565f68c4..84f795c95 100644
--- a/src/Physics/HEDIS/XSection/HEDISStrucFunc.cxx
+++ b/src/Physics/HEDIS/XSection/HEDISStrucFunc.cxx
@@ -361,11 +361,11 @@ void HEDISStrucFunc::CreateQrkSF( const Interaction * in, string sfFile )
// variables used to tag the SF for particular channel
bool iscc = in->ProcInfo().IsWeakCC();
bool isnu = pdg::IsNeutrino(in->InitState().ProbePdg());
- bool ispr = pdg::IsProton(in->InitState().Tgt().HitNucPdg());
+ bool ispr = pdg::IsProton(in->InitState().Tgt().HitPartPdg());
bool sea_iq = in->InitState().Tgt().HitSeaQrk();
int pdg_iq = in->InitState().Tgt().HitQrkPdg();
int pdg_fq = in->ExclTag().FinalQuarkPdg();
- double mass_nucl = in->InitState().Tgt().HitNucMass();
+ double mass_nucl = in->InitState().Tgt().HitPartMass();
// up and down quark swicth depending on proton or neutron interaction
int qrkd = 0;
@@ -507,7 +507,7 @@ void HEDISStrucFunc::CreateNucSF( const Interaction * in, string sfFile )
// variables used to tag the SF for particular channel
bool iscc = in->ProcInfo().IsWeakCC();
bool isnu = pdg::IsNeutrino(in->InitState().ProbePdg());
- bool ispr = pdg::IsProton(in->InitState().Tgt().HitNucPdg());
+ bool ispr = pdg::IsProton(in->InitState().Tgt().HitPartPdg());
// Define the channel that is used in APFEL
if ( isnu ) APFEL::SetProjectileDIS("neutrino");
@@ -574,7 +574,7 @@ string HEDISStrucFunc::QrkSFName( const Interaction * in)
{
string sin = pdg::IsNeutrino(in->InitState().ProbePdg()) ? "nu_" : "nubar_";
sin += in->ProcInfo().IsWeakCC() ? "cc_" : "nc_";
- sin += pdg::IsProton(in->InitState().Tgt().HitNucPdg()) ? "p_" : "n_";
+ sin += pdg::IsProton(in->InitState().Tgt().HitPartPdg()) ? "p_" : "n_";
sin += "iq"+to_string(in->InitState().Tgt().HitQrkPdg());
sin += in->InitState().Tgt().HitSeaQrk() ? "sea_" : "val_";
sin += "fq"+to_string(in->ExclTag().FinalQuarkPdg());
@@ -585,7 +585,7 @@ string HEDISStrucFunc::NucSFName( const Interaction * in)
{
string sin = pdg::IsNeutrino(in->InitState().ProbePdg()) ? "nu_" : "nubar_";
sin += in->ProcInfo().IsWeakCC() ? "cc_" : "nc_";
- sin += pdg::IsProton(in->InitState().Tgt().HitNucPdg()) ? "p" : "n";
+ sin += pdg::IsProton(in->InitState().Tgt().HitPartPdg()) ? "p" : "n";
return sin;
}
//____________________________________________________________________________
@@ -593,7 +593,7 @@ int HEDISStrucFunc::QrkSFCode( const Interaction * in)
{
int code = 10000000*pdg::IsNeutrino(in->InitState().ProbePdg());
code += 1000000*in->ProcInfo().IsWeakCC();
- code += 100000*pdg::IsProton(in->InitState().Tgt().HitNucPdg());
+ code += 100000*pdg::IsProton(in->InitState().Tgt().HitPartPdg());
code += 10000*in->InitState().Tgt().HitSeaQrk();
code += 100*(6+in->InitState().Tgt().HitQrkPdg());
code += 1*(6+in->ExclTag().FinalQuarkPdg());
@@ -604,7 +604,7 @@ int HEDISStrucFunc::NucSFCode( const Interaction * in)
{
int code = 100*pdg::IsNeutrino(in->InitState().ProbePdg());
code += 10*in->ProcInfo().IsWeakCC();
- code += 1*pdg::IsProton(in->InitState().Tgt().HitNucPdg());
+ code += 1*pdg::IsProton(in->InitState().Tgt().HitPartPdg());
return code;
}
//____________________________________________________________________________
diff --git a/src/Physics/HEDIS/XSection/HEDISXSec.cxx b/src/Physics/HEDIS/XSection/HEDISXSec.cxx
index a71936d28..3677b4603 100644
--- a/src/Physics/HEDIS/XSection/HEDISXSec.cxx
+++ b/src/Physics/HEDIS/XSection/HEDISXSec.cxx
@@ -74,7 +74,7 @@ double HEDISXSec::Integrate(
XSecSplineList * xsl = XSecSplineList::Instance();
if(init_state.Tgt().IsNucleus() && !xsl->IsEmpty() ) {
- int nucpdgc = init_state.Tgt().HitNucPdg();
+ int nucpdgc = init_state.Tgt().HitPartPdg();
int NNucl = (pdg::IsProton(nucpdgc)) ? init_state.Tgt().Z() : init_state.Tgt().N();
Interaction * interaction = new Interaction(*in);
diff --git a/src/Physics/HELepton/EventGen/HELeptonInteractionListGenerator.cxx b/src/Physics/HELepton/EventGen/HELeptonInteractionListGenerator.cxx
index bce1cb0be..59c728078 100644
--- a/src/Physics/HELepton/EventGen/HELeptonInteractionListGenerator.cxx
+++ b/src/Physics/HELepton/EventGen/HELeptonInteractionListGenerator.cxx
@@ -49,7 +49,7 @@ InteractionList *
if(probepdg == kPdgAntiNuE) {
InitialState init(init_state);
- init_state.TgtPtr()->SetHitNucPdg(0);
+ init_state.TgtPtr()->SetHitPartPdg(0);
Interaction * interaction = new Interaction(init_state, proc_info);
XclsTag exclusive_tag;
if (fIsGLRESMu) exclusive_tag.SetFinalLepton(kPdgMuon);
@@ -77,7 +77,7 @@ InteractionList *
if (fIsHENuElCC) {
ProcessInfo proc_info(kScGlashowResonance, kIntWeakCC);
InitialState init(init_state);
- init_state.TgtPtr()->SetHitNucPdg(0);
+ init_state.TgtPtr()->SetHitPartPdg(0);
Interaction * interaction = new Interaction(init_state, proc_info);
XclsTag exclusive_tag; //charged lepton
if ( pdg::IsNuMu(probepdg) ) exclusive_tag.SetFinalLepton(kPdgMuon);
@@ -90,7 +90,7 @@ InteractionList *
else if (fIsHENuElNC) {
ProcessInfo proc_info(kScGlashowResonance, kIntWeakNC);
InitialState init(init_state);
- init_state.TgtPtr()->SetHitNucPdg(0);
+ init_state.TgtPtr()->SetHitPartPdg(0);
Interaction * interaction = new Interaction(init_state, proc_info);
XclsTag exclusive_tag; //charged lepton
if ( pdg::IsNuMu(probepdg) ) exclusive_tag.SetFinalLepton(kPdgElectron);
@@ -125,7 +125,7 @@ InteractionList *
if( (struck_nucleon == kPdgProton && hasP) || (struck_nucleon == kPdgNeutron && hasN) ) {
Interaction * interaction = new Interaction(init_state, proc_info);
Target * target = interaction->InitStatePtr()->TgtPtr();
- target->SetHitNucPdg(struck_nucleon);
+ target->SetHitPartPdg(struck_nucleon);
XclsTag exclusive_tag;
if (fIsPhotonRESMu) exclusive_tag.SetFinalLepton( (probepdg>0) ? kPdgAntiMuon : kPdgMuon );
else if (fIsPhotonRESTau) exclusive_tag.SetFinalLepton( (probepdg>0) ? kPdgAntiTau : kPdgTau );
@@ -226,4 +226,4 @@ void HELeptonInteractionListGenerator::LoadConfigData(void)
GetParamDef("is-PhotonRES-Had", fIsPhotonRESHad, false ) ;
GetParamDef("is-PhotonCOH", fIsPhotonCOH, false ) ;
-}
\ No newline at end of file
+}
diff --git a/src/Physics/HELepton/EventGen/PhotonRESGenerator.cxx b/src/Physics/HELepton/EventGen/PhotonRESGenerator.cxx
index 97870ae0a..360de60ce 100644
--- a/src/Physics/HELepton/EventGen/PhotonRESGenerator.cxx
+++ b/src/Physics/HELepton/EventGen/PhotonRESGenerator.cxx
@@ -82,7 +82,7 @@ void PhotonRESGenerator::ProcessEventRecord(GHepRecord * evrec) const
int probepdg = init_state.ProbePdg();
- long double Mtarget = init_state.Tgt().HitNucMass();
+ long double Mtarget = init_state.Tgt().HitPartMass();
long double mlout = interaction->FSPrimLepton()->Mass(); //mass of charged lepton
long double Enuin = init_state.ProbeE(kRfLab);
diff --git a/src/Physics/HELepton/XSection/GLRESPXSec.cxx b/src/Physics/HELepton/XSection/GLRESPXSec.cxx
index a37178434..cf44cff62 100644
--- a/src/Physics/HELepton/XSection/GLRESPXSec.cxx
+++ b/src/Physics/HELepton/XSection/GLRESPXSec.cxx
@@ -129,7 +129,7 @@ bool GLRESPXSec::ValidProcess(const Interaction* interaction) const
const InitialState & init_state = interaction -> InitState();
if(!pdg::IsAntiNuE(init_state.ProbePdg())) return false;
- if(init_state.Tgt().HitNucIsSet()) return false;
+ if(init_state.Tgt().HitPartIsSet()) return false;
return true;
}
@@ -157,4 +157,4 @@ void GLRESPXSec::LoadConfig(void)
GetParam( "Xsec-Wmin", fWmin ) ;
-}
\ No newline at end of file
+}
diff --git a/src/Physics/HELepton/XSection/HELeptonXSec.cxx b/src/Physics/HELepton/XSection/HELeptonXSec.cxx
index a45f2f375..a3f67860c 100644
--- a/src/Physics/HELepton/XSection/HELeptonXSec.cxx
+++ b/src/Physics/HELepton/XSection/HELeptonXSec.cxx
@@ -85,7 +85,7 @@ double HELeptonXSec::Integrate(
target->SetId(kPdgTgtFreeP);
}
else if ( proc_info.IsPhotonResonance() ) {
- int nucpdgc = init_state.Tgt().HitNucPdg();
+ int nucpdgc = init_state.Tgt().HitPartPdg();
if (pdg::IsProton(nucpdgc)) {
NNucl = init_state.Tgt().Z();
target->SetId(kPdgTgtFreeP);
diff --git a/src/Physics/HELepton/XSection/HENuElPXSec.cxx b/src/Physics/HELepton/XSection/HENuElPXSec.cxx
index 711ac89fd..572560b98 100644
--- a/src/Physics/HELepton/XSection/HENuElPXSec.cxx
+++ b/src/Physics/HELepton/XSection/HENuElPXSec.cxx
@@ -134,7 +134,7 @@ bool HENuElPXSec::ValidProcess(const Interaction* interaction) const
if(pdg::IsAntiNuMu(init_state.ProbePdg()) && proc_info.IsWeakCC()) return false;
if(pdg::IsAntiNuTau(init_state.ProbePdg()) && proc_info.IsWeakCC()) return false;
- if(init_state.Tgt().HitNucIsSet()) return false;
+ if(init_state.Tgt().HitPartIsSet()) return false;
return true;
}
@@ -159,4 +159,4 @@ void HENuElPXSec::LoadConfig(void)
fXSecIntegrator = dynamic_cast (this->SubAlg("XSec-Integrator"));
assert(fXSecIntegrator);
-}
\ No newline at end of file
+}
diff --git a/src/Physics/HELepton/XSection/PhotonCOHPXSec.cxx b/src/Physics/HELepton/XSection/PhotonCOHPXSec.cxx
index 9af8a06d3..71854f76c 100644
--- a/src/Physics/HELepton/XSection/PhotonCOHPXSec.cxx
+++ b/src/Physics/HELepton/XSection/PhotonCOHPXSec.cxx
@@ -135,7 +135,7 @@ bool PhotonCOHPXSec::ValidProcess(const Interaction* interaction) const
const InitialState & init_state = interaction -> InitState();
if(!pdg::IsLepton(init_state.ProbePdg())) return false;
- if(init_state.Tgt().HitNucIsSet()) return false;
+ if(init_state.Tgt().HitPartIsSet()) return false;
return true;
}
diff --git a/src/Physics/HELepton/XSection/PhotonRESPXSec.cxx b/src/Physics/HELepton/XSection/PhotonRESPXSec.cxx
index 9fca8747f..5a3984006 100644
--- a/src/Physics/HELepton/XSection/PhotonRESPXSec.cxx
+++ b/src/Physics/HELepton/XSection/PhotonRESPXSec.cxx
@@ -55,11 +55,11 @@ double PhotonRESPXSec::XSec(
int probepdg = init_state.ProbePdg();
int loutpdg = xclstag.FinalLeptonPdg();
- int tgtpdg = init_state.Tgt().HitNucPdg();
+ int tgtpdg = init_state.Tgt().HitPartPdg();
double mlout = interaction->FSPrimLepton()->Mass(); //mass of charged lepton
- double Mnuc = init_state.Tgt().HitNucMass();
+ double Mnuc = init_state.Tgt().HitPartMass();
double Enuin = init_state.ProbeE(kRfLab);
double s = born->GetS(Mnuc,Enuin);
@@ -124,9 +124,9 @@ bool PhotonRESPXSec::ValidProcess(const Interaction* interaction) const
const InitialState & init_state = interaction -> InitState();
if(!pdg::IsLepton(init_state.ProbePdg())) return false;
- if(! init_state.Tgt().HitNucIsSet()) return false;
+ if(! init_state.Tgt().HitPartIsSet()) return false;
- int hitnuc_pdg = init_state.Tgt().HitNucPdg();
+ int hitnuc_pdg = init_state.Tgt().HitPartPdg();
if(!pdg::IsNeutronOrProton(hitnuc_pdg)) return false;
return true;
@@ -159,4 +159,4 @@ void PhotonRESPXSec::LoadConfig(void)
GetParam("Q2Grid-Min", fQ2PDFmin );
GetParam("XGrid-Min", fxPDFmin );
-}
\ No newline at end of file
+}
diff --git a/src/Physics/HadronTransport/HAIntranuke.cxx b/src/Physics/HadronTransport/HAIntranuke.cxx
index b2cd22fc8..e74ccee45 100644
--- a/src/Physics/HadronTransport/HAIntranuke.cxx
+++ b/src/Physics/HadronTransport/HAIntranuke.cxx
@@ -633,7 +633,7 @@ void HAIntranuke::InelasticHA(
// handle fermi momentum
if(fDoFermi)
{
- target.SetHitNucPdg(tcode);
+ target.SetHitPartPdg(tcode);
fNuclmodel->GenerateNucleon(target);
TVector3 tP3 = fFermiFac * fNuclmodel->Momentum3();
double tE = TMath::Sqrt(tP3.Mag2()+ tM*tM);
@@ -867,12 +867,12 @@ void HAIntranuke::Inelastic(
Target target(ev->TargetNucleus()->Pdg());
if(fDoFermi)
{
- target.SetHitNucPdg(t1code);
+ target.SetHitPartPdg(t1code);
fNuclmodel->GenerateNucleon(target);
tP2_1L=fFermiFac * fNuclmodel->Momentum3();
E2_1L = TMath::Sqrt(tP2_1L.Mag2() + M2_1*M2_1);
- target.SetHitNucPdg(t2code);
+ target.SetHitPartPdg(t2code);
fNuclmodel->GenerateNucleon(target);
tP2_2L=fFermiFac * fNuclmodel->Momentum3();
E2_2L = TMath::Sqrt(tP2_2L.Mag2() + M2_2*M2_2);
@@ -1236,7 +1236,7 @@ void HAIntranuke::Inelastic(
vector::const_iterator pdg_iter;
for(pdg_iter=++(listar[i]->begin());pdg_iter!=listar[i]->end();++pdg_iter)
{
- target.SetHitNucPdg(*pdg_iter);
+ target.SetHitPartPdg(*pdg_iter);
fNuclmodel->GenerateNucleon(target);
mBuf = pLib->Find(*pdg_iter)->Mass();
mSum += mBuf;
@@ -1316,7 +1316,7 @@ void HAIntranuke::Inelastic(
vector::const_iterator pdg_iter;
for(pdg_iter=++(list.begin());pdg_iter!=list.end();++pdg_iter)
{
- target.SetHitNucPdg(*pdg_iter);
+ target.SetHitPartPdg(*pdg_iter);
fNuclmodel->GenerateNucleon(target);
mBuf = pLib->Find(*pdg_iter)->Mass();
mSum += mBuf;
diff --git a/src/Physics/HadronTransport/HAIntranuke2018.cxx b/src/Physics/HadronTransport/HAIntranuke2018.cxx
index f5023442e..6a6fa49ff 100644
--- a/src/Physics/HadronTransport/HAIntranuke2018.cxx
+++ b/src/Physics/HadronTransport/HAIntranuke2018.cxx
@@ -644,7 +644,7 @@ void HAIntranuke2018::InelasticHA(
// handle fermi momentum
if(fDoFermi)
{
- target.SetHitNucPdg(tcode);
+ target.SetHitPartPdg(tcode);
fNuclmodel->GenerateNucleon(target);
TVector3 tP3 = fFermiFac * fNuclmodel->Momentum3();
double tE = TMath::Sqrt(tP3.Mag2()+ tM*tM);
@@ -903,13 +903,13 @@ void HAIntranuke2018::Inelastic(
Target target(ev->TargetNucleus()->Pdg());
if(fDoFermi)
{
- target.SetHitNucPdg(t1code);
+ target.SetHitPartPdg(t1code);
fNuclmodel->GenerateNucleon(target);
//LOG("HAIntranuke2018", pNOTICE) << "Nuclmodel= " << fNuclmodel->ModelType(target) ;
tP2_1L=fFermiFac * fNuclmodel->Momentum3();
E2_1L = TMath::Sqrt(tP2_1L.Mag2() + M2_1*M2_1);
- target.SetHitNucPdg(t2code);
+ target.SetHitPartPdg(t2code);
fNuclmodel->GenerateNucleon(target);
tP2_2L=fFermiFac * fNuclmodel->Momentum3();
E2_2L = TMath::Sqrt(tP2_2L.Mag2() + M2_2*M2_2);
@@ -1299,7 +1299,7 @@ void HAIntranuke2018::Inelastic(
vector::const_iterator pdg_iter;
for(pdg_iter=++(listar[i]->begin());pdg_iter!=listar[i]->end();++pdg_iter)
{
- target.SetHitNucPdg(*pdg_iter);
+ target.SetHitPartPdg(*pdg_iter);
fNuclmodel->GenerateNucleon(target);
mBuf = pLib->Find(*pdg_iter)->Mass();
mSum += mBuf;
@@ -1432,7 +1432,7 @@ void HAIntranuke2018::Inelastic(
vector::const_iterator pdg_iter;
for(pdg_iter=++(list.begin());pdg_iter!=list.end();++pdg_iter)
{
- target.SetHitNucPdg(*pdg_iter);
+ target.SetHitPartPdg(*pdg_iter);
fNuclmodel->GenerateNucleon(target);
mBuf = pLib->Find(*pdg_iter)->Mass();
mSum += mBuf;
diff --git a/src/Physics/HadronTransport/HNIntranuke2018.cxx b/src/Physics/HadronTransport/HNIntranuke2018.cxx
index 269f8fc48..3fc3ed302 100644
--- a/src/Physics/HadronTransport/HNIntranuke2018.cxx
+++ b/src/Physics/HadronTransport/HNIntranuke2018.cxx
@@ -484,12 +484,12 @@ void HNIntranuke2018::AbsorbHN(
// handle fermi momentum
if(fDoFermi)
{
- target.SetHitNucPdg(t1code);
+ target.SetHitPartPdg(t1code);
fNuclmodel->GenerateNucleon(target);
tP2_1L=fFermiFac * fNuclmodel->Momentum3();
E2_1L = TMath::Sqrt(tP2_1L.Mag2() + M2_1*M2_1);
- target.SetHitNucPdg(t2code);
+ target.SetHitPartPdg(t2code);
fNuclmodel->GenerateNucleon(target);
tP2_2L=fFermiFac * fNuclmodel->Momentum3();
E2_2L = TMath::Sqrt(tP2_2L.Mag2() + M2_2*M2_2);
@@ -727,7 +727,7 @@ void HNIntranuke2018::ElasHN(
// Handle fermi target
Target target(ev->TargetNucleus()->Pdg());
//LOG("HAIntranuke2018", pNOTICE) << "Nuclmodel= " << fNuclmodel->ModelType(target) ;
- target.SetHitNucPdg(tcode);
+ target.SetHitPartPdg(tcode);
fNuclmodel->GenerateNucleon(target);
TVector3 tP3L = fFermiFac * fNuclmodel->Momentum3();
double tE = TMath::Sqrt(tP3L.Mag2() + Mt*Mt);
@@ -866,7 +866,7 @@ void HNIntranuke2018::GammaInelasticHN(GHepRecord* ev, GHepParticle* p, INukeFat
// Handle fermi target
Target target(ev->TargetNucleus()->Pdg());
- target.SetHitNucPdg(tcode);
+ target.SetHitPartPdg(tcode);
fNuclmodel->GenerateNucleon(target);
TVector3 tP3L = fFermiFac * fNuclmodel->Momentum3();
double tE = TMath::Sqrt(tP3L.Mag2() + Mt*Mt);
diff --git a/src/Physics/HadronTransport/INukeUtils.cxx b/src/Physics/HadronTransport/INukeUtils.cxx
index b68eef5af..ebd5ccbcd 100644
--- a/src/Physics/HadronTransport/INukeUtils.cxx
+++ b/src/Physics/HadronTransport/INukeUtils.cxx
@@ -443,7 +443,7 @@ void genie::utils::intranuke::PreEquilibrium(
vector::const_iterator pdg_iter;
for(pdg_iter=++(list.begin());pdg_iter!=list.end();++pdg_iter)
{
- target.SetHitNucPdg(*pdg_iter);
+ target.SetHitPartPdg(*pdg_iter);
Nuclmodel->GenerateNucleon(target);
mBuf = pLib->Find(*pdg_iter)->Mass();
mSum += mBuf;
@@ -597,7 +597,7 @@ void genie::utils::intranuke::Equilibrium(
vector::const_iterator pdg_iter;
for(pdg_iter=++(list.begin());pdg_iter!=list.end();++pdg_iter)
{
- target.SetHitNucPdg(*pdg_iter);
+ target.SetHitPartPdg(*pdg_iter);
Nuclmodel->GenerateNucleon(target);
mBuf = pLib->Find(*pdg_iter)->Mass();
mSum += mBuf;
@@ -992,7 +992,7 @@ bool genie::utils::intranuke::ThreeBodyKinematics(
// handle fermi momentum
if(DoFermi)
{
- target.SetHitNucPdg(tcode);
+ target.SetHitPartPdg(tcode);
Nuclmodel->GenerateNucleon(target);
tP2L = FermiFac * Nuclmodel->Momentum3();
P2L = tP2L.Mag();
diff --git a/src/Physics/HadronTransport/INukeUtils2018.cxx b/src/Physics/HadronTransport/INukeUtils2018.cxx
index 12b9df456..a5b2de887 100644
--- a/src/Physics/HadronTransport/INukeUtils2018.cxx
+++ b/src/Physics/HadronTransport/INukeUtils2018.cxx
@@ -542,7 +542,7 @@ void genie::utils::intranuke2018::PreEquilibrium(
vector::const_iterator pdg_iter;
for(pdg_iter=++(list.begin());pdg_iter!=list.end();++pdg_iter)
{
- target.SetHitNucPdg(*pdg_iter);
+ target.SetHitPartPdg(*pdg_iter);
Nuclmodel->GenerateNucleon(target);
mBuf = pLib->Find(*pdg_iter)->Mass();
mSum += mBuf;
@@ -699,7 +699,7 @@ void genie::utils::intranuke2018::Equilibrium(
vector::const_iterator pdg_iter;
for(pdg_iter=++(list.begin());pdg_iter!=list.end();++pdg_iter)
{
- target.SetHitNucPdg(*pdg_iter);
+ target.SetHitPartPdg(*pdg_iter);
Nuclmodel->GenerateNucleon(target);
mBuf = pLib->Find(*pdg_iter)->Mass();
mSum += mBuf;
@@ -1115,7 +1115,7 @@ bool genie::utils::intranuke2018::ThreeBodyKinematics(
// handle fermi momentum
if(DoFermi)
{
- target.SetHitNucPdg(tcode);
+ target.SetHitPartPdg(tcode);
Nuclmodel->GenerateNucleon(target);
tP2L = FermiFac * Nuclmodel->Momentum3();
P2L = tP2L.Mag();
diff --git a/src/Physics/Hadronization/AGCharm2019.cxx b/src/Physics/Hadronization/AGCharm2019.cxx
index 4f78055b2..5e7f96117 100644
--- a/src/Physics/Hadronization/AGCharm2019.cxx
+++ b/src/Physics/Hadronization/AGCharm2019.cxx
@@ -197,7 +197,7 @@ TClonesArray * AGCharm2019::Hadronize(
LOG("CharmHad", pNOTICE) << "Ehad (LAB) = " << Eh << ", W = " << W;
int nu_pdg = init_state.ProbePdg();
- int nuc_pdg = target.HitNucPdg();
+ int nuc_pdg = target.HitPartPdg();
//int qpdg = target.HitQrkPdg();
//bool sea = target.HitSeaQrk();
bool isp = pdg::IsProton (nuc_pdg);
diff --git a/src/Physics/Hadronization/AGKYLowW2019.cxx b/src/Physics/Hadronization/AGKYLowW2019.cxx
index cc7d2a0bc..1e4b2670b 100644
--- a/src/Physics/Hadronization/AGKYLowW2019.cxx
+++ b/src/Physics/Hadronization/AGKYLowW2019.cxx
@@ -390,7 +390,7 @@ TH1D * AGKYLowW2019::MultiplicityProb(
const InitialState & init_state = interaction->InitState();
int nu_pdg = init_state.ProbePdg();
- int nuc_pdg = init_state.Tgt().HitNucPdg();
+ int nuc_pdg = init_state.Tgt().HitPartPdg();
// Compute the average charged hadron multiplicity as: = a + b*ln(W^2)
// Calculate avergage hadron multiplicity (= 1.5 x charged hadron mult.)
@@ -724,7 +724,7 @@ int AGKYLowW2019::HadronShowerCharge(const Interaction* interaction) const
// get the initial state, ask for the hit-nucleon and get
// its charge ( = initial state charge for vN interactions)
const InitialState & init_state = interaction->InitState();
- int hit_nucleon = init_state.Tgt().HitNucPdg();
+ int hit_nucleon = init_state.Tgt().HitPartPdg();
assert( pdg::IsProton(hit_nucleon) || pdg::IsNeutron(hit_nucleon) );
@@ -1584,7 +1584,7 @@ void AGKYLowW2019::ApplyRijk( const Interaction * interaction,
const InitialState & init_state = interaction->InitState();
int probe_pdg = init_state.ProbePdg();
- int nuc_pdg = init_state.Tgt().HitNucPdg();
+ int nuc_pdg = init_state.Tgt().HitPartPdg();
const ProcessInfo & proc_info = interaction->ProcInfo();
bool is_CC = proc_info.IsWeakCC();
diff --git a/src/Physics/Hadronization/LeptoHadronization.cxx b/src/Physics/Hadronization/LeptoHadronization.cxx
index 3063d9555..1aff0fdc5 100644
--- a/src/Physics/Hadronization/LeptoHadronization.cxx
+++ b/src/Physics/Hadronization/LeptoHadronization.cxx
@@ -143,11 +143,11 @@ bool LeptoHadronization::Hadronize(GHepRecord *
assert(target.HitQrkIsSet());
- bool isp = pdg::IsProton(target.HitNucPdg());
+ bool isp = pdg::IsProton(target.HitPartPdg());
int hit_quark = target.HitQrkPdg();
int frag_quark = xclstag.FinalQuarkPdg();
- LOG("LeptoHad", pDEBUG) << "Hit nucleon pdgc = " << target.HitNucPdg() << ", W = " << W;
+ LOG("LeptoHad", pDEBUG) << "Hit nucleon pdgc = " << target.HitPartPdg() << ", W = " << W;
LOG("LeptoHad", pDEBUG) << "Selected hit quark pdgc = " << hit_quark << " // Fragmentation quark = " << frag_quark;
RandomGen * rnd = RandomGen::Instance();
diff --git a/src/Physics/Hadronization/PythiaBaseHadro2019.cxx b/src/Physics/Hadronization/PythiaBaseHadro2019.cxx
index 224692166..065e3e11a 100644
--- a/src/Physics/Hadronization/PythiaBaseHadro2019.cxx
+++ b/src/Physics/Hadronization/PythiaBaseHadro2019.cxx
@@ -109,7 +109,7 @@ void PythiaBaseHadro2019::MakeQuarkDiquarkAssignments(
double W = kinematics.W();
int probe = init_state.ProbePdg();
- int hit_nucleon = target.HitNucPdg();
+ int hit_nucleon = target.HitPartPdg();
int hit_quark = target.HitQrkPdg();
bool from_sea = target.HitSeaQrk();
@@ -300,7 +300,7 @@ bool PythiaBaseHadro2019::AssertValidity(const Interaction * interaction) const
}
int probe = init_state.ProbePdg();
- int hit_nucleon = target.HitNucPdg();
+ int hit_nucleon = target.HitPartPdg();
int hit_quark = target.HitQrkPdg();
//bool from_sea = target.HitSeaQrk();
diff --git a/src/Physics/InverseBetaDecay/EventGen/IBDKinematicsGenerator.cxx b/src/Physics/InverseBetaDecay/EventGen/IBDKinematicsGenerator.cxx
index 2f6b80d6e..300d6b4d6 100644
--- a/src/Physics/InverseBetaDecay/EventGen/IBDKinematicsGenerator.cxx
+++ b/src/Physics/InverseBetaDecay/EventGen/IBDKinematicsGenerator.cxx
@@ -163,7 +163,7 @@ void IBDKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
// struck nucleon mass (can be off the mass shell)
const InitialState & init_state = interaction->InitState();
const double E = init_state.ProbeE(kRfHitNucRest);
- const double M = init_state.Tgt().HitNucP4().M();
+ const double M = init_state.Tgt().HitPartP4().M();
LOG("IBD", pNOTICE) << "E = " << E << ", M = "<< M;
diff --git a/src/Physics/Multinucleon/EventGen/MECGenerator.cxx b/src/Physics/Multinucleon/EventGen/MECGenerator.cxx
index d6d9ca9b9..20427d2ba 100644
--- a/src/Physics/Multinucleon/EventGen/MECGenerator.cxx
+++ b/src/Physics/Multinucleon/EventGen/MECGenerator.cxx
@@ -181,10 +181,10 @@ void MECGenerator::GenerateFermiMomentum(GHepRecord * event) const
Target tgt(target_nucleus->Pdg());
PDGCodeList pdgv = this->NucleonClusterConstituents(nucleon_cluster->Pdg());
assert(pdgv.size()==2);
- tgt.SetHitNucPdg(pdgv[0]);
+ tgt.SetHitPartPdg(pdgv[0]);
fNuclModel->GenerateNucleon(tgt);
TVector3 p3a = fNuclModel->Momentum3();
- tgt.SetHitNucPdg(pdgv[1]);
+ tgt.SetHitPartPdg(pdgv[1]);
fNuclModel->GenerateNucleon(tgt);
TVector3 p3b = fNuclModel->Momentum3();
@@ -225,7 +225,7 @@ void MECGenerator::GenerateFermiMomentum(GHepRecord * event) const
// set the nucleon cluster 4-momentum at the interaction summary
- event->Summary()->InitStatePtr()->TgtPtr()->SetHitNucP4(p4nclust);
+ event->Summary()->InitStatePtr()->TgtPtr()->SetHitPartP4(p4nclust);
}
//___________________________________________________________________________
void MECGenerator::SelectEmpiricalKinematics(GHepRecord * event) const
@@ -305,7 +305,7 @@ void MECGenerator::SelectEmpiricalKinematics(GHepRecord * event) const
double gx = 0;
double gy = 0;
// More accurate calculation of the mass of the cluster than 2*Mnucl
- int nucleon_cluster_pdg = interaction->InitState().Tgt().HitNucPdg();
+ int nucleon_cluster_pdg = interaction->InitState().Tgt().HitPartPdg();
double M2n = PDGLibrary::Instance()->Find(nucleon_cluster_pdg)->Mass();
//bool is_em = interaction->ProcInfo().IsEM();
kinematics::WQ2toXY(Ev,M2n,gW,gQ2,gx,gy);
@@ -332,7 +332,7 @@ void MECGenerator::AddFinalStateLepton(GHepRecord * event) const
// The boost back to the lab frame was missing, that is included now with the introduction of the beta factor
const InitialState & init_state = interaction->InitState();
- const TLorentzVector & pnuc4 = init_state.Tgt().HitNucP4(); //[@LAB]
+ const TLorentzVector & pnuc4 = init_state.Tgt().HitPartP4(); //[@LAB]
TVector3 beta = pnuc4.BoostVector();
// Boosting the incoming neutrino to the NN-cluster rest frame
@@ -703,17 +703,17 @@ void MECGenerator::SelectNSVLeptonKinematics (GHepRecord * event) const
// first, get delta-less all
if (NuPDG > 0) {
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(kPdgClusterNN);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgClusterNN);
}
else {
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(kPdgClusterPP);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgClusterPP);
}
double XSec = fXSecModel->XSec(interaction, kPSTlctl);
// now get all with delta
interaction->ExclTagPtr()->SetResonance(genie::kP33_1232);
double XSecDelta = fXSecModel->XSec(interaction, kPSTlctl);
// get PN with delta
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(kPdgClusterNP);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgClusterNP);
double XSecDeltaPN = fXSecModel->XSec(interaction, kPSTlctl);
// now get delta-less PN
interaction->ExclTagPtr()->SetResonance(genie::kNoResonance);
@@ -751,7 +751,7 @@ void MECGenerator::SelectNSVLeptonKinematics (GHepRecord * event) const
// yes it is, add a PN initial state to event record
event->AddParticle(kPdgClusterNP, kIStNucleonTarget,
1, -1, -1, -1, tempp4, v4);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(kPdgClusterNP);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgClusterNP);
// Its a pn, so test for Delta by comparing DeltaPN/PN
if (rnd->RndKine().Rndm() <= XSecDeltaPN / XSecPN) {
@@ -763,12 +763,12 @@ void MECGenerator::SelectNSVLeptonKinematics (GHepRecord * event) const
if (NuPDG > 0) {
event->AddParticle(kPdgClusterNN, kIStNucleonTarget,
1, -1, -1, -1, tempp4, v4);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(kPdgClusterNN);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgClusterNN);
}
else {
event->AddParticle(kPdgClusterPP, kIStNucleonTarget,
1, -1, -1, -1, tempp4, v4);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(kPdgClusterPP);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgClusterPP);
}
// its not pn, so test for Delta (XSecDelta-XSecDeltaPN)/(XSec-XSecPN)
// right, both numerator and denominator are total not pn.
@@ -1037,7 +1037,7 @@ void MECGenerator::SelectSuSALeptonKinematics(GHepRecord* event) const
// yes it is, add a PN initial state to event record
event->AddParticle(kPdgClusterNP, kIStNucleonTarget,
1, -1, -1, -1, tempp4, v4);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg( kPdgClusterNP );
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg( kPdgClusterNP );
}
else {
// no it is not a PN, add either NN or PP initial state to event record (EM case).
@@ -1046,24 +1046,24 @@ void MECGenerator::SelectSuSALeptonKinematics(GHepRecord* event) const
// record a PP pair:
event->AddParticle(kPdgClusterPP, kIStNucleonTarget,
1, -1, -1, -1, tempp4, v4);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg( kPdgClusterPP );
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg( kPdgClusterPP );
} else {
// record a NN pair:
event->AddParticle(kPdgClusterNN, kIStNucleonTarget,
1, -1, -1, -1, tempp4, v4);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg( kPdgClusterNN );
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg( kPdgClusterNN );
}
} else {
// no it is not a PN, add either NN or PP initial state to event record (CC cases).
if ( NuPDG > 0 ) {
event->AddParticle(kPdgClusterNN, kIStNucleonTarget,
1, -1, -1, -1, tempp4, v4);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg( kPdgClusterNN );
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg( kPdgClusterNN );
}
else {
event->AddParticle(kPdgClusterPP, kIStNucleonTarget,
1, -1, -1, -1, tempp4, v4);
- interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg( kPdgClusterPP );
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg( kPdgClusterPP );
}
}
}
@@ -1235,11 +1235,11 @@ void MECGenerator::GenerateNSVInitialHadrons(GHepRecord * event) const
// Nieves et al. would use a local Fermi gas here, not this, but ok.
// so momentum from global Fermi gas, local Fermi gas, or spectral function
// and removal energy ~0.025 GeV, correlated with density, or from SF distribution
- tgt.SetHitNucPdg(pdgv[0]);
+ tgt.SetHitPartPdg(pdgv[0]);
fNuclModel->GenerateNucleon(tgt);
p31i = fNuclModel->Momentum3();
removalenergy1 = fNuclModel->RemovalEnergy();
- tgt.SetHitNucPdg(pdgv[1]);
+ tgt.SetHitPartPdg(pdgv[1]);
fNuclModel->GenerateNucleon(tgt);
p32i = fNuclModel->Momentum3();
removalenergy2 = fNuclModel->RemovalEnergy();
diff --git a/src/Physics/Multinucleon/XSection/EmpiricalMECPXSec2015.cxx b/src/Physics/Multinucleon/XSection/EmpiricalMECPXSec2015.cxx
index e336645f4..0530be497 100644
--- a/src/Physics/Multinucleon/XSection/EmpiricalMECPXSec2015.cxx
+++ b/src/Physics/Multinucleon/XSection/EmpiricalMECPXSec2015.cxx
@@ -69,7 +69,7 @@ double EmpiricalMECPXSec2015::XSec(
double pv = std::sqrt( std::max(0., Ev*Ev - mv*mv) );
// Invariant mass of the initial hit nucleon
- const TLorentzVector& hit_nuc_P4 = init_state.Tgt().HitNucP4();
+ const TLorentzVector& hit_nuc_P4 = init_state.Tgt().HitPartP4();
double M = hit_nuc_P4.M();
// Outgoing lepton mass
@@ -112,7 +112,7 @@ double EmpiricalMECPXSec2015::XSec(
// Do a check whether W,Q2 is allowed. Return 0 otherwise.
//
double Ev = interaction->InitState().ProbeE(kRfHitNucRest); // kRfLab
- int nucleon_cluster_pdg = interaction->InitState().Tgt().HitNucPdg();
+ int nucleon_cluster_pdg = interaction->InitState().Tgt().HitPartPdg();
double M2n = PDGLibrary::Instance()->Find(nucleon_cluster_pdg)-> Mass(); // nucleon cluster mass
double M2n2 = M2n*M2n;
double ml = interaction->FSPrimLepton()->Mass();
@@ -225,7 +225,7 @@ double EmpiricalMECPXSec2015::Integral(const Interaction * interaction) const
int nupdg = interaction->InitState().ProbePdg();
int tgtpdg = interaction->InitState().Tgt().Pdg();
double E = interaction->InitState().ProbeE(kRfLab);
- int nucleon_cluster_pdg = interaction->InitState().Tgt().HitNucPdg();
+ int nucleon_cluster_pdg = interaction->InitState().Tgt().HitPartPdg();
double Z=interaction->InitState().Tgt().Z();
double A=interaction->InitState().Tgt().A();
double N=A-Z;
diff --git a/src/Physics/Multinucleon/XSection/NievesSimoVacasMECPXSec2016.cxx b/src/Physics/Multinucleon/XSection/NievesSimoVacasMECPXSec2016.cxx
index 7c1b2d904..69fc43bb6 100644
--- a/src/Physics/Multinucleon/XSection/NievesSimoVacasMECPXSec2016.cxx
+++ b/src/Physics/Multinucleon/XSection/NievesSimoVacasMECPXSec2016.cxx
@@ -64,7 +64,7 @@ double NievesSimoVacasMECPXSec2016::XSec(
double pv = std::sqrt( std::max(0., Ev*Ev - mv*mv) );
// Invariant mass of the initial hit nucleon
- const TLorentzVector& hit_nuc_P4 = init_state.Tgt().HitNucP4();
+ const TLorentzVector& hit_nuc_P4 = init_state.Tgt().HitPartP4();
double M = hit_nuc_P4.M();
// Get the outgoing lepton kinetic energy
@@ -211,7 +211,7 @@ double NievesSimoVacasMECPXSec2016::XSec(
// Delta decay). If a {p,n} hit dinucleon was set we will calculate the
// cross-section for that component only (either full or PDD cross-section)
bool delta = interaction->ExclTag().KnownResonance();
- bool pn = (interaction->InitState().Tgt().HitNucPdg() == kPdgClusterNP);
+ bool pn = (interaction->InitState().Tgt().HitPartPdg() == kPdgClusterNP);
double xsec_all = 0.;
double xsec_pn = 0.;
diff --git a/src/Physics/Multinucleon/XSection/SuSAv2MECPXSec.cxx b/src/Physics/Multinucleon/XSection/SuSAv2MECPXSec.cxx
index 180a4bf8a..da7d0c333 100644
--- a/src/Physics/Multinucleon/XSection/SuSAv2MECPXSec.cxx
+++ b/src/Physics/Multinucleon/XSection/SuSAv2MECPXSec.cxx
@@ -128,7 +128,7 @@ double SuSAv2MECPXSec::XSec(const Interaction* interaction,
// dinucleon was set we will calculate the cross-section for that
// component only
- bool pn = (interaction->InitState().Tgt().HitNucPdg() == kPdgClusterNP);
+ bool pn = (interaction->InitState().Tgt().HitPartPdg() == kPdgClusterNP);
// Compute the cross section using the hadron tensor
double xsec = tensor->dSigma_dT_dCosTheta_rosenbluth(interaction, Delta_Q_value);
diff --git a/src/Physics/NNBarOscillation/NNBarOscPrimaryVtxGenerator.cxx b/src/Physics/NNBarOscillation/NNBarOscPrimaryVtxGenerator.cxx
index e2cd34bd5..ccf29aa51 100644
--- a/src/Physics/NNBarOscillation/NNBarOscPrimaryVtxGenerator.cxx
+++ b/src/Physics/NNBarOscillation/NNBarOscPrimaryVtxGenerator.cxx
@@ -218,7 +218,7 @@ void NNBarOscPrimaryVtxGenerator::GenerateFermiMomentum(
Target tgt(initial_nucleus->Pdg());
// start with oscillating neutron
- tgt.SetHitNucPdg(kPdgNeutron);
+ tgt.SetHitPartPdg(kPdgNeutron);
// generate nuclear model & fermi momentum
fNuclModel->GenerateNucleon(tgt);
TVector3 p3 = fNuclModel->Momentum3();
@@ -237,7 +237,7 @@ void NNBarOscPrimaryVtxGenerator::GenerateFermiMomentum(
<< "|p| = " << p3.Mag();
// then rinse repeat for the annihilation nucleon
- tgt.SetHitNucPdg(annihilation_nucleon->Pdg());
+ tgt.SetHitPartPdg(annihilation_nucleon->Pdg());
// use nuclear model to generate fermi momentum
fNuclModel->GenerateNucleon(tgt);
p3 = fNuclModel->Momentum3();
@@ -303,7 +303,7 @@ void NNBarOscPrimaryVtxGenerator::GenerateDecayProducts(
assert(annihilation_nucleon);
Target tgt(initial_nucleus->Pdg());
- tgt.SetHitNucPdg(kPdgNeutron);
+ tgt.SetHitPartPdg(kPdgNeutron);
// get their momentum 4-vectors and boost into rest frame
TLorentzVector * p4_1 = oscillating_neutron->GetP4();
diff --git a/src/Physics/NuElectron/EventGen/NuEInteractionListGenerator.cxx b/src/Physics/NuElectron/EventGen/NuEInteractionListGenerator.cxx
index 524d1c689..6a3b32613 100644
--- a/src/Physics/NuElectron/EventGen/NuEInteractionListGenerator.cxx
+++ b/src/Physics/NuElectron/EventGen/NuEInteractionListGenerator.cxx
@@ -61,10 +61,11 @@ InteractionList * NuEInteractionListGenerator::IMDInteractionList(
// clone init state and de-activate the struck nucleon info
InitialState init(init_state);
- init_state.TgtPtr()->SetHitNucPdg(0);
+ init_state.TgtPtr()->SetHitPartPdg(kPdgElectron);
ProcessInfo proc_info(kScInverseMuDecay, kIntWeakCC);
Interaction * interaction = new Interaction(init, proc_info);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgElectron);
intlist->push_back(interaction);
@@ -87,10 +88,11 @@ InteractionList * NuEInteractionListGenerator::IMDAnnihilationInteractionList(
// clone init state and de-activate the struck nucleon info
InitialState init(init_state);
- init_state.TgtPtr()->SetHitNucPdg(0);
+ init_state.TgtPtr()->SetHitPartPdg(kPdgElectron);
ProcessInfo proc_info(kScIMDAnnihilation, kIntWeakCC);
Interaction * interaction = new Interaction(init, proc_info);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgElectron);
intlist->push_back(interaction);
@@ -115,13 +117,13 @@ InteractionList * NuEInteractionListGenerator::NuEELInteractionList(
// clone init state and de-activate the struck nucleon info
InitialState init(init_state);
- init_state.TgtPtr()->SetHitNucPdg(0);
// NC
if(nupdg == kPdgNuMu || nupdg == kPdgAntiNuMu ||
nupdg == kPdgNuTau || nupdg == kPdgAntiNuTau) {
ProcessInfo proc_info(kScNuElectronElastic, kIntWeakNC);
Interaction * interaction = new Interaction(init, proc_info);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgElectron);
intlist->push_back(interaction);
}
@@ -129,6 +131,7 @@ InteractionList * NuEInteractionListGenerator::NuEELInteractionList(
if(nupdg == kPdgNuE || nupdg == kPdgAntiNuE) {
ProcessInfo proc_info(kScNuElectronElastic, kIntWeakMix);
Interaction * interaction = new Interaction(init, proc_info);
+ interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgElectron);
intlist->push_back(interaction);
}
diff --git a/src/Physics/NuElectron/EventGen/NuEKinematicsGenerator.cxx b/src/Physics/NuElectron/EventGen/NuEKinematicsGenerator.cxx
index cc9b4eb56..2e38ee02c 100644
--- a/src/Physics/NuElectron/EventGen/NuEKinematicsGenerator.cxx
+++ b/src/Physics/NuElectron/EventGen/NuEKinematicsGenerator.cxx
@@ -5,6 +5,10 @@
Costas Andreopoulos
University of Liverpool & STFC Rutherford Appleton Laboratory
+
+ Changes required to calculate energy in electron rest frame
+ were installed by Brinden Carlson (Univ. of Florida)
+
*/
//____________________________________________________________________________
@@ -58,6 +62,17 @@ void NuEKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
const EventGeneratorI * evg = rtinfo->RunningThread();
fXSecModel = evg->CrossSectionAlg();
+ //Check if kinematics is still valid
+ //CM energy may have dropped below threshold due to initial state electron velocity
+ if(!fXSecModel->ValidKinematics(evrec->Summary())) {
+ LOG("NuEKinematics", pWARN)
+ << "The current kinematics configuration is unphysical";
+ genie::exceptions::EVGThreadException exception;
+ exception.SetReason("Event below threshold");
+ exception.SwitchOnStepBack();
+ throw exception;
+ }
+
//-- For the subsequent kinematic selection with the rejection method:
// Calculate the max differential cross section or retrieve it from the
// cache. Throw an exception and quit the evg thread if a non-positive
@@ -210,10 +225,10 @@ double NuEKinematicsGenerator::ComputeMaxXSec(
double NuEKinematicsGenerator::Energy(const Interaction * interaction) const
{
// Override the base class Energy() method to cache the max xsec for the
-// neutrino energy in the LAB rather than in the hit nucleon rest frame.
+// neutrino energy in the electron rest frame.
const InitialState & init_state = interaction->InitState();
- double E = init_state.ProbeE(kRfLab);
+ double E = init_state.ProbeE(kRfHitElRest);
return E;
}
//___________________________________________________________________________
diff --git a/src/Physics/NuElectron/EventGen/NuEPrimaryLeptonGenerator.cxx b/src/Physics/NuElectron/EventGen/NuEPrimaryLeptonGenerator.cxx
index d7a0336f8..f822d66db 100644
--- a/src/Physics/NuElectron/EventGen/NuEPrimaryLeptonGenerator.cxx
+++ b/src/Physics/NuElectron/EventGen/NuEPrimaryLeptonGenerator.cxx
@@ -5,6 +5,9 @@
Costas Andreopoulos
University of Liverpool & STFC Rutherford Appleton Laboratory
+
+ Changes required to boost from electron rest frame to lab frame
+ were installed by Brinden Carlson (Univ. of Florida)
*/
//____________________________________________________________________________
@@ -47,7 +50,14 @@ void NuEPrimaryLeptonGenerator::ProcessEventRecord(GHepRecord * evrec) const
// This method generates the final state primary lepton for NuE events
Interaction * interaction = evrec->Summary();
- const InitialState & init_state = interaction->InitState();
+
+ // Boost vector for [LAB] <-> [Electron Rest Frame] transforms
+ TVector3 beta = this->EleRestFrame2Lab(*evrec); // Get boost of hit
+
+ // Neutrino 4p
+ TLorentzVector p4v(*evrec->Probe()->GetP4()); // v 4p @ LAB
+ p4v.Boost(-1.*beta);
+
// Get selected kinematics
double y = interaction->Kine().y(true);
@@ -58,7 +68,7 @@ void NuEPrimaryLeptonGenerator::ProcessEventRecord(GHepRecord * evrec) const
assert(pdgc!=0);
// Compute the neutrino and muon energy
- double Ev = init_state.ProbeE(kRfLab);
+ double Ev = p4v.E();
double El = (1-y)*Ev;
LOG("LeptonicVertex", pINFO)
@@ -109,8 +119,9 @@ void NuEPrimaryLeptonGenerator::ProcessEventRecord(GHepRecord * evrec) const
TVector3 p3l(pltx,plty,plp);
p3l.RotateUz(unit_nudir);
- // Lepton 4-momentum in the LAB
+ // Lepton 4-momentum in the Ele rest frame
TLorentzVector p4l(p3l,El);
+ p4l.Boost(beta); //Boost back to lab
// Create a GHepParticle and add it to the event record
this->AddToEventRecord(evrec, pdgc, p4l);
@@ -119,3 +130,17 @@ void NuEPrimaryLeptonGenerator::ProcessEventRecord(GHepRecord * evrec) const
this->SetPolarization(evrec);
}
//___________________________________________________________________________
+TVector3 NuEPrimaryLeptonGenerator::EleRestFrame2Lab(const GHepRecord & evrec) const
+{
+// Velocity for an active Lorentz transform taking the final state primary
+// lepton from the [electron rest frame] --> [LAB]
+
+ Interaction * interaction = evrec.Summary();
+ const InitialState & init_state = interaction->InitState();
+
+ const TLorentzVector & pele4 = init_state.Tgt().HitPartP4(); //[@LAB]
+ TVector3 beta = pele4.BoostVector();
+
+ return beta;
+}
+//___________________________________________________________________________
diff --git a/src/Physics/NuElectron/EventGen/NuEPrimaryLeptonGenerator.h b/src/Physics/NuElectron/EventGen/NuEPrimaryLeptonGenerator.h
index bd0818d03..0f0ceaefc 100644
--- a/src/Physics/NuElectron/EventGen/NuEPrimaryLeptonGenerator.h
+++ b/src/Physics/NuElectron/EventGen/NuEPrimaryLeptonGenerator.h
@@ -32,6 +32,8 @@ public :
//-- implement the EventRecordVisitorI interface
void ProcessEventRecord(GHepRecord * event_rec) const;
+
+ TVector3 EleRestFrame2Lab (const GHepRecord & evrec) const;
};
} // genie namespace
diff --git a/src/Physics/NuElectron/XSection/BardinIMDRadCorPXSec.cxx b/src/Physics/NuElectron/XSection/BardinIMDRadCorPXSec.cxx
index cad76e740..e5a115075 100644
--- a/src/Physics/NuElectron/XSection/BardinIMDRadCorPXSec.cxx
+++ b/src/Physics/NuElectron/XSection/BardinIMDRadCorPXSec.cxx
@@ -11,7 +11,6 @@
#include
#include