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/ChargedLeptons.hh" 13 #include "Rivet/Projections/PromptFinalState.hh" 14 #include "Rivet/Projections/LeptonFinder.hh" 15 #include "Rivet/Projections/VetoedFinalState.hh" 16 #include "Rivet/Projections/IdentifiedFinalState.hh" 17 #include "Rivet/Projections/MissingMomentum.hh" 18 #include "Rivet/Tools/RivetHepMC.hh" 50 : Analysis(
"RivetAnalysis"),
79 Cut particle_cut = (Cuts::abseta < _particleMaxEta) and (Cuts::pT >
_particleMinPt * GeV);
80 Cut lepton_cut = (Cuts::abseta < _lepMaxEta) and (Cuts::pT >
_lepMinPt * GeV);
83 FinalState
fs(particle_cut);
88 ChargedLeptons charged_leptons(
fs);
92 PromptFinalState prompt_leptons(charged_leptons);
93 prompt_leptons.acceptMuonDecays(
true);
94 prompt_leptons.acceptTauDecays(
true);
95 declare(prompt_leptons,
"PromptLeptons");
97 PromptFinalState prompt_photons(
photons);
98 prompt_photons.acceptMuonDecays(
true);
99 prompt_photons.acceptTauDecays(
true);
101 LeptonFinder prompt_dressed_leptons(prompt_leptons, prompt_photons,
_lepConeSize, lepton_cut);
108 VetoedFinalState fsForJets(
fs);
110 fsForJets.addVetoOnThisFinalState(prompt_dressed_leptons);
111 JetInvisibles invisiblesStrategy = JetInvisibles::DECAY;
123 PromptFinalState prompt_neutrinos(
neutrinos);
124 prompt_neutrinos.acceptMuonDecays(
true);
125 prompt_neutrinos.acceptTauDecays(
true);
126 declare(prompt_neutrinos,
"Neutrinos");
131 declare(MissingMomentum(
fs),
"MET");
143 Cut jet_cut = (Cuts::abseta < _jetMaxEta) and (Cuts::pT >
_jetMinPt * GeV);
144 Cut fatjet_cut = (Cuts::abseta < _fatJetMaxEta) and (Cuts::pT >
_fatJetMinPt * GeV);
146 _leptons = apply<LeptonFinder>(
event,
"DressedLeptons").particlesByPt();
149 Particles promptleptons = apply<PromptFinalState>(
event,
"PromptLeptons").
particles();
151 const auto&
cl = lepton.constituents().front();
152 for (
auto const& pl : promptleptons) {
153 if (
cl.momentum() == pl.momentum()) {
154 for (
auto&
p : pl.ancestors()) {
155 if (
p.abspid() == 15) {
156 p.setMomentum(
p.momentum() * 1
e-20);
157 lepton.addConstituent(
p,
false);
166 Particles fsparticles = apply<FinalState>(
event,
"FS").
particles();
168 for (
auto&
photon : apply<FinalState>(
event,
"Photons").particlesByPt()) {
175 double photonptsum = 0;
177 for (
auto& fsparticle : fsparticles) {
184 photonptsum += fsparticle.pt();
194 _jets = apply<FastJets>(
event,
"Jets").jetsByPt(jet_cut);
195 _fatjets = apply<FastJets>(
event,
"FatJets").jetsByPt(fatjet_cut);
198 _met = apply<MissingMomentum>(
event,
"MET").missingMomentum().p3();
202 for (
auto&
pt :
jet.tags()) {
204 pt.addConstituent(
p,
false);
209 for (
auto&
pt :
jet.tags()) {
211 pt.addConstituent(
p,
false);
Particles leptons() const
bool isLepton(const Candidate &part)
def ALL(dt, wheel, station, sector)
Particles photons() const
RivetAnalysis(const edm::ParameterSet &pset)
bool _excludeNeutrinosFromJetClustering
Abs< T >::type abs(const T &t)
void analyze(const Event &event) override
bool _excludePromptLeptonsFromJetClustering
bool _usePromptFinalStates
std::string status() const override
Particles neutrinos() const