1 #ifndef GeneratorInterface_RivetInterface_RivetAnalysis_H
2 #define GeneratorInterface_RivetInterface_RivetAnalysis_H
6 #include "Rivet/Analysis.hh"
7 #include "Rivet/Projections/FinalState.hh"
8 #include "Rivet/Particle.hh"
9 #include "Rivet/Particle.fhh"
10 #include "Rivet/Event.hh"
11 #include "Rivet/Projections/FastJets.hh"
12 #include "Rivet/Projections/JetAlg.hh"
13 #include "Rivet/Projections/ChargedLeptons.hh"
14 #include "Rivet/Projections/PromptFinalState.hh"
15 #include "Rivet/Projections/DressedLeptons.hh"
16 #include "Rivet/Projections/VetoedFinalState.hh"
17 #include "Rivet/Projections/IdentifiedFinalState.hh"
18 #include "Rivet/Projections/MissingMomentum.hh"
19 #include "Rivet/Tools/RivetHepMC.hh"
50 : Analysis(
"RivetAnalysis"),
82 FinalState fs(particle_cut);
87 ChargedLeptons charged_leptons(fs);
88 IdentifiedFinalState
photons(fs);
91 PromptFinalState prompt_leptons(charged_leptons);
92 prompt_leptons.acceptMuonDecays(
true);
93 prompt_leptons.acceptTauDecays(
true);
94 declare(prompt_leptons,
"PromptLeptons");
96 PromptFinalState prompt_photons(
photons);
97 prompt_photons.acceptMuonDecays(
true);
98 prompt_photons.acceptTauDecays(
true);
103 DressedLeptons dressed_leptons(
104 prompt_photons, prompt_leptons,
_lepConeSize, lepton_cut,
true);
106 dressed_leptons = DressedLeptons(
photons, charged_leptons,
_lepConeSize, lepton_cut,
true);
107 declare(dressed_leptons,
"DressedLeptons");
112 VetoedFinalState fsForJets(fs);
114 fsForJets.addVetoOnThisFinalState(dressed_leptons);
115 JetAlg::Invisibles invisiblesStrategy = JetAlg::Invisibles::DECAY;
121 declare(FastJets(fsForJets, FastJets::ANTIKT,
_fatJetConeSize),
"FatJets");
127 PromptFinalState prompt_neutrinos(
neutrinos);
128 prompt_neutrinos.acceptMuonDecays(
true);
129 prompt_neutrinos.acceptTauDecays(
true);
130 declare(prompt_neutrinos,
"Neutrinos");
135 declare(MissingMomentum(fs),
"MET");
150 _leptons = apply<DressedLeptons>(
event,
"DressedLeptons").particlesByPt();
153 Particles promptleptons = apply<PromptFinalState>(
event,
"PromptLeptons").particles();
155 const auto&
cl = lepton.constituents().front();
156 for (
auto const& pl : promptleptons) {
157 if (
cl.momentum() == pl.momentum()) {
158 for (
auto&
p : pl.ancestors()) {
159 if (
p.abspid() == 15) {
160 p.setMomentum(
p.momentum() * 10
e-20);
161 lepton.addConstituent(
p,
false);
170 Particles fsparticles = apply<FinalState>(
event,
"FS").particles();
172 for (
auto&
photon : apply<FinalState>(
event,
"Photons").particlesByPt()) {
179 double photonptsum = 0;
181 for (
auto& fsparticle : fsparticles) {
188 photonptsum += fsparticle.pt();
197 _jets = apply<FastJets>(
event,
"Jets").jetsByPt(jet_cut);
198 _fatjets = apply<FastJets>(
event,
"FatJets").jetsByPt(fatjet_cut);
200 _met = apply<MissingMomentum>(
event,
"MET").missingMomentum().p3();