CDF_2008_S8095620.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/Logging.hh" 00004 #include "Rivet/RivetYODA.hh" 00005 #include "Rivet/Tools/ParticleIdUtils.hh" 00006 #include "Rivet/Projections/FastJets.hh" 00007 #include "Rivet/Projections/FinalState.hh" 00008 #include "Rivet/Projections/VetoedFinalState.hh" 00009 #include "Rivet/Projections/InvMassFinalState.hh" 00010 00011 namespace Rivet { 00012 00013 00014 /// @brief CDF Run II Z + b-jet cross-section measurement 00015 class CDF_2008_S8095620 : public Analysis { 00016 public: 00017 00018 /// Constructor. 00019 /// jet cuts: |eta| <= 1.5 00020 CDF_2008_S8095620() 00021 : Analysis("CDF_2008_S8095620"), 00022 _Rjet(0.7), _JetPtCut(20.), _JetEtaCut(1.5), _Lep1PtCut(18.), _Lep2PtCut(10.), _LepEtaCut(3.2), 00023 _sumWeightSelected(0.0) 00024 { 00025 } 00026 00027 00028 /// @name Analysis methods 00029 //@{ 00030 00031 void init() { 00032 // Set up projections 00033 const FinalState fs(-3.2, 3.2); 00034 addProjection(fs, "FS"); 00035 // Create a final state with any e+e- or mu+mu- pair with 00036 // invariant mass 76 -> 106 GeV and ET > 18 (Z decay products) 00037 vector<pair<PdgId,PdgId> > vids; 00038 vids.push_back(make_pair(ELECTRON, POSITRON)); 00039 vids.push_back(make_pair(MUON, ANTIMUON)); 00040 FinalState fs2(-3.2, 3.2); 00041 InvMassFinalState invfs(fs2, vids, 76*GeV, 106*GeV); 00042 addProjection(invfs, "INVFS"); 00043 // Make a final state without the Z decay products for jet clustering 00044 VetoedFinalState vfs(fs); 00045 vfs.addVetoOnThisFinalState(invfs); 00046 addProjection(vfs, "VFS"); 00047 addProjection(FastJets(vfs, FastJets::CDFMIDPOINT, 0.7), "Jets"); 00048 00049 // Book histograms 00050 _dStot = bookHisto1D(1, 1, 1); 00051 _dSdET = bookHisto1D(2, 1, 1); 00052 _dSdETA = bookHisto1D(3, 1, 1); 00053 _dSdZpT = bookHisto1D(4, 1, 1); 00054 _dSdNJet = bookHisto1D(5, 1, 1); 00055 _dSdNbJet = bookHisto1D(6, 1, 1); 00056 } 00057 00058 00059 // Do the analysis 00060 void analyze(const Event& event) { 00061 // Check we have an l+l- pair that passes the kinematic cuts 00062 // Get the Z decay products (mu+mu- or e+e- pair) 00063 const InvMassFinalState& invMassFinalState = applyProjection<InvMassFinalState>(event, "INVFS"); 00064 const ParticleVector& ZDecayProducts = invMassFinalState.particles(); 00065 00066 // make sure we have 2 Z decay products (mumu or ee) 00067 if (ZDecayProducts.size() < 2) vetoEvent; 00068 //new cuts 00069 double Lep1Pt = ZDecayProducts[0].momentum().perp(); 00070 double Lep2Pt = ZDecayProducts[1].momentum().perp(); 00071 double Lep1Eta = fabs(ZDecayProducts[0].momentum().rapidity()); 00072 double Lep2Eta = fabs(ZDecayProducts[1].momentum().rapidity()); 00073 00074 if (Lep1Eta > _LepEtaCut || Lep2Eta > _LepEtaCut) vetoEvent; 00075 00076 if (abs(ZDecayProducts[0].pdgId())==13 && 00077 ((Lep1Eta > 1.5 || Lep2Eta > 1.5) || (Lep1Eta > 1.0 && Lep2Eta > 1.0))) { 00078 vetoEvent; 00079 } 00080 00081 if (Lep1Pt > Lep2Pt) { 00082 if (Lep1Pt < _Lep1PtCut || Lep2Pt < _Lep2PtCut) vetoEvent; 00083 } 00084 else { 00085 if (Lep1Pt < _Lep2PtCut || Lep2Pt < _Lep1PtCut) vetoEvent; 00086 } 00087 00088 _sumWeightSelected += event.weight(); 00089 // @todo: write out a warning if there are more than two decay products 00090 FourMomentum Zmom = ZDecayProducts[0].momentum() + ZDecayProducts[1].momentum(); 00091 00092 // Put all b-quarks in a vector 00093 ParticleVector bquarks; 00094 foreach (const GenParticle* p, particles(event.genEvent())) { 00095 if (fabs(p->pdg_id()) == BQUARK) { 00096 bquarks += Particle(*p); 00097 } 00098 } 00099 00100 // Get jets 00101 const FastJets& jetpro = applyProjection<FastJets>(event, "Jets"); 00102 MSG_DEBUG("Jet multiplicity before any pT cut = " << jetpro.size()); 00103 00104 const PseudoJets& jets = jetpro.pseudoJetsByPt(); 00105 MSG_DEBUG("jetlist size = " << jets.size()); 00106 00107 int numBJet = 0; 00108 int numJet = 0; 00109 // for each b-jet plot the ET and the eta of the jet, normalise to the total cross section at the end 00110 // for each event plot N jet and pT(Z), normalise to the total cross section at the end 00111 for (PseudoJets::const_iterator jt = jets.begin(); jt != jets.end(); ++jt) { 00112 // select jets that pass the kinematic cuts 00113 if (jt->perp() > _JetPtCut && fabs(jt->rapidity()) <= _JetEtaCut) { 00114 numJet++; 00115 // does the jet contain a b-quark? 00116 bool bjet = false; 00117 foreach (const Particle& bquark, bquarks) { 00118 if (deltaR(jt->rapidity(), jt->phi(), bquark.momentum().rapidity(),bquark.momentum().azimuthalAngle()) <= _Rjet) { 00119 bjet = true; 00120 break; 00121 } 00122 } // end loop around b-jets 00123 if (bjet) { 00124 numBJet++; 00125 _dSdET->fill(jt->perp(),event.weight()); 00126 _dSdETA->fill(fabs(jt->rapidity()),event.weight()); 00127 } 00128 } 00129 } // end loop around jets 00130 00131 // wasn't asking for b-jets before!!!! 00132 if(numJet > 0 && numBJet > 0) _dSdNJet->fill(numJet,event.weight()); 00133 if(numBJet > 0) { 00134 _dStot->fill(1960.0,event.weight()); 00135 _dSdNbJet->fill(numBJet,event.weight()); 00136 _dSdZpT->fill(Zmom.pT(),event.weight()); 00137 } 00138 } 00139 00140 00141 00142 // Finalize 00143 void finalize() { 00144 // normalise histograms 00145 // scale by 1 / the sum-of-weights of events that pass the Z cuts 00146 // since the cross sections are normalized to the inclusive 00147 // Z cross sections. 00148 double Scale = 1.0; 00149 if (_sumWeightSelected != 0.0) Scale = 1.0/_sumWeightSelected; 00150 scale(_dStot,Scale); 00151 scale(_dSdET,Scale); 00152 scale(_dSdETA,Scale); 00153 scale(_dSdNJet,Scale); 00154 scale(_dSdNbJet,Scale); 00155 scale(_dSdZpT,Scale); 00156 } 00157 00158 //@} 00159 00160 00161 private: 00162 00163 double _Rjet; 00164 double _JetPtCut; 00165 double _JetEtaCut; 00166 double _Lep1PtCut; 00167 double _Lep2PtCut; 00168 double _LepEtaCut; 00169 double _sumWeightSelected; 00170 00171 //@{ 00172 /// Histograms 00173 Histo1DPtr _dStot; 00174 Histo1DPtr _dSdET; 00175 Histo1DPtr _dSdETA; 00176 Histo1DPtr _dSdNJet; 00177 Histo1DPtr _dSdNbJet; 00178 Histo1DPtr _dSdZpT; 00179 00180 //@} 00181 00182 }; 00183 00184 00185 00186 // The hook for the plugin system 00187 DECLARE_RIVET_PLUGIN(CDF_2008_S8095620); 00188 00189 } Generated on Fri Dec 21 2012 15:03:39 for The Rivet MC analysis system by ![]() |