CDF_2009_S8383952.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 CDF Z boson rapidity measurement 00010 class CDF_2009_S8383952 : public Analysis { 00011 public: 00012 00013 /// @name Constructors etc. 00014 //@{ 00015 00016 /// Constructor 00017 CDF_2009_S8383952() 00018 : Analysis("CDF_2009_S8383952") 00019 { } 00020 00021 //@} 00022 00023 00024 public: 00025 00026 /// @name Analysis methods 00027 //@{ 00028 00029 /// Book histograms and initialise projections before the run 00030 void init() { 00031 00032 /// Initialise and register projections here 00033 // this seems to have been corrected completely for all selection cuts, 00034 // i.e. eta cuts and pT cuts on leptons. 00035 FinalState fs; 00036 ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON, 00037 66.0*GeV, 116.0*GeV, 0.2, true, true); 00038 addProjection(zfinder, "ZFinder"); 00039 00040 00041 /// Book histograms here 00042 _h_xs = bookHisto1D(1, 1, 1); 00043 _h_yZ = bookHisto1D(2, 1, 1); 00044 00045 } 00046 00047 00048 /// Perform the per-event analysis 00049 void analyze(const Event& event) { 00050 const double weight = event.weight(); 00051 00052 const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder"); 00053 if (zfinder.bosons().size() == 1) { 00054 double yZ = fabs(zfinder.bosons()[0].rapidity()); 00055 _h_yZ->fill(yZ, weight); 00056 _h_xs->fill(1960.0, weight); 00057 } 00058 else { 00059 MSG_DEBUG("no unique lepton pair found."); 00060 } 00061 00062 } 00063 00064 00065 /// Normalise histograms etc., after the run 00066 void finalize() { 00067 scale(_h_xs, crossSection()/sumOfWeights()); 00068 // Data seems to have been normalized for the avg of the two sides 00069 // (+ve & -ve rapidity) rather than the sum, hence the 0.5: 00070 scale(_h_yZ, 0.5*crossSection()/sumOfWeights()); 00071 } 00072 00073 //@} 00074 00075 00076 private: 00077 00078 /// @name Histograms 00079 //@{ 00080 Histo1DPtr _h_yZ; 00081 Histo1DPtr _h_xs; 00082 //@} 00083 00084 }; 00085 00086 00087 00088 // The hook for the plugin system 00089 DECLARE_RIVET_PLUGIN(CDF_2009_S8383952); 00090 00091 } Generated on Fri Oct 25 2013 12:41:44 for The Rivet MC analysis system by ![]() |