Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
genie::HadronizationModelBase Class Referenceabstract

An abstract class. It avoids implementing the HadronizationModelI interface, leaving it for the concrete subclasses (KNO, Pythia,...). It propagates some common methods to the concrete subclasses. More...

#include <HadronizationModelBase.h>

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

Public Member Functions

virtual void Initialize (void) const =0
 
virtual TClonesArray * Hadronize (const Interaction *) const =0
 
virtual double Weight (void) const =0
 
virtual PDGCodeListSelectParticles (const Interaction *) const =0
 
virtual TH1D * MultiplicityProb (const Interaction *, Option_t *opt="") const =0
 
- Public Member Functions inherited from genie::HadronizationModelI
virtual ~HadronizationModelI ()
 
- Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
 
virtual void Configure (const Registry &config)
 
virtual 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

 HadronizationModelBase ()
 
 HadronizationModelBase (string name)
 
 HadronizationModelBase (string name, string config)
 
virtual ~HadronizationModelBase ()
 
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
 
- Protected Member Functions inherited from genie::HadronizationModelI
 HadronizationModelI ()
 
 HadronizationModelI (string name)
 
 HadronizationModelI (string name, string config)
 
- Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 
 Algorithm (string name)
 
 Algorithm (string name, string config)
 
void Initialize (void)
 
void DeleteConfig (void)
 
void DeleteSubstructure (void)
 
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...
 
- 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

An abstract class. It avoids implementing the HadronizationModelI interface, leaving it for the concrete subclasses (KNO, Pythia,...). It propagates some common methods to the concrete subclasses.

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

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 28 of file HadronizationModelBase.h.

Constructor & Destructor Documentation

HadronizationModelBase::HadronizationModelBase ( void  )
protected

Definition at line 32 of file HadronizationModelBase.cxx.

32  :
34 {
35 
36 }
HadronizationModelBase::HadronizationModelBase ( string  name)
protected

Definition at line 38 of file HadronizationModelBase.cxx.

38  :
40 {
41 
42 }
static QCString name
Definition: declinfo.cpp:673
HadronizationModelBase::HadronizationModelBase ( string  name,
string  config 
)
protected

Definition at line 44 of file HadronizationModelBase.cxx.

44  :
46 {
47 
48 }
static QCString name
Definition: declinfo.cpp:673
static Config * config
Definition: config.cpp:1054
HadronizationModelBase::~HadronizationModelBase ( )
protectedvirtual

Definition at line 50 of file HadronizationModelBase.cxx.

51 {
52 
53 }

Member Function Documentation

void HadronizationModelBase::ApplyRijk ( const Interaction i,
bool  norm,
TH1D *  mp 
) const
protected

Definition at line 80 of file HadronizationModelBase.cxx.

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
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:304
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:140
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:43
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
double fRvpCCm3
neugen&#39;s Rijk: vp, CC, multiplicity = 3
double fRvbpNCm2
neugen&#39;s Rijk: vbp, NC, multiplicity = 2
auto norm(Vector const &v)
Return norm of the specified vector.
bool IsEM(void) const
double fRvnNCm3
neugen&#39;s Rijk: vn, NC, multiplicity = 3
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
TH1D * HadronizationModelBase::CreateMultProbHist ( double  maxmult) const
protected

Definition at line 68 of file HadronizationModelBase.cxx.

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 }
virtual TClonesArray* genie::HadronizationModelBase::Hadronize ( const Interaction ) const
pure virtual
virtual void genie::HadronizationModelBase::Initialize ( void  ) const
pure virtual

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

Implements genie::HadronizationModelI.

Implemented in genie::KNOHadronization, and genie::PythiaHadronization.

double HadronizationModelBase::MaxMult ( const Interaction i) const
protected

Definition at line 60 of file HadronizationModelBase.cxx.

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
virtual TH1D* genie::HadronizationModelBase::MultiplicityProb ( const Interaction ,
Option_t *  opt = "" 
) const
pure virtual
virtual PDGCodeList* genie::HadronizationModelBase::SelectParticles ( const Interaction ) const
pure virtual
virtual double genie::HadronizationModelBase::Weight ( void  ) const
pure virtual
double HadronizationModelBase::Wmin ( void  ) const
protected

Various utility methods common to hadronization models.

Definition at line 55 of file HadronizationModelBase.cxx.

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::HadronizationModelBase::fRvbnCCm2
protected

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

Definition at line 68 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvbnCCm3
protected

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

Definition at line 69 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvbnNCm2
protected

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

Definition at line 70 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvbnNCm3
protected

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

Definition at line 71 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvbpCCm2
protected

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

Definition at line 64 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvbpCCm3
protected

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

Definition at line 65 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvbpNCm2
protected

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

Definition at line 66 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvbpNCm3
protected

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

Definition at line 67 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvnCCm2
protected

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

Definition at line 60 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvnCCm3
protected

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

Definition at line 61 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvnNCm2
protected

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

Definition at line 62 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvnNCm3
protected

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

Definition at line 63 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvpCCm2
protected

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

Definition at line 56 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvpCCm3
protected

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

Definition at line 57 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvpNCm2
protected

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

Definition at line 58 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fRvpNCm3
protected

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

Definition at line 59 of file HadronizationModelBase.h.

double genie::HadronizationModelBase::fWcut
protected

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.


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