ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleDecayer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef GENERATORMODULES_PARTICLEDECAYER_H
6#define GENERATORMODULES_PARTICLEDECAYER_H
7
8#include "GeneratorModules/GenModule.h" //inheritance
9#include "CLHEP/Vector/LorentzVector.h" //member
10#include "AtlasHepMC/GenEvent.h" //typedef
11#include "AtlasHepMC/GenVertex.h" //typedef for GenVertexPtr
12#include "AtlasHepMC/SimpleVector.h" //typedef for FourVector
13#include "AtlasHepMC/GenParticle.h" //typedef for GenParticlePtr
14#include <vector>
15
16namespace HepPDT{
17 class ParticleDataTable;
18}
19
20namespace CLHEP{
21 class HepRandomEngine;
22}
23
24
25
27
28 public:
29
30 ParticleDecayer(const std::string& name, ISvcLocator* pSvcLocator);
31
32 ~ParticleDecayer() = default;
33
34 StatusCode genInitialize();
35 StatusCode fillEvt(HepMC::GenEvent*);
36
37 private:
38
39 //name of the MC truth container
41 // LeptonJet type: 1 = one dark photon per LeptonJet, 2 = two dark pjotons per LeptonJet
42 int m_LJType{};
43 //new PDG ID of the scalar
45 //new mass of the scalar in MeV
46 double m_scalarMass{};
47 //mass of the dark photon (MeV)
49 //PDG ID of the dark photon
51 //lifetime of the dark photon
53 //new PDG_ID of thedark photon
55 //polarization of the dark photon
57 //opposite polarization switch in case of two dark photons
60 //BR of dark photon decay to electrons
61 double m_BRElectron{};
62 //BR of dark photon decay to muons
63 double m_BRMuon{};
64 //BR of dark photon decay to pions
65 double m_BRPion{};
66
72
76
77 HepPDT::ParticleDataTable* m_particleTable{};
78
79 double getParticleMass(int pdgID); //retrieve tha particle mass given the PDG ID
80 void addParticle (HepMC::GenVertexPtr, int pdg, HepMC::FourVector, int statusCode); //add particles to the evgen file
81
82 double rnd_ExpLifetime(CLHEP::HepRandomEngine* engine, double ct);
83 double rnd_DoubleRange(CLHEP::HepRandomEngine* engine, double a, double b);
84 double cosgen(CLHEP::HepRandomEngine* engine, int itype);
85
86 StatusCode DFTwoBodyDecay( CLHEP::HepRandomEngine* engine, HepMC::GenParticlePtr, int );
87 StatusCode setDecayPosition ( CLHEP::HepRandomEngine* engine, HepMC::GenParticlePtr, HepMC::GenEvent*, bool doScalarDecay=false );
88 StatusCode changeMass( HepMC::GenParticlePtr, double );
89 StatusCode getDecayProducts( CLHEP::HepRandomEngine* engine, CLHEP::HepLorentzVector, double, std::vector<CLHEP::HepLorentzVector>&, int decayType = 0);
90
91 //four momentum of the dark photon
92 CLHEP::HepLorentzVector m_boostLV;
93 //production vertex of the dark photon/scalar
94 CLHEP::HepLorentzVector m_posLV;
95 //decay vertex of the first dark photon
96 CLHEP::HepLorentzVector m_posLV1;
97 //decay vertex of the second dark photon
98 CLHEP::HepLorentzVector m_posLV2;
99 //counter
101};
102
103#endif
static Double_t a
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenModule.cxx:14
CLHEP::HepLorentzVector m_posLV2
double getParticleMass(int pdgID)
StatusCode changeMass(HepMC::GenParticlePtr, double)
CLHEP::HepLorentzVector m_boostLV
bool m_expDecayDoVariableLifetime
HepPDT::ParticleDataTable * m_particleTable
StatusCode DFTwoBodyDecay(CLHEP::HepRandomEngine *engine, HepMC::GenParticlePtr, int)
StatusCode getDecayProducts(CLHEP::HepRandomEngine *engine, CLHEP::HepLorentzVector, double, std::vector< CLHEP::HepLorentzVector > &, int decayType=0)
StatusCode setDecayPosition(CLHEP::HepRandomEngine *engine, HepMC::GenParticlePtr, HepMC::GenEvent *, bool doScalarDecay=false)
double rnd_DoubleRange(CLHEP::HepRandomEngine *engine, double a, double b)
std::string m_truthParticleContainerName
void addParticle(HepMC::GenVertexPtr, int pdg, HepMC::FourVector, int statusCode)
ParticleDecayer(const std::string &name, ISvcLocator *pSvcLocator)
CLHEP::HepLorentzVector m_posLV
CLHEP::HepLorentzVector m_posLV1
double cosgen(CLHEP::HepRandomEngine *engine, int itype)
~ParticleDecayer()=default
double m_expDecayFractionToKeep
StatusCode fillEvt(HepMC::GenEvent *)
For filling the HepMC event object.
bool m_expDecayDoTruncateLongDecays
StatusCode genInitialize()
For initializing the generator, if required.
double rnd_ExpLifetime(CLHEP::HepRandomEngine *engine, double ct)
HepMC::GenVertex * GenVertexPtr
Definition GenVertex.h:59
GenParticle * GenParticlePtr
Definition GenParticle.h:37