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

Base class for the Pythia (6 and 8) hadronization modules in GENIE. In particular, the base class provides common checks and basic assignments of quark/diquark codes for a no frills interface to Pythia hadronization routines. More...

#include <PythiaHadronizationBase.h>

Inheritance diagram for genie::PythiaHadronizationBase:
genie::EventRecordVisitorI genie::Algorithm genie::Pythia6Hadronization genie::Pythia8Hadronization

Protected Member Functions

 PythiaHadronizationBase ()
 
 PythiaHadronizationBase (string name)
 
 PythiaHadronizationBase (string name, string config)
 
virtual ~PythiaHadronizationBase ()
 
virtual void ProcessEventRecord (GHepRecord *event) const
 
virtual void MakeQuarkDiquarkAssignments (const Interaction *in) const
 
virtual bool AssertValidity (const Interaction *in) const
 
virtual void Initialize (void)
 
virtual void LoadConfig (void)
 
virtual void CopyOriginalDecayFlags (void) const =0
 
virtual void SetDesiredDecayFlags (void) const =0
 
virtual void RestoreOriginalDecayFlags (void) const =0
 
virtual bool Hadronize (GHepRecord *event) const =0
 
- Protected Member Functions inherited from genie::EventRecordVisitorI
 EventRecordVisitorI ()
 
 EventRecordVisitorI (string name)
 
 EventRecordVisitorI (string name, string config)
 
- Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 
 Algorithm (string name)
 
 Algorithm (string name, string config)
 
void Initialize (void)
 
void DeleteConfig (void)
 
void DeleteSubstructure (void)
 
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...
 

Protected Attributes

int fLeadingQuark
 
int fRemnantDiquark
 
double fSSBarSuppression
 ssbar suppression More...
 
double fGaussianPt2
 gaussian pt2 distribution width More...
 
double fNonGaussianPt2Tail
 non gaussian pt2 tail parameterization More...
 
double fRemainingECutoff
 remaining E cutoff stopping fragmentation More...
 
double fDiQuarkSuppression
 di-quark suppression parameter More...
 
double fLightVMesonSuppression
 light vector meson suppression More...
 
double fSVMesonSuppression
 strange vector meson suppression More...
 
double fLunda
 Lund a parameter. More...
 
double fLundb
 Lund b parameter. More...
 
double fLundaDiq
 adjustment of Lund a for di-quark More...
 
bool fOriDecayFlag_pi0
 
bool fOriDecayFlag_K0
 
bool fOriDecayFlag_K0b
 
bool fOriDecayFlag_L0
 
bool fOriDecayFlag_L0b
 
bool fOriDecayFlag_Dm
 
bool fOriDecayFlag_D0
 
bool fOriDecayFlag_Dp
 
bool fOriDecayFlag_Dpp
 
bool fReqDecayFlag_pi0
 
bool fReqDecayFlag_K0
 
bool fReqDecayFlag_K0b
 
bool fReqDecayFlag_L0
 
bool fReqDecayFlag_L0b
 
bool fReqDecayFlag_Dm
 
bool fReqDecayFlag_D0
 
bool fReqDecayFlag_Dp
 
bool fReqDecayFlag_Dpp
 
- 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...
 

Additional Inherited Members

- Public Member Functions inherited from genie::EventRecordVisitorI
virtual ~EventRecordVisitorI ()
 
- 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...
 
- Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
 
static string BuildParamVectSizeKey (const std::string &comm_name)
 

Detailed Description

Base class for the Pythia (6 and 8) hadronization modules in GENIE. In particular, the base class provides common checks and basic assignments of quark/diquark codes for a no frills interface to Pythia hadronization routines.

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

Constructor & Destructor Documentation

PythiaHadronizationBase::PythiaHadronizationBase ( )
protected

Definition at line 33 of file PythiaHadronizationBase.cxx.

33  :
35 {
36 
37 }
PythiaHadronizationBase::PythiaHadronizationBase ( string  name)
protected

Definition at line 39 of file PythiaHadronizationBase.cxx.

39  :
41 {
42 
43 }
static QCString name
Definition: declinfo.cpp:673
PythiaHadronizationBase::PythiaHadronizationBase ( string  name,
string  config 
)
protected

Definition at line 45 of file PythiaHadronizationBase.cxx.

45  :
47 {
48 
49 }
static QCString name
Definition: declinfo.cpp:673
static Config * config
Definition: config.cpp:1054
PythiaHadronizationBase::~PythiaHadronizationBase ( )
protectedvirtual

Definition at line 51 of file PythiaHadronizationBase.cxx.

52 {
53 
54 }

Member Function Documentation

bool PythiaHadronizationBase::AssertValidity ( const Interaction in) const
protectedvirtual

Definition at line 277 of file PythiaHadronizationBase.cxx.

277  {
278 
279  // check that there is no charm production
280  // (GENIE uses a special model for these cases)
281  if(interaction->ExclTag().IsCharmEvent()) {
282  LOG("PythiaHad", pWARN) << "Can't hadronize charm events";
283  return false;
284  }
285  // check the available mass
287  double Wmin = kNucleonMass+kPionMass;
288  if(W < Wmin) {
289  LOG("PythiaHad", pWARN) << "Low invariant mass, W = "
290  << W << " GeV!!";
291  return false;
292  }
293 
294  const InitialState & init_state = interaction->InitState();
295  const ProcessInfo & proc_info = interaction->ProcInfo();
296  const Target & target = init_state.Tgt();
297 
298  if( ! target.HitQrkIsSet() ) {
299  LOG("PythiaHad", pWARN) << "Hit quark was not set!";
300  return false;
301  }
302 
303  int probe = init_state.ProbePdg();
304  int hit_nucleon = target.HitNucPdg();
305  int hit_quark = target.HitQrkPdg();
306  //bool from_sea = target.HitSeaQrk();
307 
308  // check hit-nucleon assignment, input neutrino & weak current
309  bool isp = pdg::IsProton (hit_nucleon);
310  bool isn = pdg::IsNeutron (hit_nucleon);
311  bool isv = pdg::IsNeutrino (probe);
312  bool isvb = pdg::IsAntiNeutrino (probe);
313  bool isdm = pdg::IsDarkMatter (probe);
314  bool isl = pdg::IsNegChargedLepton (probe);
315  bool islb = pdg::IsPosChargedLepton (probe);
316  bool iscc = proc_info.IsWeakCC ();
317  bool isnc = proc_info.IsWeakNC ();
318  bool isdmi = proc_info.IsDarkMatter ();
319  bool isem = proc_info.IsEM ();
320  if( !(iscc||isnc||isem||isdmi) ) {
321  LOG("PythiaHad", pWARN)
322  << "Can only handle electro-weak interactions";
323  return false;
324  }
325  if( !(isp||isn) || !(isv||isvb||isl||islb||isdm) ) {
326  LOG("PythiaHad", pWARN)
327  << "Invalid initial state: probe = "
328  << probe << ", hit_nucleon = " << hit_nucleon;
329  return false;
330  }
331 
332  // assert that the interaction mode is allowed
333  bool isu = pdg::IsUQuark (hit_quark);
334  bool isd = pdg::IsDQuark (hit_quark);
335  bool iss = pdg::IsSQuark (hit_quark);
336  bool isub = pdg::IsAntiUQuark (hit_quark);
337  bool isdb = pdg::IsAntiDQuark (hit_quark);
338  bool issb = pdg::IsAntiSQuark (hit_quark);
339 
340  bool allowed = (iscc && isv && (isd||isub||iss)) ||
341  (iscc && isvb && (isu||isdb||issb)) ||
342  (isnc && (isv||isvb) && (isu||isd||isub||isdb||iss||issb)) ||
343  (isdmi && isdm && (isu||isd||isub||isdb||iss||issb)) ||
344  (isem && (isl||islb) && (isu||isd||isub||isdb||iss||issb));
345  if(!allowed) {
346  LOG("PythiaHad", pWARN)
347  << "Impossible interaction type / probe / hit quark combination!";
348  return false;
349  }
350 
351  return true;
352 }
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:108
static const double kNucleonMass
Definition: Constants.h:78
bool IsUQuark(int pdgc)
Definition: PDGUtils.cxx:255
int HitNucPdg(void) const
Definition: Target.cxx:321
int HitQrkPdg(void) const
Definition: Target.cxx:259
bool IsDarkMatter(int pdgc)
Definition: PDGUtils.cxx:125
bool IsSQuark(int pdgc)
Definition: PDGUtils.cxx:265
bool IsAntiSQuark(int pdgc)
Definition: PDGUtils.cxx:285
bool IsAntiDQuark(int pdgc)
Definition: PDGUtils.cxx:280
double W(const Interaction *const i)
Definition: KineUtils.cxx:1031
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:310
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:146
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:305
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
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
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:41
int ProbePdg(void) const
Definition: InitialState.h:65
#define pWARN
Definition: Messenger.h:61
bool IsEM(void) const
static const double kPionMass
Definition: Constants.h:74
bool HitQrkIsSet(void) const
Definition: Target.cxx:309
bool IsDarkMatter(void) const
bool IsDQuark(int pdgc)
Definition: PDGUtils.cxx:260
const Target & Tgt(void) const
Definition: InitialState.h:67
bool IsNegChargedLepton(int pdgc)
Definition: PDGUtils.cxx:137
bool IsAntiUQuark(int pdgc)
Definition: PDGUtils.cxx:275
Initial State information.
Definition: InitialState.h:49
virtual void genie::PythiaHadronizationBase::CopyOriginalDecayFlags ( void  ) const
protectedpure virtual
virtual bool genie::PythiaHadronizationBase::Hadronize ( GHepRecord event) const
protectedpure virtual
void PythiaHadronizationBase::Initialize ( void  )
protectedvirtual

Reimplemented in genie::Pythia8Hadronization, and genie::Pythia6Hadronization.

Definition at line 354 of file PythiaHadronizationBase.cxx.

355 {
356  fLeadingQuark = 0;
357  fRemnantDiquark = 0;
358  fSSBarSuppression = 0.;
359  fGaussianPt2 = 0.;
360  fNonGaussianPt2Tail = 0.;
361  fRemainingECutoff = 0.;
362  fDiQuarkSuppression = 0.;
364  fSVMesonSuppression = 0.;
365  fLunda = 0.;
366  fLundb = 0.;
367  fLundaDiq = 0.;
368  fOriDecayFlag_pi0 = false;
369  fOriDecayFlag_K0 = false;
370  fOriDecayFlag_K0b = false;
371  fOriDecayFlag_L0 = false;
372  fOriDecayFlag_L0b = false;
373  fOriDecayFlag_Dm = false;
374  fOriDecayFlag_D0 = false;
375  fOriDecayFlag_Dp = false;
376  fOriDecayFlag_Dpp = false;
377  fReqDecayFlag_pi0 = false;
378  fReqDecayFlag_K0 = false;
379  fReqDecayFlag_K0b = false;
380  fReqDecayFlag_L0 = false;
381  fReqDecayFlag_L0b = false;
382  fReqDecayFlag_Dm = false;
383  fReqDecayFlag_D0 = false;
384  fReqDecayFlag_Dp = false;
385  fReqDecayFlag_Dpp = false;
386 }
double fGaussianPt2
gaussian pt2 distribution width
double fRemainingECutoff
remaining E cutoff stopping fragmentation
double fDiQuarkSuppression
di-quark suppression parameter
double fLundaDiq
adjustment of Lund a for di-quark
double fSVMesonSuppression
strange vector meson suppression
double fLightVMesonSuppression
light vector meson suppression
double fNonGaussianPt2Tail
non gaussian pt2 tail parameterization
double fSSBarSuppression
ssbar suppression
void PythiaHadronizationBase::LoadConfig ( void  )
protectedvirtual

Reimplemented in genie::Pythia8Hadronization, and genie::Pythia6Hadronization.

Definition at line 388 of file PythiaHadronizationBase.cxx.

389 {
390  // Get PYTHIA physics configuration parameters specified by GENIE
391  this->GetParam( "PYTHIA-SSBarSuppression", fSSBarSuppression );
392  this->GetParam( "PYTHIA-GaussianPt2", fGaussianPt2 );
393  this->GetParam( "PYTHIA-NonGaussianPt2Tail", fNonGaussianPt2Tail );
394  this->GetParam( "PYTHIA-RemainingEnergyCutoff", fRemainingECutoff );
395  this->GetParam( "PYTHIA-DiQuarkSuppression", fDiQuarkSuppression );
396  this->GetParam( "PYTHIA-LightVMesonSuppression", fLightVMesonSuppression );
397  this->GetParam( "PYTHIA-SVMesonSuppression", fSVMesonSuppression );
398  this->GetParam( "PYTHIA-Lunda", fLunda );
399  this->GetParam( "PYTHIA-Lundb", fLundb );
400  this->GetParam( "PYTHIA-LundaDiq", fLundaDiq );
401 
402  // Set required PYTHIA decay flags
403  fReqDecayFlag_pi0 = false; // don't decay pi0
404  fReqDecayFlag_K0 = false; // don't decay K0
405  fReqDecayFlag_K0b = false; // don't decay \bar{K0}
406  fReqDecayFlag_L0 = false; // don't decay Lambda0
407  fReqDecayFlag_L0b = false; // don't decay \bar{Lambda0}
408  fReqDecayFlag_Dm = true; // decay Delta-
409  fReqDecayFlag_D0 = true; // decay Delta0
410  fReqDecayFlag_Dp = true; // decay Delta+
411  fReqDecayFlag_Dpp = true; // decay Delta++
412 
413  // Load Wcut determining the phase space area where the multiplicity prob.
414  // scaling factors would be applied -if requested-
415  double Wcut, Wmin ;
416  this->GetParam( "Wcut", Wcut );
417  this->GetParam( "KNO2PYTHIA-Wmin", Wmin );
418 
419  if ( Wcut > Wmin ) {
420  LOG("PythiaHad", pERROR)
421  << "Wcut value too high and in conflict with the KNO2PYTHIA-Wmin!"
422  << "\n Wcut = " << Wcut
423  << "\n KNO2PYTHIA-Wmin = " << Wmin;
424  }
425 }
double fGaussianPt2
gaussian pt2 distribution width
#define pERROR
Definition: Messenger.h:60
double fRemainingECutoff
remaining E cutoff stopping fragmentation
double fDiQuarkSuppression
di-quark suppression parameter
double fLundaDiq
adjustment of Lund a for di-quark
double fSVMesonSuppression
strange vector meson suppression
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
double fLightVMesonSuppression
light vector meson suppression
double fNonGaussianPt2Tail
non gaussian pt2 tail parameterization
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
double fSSBarSuppression
ssbar suppression
void PythiaHadronizationBase::MakeQuarkDiquarkAssignments ( const Interaction in) const
protectedvirtual

Definition at line 95 of file PythiaHadronizationBase.cxx.

97 {
98  LOG("PythiaHad", pNOTICE)
99  << "Making leading quark / remnant di-quark assignments";
100 
101  // get kinematics / init-state / process-info
102 
103  const Kinematics & kinematics = interaction->Kine();
104  const InitialState & init_state = interaction->InitState();
105  const ProcessInfo & proc_info = interaction->ProcInfo();
106  const Target & target = init_state.Tgt();
107 
108  assert(target.HitQrkIsSet());
109 
110  double W = kinematics.W();
111 
112  int probe = init_state.ProbePdg();
113  int hit_nucleon = target.HitNucPdg();
114  int hit_quark = target.HitQrkPdg();
115  bool from_sea = target.HitSeaQrk();
116 
117  LOG("PythiaHad", pNOTICE)
118  << "Hit nucleon pdgc = " << hit_nucleon << ", W = " << W;
119  LOG("PythiaHad", pNOTICE)
120  << "Selected hit quark pdgc = " << hit_quark
121  << ((from_sea) ? "[sea]" : "[valence]");
122 
123  // check hit-nucleon assignment, input neutrino & interaction type
124  bool isp = pdg::IsProton (hit_nucleon);
125  bool isn = pdg::IsNeutron (hit_nucleon);
126  bool isv = pdg::IsNeutrino (probe);
127  bool isvb = pdg::IsAntiNeutrino (probe);
128 //bool isl = pdg::IsNegChargedLepton (probe);
129 //bool islb = pdg::IsPosChargedLepton (probe);
130  bool iscc = proc_info.IsWeakCC ();
131  bool isnc = proc_info.IsWeakNC ();
132  bool isdm = proc_info.IsDarkMatter ();
133  bool isem = proc_info.IsEM ();
134  bool isu = pdg::IsUQuark (hit_quark);
135  bool isd = pdg::IsDQuark (hit_quark);
136  bool iss = pdg::IsSQuark (hit_quark);
137  bool isub = pdg::IsAntiUQuark (hit_quark);
138  bool isdb = pdg::IsAntiDQuark (hit_quark);
139  bool issb = pdg::IsAntiSQuark (hit_quark);
140 
141  //
142  // Generate the quark system (q + qq) initiating the hadronization
143  //
144 
145  int leading_quark = 0; // leading quark (hit quark after the interaction)
146  int remnant_diquark = 0; // remnant diquark (xF<0 at hadronic CMS)
147 
148  // Figure out the what happens to the hit quark after the interaction
149  if (isnc || isem || isdm) {
150  // NC, EM
151  leading_quark = hit_quark;
152  } else {
153  // CC
154  if (isv && isd ) leading_quark = kPdgUQuark;
155  else if (isv && iss ) leading_quark = kPdgUQuark;
156  else if (isv && isub) leading_quark = kPdgAntiDQuark;
157  else if (isvb && isu ) leading_quark = kPdgDQuark;
158  else if (isvb && isdb) leading_quark = kPdgAntiUQuark;
159  else if (isvb && issb) leading_quark = kPdgAntiUQuark;
160  else {
161  LOG("PythiaHad", pERROR)
162  << "Not allowed mode. Refused to make a leading quark assignment!";
163  return;
164  }
165  }//CC
166 
167  // Figure out what the remnant diquark is.
168  // Note from Hugh, following a conversation with his local HEP theorist
169  // (Gary Goldstein): "I am told that the probability of finding the diquark
170  // in the singlet vs. triplet states is 50-50."
171 
172  // hit quark = valence quark
173  if(!from_sea) {
174  if (isp && isu) remnant_diquark = kPdgUDDiquarkS1; /* u(->q) + ud */
175  if (isp && isd) remnant_diquark = kPdgUUDiquarkS1; /* d(->q) + uu */
176  if (isn && isu) remnant_diquark = kPdgDDDiquarkS1; /* u(->q) + dd */
177  if (isn && isd) remnant_diquark = kPdgUDDiquarkS1; /* d(->q) + ud */
178  }
179  // hit quark = sea quark
180  else {
181  if(isp && isu) remnant_diquark = kPdgUDDiquarkS1; /* u(->q) + bar{u} uud (=ud) */
182  if(isp && isd) remnant_diquark = kPdgUUDiquarkS1; /* d(->q) + bar{d} uud (=uu) */
183  if(isn && isu) remnant_diquark = kPdgDDDiquarkS1; /* u(->q) + bar{u} udd (=dd) */
184  if(isn && isd) remnant_diquark = kPdgUDDiquarkS1; /* d(->q) + bar{d} udd (=ud) */
185 
186  // The following section needs revisiting.
187 
188  // The lepton is scattered off a sea antiquark, materializing its quark
189  // partner and leaving me with a 5q system ( <qbar + q> + qqq(valence) )
190  // I will force few qbar+q annhilations below to get my quark/diquark system
191  // Probably it is best to leave the qqq system in the final state and then
192  // just do the fragmentation of the qbar q system? But how do I figure out
193  // how to split the available energy?
194 
195  /* bar{u} (-> bar{d}) + u uud => u + uu */
196  if(isp && isub && iscc) {
197  leading_quark = kPdgUQuark;
198  remnant_diquark = kPdgUUDiquarkS1;
199  }
200  /* bar{u} (-> bar{u}) + u uud => u + ud */
201  if(isp && isub && (isnc||isem||isdm)) {
202  leading_quark = kPdgUQuark;
203  remnant_diquark = kPdgUDDiquarkS1;
204  }
205  /* bar{d} (-> bar{u}) + d uud => d + ud */
206  if(isp && isdb && iscc) {
207  leading_quark = kPdgDQuark;
208  remnant_diquark = kPdgUDDiquarkS1;
209  }
210  /* bar{d} (-> bar{d}) + d uud => d + uu */
211  if(isp && isdb && (isnc||isem||isdm)) {
212  leading_quark = kPdgDQuark;
213  remnant_diquark = kPdgUUDiquarkS1;
214  }
215  /* bar{u} (-> bar{d}) + u udd => u + ud */
216  if(isn && isub && iscc) {
217  leading_quark = kPdgUQuark;
218  remnant_diquark = kPdgUDDiquarkS1;
219  }
220  /* bar{u} (-> bar{u}) + u udd => u + dd */
221  if(isn && isub && (isnc||isem||isdm)) {
222  leading_quark = kPdgUQuark;
223  remnant_diquark = kPdgDDDiquarkS1;
224  }
225  /* bar{d} (-> bar{u}) + d udd => d + dd */
226  if(isn && isdb && iscc) {
227  leading_quark = kPdgDQuark;
228  remnant_diquark = kPdgDDDiquarkS1;
229  }
230  /* bar{d} (-> bar{d}) + d udd => d + ud */
231  if(isn && isdb && (isnc||isem||isdm)) {
232  leading_quark = kPdgDQuark;
233  remnant_diquark = kPdgUDDiquarkS1;
234  }
235 
236  // The neutrino is scatterred off s or sbar sea quarks
237  // For the time being I will handle s like d and sbar like dbar (copy & paste
238  // from above) so that I conserve charge.
239 
240  if(iss || issb) {
241  LOG("PythiaHad", pNOTICE)
242  << "Can not really handle a hit s or sbar quark / Faking it";
243 
244  if(isp && iss) { remnant_diquark = kPdgUUDiquarkS1; }
245  if(isn && iss) { remnant_diquark = kPdgUDDiquarkS1; }
246 
247  if(isp && issb && iscc) {
248  leading_quark = kPdgDQuark;
249  remnant_diquark = kPdgUDDiquarkS1;
250  }
251  if(isp && issb && (isnc||isem||isdm)) {
252  leading_quark = kPdgDQuark;
253  remnant_diquark = kPdgUUDiquarkS1;
254  }
255  if(isn && issb && iscc) {
256  leading_quark = kPdgDQuark;
257  remnant_diquark = kPdgDDDiquarkS1;
258  }
259  if(isn && issb && (isnc||isem||isdm)) {
260  leading_quark = kPdgDQuark;
261  remnant_diquark = kPdgUDDiquarkS1;
262  }
263  }
264 
265  // if the diquark is a ud, switch it to the singlet state with 50% probability
266  if(remnant_diquark == kPdgUDDiquarkS1) {
267  RandomGen * rnd = RandomGen::Instance();
268  double Rqq = rnd->RndHadro().Rndm();
269  if(Rqq<0.5) remnant_diquark = kPdgUDDiquarkS0;
270  }
271  }
272 
273  fLeadingQuark = leading_quark;
274  fRemnantDiquark = remnant_diquark;
275 }
const int kPdgUUDiquarkS1
Definition: PDGCodes.h:58
double W(bool selected=false) const
Definition: Kinematics.cxx:167
bool HitSeaQrk(void) const
Definition: Target.cxx:316
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:108
#define pERROR
Definition: Messenger.h:60
bool IsUQuark(int pdgc)
Definition: PDGUtils.cxx:255
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:79
int HitNucPdg(void) const
Definition: Target.cxx:321
int HitQrkPdg(void) const
Definition: Target.cxx:259
const int kPdgUQuark
Definition: PDGCodes.h:42
Generated/set kinematical variables for an event.
Definition: Kinematics.h:40
bool IsSQuark(int pdgc)
Definition: PDGUtils.cxx:265
bool IsAntiSQuark(int pdgc)
Definition: PDGUtils.cxx:285
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:30
bool IsAntiDQuark(int pdgc)
Definition: PDGUtils.cxx:280
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:310
const int kPdgAntiUQuark
Definition: PDGCodes.h:43
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:305
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
const int kPdgUDDiquarkS1
Definition: PDGCodes.h:57
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
const int kPdgAntiDQuark
Definition: PDGCodes.h:45
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:41
int ProbePdg(void) const
Definition: InitialState.h:65
const int kPdgDQuark
Definition: PDGCodes.h:44
const int kPdgUDDiquarkS0
Definition: PDGCodes.h:56
bool IsEM(void) const
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
Definition: RandomGen.h:54
bool HitQrkIsSet(void) const
Definition: Target.cxx:309
bool IsDarkMatter(void) const
bool IsDQuark(int pdgc)
Definition: PDGUtils.cxx:260
#define pNOTICE
Definition: Messenger.h:62
const Target & Tgt(void) const
Definition: InitialState.h:67
bool IsAntiUQuark(int pdgc)
Definition: PDGUtils.cxx:275
Initial State information.
Definition: InitialState.h:49
const int kPdgDDDiquarkS1
Definition: PDGCodes.h:55
void PythiaHadronizationBase::ProcessEventRecord ( GHepRecord event) const
protectedvirtual

Implements genie::EventRecordVisitorI.

Reimplemented in genie::Pythia8Hadronization, and genie::Pythia6Hadronization.

Definition at line 56 of file PythiaHadronizationBase.cxx.

57 {
58  Interaction * interaction = event->Summary();
59 
60  bool valid_process = this->AssertValidity(interaction);
61  if(!valid_process) {
62  LOG("PythiaHad", pFATAL)
63  << "Input interaction type is not allowed!!!";
64  LOG("PythiaHad", pFATAL)
65  << *event;
66  gAbortingInErr = true;
67  std::exit(1);
68  }
69 
70  // Decide the leading quark and remnant diquark PDG codes for this event
71  this->MakeQuarkDiquarkAssignments(interaction);
72 
73  // Copy original and set required PYTHIA decay flags
74  this->CopyOriginalDecayFlags();
75  this->SetDesiredDecayFlags();
76 
77  // Call PYTHIA6 or PYTHIA8 to obtain the fragmentation products
78  //TClonesArray * particle_list = this->Hadronize(interaction);
79  bool hadronized = this->Hadronize(event);
80 
81  // Restore decay flags
83 
84  if(!hadronized) {
85  LOG("PythiaHad", pWARN) << "Hadronization failed!";
86  event->EventFlags()->SetBitNumber(kHadroSysGenErr, true);
88  exception.SetReason("Could not simulate the hadronic system");
89  exception.SwitchOnFastForward();
90  throw exception;
91  return;
92  }
93 }
virtual bool Hadronize(GHepRecord *event) const =0
#define pFATAL
Definition: Messenger.h:57
virtual void MakeQuarkDiquarkAssignments(const Interaction *in) const
Summary information for an interaction.
Definition: Interaction.h:55
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
virtual bool AssertValidity(const Interaction *in) const
virtual void SetDesiredDecayFlags(void) const =0
#define pWARN
Definition: Messenger.h:61
virtual void CopyOriginalDecayFlags(void) const =0
virtual void RestoreOriginalDecayFlags(void) const =0
bool gAbortingInErr
Definition: Messenger.cxx:56
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
virtual void genie::PythiaHadronizationBase::RestoreOriginalDecayFlags ( void  ) const
protectedpure virtual
virtual void genie::PythiaHadronizationBase::SetDesiredDecayFlags ( void  ) const
protectedpure virtual

Member Data Documentation

double genie::PythiaHadronizationBase::fDiQuarkSuppression
protected

di-quark suppression parameter

Definition at line 60 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fGaussianPt2
protected

gaussian pt2 distribution width

Definition at line 57 of file PythiaHadronizationBase.h.

int genie::PythiaHadronizationBase::fLeadingQuark
mutableprotected

Definition at line 52 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fLightVMesonSuppression
protected

light vector meson suppression

Definition at line 61 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fLunda
protected

Lund a parameter.

Definition at line 63 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fLundaDiq
protected

adjustment of Lund a for di-quark

Definition at line 65 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fLundb
protected

Lund b parameter.

Definition at line 64 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fNonGaussianPt2Tail
protected

non gaussian pt2 tail parameterization

Definition at line 58 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_D0
mutableprotected

Definition at line 74 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_Dm
mutableprotected

Definition at line 73 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_Dp
mutableprotected

Definition at line 75 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_Dpp
mutableprotected

Definition at line 76 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_K0
mutableprotected

Definition at line 69 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_K0b
mutableprotected

Definition at line 70 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_L0
mutableprotected

Definition at line 71 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_L0b
mutableprotected

Definition at line 72 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fOriDecayFlag_pi0
mutableprotected

Definition at line 68 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fRemainingECutoff
protected

remaining E cutoff stopping fragmentation

Definition at line 59 of file PythiaHadronizationBase.h.

int genie::PythiaHadronizationBase::fRemnantDiquark
mutableprotected

Definition at line 53 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_D0
protected

Definition at line 84 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_Dm
protected

Definition at line 83 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_Dp
protected

Definition at line 85 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_Dpp
protected

Definition at line 86 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_K0
protected

Definition at line 79 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_K0b
protected

Definition at line 80 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_L0
protected

Definition at line 81 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_L0b
protected

Definition at line 82 of file PythiaHadronizationBase.h.

bool genie::PythiaHadronizationBase::fReqDecayFlag_pi0
protected

Definition at line 78 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fSSBarSuppression
protected

ssbar suppression

Definition at line 56 of file PythiaHadronizationBase.h.

double genie::PythiaHadronizationBase::fSVMesonSuppression
protected

strange vector meson suppression

Definition at line 62 of file PythiaHadronizationBase.h.


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