MC_HINC.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ZFinder.hh" 00004 00005 namespace Rivet { 00006 00007 using namespace Cuts; 00008 00009 00010 /// @brief MC validation analysis for higgs [-> tau tau] events 00011 class MC_HINC : public Analysis { 00012 public: 00013 00014 /// Default constructor 00015 MC_HINC() 00016 : Analysis("MC_HINC") 00017 { } 00018 00019 00020 /// @name Analysis methods 00021 //@{ 00022 00023 /// Book histograms 00024 void init() { 00025 /// @todo Urk, abuse! Need explicit HiggsFinder (and TauFinder?) 00026 Cut cut = etaIn(-3.5,3.5) & (pT >= 25.0*GeV); 00027 ZFinder hfinder(FinalState(), cut, PID::TAU, 115*GeV, 125*GeV, 0.0, ZFinder::NOCLUSTER); 00028 addProjection(hfinder, "Hfinder"); 00029 _h_H_mass = bookHisto1D("H_mass", 50, 119.7, 120.3); 00030 _h_H_pT = bookHisto1D("H_pT", logspace(100, 1.0, 0.5*sqrtS()/GeV)); 00031 _h_H_pT_peak = bookHisto1D("H_pT_peak", 25, 0.0, 25.0); 00032 _h_H_y = bookHisto1D("H_y", 40, -4, 4); 00033 _h_H_phi = bookHisto1D("H_phi", 25, 0.0, TWOPI); 00034 _h_lepton_pT = bookHisto1D("lepton_pT", logspace(100, 10.0, 0.25*sqrtS()/GeV)); 00035 _h_lepton_eta = bookHisto1D("lepton_eta", 40, -4, 4); 00036 } 00037 00038 00039 /// Do the analysis 00040 void analyze(const Event & e) { 00041 const ZFinder& hfinder = applyProjection<ZFinder>(e, "Hfinder"); 00042 if (hfinder.bosons().size() != 1) vetoEvent; 00043 const double weight = e.weight(); 00044 00045 FourMomentum hmom(hfinder.bosons()[0].momentum()); 00046 _h_H_mass->fill(hmom.mass()/GeV, weight); 00047 _h_H_pT->fill(hmom.pT()/GeV, weight); 00048 _h_H_pT_peak->fill(hmom.pT()/GeV, weight); 00049 _h_H_y->fill(hmom.rapidity(), weight); 00050 _h_H_phi->fill(hmom.phi(), weight); 00051 foreach (const Particle& l, hfinder.constituents()) { 00052 _h_lepton_pT->fill(l.pT()/GeV, weight); 00053 _h_lepton_eta->fill(l.eta(), weight); 00054 } 00055 } 00056 00057 00058 /// Finalize 00059 void finalize() { 00060 const double xsec = crossSection()/picobarn; 00061 normalize(_h_H_mass, xsec); 00062 normalize(_h_H_pT, xsec); 00063 normalize(_h_H_pT_peak, xsec); 00064 normalize(_h_H_y, xsec); 00065 normalize(_h_H_phi, xsec); 00066 normalize(_h_lepton_pT, xsec); 00067 normalize(_h_lepton_eta, xsec); 00068 } 00069 00070 //@} 00071 00072 00073 private: 00074 00075 /// @name Histograms 00076 //@{ 00077 Histo1DPtr _h_H_mass; 00078 Histo1DPtr _h_H_pT; 00079 Histo1DPtr _h_H_pT_peak; 00080 Histo1DPtr _h_H_y; 00081 Histo1DPtr _h_H_phi; 00082 Histo1DPtr _h_lepton_pT; 00083 Histo1DPtr _h_lepton_eta; 00084 //@} 00085 00086 }; 00087 00088 00089 00090 // The hook for the plugin system 00091 DECLARE_RIVET_PLUGIN(MC_HINC); 00092 00093 } Generated on Tue Sep 30 2014 19:45:45 for The Rivet MC analysis system by ![]() |