ATLAS_2014_I1325553.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 #include "Rivet/Tools/BinnedHistogram.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// Jet mass as a function of ystar 00011 class ATLAS_2014_I1325553 : public Analysis { 00012 public: 00013 00014 /// Constructor 00015 ATLAS_2014_I1325553() 00016 : Analysis("ATLAS_2014_I1325553") 00017 { } 00018 00019 00020 /// @name Analysis methods 00021 //@{ 00022 00023 /// Book histograms and initialise projections before the run 00024 void init() { 00025 00026 const FinalState fs; 00027 addProjection(fs,"FinalState"); 00028 00029 FastJets fj04(fs, FastJets::ANTIKT, 0.4); 00030 fj04.useInvisibles(); 00031 addProjection(fj04, "AntiKT04"); 00032 00033 FastJets fj06(fs, FastJets::ANTIKT, 0.6); 00034 fj06.useInvisibles(); 00035 addProjection(fj06, "AntiKT06"); 00036 00037 double ybins[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0}; 00038 00039 size_t ptDsOffset(0); 00040 for (size_t alg = 0; alg < 2; ++alg) { 00041 for (size_t i = 0; i < 6; ++i) { 00042 _pt[alg].addHistogram(ybins[i], ybins[i + 1], bookHisto1D(1 + ptDsOffset, 1, i + 1)); 00043 } 00044 ptDsOffset += 1; 00045 } 00046 } 00047 00048 00049 /// Perform the per-event analysis 00050 void analyze(const Event& event) { 00051 Jets jetAr[2]; 00052 jetAr[AKT4] = applyProjection<FastJets>(event, "AntiKT04").jetsByPt(Cuts::pT > 100*GeV && Cuts::absrap < 3.0); 00053 jetAr[AKT6] = applyProjection<FastJets>(event, "AntiKT06").jetsByPt(Cuts::pT > 100*GeV && Cuts::absrap < 3.0); 00054 00055 // Loop over jet "radii" used in analysis 00056 for (size_t alg = 0; alg < 2; ++alg) { 00057 00058 // fill the 1D pt histograms with all the jets passing the cuts 00059 foreach (const Jet& jet, jetAr[alg]) { 00060 const double absrap = jet.absrap(); 00061 if (absrap < 3.0) { 00062 const double pt = jet.pT(); 00063 if (pt/GeV > 100*GeV) { 00064 _pt[alg].fill(absrap, pt/GeV, event.weight()); 00065 } 00066 } 00067 else { 00068 cout << "absrap: " << absrap << endl; 00069 abort(); 00070 } 00071 } 00072 } 00073 } 00074 00075 00076 /// Normalise histograms etc., after the run 00077 void finalize() { 00078 00079 00080 /// Print summary info 00081 const double xs_pb( crossSection() / picobarn ); 00082 const double sumW( sumOfWeights() ); 00083 const double xs_norm_factor( xs_pb / sumW ); 00084 MSG_INFO( "Cross-Section/pb : " << xs_pb ); 00085 MSG_INFO( "Sum of weights : " << sumW ); 00086 MSG_INFO( "nEvents : " << numEvents() ); 00087 00088 for (size_t alg = 0; alg < 2; ++alg) { 00089 _pt[alg].scale(xs_norm_factor, this); 00090 } 00091 } 00092 00093 //@} 00094 00095 00096 private: 00097 00098 // Data members like post-cuts event weight counters go here 00099 enum Alg { AKT4=0, AKT6=1 }; 00100 00101 /// The inclusive jet spectrum binned in rapidity for akt6 and akt4 jets (array index is jet type from enum above) 00102 BinnedHistogram<double> _pt[2]; 00103 00104 }; 00105 00106 00107 // The hook for the plugin system 00108 DECLARE_RIVET_PLUGIN(ATLAS_2014_I1325553); 00109 00110 } Generated on Tue Mar 24 2015 17:35:25 for The Rivet MC analysis system by ![]() |