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 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Name Size       Last modified (GMT) Description
Back Parent directory       2024-12-05 15:16:16
Folder include/       2024-12-05 15:16:16
Folder src/       2024-12-05 15:16:16
File CMakeLists.txt 2347 bytes       2024-12-05 15:16:16
File GNUmakefile 566 bytes       2024-12-05 15:16:16
File History 2243 bytes       2024-12-05 15:16:16
File README 8875 bytes       2024-12-05 15:16:16
C++ file pythia8_decayer.cc 5724 bytes       2024-12-05 15:16:16

  1 
  2  ------------------------------------------------------------ 
  3 
  4   Example of the external decayer implementation with Pythia8
  5  ------------------------------------------------------------
  6 
  7   This example demonstrates how to outfit Pythia8-based decay features 
  8   to those resonances in Geant4 where decay tables are not implemented
  9   by default. In addition, it showns how to replace existing
 10   Geant4 decay tables to such resonances as tau+/- or B+/- with 
 11   the Pythia8-based ones.
 12   
 13   This example is activated by setting up PYTHIA8 environment variable
 14   to point to the area where Pythia8 is installed.
 15  
 16   The complete Pythia8 information, including on download, and documentation 
 17   is available from the following site:
 18   https://pythia.org
 19  
 20   The original version of this example has been implemented by Julia Yarba
 21   (FNAL, USA)
 22 
 23   For the complete list of the classes that compose this example please 
 24   see later in this document.
 25 
 26   Location of example:
 27   
 28   examples/extended/eventgenerator/pythia/py8decayer
 29   
 30 
 31   Installation of Pythia8: 
 32 
 33   NOTE: As of December 2023, pythia8.3.10 is the most current version, 
 34   thus it is used in this example.
 35   In the future, please check updates at Pythia8 site: https://pythia.org
 36   
 37   1. cd path/to/your/pythia8/area
 38 
 39   2. Download desired version of Pythia8 and un-tar it, e.g. 
 40      wget https://pythia.org/download/pythia83/pythia8310.tgz
 41      tar xzf pythia8310.tgz
 42 
 43   3. Build/install Pythia8
 44      cd pythia8310
 45      export CXX=\`which g++\`
 46      ./configure --prefix=$PWD --cxx=$CXX
 47      make
 48      NOTE: By default, Pythia8 (as of 8.3.10) builds with C++11 standards. 
 49      If one wants to turn to e.g. C++17 standard, one needs to override flags 
 50      via --cxx-common argument to configure script. 
 51      Alternatively, one can setup CXX_COMMON environment variable.
 52      As of pythia8310, the default flags are the following:
 53      -O2 -std=c++11 -pedantic -W -Wall -Wshadow -pthread
 54      Please note use of -pthread which was not among default flags in earlier
 55      relesaes of Pythia8.
 56      Example of specifying C++17 standards by overriding the default flags via 
 57      use of --cxx_common argument to configure script:
 58      ./configure --prefix=$PWD --cxx=$CXX \
 59   --cxx-common='-O2 -std=c++17 -pedantic -W -Wall -Wshadow -fPIC -pthread'
 60 
 61    4. Setup Pythia8_ROOT environment variable to point to the area where Pythia8
 62       is built/installed:
 63       export Pythia8_ROOT=$PWD
 64 
 65 
 66   Building example:
 67   
 68   Upon setup of PYTHIA8 environment variable to point to the area where 
 69   Pythia8 package is installed, the pythia/py8decayer example will be
 70   compiled together with several other features of the eventgenerator example.
 71 
 72 
 73   Description of classes:
 74   
 75   Py8Decayer class provides implementation of the G4VExternalDecayer interface 
 76   with the use of PYTHIA8.
 77   It is reasonably annotated, and demonstrates what features of Pythia8 need
 78   to be activated and/or disactivated in order to make Pythia8 work only in
 79   the decay mode.
 80   It also illustrated how to control several other features of Pythia8, including
 81   some reduction of Pythia8 verbosity (by default, Pythia8 produces quite a large
 82   amount of printouts, thus reducing it could be useful in some cases).
 83   It also shown how to deactivate decays of pi0's by Pythia8 as the idea is to handle 
 84   pi0's back to Geant4 for decays.
 85   Last but not least, it shows how to outfit Pythia8 with a custom random engine, 
 86   i.e. Py8DecayerEngine.
 87   
 88   Py8DecayerEngine class inherits from Pythia8::RndmEngine which in its turns is
 89   provided by the Pythia8 package in order to allow replacing the generator's native
 90   random engine with the one of user's choice.
 91   In this specific case Py8DecayerEngine allows to replace Pythia8 native random engine
 92   with the same engine that Geant4 uses (i.e. CLHEP::RanecuEngine as in this application).
 93   The feature is important for running the example in the MT/Tasking mode.
 94    
 95   Py8DecayerPhysics class implements a G4VPhysicsConstructor type of component
 96   with the use of Py8Decayer; this component can later be used with a ddsired
 97   physics list (see main program).
 98   Specifically, in the Py8DecayerPhysics::ConstructProcess() the Py8Decayer is
 99   instantiated and is used to
100   a) replace existing decay tables of such resonances as tau+/- and B+/-
101   b) supplement decay features to those resonances in Geant4 where the decay
102      tables are not implemnted by defaukt
103   
104   In principle, classes Py8Decayer, Py8DecayerEngine, and Py8DecayerPhysics can be 
105   directly reused with another user application.
106   Alternatively, they can be used as an inspiration to implement similar, or perhaps 
107   even more extensive Pythia8-based functionalities of user's choice.
108 
109   Class DetConstruction demostrates how to implement minimalistic detector geometry.
110   
111   Class SingleParticleGun demonstrates how to implement generaton of the primary
112   particle.
113   
114   Class ActionInitialization instantiates and registers to Geant4 kernel all user 
115   action classes; in this case it is SingleParticleGun.
116   
117   Main program:
118   
119   pythia8_decayer.cc
120 
121   This application currently uses the default RunManager which is Tasking and is
122   initialized with 5 threads.
123   It will then run 5 events, one per thread.
124   SerialOnly RunManager can also be employed should the user choose so.
125   
126 
127   Executable:
128   
129   pythia8_decayer
130   
131 
132   Execution:
133   
134   At present, the pythia8_decayer executable does not take any input arguments.
135   Everything, including the choine of primary particle, is hardcoded.
136   Although in the future some configurability may be added.
137 
138   As mentioned earlier, it will run 5 single tau events using Pythia8 to decays them. 
139 
140   It should print some Pythia8 event information, including on decays. 
141   Once again, please bear in mind that the decay of pi0's by Pythia8 is disabled 
142   (see Py8Decayer constructor) since the idea is to hand the pi0's back to Geant4 
143   and make Geant4 decay them.
144 
145 
146   Additional notes on the contents of Geant4 and Pythia8 Particle Data Tables (PDT) :
147   
148   In their default form, PDT's in Geant4 and Pythia8 have a number of differences 
149   that need to be kept in mind.
150 
151   In the case of the Geant4 py8decayer example those differences are unlikely 
152   to cause any major issues.
153 
154   But Pythia8 can, in principle, be used within Geant4 in more ways that just 
155   as an external decayer.
156   Thus, if one is potentially interested in more sophisticated use of Pythia8 
157   in Geant4, one may want to consider whatever differences exist between (default) 
158   Geant4 and Pythia8 PDT's.
159   
160   Both Geant4 and Pythia8 codes are evolving, and specific numbers may be different
161   in earlier and/or in future releases.
162 
163   To be more precise, by default Pythia8.3.10 PDT contains 677 entries, of which 
164   531 particles have an antiparticle (it looks like antiparticles do not make 
165   separate entries in Pythia8 PDT, but the total number of available species 
166   should be considered as 1208).
167 
168   Geant4 PDT contains 508 entries. 
169 
170   Of those, 239 particles/antiparticles match by Particle ID's (on the Geant4 side 
171   it is explicitly called "PDG encoding" while on Pythia8 side it is just "id").
172 
173   Many of Pythia8 PDT's entries are not available in Geant4 PDT, e.g. Z or W bosons 
174   are not in Geant4.
175 
176   Some of the species in the Geant4 PDT do not seem to be in the Pythia8 PDT 
177   (e.g. excited nucleons do not seem to be in the Pythia8 PDT).
178 
179   Also, there are entries in both PDT's that mean the same particles but are 
180   marked with different ID's.
181   For example, excited Delta(s) are present in both PDT's but in Geant4 each one 
182   is marked with a 4-digit number as an ID (PDG encoding) while in Pythia8 an ID 
183   for such particle would be a 6-digit number starting with "20" and the last 
184   4 digits would be the same as the Geant4 ID for such particle.
185   
186   Speaking of the particles that match by ID (PDG ID), there may be further differences,
187   e.g. by mass, either central value or width, or both (there might be other aspects but 
188   they have not been checked for).
189 
190   Starting October 2022, checks have been made from time to time for differences 
191   larger that 1 keV in either mass central value or width.
192 
193   The largest differences have been observed for quarks/diquarks.
194   It appears that Geant4 sets (at least) masses of quarks as listed in PDG.
195   For details on default settings for the quark masses in Pythia8 please refer 
196   to the Pythia8 manual: 
197   https://pythia.org/manuals/pythia8310/Welcome.html
198   See Particles and Decays section, Particle Data subsection.
199 
200   Beyond quarks/diquarks some differences in mass central values or width have also
201   been observed, mainly for resonances.
202   But even for such particles as proton or muon there may be differences on the order 
203   of a few keV (e.g. central value of the proton mass is 938.27 MeV in Pythia8 and 
204   938.272 MeV in Geant4)