ATLAS_2011_S9128077.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 00009 class ATLAS_2011_S9128077 : public Analysis { 00010 public: 00011 00012 /// Constructor 00013 ATLAS_2011_S9128077() 00014 : Analysis("ATLAS_2011_S9128077") 00015 { } 00016 00017 00018 /// @name Analysis methods 00019 //@{ 00020 00021 /// Book histograms and initialise projections before the run 00022 void init() { 00023 00024 // Projections 00025 const FinalState fs; 00026 FastJets j4(fs, FastJets::ANTIKT, 0.4); 00027 j4.useInvisibles(); 00028 addProjection(j4, "AntiKtJets04"); 00029 FastJets j6(fs, FastJets::ANTIKT, 0.6); 00030 j6.useInvisibles(); 00031 addProjection(j6, "AntiKtJets06"); 00032 00033 // Persistent histograms 00034 _h_jet_multi_inclusive = bookHisto1D(1, 1, 1); 00035 _h_jet_multi_ratio = bookScatter2D(2, 1, 1); 00036 _h_jet_pT.resize(4); 00037 _h_jet_pT[0] = bookHisto1D(3, 1, 1); 00038 _h_jet_pT[1] = bookHisto1D(4, 1, 1); 00039 _h_jet_pT[2] = bookHisto1D(5, 1, 1); 00040 _h_jet_pT[3] = bookHisto1D(6, 1, 1); 00041 _h_HT_2 = bookHisto1D(7, 1, 1); 00042 _h_HT_3 = bookHisto1D(8, 1, 1); 00043 _h_HT_4 = bookHisto1D(9, 1, 1); 00044 // 00045 _h_pTlead_R06_60_ratio = bookScatter2D(10, 1, 1); 00046 _h_pTlead_R06_80_ratio = bookScatter2D(11, 1, 1); 00047 _h_pTlead_R06_110_ratio = bookScatter2D(12, 1, 1); 00048 _h_pTlead_R04_60_ratio = bookScatter2D(13, 1, 1); 00049 _h_pTlead_R04_80_ratio = bookScatter2D(14, 1, 1); 00050 _h_pTlead_R04_110_ratio = bookScatter2D(15, 1, 1); 00051 _h_HT2_R06_ratio = bookScatter2D(16, 1, 1); 00052 _h_HT2_R04_ratio = bookScatter2D(17, 1, 1); 00053 00054 // Temporary histograms to be divided for the dsigma3/dsigma2 ratios 00055 _h_tmp_pTlead_R06_60_2 = Histo1D(refData(10, 1, 1)); 00056 _h_tmp_pTlead_R06_80_2 = Histo1D(refData(11, 1, 1)); 00057 _h_tmp_pTlead_R06_110_2 = Histo1D(refData(12, 1, 1)); 00058 _h_tmp_pTlead_R06_60_3 = Histo1D(refData(10, 1, 1)); 00059 _h_tmp_pTlead_R06_80_3 = Histo1D(refData(11, 1, 1)); 00060 _h_tmp_pTlead_R06_110_3 = Histo1D(refData(12, 1, 1)); 00061 // 00062 _h_tmp_pTlead_R04_60_2 = Histo1D(refData(13, 1, 1)); 00063 _h_tmp_pTlead_R04_80_2 = Histo1D(refData(14, 1, 1)); 00064 _h_tmp_pTlead_R04_110_2 = Histo1D(refData(15, 1, 1)); 00065 _h_tmp_pTlead_R04_60_3 = Histo1D(refData(13, 1, 1)); 00066 _h_tmp_pTlead_R04_80_3 = Histo1D(refData(14, 1, 1)); 00067 _h_tmp_pTlead_R04_110_3 = Histo1D(refData(15, 1, 1)); 00068 // 00069 _h_tmp_HT2_R06_2 = Histo1D(refData(16, 1, 1)); 00070 _h_tmp_HT2_R06_3 = Histo1D(refData(16, 1, 1)); 00071 _h_tmp_HT2_R04_2 = Histo1D(refData(17, 1, 1)); 00072 _h_tmp_HT2_R04_3 = Histo1D(refData(17, 1, 1)); 00073 } 00074 00075 00076 /// Perform the per-event analysis 00077 void analyze(const Event& event) { 00078 const double weight = event.weight(); 00079 00080 vector<FourMomentum> jets04; 00081 foreach (const Jet& jet, applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(60.0*GeV)) { 00082 if (jet.abseta() < 2.8) { 00083 jets04.push_back(jet.momentum()); 00084 } 00085 } 00086 00087 if (jets04.size() > 1 && jets04[0].pT() > 80.0*GeV) { 00088 for (size_t i = 2; i <= jets04.size(); ++i) { 00089 _h_jet_multi_inclusive->fill(i, weight); 00090 } 00091 00092 double HT = 0.0; 00093 for (size_t i = 0; i < jets04.size(); ++i) { 00094 if (i < _h_jet_pT.size()) _h_jet_pT[i]->fill(jets04[i].pT(), weight); 00095 HT += jets04[i].pT(); 00096 } 00097 00098 if (jets04.size() >= 2) _h_HT_2->fill(HT, weight); 00099 if (jets04.size() >= 3) _h_HT_3->fill(HT, weight); 00100 if (jets04.size() >= 4) _h_HT_4->fill(HT, weight); 00101 00102 double pT1(jets04[0].pT()), pT2(jets04[1].pT()); 00103 double HT2 = pT1 + pT2; 00104 if (jets04.size() >= 2) { 00105 _h_tmp_HT2_R04_2.fill(HT2, weight); 00106 _h_tmp_pTlead_R04_60_2.fill(pT1, weight); 00107 if (pT2 > 80.0*GeV) _h_tmp_pTlead_R04_80_2.fill(pT1, weight); 00108 if (pT2 > 110.0*GeV) _h_tmp_pTlead_R04_110_2.fill(pT1, weight); 00109 } 00110 if (jets04.size() >= 3) { 00111 double pT3(jets04[2].pT()); 00112 _h_tmp_HT2_R04_3.fill(HT2, weight); 00113 _h_tmp_pTlead_R04_60_3.fill(pT1, weight); 00114 if (pT3 > 80.0*GeV) _h_tmp_pTlead_R04_80_3.fill(pT1, weight); 00115 if (pT3 > 110.0*GeV) _h_tmp_pTlead_R04_110_3.fill(pT1, weight); 00116 } 00117 } 00118 00119 /// @todo It'd be better to avoid duplicating 95% of the code! 00120 vector<FourMomentum> jets06; 00121 foreach (const Jet& jet, applyProjection<FastJets>(event, "AntiKtJets06").jetsByPt(60.0*GeV)) { 00122 if (jet.abseta() < 2.8) { 00123 jets06.push_back(jet.momentum()); 00124 } 00125 } 00126 if (jets06.size() > 1 && jets06[0].pT() > 80.0*GeV) { 00127 double pT1(jets06[0].pT()), pT2(jets06[1].pT()); 00128 double HT2 = pT1 + pT2; 00129 if (jets06.size() >= 2) { 00130 _h_tmp_HT2_R06_2.fill(HT2, weight); 00131 _h_tmp_pTlead_R06_60_2.fill(pT1, weight); 00132 if (pT2 > 80.0*GeV) _h_tmp_pTlead_R06_80_2.fill(pT1, weight); 00133 if (pT2 > 110.0*GeV) _h_tmp_pTlead_R06_110_2.fill(pT1, weight); 00134 } 00135 if (jets06.size() >= 3) { 00136 double pT3(jets06[2].pT()); 00137 _h_tmp_HT2_R06_3.fill(HT2, weight); 00138 _h_tmp_pTlead_R06_60_3.fill(pT1, weight); 00139 if (pT3 > 80.0*GeV) _h_tmp_pTlead_R06_80_3.fill(pT1, weight); 00140 if (pT3 > 110.0*GeV) _h_tmp_pTlead_R06_110_3.fill(pT1, weight); 00141 } 00142 } 00143 00144 } 00145 00146 00147 /// Normalise histograms etc., after the run 00148 void finalize() { 00149 00150 // Fill inclusive jet multiplicity ratio 00151 Histo1D temphisto(refData(2, 1, 1)); 00152 for (size_t b = 0; b < temphisto.numBins(); ++b) { 00153 if (_h_jet_multi_inclusive->bin(b).sumW() != 0) { 00154 const double x = temphisto.bin(b).xMid(); 00155 const double ex = temphisto.bin(b).xWidth()/2.; 00156 const double val = _h_jet_multi_inclusive->bin(b+1).sumW() / _h_jet_multi_inclusive->bin(b).sumW(); 00157 const double err = ( _h_jet_multi_inclusive->bin(b+1).relErr() + _h_jet_multi_inclusive->bin(b).relErr() ) * val; 00158 _h_jet_multi_ratio->addPoint(x, val, ex, err); 00159 } 00160 } 00161 00162 // Normalize std histos 00163 scale(_h_jet_multi_inclusive, crossSectionPerEvent()); 00164 scale(_h_jet_pT[0], crossSectionPerEvent()); 00165 scale(_h_jet_pT[1], crossSectionPerEvent()); 00166 scale(_h_jet_pT[2], crossSectionPerEvent()); 00167 scale(_h_jet_pT[3], crossSectionPerEvent()); 00168 scale(_h_HT_2, crossSectionPerEvent()); 00169 scale(_h_HT_3, crossSectionPerEvent()); 00170 scale(_h_HT_4, crossSectionPerEvent()); 00171 00172 /// Create ratio histograms 00173 divide(_h_tmp_pTlead_R06_60_3,_h_tmp_pTlead_R06_60_2, _h_pTlead_R06_60_ratio); 00174 divide(_h_tmp_pTlead_R06_80_3,_h_tmp_pTlead_R06_80_2, _h_pTlead_R06_80_ratio); 00175 divide(_h_tmp_pTlead_R06_110_3,_h_tmp_pTlead_R06_110_2, _h_pTlead_R06_110_ratio); 00176 divide(_h_tmp_pTlead_R04_60_3,_h_tmp_pTlead_R04_60_2, _h_pTlead_R04_60_ratio); 00177 divide(_h_tmp_pTlead_R04_80_3,_h_tmp_pTlead_R04_80_2, _h_pTlead_R04_80_ratio); 00178 divide(_h_tmp_pTlead_R04_110_3,_h_tmp_pTlead_R04_110_2, _h_pTlead_R04_110_ratio); 00179 divide(_h_tmp_HT2_R06_3,_h_tmp_HT2_R06_2, _h_HT2_R06_ratio); 00180 divide(_h_tmp_HT2_R04_3,_h_tmp_HT2_R04_2, _h_HT2_R04_ratio); 00181 } 00182 00183 //@} 00184 00185 00186 private: 00187 00188 /// @name Histograms 00189 //@{ 00190 Histo1DPtr _h_jet_multi_inclusive; 00191 Scatter2DPtr _h_jet_multi_ratio; 00192 vector<Histo1DPtr> _h_jet_pT; 00193 Histo1DPtr _h_HT_2; 00194 Histo1DPtr _h_HT_3; 00195 Histo1DPtr _h_HT_4; 00196 //@} 00197 00198 /// @name Ratio histograms 00199 //@{ 00200 Scatter2DPtr _h_pTlead_R06_60_ratio, _h_pTlead_R06_80_ratio, _h_pTlead_R06_110_ratio; 00201 Scatter2DPtr _h_pTlead_R04_60_ratio, _h_pTlead_R04_80_ratio, _h_pTlead_R04_110_ratio; 00202 Scatter2DPtr _h_HT2_R06_ratio, _h_HT2_R04_ratio; 00203 //@} 00204 00205 /// @name Temporary histograms to be divided for the dsigma3/dsigma2 ratios 00206 //@{ 00207 Histo1D _h_tmp_pTlead_R06_60_2, _h_tmp_pTlead_R06_80_2, _h_tmp_pTlead_R06_110_2; 00208 Histo1D _h_tmp_pTlead_R06_60_3, _h_tmp_pTlead_R06_80_3, _h_tmp_pTlead_R06_110_3; 00209 Histo1D _h_tmp_pTlead_R04_60_2, _h_tmp_pTlead_R04_80_2, _h_tmp_pTlead_R04_110_2; 00210 Histo1D _h_tmp_pTlead_R04_60_3, _h_tmp_pTlead_R04_80_3, _h_tmp_pTlead_R04_110_3; 00211 Histo1D _h_tmp_HT2_R06_2, _h_tmp_HT2_R06_3, _h_tmp_HT2_R04_2, _h_tmp_HT2_R04_3; 00212 //@} 00213 00214 }; 00215 00216 00217 00218 // The hook for the plugin system 00219 DECLARE_RIVET_PLUGIN(ATLAS_2011_S9128077); 00220 00221 00222 } Generated on Wed Oct 7 2015 12:09:10 for The Rivet MC analysis system by ![]() |