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