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 setBeams(PROTON, ANTIPROTON);
00023 setNeedsCrossSection(true);
00024 }
00025
00026
00027
00028
00029 public:
00030
00031
00032
00033
00034
00035 void init() {
00036
00037
00038
00039
00040 ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00041 66.0*GeV, 116.0*GeV, 0.2);
00042 addProjection(zfinder, "ZFinder");
00043
00044
00045
00046 _h_xs = bookHistogram1D(1, 1, 1);
00047 _h_yZ = bookHistogram1D(2, 1, 1);
00048
00049 }
00050
00051
00052
00053 void analyze(const Event& event) {
00054 const double weight = event.weight();
00055
00056 const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
00057 if (zfinder.particles().size() == 1) {
00058 double yZ = fabs(zfinder.particles()[0].momentum().rapidity());
00059 _h_yZ->fill(yZ, weight);
00060 _h_xs->fill(1960.0, weight);
00061 }
00062 else {
00063 getLog() << Log::DEBUG << "no unique lepton pair found." << endl;
00064 }
00065
00066 }
00067
00068
00069
00070 void finalize() {
00071 scale(_h_xs, crossSection()/sumOfWeights());
00072
00073
00074 scale(_h_yZ, 0.5*crossSection()/sumOfWeights());
00075 }
00076
00077
00078
00079
00080 private:
00081
00082
00083
00084 AIDA::IHistogram1D *_h_yZ;
00085 AIDA::IHistogram1D *_h_xs;
00086
00087
00088 };
00089
00090
00091
00092
00093 AnalysisBuilder<CDF_2009_S8383952> plugin_CDF_2009_S8383952;
00094
00095
00096 }