Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
genie::KNOHadronization Class Reference

A KNO-based hadronization model. More...

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+3.10-2.17-e17-debug/GENIE-Generator/src/Physics/Hadronization/KNOHadronization.h"

Inheritance diagram for genie::KNOHadronization:
genie::HadronizationModelBase genie::HadronizationModelI genie::Algorithm

Public Member Functions

 KNOHadronization ()
 
 KNOHadronization (string config)
 
virtual ~KNOHadronization ()
 
void Initialize (void) const
 
TClonesArray * Hadronize (const Interaction *) const
 
double Weight (void) const
 
PDGCodeListSelectParticles (const Interaction *) const
 
TH1D * MultiplicityProb (const Interaction *, Option_t *opt="") const
 
void Configure (const Registry &config)
 
void Configure (string config)
 
virtual void FindConfig (void)
 
virtual const RegistryGetConfig (void) const
 
RegistryGetOwnedConfig (void)
 
virtual const AlgIdId (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 AlgorithmSubAlg (const RgKey &registry_key) const
 
void AdoptConfig (void)
 
void AdoptSubstructure (void)
 
virtual void Print (ostream &stream) const
 Print algorithm info. More...
 

Protected Member Functions

void Initialize (void)
 
double Wmin (void) const
 Various utility methods common to hadronization models. More...
 
double MaxMult (const Interaction *i) const
 
void ApplyRijk (const Interaction *i, bool norm, TH1D *mp) const
 
TH1D * CreateMultProbHist (double maxmult) const
 
void DeleteConfig (void)
 
void DeleteSubstructure (void)
 
RegistryExtractLocalConfig (const Registry &in) const
 
RegistryExtractLowerConfig (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 >
bool GetParamVect (const std::string &comm_name, std::vector< T > &v, unsigned int max, 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

double fWcut
 configuration data common to all hadronizers More...
 
double fRvpCCm2
 neugen's Rijk: vp, CC, multiplicity = 2 More...
 
double fRvpCCm3
 neugen's Rijk: vp, CC, multiplicity = 3 More...
 
double fRvpNCm2
 neugen's Rijk: vp, NC, multiplicity = 2 More...
 
double fRvpNCm3
 neugen's Rijk: vp, NC, multiplicity = 3 More...
 
double fRvnCCm2
 neugen's Rijk: vn, CC, multiplicity = 2 More...
 
double fRvnCCm3
 neugen's Rijk: vn, CC, multiplicity = 3 More...
 
double fRvnNCm2
 neugen's Rijk: vn, NC, multiplicity = 2 More...
 
double fRvnNCm3
 neugen's Rijk: vn, NC, multiplicity = 3 More...
 
double fRvbpCCm2
 neugen's Rijk: vbp, CC, multiplicity = 2 More...
 
double fRvbpCCm3
 neugen's Rijk: vbp, CC, multiplicity = 3 More...
 
double fRvbpNCm2
 neugen's Rijk: vbp, NC, multiplicity = 2 More...
 
double fRvbpNCm3
 neugen's Rijk: vbp, NC, multiplicity = 3 More...
 
double fRvbnCCm2
 neugen's Rijk: vbn, CC, multiplicity = 2 More...
 
double fRvbnCCm3
 neugen's Rijk: vbn, CC, multiplicity = 3 More...
 
double fRvbnNCm2
 neugen's Rijk: vbn, NC, multiplicity = 2 More...
 
double fRvbnNCm3
 neugen's Rijk: vbn, NC, multiplicity = 3 More...
 
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...
 
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool) More...
 

Private Member Functions

void LoadConfig (void)
 
bool AssertValidity (const Interaction *i) const
 
PDGCodeListGenerateHadronCodes (int mult, int maxQ, double W) const
 
int GenerateBaryonPdgCode (int mult, int maxQ, double W) const
 
int HadronShowerCharge (const Interaction *) const
 
double KNO (int nu, int nuc, double z) const
 
double AverageChMult (int nu, int nuc, double W) const
 
void HandleDecays (TClonesArray *particle_list) const
 
double ReWeightPt2 (const PDGCodeList &pdgcv) const
 
TClonesArray * DecayMethod1 (double W, const PDGCodeList &pdgv, bool reweight_decays) const
 
TClonesArray * DecayMethod2 (double W, const PDGCodeList &pdgv, bool reweight_decays) const
 
TClonesArray * DecayBackToBack (double W, const PDGCodeList &pdgv) const
 
bool PhaseSpaceDecay (TClonesArray &pl, TLorentzVector &pd, const PDGCodeList &pdgv, int offset=0, bool reweight=false) const
 

Private Attributes

TGenPhaseSpace fPhaseSpaceGenerator
 a phase space generator More...
 
double fWeight
 weight for generated event More...
 
const DecayModelIfDecayer
 decay algorithm More...
 
bool fForceNeuGenLimit
 force upper hadronic multiplicity to NeuGEN limit More...
 
bool fUseIsotropic2BDecays
 force isotropic, non-reweighted 2-body decays for consistency with neugen/daikon More...
 
bool fUseBaryonXfPt2Param
 Generate baryon xF,pT2 from experimental parameterization? More...
 
bool fReWeightDecays
 Reweight phase space decays? More...
 
bool fForceDecays
 force decays of unstable hadrons produced? More...
 
bool fForceMinMult
 force minimum multiplicity if (at low W) generated less? More...
 
bool fGenerateWeighted
 generate weighted events? More...
 
double fPhSpRwA
 parameter for phase space decay reweighting More...
 
double fPpi0
 {pi0 pi0 } production probability More...
 
double fPpic
 {pi+ pi- } production probability More...
 
double fPKc
 {K+ K- } production probability More...
 
double fPK0
 {K0 K0bar} production probability More...
 
double fPpi0eta
 {Pi0 eta} production probability More...
 
double fPeta
 {eta eta} production probability More...
 
double fAvp
 offset in average charged hadron multiplicity = f(W) relation for vp More...
 
double fAvn
 offset in average charged hadron multiplicity = f(W) relation for vn More...
 
double fAvbp
 offset in average charged hadron multiplicity = f(W) relation for vbp More...
 
double fAvbn
 offset in average charged hadron multiplicity = f(W) relation for vbn More...
 
double fBvp
 slope in average charged hadron multiplicity = f(W) relation for vp More...
 
double fBvn
 slope in average charged hadron multiplicity = f(W) relation for vn More...
 
double fBvbp
 slope in average charged hadron multiplicity = f(W) relation for vbp More...
 
double fBvbn
 slope in average charged hadron multiplicity = f(W) relation for vbn More...
 
double fAhyperon
 parameter controlling strange baryon production probability via associated production (P=a+b*lnW^2) More...
 
double fBhyperon
 see above More...
 
double fCvp
 Levy function parameter for vp. More...
 
double fCvn
 Levy function parameter for vn. More...
 
double fCvbp
 Levy function parameter for vbp. More...
 
double fCvbn
 Levy function parameter for vbn. More...
 
TF1 * fBaryonXFpdf
 baryon xF PDF More...
 
TF1 * fBaryonPT2pdf
 baryon pT^2 PDF More...
 

Detailed Description

A KNO-based hadronization model.

Is a concrete implementation of the HadronizationModelI interface.

Author
The main authors of this model are:
      - Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
        University of Liverpool & STFC Rutherford Appleton Lab

      - Hugh Gallagher <gallag@minos.phy.tufts.edu>
        Tufts University

      - Tinjun Yang <tjyang@stanford.edu>
        Stanford University

      This is an improved version of the legacy neugen3 KNO-based model. 
      Giles Barr, Geoff Pearce, and Hugh Gallagher were listed as authors
      of the original neugen3 model.

      Strange baryon production was implemented by Keith Hofmann and
      Hugh Gallagher (Tufts)

      Production of etas was added by Ji Liu (W&M)

      Changes required to implement the GENIE Boosted Dark Matter module
      were installed by Josh Berger (Univ. of Wisconsin)

August 17, 2004

Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 55 of file KNOHadronization.h.

Constructor & Destructor Documentation

KNOHadronization::KNOHadronization ( )

Definition at line 67 of file KNOHadronization.cxx.

References fBaryonPT2pdf, and fBaryonXFpdf.

67  :
68 HadronizationModelBase("genie::KNOHadronization")
69 {
70  fBaryonXFpdf = 0;
71  fBaryonPT2pdf = 0;
72 //fKNO = 0;
73 }
TF1 * fBaryonPT2pdf
baryon pT^2 PDF
TF1 * fBaryonXFpdf
baryon xF PDF
KNOHadronization::KNOHadronization ( string  config)

Definition at line 75 of file KNOHadronization.cxx.

References fBaryonPT2pdf, and fBaryonXFpdf.

75  :
76 HadronizationModelBase("genie::KNOHadronization", config)
77 {
78  fBaryonXFpdf = 0;
79  fBaryonPT2pdf = 0;
80 //fKNO = 0;
81 }
TF1 * fBaryonPT2pdf
baryon pT^2 PDF
Definition: config.py:1
TF1 * fBaryonXFpdf
baryon xF PDF
KNOHadronization::~KNOHadronization ( )
virtual

Definition at line 83 of file KNOHadronization.cxx.

References fBaryonPT2pdf, and fBaryonXFpdf.

84 {
85  if (fBaryonXFpdf ) delete fBaryonXFpdf;
86  if (fBaryonPT2pdf) delete fBaryonPT2pdf;
87 //if (fKNO ) delete fKNO;
88 }
TF1 * fBaryonPT2pdf
baryon pT^2 PDF
TF1 * fBaryonXFpdf
baryon xF PDF

Member Function Documentation

int Algorithm::AddLowRegistry ( Registry rp,
bool  owns = true 
)
protectedinherited

add registry with lowest priority, also update ownership

Definition at line 601 of file Algorithm.cxx.

Referenced by genie::EventGenerator::Configure().

601  {
602 
603  fConfVect.push_back( rp ) ;
604  fOwnerships.push_back( own ) ;
605 
606  if ( fConfig ) {
607  delete fConfig ;
608  fConfig = 0 ;
609  }
610 
611  return fConfVect.size() ;
612 
613 }
vector< Registry * > fConfVect
Definition: Algorithm.h:161
vector< bool > fOwnerships
ownership for every registry in fConfVect
Definition: Algorithm.h:164
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
int Algorithm::AddTopRegisties ( const vector< Registry * > &  rs,
bool  owns = false 
)
protectedinherited

Add registries with top priority, also udated Ownerships.

Definition at line 653 of file Algorithm.cxx.

653  {
654 
655  fConfVect.insert( fConfVect.begin(), rs.begin(), rs.end() ) ;
656 
657  fOwnerships.insert( fOwnerships.begin(), rs.size(), own ) ;
658 
659  if ( fConfig ) {
660  delete fConfig ;
661  fConfig = 0 ;
662  }
663 
664  return fConfVect.size() ;
665 
666 }
vector< Registry * > fConfVect
Definition: Algorithm.h:161
vector< bool > fOwnerships
ownership for every registry in fConfVect
Definition: Algorithm.h:164
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
int Algorithm::AddTopRegistry ( Registry rp,
bool  owns = true 
)
protectedinherited

add registry with top priority, also update ownership

Definition at line 585 of file Algorithm.cxx.

Referenced by genie::EventGeneratorListAssembler::AssembleGeneratorList().

585  {
586 
587  fConfVect.insert( fConfVect.begin(), rp ) ;
588  fOwnerships.insert( fOwnerships.begin(), own ) ;
589 
590  if ( fConfig ) {
591  delete fConfig ;
592  fConfig = 0 ;
593  }
594 
595  return fConfVect.size() ;
596 
597 }
vector< Registry * > fConfVect
Definition: Algorithm.h:161
vector< bool > fOwnerships
ownership for every registry in fConfVect
Definition: Algorithm.h:164
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
void Algorithm::AdoptConfig ( void  )
inherited

Clone the configuration registry looked up from the configuration pool and take its ownership

Definition at line 394 of file Algorithm.cxx.

References Configure(), GetConfig(), LOG, and pNOTICE.

Referenced by genie::Algorithm::AllowReconfig().

394  {
395 
396  LOG("Algorithm", pNOTICE)
397  << this->Id().Key() << " is taking ownership of its configuration";
398 
399  // if(fOwnsConfig) {
400  // LOG("Algorithm", pWARN)
401  // << this->Id().Key() << " already owns its configuration!";
402  // return;
403  // }
404 
405  this->Configure( GetConfig() );
406 }
virtual const Registry & GetConfig(void) const
Definition: Algorithm.cxx:254
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:70
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:98
#define pNOTICE
Definition: Messenger.h:62
string Key(void) const
Definition: AlgId.h:47
void Algorithm::AdoptSubstructure ( void  )
inherited

Take ownership of the algorithms subtructure (sub-algorithms,...) by copying them from the AlgFactory pool to the local pool Also bring all the configuration variables to the top level config Registry. This can be used to group together a series of algorithms & their configurations and extract (a clone of) this group from the shared pools. Having a series of algorithms/configurations behaving as a monolithic block, with a single point of configuration (the top level) is to be used when bits & pieces of GENIE are used in isolation for data fitting or reweighting

Definition at line 408 of file Algorithm.cxx.

References genie::AlgFactory::AdoptAlgorithm(), genie::Algorithm::AdoptSubstructure(), GetConfig(), genie::AlgFactory::Instance(), genie::kRgAlg, LOG, pDEBUG, pNOTICE, and genie::RegistryItemI::TypeInfo().

Referenced by genie::Algorithm::AdoptSubstructure(), genie::Algorithm::AllowReconfig(), main(), and testReconfigInOwnedModules().

409 {
410 // Take ownership of the algorithms subtructure (sub-algorithms,..) by copying
411 // them from the AlgFactory pool to the local pool. Also bring all the
412 // configuration variables to the top level. See the header for more details.
413 // A secial naming convention is required for configuration parameter keys
414 // for parameters belonging to sub-algorithms (or sub-algorithms of these
415 // sub-algorithms and so on...).
416 // The convention is: "sub-alg-key/sub-sub-alg-key/.../original name"
417 // This is a recursive method: The AdoptSubtructure()of all sub-algorithms is
418 // invoked.
419 //
420  LOG("Algorithm", pNOTICE)
421  << "Algorithm: " << this->Id().Key() << " is adopting its substructure";
422 
423 // Registry deep_config;
424 // deep_config.UnLock();
425 // deep_config.SetName(this->Id().Key());
426 
427  // deep_config.SetName(this->Id().Config() + ";D");
428  // fID.SetConfig(this->Id().Config() + ";D");
429 
430  if(fOwnsSubstruc) this->DeleteSubstructure();
431 
432  fOwnedSubAlgMp = new AlgMap;
433  fOwnsSubstruc = true;
434 
435  AlgFactory * algf = AlgFactory::Instance();
436 
437  const RgIMap & rgmap = GetConfig().GetItemMap();
438 
439  RgIMapConstIter iter = rgmap.begin();
440  for( ; iter != rgmap.end(); ++iter) {
441 
442  RgKey reg_key = iter->first;
443  RegistryItemI * ri = iter->second;
444 
445  if(ri->TypeInfo() == kRgAlg) {
446  LOG("Algorithm", pDEBUG)
447  << "Found sub-algorithm pointed to by " << reg_key;
448  RgAlg reg_alg = fConfig->GetAlg(reg_key);
449  AlgId id(reg_alg);
450 
451  LOG("Algorithm", pDEBUG) << "Adopting sub-algorithm = " << id.Key();
452  Algorithm * subalg = algf->AdoptAlgorithm(id.Name(),id.Config());
453  subalg->AdoptSubstructure();
454 
455  LOG("Algorithm", pDEBUG) << "Adding sub-algorithm to local pool";
456  AlgMapPair key_alg_pair(reg_key, subalg);
457  fOwnedSubAlgMp->insert(key_alg_pair);
458 
459  }
460 
461  }
462 
463 
464  if ( fConfig ) {
465  delete fConfig ;
466  fConfig = 0 ;
467  }
468 
469 }
::xsd::cxx::tree::id< char, ncname > id
Definition: Database.h:165
void DeleteSubstructure(void)
Definition: Algorithm.cxx:496
AlgMap * fOwnedSubAlgMp
local pool for owned sub-algs (taken out of the factory pool)
Definition: Algorithm.h:167
bool fOwnsSubstruc
true if it owns its substructure (sub-algs,...)
Definition: Algorithm.h:155
Algorithm abstract base class.
Definition: Algorithm.h:54
map< string, Algorithm * > AlgMap
Definition: Algorithm.h:49
Registry item pABC.
Definition: RegistryItemI.h:30
virtual const Registry & GetConfig(void) const
Definition: Algorithm.cxx:254
virtual RgType_t TypeInfo(void) const =0
map< RgKey, RegistryItemI * >::const_iterator RgIMapConstIter
Definition: Registry.h:50
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
const RgIMap & GetItemMap(void) const
Definition: Registry.h:162
void AdoptSubstructure(void)
Definition: Algorithm.cxx:408
pair< string, Algorithm * > AlgMapPair
Definition: Algorithm.h:52
Algorithm * AdoptAlgorithm(const AlgId &algid) const
Definition: AlgFactory.cxx:127
Algorithm ID (algorithm name + configuration set name)
Definition: AlgId.h:35
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:98
static AlgFactory * Instance()
Definition: AlgFactory.cxx:75
string RgKey
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
#define pNOTICE
Definition: Messenger.h:62
The GENIE Algorithm Factory.
Definition: AlgFactory.h:40
string Key(void) const
Definition: AlgId.h:47
RgAlg GetAlg(RgKey key) const
Definition: Registry.cxx:503
#define pDEBUG
Definition: Messenger.h:64
map< RgKey, RegistryItemI * > RgIMap
Definition: Registry.h:46
virtual bool genie::Algorithm::AllowReconfig ( void  ) const
inlinevirtualinherited
void HadronizationModelBase::ApplyRijk ( const Interaction i,
bool  norm,
TH1D *  mp 
) const
protectedinherited

Definition at line 80 of file HadronizationModelBase.cxx.

References genie::HadronizationModelBase::fRvbnCCm2, genie::HadronizationModelBase::fRvbnCCm3, genie::HadronizationModelBase::fRvbnNCm2, genie::HadronizationModelBase::fRvbnNCm3, genie::HadronizationModelBase::fRvbpCCm2, genie::HadronizationModelBase::fRvbpCCm3, genie::HadronizationModelBase::fRvbpNCm2, genie::HadronizationModelBase::fRvbpNCm3, genie::HadronizationModelBase::fRvnCCm2, genie::HadronizationModelBase::fRvnCCm3, genie::HadronizationModelBase::fRvnNCm2, genie::HadronizationModelBase::fRvnNCm3, genie::HadronizationModelBase::fRvpCCm2, genie::HadronizationModelBase::fRvpCCm3, genie::HadronizationModelBase::fRvpNCm2, genie::HadronizationModelBase::fRvpNCm3, genie::Target::HitNucPdg(), MECModelEnuComparisons::i, genie::Interaction::InitState(), genie::pdg::IsAntiNeutrino(), genie::pdg::IsDarkMatter(), genie::ProcessInfo::IsDarkMatter(), genie::ProcessInfo::IsEM(), genie::pdg::IsNegChargedLepton(), genie::pdg::IsNeutrino(), genie::pdg::IsNeutron(), genie::pdg::IsPosChargedLepton(), genie::pdg::IsProton(), genie::ProcessInfo::IsWeakCC(), genie::ProcessInfo::IsWeakNC(), LOG, getGoodRuns4SAM::n, nbins, P, pDEBUG, pERROR, genie::InitialState::ProbePdg(), genie::Interaction::ProcInfo(), R, and genie::InitialState::Tgt().

Referenced by genie::PythiaHadronization::MultiplicityProb(), and MultiplicityProb().

82 {
83 // Apply the NEUGEN multiplicity probability scaling factors
84 //
85  if(!mp) return;
86 
87  const InitialState & init_state = interaction->InitState();
88  int probe_pdg = init_state.ProbePdg();
89  int nuc_pdg = init_state.Tgt().HitNucPdg();
90 
91  const ProcessInfo & proc_info = interaction->ProcInfo();
92  bool is_CC = proc_info.IsWeakCC();
93  bool is_NC = proc_info.IsWeakNC();
94  bool is_EM = proc_info.IsEM();
95  // EDIT
96  bool is_dm = proc_info.IsDarkMatter();
97 
98  //
99  // get the R2, R3 factors
100  //
101 
102  double R2=1., R3=1.;
103 
104  // weak CC or NC case
105  // EDIT
106  if(is_CC || is_NC || is_dm) {
107  bool is_nu = pdg::IsNeutrino (probe_pdg);
108  bool is_nubar = pdg::IsAntiNeutrino (probe_pdg);
109  bool is_p = pdg::IsProton (nuc_pdg);
110  bool is_n = pdg::IsNeutron (nuc_pdg);
111  bool is_dmi = pdg::IsDarkMatter (probe_pdg); // EDIT
112  if((is_nu && is_p) || (is_dmi && is_p)) {
113  R2 = (is_CC) ? fRvpCCm2 : fRvpNCm2;
114  R3 = (is_CC) ? fRvpCCm3 : fRvpNCm3;
115  } else
116  if((is_nu && is_n) || (is_dmi && is_n)) {
117  R2 = (is_CC) ? fRvnCCm2 : fRvnNCm2;
118  R3 = (is_CC) ? fRvnCCm3 : fRvnNCm3;
119  } else
120  if(is_nubar && is_p) {
121  R2 = (is_CC) ? fRvbpCCm2 : fRvbpNCm2;
122  R3 = (is_CC) ? fRvbpCCm3 : fRvbpNCm3;
123  } else
124  if(is_nubar && is_n) {
125  R2 = (is_CC) ? fRvbnCCm2 : fRvbnNCm2;
126  R3 = (is_CC) ? fRvbnCCm3 : fRvbnNCm3;
127  } else {
128  LOG("BaseHad", pERROR)
129  << "Invalid initial state: " << init_state;
130  }
131  }//cc||nc?
132 
133  // EM case (apply the NC tuning factors)
134 
135  if(is_EM) {
136  bool is_l = pdg::IsNegChargedLepton (probe_pdg);
137  bool is_lbar = pdg::IsPosChargedLepton (probe_pdg);
138  bool is_p = pdg::IsProton (nuc_pdg);
139  bool is_n = pdg::IsNeutron (nuc_pdg);
140  if(is_l && is_p) {
141  R2 = fRvpNCm2;
142  R3 = fRvpNCm3;
143  } else
144  if(is_l && is_n) {
145  R2 = fRvnNCm2;
146  R3 = fRvnNCm3;
147  } else
148  if(is_lbar && is_p) {
149  R2 = fRvbpNCm2;
150  R3 = fRvbpNCm3;
151  } else
152  if(is_lbar && is_n) {
153  R2 = fRvbnNCm2;
154  R3 = fRvbnNCm3;
155  } else {
156  LOG("BaseHad", pERROR)
157  << "Invalid initial state: " << init_state;
158  }
159  }//em?
160 
161  //
162  // Apply to the multiplicity probability distribution
163  //
164 
165  int nbins = mp->GetNbinsX();
166  for(int i = 1; i <= nbins; i++) {
167  int n = TMath::Nint( mp->GetBinCenter(i) );
168 
169  double R=1;
170  if (n==2) R=R2;
171  else if (n==3) R=R3;
172 
173  if(n==2 || n==3) {
174  double P = mp->GetBinContent(i);
175  double Psc = R*P;
176  LOG("BaseHad", pDEBUG)
177  << "n=" << n << "/ Scaling factor R = "
178  << R << "/ P " << P << " --> " << Psc;
179  mp->SetBinContent(i, Psc);
180  }
181  if(n>3) break;
182  }
183 
184  // renormalize the histogram?
185  if(norm) {
186  double histo_norm = mp->Integral("width");
187  if(histo_norm>0) mp->Scale(1.0/histo_norm);
188  }
189 }
double fRvnCCm3
neugen&#39;s Rijk: vn, CC, multiplicity = 3
double fRvbpCCm3
neugen&#39;s Rijk: vbp, CC, multiplicity = 3
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:108
#define pERROR
Definition: Messenger.h:60
int HitNucPdg(void) const
Definition: Target.cxx:321
double fRvnNCm2
neugen&#39;s Rijk: vn, NC, multiplicity = 2
double fRvbpCCm2
neugen&#39;s Rijk: vbp, CC, multiplicity = 2
double fRvpCCm2
neugen&#39;s Rijk: vp, CC, multiplicity = 2
bool IsDarkMatter(int pdgc)
Definition: PDGUtils.cxx:125
double fRvbnNCm3
neugen&#39;s Rijk: vbn, NC, multiplicity = 3
double fRvpNCm2
neugen&#39;s Rijk: vp, NC, multiplicity = 2
#define P(a, b, c, d, e, x)
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:304
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:140
const int nbins
Definition: cellShifts.C:15
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:299
bool IsWeakNC(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
double fRvpNCm3
neugen&#39;s Rijk: vp, NC, multiplicity = 3
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:44
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:116
int ProbePdg(void) const
Definition: InitialState.h:65
double fRvbnNCm2
neugen&#39;s Rijk: vbn, NC, multiplicity = 2
TString mp
Definition: loadincs.C:4
#define R(x)
double fRvpCCm3
neugen&#39;s Rijk: vp, CC, multiplicity = 3
double fRvbpNCm2
neugen&#39;s Rijk: vbp, NC, multiplicity = 2
bool IsEM(void) const
double fRvnNCm3
neugen&#39;s Rijk: vn, NC, multiplicity = 3
Float_t norm
bool IsDarkMatter(void) const
double fRvbnCCm3
neugen&#39;s Rijk: vbn, CC, multiplicity = 3
const Target & Tgt(void) const
Definition: InitialState.h:67
bool IsNegChargedLepton(int pdgc)
Definition: PDGUtils.cxx:131
double fRvbpNCm3
neugen&#39;s Rijk: vbp, NC, multiplicity = 3
double fRvnCCm2
neugen&#39;s Rijk: vn, CC, multiplicity = 2
Initial State information.
Definition: InitialState.h:49
#define pDEBUG
Definition: Messenger.h:64
double fRvbnCCm2
neugen&#39;s Rijk: vbn, CC, multiplicity = 2
bool KNOHadronization::AssertValidity ( const Interaction i) const
private

Definition at line 1489 of file KNOHadronization.cxx.

References genie::Interaction::ExclTag(), genie::XclsTag::IsCharmEvent(), LOG, pWARN, W, genie::utils::kinematics::W(), and genie::HadronizationModelBase::Wmin().

Referenced by Hadronize(), MultiplicityProb(), and SelectParticles().

1490 {
1491  if(interaction->ExclTag().IsCharmEvent()) {
1492  LOG("KNOHad", pWARN) << "Can't hadronize charm events";
1493  return false;
1494  }
1495  double W = utils::kinematics::W(interaction);
1496  if(W < this->Wmin()) {
1497  LOG("KNOHad", pWARN) << "Low invariant mass, W = " << W << " GeV!!";
1498  return false;
1499  }
1500  return true;
1501 }
double W(const Interaction *const i)
Definition: KineUtils.cxx:1015
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pWARN
Definition: Messenger.h:61
double Wmin(void) const
Various utility methods common to hadronization models.
#define W(x)
double KNOHadronization::AverageChMult ( int  nu,
int  nuc,
double  W 
) const
private

Definition at line 620 of file KNOHadronization.cxx.

References a, b, fAvbn, fAvbp, fAvn, fAvp, fBvbn, fBvbp, fBvn, fBvp, genie::pdg::IsAntiNeutrino(), genie::pdg::IsDarkMatter(), genie::pdg::IsNegChargedLepton(), genie::pdg::IsNeutrino(), genie::pdg::IsNeutron(), genie::pdg::IsPosChargedLepton(), genie::pdg::IsProton(), LOG, and pERROR.

Referenced by MultiplicityProb().

622 {
623 // computes the average charged multiplicity
624 //
625  bool is_p = pdg::IsProton (nuc_pdg);
626  bool is_n = pdg::IsNeutron (nuc_pdg);
627  bool is_nu = pdg::IsNeutrino (probe_pdg);
628  bool is_nubar = pdg::IsAntiNeutrino (probe_pdg);
629  bool is_l = pdg::IsNegChargedLepton (probe_pdg);
630  bool is_lbar = pdg::IsPosChargedLepton (probe_pdg);
631  // EDIT
632  bool is_dm = pdg::IsDarkMatter (probe_pdg);
633 
634  double a=0, b=0; // params controlling average multiplicity
635 
636  if ( is_p && (is_nu || is_l ) ) { a=fAvp; b=fBvp; }
637  else if ( is_n && (is_nu || is_l ) ) { a=fAvn; b=fBvn; }
638  else if ( is_p && (is_nubar || is_lbar) ) { a=fAvbp; b=fBvbp; }
639  else if ( is_n && (is_nubar || is_lbar) ) { a=fAvbn; b=fBvbn; }
640  // EDIT: assume it's neutrino-like for now...
641  else if ( is_p && is_dm ) { a=fAvp; b=fBvp; }
642  else if ( is_n && is_dm ) { a=fAvn; b=fBvn; }
643  else {
644  LOG("KNOHad", pERROR)
645  << "Invalid initial state (probe = " << probe_pdg << ", "
646  << "hit nucleon = " << nuc_pdg << ")";
647  return 0;
648  }
649 
650  double av_nch = a + b * 2*TMath::Log(W);
651  return av_nch;
652 }
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:108
#define pERROR
Definition: Messenger.h:60
double fAvn
offset in average charged hadron multiplicity = f(W) relation for vn
bool IsDarkMatter(int pdgc)
Definition: PDGUtils.cxx:125
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:304
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:140
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:299
double fBvbp
slope in average charged hadron multiplicity = f(W) relation for vbp
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
double fAvp
offset in average charged hadron multiplicity = f(W) relation for vp
const double a
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:116
double fAvbn
offset in average charged hadron multiplicity = f(W) relation for vbn
double fBvn
slope in average charged hadron multiplicity = f(W) relation for vn
double fBvp
slope in average charged hadron multiplicity = f(W) relation for vp
double fBvbn
slope in average charged hadron multiplicity = f(W) relation for vbn
const hit & b
Definition: hits.cxx:21
#define W(x)
bool IsNegChargedLepton(int pdgc)
Definition: PDGUtils.cxx:131
double fAvbp
offset in average charged hadron multiplicity = f(W) relation for vbp
AlgCmp_t Algorithm::Compare ( const Algorithm alg) const
virtualinherited

Compare with input algorithm.

Definition at line 294 of file Algorithm.cxx.

References genie::AlgId::Config(), genie::Algorithm::Id(), genie::kAlgCmpDiffAlg, genie::kAlgCmpDiffConfig, genie::kAlgCmpIdentical, genie::kAlgCmpUnknown, and genie::AlgId::Name().

Referenced by genie::Algorithm::AllowReconfig().

295 {
296 // Compares itself with the input algorithm
297 
298  string alg1 = this->Id().Name();
299  string config1 = this->Id().Config();
300  string alg2 = algo->Id().Name();
301  string config2 = algo->Id().Config();
302 
303  if(alg1 == alg2)
304  {
305  if(config1 == config2) return kAlgCmpIdentical;
306  else return kAlgCmpDiffConfig;
307  }
308  else return kAlgCmpDiffAlg;
309 
310  return kAlgCmpUnknown;
311 }
string Name(void) const
Definition: AlgId.h:45
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:98
string Config(void) const
Definition: AlgId.h:46
void KNOHadronization::Configure ( const Registry config)
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 415 of file KNOHadronization.cxx.

References genie::Algorithm::Configure(), and LoadConfig().

416 {
417  Algorithm::Configure(config);
418  this->LoadConfig();
419 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:70
void KNOHadronization::Configure ( string  config)
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 421 of file KNOHadronization.cxx.

References genie::Algorithm::Configure(), and LoadConfig().

422 {
424  this->LoadConfig();
425 }
Definition: config.py:1
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:70
TH1D * HadronizationModelBase::CreateMultProbHist ( double  maxmult) const
protectedinherited

Definition at line 68 of file HadronizationModelBase.cxx.

References nbins.

Referenced by genie::PythiaHadronization::MultiplicityProb(), and MultiplicityProb().

69 {
70  double minmult = 2;
71  int nbins = TMath::Nint(maxmult-minmult+1);
72 
73  TH1D * mult_prob = new TH1D("mult_prob",
74  "hadronic multiplicity distribution", nbins, minmult-0.5, maxmult+0.5);
75  mult_prob->SetDirectory(0);
76 
77  return mult_prob;
78 }
const int nbins
Definition: cellShifts.C:15
TClonesArray * KNOHadronization::DecayBackToBack ( double  W,
const PDGCodeList pdgv 
) const
private

Definition at line 823 of file KNOHadronization.cxx.

References ana::assert(), fBaryonPT2pdf, fBaryonXFpdf, genie::RandomGen::Instance(), genie::pdg::IsNeutronOrProton(), LOG, make_associated_cosmic_defs::p4, pERROR, PhaseSpaceDecay(), pINFO, msf_helper::plist, and generate_hists::rnd.

Referenced by DecayMethod2().

825 {
826 // Handles a special case (only two particles) of the 2nd decay method
827 //
828 
829  LOG("KNOHad", pINFO) << "Generating two particles back-to-back";
830 
831  assert(pdgv.size()==2);
832 
834 
835  // Create the particle list
836  TClonesArray * plist = new TClonesArray("TMCParticle", pdgv.size());
837 
838  // Get xF,pT2 distribution (y-) maxima for the rejection method
839  double xFo = 1.1 * fBaryonXFpdf ->GetMaximum(-1,1);
840  double pT2o = 1.1 * fBaryonPT2pdf->GetMaximum( 0,1);
841 
842  TLorentzVector p4(0,0,0,W); // 2-body hadronic system 4p
843 
844  // Do the 2-body decay
845  bool accepted = false;
846  while(!accepted) {
847 
848  // Find an allowed (unweighted) phase space decay for the 2 particles
849  // and add them to the list
850  bool ok = this->PhaseSpaceDecay(*plist, p4, pdgv, 0, false);
851 
852  // If the decay isn't allowed clean-up and return NULL
853  if(!ok) {
854  LOG("KNOHad", pERROR) << "*** Decay forbidden by kinematics! ***";
855  plist->Delete();
856  delete plist;
857  return 0;
858  }
859 
860  // If the decay was allowed, then compute the baryon xF,pT2 and accept/
861  // reject the phase space decays so as to reproduce the xF,pT2 PDFs
862 
863  TMCParticle * baryon = (TMCParticle *) (*plist)[0];
864  assert(pdg::IsNeutronOrProton(baryon->GetKF()));
865 
866  double px = baryon->GetPx();
867  double py = baryon->GetPy();
868  double pz = baryon->GetPz();
869 
870  double pT2 = px*px + py*py;
871  double pL = pz;
872  double xF = pL/(W/2);
873 
874  double pT2rnd = pT2o * rnd->RndHadro().Rndm();
875  double xFrnd = xFo * rnd->RndHadro().Rndm();
876 
877  double pT2pdf = fBaryonPT2pdf->Eval(pT2);
878  double xFpdf = fBaryonXFpdf ->Eval(xF );
879 
880  LOG("KNOHad", pINFO) << "baryon xF = " << xF << ", pT2 = " << pT2;
881 
882  accepted = (xFrnd < xFpdf && pT2rnd < pT2pdf);
883 
884  LOG("KNOHad", pINFO) << ((accepted) ? "Decay accepted":"Decay rejected");
885  }
886  return plist;
887 }
#define pERROR
Definition: Messenger.h:60
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:79
TF1 * fBaryonPT2pdf
baryon pT^2 PDF
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:30
bool PhaseSpaceDecay(TClonesArray &pl, TLorentzVector &pd, const PDGCodeList &pdgv, int offset=0, bool reweight=false) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pINFO
Definition: Messenger.h:63
bool IsNeutronOrProton(int pdgc)
Definition: PDGUtils.cxx:314
assert(nhit_max >=nhit_nbins)
#define W(x)
TF1 * fBaryonXFpdf
baryon xF PDF
TClonesArray * KNOHadronization::DecayMethod1 ( double  W,
const PDGCodeList pdgv,
bool  reweight_decays 
) const
private

Definition at line 686 of file KNOHadronization.cxx.

References LOG, PhaseSpaceDecay(), pINFO, and msf_helper::plist.

Referenced by Hadronize().

688 {
689 // Simple phase space decay including all generated particles.
690 // The old NeuGEN decay strategy.
691 
692  LOG("KNOHad", pINFO) << "** Using Hadronic System Decay method 1";
693 
694  TLorentzVector p4had(0,0,0,W);
695  TClonesArray * plist = new TClonesArray("TMCParticle", pdgv.size());
696 
697  // do the decay
698  bool ok = this->PhaseSpaceDecay(*plist, p4had, pdgv, 0, reweight_decays);
699 
700  // clean-up and return NULL
701  if(!ok) {
702  plist->Delete();
703  delete plist;
704  return 0;
705  }
706  return plist;
707 }
bool PhaseSpaceDecay(TClonesArray &pl, TLorentzVector &pd, const PDGCodeList &pdgv, int offset=0, bool reweight=false) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pINFO
Definition: Messenger.h:63
#define W(x)
TClonesArray * KNOHadronization::DecayMethod2 ( double  W,
const PDGCodeList pdgv,
bool  reweight_decays 
) const
private

Definition at line 709 of file KNOHadronization.cxx.

References DecayBackToBack(), E, fBaryonPT2pdf, fBaryonXFpdf, genie::PDGLibrary::Find(), MECModelEnuComparisons::i, genie::PDGLibrary::Instance(), genie::RandomGen::Instance(), kPi, LOG, plot_validation_datamc::p2, genie::utils::print::P4AsString(), pDEBUG, pERROR, PhaseSpaceDecay(), pINFO, msf_helper::plist, gen_hdf5record::pt, generate_hists::rnd, and ana::Sqrt().

Referenced by Hadronize().

711 {
712 // Generate the baryon based on experimental pT^2 and xF distributions
713 // Then pass the remaining system of N-1 particles to a phase space decayer.
714 // The strategy adopted at the July-2006 hadronization model mini-workshop.
715 
716  LOG("KNOHad", pINFO) << "** Using Hadronic System Decay method 2";
717 
718  // If only 2 particles are input then don't call the phase space decayer
719  if(pdgv.size() == 2) return this->DecayBackToBack(W,pdgv);
720 
721  // Now handle the more general case:
722 
723  // Take the baryon
724  int baryon = pdgv[0];
725  double MN = PDGLibrary::Instance()->Find(baryon)->Mass();
726  double MN2 = TMath::Power(MN, 2);
727 
728  // Check baryon code
729  // ...
730 
731  // Strip the PDG list from the baryon
732  bool allowdup = true;
733  PDGCodeList pdgv_strip(pdgv.size()-1, allowdup);
734  for(unsigned int i=1; i<pdgv.size(); i++) pdgv_strip[i-1] = pdgv[i];
735 
736  // Get the sum of all masses for the particles in the stripped list
737  double mass_sum = 0;
738  vector<int>::const_iterator pdg_iter = pdgv_strip.begin();
739  for( ; pdg_iter != pdgv_strip.end(); ++pdg_iter) {
740  int pdgc = *pdg_iter;
741  mass_sum += PDGLibrary::Instance()->Find(pdgc)->Mass();
742  }
743 
744  // Create the particle list
745  TClonesArray * plist = new TClonesArray("TMCParticle", pdgv.size());
746 
748  TLorentzVector p4had(0,0,0,W);
749  TLorentzVector p4N (0,0,0,0);
750  TLorentzVector p4d;
751 
752  // generate the N 4-p independently
753 
754  bool got_baryon_4p = false;
755  bool got_hadsyst_4p = false;
756 
757  while(!got_hadsyst_4p) {
758 
759  LOG("KNOHad", pINFO) << "Generating p4 for baryon with pdg = " << baryon;
760 
761  while(!got_baryon_4p) {
762 
763  //-- generate baryon xF and pT2
764  double xf = fBaryonXFpdf ->GetRandom();
765  double pt2 = fBaryonPT2pdf->GetRandom();
766 
767  //-- generate baryon px,py,pz
768  double pt = TMath::Sqrt(pt2);
769  double phi = (2*kPi) * rnd->RndHadro().Rndm();
770  double px = pt * TMath::Cos(phi);
771  double py = pt * TMath::Sin(phi);
772  double pz = xf*W/2;
773  double p2 = TMath::Power(pz,2) + pt2;
774  double E = TMath::Sqrt(p2+MN2);
775 
776  p4N.SetPxPyPzE(px,py,pz,E);
777 
778  LOG("KNOHad", pDEBUG) << "Trying nucleon xF= "<< xf<< ", pT2= "<< pt2;
779 
780  //-- check whether there is phase space for the remnant N-1 system
781  p4d = p4had-p4N; // 4-momentum vector for phase space decayer
782  double Mav = p4d.Mag();
783 
784  got_baryon_4p = (Mav > mass_sum);
785 
786  } // baryon xf,pt2 seletion
787 
788  LOG("KNOHad", pINFO)
789  << "Generated baryon with P4 = " << utils::print::P4AsString(&p4N);
790 
791  // Insert the baryon at the event record
792  new ((*plist)[0]) TMCParticle(
793  1,baryon,-1,-1,-1, p4N.Px(),p4N.Py(),p4N.Pz(),p4N.Energy(),MN, 0,0,0,0,0);
794 
795  // Do a phase space decay for the N-1 particles and add them to the list
796  LOG("KNOHad", pINFO)
797  << "Generating p4 for the remaining hadronic system";
798  LOG("KNOHad", pINFO)
799  << "Remaining system: Available mass = " << p4d.Mag()
800  << ", Particle masses = " << mass_sum;
801 
802  bool is_ok = this->PhaseSpaceDecay(
803  *plist, p4d, pdgv_strip, 1, reweight_decays);
804 
805  got_hadsyst_4p = is_ok;
806 
807  if(!got_hadsyst_4p) {
808  got_baryon_4p = false;
809  plist->Delete();
810  }
811  }
812 
813  // clean-up and return NULL
814  if(0) {
815  LOG("KNOHad", pERROR) << "*** Decay forbidden by kinematics! ***";
816  plist->Delete();
817  delete plist;
818  return 0;
819  }
820  return plist;
821 }
const double kPi
#define pERROR
Definition: Messenger.h:60
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:79
string P4AsString(const TLorentzVector *p)
Definition: PrintUtils.cxx:34
TF1 * fBaryonPT2pdf
baryon pT^2 PDF
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:30
A list of PDG codes.
Definition: PDGCodeList.h:33
bool PhaseSpaceDecay(TClonesArray &pl, TLorentzVector &pd, const PDGCodeList &pdgv, int offset=0, bool reweight=false) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
Float_t E
Definition: plot.C:20
#define pINFO
Definition: Messenger.h:63
TClonesArray * DecayBackToBack(double W, const PDGCodeList &pdgv) const
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
#define W(x)
TF1 * fBaryonXFpdf
baryon xF PDF
#define pDEBUG
Definition: Messenger.h:64
void Algorithm::DeleteConfig ( void  )
protectedinherited

Definition at line 471 of file Algorithm.cxx.

References MECModelEnuComparisons::i.

Referenced by genie::Algorithm::AllowReconfig().

472 {
473  // there is nothing to delete if the configuration is not owned but is
474  // rather looked up from the configuration pool
475  //
476 
477  for ( unsigned int i = 0 ; i < fConfVect.size() ; ++i ) {
478  if ( fOwnerships[i] ) {
479  delete fConfVect[i] ;
480  }
481  }
482 
483  fConfVect.clear() ;
484  fOwnerships.clear() ;
485 
486  // delete owned configuration registry
487 
488  if(fConfig) {
489  delete fConfig;
490  fConfig=0;
491  }
492 
493 }
vector< Registry * > fConfVect
Definition: Algorithm.h:161
vector< bool > fOwnerships
ownership for every registry in fConfVect
Definition: Algorithm.h:164
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
void Algorithm::DeleteSubstructure ( void  )
protectedinherited

Definition at line 496 of file Algorithm.cxx.

Referenced by genie::Algorithm::AllowReconfig().

497 {
498  // there is nothing to delete if the sub-algorithms are not owned but rather
499  // taken from the AlgFactory's pool
500  //
501  if(!fOwnsSubstruc) return;
502 
503  // delete local algorithm pool
504  //
505  AlgMapIter iter = fOwnedSubAlgMp->begin();
506  for( ; iter != fOwnedSubAlgMp->end(); ++iter) {
507  Algorithm * alg = iter->second;
508  if(alg) {
509  delete alg;
510  alg=0;
511  }
512  }
513  delete fOwnedSubAlgMp;
514  fOwnedSubAlgMp = 0;
515 }
AlgMap * fOwnedSubAlgMp
local pool for owned sub-algs (taken out of the factory pool)
Definition: Algorithm.h:167
bool fOwnsSubstruc
true if it owns its substructure (sub-algs,...)
Definition: Algorithm.h:155
Algorithm abstract base class.
Definition: Algorithm.h:54
map< string, Algorithm * >::iterator AlgMapIter
Definition: Algorithm.h:50
Registry * Algorithm::ExtractLocalConfig ( const Registry in) const
protectedinherited

Split an incoming configuration Registry into a block valid for this algorithm Ownership of the returned registry belongs to the algo

Definition at line 518 of file Algorithm.cxx.

References genie::RegistryItemI::Clone(), genie::Registry::GetItemMap(), genie::Registry::Name(), and confusionMatrixTree::out.

Referenced by genie::Algorithm::AllowReconfig().

518  {
519 
520  const RgIMap & rgmap = in.GetItemMap();
521  Registry * out = new Registry( in.Name(), false );
522 
523  for( RgIMapConstIter reg_iter = rgmap.begin();
524  reg_iter != rgmap.end(); ++reg_iter ) {
525 
526  RgKey reg_key = reg_iter->first;
527  if( reg_key.find( '/' ) != string::npos) continue;
528 
529  // at this point
530  // this key is referred to the local algorithm
531  // it has to be copied in out;
532 
533  RegistryItemI * ri = reg_iter->second;
534  RgIMapPair key_item_pair( reg_key, ri->Clone() );
535  out -> Set(key_item_pair);
536 
537  }
538 
539  if ( out -> NEntries() <= 0 ) {
540  delete out ;
541  out = 0 ;
542  }
543 
544  return out ;
545 }
Registry item pABC.
Definition: RegistryItemI.h:30
string Name(void) const
get the registry name
Definition: Registry.cxx:612
map< RgKey, RegistryItemI * >::const_iterator RgIMapConstIter
Definition: Registry.h:50
const RgIMap & GetItemMap(void) const
Definition: Registry.h:162
pair< RgKey, RegistryItemI * > RgIMapPair
Definition: Registry.h:47
string RgKey
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
virtual RegistryItemI * Clone(void) const =0
map< RgKey, RegistryItemI * > RgIMap
Definition: Registry.h:46
Registry * Algorithm::ExtractLowerConfig ( const Registry in,
const string alg_key 
) const
protectedinherited

Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.

Definition at line 549 of file Algorithm.cxx.

References genie::RegistryItemI::Clone(), genie::Registry::GetItemMap(), genie::Registry::Name(), and confusionMatrixTree::out.

Referenced by genie::Algorithm::AllowReconfig().

549  {
550 
551  const RgIMap & rgmap = in.GetItemMap();
552  Registry * out = new Registry( in.Name(), false );
553 
554  for( RgIMapConstIter reg_iter = rgmap.begin();
555  reg_iter != rgmap.end(); ++reg_iter ) {
556 
557  RgKey reg_key = reg_iter->first;
558  if( reg_key.find(alg_key+"/") == string::npos) continue;
559 
560  // at this point
561  // this key is referred to the sub-algorithm
562  // indicated by alg_key: it has to be copied in out;
563 
564  int new_key_start = reg_key.find_first_of('/')+1;
565  RgKey new_reg_key = reg_key.substr( new_key_start, reg_key.length() );
566 
567  RegistryItemI * ri = reg_iter->second;
568  RgIMapPair key_item_pair(new_reg_key, ri->Clone());
569  out -> Set(key_item_pair);
570 
571  }
572 
573  if ( out -> NEntries() <= 0 ) {
574  delete out ;
575  out = 0 ;
576  }
577 
578  return out ;
579 
580 }
Registry item pABC.
Definition: RegistryItemI.h:30
string Name(void) const
get the registry name
Definition: Registry.cxx:612
map< RgKey, RegistryItemI * >::const_iterator RgIMapConstIter
Definition: Registry.h:50
const RgIMap & GetItemMap(void) const
Definition: Registry.h:162
pair< RgKey, RegistryItemI * > RgIMapPair
Definition: Registry.h:47
string RgKey
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
virtual RegistryItemI * Clone(void) const =0
map< RgKey, RegistryItemI * > RgIMap
Definition: Registry.h:46
void Algorithm::FindConfig ( void  )
virtualinherited

Lookup configuration from the config pool Similar logic from void Configure(string)

Definition at line 135 of file Algorithm.cxx.

References gen_hdf5record::config, exit(), genie::AlgConfigPool::FindRegistry(), genie::Registry::GetItemMap(), genie::Registry::GetString(), MECModelEnuComparisons::i, genie::AlgConfigPool::Instance(), it, genie::Registry::ItemIsLocal(), parse_dependency_file_t::list, LOG, pDEBUG, pFATAL, time_estimates::pool, pWARN, moon_position_table_new3::second, genie::utils::str::Split(), string, and APDHVSetting::temp.

136 {
137 // Finds its configration Registry from the ConfigPool and gets a pointer to
138 // it. If the Registry comes from the ConfigPool then the Algorithm does not
139 // own its configuration (the ConfigPool singleton keeps the ownership and the
140 // responsibility to -eventually- delete all the Registries it instantiates
141 // by parsing the XML config files).
142 
143  DeleteConfig() ;
144 
146 
147  Registry * config = 0 ;
148 
149  // load the Default config if config is not the default
150  if ( fID.Config() != "Default" ) {
151  config = pool -> FindRegistry( fID.Name(), "Default" );
152  if ( config ) {
153  if ( config -> NEntries() > 0 ) {
154  AddTopRegistry( config, false ) ;
155  LOG("Algorithm", pDEBUG) << "\n" << *config;
156  }
157  }
158  }
159 
160  // Load the right config
161  config = pool->FindRegistry(this);
162 
163  if(!config)
164  // notify & keep whatever config Registry was used before.
165  LOG("Algorithm", pWARN)
166  << "No Configuration available for "
167  << this->Id().Key() << " at the ConfigPool";
168  else {
169  if ( config -> NEntries() > 0 ) {
170  AddTopRegistry( config, false ) ;
171  LOG("Algorithm", pDEBUG) << "\n" << config;
172  }
173  }
174 
175  const string common_key_root = "Common" ;
176  std::map<string, string> common_lists;
177 
178  // Load Common Parameters if key that start with "Common" is found
179  for ( unsigned int i = 0 ; i < fConfVect.size() ; ++i ) {
180  const Registry & temp = * fConfVect[i] ;
181  for ( RgIMapConstIter it = temp.GetItemMap().begin() ; it != temp.GetItemMap().end() ; ++it ) {
182 
183  // check if it is a "Common" entry
184  if ( it -> first.find( common_key_root ) == 0 ) {
185  // retrieve the type of the common entry
186  std::string type = it -> first.substr(common_key_root.size() ) ;
187 
188  if ( temp.ItemIsLocal( it -> first ) ) {
189 
190  string temp_list = temp.GetString( it -> first ) ;
191  if ( temp_list.length() > 0 ) {
192  common_lists[type] = temp_list ;
193  }
194  }
195  }
196 
197  }
198 
199  } // loop over the local registries
200 
201 
202  for ( std::map<string, string>::const_iterator it = common_lists.begin() ;
203  it != common_lists.end() ; ++it ) {
204 
205  vector<string> list = str::Split( it -> second , "," ) ;
206 
207  for ( unsigned int i = 0; i < list.size(); ++i ) {
208 
209  config = pool -> CommonList( it -> first, list[i] ) ;
210 
211  if ( ! config ) {
212  LOG("Algorithm", pFATAL)
213  << "No Commom parameters available for " << it -> first << " list "
214  << list[i] << " at the ConfigPool";
215 
216  exit( 78 ) ;
217  }
218  else {
219  AddLowRegistry( config, false ) ;
220  LOG("Algorithm", pDEBUG) << "Loading "
221  << it -> first << " registry "
222  << list[i] << " \n" << config;
223  }
224 
225  }
226 
227  }
228 
229 
230  // Load Tunable from CommonParameters
231  // only if the option is specified in RunOpt
232  config = pool -> CommonList( "Param", "Tunable" ) ;
233  if ( config ) {
234  if ( config -> NEntries() > 0 ) {
235  AddTopRegistry( config, false ) ;
236  LOG("Algorithm", pDEBUG) << "Loading Tunable registry \n" << config;
237  }
238  }
239  else {
240  // notify & keep whatever config Registry was used before.
241  LOG("Algorithm", pWARN)
242  << "No Tunable parameter set available at the ConfigPool";
243  }
244 
245  if ( fConfig ) {
246  delete fConfig ;
247  fConfig = 0 ;
248  }
249 
250 }
set< int >::iterator it
A singleton class holding all configuration registries built while parsing all loaded XML configurati...
Definition: AlgConfigPool.h:41
#define pFATAL
Definition: Messenger.h:57
Definition: config.py:1
AlgId fID
algorithm name and configuration set
Definition: Algorithm.h:156
map< RgKey, RegistryItemI * >::const_iterator RgIMapConstIter
Definition: Registry.h:50
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
const RgIMap & GetItemMap(void) const
Definition: Registry.h:162
string Name(void) const
Definition: AlgId.h:45
bool ItemIsLocal(RgKey key) const
local or global?
Definition: Registry.cxx:193
int AddTopRegistry(Registry *rp, bool owns=true)
add registry with top priority, also update ownership
Definition: Algorithm.cxx:585
#define pWARN
Definition: Messenger.h:61
void DeleteConfig(void)
Definition: Algorithm.cxx:471
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:98
RgStr GetString(RgKey key) const
Definition: Registry.cxx:496
vector< Registry * > fConfVect
Definition: Algorithm.h:161
vector< string > Split(string input, string delim)
Definition: StringUtils.cxx:42
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
exit(0)
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
Registry * FindRegistry(string key) const
int AddLowRegistry(Registry *rp, bool owns=true)
add registry with lowest priority, also update ownership
Definition: Algorithm.cxx:601
string Key(void) const
Definition: AlgId.h:47
static AlgConfigPool * Instance()
#define pDEBUG
Definition: Messenger.h:64
string Config(void) const
Definition: AlgId.h:46
enum BeamMode string
int KNOHadronization::GenerateBaryonPdgCode ( int  mult,
int  maxQ,
double  W 
) const
private

Definition at line 1336 of file KNOHadronization.cxx.

References fAhyperon, fBhyperon, genie::RandomGen::Instance(), genie::kPdgLambda, genie::kPdgNeutron, genie::kPdgProton, genie::kPdgSigmaM, genie::kPdgSigmaP, LOG, pDEBUG, generate_hists::rnd, genie::RandomGen::RndHadro(), submit_syst::x, and submit_syst::y.

Referenced by GenerateHadronCodes().

1338 {
1339 // Selection of main target fragment (identical as in NeuGEN).
1340 // Assign baryon as p or n. Force it for ++ and - I=3/2 at mult. = 2
1341 
1343  double x = rnd->RndHadro().Rndm();
1344  double y = rnd->RndHadro().Rndm();
1345 
1346  // initialize to neutron & then change it to proton if you must
1347  int pdgc = kPdgNeutron;
1348 
1349  // Assign a probability for the given W for the baryon to become strange
1350  // using a function derived from a fit to the data in Jones et al. (1993)
1351  // Don't let the probability be larger than 1.
1352  double Pstr = fAhyperon + fBhyperon * TMath::Log(W*W);
1353  Pstr = TMath::Min(1.,Pstr);
1354  Pstr = TMath::Max(0.,Pstr);
1355 
1356  // Available hadronic system charge = 2
1357  if(maxQ == 2) {
1358  //for multiplicity ==2, force it to p
1359  if(multiplicity ==2 ) pdgc = kPdgProton;
1360  else {
1361  if(x < 0.66667) pdgc = kPdgProton;
1362  }
1363  }
1364  // Available hadronic system charge = 1
1365  if(maxQ == 1) {
1366  if(multiplicity == 2) {
1367  if(x < 0.33333) pdgc = kPdgProton;
1368  } else {
1369  if(x < 0.50000) pdgc = kPdgProton;
1370  }
1371  }
1372 
1373  // Available hadronic system charge = 0
1374  if(maxQ == 0) {
1375  if(multiplicity == 2) {
1376  if(x < 0.66667) pdgc = kPdgProton;
1377  } else {
1378  if(x < 0.50000) pdgc = kPdgProton;
1379  }
1380  }
1381  // Available hadronic system charge = -1
1382  if(maxQ == -1) {
1383  // for multiplicity == 2, force it to n
1384  if(multiplicity != 2) {
1385  if(x < 0.33333) pdgc = kPdgProton;
1386  }
1387  }
1388 
1389  // For neutrino interactions turn protons and neutrons to Sigma+ and
1390  // Lambda respectively (Lambda and Sigma- respectively for anti-neutrino
1391  // interactions).
1392  if(pdgc == kPdgProton && y < Pstr && maxQ > 0) {
1393  pdgc = kPdgSigmaP;
1394  }
1395  else if(pdgc == kPdgProton && y < Pstr && maxQ <= 0) {
1396  pdgc = kPdgLambda;
1397  }
1398  else if(pdgc == kPdgNeutron && y < Pstr && maxQ > 0) {
1399  pdgc = kPdgLambda;
1400  }
1401  else if(pdgc == kPdgNeutron && y < Pstr && maxQ <= 0) {
1402  pdgc = kPdgSigmaM;
1403  }
1404 
1405  if(pdgc == kPdgProton)
1406  LOG("KNOHad", pDEBUG) << " -> Adding a proton";
1407  if(pdgc == kPdgNeutron)
1408  LOG("KNOHad", pDEBUG) << " -> Adding a neutron";
1409  if(pdgc == kPdgSigmaP)
1410  LOG("KNOHad", pDEBUG) << " -> Adding a sigma+";
1411  if(pdgc == kPdgLambda)
1412  LOG("KNOHad", pDEBUG) << " -> Adding a lambda";
1413  if(pdgc == kPdgSigmaM)
1414  LOG("KNOHad", pDEBUG) << " -> Adding a sigma-";
1415 
1416  return pdgc;
1417 }
const int kPdgLambda
Definition: PDGCodes.h:69
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:79
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:30
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
double fBhyperon
see above
const int kPdgSigmaM
Definition: PDGCodes.h:73
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
Definition: RandomGen.h:54
double fAhyperon
parameter controlling strange baryon production probability via associated production (P=a+b*lnW^2) ...
const int kPdgSigmaP
Definition: PDGCodes.h:71
const int kPdgProton
Definition: PDGCodes.h:65
#define W(x)
const int kPdgNeutron
Definition: PDGCodes.h:67
#define pDEBUG
Definition: Messenger.h:64
PDGCodeList * KNOHadronization::GenerateHadronCodes ( int  mult,
int  maxQ,
double  W 
) const
private

Definition at line 1062 of file KNOHadronization.cxx.

References ana::assert(), exit(), om::Icons::Find(), genie::PDGLibrary::Find(), fPeta, fPK0, fPKc, fPpi0, fPpi0eta, fPpic, GenerateBaryonPdgCode(), genie::PDGLibrary::Instance(), genie::RandomGen::Instance(), genie::kPdgAntiK0, genie::kPdgEta, genie::kPdgK0, genie::kPdgKM, genie::kPdgKP, genie::kPdgLambda, genie::kPdgPi0, genie::kPdgPiM, genie::kPdgPiP, genie::kPdgProton, genie::kPdgSigmaM, genie::kPdgSigmaP, LOG, genie::utils::res::Mass(), pDEBUG, make_root_from_grid_output::pdg, pERROR, genie::PDGCodeList::push_back(), generate_hists::rnd, genie::RandomGen::RndHadro(), submit_syst::x, and submit_syst::y.

Referenced by SelectParticles().

1064 {
1065 // Selection of fragments (identical as in NeuGEN).
1066 
1067  // Get PDG library and rnd num generator
1070 
1071  // Create vector to add final state hadron PDG codes
1072  bool allowdup=true;
1073  PDGCodeList * pdgc = new PDGCodeList(allowdup);
1074  //pdgc->reserve(multiplicity);
1075  int hadrons_to_add = multiplicity;
1076 
1077  //
1078  // Assign baryon as p, n, Sigma+, Sigma- or Lambda
1079  //
1080 
1081  int baryon_code = this->GenerateBaryonPdgCode(multiplicity, maxQ, W);
1082  pdgc->push_back(baryon_code);
1083 
1084  bool baryon_is_strange = (baryon_code == kPdgSigmaP ||
1085  baryon_code == kPdgLambda ||
1086  baryon_code == kPdgSigmaM);
1087  bool baryon_chg_is_pos = (baryon_code == kPdgProton ||
1088  baryon_code == kPdgSigmaP);
1089  bool baryon_chg_is_neg = (baryon_code == kPdgSigmaM);
1090 
1091  // Update number of hadrons to add, available shower charge & invariant mass
1092  if(baryon_chg_is_pos) maxQ -= 1;
1093  if(baryon_chg_is_neg) maxQ += 1;
1094  hadrons_to_add--;
1095  W -= pdg->Find( (*pdgc)[0] )->Mass();
1096 
1097  //
1098  // Assign remaining hadrons up to n = multiplicity
1099  //
1100 
1101  // Conserve strangeness
1102  if(baryon_is_strange) {
1103  LOG("KNOHad", pDEBUG)
1104  << " Remnant baryon is strange. Conserving strangeness...";
1105 
1106  //conserve strangeness and handle charge imbalance with one particle
1107  if(multiplicity == 2) {
1108  if(maxQ == 1) {
1109  LOG("KNOHad", pDEBUG) << " -> Adding a K+";
1110  pdgc->push_back( kPdgKP );
1111 
1112  // update n-of-hadrons to add, avail. shower charge & invariant mass
1113  maxQ -= 1;
1114  hadrons_to_add--;
1115  W -= pdg->Find(kPdgKP)->Mass();
1116  }
1117  else if(maxQ == 0) {
1118  LOG("KNOHad", pDEBUG) << " -> Adding a K0";
1119  pdgc->push_back( kPdgK0 );
1120 
1121  // update n-of-hadrons to add, avail. shower charge & invariant mass
1122  hadrons_to_add--;
1123  W -= pdg->Find(kPdgK0)->Mass();
1124  }
1125  }
1126 
1127  //only two particles left to balance charge
1128  else if(multiplicity == 3 && maxQ == 2) {
1129  LOG("KNOHad", pDEBUG) << " -> Adding a K+";
1130  pdgc->push_back( kPdgKP );
1131 
1132  // update n-of-hadrons to add, avail. shower charge & invariant mass
1133  maxQ -= 1;
1134  hadrons_to_add--;
1135  W -= pdg->Find(kPdgKP)->Mass();
1136  }
1137  else if(multiplicity == 3 && maxQ == -1) { //adding K+ makes it impossible to balance charge
1138  LOG("KNOHad", pDEBUG) << " -> Adding a K0";
1139  pdgc->push_back( kPdgK0 );
1140 
1141  // update n-of-hadrons to add, avail. shower charge & invariant mass
1142  hadrons_to_add--;
1143  W -= pdg->Find(kPdgK0)->Mass();
1144  }
1145 
1146  //simply conserve strangeness, without regard to charge
1147  else {
1148  double y = rnd->RndHadro().Rndm();
1149  if(y < 0.5) {
1150  LOG("KNOHad", pDEBUG) <<" -> Adding a K+";
1151  pdgc->push_back( kPdgKP );
1152 
1153  // update n-of-hadrons to add, avail. shower charge & invariant mass
1154  maxQ -= 1;
1155  hadrons_to_add--;
1156  W -= pdg->Find(kPdgKP)->Mass();
1157  }
1158  else {
1159  LOG("KNOHad", pDEBUG) <<" -> Adding a K0";
1160  pdgc->push_back( kPdgK0 );
1161 
1162  // update n-of-hadrons to add, avail. shower charge & invariant mass
1163  hadrons_to_add--;
1164  W -= pdg->Find(kPdgK0)->Mass();
1165  }
1166  }
1167  }//if the baryon is strange
1168 
1169  // Handle charge imbalance
1170  while(maxQ != 0) {
1171 
1172  if (maxQ < 0) {
1173  // Need more negative charge
1174  LOG("KNOHad", pDEBUG) << "Need more negative charge -> Adding a pi-";
1175  pdgc->push_back( kPdgPiM );
1176 
1177  // update n-of-hadrons to add, avail. shower charge & invariant mass
1178  maxQ += 1;
1179  hadrons_to_add--;
1180 
1181  W -= pdg->Find(kPdgPiM)->Mass();
1182 
1183  } else if (maxQ > 0) {
1184  // Need more positive charge
1185  LOG("KNOHad", pDEBUG) << "Need more positive charge -> Adding a pi+";
1186  pdgc->push_back( kPdgPiP );
1187 
1188  // update n-of-hadrons to add, avail. shower charge & invariant mass
1189  maxQ -= 1;
1190  hadrons_to_add--;
1191 
1192  W -= pdg->Find(kPdgPiP)->Mass();
1193  }
1194  }
1195 
1196  // Add remaining neutrals or pairs up to the generated multiplicity
1197  if(maxQ == 0) {
1198 
1199  LOG("KNOHad", pDEBUG)
1200  << "Hadronic charge balanced. Now adding only neutrals or +- pairs";
1201 
1202  // Final state has correct charge.
1203  // Now add pi0 or pairs (pi0 pi0 / pi+ pi- / K+ K- / K0 K0bar) only
1204 
1205  // Masses of particle pairs
1206  double M2pi0 = 2 * pdg -> Find (kPdgPi0) -> Mass();
1207  double M2pic = pdg -> Find (kPdgPiP) -> Mass() +
1208  pdg -> Find (kPdgPiM) -> Mass();
1209  double M2Kc = pdg -> Find (kPdgKP ) -> Mass() +
1210  pdg -> Find (kPdgKM ) -> Mass();
1211  double M2K0 = 2 * pdg -> Find (kPdgK0 ) -> Mass();
1212  double M2Eta = 2 * pdg -> Find (kPdgEta) -> Mass();
1213  double Mpi0eta = pdg -> Find (kPdgPi0) -> Mass() +
1214  pdg -> Find (kPdgEta) -> Mass();
1215 
1216  // Prevent multiplicity overflow.
1217  // Check if we have an odd number of hadrons to add.
1218  // If yes, add a single pi0 and then go on and add pairs
1219 
1220  if( hadrons_to_add > 0 && hadrons_to_add % 2 == 1 ) {
1221 
1222  LOG("KNOHad", pDEBUG)
1223  << "Odd number of hadrons left to add -> Adding a pi0";
1224  pdgc->push_back( kPdgPi0 );
1225 
1226  // update n-of-hadrons to add & available invariant mass
1227  hadrons_to_add--;
1228  W -= pdg->Find(kPdgPi0)->Mass();
1229  }
1230 
1231  // Now add pairs (pi0 pi0 / pi+ pi- / K+ K- / K0 K0bar)
1232  assert( hadrons_to_add % 2 == 0 ); // even number
1233  LOG("KNOHad", pDEBUG)
1234  <<" hadrons_to_add = "<<hadrons_to_add<<" W= "<<W<<" M2pi0 = "<<M2pi0<<" M2pic = "<<M2pic<<" M2Kc = "<<M2Kc<<" M2K0= "<<M2K0<<" M2Eta= "<<M2Eta;
1235 
1236  while(hadrons_to_add > 0 && W >= M2pi0) {
1237 
1238  double x = rnd->RndHadro().Rndm();
1239  LOG("KNOHad", pDEBUG) << "rndm = " << x;
1240  // Add a pi0 pair
1241  if (x >= 0 && x < fPpi0) {
1242  LOG("KNOHad", pDEBUG) << " -> Adding a pi0pi0 pair";
1243  pdgc->push_back( kPdgPi0 );
1244  pdgc->push_back( kPdgPi0 );
1245  hadrons_to_add -= 2; // update the number of hadrons to add
1246  W -= M2pi0; // update the available invariant mass
1247  }
1248 
1249  // Add a pi+ pi- pair
1250  else if (x < fPpi0 + fPpic) {
1251  if(W >= M2pic) {
1252  LOG("KNOHad", pDEBUG) << " -> Adding a pi+pi- pair";
1253  pdgc->push_back( kPdgPiP );
1254  pdgc->push_back( kPdgPiM );
1255  hadrons_to_add -= 2; // update the number of hadrons to add
1256  W -= M2pic; // update the available invariant mass
1257  } else {
1258  LOG("KNOHad", pDEBUG)
1259  << "Not enough mass for a pi+pi-: trying something else";
1260  }
1261  }
1262 
1263  // Add a K+ K- pair
1264  else if (x < fPpi0 + fPpic + fPKc) {
1265  if(W >= M2Kc) {
1266  LOG("KNOHad", pDEBUG) << " -> Adding a K+K- pair";
1267  pdgc->push_back( kPdgKP );
1268  pdgc->push_back( kPdgKM );
1269  hadrons_to_add -= 2; // update the number of hadrons to add
1270  W -= M2Kc; // update the available invariant mass
1271  } else {
1272  LOG("KNOHad", pDEBUG)
1273  << "Not enough mass for a K+K-: trying something else";
1274  }
1275  }
1276 
1277  // Add a K0 - \bar{K0} pair
1278  else if (x <= fPpi0 + fPpic + fPKc + fPK0) {
1279  if( W >= M2K0 ) {
1280  LOG("KNOHad", pDEBUG) << " -> Adding a K0 K0bar pair";
1281  pdgc->push_back( kPdgK0 );
1282  pdgc->push_back( kPdgAntiK0 );
1283  hadrons_to_add -= 2; // update the number of hadrons to add
1284  W -= M2K0; // update the available invariant mass
1285  } else {
1286  LOG("KNOHad", pDEBUG)
1287  << "Not enough mass for a K0 K0bar: trying something else";
1288  }
1289  }
1290 
1291  // Add a Pi0-Eta pair
1292  else if (x <= fPpi0 + fPpic + fPKc + fPK0 + fPpi0eta) {
1293  if( W >= Mpi0eta ) {
1294  LOG("KNOHad", pDEBUG) << " -> Adding a Pi0-Eta pair";
1295  pdgc->push_back( kPdgPi0 );
1296  pdgc->push_back( kPdgEta );
1297  hadrons_to_add -= 2; // update the number of hadrons to add
1298  W -= Mpi0eta; // update the available invariant mass
1299  } else {
1300  LOG("KNOHad", pDEBUG)
1301  << "Not enough mass for a Pi0-Eta pair: trying something else";
1302  }
1303  }
1304 
1305  //Add a Eta pair
1306  else if(x <= fPpi0 + fPpic + fPKc + fPK0 + fPpi0eta + fPeta) {
1307  if( W >= M2Eta ){
1308  LOG("KNOHad", pDEBUG) << " -> Adding a eta-eta pair";
1309  pdgc->push_back( kPdgEta );
1310  pdgc->push_back( kPdgEta );
1311  hadrons_to_add -= 2; // update the number of hadrons to add
1312  W -= M2Eta; // update the available invariant mass
1313  } else {
1314  LOG("KNOHad", pDEBUG)
1315  << "Not enough mass for a Eta-Eta pair: trying something else";
1316  }
1317 
1318  } else {
1319  LOG("KNOHad", pERROR)
1320  << "Hadron Assignment Probabilities do not add up to 1!!";
1321  exit(1);
1322  }
1323 
1324  // make sure it has enough invariant mass to reach the
1325  // given multiplicity, even by adding only the lightest
1326  // hadron pairs (pi0's)
1327  // Otherwise force a lower multiplicity.
1328  if(W < M2pi0) hadrons_to_add = 0;
1329 
1330  } // while there are more hadrons to add
1331  } // if charge is balanced (maxQ == 0)
1332 
1333  return pdgc;
1334 }
double fPpi0eta
{Pi0 eta} production probability
#define pERROR
Definition: Messenger.h:60
const int kPdgLambda
Definition: PDGCodes.h:69
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:79
double fPeta
{eta eta} production probability
double Mass(Resonance_t res)
resonance mass (GeV)
double fPpi0
{pi0 pi0 } production probability
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:30
double fPK0
{K0 K0bar} production probability
A list of PDG codes.
Definition: PDGCodeList.h:33
const int kPdgK0
Definition: PDGCodes.h:151
int GenerateBaryonPdgCode(int mult, int maxQ, double W) const
const char * Find(const char *fname)
Definition: Icons.cxx:12
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
const int kPdgKM
Definition: PDGCodes.h:150
const int kPdgKP
Definition: PDGCodes.h:149
const int kPdgEta
Definition: PDGCodes.h:138
const int kPdgPiP
Definition: PDGCodes.h:135
const int kPdgPi0
Definition: PDGCodes.h:137
double fPKc
{K+ K- } production probability
const int kPdgAntiK0
Definition: PDGCodes.h:152
const int kPdgSigmaM
Definition: PDGCodes.h:73
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
Definition: RandomGen.h:54
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
Singleton class to load & serve a TDatabasePDG.
Definition: PDGLibrary.h:30
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
exit(0)
assert(nhit_max >=nhit_nbins)
const int kPdgPiM
Definition: PDGCodes.h:136
const int kPdgSigmaP
Definition: PDGCodes.h:71
const int kPdgProton
Definition: PDGCodes.h:65
double fPpic
{pi+ pi- } production probability
#define W(x)
void push_back(int pdg_code)
Definition: PDGCodeList.cxx:67
#define pDEBUG
Definition: Messenger.h:64
const Registry & Algorithm::GetConfig ( void  ) const
virtualinherited

Get configuration registry Evaluate the summary of the configuration and returns it The summary of a configuration is a merge of all the registries known to the algorithm (see Configure() methods) but every parameter is appearing only once and in case of repetitions, only the parameter from the registry with the highest prioriry is considered.

Definition at line 254 of file Algorithm.cxx.

References febshutoff_auto::end, genie::Algorithm::GetConfig(), MECModelEnuComparisons::i, LOG, pDEBUG, r(), and moon_position_table_new3::second.

Referenced by genie::EventGeneratorListAssembler::AssembleGeneratorList(), GetAlgorithms(), genie::Algorithm::GetConfig(), genie::GRV98LO::GRV98LO(), genie::NewQELXSec::Integrate(), genie::LHAPDF5::LHAPDF5(), genie::IBDXSecMap::LoadConfig(), genie::Decayer::LoadConfig(), genie::PythiaHadronization::LoadConfig(), genie::FGMBodekRitchie::LoadConfig(), genie::NuclearModelMap::LoadConfig(), genie::SmithMonizUtils::LoadConfig(), main(), genie::AlgFactory::Print(), TestPythiaTauDecays(), testReconfigInOwnedModules(), and genie::P33PaschosLalakulichPXSec::XSec().

254  {
255 
256  if ( fConfig ) return * fConfig ;
257 
258  const_cast<Algorithm*>( this ) -> fConfig = new Registry( fID.Key() + "_summary", false ) ;
259 
260  // loop and append
261  // understand the append mechanism
262  for ( unsigned int i = 0 ; i < fConfVect.size(); ++i ) {
263  fConfig -> Append( * fConfVect[i] ) ;
264  }
265 
266  if ( fOwnsSubstruc ) {
267 
268  for ( AlgMapConstIter iter = fOwnedSubAlgMp -> begin() ;
269  iter != fOwnedSubAlgMp -> end() ; ++iter ) {
270 
271  Algorithm * subalg = iter -> second ;
272 
273  LOG("Algorithm", pDEBUG) << "Appending config from " << iter -> first << " -> " << subalg -> Id() ;
274  const Registry & r = subalg->GetConfig();
275  RgKey prefix = iter -> first + "/";
276  fConfig -> Append(r,prefix);
277 
278  }
279 
280  } //if owned substructure
281 
282  return * fConfig ;
283 }
AlgMap * fOwnedSubAlgMp
local pool for owned sub-algs (taken out of the factory pool)
Definition: Algorithm.h:167
bool fOwnsSubstruc
true if it owns its substructure (sub-algs,...)
Definition: Algorithm.h:155
Algorithm abstract base class.
Definition: Algorithm.h:54
AlgId fID
algorithm name and configuration set
Definition: Algorithm.h:156
virtual const Registry & GetConfig(void) const
Definition: Algorithm.cxx:254
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
const XML_Char * prefix
Definition: expat.h:380
map< string, Algorithm * >::const_iterator AlgMapConstIter
Definition: Algorithm.h:51
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:98
vector< Registry * > fConfVect
Definition: Algorithm.h:161
string RgKey
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
TRandom3 r(0)
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
string Key(void) const
Definition: AlgId.h:47
#define pDEBUG
Definition: Messenger.h:64
Registry * Algorithm::GetOwnedConfig ( void  )
inherited

Returns the pointer of the summary registry, see previous method Gives access to the summary so it could be changed. The usage of this method is deprecated as it is mantained only for back compatibility. If you need to add or chage a parter (or more), use the AddTopRegistry() instead

Definition at line 287 of file Algorithm.cxx.

References GetConfig().

Referenced by genie::TransverseEnhancementFFModel::LoadConfig(), and genie::EffectiveSF::LoadConfig().

288 {
289 
290  GetConfig() ;
291  return fConfig;
292 }
virtual const Registry & GetConfig(void) const
Definition: Algorithm.cxx:254
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
template<class T >
bool genie::Algorithm::GetParam ( const RgKey name,
T p,
bool  is_top_call = true 
) const
protectedinherited

Ideal access to a parameter value from the vector of registries Returns true if the value is found and the parameters is set

Referenced by genie::CollinsSpillerFragm::BuildFunction(), genie::PetersonFragm::BuildFunction(), genie::DISXSec::LoadConfig(), genie::INukeDeltaPropg::LoadConfig(), genie::COHXSec::LoadConfig(), genie::HadronTransporter::LoadConfig(), genie::DFRKinematicsGenerator::LoadConfig(), genie::RSHelicityAmplModelNCn::LoadConfig(), genie::RSHelicityAmplModelNCp::LoadConfig(), genie::BaryonResonanceDecayer::LoadConfig(), genie::RESKinematicsGenerator::LoadConfig(), genie::DMDISXSec::LoadConfig(), genie::DipoleAxialFormFactorModel::LoadConfig(), genie::DipoleELFormFactorsModel::LoadConfig(), genie::COHKinematicsGenerator::LoadConfig(), genie::VertexGenerator::LoadConfig(), genie::H3AMNuGammaPXSec::LoadConfig(), genie::RSPPResonanceSelector::LoadConfig(), genie::IBDXSecMap::LoadConfig(), genie::Decayer::LoadConfig(), genie::DISHadronicSystemGenerator::LoadConfig(), genie::EmpiricalMECPXSec2015::LoadConfig(), genie::COHElasticPXSec::LoadConfig(), genie::KuzminNaumov2016AxialFormFactorModel::LoadConfig(), genie::SlowRsclCharmDISPXSecLO::LoadConfig(), genie::UnstableParticleDecayer::LoadConfig(), genie::AhrensNCELPXSec::LoadConfig(), genie::AlamSimoAtharVacasSKPXSec2014::LoadConfig(), genie::PythiaHadronization::LoadConfig(), genie::ReinDFRPXSec::LoadConfig(), genie::DFRXSec::LoadConfig(), genie::RosenbluthPXSec::LoadConfig(), genie::StrumiaVissaniIBDPXSec::LoadConfig(), genie::MECGenerator::LoadConfig(), genie::BYPDF::LoadConfig(), genie::QPMDISPXSec::LoadConfig(), genie::KNOPythiaHadronization::LoadConfig(), genie::P33PaschosLalakulichPXSec::LoadConfig(), genie::AhrensDMELPXSec::LoadConfig(), genie::MECXSec::LoadConfig(), genie::AivazisCharmPXSecLO::LoadConfig(), genie::BergerSehgalFMCOHPiPXSec2015::LoadConfig(), genie::ZExpAxialFormFactorModel::LoadConfig(), genie::QPMDMDISPXSec::LoadConfig(), genie::BBA03ELFormFactorsModel::LoadConfig(), genie::BBA05ELFormFactorsModel::LoadConfig(), genie::BergerSehgalCOHPiPXSec2015::LoadConfig(), genie::LwlynSmithQELCCPXSec::LoadConfig(), genie::ReinSehgalRESXSec::LoadConfig(), genie::NuElectronPXSec::LoadConfig(), genie::PrimaryLeptonGenerator::LoadConfig(), genie::SpectralFunc1d::LoadConfig(), genie::ReinSehgalCOHPiPXSec::LoadConfig(), genie::PaisQELLambdaPXSec::LoadConfig(), genie::FGMBodekRitchie::LoadConfig(), genie::OutgoingDarkGenerator::LoadConfig(), genie::LHAPDF6::LoadConfig(), genie::NievesSimoVacasMECPXSec2016::LoadConfig(), genie::CharmHadronization::LoadConfig(), genie::ReinSehgalRESXSecFast::LoadConfig(), genie::NuclearModelMap::LoadConfig(), genie::ReinSehgalSPPXSec::LoadConfig(), genie::EventGenerator::LoadConfig(), genie::ReinSehgalRESPXSec::LoadConfig(), genie::LwlynSmithFF::LoadConfig(), genie::SmithMonizQELCCPXSec::LoadConfig(), genie::QPMDISStrucFuncBase::LoadConfig(), genie::BBA07ELFormFactorsModel::LoadConfig(), genie::HAIntranuke::LoadConfig(), genie::NievesQELCCPXSec::LoadConfig(), genie::HAIntranuke2018::LoadConfig(), genie::HNIntranuke2018::LoadConfig(), genie::LocalFGM::LoadConfig(), genie::BSKLNBaseRESPXSec2014::LoadConfig(), genie::EffectiveSF::LoadConfig(), genie::ReinSehgalSPPPXSec::LoadConfig(), LoadConfig(), genie::SmithMonizUtils::LoadConfig(), genie::MECInteractionListGenerator::LoadConfigData(), genie::PhysInteractionSelector::LoadConfigData(), genie::RESInteractionListGenerator::LoadConfigData(), genie::PauliBlocker::LoadModelType(), genie::BYStrucFunc::ReadBYParams(), and genie::LHAPDF5::SetPDFSetFromConfig().

template<class T >
bool genie::Algorithm::GetParamDef ( const RgKey name,
T p,
const T def 
) const
protectedinherited

Ideal access to a parameter value from the vector of registries, With default value. Returns true if the value is set from the registries, false if the value is the default

Referenced by genie::IMDXSec::LoadConfig(), genie::COHXSec::LoadConfig(), genie::RESXSec::LoadConfig(), genie::DISXSec::LoadConfig(), genie::DFRKinematicsGenerator::LoadConfig(), genie::COHXSecAR::LoadConfig(), genie::DMDISXSec::LoadConfig(), genie::BaryonResonanceDecayer::LoadConfig(), genie::SKKinematicsGenerator::LoadConfig(), genie::COHElKinematicsGenerator::LoadConfig(), genie::NuEKinematicsGenerator::LoadConfig(), genie::QELXSec::LoadConfig(), genie::RESKinematicsGenerator::LoadConfig(), genie::COHKinematicsGenerator::LoadConfig(), genie::IBDKinematicsGenerator::LoadConfig(), genie::NuEInteractionListGenerator::LoadConfig(), genie::QELKinematicsGenerator::LoadConfig(), genie::DMELXSec::LoadConfig(), genie::DISHadronicSystemGenerator::LoadConfig(), genie::DISKinematicsGenerator::LoadConfig(), genie::NucBindEnergyAggregator::LoadConfig(), genie::DMELKinematicsGenerator::LoadConfig(), genie::DMDISKinematicsGenerator::LoadConfig(), genie::QPMDISPXSec::LoadConfig(), genie::DFRXSec::LoadConfig(), genie::AhrensDMELPXSec::LoadConfig(), genie::NuElectronXSec::LoadConfig(), genie::QELEventGenerator::LoadConfig(), genie::P33PaschosLalakulichPXSec::LoadConfig(), genie::MECXSec::LoadConfig(), genie::FermiMover::LoadConfig(), genie::AlamSimoAtharVacasSKXSec::LoadConfig(), genie::QPMDMDISPXSec::LoadConfig(), genie::LwlynSmithQELCCPXSec::LoadConfig(), genie::ReinSehgalRESXSec::LoadConfig(), genie::FGMBodekRitchie::LoadConfig(), genie::ReinSehgalRESXSecFast::LoadConfig(), genie::KovalenkoQELCharmPXSec::LoadConfig(), genie::SmithMonizQELCCXSec::LoadConfig(), genie::ReinSehgalSPPXSec::LoadConfig(), genie::ReinSehgalRESPXSec::LoadConfig(), genie::QELEventGeneratorSM::LoadConfig(), genie::QPMDISStrucFuncBase::LoadConfig(), genie::SmithMonizQELCCPXSec::LoadConfig(), genie::NievesQELCCPXSec::LoadConfig(), genie::HAIntranuke::LoadConfig(), genie::LocalFGM::LoadConfig(), genie::HNIntranuke2018::LoadConfig(), genie::HAIntranuke2018::LoadConfig(), genie::BSKLNBaseRESPXSec2014::LoadConfig(), genie::EffectiveSF::LoadConfig(), LoadConfig(), genie::NewQELXSec::LoadConfig(), genie::QELInteractionListGenerator::LoadConfigData(), genie::MECInteractionListGenerator::LoadConfigData(), genie::DFRInteractionListGenerator::LoadConfigData(), genie::RESInteractionListGenerator::LoadConfigData(), genie::SKInteractionListGenerator::LoadConfigData(), genie::COHInteractionListGenerator::LoadConfigData(), genie::DMELInteractionListGenerator::LoadConfigData(), genie::RSPPInteractionListGenerator::LoadConfigData(), genie::DISInteractionListGenerator::LoadConfigData(), and genie::DMDISInteractionListGenerator::LoadConfigData().

template<class T >
bool genie::Algorithm::GetParamVect ( const std::string comm_name,
std::vector< T > &  v,
unsigned int  max,
bool  is_top_call = true 
) const
protectedinherited

Handle to load vectors of parameters It looks for different registry item with name comm_name0, comm_name1, etc...

virtual AlgStatus_t genie::Algorithm::GetStatus ( void  ) const
inlinevirtualinherited

Get algorithm status.

Definition at line 101 of file Algorithm.h.

References genie::Algorithm::fStatus.

101 { return fStatus; }
AlgStatus_t fStatus
algorithm execution status
Definition: Algorithm.h:166
TClonesArray * KNOHadronization::Hadronize ( const Interaction interaction) const
virtual

Implements genie::HadronizationModelBase.

Definition at line 97 of file KNOHadronization.cxx.

References AssertValidity(), DecayMethod1(), DecayMethod2(), fReWeightDecays, fUseBaryonXfPt2Param, fUseIsotropic2BDecays, fWeight, HandleDecays(), LOG, pINFO, pNOTICE, pWARN, SelectParticles(), W, and genie::utils::kinematics::W().

99 {
100 // Generate the hadronic system in a neutrino interaction using a KNO-based
101 // model.
102 
103  if(!this->AssertValidity(interaction)) {
104  LOG("KNOHad", pWARN) << "Returning a null particle list!";
105  return 0;
106  }
107  fWeight=1;
108 
109  double W = utils::kinematics::W(interaction);
110  LOG("KNOHad", pINFO) << "W = " << W << " GeV";
111 
112  //-- Select hadronic shower particles
113  PDGCodeList * pdgcv = this->SelectParticles(interaction);
114 
115  if(!pdgcv) {
116  LOG("KNOHad", pNOTICE)
117  << "Failed selecting particles for " << *interaction;
118  return 0;
119  }
120 
121  //-- Decay the hadronic final state
122  // Two strategies are considered (for N particles):
123  // 1- N (>=2) particles get passed to the phase space decayer. This is the
124  // old NeuGEN strategy.
125  // 2- decay strategy adopted at the July-2006 hadronization model mini-workshop
126  // (C.Andreopoulos, H.Gallagher, P.Kehayias, T.Yang)
127  // The generated baryon P4 gets selected from from experimental xF and pT^2
128  // distributions and the remaining N-1 particles are passed to the phase space
129  // decayer, with P4 = P4(Sum_Hadronic) - P4(Baryon).
130  // For N=2, generate a phase space decay and keep the solution according to its
131  // likelihood calculated based on the baryon xF and pT pdfs. Especially for N=2
132  // keep the option of using simple phase space decay with reweighting switched
133  // off (for consistency with the neugen/daikon version).
134  //
135  TClonesArray * particle_list = 0;
136  bool reweight_decays = fReWeightDecays;
138  bool use_isotropic_decay = (pdgcv->size()==2 && fUseIsotropic2BDecays);
139  if(use_isotropic_decay) {
140  particle_list = this->DecayMethod1(W,*pdgcv,false);
141  } else {
142  particle_list = this->DecayMethod2(W,*pdgcv,reweight_decays);
143  }
144  } else {
145  particle_list = this->DecayMethod1(W,*pdgcv,reweight_decays);
146  }
147 
148  if(!particle_list) {
149  LOG("KNOHad", pNOTICE)
150  << "Failed decaying a hadronic system @ W=" << W
151  << "with multiplicity=" << pdgcv->size();
152 
153  // clean-up and exit
154  delete pdgcv;
155  return 0;
156  }
157 
158  //-- Handle unstable particle decays (if requested)
159  this->HandleDecays(particle_list);
160 
161  //-- The container 'owns' its elements
162  particle_list->SetOwner(true);
163 
164  delete pdgcv;
165 
166  return particle_list;
167 }
bool fReWeightDecays
Reweight phase space decays?
TClonesArray * DecayMethod2(double W, const PDGCodeList &pdgv, bool reweight_decays) const
PDGCodeList * SelectParticles(const Interaction *) const
A list of PDG codes.
Definition: PDGCodeList.h:33
void HandleDecays(TClonesArray *particle_list) const
double W(const Interaction *const i)
Definition: KineUtils.cxx:1015
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pINFO
Definition: Messenger.h:63
bool AssertValidity(const Interaction *i) const
double fWeight
weight for generated event
#define pWARN
Definition: Messenger.h:61
bool fUseIsotropic2BDecays
force isotropic, non-reweighted 2-body decays for consistency with neugen/daikon
bool fUseBaryonXfPt2Param
Generate baryon xF,pT2 from experimental parameterization?
TClonesArray * DecayMethod1(double W, const PDGCodeList &pdgv, bool reweight_decays) const
#define pNOTICE
Definition: Messenger.h:62
#define W(x)
int KNOHadronization::HadronShowerCharge ( const Interaction interaction) const
private

Definition at line 654 of file KNOHadronization.cxx.

References ana::assert(), genie::PDGLibrary::Find(), genie::Interaction::FSPrimLepton(), genie::Target::HitNucPdg(), genie::Interaction::InitState(), genie::PDGLibrary::Instance(), makeTrainCVSamples::int, genie::pdg::IsNeutron(), genie::pdg::IsProton(), genie::InitialState::Probe(), and genie::InitialState::Tgt().

Referenced by SelectParticles().

655 {
656 // Returns the hadron shower charge in units of +e
657 // HadronShowerCharge = Q{initial} - Q{final state primary lepton}
658 // eg in v p -> l- X the hadron shower charge is +2
659 // in v n -> l- X the hadron shower charge is +1
660 // in v n -> v X the hadron shower charge is 0
661 //
662  int hadronShowerCharge = 0;
663 
664  // find out the charge of the final state lepton
665  double ql = interaction->FSPrimLepton()->Charge() / 3.;
666 
667  // find out the charge of the probe
668  double qp = interaction->InitState().Probe()->Charge() / 3.;
669 
670  // get the initial state, ask for the hit-nucleon and get
671  // its charge ( = initial state charge for vN interactions)
672  const InitialState & init_state = interaction->InitState();
673  int hit_nucleon = init_state.Tgt().HitNucPdg();
674 
675  assert( pdg::IsProton(hit_nucleon) || pdg::IsNeutron(hit_nucleon) );
676 
677  // Ask PDGLibrary for the nucleon charge
678  double qnuc = PDGLibrary::Instance()->Find(hit_nucleon)->Charge() / 3.;
679 
680  // calculate the hadron shower charge
681  hadronShowerCharge = (int) ( qp + qnuc - ql );
682 
683  return hadronShowerCharge;
684 }
int HitNucPdg(void) const
Definition: Target.cxx:321
TParticlePDG * Probe(void) const
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:304
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:299
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
assert(nhit_max >=nhit_nbins)
const InitialState & InitState(void) const
Definition: Interaction.h:69
const Target & Tgt(void) const
Definition: InitialState.h:67
Initial State information.
Definition: InitialState.h:49
void KNOHadronization::HandleDecays ( TClonesArray *  particle_list) const
private

Definition at line 1419 of file KNOHadronization.cxx.

References ana::assert(), genie::DecayModelI::Decay(), fDecayer, fForceDecays, genie::kPdgPi0, genie::DecayerInputs_t::P4, make_associated_cosmic_defs::p4, genie::DecayerInputs_t::PdgCode, and fabricate::status.

Referenced by Hadronize().

1420 {
1421 // Handle decays of unstable particles if requested through the XML config.
1422 // The default is not to decay the particles at this stage (during event
1423 // generation, the UnstableParticleDecayer event record visitor decays what
1424 // is needed to be decayed later on). But, when comparing various models
1425 // (eg PYTHIA vs KNO) independently and not within the full MC simulation
1426 // framework it might be necessary to force the decays at this point.
1427 
1428  if (fForceDecays) {
1429  assert(fDecayer);
1430 
1431  //-- loop through the fragmentation event record & decay unstables
1432  int idecaying = -1; // position of decaying particle
1433  TMCParticle * p = 0; // current particle
1434 
1435  TIter piter(plist);
1436  while ( (p = (TMCParticle *) piter.Next()) ) {
1437 
1438  idecaying++;
1439  int status = p->GetKS();
1440 
1441  // bother for final state particle only
1442  if(status < 10) {
1443 
1444  // until ROOT's T(MC)Particle(PDG) Lifetime() is fixed, decay only
1445  // pi^0's
1446  if ( p->GetKF() == kPdgPi0 ) {
1447 
1448  DecayerInputs_t dinp;
1449 
1450  TLorentzVector p4;
1451  p4.SetPxPyPzE(p->GetPx(), p->GetPy(), p->GetPz(), p->GetEnergy());
1452 
1453  dinp.PdgCode = p->GetKF();
1454  dinp.P4 = &p4;
1455 
1456  TClonesArray * decay_products = fDecayer->Decay(dinp);
1457 
1458  if(decay_products) {
1459  //-- mark the parent particle as decayed & set daughters
1460  p->SetKS(11);
1461 
1462  int nfp = plist->GetEntries(); // n. fragm. products
1463  int ndp = decay_products->GetEntries(); // n. decay products
1464 
1465  p->SetFirstChild ( nfp ); // decay products added at
1466  p->SetLastChild ( nfp + ndp -1 ); // the end of the fragm.rec.
1467 
1468  //-- add decay products to the fragmentation record
1469  TMCParticle * dp = 0;
1470  TIter dpiter(decay_products);
1471 
1472  while ( (dp = (TMCParticle *) dpiter.Next()) ) {
1473 
1474  dp->SetParent(idecaying);
1475  new ( (*plist)[plist->GetEntries()] ) TMCParticle(*dp);
1476  }
1477 
1478  //-- clean up decay products
1479  decay_products->Delete();
1480  delete decay_products;
1481  }
1482 
1483  } // particle is to be decayed
1484  } // KS < 10 : final state particle (as in PYTHIA LUJETS record)
1485  } // particles in fragmentation record
1486  } // force decay
1487 }
int status
Definition: fabricate.py:1613
const char * p
Definition: xmltok.h:285
bool fForceDecays
force decays of unstable hadrons produced?
const int kPdgPi0
Definition: PDGCodes.h:137
const DecayModelI * fDecayer
decay algorithm
const TLorentzVector * P4
4-momentum
Definition: DecayerInputs.h:36
assert(nhit_max >=nhit_nbins)
virtual TClonesArray * Decay(const DecayerInputs_t &inp) const =0
return a TClonesArray of TMCParticle objects (NOTE: all TMCParticle units in GeV^n [hbar=c=1]) ...
virtual const AlgId& genie::Algorithm::Id ( void  ) const
inlinevirtualinherited

Get algorithm ID.

Definition at line 98 of file Algorithm.h.

References genie::Algorithm::fID.

Referenced by genie::KineGeneratorWithCache::AccessCacheBranch(), genie::QELEventGeneratorSM::AccessCacheBranch2(), genie::QELEventGeneratorSM::AccessCacheBranchDiffv(), genie::InteractionListAssembler::AssembleInteractionList(), genie::XSecAlgorithmMap::BuildMap(), genie::InteractionGeneratorMap::BuildMap(), genie::XSecSplineList::BuildSplineKey(), genie::DISXSec::CacheBranchName(), genie::ReinSehgalRESXSecWithCache::CacheBranchName(), genie::DMDISXSec::CacheBranchName(), genie::ReinSehgalRESXSecWithCacheFast::CacheBranchName(), genie::Algorithm::Compare(), genie::RESKinematicsGenerator::ComputeMaxXSec(), genie::COHElKinematicsGenerator::ComputeMaxXSec(), genie::SKKinematicsGenerator::ComputeMaxXSec(), genie::COHKinematicsGenerator::ComputeMaxXSec(), genie::Algorithm::Configure(), genie::GEVGDriver::CreateSplines(), genie::QPMDISPXSec::DISRESJoinSuppressionFactor(), genie::QPMDMDISPXSec::DMDISRESJoinSuppressionFactor(), genie::AlgConfigPool::FindRegistry(), genie::AlgFactory::ForceReconfiguration(), genie::GEVGDriver::GenerateEvent(), GetAlgorithms(), genie::LwlynSmithQELCCPXSec::Integral(), genie::NievesQELCCPXSec::Integral(), genie::COHXSec::Integrate(), genie::QPMDISPXSec::LoadConfig(), genie::QPMDMDISPXSec::LoadConfig(), genie::EventGenerator::LoadConfig(), genie::EventGeneratorListAssembler::LoadGenerator(), main(), genie::COHKinematicsGenerator::MaxXSec_AlvarezRuso(), genie::XSecAlgorithmMap::Print(), genie::InteractionGeneratorMap::Print(), genie::AlgFactory::Print(), genie::COHHadronicSystemGenerator::ProcessEventRecord(), genie::COHPrimaryLeptonGenerator::ProcessEventRecord(), genie::COHKinematicsGenerator::ProcessEventRecord(), genie::MECGenerator::ProcessEventRecord(), genie::EventGenerator::ProcessEventRecord(), genie::KNOPythiaHadronization::SelectHadronizer(), TestPythiaTauDecays(), and genie::GEVGDriver::UseSplines().

98 { return fID; }
AlgId fID
algorithm name and configuration set
Definition: Algorithm.h:156
void KNOHadronization::Initialize ( void  ) const
virtual

Don't implement the HadronizationModelI interface Leave it for the concrete implementations (KNO, Pythia,...)

Implements genie::HadronizationModelBase.

Definition at line 92 of file KNOHadronization.cxx.

93 {
94 
95 }
void Algorithm::Initialize ( void  )
protectedinherited

Definition at line 343 of file Algorithm.cxx.

Referenced by genie::Algorithm::AllowReconfig().

344 {
345 // Algorithm initialization
346 //
347  fAllowReconfig = true;
348  fOwnsSubstruc = false;
349  fConfig = 0;
350  fOwnedSubAlgMp = 0;
351 }
AlgMap * fOwnedSubAlgMp
local pool for owned sub-algs (taken out of the factory pool)
Definition: Algorithm.h:167
bool fOwnsSubstruc
true if it owns its substructure (sub-algs,...)
Definition: Algorithm.h:155
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
double KNOHadronization::KNO ( int  nu,
int  nuc,
double  z 
) const
private

Definition at line 578 of file KNOHadronization.cxx.

References plot_validation_datamc::c, fCvbn, fCvbp, fCvn, fCvp, Gamma(), genie::pdg::IsAntiNeutrino(), genie::pdg::IsDarkMatter(), genie::pdg::IsNegChargedLepton(), genie::pdg::IsNeutrino(), genie::pdg::IsNeutron(), genie::pdg::IsPosChargedLepton(), genie::pdg::IsProton(), LOG, pERROR, and submit_syst::x.

Referenced by MultiplicityProb().

579 {
580 // Computes <n>P(n) for the input reduced multiplicity z=n/<n>
581 
582 /*
583  if(fUseLegacyKNOSpline) {
584  bool inrange = z > fKNO->XMin() && z < fKNO->XMax();
585  return (inrange) ? fKNO->Evaluate(z) : 0.;
586  }
587 */
588 
589  bool is_p = pdg::IsProton (nuc_pdg);
590  bool is_n = pdg::IsNeutron (nuc_pdg);
591  bool is_nu = pdg::IsNeutrino (probe_pdg);
592  bool is_nubar = pdg::IsAntiNeutrino (probe_pdg);
593  bool is_l = pdg::IsNegChargedLepton (probe_pdg);
594  bool is_lbar = pdg::IsPosChargedLepton (probe_pdg);
595  // EDIT
596  bool is_dm = pdg::IsDarkMatter (probe_pdg);
597 
598  double c=0; // Levy function parameter
599 
600  if ( is_p && (is_nu || is_l ) ) c=fCvp;
601  else if ( is_n && (is_nu || is_l ) ) c=fCvn;
602  else if ( is_p && (is_nubar || is_lbar) ) c=fCvbp;
603  else if ( is_n && (is_nubar || is_lbar) ) c=fCvbn;
604  // EDIT: assume it's neutrino-like for now...
605  else if ( is_p && is_dm ) c=fCvp;
606  else if ( is_n && is_dm ) c=fCvn;
607  else {
608  LOG("KNOHad", pERROR)
609  << "Invalid initial state (probe = " << probe_pdg << ", "
610  << "hit nucleon = " << nuc_pdg << ")";
611  return 0;
612  }
613 
614  double x = c*z+1;
615  double kno = 2*TMath::Exp(-c)*TMath::Power(c,x)/TMath::Gamma(x);
616 
617  return kno;
618 }
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:108
#define pERROR
Definition: Messenger.h:60
double fCvp
Levy function parameter for vp.
double fCvbp
Levy function parameter for vbp.
bool IsDarkMatter(int pdgc)
Definition: PDGUtils.cxx:125
float Gamma() const
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:304
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:140
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:299
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
double fCvbn
Levy function parameter for vbn.
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:116
z
Definition: test.py:28
double fCvn
Levy function parameter for vn.
bool IsNegChargedLepton(int pdgc)
Definition: PDGUtils.cxx:131
void KNOHadronization::LoadConfig ( void  )
private

Definition at line 429 of file KNOHadronization.cxx.

References ana::assert(), release_diff::diff, fAhyperon, fAvbn, fAvbp, fAvn, fAvp, fBaryonPT2pdf, fBaryonXFpdf, fBhyperon, fBvbn, fBvbp, fBvn, fBvp, fCvbn, fCvbp, fCvn, fCvp, fDecayer, fForceDecays, fForceMinMult, fForceNeuGenLimit, fGenerateWeighted, fPeta, fPhSpRwA, fPK0, fPKc, fPpi0, fPpi0eta, fPpic, fReWeightDecays, genie::HadronizationModelBase::fRvbnCCm2, genie::HadronizationModelBase::fRvbnCCm3, genie::HadronizationModelBase::fRvbnNCm2, genie::HadronizationModelBase::fRvbnNCm3, genie::HadronizationModelBase::fRvbpCCm2, genie::HadronizationModelBase::fRvbpCCm3, genie::HadronizationModelBase::fRvbpNCm2, genie::HadronizationModelBase::fRvbpNCm3, genie::HadronizationModelBase::fRvnCCm2, genie::HadronizationModelBase::fRvnCCm3, genie::HadronizationModelBase::fRvnNCm2, genie::HadronizationModelBase::fRvnNCm3, genie::HadronizationModelBase::fRvpCCm2, genie::HadronizationModelBase::fRvpCCm3, genie::HadronizationModelBase::fRvpNCm2, genie::HadronizationModelBase::fRvpNCm3, fUseBaryonXfPt2Param, fUseIsotropic2BDecays, genie::HadronizationModelBase::fWcut, genie::Algorithm::GetParam(), genie::Algorithm::GetParamDef(), LOG, pWARN, and genie::Algorithm::SubAlg().

Referenced by Configure().

430 {
431  // Force decays of unstable hadronization products?
432  GetParamDef( "ForceDecays", fForceDecays, false ) ;
433 
434  // Force minimum multiplicity (if generated less than that) or abort?
435  GetParamDef( "ForceMinMultiplicity", fForceMinMult, true ) ;
436 
437  // Generate the baryon xF and pT^2 using experimental data as PDFs?
438  // In this case, only the N-1 other particles would be fed into the phase
439  // space decayer. This seems to improve hadronic system features such as
440  // bkw/fwd xF hemisphere average multiplicities.
441  // Note: not in the legacy KNO model (NeuGEN). Switch this feature off for
442  // comparisons or for reproducing old simulations.
443  GetParam( "KNO-UseBaryonPdfs-xFpT2", fUseBaryonXfPt2Param ) ;
444 
445  // Reweight the phase space decayer events to reproduce the experimentally
446  // measured pT^2 distributions.
447  // Note: not in the legacy KNO model (NeuGEN). Switch this feature off for
448  // comparisons or for reproducing old simulations.
449  GetParam( "KNO-PhaseSpDec-Reweight", fReWeightDecays ) ;
450 
451  // Parameter for phase space re-weighting. See ReWeightPt2()
452  GetParam( "KNO-PhaseSpDec-ReweightParm", fPhSpRwA ) ;
453 
454  // use isotropic non-reweighted 2-body phase space decays for consistency
455  // with neugen/daikon
456  GetParam( "KNO-UseIsotropic2BodyDec", fUseIsotropic2BDecays ) ;
457 
458  // Generated weighted or un-weighted hadronic systems?
459  GetParamDef( "GenerateWeighted", fGenerateWeighted, false ) ;
460 
461 
462  // Probabilities for producing hadron pairs
463 
464  //-- pi0 pi0
465  GetParam( "KNO-ProbPi0Pi0", fPpi0 ) ;
466  //-- pi+ pi-
467  GetParam( "KNO-ProbPiplusPiminus", fPpic ) ;
468  //-- K+ K-
469  GetParam( "KNO-ProbKplusKminus", fPKc ) ;
470  //-- K0 K0bar
471  GetParam( "KNO-ProbK0K0bar", fPK0 ) ;
472  //-- pi0 eta
473  GetParam( "KNO-ProbPi0Eta", fPpi0eta ) ;
474  //-- eta eta
475  GetParam( "KNO-ProbEtaEta", fPeta ) ;
476 
477  double fsum = fPeta + fPpi0eta + fPK0 + fPKc + fPpic + fPpi0;
478  double diff = TMath::Abs(1.-fsum);
479  if(diff>0.001) {
480  LOG("KNOHad", pWARN) << "KNO Probabilities do not sum to unity! Renormalizing..." ;
481  fPpi0 = fPpi0/fsum;
482  fPpic = fPpic/fsum;
483  fPKc = fPKc/fsum;
484  fPK0 = fPK0/fsum;
485  fPpi0eta = fPpi0eta/fsum;
486  fPeta = fPeta/fsum;
487  }
488 
489  // Decay unstable particles now or leave it for later? Which decayer to use?
490  fDecayer = 0;
491  if(fForceDecays) {
492  fDecayer = dynamic_cast<const DecayModelI *> (this->SubAlg("Decayer"));
493  assert(fDecayer);
494  }
495 
496  // Baryon pT^2 and xF parameterizations used as PDFs
497 
498  if (fBaryonXFpdf ) delete fBaryonXFpdf;
499  if (fBaryonPT2pdf) delete fBaryonPT2pdf;
500 
501  fBaryonXFpdf = new TF1("fBaryonXFpdf",
502  "0.083*exp(-0.5*pow(x+0.385,2.)/0.131)",-1,0.5);
503  fBaryonPT2pdf = new TF1("fBaryonPT2pdf",
504  "exp(-0.214-6.625*x)",0,0.6);
505  // stop ROOT from deleting these object of its own volition
506  gROOT->GetListOfFunctions()->Remove(fBaryonXFpdf);
507  gROOT->GetListOfFunctions()->Remove(fBaryonPT2pdf);
508 
509 /*
510  // load legacy KNO spline
511  fUseLegacyKNOSpline = fConfig->GetBoolDef("UseLegacyKNOSpl", false);
512 
513  // Delete the KNO spline from previous configuration of this instance
514  if(fKNO) delete fKNO;
515 
516  if(fUseLegacyKNOSpline) {
517  assert(gSystem->Getenv("GENIE"));
518  string basedir = gSystem->Getenv("GENIE");
519  string defknodata = basedir + "/data/kno/KNO.dat";
520  string knodata = fConfig->GetStringDef("kno-data",defknodata);
521 
522  LOG("KNOHad", pNOTICE) << "Loading KNO data from: " << knodata;
523  fKNO = new Spline(knodata);
524  }
525 */
526 
527  // Load parameters determining the average charged hadron multiplicity
528  GetParam( "KNO-Alpha-vp", fAvp ) ;
529  GetParam( "KNO-Alpha-vn", fAvn ) ;
530  GetParam( "KNO-Alpha-vbp", fAvbp ) ;
531  GetParam( "KNO-Alpha-vbn", fAvbn ) ;
532  GetParam( "KNO-Beta-vp", fBvp ) ;
533  GetParam( "KNO-Beta-vn", fBvn ) ;
534  GetParam( "KNO-Beta-vbp", fBvbp ) ;
535  GetParam( "KNO-Beta-vbn", fBvbn ) ;
536 
537  // Load parameters determining the prob of producing a strange baryon
538  // via associated production
539  GetParam( "KNO-Alpha-Hyperon", fAhyperon ) ;
540  GetParam( "KNO-Beta-Hyperon", fBhyperon ) ;
541 
542  // Load the Levy function parameter
543  GetParam( "KNO-LevyC-vp", fCvp ) ;
544  GetParam( "KNO-LevyC-vn", fCvn ) ;
545  GetParam( "KNO-LevyC-vbp", fCvbp ) ;
546  GetParam( "KNO-LevyC-vbn", fCvbn ) ;
547 
548  // Force NEUGEN upper limit in hadronic multiplicity (to be used only
549  // NEUGEN/GENIE comparisons)
550  GetParamDef( "ForceNeugenMultLimit", fForceNeuGenLimit, false ) ;
551 
552  // Load Wcut determining the phase space area where the multiplicity prob.
553  // scaling factors would be applied -if requested-
554  GetParam( "Wcut", fWcut ) ;
555 
556  // Load NEUGEN multiplicity probability scaling parameters Rijk
557  //neutrinos
558  GetParam( "DIS-HMultWgt-vp-CC-m2", fRvpCCm2 ) ;
559  GetParam( "DIS-HMultWgt-vp-CC-m3", fRvpCCm3 ) ;
560  GetParam( "DIS-HMultWgt-vp-NC-m2", fRvpNCm2 ) ;
561  GetParam( "DIS-HMultWgt-vp-NC-m3", fRvpNCm3 ) ;
562  GetParam( "DIS-HMultWgt-vn-CC-m2", fRvnCCm2 ) ;
563  GetParam( "DIS-HMultWgt-vn-CC-m3", fRvnCCm3 ) ;
564  GetParam( "DIS-HMultWgt-vn-NC-m2", fRvnNCm2 ) ;
565  GetParam( "DIS-HMultWgt-vn-NC-m3", fRvnNCm3 ) ;
566  //Anti-neutrinos
567  GetParam( "DIS-HMultWgt-vbp-CC-m2", fRvbpCCm2 ) ;
568  GetParam( "DIS-HMultWgt-vbp-CC-m3", fRvbpCCm3 ) ;
569  GetParam( "DIS-HMultWgt-vbp-NC-m2", fRvbpNCm2 ) ;
570  GetParam( "DIS-HMultWgt-vbp-NC-m3", fRvbpNCm3 ) ;
571  GetParam( "DIS-HMultWgt-vbn-CC-m2", fRvbnCCm2 ) ;
572  GetParam( "DIS-HMultWgt-vbn-CC-m3", fRvbnCCm3 ) ;
573  GetParam( "DIS-HMultWgt-vbn-NC-m2", fRvbnNCm2 ) ;
574  GetParam( "DIS-HMultWgt-vbn-NC-m3", fRvbnNCm3 ) ;
575 
576 }
double fRvnCCm3
neugen&#39;s Rijk: vn, CC, multiplicity = 3
double fRvbpCCm3
neugen&#39;s Rijk: vbp, CC, multiplicity = 3
double fPpi0eta
{Pi0 eta} production probability
double fRvnNCm2
neugen&#39;s Rijk: vn, NC, multiplicity = 2
double fRvbpCCm2
neugen&#39;s Rijk: vbp, CC, multiplicity = 2
double fAvn
offset in average charged hadron multiplicity = f(W) relation for vn
double fRvpCCm2
neugen&#39;s Rijk: vp, CC, multiplicity = 2
double fPeta
{eta eta} production probability
double fCvp
Levy function parameter for vp.
double fCvbp
Levy function parameter for vbp.
bool fReWeightDecays
Reweight phase space decays?
TF1 * fBaryonPT2pdf
baryon pT^2 PDF
double fRvbnNCm3
neugen&#39;s Rijk: vbn, NC, multiplicity = 3
double fPpi0
{pi0 pi0 } production probability
double fPK0
{K0 K0bar} production probability
double fRvpNCm2
neugen&#39;s Rijk: vp, NC, multiplicity = 2
bool fForceNeuGenLimit
force upper hadronic multiplicity to NeuGEN limit
Pure abstract base class. Defines the DecayModelI interface to be implemented by any algorithmic clas...
Definition: DecayModelI.h:31
bool fForceDecays
force decays of unstable hadrons produced?
double fBvbp
slope in average charged hadron multiplicity = f(W) relation for vbp
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
double fRvpNCm3
neugen&#39;s Rijk: vp, NC, multiplicity = 3
double fAvp
offset in average charged hadron multiplicity = f(W) relation for vp
double fCvbn
Levy function parameter for vbn.
double fBhyperon
see above
double fRvbnNCm2
neugen&#39;s Rijk: vbn, NC, multiplicity = 2
bool fGenerateWeighted
generate weighted events?
double fAvbn
offset in average charged hadron multiplicity = f(W) relation for vbn
double fPKc
{K+ K- } production probability
double fRvpCCm3
neugen&#39;s Rijk: vp, CC, multiplicity = 3
double fRvbpNCm2
neugen&#39;s Rijk: vbp, NC, multiplicity = 2
#define pWARN
Definition: Messenger.h:61
double fRvnNCm3
neugen&#39;s Rijk: vn, NC, multiplicity = 3
double fCvn
Levy function parameter for vn.
double fPhSpRwA
parameter for phase space decay reweighting
bool fUseIsotropic2BDecays
force isotropic, non-reweighted 2-body decays for consistency with neugen/daikon
double fBvn
slope in average charged hadron multiplicity = f(W) relation for vn
double fBvp
slope in average charged hadron multiplicity = f(W) relation for vp
const DecayModelI * fDecayer
decay algorithm
double fAhyperon
parameter controlling strange baryon production probability via associated production (P=a+b*lnW^2) ...
double fBvbn
slope in average charged hadron multiplicity = f(W) relation for vbn
bool fUseBaryonXfPt2Param
Generate baryon xF,pT2 from experimental parameterization?
assert(nhit_max >=nhit_nbins)
double fWcut
configuration data common to all hadronizers
double fRvbnCCm3
neugen&#39;s Rijk: vbn, CC, multiplicity = 3
bool fForceMinMult
force minimum multiplicity if (at low W) generated less?
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
double fPpic
{pi+ pi- } production probability
double fRvbpNCm3
neugen&#39;s Rijk: vbp, NC, multiplicity = 3
TF1 * fBaryonXFpdf
baryon xF PDF
double fRvnCCm2
neugen&#39;s Rijk: vn, CC, multiplicity = 2
double fRvbnCCm2
neugen&#39;s Rijk: vbn, CC, multiplicity = 2
double fAvbp
offset in average charged hadron multiplicity = f(W) relation for vbp
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:353
double HadronizationModelBase::MaxMult ( const Interaction i) const
protectedinherited

Definition at line 60 of file HadronizationModelBase.cxx.

References genie::Interaction::Kine(), genie::constants::kNeutronMass, genie::constants::kPionMass, W, and genie::Kinematics::W().

Referenced by genie::PythiaHadronization::MultiplicityProb(), and MultiplicityProb().

61 {
62  double W = interaction->Kine().W();
63 
64  double maxmult = TMath::Floor(1 + (W-kNeutronMass)/kPionMass);
65  return maxmult;
66 }
static const double kNeutronMass
Definition: Constants.h:77
static const double kPionMass
Definition: Constants.h:74
#define W(x)
int Algorithm::MergeTopRegistry ( const Registry r)
protectedinherited

Merge with top level registry if first reg of the vector is owned Otherwise an owned copy is added as a top registry

Definition at line 618 of file Algorithm.cxx.

618  {
619 
620  if ( fOwnerships.empty() ) {
621 
622  // this algorithm is not configured right now, the incoming registry is the only configuration
623  Registry * p = new Registry( r ) ;
624  AddTopRegistry( p ) ;
625 
626  return 1 ;
627  }
628 
629  if ( fOwnerships[0] ) {
630  //the top registry is owned: it can be changed with no consequences for other algorithms
631  fConfVect[0] -> Merge( r ) ;
632  }
633  else {
634  // The top registry is not owned so it cannot be changed
635  // The registry will be added with top priority
636 
637  Registry * p = new Registry( r ) ;
638  AddTopRegistry( p ) ;
639  }
640 
641  // The configuration has changed so the summary is not updated anymore and must be deleted
642  if ( fConfig ) {
643  delete fConfig ;
644  fConfig = 0 ;
645  }
646 
647  return fConfVect.size() ;
648 }
const char * p
Definition: xmltok.h:285
int AddTopRegistry(Registry *rp, bool owns=true)
add registry with top priority, also update ownership
Definition: Algorithm.cxx:585
vector< Registry * > fConfVect
Definition: Algorithm.h:161
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
vector< bool > fOwnerships
ownership for every registry in fConfVect
Definition: Algorithm.h:164
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition: Algorithm.h:194
TH1D * KNOHadronization::MultiplicityProb ( const Interaction interaction,
Option_t *  opt = "" 
) const
virtual

Implements genie::HadronizationModelBase.

Definition at line 297 of file KNOHadronization.cxx.

References genie::HadronizationModelBase::ApplyRijk(), AssertValidity(), AverageChMult(), genie::HadronizationModelBase::CreateMultProbHist(), fForceNeuGenLimit, genie::HadronizationModelBase::fWcut, genie::Target::HitNucPdg(), MECModelEnuComparisons::i, genie::Interaction::InitState(), febshutoff_auto::integral, KNO(), LOG, genie::HadronizationModelBase::MaxMult(), getGoodRuns4SAM::n, nbins, P, pDEBUG, pINFO, genie::InitialState::ProbePdg(), pWARN, SLOG, genie::InitialState::Tgt(), W, genie::utils::kinematics::W(), and test::z.

Referenced by SelectParticles().

299 {
300 // Returns a multiplicity probability distribution for the input interaction.
301 // The input option (Default: "") can contain (combinations) of these strings:
302 // - "+LowMultSuppr": applies NeuGEN Rijk factors suppresing the low multipl.
303 // (1-pion and 2-pion) states as part of the DIS/RES joining scheme.
304 // - "+Renormalize": renormalizes the probability distribution after applying
305 // the NeuGEN scaling factors: Eg, when used as a hadronic multiplicity pdf
306 // the output hadronic multiplicity probability histogram needs to be re-
307 // normalized. But, when this method is called from a DIS cross section
308 // algorithm using the integrated probability reduction as a cross section
309 // section reduction factor then the output histogram should not be re-
310 // normalized after applying the scaling factors.
311 
312  if(!this->AssertValidity(interaction)) {
313  LOG("KNOHad", pWARN)
314  << "Returning a null multiplicity probability distribution!";
315  return 0;
316  }
317 
318  const InitialState & init_state = interaction->InitState();
319  int nu_pdg = init_state.ProbePdg();
320  int nuc_pdg = init_state.Tgt().HitNucPdg();
321 
322  // Compute the average charged hadron multiplicity as: <n> = a + b*ln(W^2)
323  // Calculate avergage hadron multiplicity (= 1.5 x charged hadron mult.)
324 
325  double W = utils::kinematics::W(interaction);
326  double avnch = this->AverageChMult(nu_pdg, nuc_pdg, W);
327  double avn = 1.5*avnch;
328 
329  SLOG("KNOHad", pINFO)
330  << "Average hadronic multiplicity (W=" << W << ") = " << avn;
331 
332  // Find the max possible multiplicity as W = Mneutron + (maxmult-1)*Mpion
333  double maxmult = this->MaxMult(interaction);
334 
335  // If required force the NeuGEN maximum multiplicity limit (10)
336  // Note: use for NEUGEN/GENIE comparisons, not physics MC production
337  if(fForceNeuGenLimit && maxmult>10) maxmult=10;
338 
339  // Set maximum multiplicity so that it does not exceed the max number of
340  // particles accepted by the ROOT phase space decayer (18)
341  // Change this if ROOT authors remove the TGenPhaseSpace limitation.
342  if(maxmult>18) maxmult=18;
343 
344  SLOG("KNOHad", pDEBUG) << "Computed maximum multiplicity = " << maxmult;
345 
346  if(maxmult<2) {
347  LOG("KNOHad", pWARN) << "Low maximum multiplicity! Quiting.";
348  return 0;
349  }
350 
351  // Create multiplicity probability histogram
352  TH1D * mult_prob = this->CreateMultProbHist(maxmult);
353 
354  // Compute the multiplicity probabilities values up to the bin corresponding
355  // to the computed maximum multiplicity
356 
357  if(maxmult>2) {
358  int nbins = mult_prob->FindBin(maxmult);
359 
360  for(int i = 1; i <= nbins; i++) {
361  // KNO distribution is <n>*P(n) vs n/<n>
362  double n = mult_prob->GetBinCenter(i); // bin centre
363  double z = n/avn; // z=n/<n>
364  double avnP = this->KNO(nu_pdg,nuc_pdg,z); // <n>*P(n)
365  double P = avnP / avn; // P(n)
366 
367  SLOG("KNOHad", pDEBUG)
368  << "n = " << n << " (n/<n> = " << z
369  << ", <n>*P = " << avnP << ") => P = " << P;
370 
371  mult_prob->Fill(n,P);
372  }
373  } else {
374  SLOG("KNOHad", pDEBUG) << "Fixing multiplicity to 2";
375  mult_prob->Fill(2,1.);
376  }
377 
378  double integral = mult_prob->Integral("width");
379  if(integral>0) {
380  // Normalize the probability distribution
381  mult_prob->Scale(1.0/integral);
382  } else {
383  SLOG("KNOHad", pWARN) << "probability distribution integral = 0";
384  return mult_prob;
385  }
386 
387  string option(opt);
388 
389  bool apply_neugen_Rijk = option.find("+LowMultSuppr") != string::npos;
390  bool renormalize = option.find("+Renormalize") != string::npos;
391 
392  // Apply the NeuGEN probability scaling factors -if requested-
393  if(apply_neugen_Rijk) {
394  SLOG("KNOHad", pINFO) << "Applying NeuGEN scaling factors";
395  // Only do so for W<Wcut
396  if(W<fWcut) {
397  this->ApplyRijk(interaction, renormalize, mult_prob);
398  } else {
399  SLOG("KNOHad", pDEBUG)
400  << "W = " << W << " < Wcut = " << fWcut
401  << " - Will not apply scaling factors";
402  }//<wcut?
403  }//apply?
404 
405  return mult_prob;
406 }
double MaxMult(const Interaction *i) const
int HitNucPdg(void) const
Definition: Target.cxx:321
bool fForceNeuGenLimit
force upper hadronic multiplicity to NeuGEN limit
double W(const Interaction *const i)
Definition: KineUtils.cxx:1015
TH1D * CreateMultProbHist(double maxmult) const
#define P(a, b, c, d, e, x)
const int nbins
Definition: cellShifts.C:15
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
int ProbePdg(void) const
Definition: InitialState.h:65
double KNO(int nu, int nuc, double z) const
#define pINFO
Definition: Messenger.h:63
bool AssertValidity(const Interaction *i) const
z
Definition: test.py:28
#define pWARN
Definition: Messenger.h:61
void ApplyRijk(const Interaction *i, bool norm, TH1D *mp) const
double AverageChMult(int nu, int nuc, double W) const
double fWcut
configuration data common to all hadronizers
const InitialState & InitState(void) const
Definition: Interaction.h:69
const Target & Tgt(void) const
Definition: InitialState.h:67
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition: Messenger.h:85
#define W(x)
Initial State information.
Definition: InitialState.h:49
#define pDEBUG
Definition: Messenger.h:64
bool KNOHadronization::PhaseSpaceDecay ( TClonesArray &  pl,
TLorentzVector &  pd,
const PDGCodeList pdgv,
int  offset = 0,
bool  reweight = false 
) const
private

Definition at line 889 of file KNOHadronization.cxx.

References ana::assert(), fGenerateWeighted, genie::PDGLibrary::Find(), fPhaseSpaceGenerator, fWeight, MECModelEnuComparisons::i, genie::PDGLibrary::Instance(), genie::RandomGen::Instance(), genie::controls::kMaxUnweightDecayIterations, LOG, m, genie::utils::print::P4AsString(), pERROR, pINFO, pNOTICE, pWARN, ReWeightPt2(), generate_hists::rnd, genie::RandomGen::RndHadro(), sum, and w.

Referenced by DecayBackToBack(), DecayMethod1(), and DecayMethod2().

892 {
893 // General method decaying the input particle system 'pdgv' with available 4-p
894 // given by 'pd'. The decayed system is used to populate the input TMCParticle
895 // array starting from the slot 'offset'.
896 //
897  LOG("KNOHad", pINFO) << "*** Performing a Phase Space Decay";
898  LOG("KNOHad", pINFO) << "pT reweighting is " << (reweight ? "on" : "off");
899 
900  assert ( offset >= 0);
901  assert ( pdgv.size() > 1);
902 
903  // Get the decay product masses
904 
905  vector<int>::const_iterator pdg_iter;
906  int i = 0;
907  double * mass = new double[pdgv.size()];
908  double sum = 0;
909  for(pdg_iter = pdgv.begin(); pdg_iter != pdgv.end(); ++pdg_iter) {
910  int pdgc = *pdg_iter;
911  double m = PDGLibrary::Instance()->Find(pdgc)->Mass();
912  mass[i++] = m;
913  sum += m;
914  }
915 
916  LOG("KNOHad", pINFO)
917  << "Decaying N = " << pdgv.size() << " particles / total mass = " << sum;
918  LOG("KNOHad", pINFO)
919  << "Decaying system p4 = " << utils::print::P4AsString(&pd);
920 
921  // Set the decay
922  bool permitted = fPhaseSpaceGenerator.SetDecay(pd, pdgv.size(), mass);
923  if(!permitted) {
924  LOG("KNOHad", pERROR)
925  << " *** Phase space decay is not permitted \n"
926  << " Total particle mass = " << sum << "\n"
927  << " Decaying system p4 = " << utils::print::P4AsString(&pd);
928 
929  // clean-up and return
930  delete [] mass;
931  return false;
932  }
933 
934  // Get the maximum weight
935  //double wmax = fPhaseSpaceGenerator.GetWtMax();
936  double wmax = -1;
937  for(int idec=0; idec<200; idec++) {
938  double w = fPhaseSpaceGenerator.Generate();
939  if(reweight) { w *= this->ReWeightPt2(pdgv); }
940  wmax = TMath::Max(wmax,w);
941  }
942  assert(wmax>0);
943 
944  LOG("KNOHad", pNOTICE)
945  << "Max phase space gen. weight @ current hadronic system: " << wmax;
946 
947  // Generate a weighted or unweighted decay
948 
950 
951  if(fGenerateWeighted)
952  {
953  // *** generating weighted decays ***
954  double w = fPhaseSpaceGenerator.Generate();
955  if(reweight) { w *= this->ReWeightPt2(pdgv); }
956  fWeight *= TMath::Max(w/wmax, 1.);
957  }
958  else
959  {
960  // *** generating un-weighted decays ***
961  wmax *= 2.3;
962  bool accept_decay=false;
963  unsigned int itry=0;
964 
965  while(!accept_decay)
966  {
967  itry++;
968 
969  if(itry>kMaxUnweightDecayIterations) {
970  // report, clean-up and return
971  LOG("KNOHad", pWARN)
972  << "Couldn't generate an unweighted phase space decay after "
973  << itry << " attempts";
974  delete [] mass;
975  return false;
976  }
977 
978  double w = fPhaseSpaceGenerator.Generate();
979  if(reweight) { w *= this->ReWeightPt2(pdgv); }
980  if(w > wmax) {
981  LOG("KNOHad", pWARN)
982  << "Decay weight = " << w << " > max decay weight = " << wmax;
983  }
984  double gw = wmax * rnd->RndHadro().Rndm();
985  accept_decay = (gw<=w);
986 
987  LOG("KNOHad", pINFO)
988  << "Decay weight = " << w << " / R = " << gw
989  << " - accepted: " << accept_decay;
990 
991  bool return_after_not_accepted_decay = false;
992  if(return_after_not_accepted_decay && !accept_decay) {
993  LOG("KNOHad", pWARN)
994  << "Was instructed to return after a not-accepted decay";
995  delete [] mass;
996  return false;
997  }
998  }
999  }
1000 
1001  // Insert final state products into a TClonesArray of TMCParticles
1002 
1003  i=0;
1004  for(pdg_iter = pdgv.begin(); pdg_iter != pdgv.end(); ++pdg_iter) {
1005 
1006  //-- current PDG code
1007  int pdgc = *pdg_iter;
1008 
1009  //-- get the 4-momentum of the i-th final state particle
1010  TLorentzVector * p4fin = fPhaseSpaceGenerator.GetDecay(i);
1011 
1012  new ( plist[offset+i] ) TMCParticle(
1013  1, /* KS Code */
1014  pdgc, /* PDG Code */
1015  -1, /* parent particle */
1016  -1, /* first child particle */
1017  -1, /* last child particle */
1018  p4fin->Px(), /* 4-momentum: px component */
1019  p4fin->Py(), /* 4-momentum: py component */
1020  p4fin->Pz(), /* 4-momentum: pz component */
1021  p4fin->Energy(), /* 4-momentum: E component */
1022  mass[i], /* particle mass */
1023  0, /* production vertex 4-vector: vx */
1024  0, /* production vertex 4-vector: vy */
1025  0, /* production vertex 4-vector: vz */
1026  0, /* production vertex 4-vector: time */
1027  0 /* lifetime */
1028  );
1029  i++;
1030  }
1031 
1032  // Clean-up
1033  delete [] mass;
1034 
1035  return true;
1036 }
double ReWeightPt2(const PDGCodeList &pdgcv) const
#define pERROR
Definition: Messenger.h:60
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:79
string P4AsString(const TLorentzVector *p)
Definition: PrintUtils.cxx:34
static const unsigned int kMaxUnweightDecayIterations
Definition: Controls.h:61
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:30
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
bool fGenerateWeighted
generate weighted events?
#define pINFO
Definition: Messenger.h:63
double fWeight
weight for generated event
#define pWARN
Definition: Messenger.h:61
TGenPhaseSpace fPhaseSpaceGenerator
a phase space generator
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
Definition: RandomGen.h:54
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
assert(nhit_max >=nhit_nbins)
#define pNOTICE
Definition: Messenger.h:62
Double_t sum
Definition: plot.C:31
Float_t w
Definition: plot.C:20
void Algorithm::Print ( ostream &  stream) const
virtualinherited

Print algorithm info.

Definition at line 323 of file Algorithm.cxx.

References GetConfig(), and r().

Referenced by genie::Algorithm::AllowReconfig(), and genie::operator<<().

324 {
325  // print algorithm name & parameter-set
326  stream << "\nAlgorithm Key: " << this->fID.Key();
327  stream << " - Owns Substruc: " << ((fOwnsSubstruc) ? "[true]" : "[false]");
328 
329  // print algorithm configuration
330  const Registry & r = this->GetConfig();
331  stream << r;
332 
333  if(fOwnsSubstruc) {
334  AlgMapConstIter iter = fOwnedSubAlgMp->begin();
335  for(; iter!=fOwnedSubAlgMp->end(); ++iter) {
336  Algorithm * alg = iter->second;
337  stream << "<Next algorithm is owned by : " << this->fID.Key() << ">";
338  stream << *alg;
339  }
340  }
341 }
AlgMap * fOwnedSubAlgMp
local pool for owned sub-algs (taken out of the factory pool)
Definition: Algorithm.h:167
bool fOwnsSubstruc
true if it owns its substructure (sub-algs,...)
Definition: Algorithm.h:155
Algorithm abstract base class.
Definition: Algorithm.h:54
AlgId fID
algorithm name and configuration set
Definition: Algorithm.h:156
virtual const Registry & GetConfig(void) const
Definition: Algorithm.cxx:254
map< string, Algorithm * >::const_iterator AlgMapConstIter
Definition: Algorithm.h:51
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
TRandom3 r(0)
string Key(void) const
Definition: AlgId.h:47
double KNOHadronization::ReWeightPt2 ( const PDGCodeList pdgcv) const
private

Definition at line 1038 of file KNOHadronization.cxx.

References fPhaseSpaceGenerator, fPhSpRwA, MECModelEnuComparisons::i, make_associated_cosmic_defs::p4, ana::Sqrt(), and w.

Referenced by PhaseSpaceDecay().

1039 {
1040 // Phase Space Decay re-weighting to reproduce exp(-pT2/<pT2>) pion pT2
1041 // distributions.
1042 // See: A.B.Clegg, A.Donnachie, A Description of Jet Structure by pT-limited
1043 // Phase Space.
1044 
1045  double w = 1;
1046 
1047  for(unsigned int i = 0; i < pdgcv.size(); i++) {
1048 
1049  //int pdgc = pdgcv[i];
1050  //if(pdgc!=kPdgPiP&&pdgc!=kPdgPiM) continue;
1051 
1052  TLorentzVector * p4 = fPhaseSpaceGenerator.GetDecay(i);
1053  double pt2 = TMath::Power(p4->Px(),2) + TMath::Power(p4->Py(),2);
1054  double wi = TMath::Exp(-fPhSpRwA*TMath::Sqrt(pt2));
1055  //double wi = (9.41 * TMath::Landau(pt2,0.24,0.12));
1056 
1057  w *= wi;
1058  }
1059  return w;
1060 }
TGenPhaseSpace fPhaseSpaceGenerator
a phase space generator
double fPhSpRwA
parameter for phase space decay reweighting
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
Float_t w
Definition: plot.C:20
PDGCodeList * KNOHadronization::SelectParticles ( const Interaction interaction) const
virtual

Implements genie::HadronizationModelBase.

Definition at line 169 of file KNOHadronization.cxx.

References AssertValidity(), fForceMinMult, genie::PDGLibrary::Find(), GenerateHadronCodes(), HadronShowerCharge(), genie::PDGLibrary::Instance(), genie::controls::kMaxKNOHadSystIterations, LOG, m, MultiplicityProb(), MECModelEnuComparisons::opt, pDEBUG, pERROR, pINFO, pNOTICE, pWARN, W, and genie::utils::kinematics::W().

Referenced by Hadronize().

171 {
172  if(!this->AssertValidity(interaction)) {
173  LOG("KNOHad", pWARN) << "Returning a null particle list!";
174  return 0;
175  }
176 
177  unsigned int min_mult = 2;
178  unsigned int mult = 0;
179  PDGCodeList * pdgcv = 0;
180 
181  double W = utils::kinematics::W(interaction);
182 
183  //-- Get the charge that the hadron shower needs to have so as to
184  // conserve charge in the interaction
185  int maxQ = this->HadronShowerCharge(interaction);
186  LOG("KNOHad", pINFO) << "Hadron Shower Charge = " << maxQ;
187 
188  //-- Build the multiplicity probabilities for the input interaction
189  LOG("KNOHad", pDEBUG) << "Building Multiplicity Probability distribution";
190  LOG("KNOHad", pDEBUG) << *interaction;
191  Option_t * opt = "+LowMultSuppr+Renormalize";
192  TH1D * mprob = this->MultiplicityProb(interaction,opt);
193 
194  if(!mprob) {
195  LOG("KNOHad", pWARN) << "Null multiplicity probability distribution!";
196  return 0;
197  }
198  if(mprob->Integral("width")<=0) {
199  LOG("KNOHad", pWARN) << "Empty multiplicity probability distribution!";
200  delete mprob;
201  return 0;
202  }
203 
204  //----- FIND AN ALLOWED SOLUTION FOR THE HADRONIC FINAL STATE
205 
206  bool allowed_state=false;
207  unsigned int itry = 0;
208 
209  while(!allowed_state)
210  {
211  itry++;
212 
213  //-- Go in error if a solution has not been found after many attempts
214  if(itry>kMaxKNOHadSystIterations) {
215  LOG("KNOHad", pERROR)
216  << "Couldn't select hadronic shower particles after: "
217  << itry << " attempts!";
218  delete mprob;
219  return 0;
220  }
221 
222  //-- Generate a hadronic multiplicity
223  mult = TMath::Nint( mprob->GetRandom() );
224 
225  LOG("KNOHad", pINFO) << "Hadron multiplicity = " << mult;
226 
227  //-- Check that the generated multiplicity is consistent with the charge
228  // that the hadronic shower is required to have - else retry
229  if(mult < (unsigned int) TMath::Abs(maxQ)) {
230  LOG("KNOHad", pWARN)
231  << "Multiplicity not enough to generate hadronic charge! Retrying.";
232  allowed_state = false;
233  continue;
234  }
235 
236  //-- Force a min multiplicity
237  // This should never happen if the multiplicity probability distribution
238  // was properly built
239  if(mult < min_mult) {
240  if(fForceMinMult) {
241  LOG("KNOHad", pWARN)
242  << "Low generated multiplicity: " << mult
243  << ". Forcing to minimum accepted multiplicity: " << min_mult;
244  mult = min_mult;
245  } else {
246  LOG("KNOHad", pWARN)
247  << "Generated multiplicity: " << mult << " is too low! Quitting";
248  delete mprob;
249  return 0;
250  }
251  }
252 
253  //-- Determine what kind of particles we have in the final state
254  pdgcv = this->GenerateHadronCodes(mult, maxQ, W);
255 
256  LOG("KNOHad", pNOTICE)
257  << "Generated multiplicity (@ W = " << W << "): " << pdgcv->size();
258 
259  // muliplicity might have been forced to smaller value if the invariant
260  // mass of the hadronic system was not sufficient
261  mult = pdgcv->size(); // update for potential change
262 
263  // is it an allowed decay?
264  double msum=0;
265  vector<int>::const_iterator pdg_iter;
266  for(pdg_iter = pdgcv->begin(); pdg_iter != pdgcv->end(); ++pdg_iter) {
267  int pdgc = *pdg_iter;
268  double m = PDGLibrary::Instance()->Find(pdgc)->Mass();
269 
270  msum += m;
271  LOG("KNOHad", pDEBUG) << "- PDGC=" << pdgc << ", m=" << m << " GeV";
272  }
273  bool permitted = (W > msum);
274 
275  if(!permitted) {
276  LOG("KNOHad", pWARN) << "*** Decay forbidden by kinematics! ***";
277  LOG("KNOHad", pWARN) << "sum{mass} = " << msum << ", W = " << W;
278  LOG("KNOHad", pWARN) << "Discarding hadronic system & re-trying!";
279  delete pdgcv;
280  allowed_state = false;
281  continue;
282  }
283 
284  allowed_state = true;
285 
286  LOG("KNOHad", pNOTICE)
287  << "Found an allowed hadronic state @ W=" << W
288  << " multiplicity=" << mult;
289 
290  } // attempts
291 
292  delete mprob;
293 
294  return pdgcv;
295 }
#define pERROR
Definition: Messenger.h:60
int HadronShowerCharge(const Interaction *) const
A list of PDG codes.
Definition: PDGCodeList.h:33
double W(const Interaction *const i)
Definition: KineUtils.cxx:1015
PDGCodeList * GenerateHadronCodes(int mult, int maxQ, double W) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
TH1D * MultiplicityProb(const Interaction *, Option_t *opt="") const
#define pINFO
Definition: Messenger.h:63
bool AssertValidity(const Interaction *i) const
#define pWARN
Definition: Messenger.h:61
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
bool fForceMinMult
force minimum multiplicity if (at low W) generated less?
static const unsigned int kMaxKNOHadSystIterations
Definition: Controls.h:57
#define pNOTICE
Definition: Messenger.h:62
#define W(x)
#define pDEBUG
Definition: Messenger.h:64
void Algorithm::SetId ( const AlgId id)
virtualinherited

Set algorithm ID.

Definition at line 313 of file Algorithm.cxx.

Referenced by genie::Algorithm::AllowReconfig().

314 {
315  fID.Copy(id);
316 }
AlgId fID
algorithm name and configuration set
Definition: Algorithm.h:156
void Copy(const AlgId &id)
Definition: AlgId.cxx:78
void Algorithm::SetId ( string  name,
string  config 
)
virtualinherited

Definition at line 318 of file Algorithm.cxx.

319 {
320  fID.SetId(name, config);
321 }
const XML_Char * name
Definition: expat.h:151
Definition: config.py:1
AlgId fID
algorithm name and configuration set
Definition: Algorithm.h:156
void SetId(string name, string config="")
Definition: AlgId.cxx:70
const Algorithm * Algorithm::SubAlg ( const RgKey registry_key) const
inherited

Access the sub-algorithm pointed to by the input key, either from the local pool or from AlgFactory's pool

Definition at line 353 of file Algorithm.cxx.

References ana::assert(), genie::AlgFactory::GetAlgorithm(), genie::AlgFactory::Instance(), LOG, pERROR, and pINFO.

Referenced by genie::Algorithm::AllowReconfig(), genie::utils::gsl::FullQELdXSec::FullQELdXSec(), genie::NewQELXSec::Integrate(), genie::HadronTransporter::LoadConfig(), genie::NucleonDecayPrimaryVtxGenerator::LoadConfig(), genie::IBDXSecMap::LoadConfig(), genie::EmpiricalMECPXSec2015::LoadConfig(), genie::COHElasticPXSec::LoadConfig(), genie::DISHadronicSystemGenerator::LoadConfig(), genie::SlowRsclCharmDISPXSecLO::LoadConfig(), genie::AhrensNCELPXSec::LoadConfig(), genie::AlamSimoAtharVacasSKPXSec2014::LoadConfig(), genie::UnstableParticleDecayer::LoadConfig(), genie::ReinDFRPXSec::LoadConfig(), genie::PythiaHadronization::LoadConfig(), genie::BYPDF::LoadConfig(), genie::QPMDISPXSec::LoadConfig(), genie::AlvarezRusoCOHPiPXSec::LoadConfig(), genie::RosenbluthPXSec::LoadConfig(), genie::StrumiaVissaniIBDPXSec::LoadConfig(), genie::MECGenerator::LoadConfig(), genie::NNBarOscPrimaryVtxGenerator::LoadConfig(), genie::FermiMover::LoadConfig(), genie::AhrensDMELPXSec::LoadConfig(), genie::IMDAnnihilationPXSec::LoadConfig(), genie::QELEventGenerator::LoadConfig(), genie::KNOPythiaHadronization::LoadConfig(), genie::AivazisCharmPXSecLO::LoadConfig(), genie::RESHadronicSystemGenerator::LoadConfig(), genie::P33PaschosLalakulichPXSec::LoadConfig(), genie::BergerSehgalFMCOHPiPXSec2015::LoadConfig(), genie::QPMDMDISPXSec::LoadConfig(), genie::BergerSehgalCOHPiPXSec2015::LoadConfig(), genie::LwlynSmithQELCCPXSec::LoadConfig(), genie::NuElectronPXSec::LoadConfig(), genie::PaisQELLambdaPXSec::LoadConfig(), genie::ReinSehgalCOHPiPXSec::LoadConfig(), genie::NievesSimoVacasMECPXSec2016::LoadConfig(), genie::KovalenkoQELCharmPXSec::LoadConfig(), genie::CharmHadronization::LoadConfig(), genie::NuclearModelMap::LoadConfig(), genie::EventGenerator::LoadConfig(), genie::SmithMonizQELCCXSec::LoadConfig(), genie::BardinIMDRadCorPXSec::LoadConfig(), genie::ReinSehgalRESPXSec::LoadConfig(), genie::MartiniEricsonChanfrayMarteauMECPXSec2016::LoadConfig(), genie::LwlynSmithFF::LoadConfig(), genie::QELEventGeneratorSM::LoadConfig(), genie::QPMDISStrucFuncBase::LoadConfig(), genie::SmithMonizQELCCPXSec::LoadConfig(), genie::NievesQELCCPXSec::LoadConfig(), genie::HAIntranuke::LoadConfig(), genie::HAIntranuke2018::LoadConfig(), genie::HNIntranuke2018::LoadConfig(), genie::BSKLNBaseRESPXSec2014::LoadConfig(), genie::ReinSehgalSPPPXSec::LoadConfig(), LoadConfig(), and genie::EventGeneratorListAssembler::LoadGenerator().

354 {
355 // Returns the sub-algorithm pointed to this algorithm's XML config file using
356 // the the values of the key.
357 // This method asserts the existence of these keys in the XML config.
358 // Note: Since only 1 parameter is used, the key value should contain both the
359 // algorithm name and its configuration set according to the usual scheme:
360 // namespace::algorithm_name/configuration_set
361 //
362  LOG("Algorithm", pINFO)
363  << "Fetching sub-alg within alg: " << this->Id().Key()
364  << " pointed to by key: " << registry_key;
365 
366  //-- if the algorithm owns its substructure:
367  // return the sub-algorithm from the local pool
368  //
369  if(fOwnsSubstruc) {
370  AlgMapConstIter iter = fOwnedSubAlgMp->find(registry_key);
371  if(iter!=fOwnedSubAlgMp->end()) return iter->second;
372  LOG("Algorithm", pERROR)
373  << "Owned sub-alg pointed to by key: " << registry_key
374  << " was not found within alg: " << this->Id().Key();
375  return 0;
376  }
377 
378  //-- if the algorithm does not own its substructure:
379  // return the sub-algorithm from the AlgFactory's pool
380  RgAlg alg ;
381  GetParam( registry_key, alg ) ;
382 
383  LOG("Algorithm", pINFO)
384  << "Registry key: " << registry_key << " points to algorithm: " << alg;
385 
386  // retrieve the Algorithm object from the the Algorithm factory
387  AlgFactory * algf = AlgFactory::Instance();
388  const Algorithm * algbase = algf->GetAlgorithm(alg.name, alg.config);
389  assert(algbase);
390 
391  return algbase;
392 }
#define pERROR
Definition: Messenger.h:60
AlgMap * fOwnedSubAlgMp
local pool for owned sub-algs (taken out of the factory pool)
Definition: Algorithm.h:167
bool fOwnsSubstruc
true if it owns its substructure (sub-algs,...)
Definition: Algorithm.h:155
Algorithm abstract base class.
Definition: Algorithm.h:54
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
const Algorithm * GetAlgorithm(const AlgId &algid)
Definition: AlgFactory.cxx:86
#define pINFO
Definition: Messenger.h:63
map< string, Algorithm * >::const_iterator AlgMapConstIter
Definition: Algorithm.h:51
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:98
static AlgFactory * Instance()
Definition: AlgFactory.cxx:75
assert(nhit_max >=nhit_nbins)
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
The GENIE Algorithm Factory.
Definition: AlgFactory.h:40
string Key(void) const
Definition: AlgId.h:47
double KNOHadronization::Weight ( void  ) const
virtual

Implements genie::HadronizationModelBase.

Definition at line 408 of file KNOHadronization.cxx.

References fWeight.

409 {
410  return fWeight;
411 }
double fWeight
weight for generated event
double HadronizationModelBase::Wmin ( void  ) const
protectedinherited

Various utility methods common to hadronization models.

Definition at line 55 of file HadronizationModelBase.cxx.

References genie::constants::kNucleonMass, and genie::constants::kPionMass.

Referenced by genie::PythiaHadronization::AssertValidity(), and AssertValidity().

56 {
57  return (kNucleonMass+kPionMass);
58 }
static const double kNucleonMass
Definition: Constants.h:78
static const double kPionMass
Definition: Constants.h:74

Member Data Documentation

double genie::KNOHadronization::fAhyperon
private

parameter controlling strange baryon production probability via associated production (P=a+b*lnW^2)

Definition at line 127 of file KNOHadronization.h.

Referenced by GenerateBaryonPdgCode(), and LoadConfig().

bool genie::Algorithm::fAllowReconfig
protectedinherited
double genie::KNOHadronization::fAvbn
private

offset in average charged hadron multiplicity = f(W) relation for vbn

Definition at line 122 of file KNOHadronization.h.

Referenced by AverageChMult(), and LoadConfig().

double genie::KNOHadronization::fAvbp
private

offset in average charged hadron multiplicity = f(W) relation for vbp

Definition at line 121 of file KNOHadronization.h.

Referenced by AverageChMult(), and LoadConfig().

double genie::KNOHadronization::fAvn
private

offset in average charged hadron multiplicity = f(W) relation for vn

Definition at line 120 of file KNOHadronization.h.

Referenced by AverageChMult(), and LoadConfig().

double genie::KNOHadronization::fAvp
private

offset in average charged hadron multiplicity = f(W) relation for vp

Definition at line 119 of file KNOHadronization.h.

Referenced by AverageChMult(), and LoadConfig().

TF1* genie::KNOHadronization::fBaryonPT2pdf
private

baryon pT^2 PDF

Definition at line 134 of file KNOHadronization.h.

Referenced by DecayBackToBack(), DecayMethod2(), KNOHadronization(), LoadConfig(), and ~KNOHadronization().

TF1* genie::KNOHadronization::fBaryonXFpdf
private

baryon xF PDF

Definition at line 133 of file KNOHadronization.h.

Referenced by DecayBackToBack(), DecayMethod2(), KNOHadronization(), LoadConfig(), and ~KNOHadronization().

double genie::KNOHadronization::fBhyperon
private

see above

Definition at line 128 of file KNOHadronization.h.

Referenced by GenerateBaryonPdgCode(), and LoadConfig().

double genie::KNOHadronization::fBvbn
private

slope in average charged hadron multiplicity = f(W) relation for vbn

Definition at line 126 of file KNOHadronization.h.

Referenced by AverageChMult(), and LoadConfig().

double genie::KNOHadronization::fBvbp
private

slope in average charged hadron multiplicity = f(W) relation for vbp

Definition at line 125 of file KNOHadronization.h.

Referenced by AverageChMult(), and LoadConfig().

double genie::KNOHadronization::fBvn
private

slope in average charged hadron multiplicity = f(W) relation for vn

Definition at line 124 of file KNOHadronization.h.

Referenced by AverageChMult(), and LoadConfig().

double genie::KNOHadronization::fBvp
private

slope in average charged hadron multiplicity = f(W) relation for vp

Definition at line 123 of file KNOHadronization.h.

Referenced by AverageChMult(), and LoadConfig().

vector<Registry*> genie::Algorithm::fConfVect
protectedinherited

ideally these members should go private Registry will be access only through the GetParam method configurations registries from various sources the order of the vector is the precedence in case of repeated parameters position 0 -> Highest precedence

Definition at line 161 of file Algorithm.h.

double genie::KNOHadronization::fCvbn
private

Levy function parameter for vbn.

Definition at line 132 of file KNOHadronization.h.

Referenced by KNO(), and LoadConfig().

double genie::KNOHadronization::fCvbp
private

Levy function parameter for vbp.

Definition at line 131 of file KNOHadronization.h.

Referenced by KNO(), and LoadConfig().

double genie::KNOHadronization::fCvn
private

Levy function parameter for vn.

Definition at line 130 of file KNOHadronization.h.

Referenced by KNO(), and LoadConfig().

double genie::KNOHadronization::fCvp
private

Levy function parameter for vp.

Definition at line 129 of file KNOHadronization.h.

Referenced by KNO(), and LoadConfig().

const DecayModelI* genie::KNOHadronization::fDecayer
private

decay algorithm

Definition at line 103 of file KNOHadronization.h.

Referenced by HandleDecays(), and LoadConfig().

bool genie::KNOHadronization::fForceDecays
private

force decays of unstable hadrons produced?

Definition at line 109 of file KNOHadronization.h.

Referenced by HandleDecays(), and LoadConfig().

bool genie::KNOHadronization::fForceMinMult
private

force minimum multiplicity if (at low W) generated less?

Definition at line 110 of file KNOHadronization.h.

Referenced by LoadConfig(), and SelectParticles().

bool genie::KNOHadronization::fForceNeuGenLimit
private

force upper hadronic multiplicity to NeuGEN limit

Definition at line 104 of file KNOHadronization.h.

Referenced by LoadConfig(), and MultiplicityProb().

bool genie::KNOHadronization::fGenerateWeighted
private

generate weighted events?

Definition at line 111 of file KNOHadronization.h.

Referenced by LoadConfig(), and PhaseSpaceDecay().

AlgId genie::Algorithm::fID
protectedinherited

algorithm name and configuration set

Definition at line 156 of file Algorithm.h.

Referenced by genie::Algorithm::Id().

AlgMap* genie::Algorithm::fOwnedSubAlgMp
protectedinherited

local pool for owned sub-algs (taken out of the factory pool)

Definition at line 167 of file Algorithm.h.

vector<bool> genie::Algorithm::fOwnerships
protectedinherited

ownership for every registry in fConfVect

Definition at line 164 of file Algorithm.h.

bool genie::Algorithm::fOwnsSubstruc
protectedinherited

true if it owns its substructure (sub-algs,...)

Definition at line 155 of file Algorithm.h.

double genie::KNOHadronization::fPeta
private

{eta eta} production probability

Definition at line 118 of file KNOHadronization.h.

Referenced by GenerateHadronCodes(), and LoadConfig().

TGenPhaseSpace genie::KNOHadronization::fPhaseSpaceGenerator
mutableprivate

a phase space generator

Definition at line 96 of file KNOHadronization.h.

Referenced by PhaseSpaceDecay(), and ReWeightPt2().

double genie::KNOHadronization::fPhSpRwA
private

parameter for phase space decay reweighting

Definition at line 112 of file KNOHadronization.h.

Referenced by LoadConfig(), and ReWeightPt2().

double genie::KNOHadronization::fPK0
private

{K0 K0bar} production probability

Definition at line 116 of file KNOHadronization.h.

Referenced by GenerateHadronCodes(), and LoadConfig().

double genie::KNOHadronization::fPKc
private

{K+ K- } production probability

Definition at line 115 of file KNOHadronization.h.

Referenced by GenerateHadronCodes(), and LoadConfig().

double genie::KNOHadronization::fPpi0
private

{pi0 pi0 } production probability

Definition at line 113 of file KNOHadronization.h.

Referenced by GenerateHadronCodes(), and LoadConfig().

double genie::KNOHadronization::fPpi0eta
private

{Pi0 eta} production probability

Definition at line 117 of file KNOHadronization.h.

Referenced by GenerateHadronCodes(), and LoadConfig().

double genie::KNOHadronization::fPpic
private

{pi+ pi- } production probability

Definition at line 114 of file KNOHadronization.h.

Referenced by GenerateHadronCodes(), and LoadConfig().

bool genie::KNOHadronization::fReWeightDecays
private

Reweight phase space decays?

Definition at line 108 of file KNOHadronization.h.

Referenced by Hadronize(), and LoadConfig().

double genie::HadronizationModelBase::fRvbnCCm2
protectedinherited

neugen's Rijk: vbn, CC, multiplicity = 2

Definition at line 68 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvbnCCm3
protectedinherited

neugen's Rijk: vbn, CC, multiplicity = 3

Definition at line 69 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvbnNCm2
protectedinherited

neugen's Rijk: vbn, NC, multiplicity = 2

Definition at line 70 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvbnNCm3
protectedinherited

neugen's Rijk: vbn, NC, multiplicity = 3

Definition at line 71 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvbpCCm2
protectedinherited

neugen's Rijk: vbp, CC, multiplicity = 2

Definition at line 64 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvbpCCm3
protectedinherited

neugen's Rijk: vbp, CC, multiplicity = 3

Definition at line 65 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvbpNCm2
protectedinherited

neugen's Rijk: vbp, NC, multiplicity = 2

Definition at line 66 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvbpNCm3
protectedinherited

neugen's Rijk: vbp, NC, multiplicity = 3

Definition at line 67 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvnCCm2
protectedinherited

neugen's Rijk: vn, CC, multiplicity = 2

Definition at line 60 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvnCCm3
protectedinherited

neugen's Rijk: vn, CC, multiplicity = 3

Definition at line 61 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvnNCm2
protectedinherited

neugen's Rijk: vn, NC, multiplicity = 2

Definition at line 62 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvnNCm3
protectedinherited

neugen's Rijk: vn, NC, multiplicity = 3

Definition at line 63 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvpCCm2
protectedinherited

neugen's Rijk: vp, CC, multiplicity = 2

Definition at line 56 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvpCCm3
protectedinherited

neugen's Rijk: vp, CC, multiplicity = 3

Definition at line 57 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvpNCm2
protectedinherited

neugen's Rijk: vp, NC, multiplicity = 2

Definition at line 58 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

double genie::HadronizationModelBase::fRvpNCm3
protectedinherited

neugen's Rijk: vp, NC, multiplicity = 3

Definition at line 59 of file HadronizationModelBase.h.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::LoadConfig(), and LoadConfig().

AlgStatus_t genie::Algorithm::fStatus
protectedinherited

algorithm execution status

Definition at line 166 of file Algorithm.h.

Referenced by genie::Algorithm::GetStatus().

bool genie::KNOHadronization::fUseBaryonXfPt2Param
private

Generate baryon xF,pT2 from experimental parameterization?

Definition at line 107 of file KNOHadronization.h.

Referenced by Hadronize(), and LoadConfig().

bool genie::KNOHadronization::fUseIsotropic2BDecays
private

force isotropic, non-reweighted 2-body decays for consistency with neugen/daikon

Definition at line 106 of file KNOHadronization.h.

Referenced by Hadronize(), and LoadConfig().

double genie::HadronizationModelBase::fWcut
protectedinherited

configuration data common to all hadronizers

neugen's Rijk applied for W<Wcut (see DIS/RES join scheme)

Definition at line 55 of file HadronizationModelBase.h.

Referenced by genie::PythiaHadronization::LoadConfig(), LoadConfig(), genie::PythiaHadronization::MultiplicityProb(), and MultiplicityProb().

double genie::KNOHadronization::fWeight
mutableprivate

weight for generated event

Definition at line 97 of file KNOHadronization.h.

Referenced by Hadronize(), PhaseSpaceDecay(), and Weight().


The documentation for this class was generated from the following files: