CDF_2009_S8383952.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/ZFinder.hh"
00007
00008 namespace Rivet {
00009
00010
00011
00012 class CDF_2009_S8383952 : public Analysis {
00013 public:
00014
00015
00016
00017
00018
00019 CDF_2009_S8383952()
00020 : Analysis("CDF_2009_S8383952")
00021 { }
00022
00023
00024
00025
00026 public:
00027
00028
00029
00030
00031
00032 void init() {
00033
00034
00035
00036
00037 ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00038 66.0*GeV, 116.0*GeV, 0.2, true, true);
00039 addProjection(zfinder, "ZFinder");
00040
00041
00042
00043 _h_xs = bookHistogram1D(1, 1, 1);
00044 _h_yZ = bookHistogram1D(2, 1, 1);
00045
00046 }
00047
00048
00049
00050 void analyze(const Event& event) {
00051 const double weight = event.weight();
00052
00053 const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
00054 if (zfinder.bosons().size() == 1) {
00055 double yZ = fabs(zfinder.bosons()[0].momentum().rapidity());
00056 _h_yZ->fill(yZ, weight);
00057 _h_xs->fill(1960.0, weight);
00058 }
00059 else {
00060 MSG_DEBUG("no unique lepton pair found.");
00061 }
00062
00063 }
00064
00065
00066
00067 void finalize() {
00068 scale(_h_xs, crossSection()/sumOfWeights());
00069
00070
00071 scale(_h_yZ, 0.5*crossSection()/sumOfWeights());
00072 }
00073
00074
00075
00076
00077 private:
00078
00079
00080
00081 AIDA::IHistogram1D *_h_yZ;
00082 AIDA::IHistogram1D *_h_xs;
00083
00084
00085 };
00086
00087
00088
00089
00090 DECLARE_RIVET_PLUGIN(CDF_2009_S8383952);
00091
00092 }