ATLAS_2010_CONF_2010_049.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ChargedFinalState.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 00006 namespace Rivet { 00007 00008 00009 class ATLAS_2010_CONF_2010_049 : public Analysis { 00010 public: 00011 00012 ATLAS_2010_CONF_2010_049() 00013 : Analysis("ATLAS_2010_CONF_2010_049") 00014 { } 00015 00016 00017 void init() { 00018 ChargedFinalState cfs(-1.5, 1.5, 0.5*GeV); 00019 addProjection(cfs, "CFS"); 00020 00021 FastJets jetsproj6(cfs, FastJets::ANTIKT, 0.6); 00022 addProjection(jetsproj6, "Jets6"); 00023 00024 FastJets jetsproj4(cfs, FastJets::ANTIKT, 0.4); 00025 addProjection(jetsproj4, "Jets4"); 00026 00027 for (size_t i=0 ; i<2 ; i++) { 00028 _h_xsec[i] = bookHisto1D(1+i, 1, 1); 00029 _h_frag_04_06[i] = bookHisto1D(3+i, 1, 1); 00030 _h_frag_06_10[i] = bookHisto1D(3+i, 2, 1); 00031 _h_frag_10_15[i] = bookHisto1D(3+i, 3, 1); 00032 _h_frag_15_24[i] = bookHisto1D(3+i, 4, 1); 00033 _njets_04_06[i] = 0.0; 00034 _njets_06_10[i] = 0.0; 00035 _njets_10_15[i] = 0.0; 00036 _njets_15_24[i] = 0.0; 00037 } 00038 } 00039 00040 00041 void analyze(const Event& event) { 00042 const double weight = event.weight(); 00043 00044 const FastJets & jetsproj6 = applyProjection<FastJets>(event, "Jets6"); 00045 const FastJets & jetsproj4 = applyProjection<FastJets>(event, "Jets4"); 00046 Jets alljets[2]; 00047 alljets[0] = jetsproj6.jetsByPt(4.0*GeV); 00048 alljets[1] = jetsproj4.jetsByPt(4.0*GeV); 00049 00050 for (size_t i=0 ; i<2 ; i++) { 00051 Jets jets; 00052 00053 // First we want to make sure that we only use jets within |eta|<0.57 00054 foreach (const Jet& jet, alljets[i]) { 00055 if (fabs(jet.eta())<0.57) { 00056 jets.push_back(jet); 00057 } 00058 } 00059 foreach (const Jet& jet, jets) { 00060 const double pTjet = jet.pT(); 00061 const double pjet = jet.momentum().p().mod(); 00062 _h_xsec[i]->fill(pTjet, weight); 00063 if (pTjet > 24*GeV) continue; 00064 foreach (const Particle& p, jet.particles()) { 00065 double z=p.momentum().p().mod()/pjet; 00066 if (z>0.9999) z=0.9999; // Make sure that z=1 doesn't go into overflow 00067 if (pTjet > 15*GeV) { 00068 _h_frag_15_24[i]->fill(z, weight); 00069 } 00070 else if (pTjet > 10*GeV) { 00071 _h_frag_10_15[i]->fill(z, weight); 00072 } 00073 else if (pTjet > 6*GeV) { 00074 _h_frag_06_10[i]->fill(z, weight); 00075 } 00076 else { 00077 _h_frag_04_06[i]->fill(z, weight); 00078 } 00079 } 00080 if (pTjet > 15*GeV) { 00081 _njets_15_24[i] += weight; 00082 } 00083 else if (pTjet > 10*GeV) { 00084 _njets_10_15[i] += weight; 00085 } 00086 else if (pTjet > 6*GeV) { 00087 _njets_06_10[i] += weight; 00088 } 00089 else { 00090 _njets_04_06[i] += weight; 00091 } 00092 } 00093 } 00094 } 00095 00096 void finalize() { 00097 for (size_t i=0 ; i<2 ; i++) { 00098 // deta = 2*0.57 00099 scale(_h_xsec[i], crossSection()/microbarn/sumOfWeights()/(2*0.57)); 00100 scale(_h_frag_04_06[i], 1./_njets_04_06[i]); 00101 scale(_h_frag_06_10[i], 1./_njets_06_10[i]); 00102 scale(_h_frag_10_15[i], 1./_njets_10_15[i]); 00103 scale(_h_frag_15_24[i], 1./_njets_15_24[i]); 00104 } 00105 } 00106 00107 00108 private: 00109 00110 Histo1DPtr _h_xsec[2]; 00111 Histo1DPtr _h_frag_04_06[2]; 00112 Histo1DPtr _h_frag_06_10[2]; 00113 Histo1DPtr _h_frag_10_15[2]; 00114 Histo1DPtr _h_frag_15_24[2]; 00115 double _njets_04_06[2]; 00116 double _njets_06_10[2]; 00117 double _njets_10_15[2]; 00118 double _njets_15_24[2]; 00119 }; 00120 00121 00122 00123 // The hook for the plugin system 00124 DECLARE_RIVET_PLUGIN(ATLAS_2010_CONF_2010_049); 00125 00126 } Generated on Thu Feb 6 2014 17:38:41 for The Rivet MC analysis system by 1.7.6.1 |