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
00019
00020 void init() {
00021
00022 const FinalState fs;
00023 addProjection(FastJets(fs, FastJets::KT, 0.5), "JetsD05");
00024 addProjection(FastJets(fs, FastJets::KT, 0.7), "JetsD07");
00025 addProjection(FastJets(fs, FastJets::KT, 1.0), "JetsD10");
00026
00027
00028 _binnedHistosD07.addHistogram( 0, 0.1, bookHistogram1D(1, 1, 1));
00029 _binnedHistosD07.addHistogram(0.1, 0.7, bookHistogram1D(2, 1, 1));
00030 _binnedHistosD07.addHistogram(0.7, 1.1, bookHistogram1D(3, 1, 1));
00031 _binnedHistosD07.addHistogram(1.1, 1.6, bookHistogram1D(4, 1, 1));
00032 _binnedHistosD07.addHistogram(1.6, 2.1, bookHistogram1D(5, 1, 1));
00033 _histoD05 = bookHistogram1D(6, 1, 1);
00034 _histoD10 = bookHistogram1D(7, 1, 1);
00035 }
00036
00037
00038 void analyze(const Event& event) {
00039 const double weight = event.weight();
00040
00041 foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD07").jets(54.0*GeV)) {
00042 double y = fabs(jet.momentum().rapidity());
00043 _binnedHistosD07.fill(y, jet.momentum().pT(), weight);
00044 }
00045
00046 foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD05").jets(54.0*GeV)) {
00047 double y = fabs(jet.momentum().rapidity());
00048 if (y >= 0.1 && y < 0.7) _histoD05->fill(jet.momentum().pT(), weight);
00049 }
00050
00051 foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD10").jets(54.0*GeV)) {
00052 double y = fabs(jet.momentum().rapidity());
00053 if (y >= 0.1 && y < 0.7) _histoD10->fill(jet.momentum().pT(), weight);
00054 }
00055 }
00056
00057
00058
00059 void finalize() {
00060 const double xSec = crossSectionPerEvent()/nanobarn;
00061
00062 scale(_histoD05, xSec);
00063 scale(_histoD10, xSec);
00064
00065
00066 _binnedHistosD07.scale(xSec/2.0, this);
00067 }
00068
00069 private:
00070
00071 BinnedHistogram<double> _binnedHistosD07;
00072
00073
00074 AIDA::IHistogram1D* _histoD05;
00075
00076
00077 AIDA::IHistogram1D* _histoD10;
00078
00079
00080 };
00081
00082
00083
00084
00085 DECLARE_RIVET_PLUGIN(CDF_2007_S7057202);
00086
00087 }