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