ATLAS_2015_I1387176.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/FastJets.hh" 00005 00006 namespace Rivet { 00007 00008 /// Rivet analysis class for ATLAS_2015_I1387176 dataset 00009 class ATLAS_2015_I1387176 : public Analysis { 00010 public: 00011 00012 /// Constructor 00013 ATLAS_2015_I1387176() 00014 : Analysis("ATLAS_2015_I1387176") { } 00015 00016 00017 /// Initialization, called once before running 00018 void init() { 00019 // Projections 00020 FastJets jets(FinalState(), FastJets::ANTIKT, 0.4); 00021 jets.useInvisibles(); 00022 addProjection(jets, "Jets"); 00023 00024 // Book histograms 00025 _hist_EEC = bookHisto1D(1, 1, 1); 00026 _hist_AEEC = bookScatter2D(2, 1, 1); 00027 00028 // add dummy histogram for heterogenous merging 00029 string hname = "d01-x01-y01"; 00030 const Scatter2D& ref = refData(hname); 00031 hname = "d01-x01-y02"; 00032 _hist_dummy = bookHisto1D(hname, ref); 00033 } 00034 00035 void analyze(const Event& event) { 00036 00037 const double evtWeight = event.weight(); 00038 const Jets& jets = applyProjection<FastJets>(event, "Jets").jetsByPt(Cuts::pT > 50.0*GeV && Cuts::abseta < 2.5); 00039 00040 if (jets.size() < 2) vetoEvent; 00041 if (jets[0].pT() + jets[1].pT() < 500*GeV) vetoEvent; 00042 00043 double sumEt = 0.0; 00044 foreach (Jet j, jets) sumEt += j.E() / cosh(j.eta()); 00045 00046 foreach (Jet j1, jets) { 00047 double et1 = j1.E() / cosh(j1.eta()); 00048 00049 foreach (Jet j2, jets) { 00050 double et2 = j2.E() / cosh(j2.eta()); 00051 double etWeight = et1 * et2 / ( sumEt * sumEt ); 00052 double dPhi = deltaPhi(j1, j2); 00053 double cosPhi = cos(dPhi); 00054 if (cosPhi == 1.0) cosPhi = 0.9999; 00055 00056 _hist_EEC->fill(cosPhi, etWeight * evtWeight); 00057 _hist_dummy->fill(cosPhi, etWeight * evtWeight); 00058 } 00059 } 00060 } 00061 00062 void finalize() { 00063 00064 scale(_hist_dummy, crossSectionPerEvent()); 00065 normalize(_hist_EEC); 00066 00067 vector<Point2D> points; 00068 size_t nBins = _hist_EEC->numBins(); 00069 for (size_t k = 0; k < nBins/2; ++k) { 00070 double x = _hist_EEC->bin(k).midpoint(); 00071 double y = _hist_EEC->bin(k).height() - _hist_EEC->bin(nBins-(k+1)).height(); 00072 double ex = _hist_EEC->bin(k).xWidth()/2; 00073 double e1 = _hist_EEC->bin(k).heightErr(); 00074 double e2 = _hist_EEC->bin(nBins-(k+1)).heightErr(); 00075 double ey = sqrt( e1 * e1 + e2 * e2 ); 00076 points.push_back(Point2D(x, y, ex, ey)); 00077 } 00078 00079 _hist_AEEC->addPoints(points); 00080 } 00081 00082 private: 00083 Histo1DPtr _hist_EEC; 00084 Histo1DPtr _hist_dummy; 00085 Scatter2DPtr _hist_AEEC; 00086 }; 00087 00088 00089 00090 // The hook for the plugin system 00091 DECLARE_RIVET_PLUGIN(ATLAS_2015_I1387176); 00092 00093 } Generated on Wed Oct 7 2015 12:09:11 for The Rivet MC analysis system by ![]() |