D0_2008_S7863608.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ZFinder.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 00006 namespace Rivet { 00007 00008 00009 /// @brief D0 differential Z/\f$ \gamma^* \f$ + jet + \f$ X \f$ cross sections 00010 /// @author Gavin Hesketh, Andy Buckley, Frank Siegert 00011 class D0_2008_S7863608 : public Analysis { 00012 public: 00013 00014 /// Constructor 00015 D0_2008_S7863608() 00016 : Analysis("D0_2008_S7863608") 00017 { } 00018 00019 00020 /// @name Analysis methods 00021 //@{ 00022 00023 /// Book histograms 00024 void init() { 00025 /// @todo These clustering arguments look odd: are they ok? 00026 Cut cut = EtaIn(-1.7,1.7) & (Cuts::pT >= 15.0*GeV); 00027 ZFinder zfinder(FinalState(), cut, PID::MUON, 65*GeV, 115*GeV, 0.2, ZFinder::NOCLUSTER, ZFinder::TRACK); 00028 addProjection(zfinder, "ZFinder"); 00029 00030 FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5); 00031 addProjection(conefinder, "ConeFinder"); 00032 00033 _sum_of_weights_inclusive = 0; 00034 00035 _h_jet_pT_cross_section = bookHisto1D(1, 1, 1); 00036 _h_jet_pT_normalised = bookHisto1D(1, 1, 2); 00037 _h_jet_y_cross_section = bookHisto1D(2, 1, 1); 00038 _h_jet_y_normalised = bookHisto1D(2, 1, 2); 00039 _h_Z_pT_cross_section = bookHisto1D(3, 1, 1); 00040 _h_Z_pT_normalised = bookHisto1D(3, 1, 2); 00041 _h_Z_y_cross_section = bookHisto1D(4, 1, 1); 00042 _h_Z_y_normalised = bookHisto1D(4, 1, 2); 00043 _h_total_cross_section = bookHisto1D(5, 1, 1); 00044 } 00045 00046 00047 // Do the analysis 00048 void analyze(const Event& e) { 00049 const double weight = e.weight(); 00050 00051 const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder"); 00052 if (zfinder.bosons().size()==1) { 00053 _sum_of_weights_inclusive += weight; 00054 const JetAlg& jetpro = applyProjection<JetAlg>(e, "ConeFinder"); 00055 const Jets& jets = jetpro.jetsByPt(20*GeV); 00056 Jets jets_cut; 00057 foreach (const Jet& j, jets) { 00058 if (fabs(j.momentum().pseudorapidity()) < 2.8) { 00059 jets_cut.push_back(j); 00060 } 00061 } 00062 00063 // Return if there are no jets: 00064 if(jets_cut.size()<1) { 00065 MSG_DEBUG("Skipping event " << numEvents() << " because no jets pass cuts "); 00066 vetoEvent; 00067 } 00068 00069 const FourMomentum Zmom = zfinder.bosons()[0].momentum(); 00070 00071 // In jet pT 00072 _h_jet_pT_cross_section->fill( jets_cut[0].pT(), weight); 00073 _h_jet_pT_normalised->fill( jets_cut[0].pT(), weight); 00074 _h_jet_y_cross_section->fill( fabs(jets_cut[0].rapidity()), weight); 00075 _h_jet_y_normalised->fill( fabs(jets_cut[0].rapidity()), weight); 00076 00077 // In Z pT 00078 _h_Z_pT_cross_section->fill(Zmom.pT(), weight); 00079 _h_Z_pT_normalised->fill(Zmom.pT(), weight); 00080 _h_Z_y_cross_section->fill(fabs(Zmom.rapidity()), weight); 00081 _h_Z_y_normalised->fill(fabs(Zmom.rapidity()), weight); 00082 00083 _h_total_cross_section->fill(1960, weight); 00084 } 00085 } 00086 00087 00088 /// Finalize 00089 void finalize() { 00090 const double invlumi = crossSection()/sumOfWeights(); 00091 scale(_h_total_cross_section, invlumi); 00092 scale(_h_jet_pT_cross_section, invlumi); 00093 scale(_h_jet_y_cross_section, invlumi); 00094 scale(_h_Z_pT_cross_section, invlumi); 00095 scale(_h_Z_y_cross_section, invlumi); 00096 00097 double factor=1/_sum_of_weights_inclusive; 00098 if (_sum_of_weights_inclusive == 0) factor = 0; 00099 scale(_h_jet_pT_normalised, factor); 00100 scale(_h_jet_y_normalised, factor); 00101 scale(_h_Z_pT_normalised, factor); 00102 scale(_h_Z_y_normalised, factor); 00103 } 00104 00105 //@} 00106 00107 00108 private: 00109 00110 /// @name Histograms 00111 //@{ 00112 Histo1DPtr _h_jet_pT_cross_section; 00113 Histo1DPtr _h_jet_y_cross_section; 00114 Histo1DPtr _h_Z_pT_cross_section; 00115 Histo1DPtr _h_Z_y_cross_section; 00116 Histo1DPtr _h_total_cross_section; 00117 Histo1DPtr _h_jet_pT_normalised; 00118 Histo1DPtr _h_jet_y_normalised; 00119 Histo1DPtr _h_Z_pT_normalised; 00120 Histo1DPtr _h_Z_y_normalised; 00121 //@} 00122 00123 double _sum_of_weights_inclusive; 00124 00125 }; 00126 00127 00128 00129 // The hook for the plugin system 00130 DECLARE_RIVET_PLUGIN(D0_2008_S7863608); 00131 00132 } Generated on Thu Feb 6 2014 17:38:44 for The Rivet MC analysis system by ![]() |