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
+ genie::PXSecOnElectron/Default
+ genie::PXSecOnElectron/Default
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 d1a418a16..a05f75856 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::VertexGenerator/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..911aa0130 100644
--- a/config/G00_00a/EventGenerator.xml
+++ b/config/G00_00a/EventGenerator.xml
@@ -322,14 +322,15 @@ XSecModel alg Yes Cross section model used at the thread
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
+ genie::PXSecOnElectron/Default
+ genie::PXSecOnElectron/Default
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 52b6ff705..a1d0be951 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..a4f191b06 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 genie::PXSecOnElectron/Default
+NuE-XSecRelError double No genie::PXSecOnElectron/Default
....................................................................................
-->
WeakInt
-
- genie::NuElectronXSec/Default
+ genie::XSecOnElectron/Default
+ genie::ElectronVelocityMap/Default
+ genie::PXSecOnElectron/Default
+ genie::PXSecOnElectron/Default
diff --git a/config/PXSecOnElectron.xml b/config/PXSecOnElectron.xml
new file mode 100644
index 000000000..d533c4aaf
--- /dev/null
+++ b/config/PXSecOnElectron.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+ 10000
+ 0.0001
+ genie::ElectronVelocityMap/Default
+ genie::NuElectronXSec/Default
+
+
+
+
+
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/NuElectronXSec.xml b/config/XSecOnElectron.xml
similarity index 92%
rename from config/NuElectronXSec.xml
rename to config/XSecOnElectron.xml
index 9c30e669a..0104db344 100644
--- a/config/NuElectronXSec.xml
+++ b/config/XSecOnElectron.xml
@@ -3,7 +3,7 @@
EventGenerator.xml
FermiMover.xml
+ Default.xml
+ BohrElectronVelocity.xml
+ StaticElectronVelocity.xml
HadronTransporter.xml
HAIntranuke.xml
HAIntranuke2018.xml
@@ -160,7 +163,6 @@
CEvNSXSec.xml
DFRXSec.xml
AlamSimoAtharVacasSKXSec.xml
- IMDXSec.xml
RESXSec.xml
MECXSec.xml
NuElectronXSec.xml
@@ -198,6 +200,7 @@
KLVOxygenIBDPXSec.xml
PattonCEvNSPXSec.xml
NuElectronPXSec.xml
+ PXSecOnElectron.xml
DMElectronPXSec.xml
GLRESPXSec.xml
HENuElPXSec.xml
diff --git a/src/Framework/Interaction/InitialState.cxx b/src/Framework/Interaction/InitialState.cxx
index b74b5ef75..ea96385ba 100644
--- a/src/Framework/Interaction/InitialState.cxx
+++ b/src/Framework/Interaction/InitialState.cxx
@@ -11,6 +11,9 @@
CMEnergy() method added by Andy Furmanski (Univ. of Manchester)
and Joe Johnston (Univ of Pittsburgh)
+
+ Modified GetProbeP4 and GetTargetP4 to boost to electron rest frame
+ Brinden Carlson (University of Florida)
*/
//____________________________________________________________________________
@@ -316,6 +319,20 @@ TLorentzVector * InitialState::GetTgtP4(RefFrame_t ref_frame) const
return p4;
break;
}
+ //------------------ STRUCK ELECTRON REST FRAME:
+ case (kRfHitElRest) :
+ {
+ // make sure that 'struck electron' properties were set in
+ // the electron target object
+ if (!fTgt->HitEleIsSet()){
+ return nullptr;
+ }
+ double inv_mass = fTgt->HitEleP4Ptr()->Mag();
+ TLorentzVector * p4;
+ p4->SetVectM(TVector3(),inv_mass);
+ return p4;
+ break;
+ }
default:
LOG("Interaction", pERROR) << "Uknown reference frame";
}
@@ -374,6 +391,23 @@ TLorentzVector * InitialState::GetProbeP4(RefFrame_t ref_frame) const
break;
}
+ //----------------- STRUCK ELECTRON REST FRAME
+ case (kRfHitElRest) :
+ {
+ //Ensure target is electron
+ if (fTgt->HitEleP4Ptr() == 0){
+ return nullptr;
+ }
+ TLorentzVector * pele4 = fTgt->HitEleP4Ptr();
+
+ // 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";
diff --git a/src/Framework/Interaction/Target.cxx b/src/Framework/Interaction/Target.cxx
index e999998eb..bcd862218 100644
--- a/src/Framework/Interaction/Target.cxx
+++ b/src/Framework/Interaction/Target.cxx
@@ -5,6 +5,9 @@
Costas Andreopoulos
University of Liverpool & STFC Rutherford Appleton Laboratory
+
+ Changes required to implement the Electron Velocity module
+ were installed by Brinden Carlson (Univ. of Florida)
*/
//____________________________________________________________________________
@@ -80,7 +83,8 @@ fA(0),
fTgtPDG(0),
fHitNucPDG(0),
fHitSeaQrk(false),
-fHitNucP4(0)
+fHitNucP4(0),
+fHitEleP4(0)
{
}
@@ -105,12 +109,14 @@ void Target::Init(void)
fHitQrkPDG = 0;
fHitSeaQrk = false;
fHitNucP4 = new TLorentzVector(0,0,0,kNucleonMass);
+ fHitEleP4 = new TLorentzVector(0,0,0,kElectronMass);
fHitNucRad = 0.;
}
//___________________________________________________________________________
void Target::CleanUp(void)
{
delete fHitNucP4;
+ delete fHitEleP4;
}
//___________________________________________________________________________
void Target::Copy(const Target & tgt)
@@ -144,6 +150,10 @@ void Target::Copy(const Target & tgt)
// a nucleon (p or n) or a di-nucleon cluster (p+p, p+n, n+n)
this->ForceHitNucValidity();
}
+ if (tgt.fHitNucPDG == 0 && tgt.fHitQrkPDG == 0 && tgt.fHitSeaQrk == 0){ //No interaction with nucleus -> interaction with electron
+ const TLorentzVector& p4 = *(tgt.fHitEleP4);
+ *fHitEleP4 = *tgt.fHitEleP4 ;
+ }
}
//___________________________________________________________________________
void Target::SetId(int pdgc)
@@ -192,6 +202,12 @@ void Target::SetHitNucP4(const TLorentzVector & p4)
fHitNucP4 = new TLorentzVector(p4);
}
//___________________________________________________________________________
+void Target::SetHitEleP4(const TLorentzVector & p4)
+{
+ if(fHitEleP4) delete fHitEleP4;
+ fHitEleP4 = new TLorentzVector(p4);
+}
+//___________________________________________________________________________
void Target::SetHitSeaQrk(bool tf)
{
fHitSeaQrk = tf;
@@ -254,6 +270,15 @@ TLorentzVector * Target::HitNucP4Ptr(void) const
return fHitNucP4;
}
//___________________________________________________________________________
+TLorentzVector * Target::HitEleP4Ptr(void) const
+{
+ if(!fHitEleP4) {
+ LOG("Target", pWARN) << "Returning NULL struck electron 4-momentum";
+ return 0;
+ }
+ return fHitEleP4;
+}
+//___________________________________________________________________________
bool Target::IsFreeNucleon(void) const
{
return (fA == 1 && (fZ == 0 || fZ == 1));
@@ -264,6 +289,11 @@ bool Target::IsProton(void) const
return (fA == 1 && fZ == 1);
}
//___________________________________________________________________________
+bool Target::IsElectron(void) const
+{
+ return (fA == 0 && fZ == 0); //No nucleons
+}
+//___________________________________________________________________________
bool Target::IsNeutron(void) const
{
return (fA == 1 && fZ == 0);
@@ -289,6 +319,15 @@ bool Target::HitNucIsSet(void) const
return ok;
}
//___________________________________________________________________________
+bool Target::HitEleIsSet(void) const
+{
+ bool ok = fHitNucPDG == 0 &&
+ fHitQrkPDG == 0 &&
+ fHitSeaQrk == 0; //Hit no quarks
+
+ return ok;
+}
+//___________________________________________________________________________
bool Target::HitQrkIsSet(void) const
{
return (
@@ -417,6 +456,10 @@ void Target::Print(ostream & stream) const
<< utils::print::BoolAsYNString(this->HitSeaQrk())
<< ")";
}
+ if( this->HitEleIsSet() ) {
+ TParticlePDG * q = PDGLibrary::Instance()->Find(fHitQrkPDG);
+ stream << " struck electron = ";
+ }
}
//___________________________________________________________________________
bool Target::Compare(const Target & target) const
diff --git a/src/Framework/Interaction/Target.h b/src/Framework/Interaction/Target.h
index 1552ca145..3c53490e9 100644
--- a/src/Framework/Interaction/Target.h
+++ b/src/Framework/Interaction/Target.h
@@ -11,6 +11,9 @@
\author Costas Andreopoulos
University of Liverpool & STFC Rutherford Appleton Laboratory
+ Changes required to implement the Electron Velocity module
+ were installed by Brinden Carlson (Univ. of Florida)
+
\created May 03, 2004
\cpright Copyright (c) 2003-2023, The GENIE Collaboration
@@ -58,6 +61,7 @@ using TObject::Copy;
void SetId (int Z, int A);
void SetHitNucPdg (int pdgc);
void SetHitNucP4 (const TLorentzVector & p4);
+ void SetHitEleP4 (const TLorentzVector & p4);
void SetHitNucPosition (double r);
void SetHitQrkPdg (int pdgc);
void SetHitSeaQrk (bool tf);
@@ -73,11 +77,13 @@ using TObject::Copy;
double Charge (void) const;
bool IsFreeNucleon (void) const;
bool IsProton (void) const;
+ bool IsElectron (void) const;
bool IsNeutron (void) const;
bool IsNucleus (void) const;
bool IsParticle (void) const;
bool IsValidNucleus (void) const;
bool HitNucIsSet (void) const;
+ bool HitEleIsSet (void) const;
bool HitQrkIsSet (void) const;
bool HitSeaQrk (void) const;
bool IsEvenEven (void) const;
@@ -90,6 +96,8 @@ using TObject::Copy;
const TLorentzVector & HitNucP4 (void) const { return *this->HitNucP4Ptr(); }
TLorentzVector * HitNucP4Ptr (void) const;
+ const TLorentzVector & HitEleP4 (void) const { return *this->HitEleP4Ptr(); }
+ TLorentzVector * HitEleP4Ptr (void) const;
//-- Copy, reset, compare, print itself and build string code
void Reset (void);
@@ -121,9 +129,10 @@ using TObject::Copy;
int fHitQrkPDG; ///< hit quark PDG code
bool fHitSeaQrk; ///< hit quark from sea?
TLorentzVector * fHitNucP4; ///< hit nucleon 4p
+ TLorentzVector * fHitEleP4; ///< hit electron 4p - changes index
double fHitNucRad; ///< hit nucleon position
-ClassDef(Target,2)
+ClassDef(Target,3)
};
} // genie namespace
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/LinkDef.h b/src/Physics/Common/LinkDef.h
index 8aba58b88..dc84f2e09 100644
--- a/src/Physics/Common/LinkDef.h
+++ b/src/Physics/Common/LinkDef.h
@@ -24,4 +24,5 @@
#pragma link C++ class genie::XSecLinearCombinations;
#pragma link C++ class genie::QvalueShifter;
+#pragma link C++ class genie::ElectronVelocityMap;
#endif
diff --git a/src/Physics/NuElectron/EventGen/NuEKinematicsGenerator.cxx b/src/Physics/NuElectron/EventGen/NuEKinematicsGenerator.cxx
index cc9b4eb56..d10f32cc6 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)
+
*/
//____________________________________________________________________________
@@ -210,10 +214,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..c05b7f533 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(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().HitEleP4(); //[@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..c60b05d1e 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 (GHepRecord & ev) const;
};
} // genie namespace
diff --git a/src/Physics/NuElectron/XSection/BardinIMDRadCorPXSec.cxx b/src/Physics/NuElectron/XSection/BardinIMDRadCorPXSec.cxx
index cad76e740..b2721b224 100644
--- a/src/Physics/NuElectron/XSection/BardinIMDRadCorPXSec.cxx
+++ b/src/Physics/NuElectron/XSection/BardinIMDRadCorPXSec.cxx
@@ -11,7 +11,6 @@
#include
#include