CMS_2013_I1256943.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ZFinder.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 #include "Rivet/Projections/UnstableFinalState.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// CMS cross-section and angular correlations in Z boson + b-hadrons events at 7 TeV 00011 class CMS_2013_I1256943 : public Analysis { 00012 public: 00013 00014 /// Constructor 00015 CMS_2013_I1256943() 00016 : Analysis("CMS_2013_I1256943") 00017 { } 00018 00019 00020 /// Add projections and book histograms 00021 void init() { 00022 _sumW = 0; 00023 _sumW50 = 0; 00024 _sumWpT = 0; 00025 00026 FinalState fs(Cuts::abseta < 2.4 && Cuts::pT > 20*GeV); 00027 addProjection(fs, "FS"); 00028 00029 UnstableFinalState ufs(Cuts::abseta < 2 && Cuts::pT > 15*GeV); 00030 addProjection(ufs, "UFS"); 00031 00032 Cut zetacut = Cuts::abseta < 2.4; 00033 00034 ZFinder zfindermu(fs, zetacut, PID::MUON, 81.0*GeV, 101.0*GeV, 0.1, ZFinder::NOCLUSTER, ZFinder::TRACK, 91.2*GeV); 00035 addProjection(zfindermu, "ZFinderMu"); 00036 00037 ZFinder zfinderel(fs, zetacut, PID::ELECTRON, 81.0*GeV, 101.0*GeV, 0.1, ZFinder::NOCLUSTER, ZFinder::TRACK, 91.2*GeV); 00038 addProjection(zfinderel, "ZFinderEl"); 00039 00040 00041 // Histograms in non-boosted region of Z pT 00042 _h_dR_BB = bookHisto1D(1, 1, 1); 00043 _h_dphi_BB = bookHisto1D(2, 1, 1); 00044 _h_min_dR_ZB = bookHisto1D(3, 1, 1); 00045 _h_A_ZBB = bookHisto1D(4, 1, 1); 00046 00047 // Histograms in boosted region of Z pT (pT > 50 GeV) 00048 _h_dR_BB_boost = bookHisto1D(5, 1, 1); 00049 _h_dphi_BB_boost = bookHisto1D(6, 1, 1); 00050 _h_min_dR_ZB_boost = bookHisto1D(7, 1, 1); 00051 _h_A_ZBB_boost = bookHisto1D(8, 1, 1); 00052 00053 _h_min_ZpT = bookHisto1D(9,1,1); 00054 } 00055 00056 00057 /// Do the analysis 00058 void analyze(const Event& e) { 00059 vector<FourMomentum> Bmom; 00060 00061 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS"); 00062 const ZFinder& zfindermu = applyProjection<ZFinder>(e, "ZFinderMu"); 00063 const ZFinder& zfinderel = applyProjection<ZFinder>(e, "ZFinderEl"); 00064 00065 // Look for a Z --> mu+ mu- event in the final state 00066 if (zfindermu.empty() && zfinderel.empty()) vetoEvent; 00067 00068 const Particles& z = !zfindermu.empty() ? zfindermu.bosons() : zfinderel.bosons(); 00069 const bool is_boosted = ( z[0].pT() > 50*GeV ); 00070 00071 // Loop over the unstable particles 00072 foreach (const Particle& p, ufs.particles()) { 00073 const PdgId pid = p.pid(); 00074 00075 // Look for particles with a bottom quark 00076 if (PID::hasBottom(pid)) { 00077 00078 bool good_B = false; 00079 const GenParticle* pgen = p.genParticle(); 00080 const GenVertex* vgen = pgen -> end_vertex(); 00081 00082 // Loop over the decay products of each unstable particle. 00083 // Look for a couple of B hadrons. 00084 for (GenVertex::particles_out_const_iterator it = vgen->particles_out_const_begin(); it != vgen->particles_out_const_end(); ++it) { 00085 // If the particle produced has a bottom quark do not count it and go to the next loop cycle. 00086 if (!( PID::hasBottom( (*it)->pdg_id() ) ) ) { 00087 good_B = true; 00088 continue; 00089 } else { 00090 good_B = false; 00091 break; 00092 } 00093 } 00094 if (good_B ) Bmom.push_back( p.momentum() ); 00095 } 00096 else continue; 00097 } 00098 00099 // If there are more than two B's in the final state veto the event 00100 if (Bmom.size() != 2 ) vetoEvent; 00101 00102 // Calculate the observables 00103 double dphiBB = fabs(Bmom[0].phi() - Bmom[1].phi()); 00104 double dRBB = deltaR(Bmom[0], Bmom[1]); 00105 00106 const FourMomentum& pZ = z[0].momentum(); 00107 const bool closest_B = ( deltaR(pZ, Bmom[0]) < deltaR(pZ, Bmom[1]) ); 00108 const double mindR_ZB = closest_B ? deltaR(pZ, Bmom[0]) : deltaR(pZ, Bmom[1]); 00109 const double maxdR_ZB = closest_B ? deltaR(pZ, Bmom[1]) : deltaR(pZ, Bmom[0]); 00110 const double AZBB = ( maxdR_ZB - mindR_ZB ) / ( maxdR_ZB + mindR_ZB ); 00111 00112 // Get event weight for histogramming 00113 const double weight = e.weight(); 00114 00115 // Fill the histograms in the non-boosted region 00116 _h_dphi_BB->fill(dphiBB, weight); 00117 _h_dR_BB->fill(dRBB, weight); 00118 _h_min_dR_ZB->fill(mindR_ZB, weight); 00119 _h_A_ZBB->fill(AZBB, weight); 00120 _sumW += weight; 00121 _sumWpT += weight; 00122 00123 // Fill the histograms in the boosted region 00124 if (is_boosted) { 00125 _sumW50 += weight; 00126 _h_dphi_BB_boost->fill(dphiBB, weight); 00127 _h_dR_BB_boost->fill(dRBB, weight); 00128 _h_min_dR_ZB_boost->fill(mindR_ZB, weight); 00129 _h_A_ZBB_boost->fill(AZBB, weight); 00130 } 00131 00132 // Fill Z pT (cumulative) histogram 00133 _h_min_ZpT->fill(0, weight); 00134 if (pZ.pT() > 40*GeV ) { 00135 _sumWpT += weight; 00136 _h_min_ZpT->fill(40, weight); 00137 } 00138 if (pZ.pT() > 80*GeV ) { 00139 _sumWpT += weight; 00140 _h_min_ZpT->fill(80, weight); 00141 } 00142 if (pZ.pT() > 120*GeV ) { 00143 _sumWpT += weight; 00144 _h_min_ZpT->fill(120, weight); 00145 } 00146 00147 Bmom.clear(); 00148 } 00149 00150 00151 /// Finalize 00152 void finalize() { 00153 00154 // Normalize excluding overflow bins (d'oh) 00155 normalize(_h_dR_BB, 0.7*crossSection()*_sumW/sumOfWeights(), false); // d01-x01-y01 00156 normalize(_h_dphi_BB, 0.53*crossSection()*_sumW/sumOfWeights(), false); // d02-x01-y01 00157 normalize(_h_min_dR_ZB, 0.84*crossSection()*_sumW/sumOfWeights(), false); // d03-x01-y01 00158 normalize(_h_A_ZBB, 0.2*crossSection()*_sumW/sumOfWeights(), false); // d04-x01-y01 00159 00160 normalize(_h_dR_BB_boost, 0.84*crossSection()*_sumW50/sumOfWeights(), false); // d05-x01-y01 00161 normalize(_h_dphi_BB_boost, 0.63*crossSection()*_sumW50/sumOfWeights(), false); // d06-x01-y01 00162 normalize(_h_min_dR_ZB_boost, 1*crossSection()*_sumW50/sumOfWeights(), false); // d07-x01-y01 00163 normalize(_h_A_ZBB_boost, 0.25*crossSection()*_sumW50/sumOfWeights(), false); // d08-x01-y01 00164 00165 normalize(_h_min_ZpT, 40*crossSection()*_sumWpT/sumOfWeights(), false); // d09-x01-y01 00166 } 00167 00168 00169 private: 00170 00171 /// @name Weight counters 00172 //@{ 00173 double _sumW, _sumW50, _sumWpT; 00174 //@} 00175 00176 /// @name Histograms 00177 //@{ 00178 Histo1DPtr _h_dphi_BB, _h_dR_BB, _h_min_dR_ZB, _h_A_ZBB; 00179 Histo1DPtr _h_dphi_BB_boost, _h_dR_BB_boost, _h_min_dR_ZB_boost, _h_A_ZBB_boost, _h_min_ZpT; 00180 //@} 00181 00182 }; 00183 00184 00185 // Hook for the plugin system 00186 DECLARE_RIVET_PLUGIN(CMS_2013_I1256943); 00187 00188 } Generated on Wed Oct 7 2015 12:09:12 for The Rivet MC analysis system by ![]() |