00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/BinnedHistogram.hh"
00004 #include "Rivet/RivetAIDA.hh"
00005 #include "Rivet/Tools/Logging.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007
00008 namespace Rivet {
00009
00010
00011
00012 class CDF_2007_S7057202 : public Analysis {
00013 public:
00014
00015 CDF_2007_S7057202()
00016 : Analysis("CDF_2007_S7057202")
00017 {
00018 setBeams(PROTON, ANTIPROTON);
00019 setNeedsCrossSection(true);
00020 }
00021
00022
00023 void init() {
00024
00025 const FinalState fs;
00026 addProjection(FastJets(fs, FastJets::KT, 0.5), "JetsD05");
00027 addProjection(FastJets(fs, FastJets::KT, 0.7), "JetsD07");
00028 addProjection(FastJets(fs, FastJets::KT, 1.0), "JetsD10");
00029
00030
00031 _binnedHistosD07.addHistogram( 0, 0.1, bookHistogram1D(1, 1, 1));
00032 _binnedHistosD07.addHistogram(0.1, 0.7, bookHistogram1D(2, 1, 1));
00033 _binnedHistosD07.addHistogram(0.7, 1.1, bookHistogram1D(3, 1, 1));
00034 _binnedHistosD07.addHistogram(1.1, 1.6, bookHistogram1D(4, 1, 1));
00035 _binnedHistosD07.addHistogram(1.6, 2.1, bookHistogram1D(5, 1, 1));
00036 _histoD05 = bookHistogram1D(6, 1, 1);
00037 _histoD10 = bookHistogram1D(7, 1, 1);
00038 }
00039
00040
00041 void analyze(const Event& event) {
00042 const double weight = event.weight();
00043
00044 foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD07").jets(54.0*GeV)) {
00045 double y = fabs(jet.momentum().rapidity());
00046 _binnedHistosD07.fill(y, jet.momentum().pT(), weight);
00047 }
00048
00049 foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD05").jets(54.0*GeV)) {
00050 double y = fabs(jet.momentum().rapidity());
00051 if (y >= 0.1 && y < 0.7) _histoD05->fill(jet.momentum().pT(), weight);
00052 }
00053
00054 foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD10").jets(54.0*GeV)) {
00055 double y = fabs(jet.momentum().rapidity());
00056 if (y >= 0.1 && y < 0.7) _histoD10->fill(jet.momentum().pT(), weight);
00057 }
00058 }
00059
00060
00061
00062 void finalize() {
00063 const double xSec = crossSectionPerEvent()/nanobarn;
00064
00065 scale(_histoD05, xSec);
00066 scale(_histoD10, xSec);
00067
00068
00069 _binnedHistosD07.scale(xSec/2.0, this);
00070 }
00071
00072 private:
00073
00074 BinnedHistogram<double> _binnedHistosD07;
00075
00076
00077 AIDA::IHistogram1D* _histoD05;
00078
00079
00080 AIDA::IHistogram1D* _histoD10;
00081
00082
00083 };
00084
00085
00086
00087 AnalysisBuilder<CDF_2007_S7057202> plugin_CDF_2007_S7057202;
00088
00089 }