// -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/ZFinder.hh" namespace Rivet { using namespace Cuts; class MY_RFSTEST2c : public Analysis { public: MY_RFSTEST2c() : Analysis("MY_RFSTEST2c") {} void init() { FinalState fs; Cut cut = etaIn(-3.5,3.5) & (pT >= 25.0*GeV); ZFinder zfinder(fs, cut, PID::ELECTRON, 65*GeV, 115*GeV, 0.2, ZFinder::CLUSTERNODECAY, ZFinder::TRACK); addProjection(zfinder, "ZFinder"); VetoedFinalState remainder = zfinder.remainingFinalState(); addProjection(remainder, "RFS"); } void analyze(const Event & e) { const ZFinder& zfinder = applyProjection(e, "ZFinder"); if (zfinder.bosons().size() != 1) vetoEvent; cout << "zfinder: " << zfinder.particles()[0].pdgId() << " " << zfinder.particles()[0].genParticle()->barcode() << endl; cout << "zfinder: " << zfinder.particles()[1].pdgId() << " " << zfinder.particles()[1].genParticle()->barcode() << endl; const FinalState& rfs = applyProjection(e, "RFS"); cout << "rfs.size = "<barcode() << endl; } } void finalize() { } }; DECLARE_RIVET_PLUGIN(MY_RFSTEST2c); }