D0_2008_S6879055.cc
Go to the documentation of this file.00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/ZFinder.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007
00008 namespace Rivet {
00009
00010
00011
00012 class D0_2008_S6879055 : public Analysis {
00013 public:
00014
00015
00016 D0_2008_S6879055() : Analysis("D0_2008_S6879055")
00017 {
00018 setBeams(PROTON, ANTIPROTON);
00019 }
00020
00021
00022
00023
00024
00025
00026 void init() {
00027 ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00028 40.0*GeV, 200.0*GeV, 0.2, true, true);
00029 addProjection(zfinder, "ZFinder");
00030
00031 FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
00032 addProjection(conefinder, "ConeFinder");
00033
00034 _crossSectionRatio = bookHistogram1D(1, 1, 1);
00035 _pTjet1 = bookHistogram1D(2, 1, 1);
00036 _pTjet2 = bookHistogram1D(3, 1, 1);
00037 _pTjet3 = bookHistogram1D(4, 1, 1);
00038 }
00039
00040
00041
00042
00043 void analyze(const Event& event) {
00044 const double weight = event.weight();
00045
00046
00047
00048 const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
00049 if (zfinder.bosons().size()!=1) {
00050 vetoEvent;
00051 }
00052
00053 FourMomentum e0 = zfinder.constituents()[0].momentum();
00054 FourMomentum e1 = zfinder.constituents()[1].momentum();
00055 const double e0eta = e0.eta();
00056 const double e0phi = e0.phi();
00057 const double e1eta = e1.eta();
00058 const double e1phi = e1.phi();
00059
00060 vector<FourMomentum> finaljet_list;
00061 foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt(20.0*GeV)) {
00062 const double jeta = j.momentum().eta();
00063 const double jphi = j.momentum().phi();
00064 if (fabs(jeta) < 2.5) {
00065 if (deltaR(e0eta, e0phi, jeta, jphi) > 0.4 &&
00066 deltaR(e1eta, e1phi, jeta, jphi) > 0.4) {
00067 finaljet_list.push_back(j.momentum());
00068 }
00069 }
00070 }
00071
00072
00073 _crossSectionRatio->fill(0, weight);
00074
00075
00076 if (finaljet_list.size() >= 1) {
00077 _crossSectionRatio->fill(1, weight);
00078 _pTjet1->fill(finaljet_list[0].pT(), weight);
00079 }
00080 if (finaljet_list.size() >= 2) {
00081 _crossSectionRatio->fill(2, weight);
00082 _pTjet2->fill(finaljet_list[1].pT(), weight);
00083 }
00084 if (finaljet_list.size() >= 3) {
00085 _crossSectionRatio->fill(3, weight);
00086 _pTjet3->fill(finaljet_list[2].pT(), weight);
00087 }
00088 if (finaljet_list.size() >= 4) {
00089 _crossSectionRatio->fill(4, weight);
00090 }
00091 }
00092
00093
00094
00095
00096 void finalize() {
00097
00098 _crossSectionRatio->scale(1.0/_crossSectionRatio->binHeight(0));
00099
00100
00101
00102
00103 normalize(_pTjet1, 10439.0);
00104 normalize(_pTjet2, 1461.5);
00105 normalize(_pTjet3, 217.0);
00106 }
00107
00108
00109
00110
00111 private:
00112
00113
00114
00115 AIDA::IHistogram1D * _crossSectionRatio;
00116 AIDA::IHistogram1D * _pTjet1;
00117 AIDA::IHistogram1D * _pTjet2;
00118 AIDA::IHistogram1D * _pTjet3;
00119
00120
00121 };
00122
00123
00124
00125
00126 AnalysisBuilder<D0_2008_S6879055> plugin_D0_2008_S6879055;
00127
00128 }