ATLAS Offline Software
Prophecy4fMerger.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 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 <iostream>
23 #include <string>
24 #include <algorithm>
25 #include <cstring>
26 /* ROOT */
27 #include <TLorentzVector.h>
28 #include "TRandom3.h"
30 
31 
33 
34 public:
35  /* Constructors */
37 
38  /* Destructors */
39  virtual ~Prophecy4fMerger();
40 
41  /* Methods */
42 
43  /* --------------------------------------------------------- */
44  /* Transforms PI (given in the frame of PS) into PF (in Lab) */
45  /* N.B. P(1,2,3,4) = (PX,PY,PZ,E); PS(5)=M */
46  /* --------------------------------------------------------- */
47  int alulb4(double *ps, double *pi, double *pf);
48 
49  /* --------------------------------------------------------- */
50  /* Transforms PI (given in Lab) into PF (in rest frame of PS */
51  /* N.B. P(1,2,3,4) = (PX,PY,PZ,E); PS(5)=M */
52  /* --------------------------------------------------------- */
53  int alulf4(double *ps, double *pi, double *pf);
54 
55  /* ---------------------------------------------------------- */
56  /* Transforms PI (given in rest frame of PS) into PF (in Lab) */
57  /* N.B. P(1,2,3,4,5) = (PX,PY,PZ,E,M) */
58  /* -----------------------------------------------------------*/
59  int alulob(double *ps, double *pi, double *pf);
60 
61  /* ---------------------------------------------------------- */
62  /* Transforms PI (given in Lab) into PF (in rest frame of PS) */
63  /* N.B. P(1,2,3,4,5) = (PX,PY,PZ,E,M) */
64  /* ---------------------------------------------------------- */
65  int alulof(double *ps, double *pi, double *pf);
66 
67  /* ---------------------------------------------- */
68  /* C.M. Momentum for decay masses EM0-> EM1 + EM2 */
69  /* Set to -1 below threshold */
70  /* ---------------------------------------------- */
71  double alupcm(double em0, double em1, double em2);
72 
73  int rescms(double *p, double *p1, double *p2, double m1, double m2);
74  /* Set Input and Output Files */
75  void setIO(const std::string& powheg,
76  const std::string& prophecy4e,
77  const std::string& prophecy4mu,
78  const std::string& prophecy2e2mu,
79  const std::string& outlhe,
80  bool debug);
81 
82  void setRandomSeed(unsigned long long seed);
83 
84  /* Merge LHE files */
85  void merge();
86 
87  /*Verify if POWHEG event has Higgs off-mass shell */
88  bool isPHevent(const TLorentzVector& higgs,
89  const TLorentzVector& sum_daugh_rest_init);
90 
91  /* Set Particles Mass */
92  double setParticleMass(int id) const;
93 
94  /* Check if File Exists */
95  bool fileExists(const std::string& filename);
96 
97  /* Debug methods */
98  void print(const std::string& field);
99  void print(const std::string& field, int value);
100 
101 
102 protected:
103  std::string m_inPowheg;
104  std::string m_inProphecy4e;
105  std::string m_inProphecy4mu;
106  std::string m_inProphecy2e2mu;
107  std::string m_outLHE;
108  bool m_phEvent;
109  bool m_debug;
110  TRandom3 m_rand;
111  static constexpr double m_deltaM = 3.;
112  static constexpr double m_muonMass = ParticleConstants::muonMassInMeV/1000.; // Convert MeV to GeV
113  static constexpr double m_electronMass = ParticleConstants::electronMassInMeV/1000.; // Convert MeV to GeV
114  static constexpr double m_tauMass = 1.777;
115  static const long m_electronID = 11;
116  static const long m_muonID = 13;
117  static const long m_tauID = 15;
118  static const long m_zID = 23;
119  static const long m_higgsID = 25;
120  static const long m_photonID = 22;
121  static const long m_neutrinoEl = 12;
122  static const long m_neutrinoMu = 14;
123  static const long m_neutrinoTau = 16;
124 
125 };
126 #endif
Prophecy4fMerger::m_inProphecy4mu
std::string m_inProphecy4mu
Definition: Prophecy4fMerger.h:105
Prophecy4fMerger::alulb4
int alulb4(double *ps, double *pi, double *pf)
Definition: Prophecy4fMerger.cxx:32
Prophecy4fMerger::setRandomSeed
void setRandomSeed(unsigned long long seed)
Definition: Prophecy4fMerger.cxx:26
Prophecy4fMerger::m_tauMass
static constexpr double m_tauMass
Definition: Prophecy4fMerger.h:114
Prophecy4fMerger::alupcm
double alupcm(double em0, double em1, double em2)
Definition: Prophecy4fMerger.cxx:99
ParticleConstants::PDG2011::muonMassInMeV
constexpr double muonMassInMeV
the mass of the muon (in MeV)
Definition: ParticleConstants.h:29
Prophecy4fMerger::merge
void merge()
Definition: Prophecy4fMerger.cxx:192
Prophecy4fMerger::setIO
void setIO(const std::string &powheg, const std::string &prophecy4e, const std::string &prophecy4mu, const std::string &prophecy2e2mu, const std::string &outlhe, bool debug)
Definition: Prophecy4fMerger.cxx:175
Prophecy4fMerger::m_muonMass
static constexpr double m_muonMass
Definition: Prophecy4fMerger.h:112
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
Prophecy4fMerger::alulof
int alulof(double *ps, double *pi, double *pf)
Definition: Prophecy4fMerger.cxx:88
Prophecy4fMerger
Definition: Prophecy4fMerger.h:32
athena.value
value
Definition: athena.py:124
Prophecy4fMerger::m_tauID
static const long m_tauID
Definition: Prophecy4fMerger.h:117
Prophecy4fMerger::setParticleMass
double setParticleMass(int id) const
Definition: Prophecy4fMerger.cxx:498
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
Prophecy4fMerger::m_muonID
static const long m_muonID
Definition: Prophecy4fMerger.h:116
Prophecy4fMerger::m_inProphecy4e
std::string m_inProphecy4e
Definition: Prophecy4fMerger.h:104
Prophecy4fMerger::m_rand
TRandom3 m_rand
Definition: Prophecy4fMerger.h:110
Prophecy4fMerger::m_neutrinoTau
static const long m_neutrinoTau
Definition: Prophecy4fMerger.h:123
Prophecy4fMerger::isPHevent
bool isPHevent(const TLorentzVector &higgs, const TLorentzVector &sum_daugh_rest_init)
Definition: Prophecy4fMerger.cxx:486
pi
#define pi
Definition: TileMuonFitter.cxx:65
Prophecy4fMerger::m_zID
static const long m_zID
Definition: Prophecy4fMerger.h:118
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
Prophecy4fMerger::m_phEvent
bool m_phEvent
Definition: Prophecy4fMerger.h:108
Prophecy4fMerger::fileExists
bool fileExists(const std::string &filename)
Definition: Prophecy4fMerger.cxx:521
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
python.changerun.m1
m1
Definition: changerun.py:30
Prophecy4fMerger::rescms
int rescms(double *p, double *p1, double *p2, double m1, double m2)
Definition: Prophecy4fMerger.cxx:129
ParticleConstants.h
python.SystemOfUnits.ps
float ps
Definition: SystemOfUnits.py:150
Prophecy4fMerger::print
void print(const std::string &field)
Definition: Prophecy4fMerger.cxx:533
Prophecy4fMerger::m_debug
bool m_debug
Definition: Prophecy4fMerger.h:109
Prophecy4fMerger::m_inProphecy2e2mu
std::string m_inProphecy2e2mu
Definition: Prophecy4fMerger.h:106
Prophecy4fMerger::alulob
int alulob(double *ps, double *pi, double *pf)
Definition: Prophecy4fMerger.cxx:78
Prophecy4fMerger::m_photonID
static const long m_photonID
Definition: Prophecy4fMerger.h:120
Prophecy4fMerger::m_deltaM
static constexpr double m_deltaM
Definition: Prophecy4fMerger.h:111
Prophecy4fMerger::m_neutrinoMu
static const long m_neutrinoMu
Definition: Prophecy4fMerger.h:122
Prophecy4fMerger::m_neutrinoEl
static const long m_neutrinoEl
Definition: Prophecy4fMerger.h:121
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
Prophecy4fMerger::m_higgsID
static const long m_higgsID
Definition: Prophecy4fMerger.h:119
Prophecy4fMerger::~Prophecy4fMerger
virtual ~Prophecy4fMerger()
Definition: Prophecy4fMerger.cxx:23
Prophecy4fMerger::m_electronID
static const long m_electronID
Definition: Prophecy4fMerger.h:115
Prophecy4fMerger::m_inPowheg
std::string m_inPowheg
Definition: Prophecy4fMerger.h:103
python.output.AtlRunQueryRoot.pf
pf
Definition: AtlRunQueryRoot.py:988
Prophecy4fMerger::Prophecy4fMerger
Prophecy4fMerger()
Definition: Prophecy4fMerger.cxx:20
Prophecy4fMerger::m_outLHE
std::string m_outLHE
Definition: Prophecy4fMerger.h:107
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:23
Prophecy4fMerger::m_electronMass
static constexpr double m_electronMass
Definition: Prophecy4fMerger.h:113
Prophecy4fMerger::alulf4
int alulf4(double *ps, double *pi, double *pf)
Definition: Prophecy4fMerger.cxx:55
python.SystemOfUnits.m2
float m2
Definition: SystemOfUnits.py:107
ParticleConstants::PDG2011::electronMassInMeV
constexpr double electronMassInMeV
the mass of the electron (in MeV)
Definition: ParticleConstants.h:26