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
00032 vector<pair<double, double> > etaRanges;
00033
00034
00035
00036
00037
00038 ZFinder zfinder(etaRanges, 15.0*GeV, ELECTRON, 71.0*GeV, 111.0*GeV, 0.2);
00039 addProjection(zfinder, "ZFinder");
00040
00041 _h_yZ = bookHistogram1D(1, 1, 1);
00042 }
00043
00044
00045
00046 void analyze(const Event & e) {
00047 const double weight = e.weight();
00048
00049 const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00050 if (zfinder.particles().size() == 1) {
00051 const ParticleVector& el(zfinder.constituentsFinalState().particles());
00052 if (el[0].momentum().pT() > 25.0*GeV || el[1].momentum().pT() > 25.0*GeV) {
00053 double yZ = fabs(zfinder.particles()[0].momentum().rapidity());
00054 _h_yZ->fill(yZ, weight);
00055 }
00056 }
00057 else {
00058 getLog() << Log::DEBUG << "No unique lepton pair found." << endl;
00059 }
00060 }
00061
00062
00063
00064 void finalize() {
00065
00066
00067 normalize(_h_yZ, 0.5);
00068 }
00069
00070
00071
00072
00073 private:
00074
00075
00076
00077 AIDA::IHistogram1D * _h_yZ;
00078
00079
00080 };
00081
00082
00083
00084
00085 AnalysisBuilder<D0_2007_S7075677> plugin_D0_2007_S7075677;
00086
00087 }