diff --git a/src/Apps/gSplineXml2Root.cxx b/src/Apps/gSplineXml2Root.cxx index 29249200cb..af68f10b84 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 b74b5ef757..dc10fc8c98 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) @@ -394,7 +394,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 +443,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 +481,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 7282c1241c..2314898c8a 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 f5945f1936..369180fbfa 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); } @@ -445,7 +445,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 +468,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 +520,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 +573,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 +685,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 +695,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 +737,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 +747,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 +809,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 +820,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 +940,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 f811bb99e6..c16a19ae6d 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 e999998ebb..72f872ffde 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,19 +98,19 @@ 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) @@ -119,30 +119,30 @@ void Target::Copy(const Target & tgt) 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; + fHitPartPDG = tgt.fHitPartPDG; // struck nucleon PDG + 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 1552ca145c..85b9b9369e 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/Utils/KineUtils.cxx b/src/Framework/Utils/KineUtils.cxx index 5b59171340..b340518c33 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 ada4219dd8..8fcf1d933a 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 53387fd51e..461adf474e 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 581123976f..56728b6de4 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 0f1a9232e2..1d6885f17c 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 ad08646dc0..da0a53577b 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 6fc3cc6fd6..d8728979ba 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 27bac5ecb9..96da434325 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 f0dd132e35..084d8d118f 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 29be834750..8cd7af9890 100644 --- a/src/Physics/BoostedDarkMatter/XSection/DMDISXSec.cxx +++ b/src/Physics/BoostedDarkMatter/XSection/DMDISXSec.cxx @@ -71,7 +71,7 @@ double DMDISXSec::Integrate( const InitialState & init_state = in->InitState(); double Ed = 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(); @@ -230,7 +230,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 d2d5b83b73..56f986586c 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 fe3a6550c1..c06148fe8a 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,9 @@ 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; + 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/BoostedDarkMatter/XSection/QPMDMDISStrucFuncBase.cxx b/src/Physics/BoostedDarkMatter/XSection/QPMDMDISStrucFuncBase.cxx index abe11427c2..07e7617670 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 3b483cb7e1..4a83e8bdc6 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 2f7434c5a7..0b59d4c6c3 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 7a749150f3..e4f07723ba 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 0d277f832e..a19b5f2563 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 276e0e1b25..585995a76d 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 29753b2594..9b71595122 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 7c8932ff8a..77e96ad0f8 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/HadronicSystemGenerator.cxx b/src/Physics/Common/HadronicSystemGenerator.cxx index 66611cb0e5..eec12b754f 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 57863c5b5d..1367bc6084 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/OutgoingDarkGenerator.cxx b/src/Physics/Common/OutgoingDarkGenerator.cxx index 8d85640864..f0e04042c2 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 eadf9155d5..3a56ae85e1 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 61edbf17b5..4f044955e0 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 cf726820dc..615a71c8e8 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 a386140756..2903444fd7 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 f2f45a220a..5119362b43 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 41c1ffea99..a0af9c1948 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 4f5cef8dc6..29a4f8c33f 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 fd1254baf7..720207eddf 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 4083e16634..812e06cdbe 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 906a7d7190..e7bc6c48db 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 c27c7f0347..b1540cd153 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 cfb3283a93..d694b51a15 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 9c2814397e..a6d29731bc 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 075574b5dd..0f471a7ee1 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 c565f68c4e..84f795c959 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 a71936d28e..3677b4603d 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 bce1cb0be6..59c7280786 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 97870ae0ac..360de60ce3 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 a37178434c..cf44cff62f 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 a45f2f375e..a3f67860cc 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 711ac89fdd..572560b986 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 9af8a06d3c..71854f76cf 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 9fca8747f7..5a3984006e 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 b2cd22fc8d..e74ccee45b 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 f5023442ed..6a6fa49ff7 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 269f8fc489..3fc3ed3021 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 b68eef5af5..ebd5ccbcde 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 12b9df456c..a5b2de8879 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 4f78055b25..5e7f961174 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 cc7d2a0bc0..1e4b2670b1 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 3063d95550..1aff0fdc51 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 2246921668..065e3e11a5 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 2f6b80d6e8..300d6b4d66 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 d6d9ca9b98..20427d2ba5 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 e336645f47..0530be497b 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 7c1b2d9042..69fc43bb62 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 180a4bf8a6..da7d0c333e 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 e2cd34bd51..ccf29aa51f 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 524d1c689a..b5117ca947 100644 --- a/src/Physics/NuElectron/EventGen/NuEInteractionListGenerator.cxx +++ b/src/Physics/NuElectron/EventGen/NuEInteractionListGenerator.cxx @@ -61,7 +61,7 @@ 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(0); ProcessInfo proc_info(kScInverseMuDecay, kIntWeakCC); Interaction * interaction = new Interaction(init, proc_info); @@ -87,7 +87,7 @@ 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(0); ProcessInfo proc_info(kScIMDAnnihilation, kIntWeakCC); Interaction * interaction = new Interaction(init, proc_info); @@ -115,7 +115,7 @@ InteractionList * NuEInteractionListGenerator::NuEELInteractionList( // clone init state and de-activate the struck nucleon info InitialState init(init_state); - init_state.TgtPtr()->SetHitNucPdg(0); + init_state.TgtPtr()->SetHitPartPdg(0); // NC if(nupdg == kPdgNuMu || nupdg == kPdgAntiNuMu || diff --git a/src/Physics/NuclearState/EffectiveSF.cxx b/src/Physics/NuclearState/EffectiveSF.cxx index a321eb2ab7..ca7822d7c9 100644 --- a/src/Physics/NuclearState/EffectiveSF.cxx +++ b/src/Physics/NuclearState/EffectiveSF.cxx @@ -66,7 +66,7 @@ EffectiveSF::~EffectiveSF() //____________________________________________________________________________ bool EffectiveSF::GenerateNucleon(const Target & target) const { - assert(target.HitNucIsSet()); + assert(target.HitPartIsSet()); fCurrRemovalEnergy = 0; fCurrMomentum.SetXYZ(0,0,0); @@ -154,7 +154,7 @@ TH1D * EffectiveSF::ProbDistro(const Target & target) const << "P(cut-off) = " << fPCutOff << ", P(max) = " << fPMax; //-- get information for the nuclear target - int nucleon_pdgc = target.HitNucPdg(); + int nucleon_pdgc = target.HitPartPdg(); assert( pdg::IsProton(nucleon_pdgc) || pdg::IsNeutron(nucleon_pdgc) ); return this->MakeEffectiveSF(target); diff --git a/src/Physics/NuclearState/FGMBodekRitchie.cxx b/src/Physics/NuclearState/FGMBodekRitchie.cxx index 94f72a4883..1dfe70d116 100644 --- a/src/Physics/NuclearState/FGMBodekRitchie.cxx +++ b/src/Physics/NuclearState/FGMBodekRitchie.cxx @@ -67,7 +67,7 @@ FGMBodekRitchie::~FGMBodekRitchie() //____________________________________________________________________________ bool FGMBodekRitchie::GenerateNucleon(const Target & target) const { - assert(target.HitNucIsSet()); + assert(target.HitPartIsSet()); fCurrRemovalEnergy = 0; fCurrMomentum.SetXYZ(0,0,0); @@ -139,7 +139,7 @@ TH1D * FGMBodekRitchie::ProbDistro(const Target & target) const //-- get information for the nuclear target //int target_pdgc = pdg::IonPdgCode(target.A(), target.Z()); - int nucleon_pdgc = target.HitNucPdg(); + int nucleon_pdgc = target.HitPartPdg(); assert( pdg::IsProton(nucleon_pdgc) || pdg::IsNeutron(nucleon_pdgc) ); double KF = FermiMomentum( target, nucleon_pdgc ) ; @@ -206,7 +206,7 @@ double FGMBodekRitchie::FermiMomentum( const Target & t, int nucleon_pdg ) const double kF = nuclear::FermiMomentumForIsoscalarNucleonParametrization(t); //-- correct the Fermi momentum for the struck nucleon - assert(t.HitNucIsSet()); + assert(t.HitPartIsSet()); double A = (double) t.A() ; if( pdg::IsProton(nucleon_pdg) ) { diff --git a/src/Physics/NuclearState/FermiMover.cxx b/src/Physics/NuclearState/FermiMover.cxx index 1e483694d9..d3a930ac16 100644 --- a/src/Physics/NuclearState/FermiMover.cxx +++ b/src/Physics/NuclearState/FermiMover.cxx @@ -106,7 +106,7 @@ void FermiMover::KickHitNucleon(GHepRecord * evrec) const // do nothing for non-nuclear targets if(!tgt->IsNucleus()) return; - TLorentzVector * p4 = tgt->HitNucP4Ptr(); + TLorentzVector * p4 = tgt->HitPartP4Ptr(); // do nothing if the struct nucleon 4-momentum was set (eg as part of the // initial state selection) diff --git a/src/Physics/NuclearState/LocalFGM.cxx b/src/Physics/NuclearState/LocalFGM.cxx index f023ad7802..6068d95f17 100644 --- a/src/Physics/NuclearState/LocalFGM.cxx +++ b/src/Physics/NuclearState/LocalFGM.cxx @@ -50,9 +50,9 @@ LocalFGM::~LocalFGM() } //____________________________________________________________________________ bool LocalFGM::GenerateNucleon(const Target & target, - double hitNucleonRadius) const + double hitNucleonRadius) const { - assert(target.HitNucIsSet()); + assert(target.HitPartIsSet()); fCurrRemovalEnergy = -99999.0; fCurrMomentum.SetXYZ(0,0,0); @@ -98,9 +98,9 @@ bool LocalFGM::GenerateNucleon(const Target & target, if (fMomDepErmv) { // hit nucleon mass - double nucl_mass = target.HitNucMass(); + double nucl_mass = target.HitPartMass(); // get the local Fermi momentum - double KF = LocalFermiMomentum( target, target.HitNucPdg(), hitNucleonRadius); + double KF = LocalFermiMomentum( target, target.HitPartPdg(), hitNucleonRadius); //initial nucleon kinetic energy at the Fermi surface double T_F = TMath::Sqrt(TMath::Power(nucl_mass,2)+TMath::Power(KF,2)) - nucl_mass; @@ -168,10 +168,10 @@ TH1D * LocalFGM::ProbDistro(const Target & target, double r) const LOG("LocalFGM", pNOTICE) << ", P(max) = " << fPMax; - assert(target.HitNucIsSet()); + assert(target.HitPartIsSet()); //-- get information for the nuclear target - int nucleon_pdgc = target.HitNucPdg(); + int nucleon_pdgc = target.HitPartPdg(); assert(pdg::IsProton(nucleon_pdgc) || pdg::IsNeutron(nucleon_pdgc)); // bool is_p = pdg::IsProton(nucleon_pdgc); diff --git a/src/Physics/NuclearState/NuclearUtils.cxx b/src/Physics/NuclearState/NuclearUtils.cxx index e0cbc6ca2c..6e70bd91da 100644 --- a/src/Physics/NuclearState/NuclearUtils.cxx +++ b/src/Physics/NuclearState/NuclearUtils.cxx @@ -162,7 +162,7 @@ double genie::utils::nuclear::NuclQELXSecSuppression( // int target_pdgc = target.Pdg(); - int struck_nucleon_pdgc = target.HitNucPdg(); + int struck_nucleon_pdgc = target.HitPartPdg(); int final_nucleon_pdgc = struck_nucleon_pdgc; if(proc_info.IsWeakCC()) { @@ -186,7 +186,7 @@ double genie::utils::nuclear::NuclQELXSecSuppression( if(lfg){ double hbarc = kLightSpeed*kPlankConstant/genie::units::fermi; Target* tgt = interaction->InitStatePtr()->TgtPtr(); - double radius = tgt->HitNucPosition(); + double radius = tgt->HitPartPosition(); int A = tgt->A(); // kFi @@ -210,7 +210,7 @@ double genie::utils::nuclear::NuclQELXSecSuppression( kft->FindClosestKF(target_pdgc, final_nucleon_pdgc ); } - double Mn = target.HitNucP4Ptr()->M(); // can be off m/shell + double Mn = target.HitPartP4Ptr()->M(); // can be off m/shell const Kinematics & kine = interaction->Kine(); double q2 = kine.q2(); diff --git a/src/Physics/NucleonDecay/NucleonDecayPrimaryVtxGenerator.cxx b/src/Physics/NucleonDecay/NucleonDecayPrimaryVtxGenerator.cxx index 5f00f609a9..3fe45fb1a6 100644 --- a/src/Physics/NucleonDecay/NucleonDecayPrimaryVtxGenerator.cxx +++ b/src/Physics/NucleonDecay/NucleonDecayPrimaryVtxGenerator.cxx @@ -55,7 +55,7 @@ void NucleonDecayPrimaryVtxGenerator::ProcessEventRecord( Interaction * interaction = event->Summary(); fCurrInitStatePdg = interaction->InitState().Tgt().Pdg(); fCurrDecayMode = (NucleonDecayMode_t) interaction->ExclTag().DecayMode(); - fCurrDecayedNucleon = interaction->InitState().Tgt().HitNucPdg(); + fCurrDecayedNucleon = interaction->InitState().Tgt().HitPartPdg(); LOG("NucleonDecay", pNOTICE) << "Simulating decay " << utils::nucleon_decay::AsString(fCurrDecayMode, fCurrDecayedNucleon) @@ -240,7 +240,7 @@ void NucleonDecayPrimaryVtxGenerator::GenerateFermiMomentum( // generate a Fermi momentum & removal energy Target tgt(initial_nucleus->Pdg()); - tgt.SetHitNucPdg(decayed_nucleon->Pdg()); + tgt.SetHitPartPdg(decayed_nucleon->Pdg()); fNuclModel->GenerateNucleon(tgt); TVector3 p3 = fNuclModel->Momentum3(); double w = fNuclModel->RemovalEnergy(); diff --git a/src/Physics/QuasiElastic/EventGen/QELEventGenerator.cxx b/src/Physics/QuasiElastic/EventGen/QELEventGenerator.cxx index 186b3da98c..4e56148176 100644 --- a/src/Physics/QuasiElastic/EventGen/QELEventGenerator.cxx +++ b/src/Physics/QuasiElastic/EventGen/QELEventGenerator.cxx @@ -101,7 +101,7 @@ void QELEventGenerator::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 QELEventGenerator::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("QELKinematics", pNOTICE) << "E = " << E << ", M = "<< M; // The hadronic inv. mass is equal to the recoil nucleon on-shell mass. @@ -268,7 +268,7 @@ void QELEventGenerator::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("QELEvent",pNOTICE) << "pn: " << p4ptr.X() << ", " << p4ptr.Y() << ", " << p4ptr.Z() << ", " << p4ptr.E(); nucleon->SetMomentum(p4ptr); @@ -448,7 +448,7 @@ double QELEventGenerator::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/QuasiElastic/EventGen/QELEventGeneratorSM.cxx b/src/Physics/QuasiElastic/EventGen/QELEventGeneratorSM.cxx index 072f198075..86b69717ba 100644 --- a/src/Physics/QuasiElastic/EventGen/QELEventGeneratorSM.cxx +++ b/src/Physics/QuasiElastic/EventGen/QELEventGeneratorSM.cxx @@ -106,7 +106,7 @@ void QELEventGeneratorSM::ProcessEventRecord(GHepRecord * evrec) const GHepParticle * nucleon = evrec->HitNucleon(); // Store position of nucleon double hitNucPos = nucleon->X4()->Vect().Mag(); - tgt->SetHitNucPosition( hitNucPos ); + tgt->SetHitPartPosition( hitNucPos ); // Get the random number generators RandomGen * rnd = RandomGen::Instance(); @@ -268,7 +268,7 @@ void QELEventGeneratorSM::ProcessEventRecord(GHepRecord * evrec) const outNucleonMom.Rotate(psi, unit_nudir); // set 4-momentum of struck nucleon - TLorentzVector * p4 = tgt->HitNucP4Ptr(); + TLorentzVector * p4 = tgt->HitPartP4Ptr(); p4->SetPx( inNucleonMom.Px() ); p4->SetPy( inNucleonMom.Py() ); p4->SetPz( inNucleonMom.Pz() ); @@ -278,7 +278,7 @@ void QELEventGeneratorSM::ProcessEventRecord(GHepRecord * evrec) const assert(rpdgc); double W = PDGLibrary::Instance()->Find(rpdgc)->Mass(); LOG("QELEvent", pNOTICE) << "Selected: W = "<< W; - double M = init_state.Tgt().HitNucP4().M(); + double M = init_state.Tgt().HitPartP4().M(); double E = init_state.ProbeE(kRfHitNucRest); // (W,Q2) -> (x,y) diff --git a/src/Physics/QuasiElastic/EventGen/QELEventGeneratorSuSA.cxx b/src/Physics/QuasiElastic/EventGen/QELEventGeneratorSuSA.cxx index 71ac4a97e1..803337e3af 100644 --- a/src/Physics/QuasiElastic/EventGen/QELEventGeneratorSuSA.cxx +++ b/src/Physics/QuasiElastic/EventGen/QELEventGeneratorSuSA.cxx @@ -433,7 +433,7 @@ void QELEventGeneratorSuSA::GenerateNucleon(GHepRecord * event) const // this sets the pdg of each nucleon and its momentum from user chosen nuclear model double hitNucPos = initial_nucleon->X4()->Vect().Mag(); - tgt.SetHitNucPdg(initial_nucleon_pdg); + tgt.SetHitPartPdg(initial_nucleon_pdg); fNuclModel->GenerateNucleon(tgt,hitNucPos); p3i = fNuclModel->Momentum3(); diff --git a/src/Physics/QuasiElastic/EventGen/QELInteractionListGenerator.cxx b/src/Physics/QuasiElastic/EventGen/QELInteractionListGenerator.cxx index 3505bd9626..931d9a519a 100644 --- a/src/Physics/QuasiElastic/EventGen/QELInteractionListGenerator.cxx +++ b/src/Physics/QuasiElastic/EventGen/QELInteractionListGenerator.cxx @@ -89,11 +89,11 @@ InteractionList * QELInteractionListGenerator::CreateInteractionListCC( } if (isnu && hasN) { - target->SetHitNucPdg(kPdgNeutron); + target->SetHitPartPdg(kPdgNeutron); intlist->push_back(interaction); } else if (isnubar && hasP) { - target->SetHitNucPdg(kPdgProton); + target->SetHitPartPdg(kPdgProton); intlist->push_back(interaction); } else { @@ -143,7 +143,7 @@ InteractionList * QELInteractionListGenerator::CreateInteractionListNC( delete interaction; continue; } - target->SetHitNucPdg(nuclpdg[i]); + target->SetHitPartPdg(nuclpdg[i]); intlist->push_back(interaction); } @@ -235,7 +235,7 @@ InteractionList * delete interaction; continue; } - target->SetHitNucPdg(nuclpdg[i]); + target->SetHitPartPdg(nuclpdg[i]); xcls->SetCharm(charmpdg[i]); intlist->push_back(interaction); @@ -285,7 +285,7 @@ InteractionList * delete interaction; continue; } - target->SetHitNucPdg(nuclpdg[i]); + target->SetHitPartPdg(nuclpdg[i]); xcls->SetStrange(strangepdg[i]); intlist->push_back(interaction); diff --git a/src/Physics/QuasiElastic/EventGen/QELKinematicsGenerator.cxx b/src/Physics/QuasiElastic/EventGen/QELKinematicsGenerator.cxx index 64609920d2..ec106af3bf 100644 --- a/src/Physics/QuasiElastic/EventGen/QELKinematicsGenerator.cxx +++ b/src/Physics/QuasiElastic/EventGen/QELKinematicsGenerator.cxx @@ -73,7 +73,7 @@ void QELKinematicsGenerator::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 @@ -178,7 +178,7 @@ void QELKinematicsGenerator::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("QELKinematics", pNOTICE) << "E = " << E << ", M = "<< M; @@ -248,7 +248,7 @@ void QELKinematicsGenerator::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 @@ -260,14 +260,14 @@ void QELKinematicsGenerator::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); //-- Get the limits for the generated Q2 const KPhaseSpace & kps = interaction->PhaseSpace(); diff --git a/src/Physics/QuasiElastic/XSection/AhrensNCELPXSec.cxx b/src/Physics/QuasiElastic/XSection/AhrensNCELPXSec.cxx index eeccb05467..d0a48f5108 100644 --- a/src/Physics/QuasiElastic/XSection/AhrensNCELPXSec.cxx +++ b/src/Physics/QuasiElastic/XSection/AhrensNCELPXSec.cxx @@ -56,7 +56,7 @@ double AhrensNCELPXSec::XSec( double E = init_state.ProbeE(kRfHitNucRest); 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 qmv2 = TMath::Power(1 + Q2/fMv2, 2); @@ -66,7 +66,7 @@ double AhrensNCELPXSec::XSec( int nusign = 1; int nucsign = 1; int nupdgc = init_state.ProbePdg(); - int nucpdgc = target.HitNucPdg(); + int nucpdgc = target.HitPartPdg(); if( pdg::IsAntiNeutrino(nupdgc) ) nusign = -1; if( pdg::IsNeutron(nucpdgc) ) nucsign = -1; diff --git a/src/Physics/QuasiElastic/XSection/BBA03ELFormFactorsModel.cxx b/src/Physics/QuasiElastic/XSection/BBA03ELFormFactorsModel.cxx index d582bcd60c..087edf1fc3 100644 --- a/src/Physics/QuasiElastic/XSection/BBA03ELFormFactorsModel.cxx +++ b/src/Physics/QuasiElastic/XSection/BBA03ELFormFactorsModel.cxx @@ -64,7 +64,7 @@ double BBA03ELFormFactorsModel::Gen(const Interaction * interaction) const const Target & tgt = interaction->InitState().Tgt(); - double M = tgt.HitNucMass(); // Mnucl + double M = tgt.HitPartMass(); // Mnucl double M2 = TMath::Power(M,2); // Mnucl^2 double t = -q2/(4*M2); // q2<0 double a = fGenA; // Krutov et al. parameter a diff --git a/src/Physics/QuasiElastic/XSection/BBA05ELFormFactorsModel.cxx b/src/Physics/QuasiElastic/XSection/BBA05ELFormFactorsModel.cxx index 07eb5a1228..6bb0cd6ff2 100644 --- a/src/Physics/QuasiElastic/XSection/BBA05ELFormFactorsModel.cxx +++ b/src/Physics/QuasiElastic/XSection/BBA05ELFormFactorsModel.cxx @@ -139,7 +139,7 @@ double BBA05ELFormFactorsModel::tau(const Interaction * interaction) const const Target & target = interaction->InitState().Tgt(); double q2 = kine.q2(); // momentum transfer, <0 - double M2 = TMath::Power(target.HitNucMass(),2); // Mnucl^2 + double M2 = TMath::Power(target.HitPartMass(),2); // Mnucl^2 double t = -q2/(4*M2); return t; diff --git a/src/Physics/QuasiElastic/XSection/LwlynSmithFF.cxx b/src/Physics/QuasiElastic/XSection/LwlynSmithFF.cxx index 28198c1e8a..7eed4b4f17 100644 --- a/src/Physics/QuasiElastic/XSection/LwlynSmithFF.cxx +++ b/src/Physics/QuasiElastic/XSection/LwlynSmithFF.cxx @@ -173,7 +173,7 @@ double LwlynSmithFF::Fp(const Interaction * interaction) const // get struck nucleon mass & set pion mass const InitialState & init_state = interaction->InitState(); - double MN = init_state.Tgt().HitNucMass(); + double MN = init_state.Tgt().HitPartMass(); double MN2 = TMath::Power(MN, 2); double Mpi = kPionMass; double Mpi2 = TMath::Power(Mpi, 2); @@ -249,7 +249,7 @@ double LwlynSmithFF::tau(const Interaction * interaction) const const Kinematics & kinematics = interaction->Kine(); const InitialState & init_state = interaction->InitState(); double q2 = kinematics.q2(); - double Mnucl = init_state.Tgt().HitNucMass(); + double Mnucl = init_state.Tgt().HitPartMass(); double Mnucl2 = TMath::Power(Mnucl, 2); //-- calculate q^2 / (4*Mnuc^2) diff --git a/src/Physics/QuasiElastic/XSection/LwlynSmithFFNC.cxx b/src/Physics/QuasiElastic/XSection/LwlynSmithFFNC.cxx index 6e00827951..7cd35241ef 100644 --- a/src/Physics/QuasiElastic/XSection/LwlynSmithFFNC.cxx +++ b/src/Physics/QuasiElastic/XSection/LwlynSmithFFNC.cxx @@ -83,7 +83,7 @@ double LwlynSmithFFNC::Fp(const Interaction * interaction) const //-- get struck nucleon mass & pion pass const InitialState & init_state = interaction->InitState(); - double MN = init_state.Tgt().HitNucMass(); + double MN = init_state.Tgt().HitPartMass(); double MN2 = TMath::Power(MN, 2); double Mpi2 = TMath::Power(kPionMass, 2); diff --git a/src/Physics/QuasiElastic/XSection/LwlynSmithQELCCPXSec.cxx b/src/Physics/QuasiElastic/XSection/LwlynSmithQELCCPXSec.cxx index 5d743afbcd..a67886ab62 100644 --- a/src/Physics/QuasiElastic/XSection/LwlynSmithQELCCPXSec.cxx +++ b/src/Physics/QuasiElastic/XSection/LwlynSmithQELCCPXSec.cxx @@ -76,7 +76,7 @@ double LwlynSmithQELCCPXSec::XSec( double E = init_state.ProbeE(kRfHitNucRest); double E2 = TMath::Power(E,2); double ml = interaction->FSPrimLepton()->Mass(); - double M = target.HitNucMass(); + double M = target.HitPartMass(); double q2 = kinematics.q2(); // One of the xsec terms changes sign for antineutrinos @@ -153,7 +153,7 @@ double LwlynSmithQELCCPXSec::XSec( double R = nuclear::NuclQELXSecSuppression("Default", 0.5, interaction); //----- number of scattering centers in the target - int nucpdgc = target.HitNucPdg(); + int nucpdgc = target.HitPartPdg(); int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N(); #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ @@ -183,7 +183,7 @@ double LwlynSmithQELCCPXSec::FullDifferentialXSec(const Interaction* interactio if ( fDoPauliBlocking && tgt.IsNucleus() && !interaction->TestBit(kIAssumeFreeNucleon) ) { int final_nucleon_pdg = interaction->RecoilNucleonPdg(); double kF = fPauliBlocker->GetFermiMomentum(tgt, final_nucleon_pdg, - tgt.HitNucPosition()); + tgt.HitPartPosition()); double pNf = outNucleonMom.P(); if ( pNf < kF ) return 0.; } @@ -194,7 +194,7 @@ double LwlynSmithQELCCPXSec::FullDifferentialXSec(const Interaction* interactio TLorentzVector * tempNeutrino = init_state.GetProbeP4(kRfLab); TLorentzVector neutrinoMom = *tempNeutrino; delete tempNeutrino; - TLorentzVector * inNucleonMom = init_state.TgtPtr()->HitNucP4Ptr(); + TLorentzVector * inNucleonMom = init_state.TgtPtr()->HitPartP4Ptr(); // *** CALCULATION OF "q" and "qTilde" *** // According to the de Forest prescription for handling the off-shell @@ -204,9 +204,9 @@ double LwlynSmithQELCCPXSec::FullDifferentialXSec(const Interaction* interactio // and off-shell energies of the hit nucleon has been subtracted from the // energy transfer q0. - // HitNucMass() looks up the PDGLibrary (on-shell) value for the initial + // HitPartMass() looks up the PDGLibrary (on-shell) value for the initial // struck nucleon - double mNi = init_state.Tgt().HitNucMass(); + double mNi = init_state.Tgt().HitPartMass(); // Hadronic matrix element for CC neutrino interactions should really use // the "nucleon mass," i.e., the mean of the proton and neutrino masses. @@ -291,7 +291,7 @@ double LwlynSmithQELCCPXSec::FullDifferentialXSec(const Interaction* interactio // Number of scattering centers in the target const Target & target = init_state.Tgt(); - int nucpdgc = target.HitNucPdg(); + int nucpdgc = target.HitPartPdg(); int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N(); #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ @@ -334,7 +334,7 @@ double LwlynSmithQELCCPXSec::Integral(const Interaction * in) const Target * tgt = in_curr.InitState().TgtPtr(); // get nuclear masses (init & final state nucleus) - int nucleon_pdgc = tgt->HitNucPdg(); + int nucleon_pdgc = tgt->HitPartPdg(); bool is_p = pdg::IsProton(nucleon_pdgc); int Zi = tgt->Z(); int Ai = tgt->A(); @@ -364,13 +364,13 @@ double LwlynSmithQELCCPXSec::Integral(const Interaction * in) const for(int inuc=0;inucGenerateVertex(&in_curr,tgt->A()); - tgt->SetHitNucPosition(nucpos.Mag()); + tgt->SetHitPartPosition(nucpos.Mag()); // Generate a nucleon fNuclModel->GenerateNucleon(*tgt, nucpos.Mag()); TVector3 p3N = fNuclModel->Momentum3(); double EN = Mi - TMath::Sqrt(p3N.Mag2() + Mf*Mf); - TLorentzVector* p4N = tgt->HitNucP4Ptr(); + TLorentzVector* p4N = tgt->HitPartP4Ptr(); p4N->SetPx (p3N.Px()); p4N->SetPy (p3N.Py()); p4N->SetPz (p3N.Pz()); @@ -396,7 +396,7 @@ bool LwlynSmithQELCCPXSec::ValidProcess(const Interaction * interaction) const if(!proc_info.IsQuasiElastic()) return false; - int nuc = init_state.Tgt().HitNucPdg(); + int nuc = init_state.Tgt().HitPartPdg(); int nu = init_state.ProbePdg(); bool isP = pdg::IsProton(nuc); diff --git a/src/Physics/QuasiElastic/XSection/NewQELXSec.cxx b/src/Physics/QuasiElastic/XSection/NewQELXSec.cxx index 40bd280363..1d66b4e679 100644 --- a/src/Physics/QuasiElastic/XSection/NewQELXSec.cxx +++ b/src/Physics/QuasiElastic/XSection/NewQELXSec.cxx @@ -120,7 +120,7 @@ double NewQELXSec::Integrate(const XSecAlgorithmI* model, const Interaction* in) double probeE = interaction->InitState().ProbeE( kRfLab ); if ( !tgt->IsNucleus() || probeE > E_lab_cutoff ) { - tgt->SetHitNucPosition(0.); + tgt->SetHitPartPosition(0.); if ( tgt->IsNucleus() ) nucl_model->GenerateNucleon(*tgt, 0.); else { @@ -147,7 +147,7 @@ double NewQELXSec::Integrate(const XSecAlgorithmI* model, const Interaction* in) // hurt to do this for other models) TVector3 vertex_pos = vtx_gen->GenerateVertex( interaction, tgt->A() ); double radius = vertex_pos.Mag(); - tgt->SetHitNucPosition( radius ); + tgt->SetHitPartPosition( radius ); // Sample a new nucleon 3-momentum and removal energy (this will be applied // to the nucleon via a call to genie::utils::ComputeFullQELPXSec(), so diff --git a/src/Physics/QuasiElastic/XSection/NievesQELCCPXSec.cxx b/src/Physics/QuasiElastic/XSection/NievesQELCCPXSec.cxx index afe33592fe..dbe2dff763 100644 --- a/src/Physics/QuasiElastic/XSection/NievesQELCCPXSec.cxx +++ b/src/Physics/QuasiElastic/XSection/NievesQELCCPXSec.cxx @@ -92,9 +92,9 @@ double NievesQELCCPXSec::XSec(const Interaction * interaction, const InitialState & init_state = interaction -> InitState(); const Target & target = init_state.Tgt(); - // HitNucMass() looks up the PDGLibrary (on-shell) value for the initial + // HitPartMass() looks up the PDGLibrary (on-shell) value for the initial // struck nucleon - double mNi = target.HitNucMass(); + double mNi = target.HitPartMass(); // Hadronic matrix element for CC neutrino interactions should really use // the "nucleon mass," i.e., the mean of the proton and neutrino masses. @@ -106,15 +106,15 @@ double NievesQELCCPXSec::XSec(const Interaction * interaction, // to be on-shell (this will be needed later for the tensor contraction, // in which the nucleon is treated in this way) double inNucleonOnShellEnergy = std::sqrt( std::pow(mNi, 2) - + std::pow(target.HitNucP4().P(), 2) ); + + std::pow(target.HitPartP4().P(), 2) ); // The Nieves CCQE model follows the de Forest prescription: free nucleon // (i.e., on-shell) form factors and spinors are used, but an effective // value of the 4-momentum transfer "qTilde" is used when computing the // contraction of the hadronic tensor. See comments in the // FullDifferentialXSec() method of LwlynSmithQELCCPXSec for more details. - TLorentzVector inNucleonMomOnShell( target.HitNucP4().Vect(), - inNucleonOnShellEnergy ); + TLorentzVector inNucleonMomOnShell( target.HitPartP4().Vect(), + inNucleonOnShellEnergy ); // Get the four kinematic vectors and caluclate GFactor // Create copies of all kinematics, so they can be rotated @@ -127,7 +127,7 @@ double NievesQELCCPXSec::XSec(const Interaction * interaction, TLorentzVector* tempNeutrino = init_state.GetProbeP4(kRfLab); TLorentzVector neutrinoMom = *tempNeutrino; delete tempNeutrino; - TLorentzVector inNucleonMom = target.HitNucP4(); + TLorentzVector inNucleonMom = target.HitPartP4(); TLorentzVector leptonMom = kinematics.FSLeptonP4(); TLorentzVector outNucleonMom = kinematics.HadSystP4(); @@ -135,7 +135,7 @@ double NievesQELCCPXSec::XSec(const Interaction * interaction, if ( fDoPauliBlocking && target.IsNucleus() && !interaction->TestBit(kIAssumeFreeNucleon) ) { int final_nucleon_pdg = interaction->RecoilNucleonPdg(); double kF = fPauliBlocker->GetFermiMomentum(target, final_nucleon_pdg, - target.HitNucPosition()); + target.HitPartPosition()); double pNf = outNucleonMom.P(); if ( pNf < kF ) return 0.; } @@ -154,7 +154,7 @@ double NievesQELCCPXSec::XSec(const Interaction * interaction, double plLocal = leptonMom.P(); bool is_neutrino = pdg::IsNeutrino(init_state.ProbePdg()); - double r = target.HitNucPosition(); + double r = target.HitPartPosition(); if ( fCoulomb ) { // Coulomb potential @@ -337,7 +337,7 @@ double NievesQELCCPXSec::XSec(const Interaction * interaction, } // 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; // nuclear xsec @@ -371,7 +371,7 @@ bool NievesQELCCPXSec::ValidProcess(const Interaction * interaction) const if(!proc_info.IsQuasiElastic()) return false; - int nuc = init_state.Tgt().HitNucPdg(); + int nuc = init_state.Tgt().HitPartPdg(); int nu = init_state.ProbePdg(); bool isP = pdg::IsProton(nuc); @@ -927,13 +927,13 @@ const TLorentzVector inNucleonMomOnShell, const TLorentzVector leptonMom, const TLorentzVector qTildeP4, double M, bool is_neutrino, const Target& target, bool assumeFreeNucleon) const { - double r = target.HitNucPosition(); + double r = target.HitPartPosition(); bool tgtIsNucleus = target.IsNucleus(); int tgt_pdgc = target.Pdg(); int A = target.A(); int Z = target.Z(); int N = target.N(); - bool hitNucIsProton = pdg::IsProton( target.HitNucPdg() ); + bool hitNucIsProton = pdg::IsProton( target.HitPartPdg() ); const double k[4] = {neutrinoMom.E(),neutrinoMom.Px(),neutrinoMom.Py(),neutrinoMom.Pz()}; const double kPrime[4] = {leptonMom.E(),leptonMom.Px(), @@ -1266,7 +1266,7 @@ void NievesQELCCPXSec::CompareNievesTensors(const Interaction* in) const Target & target = init_state.Tgt(); // Parameters required for LmunuAnumu - double M = target.HitNucMass(); + double M = target.HitPartMass(); double ml = interaction->FSPrimLepton()->Mass(); bool is_neutrino = pdg::IsNeutrino(init_state.ProbePdg()); diff --git a/src/Physics/QuasiElastic/XSection/QELUtils.cxx b/src/Physics/QuasiElastic/XSection/QELUtils.cxx index 4e81b57a4b..05cc0ee30f 100644 --- a/src/Physics/QuasiElastic/XSection/QELUtils.cxx +++ b/src/Physics/QuasiElastic/XSection/QELUtils.cxx @@ -35,7 +35,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(); @@ -58,7 +58,7 @@ double genie::utils::EnergyDeltaFunctionSolutionQEL( // 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; @@ -244,10 +244,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 @@ -263,14 +263,14 @@ void genie::utils::BindHitNucleon(genie::Interaction& interaction, genie::QELEvGen_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 @@ -308,7 +308,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 @@ -359,7 +359,7 @@ void genie::utils::BindHitNucleon(genie::Interaction& interaction, // Get the Fermi energies for the initial and final nucleons. Include // the radial dependence if using the LFG. - double hit_nucleon_radius = tgt->HitNucPosition(); + double hit_nucleon_radius = tgt->HitPartPosition(); // Average of the proton and neutron masses. It may actually be better // to use the exact on-shell masses here. However, the original paper @@ -369,7 +369,7 @@ void genie::utils::BindHitNucleon(genie::Interaction& interaction, const double mN = genie::constants::kNucleonMass; double kF_Ni = nucl_model.LocalFermiMomentum( *tgt, - tgt->HitNucPdg(), hit_nucleon_radius ); + tgt->HitPartPdg(), hit_nucleon_radius ); double EFermi_Ni = std::sqrt( std::max(0., mN*mN + kF_Ni*kF_Ni) ); double kF_Nf = nucl_model.LocalFermiMomentum( *tgt, @@ -404,7 +404,7 @@ void genie::utils::BindHitNucleon(genie::Interaction& interaction, Eb = Mf - Mi + mNi; LOG( "QELEvent", pDEBUG ) << "Qvalue = " << Qvalue - << ", Q_LFG = " << Q_LFG << " at radius = " << tgt->HitNucPosition(); + << ", Q_LFG = " << Q_LFG << " at radius = " << tgt->HitPartPosition(); } // The (lab-frame) off-shell initial nucleon energy is the difference diff --git a/src/Physics/QuasiElastic/XSection/RosenbluthPXSec.cxx b/src/Physics/QuasiElastic/XSection/RosenbluthPXSec.cxx index f18d6d3c50..8d1467fa6c 100644 --- a/src/Physics/QuasiElastic/XSection/RosenbluthPXSec.cxx +++ b/src/Physics/QuasiElastic/XSection/RosenbluthPXSec.cxx @@ -59,10 +59,10 @@ double RosenbluthPXSec::XSec( const Target & target = init_state.Tgt(); const ProcessInfo & proc_info = interaction->ProcInfo(); - int nucpdgc = target.HitNucPdg(); + int nucpdgc = target.HitPartPdg(); double E = init_state.ProbeE(kRfHitNucRest); double Q2 = kinematics.Q2(); - double M = target.HitNucMass(); + double M = target.HitPartMass(); double E2 = E*E; double E3 = E*E2; @@ -151,7 +151,7 @@ bool RosenbluthPXSec::ValidProcess(const Interaction * interaction) const const InitialState & init_state = interaction->InitState(); - int hitnuc = init_state.Tgt().HitNucPdg(); + int hitnuc = init_state.Tgt().HitPartPdg(); bool is_pn = (pdg::IsProton(hitnuc) || pdg::IsNeutron(hitnuc)); if (!is_pn) return false; diff --git a/src/Physics/QuasiElastic/XSection/SmithMonizQELCCPXSec.cxx b/src/Physics/QuasiElastic/XSection/SmithMonizQELCCPXSec.cxx index bf3baee6cd..06968c54b4 100644 --- a/src/Physics/QuasiElastic/XSection/SmithMonizQELCCPXSec.cxx +++ b/src/Physics/QuasiElastic/XSection/SmithMonizQELCCPXSec.cxx @@ -137,7 +137,7 @@ bool SmithMonizQELCCPXSec::ValidProcess(const Interaction * interaction) const if(!proc_info.IsQuasiElastic()) return false; - int nuc = init_state.Tgt().HitNucPdg(); + int nuc = init_state.Tgt().HitPartPdg(); int nu = init_state.ProbePdg(); bool isP = pdg::IsProton(nuc); @@ -210,14 +210,14 @@ double SmithMonizQELCCPXSec::d3sQES_dQ2dvdkF_SM(const Interaction * interaction) double v = kinematics.GetKV(kKVv); double kF = kinematics.GetKV(kKVPn); double kkF = kF*kF; - int nucl_pdg_ini = target.HitNucPdg(); + int nucl_pdg_ini = target.HitPartPdg(); int nucl_pdg_fin = genie::pdg::SwitchProtonNeutron(nucl_pdg_ini); PDGLibrary * pdglib = PDGLibrary::Instance(); TParticlePDG * nucl_fin = pdglib->Find( nucl_pdg_fin ); double E_BIN = sm_utils->GetBindingEnergy(); - double m_ini = target.HitNucMass(); + double m_ini = target.HitPartMass(); double mm_ini = m_ini*m_ini; double m_fin = nucl_fin -> Mass(); // Mass of final hadron or hadron system (GeV) double mm_fin = m_fin*m_fin; @@ -392,7 +392,7 @@ double SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(const Interaction * interaction) co double xsec = 0.5*Sum*(rkF.max-rkF.min); - int nucpdgc = target.HitNucPdg(); + int nucpdgc = target.HitPartPdg(); int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N(); xsec *= NNucl; // nuclear xsec @@ -414,7 +414,7 @@ double SmithMonizQELCCPXSec::dsQES_dQ2_SM(const Interaction * interaction) const double E = init_state.ProbeE(kRfHitNucRest); double E2 = TMath::Power(E,2); double ml = interaction->FSPrimLepton()->Mass(); - double M = target.HitNucMass(); + double M = target.HitPartMass(); double q2 = kinematics.q2(); // One of the xsec terms changes sign for antineutrinos @@ -464,7 +464,7 @@ double SmithMonizQELCCPXSec::dsQES_dQ2_SM(const Interaction * interaction) const xsec *= fQES_Pauli; } - int nucpdgc = target.HitNucPdg(); + int nucpdgc = target.HitPartPdg(); int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N(); xsec *= NNucl; // nuclear xsec diff --git a/src/Physics/QuasiElastic/XSection/SmithMonizUtils.cxx b/src/Physics/QuasiElastic/XSection/SmithMonizUtils.cxx index c49d46419c..44632540e2 100644 --- a/src/Physics/QuasiElastic/XSection/SmithMonizUtils.cxx +++ b/src/Physics/QuasiElastic/XSection/SmithMonizUtils.cxx @@ -125,14 +125,14 @@ void SmithMonizUtils::SetInteraction(const Interaction * interaction) // neutrino energy (GeV) E_nu = interaction->InitState().ProbeE(kRfLab); - assert(target.HitNucIsSet()); + assert(target.HitPartIsSet()); // get lepton&nuclear masses (init & final state nucleus) // mass of final charged lepton (GeV) m_lep = interaction->FSPrimLepton()->Mass(); mm_lep = TMath::Power(m_lep, 2); - int nucl_pdg_ini = target.HitNucPdg(); - m_ini = target.HitNucMass(); + int nucl_pdg_ini = target.HitPartPdg(); + m_ini = target.HitPartMass(); mm_ini = TMath::Power(m_ini, 2); int nucl_pdg_fin = genie::pdg::SwitchProtonNeutron(nucl_pdg_ini); TParticlePDG * nucl_fin = pdglib->Find( nucl_pdg_fin ); diff --git a/src/Physics/QuasiElastic/XSection/SuSAv2QELPXSec.cxx b/src/Physics/QuasiElastic/XSection/SuSAv2QELPXSec.cxx index 54980017f6..f8f6b0f943 100644 --- a/src/Physics/QuasiElastic/XSection/SuSAv2QELPXSec.cxx +++ b/src/Physics/QuasiElastic/XSection/SuSAv2QELPXSec.cxx @@ -501,7 +501,7 @@ double SuSAv2QELPXSec::XSecScaling(double xsec, const Interaction* interaction, // behavior for all targets by scaling by Z/2 or N/2 as appropriate. // Do the same for NC. TODO: double-check that this is the right // thing to do when we SuSAv2 NC hadronic tensors are added to GENIE. - int hit_nuc_pdg = tgt.HitNucPdg(); + int hit_nuc_pdg = tgt.HitPartPdg(); if ( pdg::IsProton(hit_nuc_pdg) ) xsec *= tgt.Z() / 2.; else if ( pdg::IsNeutron(hit_nuc_pdg) ) xsec *= tgt.N() / 2.; // We should never get here if ValidProcess() is working correctly @@ -557,7 +557,7 @@ bool SuSAv2QELPXSec::ValidProcess(const Interaction* interaction) const // not free nucleons. if ( !init_state.Tgt().IsNucleus() ) return false; - int nuc = init_state.Tgt().HitNucPdg(); + int nuc = init_state.Tgt().HitPartPdg(); int nu = init_state.ProbePdg(); bool isP = pdg::IsProton(nuc); diff --git a/src/Physics/Resonance/EventGen/RESInteractionListGenerator.cxx b/src/Physics/Resonance/EventGen/RESInteractionListGenerator.cxx index 1ae0207fb0..f801d92f9a 100644 --- a/src/Physics/Resonance/EventGen/RESInteractionListGenerator.cxx +++ b/src/Physics/Resonance/EventGen/RESInteractionListGenerator.cxx @@ -116,7 +116,7 @@ InteractionList * RESInteractionListGenerator::CreateInteractionList( // add the struck nucleon Target * target = interaction->InitStatePtr()->TgtPtr(); - target->SetHitNucPdg(hit_nucleon[i]); + target->SetHitPartPdg(hit_nucleon[i]); // add the baryon resonance in the exclusive tag XclsTag * xcls = interaction->ExclTagPtr(); diff --git a/src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx b/src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx index d46a83d816..3689f4ad52 100644 --- a/src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx +++ b/src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx @@ -192,7 +192,8 @@ void RESKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const // compute x,y for selected W,Q2 // note: hit nucleon can be off the mass-shell double gx=-1, gy=-1; - double M = init_state.Tgt().HitNucP4().M(); + double M = init_state.Tgt().HitPartP4().M(); + //double M = init_state.Tgt().HitPartMass(); kinematics::WQ2toXY(E,M,gW,gQ2,gx,gy); // set the cross section for the selected kinematics diff --git a/src/Physics/Resonance/EventGen/RSPPInteractionListGenerator.cxx b/src/Physics/Resonance/EventGen/RSPPInteractionListGenerator.cxx index ec5e840d14..63423c6e3e 100644 --- a/src/Physics/Resonance/EventGen/RSPPInteractionListGenerator.cxx +++ b/src/Physics/Resonance/EventGen/RSPPInteractionListGenerator.cxx @@ -114,7 +114,7 @@ InteractionList * RSPPInteractionListGenerator::CreateInteractionList( Target * target = interaction->InitStatePtr()->TgtPtr(); - target->SetHitNucPdg(struck_nucleon); + target->SetHitPartPdg(struck_nucleon); this->AddFinalStateInfo(interaction, nucc_channels[i]); intlist->push_back(interaction); @@ -135,7 +135,7 @@ InteractionList * RSPPInteractionListGenerator::CreateInteractionList( Target * target = interaction->InitStatePtr()->TgtPtr(); - target->SetHitNucPdg(struck_nucleon); + target->SetHitPartPdg(struck_nucleon); this->AddFinalStateInfo(interaction, nunc_channels[i]); intlist->push_back(interaction); diff --git a/src/Physics/Resonance/XSection/BSKLNBaseRESPXSec2014.cxx b/src/Physics/Resonance/XSection/BSKLNBaseRESPXSec2014.cxx index 0ebcbd1eb4..192a5d8a30 100644 --- a/src/Physics/Resonance/XSection/BSKLNBaseRESPXSec2014.cxx +++ b/src/Physics/Resonance/XSection/BSKLNBaseRESPXSec2014.cxx @@ -105,7 +105,7 @@ double BSKLNBaseRESPXSec2014::XSec( bool is_delta = utils::res::IsDelta (resonance); // Get the neutrino, hit nucleon & weak current - int nucpdgc = target.HitNucPdg(); + int nucpdgc = target.HitPartPdg(); int probepdgc = init_state.ProbePdg(); bool is_nu = pdg::IsNeutrino (probepdgc); bool is_nubar = pdg::IsAntiNeutrino (probepdgc); @@ -139,7 +139,7 @@ double BSKLNBaseRESPXSec2014::XSec( // Compute auxiliary & kinematical factors double E = init_state.ProbeE(kRfHitNucRest); - double Mnuc = target.HitNucMass(); + double Mnuc = target.HitPartMass(); double W2 = TMath::Power(W, 2); double Mnuc2 = TMath::Power(Mnuc, 2); double k = 0.5 * (W2 - Mnuc2)/Mnuc; @@ -722,7 +722,7 @@ bool BSKLNBaseRESPXSec2014::ValidProcess(const Interaction * interaction) const if(!proc_info.IsResonant()) return false; if(!xcls.KnownResonance()) return false; - int hitnuc = init_state.Tgt().HitNucPdg(); + int hitnuc = init_state.Tgt().HitPartPdg(); bool is_pn = (pdg::IsProton(hitnuc) || pdg::IsNeutron(hitnuc)); if (!is_pn) return false; diff --git a/src/Physics/Resonance/XSection/BostedChristyEMPXSec.cxx b/src/Physics/Resonance/XSection/BostedChristyEMPXSec.cxx index 6f1f9dc01e..41aeed6c42 100644 --- a/src/Physics/Resonance/XSection/BostedChristyEMPXSec.cxx +++ b/src/Physics/Resonance/XSection/BostedChristyEMPXSec.cxx @@ -625,7 +625,7 @@ bool BostedChristyEMPXSec::ValidProcess(const Interaction * interaction) const if(!proc_info.IsResonant() ) return false; - int hitnuc = init_state.Tgt().HitNucPdg(); + int hitnuc = init_state.Tgt().HitPartPdg(); bool is_pn = (pdg::IsProton(hitnuc) || pdg::IsNeutron(hitnuc)); if (!is_pn) return false; diff --git a/src/Physics/Resonance/XSection/P33PaschosLalakulichPXSec.cxx b/src/Physics/Resonance/XSection/P33PaschosLalakulichPXSec.cxx index d406262259..98d19b8943 100644 --- a/src/Physics/Resonance/XSection/P33PaschosLalakulichPXSec.cxx +++ b/src/Physics/Resonance/XSection/P33PaschosLalakulichPXSec.cxx @@ -62,7 +62,7 @@ double P33PaschosLalakulichPXSec::XSec( double E2 = TMath::Power(E,2); double Q2 = kinematics.Q2(); double W = kinematics.W(); - double MN = target.HitNucMass(); + double MN = target.HitPartMass(); double MN2 = TMath::Power(MN,2); double Mmu2 = kMuonMass2; double Mpi2 = kPionMass2; @@ -250,7 +250,7 @@ double P33PaschosLalakulichPXSec::XSec( if( interaction->TestBit(kIAssumeFreeNucleon) ) return xsec; //-- number of scattering centers in the target - bool isp = pdg::IsProton(target.HitNucPdg()); + bool isp = pdg::IsProton(target.HitPartPdg()); int NNucl = (isp) ? target.Z() : target.N(); xsec*=NNucl; // nuclear xsec (no nuclear suppression factor) diff --git a/src/Physics/Resonance/XSection/ReinSehgalRESPXSec.cxx b/src/Physics/Resonance/XSection/ReinSehgalRESPXSec.cxx index 4c314977bf..59121236e4 100644 --- a/src/Physics/Resonance/XSection/ReinSehgalRESPXSec.cxx +++ b/src/Physics/Resonance/XSection/ReinSehgalRESPXSec.cxx @@ -92,7 +92,7 @@ double ReinSehgalRESPXSec::XSec( bool is_delta = utils::res::IsDelta (resonance); // Get the neutrino, hit nucleon & weak current - int nucpdgc = target.HitNucPdg(); + int nucpdgc = target.HitPartPdg(); int probepdgc = init_state.ProbePdg(); bool is_nu = pdg::IsNeutrino (probepdgc); bool is_nubar = pdg::IsAntiNeutrino (probepdgc); @@ -126,7 +126,7 @@ double ReinSehgalRESPXSec::XSec( // Compute auxiliary & kinematical factors double E = init_state.ProbeE(kRfHitNucRest); - double Mnuc = target.HitNucMass(); + double Mnuc = target.HitPartMass(); double W2 = TMath::Power(W, 2); double Mnuc2 = TMath::Power(Mnuc, 2); double k = 0.5 * (W2 - Mnuc2)/Mnuc; @@ -395,7 +395,7 @@ bool ReinSehgalRESPXSec::ValidProcess(const Interaction * interaction) const if(!proc_info.IsResonant()) return false; if(!xcls.KnownResonance()) return false; - int hitnuc = init_state.Tgt().HitNucPdg(); + int hitnuc = init_state.Tgt().HitPartPdg(); bool is_pn = (pdg::IsProton(hitnuc) || pdg::IsNeutron(hitnuc)); if (!is_pn) return false; diff --git a/src/Physics/Resonance/XSection/ReinSehgalRESXSec.cxx b/src/Physics/Resonance/XSection/ReinSehgalRESXSec.cxx index 58ba32621b..14afffea7b 100644 --- a/src/Physics/Resonance/XSection/ReinSehgalRESXSec.cxx +++ b/src/Physics/Resonance/XSection/ReinSehgalRESXSec.cxx @@ -72,7 +72,7 @@ double ReinSehgalRESXSec::Integrate( const Target & target = init_state.Tgt(); InteractionType_t it = proc_info.InteractionTypeId(); - int nucleon_pdgc = target.HitNucPdg(); + int nucleon_pdgc = target.HitPartPdg(); int nu_pdgc = init_state.ProbePdg(); //-- Get neutrino energy in the struck nucleon rest frame diff --git a/src/Physics/Resonance/XSection/ReinSehgalRESXSecFast.cxx b/src/Physics/Resonance/XSection/ReinSehgalRESXSecFast.cxx index ac726d3933..2387c6b6e6 100644 --- a/src/Physics/Resonance/XSection/ReinSehgalRESXSecFast.cxx +++ b/src/Physics/Resonance/XSection/ReinSehgalRESXSecFast.cxx @@ -75,7 +75,7 @@ double ReinSehgalRESXSecFast::Integrate( const Target & target = init_state.Tgt(); InteractionType_t it = proc_info.InteractionTypeId(); - int nucleon_pdgc = target.HitNucPdg(); + int nucleon_pdgc = target.HitPartPdg(); int nu_pdgc = init_state.ProbePdg(); //-- Get neutrino energy in the struck nucleon rest frame diff --git a/src/Physics/Resonance/XSection/ReinSehgalRESXSecWithCache.cxx b/src/Physics/Resonance/XSection/ReinSehgalRESXSecWithCache.cxx index 6994c12448..9a9a96c4b4 100644 --- a/src/Physics/Resonance/XSection/ReinSehgalRESXSecWithCache.cxx +++ b/src/Physics/Resonance/XSection/ReinSehgalRESXSecWithCache.cxx @@ -82,12 +82,12 @@ void ReinSehgalRESXSecWithCache::CacheResExcitationXSec( TLorentzVector p4(0,0,0,0); int nu_code = in->InitState().ProbePdg(); - int nuc_code = in->InitState().Tgt().HitNucPdg(); + int nuc_code = in->InitState().Tgt().HitPartPdg(); int tgt_code = (nuc_code==kPdgProton) ? kPdgTgtFreeP : kPdgTgtFreeN; Interaction * interaction = new Interaction(*in); interaction->InitStatePtr()->SetPdgs(tgt_code, nu_code); - interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(nuc_code); + interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(nuc_code); InteractionType_t wkcur = interaction->ProcInfo().InteractionTypeId(); unsigned int nres = fResList.NResonances(); diff --git a/src/Physics/Resonance/XSection/ReinSehgalRESXSecWithCacheFast.cxx b/src/Physics/Resonance/XSection/ReinSehgalRESXSecWithCacheFast.cxx index f2b6c16514..6c9ebf9aa3 100644 --- a/src/Physics/Resonance/XSection/ReinSehgalRESXSecWithCacheFast.cxx +++ b/src/Physics/Resonance/XSection/ReinSehgalRESXSecWithCacheFast.cxx @@ -97,12 +97,12 @@ void ReinSehgalRESXSecWithCacheFast::CacheResExcitationXSec( TLorentzVector p4(0,0,0,0); int nu_code = in->InitState().ProbePdg(); - int nuc_code = in->InitState().Tgt().HitNucPdg(); + int nuc_code = in->InitState().Tgt().HitPartPdg(); int tgt_code = (nuc_code==kPdgProton) ? kPdgTgtFreeP : kPdgTgtFreeN; Interaction * interaction = new Interaction(*in); interaction->InitStatePtr()->SetPdgs(tgt_code, nu_code); - interaction->InitStatePtr()->TgtPtr()->SetHitNucPdg(nuc_code); + interaction->InitStatePtr()->TgtPtr()->SetHitPartPdg(nuc_code); InteractionType_t wkcur = interaction->ProcInfo().InteractionTypeId(); unsigned int nres = fResList.NResonances(); diff --git a/src/Physics/Resonance/XSection/ReinSehgalSPPXSec.cxx b/src/Physics/Resonance/XSection/ReinSehgalSPPXSec.cxx index fd4c49339a..858a89f896 100644 --- a/src/Physics/Resonance/XSection/ReinSehgalSPPXSec.cxx +++ b/src/Physics/Resonance/XSection/ReinSehgalSPPXSec.cxx @@ -67,7 +67,7 @@ double ReinSehgalSPPXSec::Integrate( const Target & target = init_state.Tgt(); InteractionType_t it = proc_info.InteractionTypeId(); - int nucleon_pdgc = target.HitNucPdg(); + int nucleon_pdgc = target.HitPartPdg(); int nu_pdgc = init_state.ProbePdg(); // Get neutrino energy in the struck nucleon rest frame diff --git a/src/Physics/Strange/EventGen/SKHadronicSystemGenerator.cxx b/src/Physics/Strange/EventGen/SKHadronicSystemGenerator.cxx index 7e54426a48..fe62212aa6 100644 --- a/src/Physics/Strange/EventGen/SKHadronicSystemGenerator.cxx +++ b/src/Physics/Strange/EventGen/SKHadronicSystemGenerator.cxx @@ -89,7 +89,7 @@ void SKHadronicSystemGenerator::CalculateHadronicSystem_AtharSingleKaon(GHepReco TLorentzVector p4fsl = p4fsl_lab; // Transform the neutrino and final-state lepton to the struck nucleon rest frame - const TLorentzVector pnuc4 = interaction->InitState().Tgt().HitNucP4(); // 4-momentum of struck nucleon in lab frame + const TLorentzVector pnuc4 = interaction->InitState().Tgt().HitPartP4(); // 4-momentum of struck nucleon in lab frame TVector3 beta = pnuc4.BoostVector(); p4nu.Boost(-1.*beta); p4fsl.Boost(-1.*beta); diff --git a/src/Physics/Strange/EventGen/SKInteractionListGenerator.cxx b/src/Physics/Strange/EventGen/SKInteractionListGenerator.cxx index ebef0cf8e7..be37a74030 100644 --- a/src/Physics/Strange/EventGen/SKInteractionListGenerator.cxx +++ b/src/Physics/Strange/EventGen/SKInteractionListGenerator.cxx @@ -104,7 +104,7 @@ InteractionList * SKInteractionListGenerator::CreateInteractionList( delete interaction; continue; } - target->SetHitNucPdg(inuclpdg[i]); + target->SetHitPartPdg(inuclpdg[i]); xcls->SetStrange(kaonpdg[i]); if( fnuclpdg[i] == kPdgProton ) xcls->SetNProtons(1); else xcls->SetNNeutrons(1); diff --git a/src/Physics/Strange/EventGen/SKKinematicsGenerator.cxx b/src/Physics/Strange/EventGen/SKKinematicsGenerator.cxx index 031721cf1c..858160507f 100644 --- a/src/Physics/Strange/EventGen/SKKinematicsGenerator.cxx +++ b/src/Physics/Strange/EventGen/SKKinematicsGenerator.cxx @@ -90,7 +90,7 @@ void SKKinematicsGenerator::CalculateKin_AtharSingleKaon(GHepRecord * evrec) con // Determine lepton and kaon masses int leppdg = interaction->FSPrimLeptonPdg(); - const TLorentzVector pnuc4 = interaction->InitState().Tgt().HitNucP4(); // 4-momentum of struck nucleon in lab frame + const TLorentzVector pnuc4 = interaction->InitState().Tgt().HitPartP4(); // 4-momentum of struck nucleon in lab frame TVector3 beta = pnuc4.BoostVector(); TLorentzVector P4_nu = *(interaction->InitStatePtr()->GetProbeP4(kRfHitNucRest)); // struck nucleon rest frame diff --git a/src/Physics/Strange/XSection/AlamSimoAtharVacasSKXSec.cxx b/src/Physics/Strange/XSection/AlamSimoAtharVacasSKXSec.cxx index 25de67566a..1c5f44f3c8 100644 --- a/src/Physics/Strange/XSection/AlamSimoAtharVacasSKXSec.cxx +++ b/src/Physics/Strange/XSection/AlamSimoAtharVacasSKXSec.cxx @@ -74,7 +74,7 @@ double AlamSimoAtharVacasSKXSec::Integrate( // cross section spline list. // Cross section for PP scales with number of protons, NP and NN scale // with number of neutrons - 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(); double Ev = init_state.ProbeE(kRfHitNucRest); diff --git a/src/Physics/Strange/XSection/PaisQELLambdaPXSec.cxx b/src/Physics/Strange/XSection/PaisQELLambdaPXSec.cxx index 1d3aa04a0b..47b96657ee 100644 --- a/src/Physics/Strange/XSection/PaisQELLambdaPXSec.cxx +++ b/src/Physics/Strange/XSection/PaisQELLambdaPXSec.cxx @@ -69,7 +69,7 @@ double PaisQELLambdaPXSec::XSec( //resonance mass & nucleon mass - double Mnuc = target.HitNucMass(); + double Mnuc = target.HitPartMass(); double Mnuc2 = TMath::Power(Mnuc,2); //----- Calculate the differential cross section dxsec/dQ^2 @@ -126,7 +126,7 @@ double PaisQELLambdaPXSec::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; @@ -169,8 +169,8 @@ bool PaisQELLambdaPXSec::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.StrangeHadronPdg(); @@ -194,7 +194,7 @@ bool PaisQELLambdaPXSec::ValidKinematics( //resonance, final state primary lepton & nucleon mass double MR = this -> MHyperon (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/XSectionIntegration/GSLXSecFunc.cxx b/src/Physics/XSectionIntegration/GSLXSecFunc.cxx index 4525a93391..2bcd2cdeed 100644 --- a/src/Physics/XSectionIntegration/GSLXSecFunc.cxx +++ b/src/Physics/XSectionIntegration/GSLXSecFunc.cxx @@ -428,7 +428,7 @@ double genie::utils::gsl::d2XSec_dWdQ2_E::DoEval(const double * xin) const fInteraction->ProcInfo().IsDarkMatterDeepInelastic()) { double x=0,y=0; double E = fInteraction->InitState().ProbeE(kRfHitNucRest); - double M = fInteraction->InitState().Tgt().HitNucP4Ptr()->M(); + double M = fInteraction->InitState().Tgt().HitPartP4Ptr()->M(); kinematics::WQ2toXY(E,M,W,Q2,x,y); fInteraction->KinePtr()->Setx(x); diff --git a/src/contrib/corey/testXsec.C b/src/contrib/corey/testXsec.C index 4aea763677..b9361e3109 100644 --- a/src/contrib/corey/testXsec.C +++ b/src/contrib/corey/testXsec.C @@ -83,7 +83,7 @@ void testXsec(const Char_t* outfn="VLExsecNT.root") { genie::Interaction * interaction = new genie::Interaction(init_state, proc_info); Target * target = interaction->InitStatePtr()->TgtPtr(); - target->SetHitNucPdg(kPdgProton); + target->SetHitPartPdg(kPdgProton); Int_t i=0; for (i = 0; i < nknots; i++) { TLorentzVector p4(0,0,E[i]*1e-3,E[i]*1e-3); @@ -98,7 +98,7 @@ void testXsec(const Char_t* outfn="VLExsecNT.root") { genie::Interaction * interaction_n = new genie::Interaction(init_state_n, proc_info_n); Target * target_n = interaction_n->InitStatePtr()->TgtPtr(); - target_n->SetHitNucPdg(kPdgNeutron); + target_n->SetHitPartPdg(kPdgNeutron); for (i = 0; i < nknots; i++) { TLorentzVector n4(0,0,E[i]*1e-3,E[i]*1e-3); interaction_n->InitStatePtr()->SetProbeP4(n4); diff --git a/src/contrib/spectral_function_like/validation.C b/src/contrib/spectral_function_like/validation.C index feb5f4acd4..ba3f6818a9 100644 --- a/src/contrib/spectral_function_like/validation.C +++ b/src/contrib/spectral_function_like/validation.C @@ -61,7 +61,7 @@ void spectral_function_spectra( TString in_file_name = "gntp.0.ghep.root" , const auto & target = inter.InitState().Tgt() ; - if ( target.HitNucIsSet() ) { + if ( target.HitPartIsSet() ) { if ( ! proc_info.IsMEC() ) { diff --git a/src/contrib/test/gtestFermiP.cxx b/src/contrib/test/gtestFermiP.cxx index 42765e4376..5800a0a1af 100644 --- a/src/contrib/test/gtestFermiP.cxx +++ b/src/contrib/test/gtestFermiP.cxx @@ -66,7 +66,7 @@ int main(int /*argc*/, char ** /*argv*/) //-- Loop over targets/models & generate 'target nucleons' for(unsigned int it = 0; it < kNTargets; it++) { - nucltgt[it]->SetHitNucPdg(kPdgProton); + nucltgt[it]->SetHitPartPdg(kPdgProton); const Target & target = *nucltgt[it]; LOG("test", pNOTICE) << "** Using target : " << target;; for(unsigned int im = 0; im < kNModels; im++) { diff --git a/src/contrib/test/gtestHadronization.cxx b/src/contrib/test/gtestHadronization.cxx index c8bdf1ac3b..7cf959cb0d 100644 --- a/src/contrib/test/gtestHadronization.cxx +++ b/src/contrib/test/gtestHadronization.cxx @@ -210,7 +210,7 @@ int main(int argc, char ** argv) ProcessInfo proc (kScDeepInelastic, it); Interaction intr (init, proc); - intr.InitStatePtr()->TgtPtr()->SetHitNucPdg(NucCode[inuc]); + intr.InitStatePtr()->TgtPtr()->SetHitPartPdg(NucCode[inuc]); // hit quark loop (if requested) int nqrk=1; diff --git a/src/contrib/test/gtestInteraction.cxx b/src/contrib/test/gtestInteraction.cxx index ab70548887..7363c99810 100644 --- a/src/contrib/test/gtestInteraction.cxx +++ b/src/contrib/test/gtestInteraction.cxx @@ -50,8 +50,8 @@ int main(int /*argc*/, char ** /*argv*/) TLorentzVector pnucl(0,0,0,kNucleonMass); - interaction.InitStatePtr()->TgtPtr()->SetHitNucP4(pnucl); - interaction.InitStatePtr()->TgtPtr()->SetHitNucPdg(kPdgProton); + interaction.InitStatePtr()->TgtPtr()->SetHitPartPdgSetHitPartP4(pnucl); + interaction.InitStatePtr()->TgtPtr()->SetHitPartPdg(kPdgProton); interaction.InitStatePtr()->TgtPtr()->SetHitQrkPdg(kPdgUQuark); //-- get a 'read-only' InitialState and print it (check that struck nucleon @@ -73,7 +73,7 @@ int main(int /*argc*/, char ** /*argv*/) //-- instead of using the long syntax above, get a writable Target object first Target * wtgt = interaction.InitStatePtr()->TgtPtr(); - wtgt->SetHitNucPdg(kPdgProton); + wtgt->SetHitPartPdg(kPdgProton); LOG("test", pINFO) << "Printing target after changing struck nucl"; LOG("test", pINFO) << "\n" << *wtgt; diff --git a/src/contrib/test/gtestNucleonDecay.cxx b/src/contrib/test/gtestNucleonDecay.cxx index 4626d6887c..0a71aff94a 100644 --- a/src/contrib/test/gtestNucleonDecay.cxx +++ b/src/contrib/test/gtestNucleonDecay.cxx @@ -129,7 +129,7 @@ int main(int argc, char ** argv) first = !first; NucleonDecayMode_t ndm = (NucleonDecayMode_t)event.Summary()->ExclTagPtr()->DecayMode(); - int npdg = event.Summary()->InitStatePtr()->TgtPtr()->HitNucPdg(); + int npdg = event.Summary()->InitStatePtr()->TgtPtr()->HitPartPdg(); string decayNameString = genie::utils::nucleon_decay::AsString(ndm,npdg); decayName.SetTitle(decayNameString.c_str()); string targetNameString = event.Summary()->InitStatePtr()->TgtPtr()->AsString();