ATLAS_2014_I1300647.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/Tools/BinnedHistogram.hh" 00006 00007 /// @todo Include more projections as required, e.g. ChargedFinalState, FastJets, ZFinder... 00008 00009 namespace Rivet { 00010 00011 00012 class ATLAS_2014_I1300647 : public Analysis { 00013 public: 00014 00015 /// Constructor 00016 ATLAS_2014_I1300647() 00017 : Analysis("ATLAS_2014_I1300647") 00018 { } 00019 00020 00021 public: 00022 00023 /// @name Analysis methods 00024 //@{ 00025 00026 /// Book histograms and initialise projections before the run 00027 void init() { 00028 00029 FinalState fs; 00030 00031 ZFinder zfinder_dressed_el(fs, Cuts::abseta<2.4 && Cuts::pT>20.0*GeV, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1); 00032 addProjection(zfinder_dressed_el, "ZFinder_dressed_el"); 00033 00034 ZFinder zfinder_bare_el(fs, Cuts::abseta<2.4 && Cuts::pT>20.0*GeV, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.0); 00035 addProjection(zfinder_bare_el, "ZFinder_bare_el"); 00036 00037 ZFinder zfinder_dressed_mu(fs, Cuts::abseta<2.4 && Cuts::pT>20.0*GeV, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1); 00038 addProjection(zfinder_dressed_mu, "ZFinder_dressed_mu"); 00039 00040 ZFinder zfinder_bare_mu(fs, Cuts::abseta<2.4 && Cuts::pT>20.0*GeV, PID::MUON, 66.0*GeV, 116.0*GeV, 0.0); 00041 addProjection(zfinder_bare_mu, "ZFinder_bare_mu"); 00042 00043 // Book histograms 00044 _hist_zpt_el_dressed = bookHisto1D(1, 1, 1); // electron "dressed" 00045 _hist_zpt_mu_dressed = bookHisto1D(1, 1, 2); // muon "dressed" 00046 _hist_zpt_el_bare = bookHisto1D(1, 2, 1); // electron "bare" 00047 _hist_zpt_mu_bare = bookHisto1D(1, 2, 2); // muon "bare" 00048 00049 //double-differential plots 00050 _h_zpt_el_mu_dressed.addHistogram(0.0, 1.0, bookHisto1D(3, 1, 2)); 00051 _h_zpt_el_mu_dressed.addHistogram(1.0, 2.0, bookHisto1D(3, 1, 4)); 00052 _h_zpt_el_mu_dressed.addHistogram(2.0, 2.4, bookHisto1D(3, 1, 6)); 00053 00054 } 00055 00056 00057 /// Perform the per-event analysis 00058 void analyze(const Event& event) { 00059 00060 const double weight = event.weight(); 00061 00062 const ZFinder& zfinder_dressed_el = applyProjection<ZFinder>(event, "ZFinder_dressed_el"); 00063 const ZFinder& zfinder_bare_el = applyProjection<ZFinder>(event, "ZFinder_bare_el"); 00064 const ZFinder& zfinder_dressed_mu = applyProjection<ZFinder>(event, "ZFinder_dressed_mu"); 00065 const ZFinder& zfinder_bare_mu = applyProjection<ZFinder>(event, "ZFinder_bare_mu"); 00066 00067 FillPlots1d(zfinder_dressed_el, _hist_zpt_el_dressed, weight); 00068 00069 FillPlots1d(zfinder_bare_el, _hist_zpt_el_bare, weight); 00070 00071 FillPlots1d(zfinder_dressed_mu, _hist_zpt_mu_dressed, weight); 00072 00073 FillPlots1d(zfinder_bare_mu, _hist_zpt_mu_bare, weight); 00074 00075 FillPlots3d(zfinder_dressed_el, _h_zpt_el_mu_dressed, weight); 00076 FillPlots3d(zfinder_dressed_mu, _h_zpt_el_mu_dressed, weight); 00077 00078 } 00079 00080 void FillPlots1d(const ZFinder& zfinder, Histo1DPtr hist, double weight) { 00081 if(zfinder.bosons().size() != 1) return; 00082 const FourMomentum pZ = zfinder.bosons()[0].momentum(); 00083 hist->fill(pZ.pT()/GeV, weight); 00084 return; 00085 } 00086 00087 void FillPlots3d(const ZFinder& zfinder, BinnedHistogram<double>& binnedHist, double weight) { 00088 if(zfinder.bosons().size() != 1) return; 00089 const FourMomentum pZ = zfinder.bosons()[0].momentum(); 00090 binnedHist.fill(pZ.rapidity(), pZ.pT()/GeV, weight); 00091 return; 00092 } 00093 00094 /// Normalise histograms etc., after the run 00095 void finalize() { 00096 00097 normalize(_hist_zpt_el_dressed); 00098 normalize(_hist_zpt_el_bare); 00099 00100 normalize(_hist_zpt_mu_dressed); 00101 normalize(_hist_zpt_mu_bare); 00102 00103 foreach (Histo1DPtr hist, _h_zpt_el_mu_dressed.getHistograms()) { normalize(hist); } 00104 00105 } 00106 00107 //@} 00108 00109 00110 private: 00111 00112 // Data members like post-cuts event weight counters go here 00113 00114 00115 private: 00116 00117 /// @name Histograms 00118 //@{ 00119 BinnedHistogram<double> _h_zpt_el_mu_dressed; 00120 00121 00122 Histo1DPtr _hist_zpt_el_dressed; 00123 Histo1DPtr _hist_zpt_el_bare; 00124 Histo1DPtr _hist_zpt_mu_dressed; 00125 Histo1DPtr _hist_zpt_mu_bare; 00126 00127 //@} 00128 00129 }; 00130 00131 00132 // The hook for the plugin system 00133 DECLARE_RIVET_PLUGIN(ATLAS_2014_I1300647); 00134 } Generated on Wed Oct 7 2015 12:09:11 for The Rivet MC analysis system by ![]() |