ATLAS Offline Software
Loading...
Searching...
No Matches
Prophecy4fMerger.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef PROPHECY4FCONTROL_DRM_H
5#define PROPHECY4FCONTROL_DRM_H
6
7/* --------------------------------------------------------- */
8/* Prophecy4fMerger.h - Prophecy4f merger with LHE events */
9/* from e.g. PowHeg */
10/* Formerly called: */
11/* DRM Code for merging POWHEG and Prophecy4f LHEs events */
12/* M. Duehrrsen, D. Rebuzzi, A. Mueck, A. Salvucci */
13/* Second Version: 14 November 2014 */
14/* Please report any problem to: */
15/* daniela.rebuzzi@cern.ch, */
16/* michael.duehrssen@cern.ch, */
17/* antonio.salvucci@cern.ch */
18/* r.d.schaffer@cern.ch */
19/* --------------------------------------------------------- */
20
21/* Basic C++ */
22#include <string>
23
24/* ROOT */
25#include <TLorentzVector.h>
26#include "TRandom3.h"
28
29
31
32public:
33 /* Constructors */
35
36 /* Destructors */
37 virtual ~Prophecy4fMerger();
38
39 /* Methods */
40
41 /* --------------------------------------------------------- */
42 /* Transforms PI (given in the frame of PS) into PF (in Lab) */
43 /* N.B. P(1,2,3,4) = (PX,PY,PZ,E); PS(5)=M */
44 /* --------------------------------------------------------- */
45 int alulb4(double *ps, double *pi, double *pf);
46
47 /* --------------------------------------------------------- */
48 /* Transforms PI (given in Lab) into PF (in rest frame of PS */
49 /* N.B. P(1,2,3,4) = (PX,PY,PZ,E); PS(5)=M */
50 /* --------------------------------------------------------- */
51 int alulf4(double *ps, double *pi, double *pf);
52
53 /* ---------------------------------------------------------- */
54 /* Transforms PI (given in rest frame of PS) into PF (in Lab) */
55 /* N.B. P(1,2,3,4,5) = (PX,PY,PZ,E,M) */
56 /* -----------------------------------------------------------*/
57 int alulob(double *ps, double *pi, double *pf);
58
59 /* ---------------------------------------------------------- */
60 /* Transforms PI (given in Lab) into PF (in rest frame of PS) */
61 /* N.B. P(1,2,3,4,5) = (PX,PY,PZ,E,M) */
62 /* ---------------------------------------------------------- */
63 int alulof(double *ps, double *pi, double *pf);
64
65 /* ---------------------------------------------- */
66 /* C.M. Momentum for decay masses EM0-> EM1 + EM2 */
67 /* Set to -1 below threshold */
68 /* ---------------------------------------------- */
69 double alupcm(double em0, double em1, double em2);
70
71 int rescms(double *p, double *p1, double *p2, double m1, double m2);
72 /* Set Input and Output Files */
73 void setIO(const std::string& powheg,
74 const std::string& prophecy4e,
75 const std::string& prophecy4mu,
76 const std::string& prophecy2e2mu,
77 const std::string& outlhe,
78 bool debug);
79
80 void setRandomSeed(unsigned long long seed);
81
82 /* Merge LHE files */
83 void merge();
84
85 /*Verify if POWHEG event has Higgs off-mass shell */
86 bool isPHevent(const TLorentzVector& higgs,
87 const TLorentzVector& sum_daugh_rest_init);
88
89 /* Set Particles Mass */
90 double setParticleMass(int id) const;
91
92 /* Check if File Exists */
93 bool fileExists(const std::string& filename);
94
95 /* Debug methods */
96 void print(const std::string& field);
97 void print(const std::string& field, int value);
98
99
100protected:
101 std::string m_inPowheg;
102 std::string m_inProphecy4e;
103 std::string m_inProphecy4mu;
104 std::string m_inProphecy2e2mu;
105 std::string m_outLHE;
108 TRandom3 m_rand;
109 static constexpr double m_deltaM = 3.;
110 static constexpr double m_muonMass = ParticleConstants::muonMassInMeV/1000.; // Convert MeV to GeV
111 static constexpr double m_electronMass = ParticleConstants::electronMassInMeV/1000.; // Convert MeV to GeV
112 static constexpr double m_tauMass = 1.777;
113 static const long m_electronID = 11;
114 static const long m_muonID = 13;
115 static const long m_tauID = 15;
116 static const long m_zID = 23;
117 static const long m_higgsID = 25;
118 static const long m_photonID = 22;
119 static const long m_neutrinoEl = 12;
120 static const long m_neutrinoMu = 14;
121 static const long m_neutrinoTau = 16;
122
123};
124#endif
const bool debug
A number of constexpr particle constants to avoid hardcoding them directly in various places.
#define pi
double alupcm(double em0, double em1, double em2)
bool fileExists(const std::string &filename)
static const long m_higgsID
static constexpr double m_deltaM
static constexpr double m_muonMass
int alulof(double *ps, double *pi, double *pf)
static const long m_neutrinoTau
std::string m_inProphecy4mu
std::string m_inProphecy2e2mu
static const long m_neutrinoEl
int alulob(double *ps, double *pi, double *pf)
void setIO(const std::string &powheg, const std::string &prophecy4e, const std::string &prophecy4mu, const std::string &prophecy2e2mu, const std::string &outlhe, bool debug)
std::string m_inProphecy4e
static const long m_neutrinoMu
int alulf4(double *ps, double *pi, double *pf)
static constexpr double m_electronMass
int alulb4(double *ps, double *pi, double *pf)
static constexpr double m_tauMass
static const long m_muonID
bool isPHevent(const TLorentzVector &higgs, const TLorentzVector &sum_daugh_rest_init)
static const long m_tauID
void setRandomSeed(unsigned long long seed)
int rescms(double *p, double *p1, double *p2, double m1, double m2)
void print(const std::string &field)
static const long m_photonID
static const long m_electronID
static const long m_zID
double setParticleMass(int id) const
constexpr double muonMassInMeV
the mass of the muon (in MeV)
constexpr double electronMassInMeV
the mass of the electron (in MeV)