CMS_2012_I1102908.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/BinnedHistogram.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 #include "Rivet/Projections/FastJets.hh" 00006 #include <sstream> 00007 00008 namespace Rivet { 00009 00010 /// @cond 00011 inline double _invert(double x) { return (x > 0) ? 1/x : 0; } 00012 /// @endcond 00013 00014 00015 /// @brief CMS inclusive and exclusive dijet production ratio at large rapidity intervals 00016 class CMS_2012_I1102908 : public Analysis { 00017 public: 00018 00019 CMS_2012_I1102908() 00020 : Analysis("CMS_2012_I1102908") 00021 { } 00022 00023 00024 void init() { 00025 // Projections 00026 addProjection(FastJets(FinalState(), FastJets::ANTIKT, 0.5), "antikT"); 00027 00028 // Histograms 00029 /// @todo Can we manage to only register these as they are "really" created in the finalize()? 00030 _h_dijet_ratio = bookScatter2D(1, 1, 1); 00031 _h_MN_dijet_ratio = bookScatter2D(2, 1, 1); 00032 00033 // Temporary histograms (directly instantiated) 00034 _h_DeltaY_exclusive = bookHisto1D("TMP/excl",refData(1, 1, 1)); 00035 _h_DeltaY_inclusive = bookHisto1D("TMP/incl",refData(1, 1, 1)); 00036 _h_DeltaY_MN = bookHisto1D("TMP/YMN",refData(1, 1, 1)); 00037 } 00038 00039 00040 void analyze(const Event & event) { 00041 const double weight = event.weight(); 00042 00043 // Jets with pT > 35.0, -4.7 < y < 4.7 00044 const JetAlg& jet_alg = applyProjection<JetAlg>(event, "antikT"); 00045 const Jets& jets = jet_alg.jets(Cuts::pT > 35*GeV && Cuts::absrap < 4.7); 00046 00047 // Veto event if number of jets less than 2 00048 if (jets.size() < 2) return; 00049 00050 // Loop over jet pairs 00051 double deltaY_MN = 0.0; 00052 for (size_t ij1 = 0; ij1 < jets.size(); ++ij1) { 00053 for (size_t ij2 = ij1 + 1; ij2 < jets.size(); ++ij2) { 00054 const double deltaY = fabs(jets[ij1].rapidity() - jets[ij2].rapidity()); 00055 // Exclusive dijet case: 00056 if (jets.size() == 2) _h_DeltaY_exclusive->fill(deltaY, weight); 00057 // Inclusive jets case: 00058 _h_DeltaY_inclusive->fill(deltaY, weight); 00059 // Mueller-Navelet: 00060 if (deltaY > deltaY_MN) deltaY_MN = deltaY; 00061 } 00062 } 00063 _h_DeltaY_MN->fill(deltaY_MN, weight); 00064 } 00065 00066 00067 00068 void finalize() { 00069 *_h_dijet_ratio = YODA::efficiency(*_h_DeltaY_exclusive, *_h_DeltaY_inclusive); 00070 *_h_MN_dijet_ratio = YODA::efficiency(*_h_DeltaY_exclusive, *_h_DeltaY_MN); 00071 transformY(*_h_dijet_ratio, _invert); 00072 transformY(*_h_MN_dijet_ratio, _invert); 00073 } 00074 00075 00076 private: 00077 00078 /// @name Histograms 00079 //@{ 00080 Scatter2DPtr _h_dijet_ratio, _h_MN_dijet_ratio; 00081 Histo1DPtr _h_DeltaY_inclusive, _h_DeltaY_exclusive, _h_DeltaY_MN; 00082 //@} 00083 00084 }; 00085 00086 00087 DECLARE_RIVET_PLUGIN(CMS_2012_I1102908); 00088 00089 } Generated on Wed Oct 7 2015 12:09:12 for The Rivet MC analysis system by ![]() |