D0_2000_S4480767.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/FinalState.hh" 00004 #include "Rivet/Projections/WFinder.hh" 00005 00006 namespace Rivet { 00007 00008 00009 class D0_2000_S4480767 : public Analysis { 00010 public: 00011 00012 /// @name Constructors etc. 00013 //@{ 00014 00015 /// Constructor 00016 D0_2000_S4480767() 00017 : Analysis("D0_2000_S4480767") 00018 { } 00019 00020 //@} 00021 00022 00023 public: 00024 00025 /// @name Analysis methods 00026 //@{ 00027 00028 /// Book histograms and initialise projections before the run 00029 void init() { 00030 FinalState fs; 00031 WFinder wf(fs, -5, 5, 0.0*GeV, PID::ELECTRON, 0.0*GeV, 200.0*GeV, 0.0*GeV, 0.2); 00032 addProjection(wf, "WFinder"); 00033 00034 _h_W_pT = bookHisto1D(1, 1, 1); 00035 } 00036 00037 00038 /// Perform the per-event analysis 00039 void analyze(const Event& event) { 00040 const double weight = event.weight(); 00041 00042 const WFinder& wf = applyProjection<WFinder>(event, "WFinder"); 00043 if (wf.bosons().size() == 0) vetoEvent; 00044 00045 _h_W_pT->fill(wf.bosons()[0].pT()/GeV, weight); 00046 } 00047 00048 00049 /// Normalise histograms etc., after the run 00050 void finalize() { 00051 00052 scale(_h_W_pT, crossSection()/sumOfWeights()); 00053 00054 } 00055 00056 //@} 00057 00058 00059 private: 00060 00061 /// @name Histograms 00062 //@{ 00063 00064 Histo1DPtr _h_W_pT; 00065 //@} 00066 00067 00068 }; 00069 00070 00071 00072 // The hook for the plugin system 00073 DECLARE_RIVET_PLUGIN(D0_2000_S4480767); 00074 00075 } Generated on Fri Oct 25 2013 12:41:45 for The Rivet MC analysis system by ![]() |