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 "GeneratorModules/GenData.h" //inheritance
10#include "CLHEP/Vector/LorentzVector.h" //member
11#include "AtlasHepMC/GenEvent.h" //typedef
12#include "AtlasHepMC/GenVertex.h" //typedef for GenVertexPtr
13#include "AtlasHepMC/SimpleVector.h" //typedef for FourVector
14#include "AtlasHepMC/GenParticle.h" //typedef for GenParticlePtr
15#include <vector>
16
17
18namespace CLHEP{
19 class HepRandomEngine;
20}
21
22
23
25
26 public:
27
28 ParticleDecayer(const std::string& name, ISvcLocator* pSvcLocator);
29
30 ~ParticleDecayer() = default;
31
32 StatusCode genInitialize();
33 StatusCode fillEvt(HepMC::GenEvent*);
34
35 private:
36
37 //name of the MC truth container
39 // LeptonJet type: 1 = one dark photon per LeptonJet, 2 = two dark pjotons per LeptonJet
40 int m_LJType{};
41 //new PDG ID of the scalar
43 //new mass of the scalar in MeV
44 double m_scalarMass{};
45 //mass of the dark photon (MeV)
47 //PDG ID of the dark photon
49 //lifetime of the dark photon
51 //new PDG_ID of thedark photon
53 //polarization of the dark photon
55 //opposite polarization switch in case of two dark photons
58 //BR of dark photon decay to electrons
59 double m_BRElectron{};
60 //BR of dark photon decay to muons
61 double m_BRMuon{};
62 //BR of dark photon decay to pions
63 double m_BRPion{};
64
71
75
76 std::unique_ptr<GenData> m_gendata{nullptr};
77
78 void addParticle (HepMC::GenVertexPtr, int pdg, HepMC::FourVector, int statusCode); //add particles to the evgen file
79
80 double rnd_ExpLifetime(CLHEP::HepRandomEngine* engine, double ct);
81 double rnd_DoubleRange(CLHEP::HepRandomEngine* engine, double a, double b);
82 double cosgen(CLHEP::HepRandomEngine* engine, int itype);
83
84 StatusCode DFTwoBodyDecay( CLHEP::HepRandomEngine* engine, HepMC::GenParticlePtr, int );
85 StatusCode setDecayPosition ( CLHEP::HepRandomEngine* engine, HepMC::GenParticlePtr, HepMC::GenEvent*, bool doScalarDecay=false );
86 StatusCode changeMass( HepMC::GenParticlePtr, double );
87 StatusCode getDecayProducts( CLHEP::HepRandomEngine* engine, CLHEP::HepLorentzVector, double, std::vector<CLHEP::HepLorentzVector>&, int decayType = 0);
88
89 //four momentum of the dark photon
90 CLHEP::HepLorentzVector m_boostLV;
91 //production vertex of the dark photon/scalar
92 CLHEP::HepLorentzVector m_posLV;
93 //decay vertex of the first dark photon
94 CLHEP::HepLorentzVector m_posLV1;
95 //decay vertex of the second dark photon
96 CLHEP::HepLorentzVector m_posLV2;
97 //counter
99};
100
101#endif
static Double_t a
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenModule.cxx:14
std::unique_ptr< GenData > m_gendata
CLHEP::HepLorentzVector m_posLV2
StatusCode changeMass(HepMC::GenParticlePtr, double)
CLHEP::HepLorentzVector m_boostLV
bool m_expDecayDoVariableLifetime
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)
HepMC3::FourVector FourVector
HepMC3::GenParticlePtr GenParticlePtr
Definition GenParticle.h:19
HepMC3::GenVertexPtr GenVertexPtr
Definition GenVertex.h:23
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39