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 setNeedsCrossSection(true);
00022 }
00023
00024
00025
00026
00027 public:
00028
00029
00030
00031
00032
00033 void init() {
00034
00035 WFinder wf(-5, 5, 0.0*GeV, ELECTRON, 0.0*GeV, 200.0*GeV, 0.0*GeV, 0.2);
00036 addProjection(wf, "WFinder");
00037
00038 _h_W_pT = bookHistogram1D(1, 1, 1);
00039 }
00040
00041
00042
00043 void analyze(const Event& event) {
00044 const double weight = event.weight();
00045
00046 const WFinder& wf = applyProjection<WFinder>(event, "WFinder");
00047 if (wf.size() == 0) vetoEvent;
00048
00049 _h_W_pT->fill(wf.particles()[0].momentum().pT()/GeV, weight);
00050 }
00051
00052
00053
00054 void finalize() {
00055
00056 scale(_h_W_pT, crossSection()/sumOfWeights());
00057
00058 }
00059
00060
00061
00062
00063 private:
00064
00065
00066
00067
00068 AIDA::IHistogram1D *_h_W_pT;
00069
00070
00071
00072 };
00073
00074
00075
00076
00077 AnalysisBuilder<D0_2000_S4480767> plugin_D0_2000_S4480767;
00078
00079
00080 }