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