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"),
80 Cut particle_cut = (Cuts::abseta < _particleMaxEta) and (Cuts::pT >
_particleMinPt * GeV);
81 Cut lepton_cut = (Cuts::abseta < _lepMaxEta) and (Cuts::pT >
_lepMinPt * GeV);
84 FinalState
fs(particle_cut);
89 ChargedLeptons charged_leptons(
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 prompt_dressed_leptons(
106 prompt_photons, prompt_leptons,
_lepConeSize, lepton_cut,
true);
113 VetoedFinalState fsForJets(
fs);
115 fsForJets.addVetoOnThisFinalState(prompt_dressed_leptons);
116 JetAlg::Invisibles invisiblesStrategy = JetAlg::Invisibles::DECAY;
122 declare(FastJets(fsForJets, FastJets::ANTIKT,
_fatJetConeSize),
"FatJets");
128 PromptFinalState prompt_neutrinos(
neutrinos);
129 prompt_neutrinos.acceptMuonDecays(
true);
130 prompt_neutrinos.acceptTauDecays(
true);
131 declare(prompt_neutrinos,
"Neutrinos");
136 declare(MissingMomentum(
fs),
"MET");
148 Cut jet_cut = (Cuts::abseta < _jetMaxEta) and (Cuts::pT >
_jetMinPt * GeV);
149 Cut fatjet_cut = (Cuts::abseta < _fatJetMaxEta) and (Cuts::pT >
_fatJetMinPt * GeV);
151 _leptons = apply<DressedLeptons>(
event,
"DressedLeptons").particlesByPt();
154 Particles promptleptons = apply<PromptFinalState>(
event,
"PromptLeptons").
particles();
156 const auto&
cl = lepton.constituents().front();
157 for (
auto const& pl : promptleptons) {
158 if (
cl.momentum() == pl.momentum()) {
159 for (
auto&
p : pl.ancestors()) {
160 if (
p.abspid() == 15) {
161 p.setMomentum(
p.momentum() * 10
e-20);
162 lepton.addConstituent(
p,
false);
171 Particles fsparticles = apply<FinalState>(
event,
"FS").
particles();
173 for (
auto&
photon : apply<FinalState>(
event,
"Photons").particlesByPt()) {
180 double photonptsum = 0;
182 for (
auto& fsparticle : fsparticles) {
189 photonptsum += fsparticle.pt();
199 _jets = apply<FastJets>(
event,
"Jets").jetsByPt(jet_cut);
200 _fatjets = apply<FastJets>(
event,
"FatJets").jetsByPt(fatjet_cut);
203 _met = apply<MissingMomentum>(
event,
"MET").missingMomentum().p3();
207 for (
auto&
pt :
jet.tags()) {
209 pt.addConstituent(
p,
false);
214 for (
auto&
pt :
jet.tags()) {
216 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