ATLAS Offline Software
ParticleDecayer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 
16 namespace HepPDT{
17  class ParticleDataTable;
18 }
19 
20 namespace CLHEP{
21  class HepRandomEngine;
22 }
23 
24 
25 
26 class ParticleDecayer: public GenModule {
27 
28  public:
29 
30  ParticleDecayer(const std::string& name, ISvcLocator* pSvcLocator);
31 
32  ~ParticleDecayer() = default;
33 
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)
48  double m_particleMass{};
49  //PDG ID of the dark photon
50  int m_particleID{};
51  //lifetime of the dark photon
52  double m_particleLifeTime{};
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 );
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
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
ParticleDecayer::m_particlePDGID
int m_particlePDGID
Definition: ParticleDecayer.h:54
ParticleDecayer::m_particlePolarization
int m_particlePolarization
Definition: ParticleDecayer.h:56
ParticleDecayer::DFTwoBodyDecay
StatusCode DFTwoBodyDecay(CLHEP::HepRandomEngine *engine, HepMC::GenParticlePtr, int)
Definition: ParticleDecayer.cxx:470
ParticleDecayer::m_particleTable
HepPDT::ParticleDataTable * m_particleTable
Definition: ParticleDecayer.h:77
GenEvent.h
ParticleDecayer::ParticleDecayer
ParticleDecayer(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ParticleDecayer.cxx:223
ParticleDecayer::m_boostLV
CLHEP::HepLorentzVector m_boostLV
Definition: ParticleDecayer.h:92
ParticleDecayer::m_truthParticleContainerName
std::string m_truthParticleContainerName
Definition: ParticleDecayer.h:40
ParticleDecayer::getDecayProducts
StatusCode getDecayProducts(CLHEP::HepRandomEngine *engine, CLHEP::HepLorentzVector, double, std::vector< CLHEP::HepLorentzVector > &, int decayType=0)
Definition: ParticleDecayer.cxx:527
GenVertex.h
ParticleDecayer::m_doUniformDecay
bool m_doUniformDecay
Definition: ParticleDecayer.h:67
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
ParticleDecayer::m_LJType
int m_LJType
Definition: ParticleDecayer.h:42
ParticleDecayer::~ParticleDecayer
~ParticleDecayer()=default
dumpTruth.statusCode
statusCode
Definition: dumpTruth.py:85
ParticleDecayer::addParticle
void addParticle(HepMC::GenVertexPtr, int pdg, HepMC::FourVector, int statusCode)
Definition: ParticleDecayer.cxx:440
ParticleDecayer::m_expDecayDoTruncateLongDecays
bool m_expDecayDoTruncateLongDecays
Definition: ParticleDecayer.h:71
ParticleDecayer::m_oppositePolarization
bool m_oppositePolarization
Definition: ParticleDecayer.h:58
GenParticle.h
ParticleDecayer::m_posLV
CLHEP::HepLorentzVector m_posLV
Definition: ParticleDecayer.h:94
ParticleDecayer::m_BRElectron
double m_BRElectron
Definition: ParticleDecayer.h:61
ParticleDecayer::m_BRPion
double m_BRPion
Definition: ParticleDecayer.h:65
ParticleDecayer::m_thetaEndCapBarrel
double m_thetaEndCapBarrel
Definition: ParticleDecayer.h:75
GenModule
Base class for common behaviour of generator interfaces.
Definition: GenModule.h:39
ParticleDecayer::setDecayPosition
StatusCode setDecayPosition(CLHEP::HepRandomEngine *engine, HepMC::GenParticlePtr, HepMC::GenEvent *, bool doScalarDecay=false)
Definition: ParticleDecayer.cxx:118
ParticleDecayer::m_expDecayDoVariableLifetime
bool m_expDecayDoVariableLifetime
Definition: ParticleDecayer.h:69
ParticleDecayer::m_particleLifeTime
double m_particleLifeTime
Definition: ParticleDecayer.h:52
SimpleVector.h
ParticleDecayer
Definition: ParticleDecayer.h:26
ParticleDecayer::m_scalarMass
double m_scalarMass
Definition: ParticleDecayer.h:46
ParticleDecayer::rnd_ExpLifetime
double rnd_ExpLifetime(CLHEP::HepRandomEngine *engine, double ct)
Definition: ParticleDecayer.cxx:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ParticleDecayer::m_particleMass
double m_particleMass
Definition: ParticleDecayer.h:48
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
ParticleDecayer::m_BRMuon
double m_BRMuon
Definition: ParticleDecayer.h:63
ParticleDecayer::m_particleID
int m_particleID
Definition: ParticleDecayer.h:50
ParticleDecayer::m_expDecayFractionToKeep
double m_expDecayFractionToKeep
Definition: ParticleDecayer.h:70
HepPDT
Definition: BeamHaloGenerator.h:13
ParticleDecayer::m_endCapDistance
double m_endCapDistance
Definition: ParticleDecayer.h:74
calibdata.ct
ct
Definition: calibdata.py:418
ParticleDecayer::m_barrelRadius
double m_barrelRadius
Definition: ParticleDecayer.h:73
ParticleDecayer::cosgen
double cosgen(CLHEP::HepRandomEngine *engine, int itype)
Definition: ParticleDecayer.cxx:47
ParticleDecayer::m_eventCounter
int m_eventCounter
Definition: ParticleDecayer.h:100
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
ParticleDecayer::m_doExponentialDecay
bool m_doExponentialDecay
Definition: ParticleDecayer.h:68
ParticleDecayer::m_scalarPDGID
int m_scalarPDGID
Definition: ParticleDecayer.h:44
a
TList * a
Definition: liststreamerinfos.cxx:10
GenModule.h
ParticleDecayer::m_posLV2
CLHEP::HepLorentzVector m_posLV2
Definition: ParticleDecayer.h:98
ParticleDecayer::getParticleMass
double getParticleMass(int pdgID)
Definition: ParticleDecayer.cxx:459
ParticleDecayer::genInitialize
StatusCode genInitialize()
For initializing the generator, if required.
Definition: ParticleDecayer.cxx:257
ParticleDecayer::changeMass
StatusCode changeMass(HepMC::GenParticlePtr, double)
Definition: ParticleDecayer.cxx:94
ParticleDecayer::m_posLV1
CLHEP::HepLorentzVector m_posLV1
Definition: ParticleDecayer.h:96
ParticleDecayer::rnd_DoubleRange
double rnd_DoubleRange(CLHEP::HepRandomEngine *engine, double a, double b)
Definition: ParticleDecayer.cxx:39
ParticleDecayer::fillEvt
StatusCode fillEvt(HepMC::GenEvent *)
For filling the HepMC event object.
Definition: ParticleDecayer.cxx:290