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 #include "Rivet/Projections/FastJets.hh"
00008
00009 namespace Rivet {
00010
00011
00012
00013 class D0_2009_S8349509 : public Analysis {
00014 public:
00015
00016
00017
00018
00019
00020 D0_2009_S8349509() : Analysis("D0_2009_S8349509"),
00021 _inclusive_Z_sumofweights(0.0)
00022 {
00023 setBeams(PROTON, ANTIPROTON);
00024 setNeedsCrossSection(true);
00025 }
00026
00027
00028
00029
00030
00031
00032
00033
00034 void init() {
00035 ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true);
00036 addProjection(zfinder, "ZFinder");
00037
00038 FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
00039 addProjection(conefinder, "ConeFinder");
00040
00041 _h_dphi_jet_Z25 = bookHistogram1D(1, 1, 1);
00042 _h_dphi_jet_Z45 = bookHistogram1D(2, 1, 1);
00043
00044 _h_dy_jet_Z25 = bookHistogram1D(3, 1, 1);
00045 _h_dy_jet_Z45 = bookHistogram1D(4, 1, 1);
00046
00047 _h_yboost_jet_Z25 = bookHistogram1D(5, 1, 1);
00048 _h_yboost_jet_Z45 = bookHistogram1D(6, 1, 1);
00049
00050 _h_dphi_jet_Z25_xs = bookHistogram1D(1, 1, 2);
00051 _h_dphi_jet_Z45_xs = bookHistogram1D(2, 1, 2);
00052
00053 _h_dy_jet_Z25_xs = bookHistogram1D(3, 1, 2);
00054 _h_dy_jet_Z45_xs = bookHistogram1D(4, 1, 2);
00055
00056 _h_yboost_jet_Z25_xs = bookHistogram1D(5, 1, 2);
00057 _h_yboost_jet_Z45_xs = bookHistogram1D(6, 1, 2);
00058
00059 _inclusive_Z_sumofweights = 0.0;
00060 }
00061
00062
00063 void analyze(const Event& event) {
00064 const double weight = event.weight();
00065
00066 const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
00067 if (zfinder.bosons().size()==1) {
00068
00069 _inclusive_Z_sumofweights += weight;
00070
00071 const FourMomentum Zmom = zfinder.bosons()[0].momentum();
00072 if (Zmom.pT()<25.0*GeV) {
00073 vetoEvent;
00074 }
00075
00076 Jets jets;
00077 foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt(20.0*GeV)) {
00078 if (fabs(j.momentum().pseudorapidity()) < 2.8) {
00079 jets.push_back(j);
00080 break;
00081 }
00082 }
00083
00084
00085 if (jets.size() < 1) {
00086 getLog() << Log::DEBUG << "Skipping event " << event.genEvent().event_number()
00087 << " because no jets pass cuts " << endl;
00088 vetoEvent;
00089 }
00090
00091 const FourMomentum jetmom = jets[0].momentum();
00092 double yZ = Zmom.rapidity();
00093 double yjet = jetmom.rapidity();
00094 double dphi = deltaPhi(Zmom.phi(), jetmom.phi());
00095 double dy = fabs(yZ-yjet);
00096 double yboost = fabs(yZ+yjet)/2.0;
00097
00098 if (Zmom.pT() > 25.0*GeV) {
00099 _h_dphi_jet_Z25->fill(dphi,weight);
00100 _h_dy_jet_Z25->fill(dy, weight);
00101 _h_yboost_jet_Z25->fill(yboost, weight);
00102 _h_dphi_jet_Z25_xs->fill(dphi,weight);
00103 _h_dy_jet_Z25_xs->fill(dy, weight);
00104 _h_yboost_jet_Z25_xs->fill(yboost, weight);
00105 }
00106 if (Zmom.pT() > 45.0*GeV) {
00107 _h_dphi_jet_Z45->fill(dphi,weight);
00108 _h_dy_jet_Z45->fill(dy, weight);
00109 _h_yboost_jet_Z45->fill(yboost, weight);
00110 _h_dphi_jet_Z45_xs->fill(dphi,weight);
00111 _h_dy_jet_Z45_xs->fill(dy, weight);
00112 _h_yboost_jet_Z45_xs->fill(yboost, weight);
00113 }
00114 }
00115
00116 }
00117
00118
00119 void finalize() {
00120 if (_inclusive_Z_sumofweights == 0.0) return;
00121 scale(_h_dphi_jet_Z25, 1.0/_inclusive_Z_sumofweights);
00122 scale(_h_dphi_jet_Z45, 1.0/_inclusive_Z_sumofweights);
00123 scale(_h_dy_jet_Z25, 1.0/_inclusive_Z_sumofweights);
00124 scale(_h_dy_jet_Z45, 1.0/_inclusive_Z_sumofweights);
00125 scale(_h_yboost_jet_Z25, 1.0/_inclusive_Z_sumofweights);
00126 scale(_h_yboost_jet_Z45, 1.0/_inclusive_Z_sumofweights);
00127
00128 scale(_h_dphi_jet_Z25_xs, crossSectionPerEvent());
00129 scale(_h_dphi_jet_Z45_xs, crossSectionPerEvent());
00130 scale(_h_dy_jet_Z25_xs, crossSectionPerEvent());
00131 scale(_h_dy_jet_Z45_xs, crossSectionPerEvent());
00132 scale(_h_yboost_jet_Z25_xs, crossSectionPerEvent());
00133 scale(_h_yboost_jet_Z45_xs, crossSectionPerEvent());
00134 }
00135
00136
00137
00138 private:
00139
00140
00141
00142 private:
00143
00144
00145
00146 AIDA::IHistogram1D *_h_dphi_jet_Z25;
00147 AIDA::IHistogram1D *_h_dphi_jet_Z45;
00148
00149 AIDA::IHistogram1D *_h_dy_jet_Z25;
00150 AIDA::IHistogram1D *_h_dy_jet_Z45;
00151
00152 AIDA::IHistogram1D *_h_yboost_jet_Z25;
00153 AIDA::IHistogram1D *_h_yboost_jet_Z45;
00154
00155
00156
00157
00158 AIDA::IHistogram1D *_h_dphi_jet_Z25_xs;
00159 AIDA::IHistogram1D *_h_dphi_jet_Z45_xs;
00160
00161 AIDA::IHistogram1D *_h_dy_jet_Z25_xs;
00162 AIDA::IHistogram1D *_h_dy_jet_Z45_xs;
00163
00164 AIDA::IHistogram1D *_h_yboost_jet_Z25_xs;
00165 AIDA::IHistogram1D *_h_yboost_jet_Z45_xs;
00166
00167
00168 double _inclusive_Z_sumofweights;
00169
00170 };
00171
00172
00173
00174
00175 AnalysisBuilder<D0_2009_S8349509> plugin_D0_2009_S8349509;
00176
00177 }