D0_2008_S7554427.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 00006 namespace Rivet { 00007 00008 00009 /// @brief D0 Run II Z \f$ p_\perp \f$ differential cross-section shape 00010 /// @author Andy Buckley 00011 /// @author Gavin Hesketh 00012 /// @author Frank Siegert 00013 class D0_2008_S7554427 : public Analysis { 00014 00015 public: 00016 00017 /// Default constructor. 00018 D0_2008_S7554427() : Analysis("D0_2008_S7554427") 00019 { 00020 // Run II Z pT 00021 } 00022 00023 00024 /// @name Analysis methods 00025 //@{ 00026 00027 /// Book histograms 00028 void init() { 00029 FinalState fs; 00030 ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON, 00031 40.0*GeV, 200.0*GeV, 0.2, true, true); 00032 addProjection(zfinder, "ZFinder"); 00033 00034 _h_ZpT = bookHisto1D(1, 1, 1); 00035 _h_forward_ZpT = bookHisto1D(3, 1, 1); 00036 } 00037 00038 00039 00040 /// Do the analysis 00041 void analyze(const Event & e) { 00042 const double weight = e.weight(); 00043 00044 const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder"); 00045 if (zfinder.bosons().size() == 1) { 00046 double yZ = fabs(zfinder.bosons()[0].rapidity()); 00047 double pTZ = zfinder.bosons()[0].pT(); 00048 _h_ZpT->fill(pTZ, weight); 00049 if (yZ > 2.0) { 00050 _h_forward_ZpT->fill(pTZ, weight); 00051 } 00052 } 00053 else { 00054 MSG_DEBUG("No unique lepton pair found."); 00055 } 00056 00057 } 00058 00059 00060 00061 // Finalize 00062 void finalize() { 00063 normalize(_h_ZpT); 00064 normalize(_h_forward_ZpT); 00065 } 00066 00067 //@} 00068 00069 00070 private: 00071 00072 /// @name Histograms 00073 //@{ 00074 Histo1DPtr _h_ZpT; 00075 Histo1DPtr _h_forward_ZpT; 00076 //@} 00077 00078 }; 00079 00080 00081 00082 // The hook for the plugin system 00083 DECLARE_RIVET_PLUGIN(D0_2008_S7554427); 00084 00085 } Generated on Fri Oct 25 2013 12:41:45 for The Rivet MC analysis system by ![]() |