ATLAS Offline Software
Pythia8ForDecays.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Abused from Geant4 version of Pythai6.hh from extended examples
6 
7 #ifndef Pythia8ForDecays_H
8 #define Pythia8ForDecays_H
9 
10 // For std::vector
11 #include <vector>
12 // G4 track function parameter
13 #include "G4Track.hh"
14 // For std::pair
15 #include <utility>
16 // For all the various Pythia8 classes used here
17 #include "Pythia8_i/Pythia8_i.h"
18 // For unique_ptr
19 #include <memory>
20 
21 class G4DynamicParticle;
22 class G4ParticleDefinition;
23 
25 {
26  public:
28  virtual ~Pythia8ForDecays() = default;
29 
31  void Py1ent(const G4Track&, std::vector<G4DynamicParticle*> &);
32 
33  private:
35  G4ParticleDefinition* GetParticleDefinition(const int) const;
36 
38  void fillParticle(const G4Track&, Pythia8::Event& event) const;
39 
41  std::pair<int,int> fromIdWithGluino( int idRHad, Pythia8::Rndm* rndmPtr) const;
42  std::pair<int,int> fromIdWithSquark( int idRHad) const;
43  bool isGluinoRHadron(int pdgId) const;
44 
46  std::unique_ptr<Pythia8::Pythia> m_pythia;
47 };
48 
49 #endif
50 
JiveXML::Event
struct Event_t Event
Definition: ONCRPCServer.h:65
Pythia8ForDecays::isGluinoRHadron
bool isGluinoRHadron(int pdgId) const
Definition: Pythia8ForDecays.cxx:166
Pythia8_i.h
PowhegPy8EG_H2a.pdgId
dictionary pdgId
Definition: PowhegPy8EG_H2a.py:128
Pythia8ForDecays::fromIdWithGluino
std::pair< int, int > fromIdWithGluino(int idRHad, Pythia8::Rndm *rndmPtr) const
Get the quarks from a gluino R-hadron. From Pythia8 code.
Definition: Pythia8ForDecays.cxx:93
Pythia8ForDecays
Definition: Pythia8ForDecays.h:25
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
Pythia8ForDecays::~Pythia8ForDecays
virtual ~Pythia8ForDecays()=default
Pythia8ForDecays::Py1ent
void Py1ent(const G4Track &, std::vector< G4DynamicParticle * > &)
Function that decays the RHadron; returns products in G4 format.
Definition: Pythia8ForDecays.cxx:185
Pythia8ForDecays::m_pythia
std::unique_ptr< Pythia8::Pythia > m_pythia
The instance of Pythia8 that will do the work.
Definition: Pythia8ForDecays.h:46
Pythia8ForDecays::fillParticle
void fillParticle(const G4Track &, Pythia8::Event &event) const
Fill a Pythia8 event with the information from a G4Track.
Definition: Pythia8ForDecays.cxx:152
Pythia8ForDecays::GetParticleDefinition
G4ParticleDefinition * GetParticleDefinition(const int) const
Helper for getting G4ParticleDefinition from PDG ID.
Definition: Pythia8ForDecays.cxx:62
Pythia8ForDecays::fromIdWithSquark
std::pair< int, int > fromIdWithSquark(int idRHad) const
Definition: Pythia8ForDecays.cxx:71
Pythia8ForDecays::Pythia8ForDecays
Pythia8ForDecays()
Definition: Pythia8ForDecays.cxx:35