GENIEGenerator
Loading...
Searching...
No Matches
genie::AGCharmPythia6Hadro2023 Class Reference

Andreopoulos - Gallagher (AG) GENIE Charm Hadronization model. More...

#include <AGCharmPythia6Hadro2023.h>

Inheritance diagram for genie::AGCharmPythia6Hadro2023:
[legend]
Collaboration diagram for genie::AGCharmPythia6Hadro2023:
[legend]

Public Member Functions

 AGCharmPythia6Hadro2023 ()
 AGCharmPythia6Hadro2023 (string config)
virtual ~AGCharmPythia6Hadro2023 ()
Public Member Functions inherited from genie::AGCharmPythiaBaseHadro2023
void ProcessEventRecord (GHepRecord *event) const
Public Member Functions inherited from genie::EventRecordVisitorI
virtual ~EventRecordVisitorI ()
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
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.

Private Member Functions

void Initialize (void) const
bool HadronizeRemnant (int qrkSyst1, int qrkSyst2, double WR, TLorentzVector p4R, unsigned int &rpos, TClonesArray *particle_list) const

Additional Inherited Members

Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)
Protected Member Functions inherited from genie::AGCharmPythiaBaseHadro2023
 AGCharmPythiaBaseHadro2023 ()
 AGCharmPythiaBaseHadro2023 (string config)
 AGCharmPythiaBaseHadro2023 (string name, string config)
virtual ~AGCharmPythiaBaseHadro2023 ()
void LoadConfig (void)
void Initialize (void) const
void Configure (const Registry &config)
void Configure (string config)
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.
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.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Detailed Description

Andreopoulos - Gallagher (AG) GENIE Charm Hadronization model.

     The model relies on empirical charm fragmentation and pT functions,
     as well as on experimentally-determined charm fractions, to produce
     the ID and 4-momentum of charmed hadron in charm production events.

     The remnant (non-charm) system is hadronised by a call to PYTHIA.

     Is a concrete implementation of the EventRecordVisitorI interface.
Author
Costas Andreopoulos <constantinos.andreopoulos \at cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory

Hugh Gallagher galla.nosp@m.g@mi.nosp@m.nos.p.nosp@m.hy.t.nosp@m.ufts..nosp@m.edu Tufts University

Created:\n August 17, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 44 of file AGCharmPythia6Hadro2023.h.

Constructor & Destructor Documentation

◆ AGCharmPythia6Hadro2023() [1/2]

AGCharmPythia6Hadro2023::AGCharmPythia6Hadro2023 ( )

◆ AGCharmPythia6Hadro2023() [2/2]

AGCharmPythia6Hadro2023::AGCharmPythia6Hadro2023 ( string config)

Definition at line 65 of file AGCharmPythia6Hadro2023.cxx.

65 :
66AGCharmPythiaBaseHadro2023("genie::AGCharmPythia6Hadro2023", config)
67{
68 this->Initialize();
69}

References genie::AGCharmPythiaBaseHadro2023::AGCharmPythiaBaseHadro2023(), and Initialize().

◆ ~AGCharmPythia6Hadro2023()

AGCharmPythia6Hadro2023::~AGCharmPythia6Hadro2023 ( )
virtual

Definition at line 71 of file AGCharmPythia6Hadro2023.cxx.

72{
73
74}

Member Function Documentation

◆ HadronizeRemnant()

bool AGCharmPythia6Hadro2023::HadronizeRemnant ( int qrkSyst1,
int qrkSyst2,
double WR,
TLorentzVector p4R,
unsigned int & rpos,
TClonesArray * particle_list ) const
privatevirtual

Implements genie::AGCharmPythiaBaseHadro2023.

Definition at line 95 of file AGCharmPythia6Hadro2023.cxx.

98{
99#ifdef __GENIE_PYTHIA6_ENABLED__
100
101 //
102 // Run PYTHIA for the hadronization of remnant system
103 //
104 fPythia->SetMDCY(fPythia->Pycomp(kPdgPi0), 1,0); // don't decay pi0
105 fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaM), 1,1); // decay Delta+
106 fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_Delta0), 1,1); // decay Delta++
107 fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaP), 1,1); // decay Delta++
108 fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaPP), 1,1); // decay Delta++
109 // fPythia->SetMDCY(fPythia->Pycomp(kPdgDeltaP), 1,1); // decay Delta+
110 // fPythia->SetMDCY(fPythia->Pycomp(kPdgDeltaPP), 1,1); // decay Delta++
111 int ip = 0;
112 py2ent_(&ip, &qrkSyst1, &qrkSyst2, &WR); // hadronize
113
114 fPythia->SetMDCY(fPythia->Pycomp(kPdgPi0),1,1); // restore
115
116 //-- Get PYTHIA's LUJETS event record
117 TClonesArray * pythia_remnants = 0;
118 fPythia->GetPrimaries();
119 pythia_remnants = dynamic_cast<TClonesArray *>(fPythia->ImportParticles("All"));
120
121 int np = pythia_remnants->GetEntries();
122 assert(np>0);
123
124 // PYTHIA performs the hadronization at the *remnant hadrons* centre of mass
125 // frame (not the hadronic centre of mass frame).
126 // Boost all hadronic blob fragments to the HCM', fix their mother/daughter
127 // assignments and add them to the fragmentation record.
128
129 TVector3 rmnbeta = +1 * p4R.BoostVector(); // boost velocity
130
131 TMCParticle * pythia_remn = 0; // remnant
132 GHepParticle * bremn = 0; // boosted remnant
133 TIter remn_iter(pythia_remnants);
134 while( (pythia_remn = (TMCParticle *) remn_iter.Next()) ) {
135
136 // insert and get a pointer to inserted object for mods
137 bremn = new ((*particle_list)[rpos++]) GHepParticle ( pythia_remn->GetKF(), // pdg
138 GHepStatus_t(pythia_remn->GetKS()), // status
139 pythia_remn->GetParent(), // first parent
140 -1, // second parent
141 pythia_remn->GetFirstChild(), // first daughter
142 pythia_remn->GetLastChild(), // second daughter
143 pythia_remn -> GetPx(), // px
144 pythia_remn -> GetPy(), // py
145 pythia_remn -> GetPz(), // pz
146 pythia_remn -> GetEnergy(), // e
147 pythia_remn->GetVx(), // x
148 pythia_remn->GetVy(), // y
149 pythia_remn->GetVz(), // z
150 pythia_remn->GetTime() // t
151 );
152
153 // boost
154 bremn -> P4() -> Boost( rmnbeta ) ;
155
156 // handle insertion of charmed hadron
157 int jp = bremn->FirstMother();
158 int ifc = bremn->FirstDaughter();
159 int ilc = bremn->LastDaughter();
160
161 bremn -> SetFirstMother( (jp == 0 ? 1 : jp +1) );
162 bremn -> SetFirstDaughter ( (ifc == 0 ? -1 : ifc+1) );
163 bremn -> SetLastDaughter ( (ilc == 0 ? -1 : ilc+1) );
164 }
165 return true;
166#else
167 LOG("AGCharmPythia6Hadro2023", pFATAL)
168 << "calling GENIE/PYTHIA6 charm hadronization without enabling PYTHIA6"
169 << " qrkSyst " << qrkSyst1 << "," << qrkSyst2 << " WR " << WR;
170 gAbortingInErr = true;
171 std::exit(1);
172 return false;
173#endif
174
175
176}
#define pFATAL
Definition Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
void py2ent_(int *, int *, int *, double *)
int FirstMother(void) const
int LastDaughter(void) const
int FirstDaughter(void) const
bool gAbortingInErr
Definition Messenger.cxx:34
const int kPdgP33m1232_Delta0
Definition PDGCodes.h:105
const int kPdgPi0
Definition PDGCodes.h:160
const int kPdgP33m1232_DeltaPP
Definition PDGCodes.h:107
enum genie::EGHepStatus GHepStatus_t
const int kPdgP33m1232_DeltaM
Definition PDGCodes.h:104
const int kPdgP33m1232_DeltaP
Definition PDGCodes.h:106

References genie::GHepParticle::FirstDaughter(), genie::GHepParticle::FirstMother(), genie::gAbortingInErr, genie::kPdgP33m1232_Delta0, genie::kPdgP33m1232_DeltaM, genie::kPdgP33m1232_DeltaP, genie::kPdgP33m1232_DeltaPP, genie::kPdgPi0, genie::GHepParticle::LastDaughter(), LOG, pFATAL, and py2ent_().

◆ Initialize()

void AGCharmPythia6Hadro2023::Initialize ( void ) const
private

Definition at line 76 of file AGCharmPythia6Hadro2023.cxx.

77{
79#ifdef __GENIE_PYTHIA6_ENABLED__
80 fPythia = TPythia6::Instance();
81 // sync GENIE/PyTHIA6 seed number
82 // PYTHIA6 is a singleton, so do this from RandomGen for all
83 // GENIE algorithms that use PYTHIA6
85#else
86 LOG("AGCharmPythia6Hadro2023", pFATAL)
87 << "calling GENIE/PYTHIA6 charm hadronization without enabling PYTHIA6";
88 gAbortingInErr = true;
89 std::exit(1);
90#endif
91
92}
static RandomGen * Instance()
Access instance.
Definition RandomGen.cxx:74

References genie::gAbortingInErr, genie::AGCharmPythiaBaseHadro2023::Initialize(), genie::RandomGen::Instance(), LOG, and pFATAL.

Referenced by AGCharmPythia6Hadro2023(), and AGCharmPythia6Hadro2023().


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