D0_2007_S7075677.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/ZFinder.hh"
00006
00007 namespace Rivet {
00008
00009
00010
00011
00012
00013
00014 class D0_2007_S7075677 : public Analysis {
00015
00016 public:
00017
00018
00019 D0_2007_S7075677() : Analysis("D0_2007_S7075677")
00020 {
00021
00022 setBeams(PROTON, ANTIPROTON);
00023 }
00024
00025
00026
00027
00028
00029
00030 void init() {
00031 ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00032 71.0*GeV, 111.0*GeV, 0.2, true, true);
00033 addProjection(zfinder, "ZFinder");
00034
00035 _h_yZ = bookHistogram1D(1, 1, 1);
00036 }
00037
00038
00039
00040 void analyze(const Event & e) {
00041 const double weight = e.weight();
00042
00043 const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00044 if (zfinder.bosons().size() == 1) {
00045 const ParticleVector& el(zfinder.constituents());
00046 if (el[0].momentum().pT() > 25.0*GeV || el[1].momentum().pT() > 25.0*GeV) {
00047 double yZ = fabs(zfinder.bosons()[0].momentum().rapidity());
00048 _h_yZ->fill(yZ, weight);
00049 }
00050 }
00051 else {
00052 getLog() << Log::DEBUG << "No unique lepton pair found." << endl;
00053 }
00054 }
00055
00056
00057
00058 void finalize() {
00059
00060
00061 normalize(_h_yZ, 0.5);
00062 }
00063
00064
00065
00066
00067 private:
00068
00069
00070
00071 AIDA::IHistogram1D * _h_yZ;
00072
00073
00074 };
00075
00076
00077
00078
00079 AnalysisBuilder<D0_2007_S7075677> plugin_D0_2007_S7075677;
00080
00081 }