GENIEGenerator
|
Simulate the primary MEC interaction. More...
#include <MECGenerator.h>
Public Member Functions | |
MECGenerator () | |
MECGenerator (string config) | |
~MECGenerator () | |
void | ProcessEventRecord (GHepRecord *event) const |
void | Configure (const Registry &config) |
void | Configure (string config) |
Public Member Functions inherited from genie::EventRecordVisitorI | |
virtual | ~EventRecordVisitorI () |
Public Member Functions inherited from genie::Algorithm | |
virtual | ~Algorithm () |
virtual void | FindConfig (void) |
virtual const Registry & | GetConfig (void) const |
Registry * | GetOwnedConfig (void) |
virtual const AlgId & | Id (void) const |
Get algorithm ID. More... | |
virtual AlgStatus_t | GetStatus (void) const |
Get algorithm status. More... | |
virtual bool | AllowReconfig (void) const |
virtual AlgCmp_t | Compare (const Algorithm *alg) const |
Compare with input algorithm. More... | |
virtual void | SetId (const AlgId &id) |
Set algorithm ID. More... | |
virtual void | SetId (string name, string config) |
const Algorithm * | SubAlg (const RgKey ®istry_key) const |
void | AdoptConfig (void) |
void | AdoptSubstructure (void) |
virtual void | Print (ostream &stream) const |
Print algorithm info. More... | |
Private Member Functions | |
void | LoadConfig (void) |
void | AddNucleonCluster (GHepRecord *event) const |
void | AddTargetRemnant (GHepRecord *event) const |
void | GenerateFermiMomentum (GHepRecord *event) const |
void | SelectEmpiricalKinematics (GHepRecord *event) const |
void | AddFinalStateLepton (GHepRecord *event) const |
void | RecoilNucleonCluster (GHepRecord *event) const |
void | DecayNucleonCluster (GHepRecord *event) const |
void | SelectNSVLeptonKinematics (GHepRecord *event) const |
void | SelectSuSALeptonKinematics (GHepRecord *event) const |
void | GenerateNSVInitialHadrons (GHepRecord *event) const |
PDGCodeList | NucleonClusterConstituents (int pdgc) const |
double | GetXSecMaxTlctl (const Interaction &inter, const Range1D_t &Tl_range, const Range1D_t &ctl_range) const |
Private Attributes | |
const XSecAlgorithmI * | fXSecModel |
TGenPhaseSpace | fPhaseSpaceGenerator |
const NuclearModelI * | fNuclModel |
double | fSafetyFactor |
int | fFunctionCalls |
double | fRelTolerance |
int | fMinScanPointsTmu |
int | fMinScanPointsCosth |
double | fQ3Max |
double | fSuSAMaxXSecDiffTolerance |
Additional Inherited Members | |
Static Public Member Functions inherited from genie::Algorithm | |
static string | BuildParamVectKey (const std::string &comm_name, unsigned int i) |
static string | BuildParamVectSizeKey (const std::string &comm_name) |
static string | BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j) |
static string | BuildParamMatRowSizeKey (const std::string &comm_name) |
static string | BuildParamMatColSizeKey (const std::string &comm_name) |
Protected Member Functions inherited from genie::EventRecordVisitorI | |
EventRecordVisitorI () | |
EventRecordVisitorI (string name) | |
EventRecordVisitorI (string name, string config) | |
Protected Member Functions inherited from genie::Algorithm | |
Algorithm () | |
Algorithm (string name) | |
Algorithm (string name, string config) | |
void | Initialize (void) |
void | DeleteConfig (void) |
void | DeleteSubstructure (void) |
Registry * | ExtractLocalConfig (const Registry &in) const |
Registry * | ExtractLowerConfig (const Registry &in, const string &alg_key) const |
Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key. More... | |
template<class T > | |
bool | GetParam (const RgKey &name, T &p, bool is_top_call=true) const |
template<class T > | |
bool | GetParamDef (const RgKey &name, T &p, const T &def) const |
template<class T > | |
int | GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const |
Handle to load vectors of parameters. More... | |
int | GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const |
template<class T > | |
int | GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const |
Handle to load matrix of parameters. More... | |
template<class T > | |
int | GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const |
int | GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const |
int | AddTopRegistry (Registry *rp, bool owns=true) |
add registry with top priority, also update ownership More... | |
int | AddLowRegistry (Registry *rp, bool owns=true) |
add registry with lowest priority, also update ownership More... | |
int | MergeTopRegistry (const Registry &r) |
int | AddTopRegisties (const vector< Registry * > &rs, bool owns=false) |
Add registries with top priority, also udated Ownerships. More... | |
Protected Attributes inherited from genie::Algorithm | |
bool | fAllowReconfig |
bool | fOwnsSubstruc |
true if it owns its substructure (sub-algs,...) More... | |
AlgId | fID |
algorithm name and configuration set More... | |
vector< Registry * > | fConfVect |
vector< bool > | fOwnerships |
ownership for every registry in fConfVect More... | |
AlgStatus_t | fStatus |
algorithm execution status More... | |
AlgMap * | fOwnedSubAlgMp |
local pool for owned sub-algs (taken out of the factory pool) More... | |
Simulate the primary MEC interaction.
Steve Dytman <dytman+ pitt.edu> Pittsburgh University
Definition at line 36 of file MECGenerator.h.
MECGenerator::MECGenerator | ( | ) |
Definition at line 51 of file MECGenerator.cxx.
MECGenerator::MECGenerator | ( | string | config | ) |
Definition at line 57 of file MECGenerator.cxx.
MECGenerator::~MECGenerator | ( | ) |
Definition at line 63 of file MECGenerator.cxx.
|
private |
Definition at line 326 of file MECGenerator.cxx.
References genie::Interaction::FSPrimLepton(), genie::Target::HitNucP4(), genie::Interaction::InitState(), genie::RandomGen::Instance(), genie::Interaction::Kine(), genie::kIStStableFinalState, genie::constants::kPi, genie::kRfHitNucRest, LOG, pNOTICE, genie::GHepRecord::Probe(), genie::InitialState::ProbeE(), genie::Kinematics::Q2(), genie::utils::kinematics::Q2(), genie::RandomGen::RndLep(), genie::utils::SetPrimaryLeptonPolarization(), genie::InitialState::Tgt(), genie::GHepParticle::X4(), and genie::Kinematics::y().
Referenced by ProcessEventRecord().
|
private |
|
private |
Definition at line 117 of file MECGenerator.cxx.
References genie::units::A, genie::GHepParticle::A(), genie::pdg::IonPdgCode(), genie::kIStStableFinalState, genie::kPdgClusterNN, genie::kPdgClusterNP, genie::kPdgClusterPP, genie::GHepParticle::P4(), genie::GHepParticle::Pdg(), and genie::GHepParticle::Z().
Referenced by ProcessEventRecord().
|
virtual |
Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority
Reimplemented from genie::Algorithm.
Definition at line 1321 of file MECGenerator.cxx.
References genie::Algorithm::Configure(), and LoadConfig().
|
virtual |
Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration
Reimplemented from genie::Algorithm.
Definition at line 1327 of file MECGenerator.cxx.
References genie::Algorithm::Configure(), and LoadConfig().
|
private |
accept_decay
Definition at line 436 of file MECGenerator.cxx.
References genie::PDGLibrary::Find(), fPhaseSpaceGenerator, genie::GHepParticle::GetP4(), genie::GHepParticle::GetX4(), genie::RandomGen::Instance(), genie::PDGLibrary::Instance(), genie::kHadroSysGenErr, genie::kIStHadronInTheNucleus, genie::controls::kMaxUnweightDecayIterations, LOG, genie::units::m, NucleonClusterConstituents(), genie::utils::print::P4AsString(), genie::GHepParticle::Pdg(), pERROR, pINFO, pNOTICE, pWARN, genie::RandomGen::RndDec(), genie::exceptions::EVGThreadException::SetReason(), genie::exceptions::EVGThreadException::SetReturnStep(), and genie::exceptions::EVGThreadException::SwitchOnStepBack().
Referenced by ProcessEventRecord().
|
private |
Definition at line 165 of file MECGenerator.cxx.
References genie::PDGLibrary::Find(), fNuclModel, genie::NuclearModelI::GenerateNucleon(), genie::PDGLibrary::Instance(), LOG, genie::utils::res::Mass(), genie::NuclearModelI::Momentum3(), NucleonClusterConstituents(), genie::GHepParticle::Pdg(), pINFO, and genie::GHepParticle::SetMomentum().
Referenced by ProcessEventRecord().
|
private |
Definition at line 1126 of file MECGenerator.cxx.
References genie::PDGLibrary::Find(), fNuclModel, genie::NuclearModelI::GenerateNucleon(), genie::PDGLibrary::Instance(), genie::Interaction::KinePtr(), genie::kIStDecayedState, genie::kKineGenErr, genie::kPdgClusterNN, genie::kPdgClusterNP, genie::kPdgClusterPP, genie::controls::kRjMaxIterations, LOG, genie::utils::res::Mass(), genie::NuclearModelI::Momentum3(), NucleonClusterConstituents(), genie::GHepParticle::P4(), pDEBUG, genie::GHepParticle::Pdg(), pERROR, pWARN, genie::NuclearModelI::RemovalEnergy(), genie::Kinematics::SetHadSystP4(), genie::GHepParticle::SetMomentum(), genie::exceptions::EVGThreadException::SetReason(), genie::exceptions::EVGThreadException::SwitchOnFastForward(), and genie::GHepParticle::X4().
Referenced by ProcessEventRecord().
|
private |
Definition at line 1354 of file MECGenerator.cxx.
References fFunctionCalls, fMinScanPointsCosth, fMinScanPointsTmu, fSafetyFactor, genie::Interaction::FSPrimLepton(), fXSecModel, genie::Interaction::InitState(), genie::kRfHitNucRest, genie::Range1D_t::min, and genie::InitialState::ProbeE().
Referenced by SelectNSVLeptonKinematics().
|
private |
Definition at line 1333 of file MECGenerator.cxx.
References fFunctionCalls, fMinScanPointsCosth, fMinScanPointsTmu, fNuclModel, fQ3Max, fRelTolerance, fSafetyFactor, fSuSAMaxXSecDiffTolerance, genie::Algorithm::GetParam(), genie::Algorithm::GetParamDef(), and genie::Algorithm::SubAlg().
Referenced by Configure().
|
private |
Definition at line 561 of file MECGenerator.cxx.
References genie::kPdgClusterNN, genie::kPdgClusterNP, genie::kPdgClusterPP, genie::kPdgNeutron, genie::kPdgProton, LOG, pERROR, and genie::PDGCodeList::push_back().
Referenced by DecayNucleonCluster(), GenerateFermiMomentum(), and GenerateNSVInitialHadrons().
|
virtual |
shortly, this will be handled by the InitialStateAppender module
Implements genie::EventRecordVisitorI.
Definition at line 68 of file MECGenerator.cxx.
References AddFinalStateLepton(), AddTargetRemnant(), genie::EventGeneratorI::CrossSectionAlg(), DecayNucleonCluster(), fXSecModel, GenerateFermiMomentum(), GenerateNSVInitialHadrons(), genie::Algorithm::Id(), genie::RunningThreadInfo::Instance(), LOG, genie::AlgId::Name(), pFATAL, RecoilNucleonCluster(), genie::RunningThreadInfo::RunningThread(), SelectEmpiricalKinematics(), SelectNSVLeptonKinematics(), and SelectSuSALeptonKinematics().
|
private |
Definition at line 397 of file MECGenerator.cxx.
References genie::GHepParticle::GetP4(), genie::kIStDecayedState, LOG, genie::GHepParticle::P4(), pINFO, and genie::GHepParticle::X4().
Referenced by ProcessEventRecord().
|
private |
Definition at line 231 of file MECGenerator.cxx.
References genie::Kinematics::ClearRunningValues(), genie::EventGeneratorI::CrossSectionAlg(), genie::PDGLibrary::Find(), fXSecModel, gQ2, genie::Target::HitNucPdg(), genie::Interaction::InitState(), genie::RunningThreadInfo::Instance(), genie::RandomGen::Instance(), genie::PDGLibrary::Instance(), genie::utils::mec::J(), genie::Interaction::KinePtr(), genie::kKineGenErr, genie::kPSWQ2fE, genie::kRfHitNucRest, genie::controls::kRjMaxIterations, LOG, pINFO, pNOTICE, genie::InitialState::ProbeE(), pWARN, genie::utils::kinematics::Q2(), genie::RandomGen::RndKine(), genie::RunningThreadInfo::RunningThread(), genie::Kinematics::SetQ2(), genie::exceptions::EVGThreadException::SetReason(), genie::Kinematics::SetW(), genie::Kinematics::Setx(), genie::Kinematics::Sety(), genie::exceptions::EVGThreadException::SwitchOnFastForward(), genie::InitialState::Tgt(), genie::utils::kinematics::W(), genie::utils::kinematics::WQ2toXY(), and genie::XSecAlgorithmI::XSec().
Referenced by ProcessEventRecord().
|
private |
Definition at line 589 of file MECGenerator.cxx.
References genie::Interaction::ExclTagPtr(), fQ3Max, genie::Interaction::FSPrimLepton(), fXSecModel, genie::utils::mec::Getq0q3FromTlCostl(), GetXSecMaxTlctl(), genie::Interaction::InitState(), genie::Interaction::InitStatePtr(), genie::RandomGen::Instance(), genie::Interaction::KinePtr(), genie::kIStNucleonTarget, genie::kIStStableFinalState, genie::kKineGenErr, genie::kKVctl, genie::kKVQ0, genie::kKVQ3, genie::kKVTl, genie::kNoResonance, genie::constants::kNucleonMass, genie::kP33_1232, genie::kPdgClusterNN, genie::kPdgClusterNP, genie::kPdgClusterPP, genie::constants::kPi, genie::kPSTlctl, genie::kRfHitNucRest, genie::controls::kRjMaxIterations, LOG, pDEBUG, pERROR, pINFO, genie::GHepRecord::Probe(), genie::InitialState::ProbeE(), genie::InitialState::ProbePdg(), pWARN, genie::utils::kinematics::Q2(), genie::utils::kinematics::Q2YtoX(), genie::RandomGen::RndKine(), genie::RandomGen::RndLep(), genie::Kinematics::SetFSLeptonP4(), genie::Target::SetHitNucPdg(), genie::Kinematics::SetKV(), genie::utils::SetPrimaryLeptonPolarization(), genie::Kinematics::SetQ2(), genie::exceptions::EVGThreadException::SetReason(), genie::XclsTag::SetResonance(), genie::Kinematics::SetW(), genie::Kinematics::Setx(), genie::Kinematics::Sety(), genie::exceptions::EVGThreadException::SwitchOnFastForward(), genie::InitialState::TgtPdg(), genie::InitialState::TgtPtr(), genie::GHepParticle::X4(), genie::XSecAlgorithmI::XSec(), and genie::utils::kinematics::XYtoW().
Referenced by ProcessEventRecord().
|
private |
Definition at line 855 of file MECGenerator.cxx.
References fQ3Max, genie::Interaction::FSPrimLepton(), fSuSAMaxXSecDiffTolerance, fXSecModel, genie::utils::mec::GetMaxXSecTlctl(), genie::Interaction::InitState(), genie::Interaction::InitStatePtr(), genie::RandomGen::Instance(), genie::ProcessInfo::IsEM(), genie::Interaction::KinePtr(), genie::kIStNucleonTarget, genie::kIStStableFinalState, genie::kKineGenErr, genie::kKVctl, genie::kKVTl, genie::controls::kMinQ2Limit, genie::constants::kNucleonMass, genie::kPdgClusterNN, genie::kPdgClusterNP, genie::kPdgClusterPP, genie::constants::kPi, genie::kPSTlctl, genie::kRfLab, genie::controls::kRjMaxIterations, LOG, pDEBUG, pERROR, pFATAL, pINFO, genie::GHepRecord::Probe(), genie::InitialState::ProbeE(), genie::InitialState::ProbePdg(), genie::Interaction::ProcInfo(), pWARN, genie::utils::kinematics::Q2(), genie::utils::kinematics::Q2YtoX(), genie::RandomGen::RndKine(), genie::RandomGen::RndLep(), genie::Kinematics::SetFSLeptonP4(), genie::Target::SetHitNucPdg(), genie::Kinematics::SetKV(), genie::Kinematics::SetQ2(), genie::exceptions::EVGThreadException::SetReason(), genie::Kinematics::SetW(), genie::Kinematics::Setx(), genie::Kinematics::Sety(), genie::exceptions::EVGThreadException::SwitchOnFastForward(), genie::InitialState::TgtPdg(), genie::InitialState::TgtPtr(), genie::GHepParticle::X4(), genie::XSecAlgorithmI::XSec(), and genie::utils::kinematics::XYtoW().
Referenced by ProcessEventRecord().
|
private |
Definition at line 75 of file MECGenerator.h.
Referenced by GetXSecMaxTlctl(), and LoadConfig().
|
private |
Definition at line 78 of file MECGenerator.h.
Referenced by GetXSecMaxTlctl(), and LoadConfig().
|
private |
Definition at line 77 of file MECGenerator.h.
Referenced by GetXSecMaxTlctl(), and LoadConfig().
|
private |
Definition at line 72 of file MECGenerator.h.
Referenced by GenerateFermiMomentum(), GenerateNSVInitialHadrons(), and LoadConfig().
|
mutableprivate |
Definition at line 71 of file MECGenerator.h.
Referenced by DecayNucleonCluster().
|
private |
Definition at line 80 of file MECGenerator.h.
Referenced by LoadConfig(), SelectNSVLeptonKinematics(), and SelectSuSALeptonKinematics().
|
private |
Definition at line 76 of file MECGenerator.h.
Referenced by LoadConfig().
|
private |
Definition at line 74 of file MECGenerator.h.
Referenced by GetXSecMaxTlctl(), and LoadConfig().
|
private |
Definition at line 84 of file MECGenerator.h.
Referenced by LoadConfig(), and SelectSuSALeptonKinematics().
|
mutableprivate |
Definition at line 70 of file MECGenerator.h.
Referenced by GetXSecMaxTlctl(), ProcessEventRecord(), SelectEmpiricalKinematics(), SelectNSVLeptonKinematics(), and SelectSuSALeptonKinematics().