Rivet analyses referenceMC_DIPHOTONMonte Carlo validation observables for diphoton production at LHCExperiment: () Status: VALIDATED Authors:
Beams: * * Beam energies: ANY Run details:
Different observables related to the two photons Source code: MC_DIPHOTON.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/IdentifiedFinalState.hh"
5
6namespace Rivet {
7
8
9
10
11 /// @brief MC validation analysis for isolated di-photon events
12 class MC_DIPHOTON : public Analysis {
13 public:
14
15 /// Constructor
16 MC_DIPHOTON()
17 : Analysis("MC_DIPHOTON")
18 { }
19
20
21 /// @name Analysis methods
22 /// @{
23
24 void init() {
25 FinalState fs;
26 declare(fs, "FS");
27
28 // set photon cuts from input options
29 const double etacut = getOption<double>("ABSETAGAMMAX", 2.);
30 const double ptcut = getOption<double>("PTGAMMIN", 20.);
31
32 IdentifiedFinalState ifs(Cuts::abseta < etacut && Cuts::pT > ptcut*GeV);
33 ifs.acceptId(PID::PHOTON);
34 declare(ifs, "IFS");
35
36 book(_h_m_PP ,"m_PP", logspace(50, 1.0, 0.25*(sqrtS()>0.?sqrtS():14000.)));
37 book(_h_pT_PP ,"pT_PP", logspace(50, 1.0, 0.25*(sqrtS()>0.?sqrtS():14000.)));
38 book(_h_pT_P1 ,"pT_P1", 50, 0.0, 70.0);
39 book(_h_pT_P2 ,"pT_P2", 50, 0.0, 70.0);
40 book(_h_dphi_PP ,"dphi_PP", 20, 0.0, M_PI);
41 }
42
43
44 void analyze(const Event& event) {
45
46 const Particles& photons = apply<IdentifiedFinalState>(event, "IFS").particlesByPt();
47
48 if (photons.size() < 2) {
49 vetoEvent;
50 }
51
52 // Isolate photons with ET_sum in cone
53 Particles isolated_photons;
54 const Particles& fs = apply<FinalState>(event, "FS").particlesByPt();
55 for (const Particle& photon : photons) {
56 FourMomentum mom_in_cone;
57 double eta_P = photon.eta();
58 double phi_P = photon.phi();
59 for (const Particle& p : fs) {
60 if (deltaR(eta_P, phi_P, p.eta(), p.phi()) < 0.4) {
61 mom_in_cone += p.momentum();
62 }
63 }
64 if (mom_in_cone.Et()-photon.Et() < 4.0*GeV) {
65 isolated_photons.push_back(photon);
66 }
67 }
68
69 if (isolated_photons.size() != 2) {
70 vetoEvent;
71 }
72
73 _h_pT_P1->fill(isolated_photons[0].pT());
74 _h_pT_P2->fill(isolated_photons[1].pT());
75 FourMomentum mom_PP = isolated_photons[0].momentum() + isolated_photons[1].momentum();
76 _h_m_PP->fill(mom_PP.mass());
77 _h_pT_PP->fill(mom_PP.pT());
78 _h_dphi_PP->fill(deltaPhi(isolated_photons[0].phi(),
79 isolated_photons[1].phi()));
80 }
81
82
83 void finalize() {
84 scale(_h_m_PP, crossSection()/picobarn/sumOfWeights());
85 scale(_h_pT_PP, crossSection()/picobarn/sumOfWeights());
86 scale(_h_pT_P1, crossSection()/picobarn/sumOfWeights());
87 scale(_h_pT_P2, crossSection()/picobarn/sumOfWeights());
88 scale(_h_dphi_PP, crossSection()/picobarn/sumOfWeights());
89 }
90
91 /// @}
92
93
94 private:
95
96 /// @name Histograms
97 /// @{
98 Histo1DPtr _h_m_PP;
99 Histo1DPtr _h_pT_PP;
100 Histo1DPtr _h_pT_P1;
101 Histo1DPtr _h_pT_P2;
102 Histo1DPtr _h_dphi_PP;
103 /// @}
104
105
106 };
107
108
109
110 RIVET_DECLARE_PLUGIN(MC_DIPHOTON);
111
112}
|