D0_2009_S8349509.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/FinalState.hh" 00004 #include "Rivet/Projections/ZFinder.hh" 00005 #include "Rivet/Projections/FastJets.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// @brief D0 Z+jets angular distributions 00011 class D0_2009_S8349509 : public Analysis { 00012 public: 00013 00014 /// @name Constructors etc. 00015 //@{ 00016 00017 /// Constructor 00018 D0_2009_S8349509() 00019 : Analysis("D0_2009_S8349509"), 00020 _inclusive_Z_sumofweights(0) 00021 { } 00022 00023 //@} 00024 00025 00026 /// @name Analysis methods 00027 //@{ 00028 00029 /// Book histograms 00030 void init() { 00031 ZFinder zfinder(FinalState(), -1.7, 1.7, 15*GeV, PID::MUON, 65*GeV, 115*GeV, 0.2, ZFinder::NOCLUSTER, ZFinder::TRACK); 00032 addProjection(zfinder, "ZFinder"); 00033 00034 FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5); 00035 addProjection(conefinder, "ConeFinder"); 00036 00037 _h_dphi_jet_Z25 = bookHisto1D(1, 1, 1); 00038 _h_dphi_jet_Z45 = bookHisto1D(2, 1, 1); 00039 00040 _h_dy_jet_Z25 = bookHisto1D(3, 1, 1); 00041 _h_dy_jet_Z45 = bookHisto1D(4, 1, 1); 00042 00043 _h_yboost_jet_Z25 = bookHisto1D(5, 1, 1); 00044 _h_yboost_jet_Z45 = bookHisto1D(6, 1, 1); 00045 00046 _h_dphi_jet_Z25_xs = bookHisto1D(1, 1, 2); 00047 _h_dphi_jet_Z45_xs = bookHisto1D(2, 1, 2); 00048 00049 _h_dy_jet_Z25_xs = bookHisto1D(3, 1, 2); 00050 _h_dy_jet_Z45_xs = bookHisto1D(4, 1, 2); 00051 00052 _h_yboost_jet_Z25_xs = bookHisto1D(5, 1, 2); 00053 _h_yboost_jet_Z45_xs = bookHisto1D(6, 1, 2); 00054 00055 _inclusive_Z_sumofweights = 0; 00056 } 00057 00058 00059 void analyze(const Event& event) { 00060 const double weight = event.weight(); 00061 00062 const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder"); 00063 if (zfinder.bosons().size() == 1) { 00064 // count inclusive sum of weights for histogram normalisation 00065 _inclusive_Z_sumofweights += weight; 00066 00067 const FourMomentum& zmom = zfinder.bosons()[0].momentum(); 00068 if (zmom.pT() < 25*GeV) vetoEvent; 00069 00070 Jets jets; 00071 foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt(20*GeV)) { 00072 if (fabs(j.momentum().pseudorapidity()) < 2.8) { 00073 jets.push_back(j); 00074 break; 00075 } 00076 } 00077 00078 // Return if there are no jets: 00079 if (jets.size() < 1) { 00080 MSG_DEBUG("Skipping event " << numEvents() << " because no jets pass cuts "); 00081 vetoEvent; 00082 } 00083 00084 const FourMomentum& jetmom = jets[0].momentum(); 00085 const double yZ = zmom.rapidity(); 00086 const double yjet = jetmom.rapidity(); 00087 const double dphi = deltaPhi(zmom, jetmom); 00088 const double dy = deltaRap(zmom, jetmom); 00089 const double yboost = fabs(yZ+yjet)/2; 00090 00091 if (zmom.pT() > 25*GeV) { 00092 _h_dphi_jet_Z25->fill(dphi, weight); 00093 _h_dy_jet_Z25->fill(dy, weight); 00094 _h_yboost_jet_Z25->fill(yboost, weight); 00095 _h_dphi_jet_Z25_xs->fill(dphi, weight); 00096 _h_dy_jet_Z25_xs->fill(dy, weight); 00097 _h_yboost_jet_Z25_xs->fill(yboost, weight); 00098 } 00099 if (zmom.pT() > 45*GeV) { 00100 _h_dphi_jet_Z45->fill(dphi, weight); 00101 _h_dy_jet_Z45->fill(dy, weight); 00102 _h_yboost_jet_Z45->fill(yboost, weight); 00103 _h_dphi_jet_Z45_xs->fill(dphi, weight); 00104 _h_dy_jet_Z45_xs->fill(dy, weight); 00105 _h_yboost_jet_Z45_xs->fill(yboost, weight); 00106 } 00107 } 00108 00109 } 00110 00111 00112 void finalize() { 00113 if (_inclusive_Z_sumofweights == 0) return; 00114 scale(_h_dphi_jet_Z25, 1/_inclusive_Z_sumofweights); 00115 scale(_h_dphi_jet_Z45, 1/_inclusive_Z_sumofweights); 00116 scale(_h_dy_jet_Z25, 1/_inclusive_Z_sumofweights); 00117 scale(_h_dy_jet_Z45, 1/_inclusive_Z_sumofweights); 00118 scale(_h_yboost_jet_Z25, 1/_inclusive_Z_sumofweights); 00119 scale(_h_yboost_jet_Z45, 1/_inclusive_Z_sumofweights); 00120 00121 scale(_h_dphi_jet_Z25_xs, crossSectionPerEvent()); 00122 scale(_h_dphi_jet_Z45_xs, crossSectionPerEvent()); 00123 scale(_h_dy_jet_Z25_xs, crossSectionPerEvent()); 00124 scale(_h_dy_jet_Z45_xs, crossSectionPerEvent()); 00125 scale(_h_yboost_jet_Z25_xs, crossSectionPerEvent()); 00126 scale(_h_yboost_jet_Z45_xs, crossSectionPerEvent()); 00127 } 00128 00129 //@} 00130 00131 private: 00132 00133 // Data members like post-cuts event weight counters go here 00134 00135 private: 00136 00137 /// @name Histograms (normalised) 00138 //@{ 00139 Histo1DPtr _h_dphi_jet_Z25; 00140 Histo1DPtr _h_dphi_jet_Z45; 00141 00142 Histo1DPtr _h_dy_jet_Z25; 00143 Histo1DPtr _h_dy_jet_Z45; 00144 00145 Histo1DPtr _h_yboost_jet_Z25; 00146 Histo1DPtr _h_yboost_jet_Z45; 00147 //@} 00148 00149 /// @name Histograms (absolute cross sections) 00150 //@{ 00151 Histo1DPtr _h_dphi_jet_Z25_xs; 00152 Histo1DPtr _h_dphi_jet_Z45_xs; 00153 00154 Histo1DPtr _h_dy_jet_Z25_xs; 00155 Histo1DPtr _h_dy_jet_Z45_xs; 00156 00157 Histo1DPtr _h_yboost_jet_Z25_xs; 00158 Histo1DPtr _h_yboost_jet_Z45_xs; 00159 //@} 00160 00161 double _inclusive_Z_sumofweights; 00162 00163 }; 00164 00165 00166 00167 // The hook for the plugin system 00168 DECLARE_RIVET_PLUGIN(D0_2009_S8349509); 00169 00170 } Generated on Tue May 13 2014 11:38:27 for The Rivet MC analysis system by ![]() |