LHCF_2012_I1115479.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/UnstableFinalState.hh" 00004 #include "Rivet/Tools/BinnedHistogram.hh" 00005 00006 namespace Rivet { 00007 00008 00009 class LHCF_2012_I1115479 : public Analysis { 00010 public: 00011 00012 LHCF_2012_I1115479() 00013 : Analysis("LHCF_2012_I1115479") 00014 { } 00015 00016 00017 public: 00018 00019 void init() { 00020 addProjection(UnstableFinalState(),"UFS"); 00021 00022 _binnedHistos_y_pT.addHistogram( 8.9, 9.0, bookHisto1D(1, 1, 1)); 00023 _binnedHistos_y_pT.addHistogram( 9.0, 9.2, bookHisto1D(2, 1, 1)); 00024 _binnedHistos_y_pT.addHistogram( 9.2, 9.4, bookHisto1D(3, 1, 1)); 00025 _binnedHistos_y_pT.addHistogram( 9.4, 9.6, bookHisto1D(4, 1, 1)); 00026 _binnedHistos_y_pT.addHistogram( 9.6, 10.0, bookHisto1D(5, 1, 1)); 00027 _binnedHistos_y_pT.addHistogram(10.0, 11.0, bookHisto1D(6, 1, 1)); 00028 } 00029 00030 00031 void analyze(const Event& event) { 00032 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(event, "UFS"); 00033 00034 const double weight = event.weight(); 00035 const double dphi = TWOPI; 00036 00037 foreach (const Particle& p, ufs.particles()) { 00038 if (p.pid() == 111) { 00039 double pT = p.pT(); 00040 double y = p.rapidity(); 00041 00042 if (pT > 0.6*GeV) continue; 00043 00044 const double scaled_weight = weight/(dphi*pT/GeV); 00045 _binnedHistos_y_pT.fill(y, pT/GeV, scaled_weight); 00046 } 00047 } 00048 } 00049 00050 00051 void finalize() { 00052 _binnedHistos_y_pT.scale( 1./sumOfWeights() , this); 00053 } 00054 00055 private: 00056 00057 BinnedHistogram<double> _binnedHistos_y_pT; 00058 00059 }; 00060 00061 00062 // The hook for the plugin system 00063 DECLARE_RIVET_PLUGIN(LHCF_2012_I1115479); 00064 00065 } Generated on Tue Mar 24 2015 17:35:27 for The Rivet MC analysis system by ![]() |