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