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"
51 : Analysis(
"RivetAnalysis"),
84 FinalState fs(particle_cut);
89 ChargedLeptons charged_leptons(fs);
90 IdentifiedFinalState
photons(fs);
93 PromptFinalState prompt_leptons(charged_leptons);
94 prompt_leptons.acceptMuonDecays(
true);
95 prompt_leptons.acceptTauDecays(
true);
96 declare(prompt_leptons,
"PromptLeptons");
98 PromptFinalState prompt_photons(
photons);
99 prompt_photons.acceptMuonDecays(
true);
100 prompt_photons.acceptTauDecays(
true);
105 DressedLeptons dressed_leptons(
106 prompt_photons, prompt_leptons,
_lepConeSize, lepton_cut,
true);
108 dressed_leptons = DressedLeptons(
photons, charged_leptons,
_lepConeSize, lepton_cut,
true);
109 declare(dressed_leptons,
"DressedLeptons");
114 VetoedFinalState fsForJets(fs);
116 fsForJets.addVetoOnThisFinalState(dressed_leptons);
117 JetAlg::Invisibles invisiblesStrategy = JetAlg::Invisibles::DECAY;
123 declare(FastJets(fsForJets, FastJets::ANTIKT,
_fatJetConeSize),
"FatJets");
129 PromptFinalState prompt_neutrinos(
neutrinos);
130 prompt_neutrinos.acceptMuonDecays(
true);
131 prompt_neutrinos.acceptTauDecays(
true);
132 declare(prompt_neutrinos,
"Neutrinos");
137 declare(MissingMomentum(fs),
"MET");
152 _leptons = apply<DressedLeptons>(
event,
"DressedLeptons").particlesByPt();
155 Particles promptleptons = apply<PromptFinalState>(
event,
"PromptLeptons").particles();
157 const auto&
cl = lepton.constituents().front();
158 for (
auto const& pl : promptleptons) {
159 if (
cl.momentum() == pl.momentum()) {
160 for (
auto&
p : pl.ancestors()) {
161 if (
p.abspid() == 15) {
162 p.setMomentum(
p.momentum() * 10
e-20);
163 lepton.addConstituent(
p,
false);
172 Particles fsparticles = apply<FinalState>(
event,
"FS").particles();
174 for (
auto&
photon : apply<FinalState>(
event,
"Photons").particlesByPt()) {
181 double photonptsum = 0;
183 for (
auto& fsparticle : fsparticles) {
190 photonptsum += fsparticle.pt();
200 _jets = apply<FastJets>(
event,
"Jets").jetsByPt(jet_cut);
201 _fatjets = apply<FastJets>(
event,
"FatJets").jetsByPt(fatjet_cut);
204 _met = apply<MissingMomentum>(
event,
"MET").missingMomentum().p3();
208 for (
auto&
pt :
jet.tags()) {
210 pt.addConstituent(
p,
false);
215 for (
auto&
pt :
jet.tags()) {
217 pt.addConstituent(
p,
false);