ATLAS_2012_I1082936.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/FastJets.hh" 00004 #include "Rivet/Tools/BinnedHistogram.hh" 00005 #include "Rivet/Projections/FinalState.hh" 00006 00007 namespace Rivet { 00008 00009 00010 class ATLAS_2012_I1082936 : public Analysis { 00011 public: 00012 00013 /// @name Constructors etc. 00014 //@{ 00015 00016 /// Constructor 00017 ATLAS_2012_I1082936() 00018 : Analysis("ATLAS_2012_I1082936") 00019 { 00020 } 00021 00022 //@} 00023 00024 00025 public: 00026 00027 /// @name Analysis methods 00028 //@{ 00029 00030 /// Book histograms and initialise projections before the run 00031 void init() { 00032 00033 const FinalState fs; 00034 addProjection(fs,"FinalState"); 00035 00036 FastJets fj04(fs, FastJets::ANTIKT, 0.4); 00037 fj04.useInvisibles(); 00038 addProjection(fj04, "AntiKT04"); 00039 00040 FastJets fj06(fs, FastJets::ANTIKT, 0.6); 00041 fj06.useInvisibles(); 00042 addProjection(fj06, "AntiKT06"); 00043 00044 00045 // Histogram booking copied from the previous analysis 00046 double ybins[] = { 0.0, 0.3, 0.8, 1.2, 2.1, 2.8, 3.6, 4.4 }; 00047 double ystarbins[] = { 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.4}; 00048 00049 size_t ptDsOffset(0), massDsOffset(2); 00050 for (size_t alg = 0; alg < 2; ++alg) { 00051 for (size_t i = 0; i < 7; ++i) { 00052 _pThistos[alg].addHistogram(ybins[i], ybins[i+1], bookHisto1D(1 + ptDsOffset, 1, i+1)); 00053 } 00054 ptDsOffset += 1; 00055 00056 for (size_t i = 0; i < 9; ++i) { 00057 _mass[alg].addHistogram(ystarbins[i], ystarbins[i+1], bookHisto1D(1 + massDsOffset, 1, i+1)); 00058 } 00059 massDsOffset += 1; 00060 } 00061 } 00062 00063 /// Perform the per-event analysis 00064 void analyze(const Event& event) { 00065 const double weight = event.weight(); 00066 Jets jetAr[2]; 00067 jetAr[AKT6] = applyProjection<FastJets>(event, "AntiKT06").jetsByPt(20*GeV); 00068 jetAr[AKT4] = applyProjection<FastJets>(event, "AntiKT04").jetsByPt(20*GeV); 00069 00070 // Loop over jet "radii" used in analysis 00071 for (size_t alg = 0; alg < 2; ++alg) { 00072 // Identify dijets 00073 vector<FourMomentum> leadjets; 00074 foreach (const Jet& jet, jetAr[alg]) { 00075 const double pT = jet.pT(); 00076 const double absy = jet.absrap(); 00077 _pThistos[alg].fill(absy, pT/GeV, weight); 00078 00079 if (absy < 4.4 && leadjets.size() < 2) { 00080 if (leadjets.empty() && pT < 30*GeV) continue; 00081 leadjets.push_back(jet.momentum()); 00082 } 00083 } 00084 // Make sure we have a leading jet with pT >30 GeV and a second to leading jet with pT>20 GeV 00085 if (leadjets.size() < 2) { 00086 MSG_DEBUG("Could not find two suitable leading jets"); 00087 continue; 00088 } 00089 00090 const double y1 = leadjets[0].rapidity(); 00091 const double y2 = leadjets[1].rapidity(); 00092 const double ystar = fabs(y1-y2)/2.; 00093 const double m = (leadjets[0] + leadjets[1]).mass(); 00094 // Fill mass histogram 00095 _mass[alg].fill(ystar, m/TeV, weight); 00096 } 00097 } 00098 00099 00100 /// Normalise histograms etc., after the run 00101 void finalize() { 00102 for (size_t alg = 0; alg < 2; ++alg) { 00103 // factor 0.5 needed because it is differential in dy and not d|y| 00104 _pThistos[alg].scale(0.5*crossSectionPerEvent()/picobarn, this); 00105 _mass[alg].scale(crossSectionPerEvent()/picobarn, this); 00106 } 00107 } 00108 00109 //@} 00110 00111 00112 private: 00113 00114 // Data members like post-cuts event weight counters go here 00115 00116 enum Alg { AKT4=0, AKT6=1 }; 00117 00118 private: 00119 00120 /// The inclusive pT spectrum for akt6 and akt4 jets (array index is jet type from enum above) 00121 BinnedHistogram<double> _pThistos[2]; 00122 00123 /// The di-jet mass spectrum binned in rapidity for akt6 and akt4 jets (array index is jet type from enum above) 00124 BinnedHistogram<double> _mass[2]; 00125 }; 00126 00127 // The hook for the plugin system 00128 DECLARE_RIVET_PLUGIN(ATLAS_2012_I1082936); 00129 00130 } Generated on Thu Mar 10 2016 08:29:47 for The Rivet MC analysis system by ![]() |