// -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/ZFinder.hh" namespace Rivet { /// @brief MC validation analysis for higgs [-> tau tau] events class MC_HINC1 : public Analysis { public: /// Default constructor MC_HINC1() : Analysis("MC_HINC1") { } /// @name Analysis methods //@{ /// Book histograms void init() { IdentifiedFinalState hfinder(FinalState(), 25); declare(hfinder, "Hfinder"); book(_h_H_mass ,"H_mass", 100, 125, 126); book(_h_H_pT ,"H_pT", logspace(100, 1.0, 0.5*(sqrtS()>0.?sqrtS():14000.)/GeV)); book(_h_H_pT_peak ,"H_pT_peak", 25, 0.0, 25.0); book(_h_H_y ,"H_y", 40, -4, 4); book(_h_H_phi ,"H_phi", 25, 0.0, TWOPI); } /// Do the analysis void analyze(const Event & e) { const FinalState& hfinder = apply(e, "Hfinder"); if (hfinder.size() != 1) vetoEvent; FourMomentum hmom(hfinder.particles()[0].momentum()); _h_H_mass->fill(hmom.mass()/GeV); _h_H_pT->fill(hmom.pT()/GeV); _h_H_pT_peak->fill(hmom.pT()/GeV); _h_H_y->fill(hmom.rapidity()); _h_H_phi->fill(hmom.phi()); } /// Finalize void finalize() { const double xsec = crossSection()/picobarn; normalize(_h_H_mass, xsec); normalize(_h_H_pT, xsec); normalize(_h_H_pT_peak, xsec); normalize(_h_H_y, xsec); normalize(_h_H_phi, xsec); } //@} private: /// @name Histograms //@{ Histo1DPtr _h_H_mass; Histo1DPtr _h_H_pT; Histo1DPtr _h_H_pT_peak; Histo1DPtr _h_H_y; Histo1DPtr _h_H_phi; //@} }; // The hook for the plugin system RIVET_DECLARE_PLUGIN(MC_HINC1); }