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

A 'composite' hadronization model using a KNO-based hadronization model at low W and PYTHIA/JETSET at higher W. Contains no new hadronization code but merely a configurable KNO to PYTHIA transition scheme. More...

#include <KNOPythiaHadronization.h>

Inheritance diagram for genie::KNOPythiaHadronization:
genie::EventRecordVisitorI genie::Algorithm

Public Member Functions

 KNOPythiaHadronization ()
 
 KNOPythiaHadronization (string config)
 
virtual ~KNOPythiaHadronization ()
 
void ProcessEventRecord (GHepRecord *event) const
 
virtual void Configure (const Registry &config)
 
virtual void Configure (string config)
 

Private Member Functions

void LoadConfig (void)
 
const EventRecordVisitorISelectHadronizer (const Interaction *) const
 

Private Attributes

const EventRecordVisitorIfKNOHadronizer
 KNO Hadronizer. More...
 
const EventRecordVisitorIfPythiaHadronizer
 PYTHIA Hadronizer. More...
 
int fMethod
 KNO -> PYTHIA transition method. More...
 
double fWminTrWindow
 min W in transition region (pure KNO < Wmin) More...
 
double fWmaxTrWindow
 max W in transition region (pure PYTHIA > Wmax) More...
 

Additional Inherited Members

- Protected Member Functions inherited from genie::EventRecordVisitorI
 EventRecordVisitorI ()
 
 EventRecordVisitorI (string name)
 
 EventRecordVisitorI (string name, string config)
 
virtual ~EventRecordVisitorI ()
 
- Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 
 Algorithm (string name)
 
 Algorithm (string name, string config)
 
void Initialize (void)
 
void DeleteConfig (void)
 
void DeleteSubstructure (void)
 
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 >
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters. More...
 
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
 
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...
 
virtual ~Algorithm ()
 
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...
 
- Static Protected Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
 
static string BuildParamVectSizeKey (const std::string &comm_name)
 
- Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
 
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...) More...
 
AlgId fID
 algorithm name and configuration set More...
 
vector< Registry * > fConfVect
 
vector< boolfOwnerships
 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...
 

Detailed Description

A 'composite' hadronization model using a KNO-based hadronization model at low W and PYTHIA/JETSET at higher W. Contains no new hadronization code but merely a configurable KNO to PYTHIA transition scheme.

Author
Costas Andreopoulos <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

June 08, 2006

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 30 of file KNOPythiaHadronization.h.

Constructor & Destructor Documentation

KNOPythiaHadronization::KNOPythiaHadronization ( )

Definition at line 39 of file KNOPythiaHadronization.cxx.

39  :
40 EventRecordVisitorI("genie::KNOPythiaHadronization")
41 {
42 
43 }
KNOPythiaHadronization::KNOPythiaHadronization ( string  config)

Definition at line 45 of file KNOPythiaHadronization.cxx.

45  :
46 EventRecordVisitorI("genie::KNOPythiaHadronization", config)
47 {
48 
49 }
static Config * config
Definition: config.cpp:1054
KNOPythiaHadronization::~KNOPythiaHadronization ( )
virtual

Definition at line 51 of file KNOPythiaHadronization.cxx.

52 {
53 
54 }

Member Function Documentation

void KNOPythiaHadronization::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 160 of file KNOPythiaHadronization.cxx.

161 {
162  Algorithm::Configure(config);
163  this->LoadConfig();
164 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:71
void KNOPythiaHadronization::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 166 of file KNOPythiaHadronization.cxx.

167 {
169  this->LoadConfig();
170 }
static Config * config
Definition: config.cpp:1054
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:71
void KNOPythiaHadronization::LoadConfig ( void  )
private

Definition at line 172 of file KNOPythiaHadronization.cxx.

173 {
174 // Read configuration options or set defaults
175 
176  // Load the requested hadronizers
178  dynamic_cast<const EventRecordVisitorI *> (
179  this->SubAlg("KNO-Hadronizer"));
181  dynamic_cast<const EventRecordVisitorI *> (
182  this->SubAlg("PYTHIA-Hadronizer"));
183 
185 
186  // Get transition method
187  fMethod = 2 ;
188  GetParam( "TransMethod", fMethod, false ) ;
189 
190 
191  // Get transition scheme specific config
192  if(fMethod==2) {
193 
194  GetParam( "KNO2PYTHIA-Wmin", fWminTrWindow ) ;
195 
196  GetParam( "KNO2PYTHIA-Wmax", fWmaxTrWindow ) ;
197 
198  }
199 }
int fMethod
KNO -> PYTHIA transition method.
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
const EventRecordVisitorI * fPythiaHadronizer
PYTHIA Hadronizer.
const EventRecordVisitorI * fKNOHadronizer
KNO Hadronizer.
double fWminTrWindow
min W in transition region (pure KNO < Wmin)
double fWmaxTrWindow
max W in transition region (pure PYTHIA > Wmax)
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:354
void KNOPythiaHadronization::ProcessEventRecord ( GHepRecord event) const
virtual

Implements genie::EventRecordVisitorI.

Definition at line 61 of file KNOPythiaHadronization.cxx.

62 {
63 // Generate the hadronic system using either the KNO-based or PYTHIA/JETSET
64 // hadronization models according to the specified transition scheme
65  Interaction * interaction = event->Summary();
66 
67 
68  //-- Select hadronizer
69  const EventRecordVisitorI * hadronizer =
70  this->SelectHadronizer(interaction);
71 
72  //-- Run the selected hadronizer
73  hadronizer->ProcessEventRecord(event);
74 
75  // //-- Update the weight
76  // fWeight = hadronizer->Weight();
77 }
virtual void ProcessEventRecord(GHepRecord *event_rec) const =0
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
Summary information for an interaction.
Definition: Interaction.h:55
const EventRecordVisitorI * SelectHadronizer(const Interaction *) const
const EventRecordVisitorI * KNOPythiaHadronization::SelectHadronizer ( const Interaction interaction) const
private

Definition at line 110 of file KNOPythiaHadronization.cxx.

112 {
113  const EventRecordVisitorI * hadronizer = 0;
114  RandomGen * rnd = RandomGen::Instance();
115  double W = 0;
116 
117  switch(fMethod) {
118 
119  // ** KNO-only
120  case(0) :
121  hadronizer = fKNOHadronizer;
122  break;
123 
124  // ** PYTHIA/JETSET-only
125  case(1) :
126  hadronizer = fPythiaHadronizer;
127  break;
128 
129  // ** KNO-only @ W < Wmin
130  // ** PYTHIA/JETSET-only @ W > Wmax
131  // ** Smooth linear transition in [Wmin,Wmax]
132  case(2) :
133  W = interaction->Kine().W();
134  if (W <= fWminTrWindow) hadronizer = fKNOHadronizer;
135  else if (W > fWmaxTrWindow) hadronizer = fPythiaHadronizer;
136  else {
137  // Transition window
138  double R = rnd->RndHadro().Rndm();
140  if(R>f) hadronizer = fKNOHadronizer;
141  else hadronizer = fPythiaHadronizer;
142  }
143  break;
144 
145  default :
146  LOG("HybridHad", pFATAL)
147  << "Unspecified transition method: " << fMethod;
148  exit(1);
149  }
150 
151  if(!hadronizer) {
152  LOG("HybridHad", pFATAL) << "Null hadronizer!!";
153  exit(1);
154  }
155 
156  LOG("HybridHad", pINFO) << "Selected hadronizer: " << hadronizer->Id();
157  return hadronizer;
158 }
double W(bool selected=false) const
Definition: Kinematics.cxx:167
int fMethod
KNO -> PYTHIA transition method.
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:79
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
#define pFATAL
Definition: Messenger.h:57
const EventRecordVisitorI * fPythiaHadronizer
PYTHIA Hadronizer.
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:30
const EventRecordVisitorI * fKNOHadronizer
KNO Hadronizer.
double fWminTrWindow
min W in transition region (pure KNO < Wmin)
double fWmaxTrWindow
max W in transition region (pure PYTHIA > Wmax)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
const Kinematics & Kine(void) const
Definition: Interaction.h:70
#define pINFO
Definition: Messenger.h:63
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
Definition: RandomGen.h:54
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:98

Member Data Documentation

const EventRecordVisitorI* genie::KNOPythiaHadronization::fKNOHadronizer
private

KNO Hadronizer.

Definition at line 54 of file KNOPythiaHadronization.h.

int genie::KNOPythiaHadronization::fMethod
private

KNO -> PYTHIA transition method.

Definition at line 57 of file KNOPythiaHadronization.h.

const EventRecordVisitorI* genie::KNOPythiaHadronization::fPythiaHadronizer
private

PYTHIA Hadronizer.

Definition at line 55 of file KNOPythiaHadronization.h.

double genie::KNOPythiaHadronization::fWmaxTrWindow
private

max W in transition region (pure PYTHIA > Wmax)

Definition at line 59 of file KNOPythiaHadronization.h.

double genie::KNOPythiaHadronization::fWminTrWindow
private

min W in transition region (pure KNO < Wmin)

Definition at line 58 of file KNOPythiaHadronization.h.


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