D0_2000_S4480767.cc
Go to the documentation of this file.00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/FinalState.hh"
00006 #include "Rivet/Projections/WFinder.hh"
00007
00008 namespace Rivet {
00009
00010
00011 class D0_2000_S4480767 : public Analysis {
00012 public:
00013
00014
00015
00016
00017
00018 D0_2000_S4480767()
00019 : Analysis("D0_2000_S4480767")
00020 { }
00021
00022
00023
00024
00025 public:
00026
00027
00028
00029
00030
00031 void init() {
00032
00033 WFinder wf(-5, 5, 0.0*GeV, ELECTRON, 0.0*GeV, 200.0*GeV, 0.0*GeV, 0.2);
00034 addProjection(wf, "WFinder");
00035
00036 _h_W_pT = bookHistogram1D(1, 1, 1);
00037 }
00038
00039
00040
00041 void analyze(const Event& event) {
00042 const double weight = event.weight();
00043
00044 const WFinder& wf = applyProjection<WFinder>(event, "WFinder");
00045 if (wf.bosons().size() == 0) vetoEvent;
00046
00047 _h_W_pT->fill(wf.bosons()[0].momentum().pT()/GeV, weight);
00048 }
00049
00050
00051
00052 void finalize() {
00053
00054 scale(_h_W_pT, crossSection()/sumOfWeights());
00055
00056 }
00057
00058
00059
00060
00061 private:
00062
00063
00064
00065
00066 AIDA::IHistogram1D *_h_W_pT;
00067
00068
00069
00070 };
00071
00072
00073
00074
00075 DECLARE_RIVET_PLUGIN(D0_2000_S4480767);
00076
00077 }