CDF_2008_S7541902.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/Logging.hh" 00005 #include "Rivet/Tools/ParticleIdUtils.hh" 00006 #include "Rivet/Projections/FinalState.hh" 00007 #include "Rivet/Projections/VetoedFinalState.hh" 00008 #include "Rivet/Projections/InvMassFinalState.hh" 00009 #include "Rivet/Projections/FastJets.hh" 00010 #include <algorithm> 00011 00012 namespace Rivet { 00013 00014 00015 /// @brief CDF jet pT and multiplicity distributions in W + jets events 00016 /// 00017 /// This CDF analysis provides jet pT distributions for 4 jet multiplicity bins 00018 /// as well as the jet multiplicity distribution in W + jets events. 00019 /// e-Print: arXiv:0711.4044 [hep-ex] 00020 class CDF_2008_S7541902 : public Analysis { 00021 public: 00022 00023 /// Constructor 00024 CDF_2008_S7541902() 00025 : Analysis("CDF_2008_S7541902"), 00026 _electronETCut(20.0*GeV), _electronETACut(1.1), 00027 _eTmissCut(30.0*GeV), _mTCut(20.0*GeV), 00028 _jetEtCutA(20.0*GeV), _jetEtCutB(25.0*GeV), _jetETA(2.0), 00029 _xpoint(1960.) 00030 { } 00031 00032 00033 /// @name Analysis methods 00034 //@{ 00035 00036 void init() { 00037 // Set up projections 00038 // Basic FS 00039 FinalState fs(-3.6, 3.6); 00040 addProjection(fs, "FS"); 00041 00042 // Create a final state with any e-nu pair with invariant mass 65 -> 95 GeV and ET > 20 (W decay products) 00043 vector<pair<PdgId,PdgId> > vids; 00044 vids += make_pair(ELECTRON, NU_EBAR); 00045 vids += make_pair(POSITRON, NU_E); 00046 FinalState fs2(-3.6, 3.6, 20*GeV); 00047 InvMassFinalState invfs(fs2, vids, 65*GeV, 95*GeV); 00048 addProjection(invfs, "INVFS"); 00049 00050 // Make a final state without the W decay products for jet clustering 00051 VetoedFinalState vfs(fs); 00052 vfs.addVetoOnThisFinalState(invfs); 00053 addProjection(vfs, "VFS"); 00054 addProjection(FastJets(vfs, FastJets::CDFJETCLU, 0.4), "Jets"); 00055 00056 // Book histograms 00057 for (int i = 0 ; i < 4 ; ++i) { 00058 _histJetEt[i] = bookHisto1D(i+1, 1, 1); 00059 _histJetMultRatio[i] = bookScatter2D(5 , 1, i+1); 00060 _histJetMult[i] = bookHisto1D(i+6, 1, 1); 00061 } 00062 _histJetMultNorm = bookHisto1D("norm", 1, _xpoint, _xpoint+1.); 00063 } 00064 00065 00066 /// Do the analysis 00067 void analyze(const Event& event) { 00068 // Get the W decay products (electron and neutrino) 00069 const InvMassFinalState& invMassFinalState = applyProjection<InvMassFinalState>(event, "INVFS"); 00070 const ParticleVector& wDecayProducts = invMassFinalState.particles(); 00071 00072 FourMomentum electronP, neutrinoP; 00073 bool gotElectron(false), gotNeutrino(false); 00074 foreach (const Particle& p, wDecayProducts) { 00075 FourMomentum p4 = p.momentum(); 00076 if (p4.Et() > _electronETCut && fabs(p4.eta()) < _electronETACut && abs(p.pdgId()) == ELECTRON) { 00077 electronP = p4; 00078 gotElectron = true; 00079 } 00080 else if (p4.Et() > _eTmissCut && abs(p.pdgId()) == NU_E) { 00081 neutrinoP = p4; 00082 gotNeutrino = true; 00083 } 00084 } 00085 00086 // Veto event if the electron or MET cuts fail 00087 if (!gotElectron || !gotNeutrino) vetoEvent; 00088 00089 // Veto event if the MTR cut fails 00090 double mT2 = 2.0 * ( electronP.pT()*neutrinoP.pT() - electronP.px()*neutrinoP.px() - electronP.py()*neutrinoP.py() ); 00091 if (sqrt(mT2) < _mTCut ) vetoEvent; 00092 00093 // Get the jets 00094 const JetAlg& jetProj = applyProjection<FastJets>(event, "Jets"); 00095 Jets theJets = jetProj.jetsByEt(_jetEtCutA); 00096 size_t njetsA(0), njetsB(0); 00097 foreach (const Jet& j, theJets) { 00098 const FourMomentum pj = j.momentum(); 00099 if (fabs(pj.rapidity()) < _jetETA) { 00100 // Fill differential histograms for top 4 jets with Et > 20 00101 if (njetsA < 4 && pj.Et() > _jetEtCutA) { 00102 ++njetsA; 00103 _histJetEt[njetsA-1]->fill(pj.Et(), event.weight()); 00104 } 00105 // Count number of jets with Et > 25 (for multiplicity histograms) 00106 if (pj.Et() > _jetEtCutB) ++njetsB; 00107 } 00108 } 00109 00110 // Jet multiplicity 00111 _histJetMultNorm->fill(_xpoint, event.weight()); 00112 for (size_t i = 1; i <= njetsB; ++i) { 00113 _histJetMult[i-1]->fill(_xpoint, event.weight()); 00114 if (i == 4) break; 00115 } 00116 } 00117 00118 00119 00120 /// Finalize 00121 void finalize() { 00122 const double xsec = crossSection()/sumOfWeights(); 00123 // Get the x-axis for the ratio plots 00124 /// @todo YODA Replace with autobooking etc. once YODA in place 00125 // std::vector<double> xval; xval.push_back(_xpoint); 00126 // std::vector<double> xerr; xerr.push_back(.5); 00127 // // Fill the first ratio histogram using the special normalisation histogram for the total cross section 00128 // double ratio1to0 = 0.; 00129 // if (_histJetMultNorm->bin(0).area() > 0.) ratio1to0 = _histJetMult[0]->bin(0).area()/_histJetMultNorm->bin(0).area(); 00130 // // Get the fractional error on the ratio histogram 00131 // double frac_err1to0 = 0.; 00132 // if (_histJetMult[0]->bin(0).area() > 0.) frac_err1to0 = _histJetMult[0]->bin(0).areaErr()/_histJetMult[0]->bin(0).area(); 00133 // if (_histJetMultNorm->bin(0).area() > 0.) { 00134 // frac_err1to0 *= frac_err1to0; 00135 // frac_err1to0 += pow(_histJetMultNorm->bin(0).areaErr()/_histJetMultNorm->bin(0).area(),2.); 00136 // frac_err1to0 = sqrt(frac_err1to0); 00137 // } 00138 00139 // /// @todo Replace with autobooking etc. once YODA in place 00140 // vector<double> yval[4]; yval[0].push_back(ratio1to0); 00141 // vector<double> yerr[4]; yerr[0].push_back(ratio1to0*frac_err1to0); 00142 // _histJetMultRatio[0]->setCoordinate(0,xval,xerr); 00143 // _histJetMultRatio[0]->setCoordinate(1,yval[0],yerr[0]); 00144 // for (int i = 0; i < 4; ++i) { 00145 // if (i < 3) { 00146 // float ratio = 0.0; 00147 // if (_histJetMult[i]->bin(0).area() > 0.0) ratio = _histJetMult[i+1]->bin(0).area()/_histJetMult[i]->bin(0).area(); 00148 // float frac_err = 0.0; 00149 // if (_histJetMult[i]->bin(0).area() > 0.0) frac_err = _histJetMult[i]->binError(0)/_histJetMult[i]->bin(0).area(); 00150 // if (_histJetMult[i+1]->bin(0).area() > 0.0) { 00151 // frac_err *= frac_err; 00152 // frac_err += pow(_histJetMult[i+1]->binError(0)/_histJetMult[i+1]->bin(0).area(),2.); 00153 // frac_err = sqrt(frac_err); 00154 // } 00155 // yval[i+1].push_back(ratio); 00156 // yerr[i+1].push_back(ratio*frac_err); 00157 // _histJetMultRatio[i+1]->setCoordinate(0,xval,xerr); 00158 // _histJetMultRatio[i+1]->setCoordinate(1,yval[i+1],yerr[i+1]); 00159 // } 00160 // _histJetEt[i]->scale(xsec); 00161 // _histJetMult[i]->scale(xsec); 00162 // } 00163 // _histJetMultNorm->scale(xsec); 00164 } 00165 00166 //@} 00167 00168 00169 private: 00170 00171 /// @name Cuts 00172 //@{ 00173 /// Cut on the electron ET: 00174 double _electronETCut; 00175 /// Cut on the electron ETA: 00176 double _electronETACut; 00177 /// Cut on the missing ET 00178 double _eTmissCut; 00179 /// Cut on the transverse mass squared 00180 double _mTCut; 00181 /// Cut on the jet ET for differential cross sections 00182 double _jetEtCutA; 00183 /// Cut on the jet ET for jet multiplicity 00184 double _jetEtCutB; 00185 /// Cut on the jet ETA 00186 double _jetETA; 00187 //@} 00188 00189 double _xpoint; 00190 00191 /// @name Histograms 00192 //@{ 00193 Histo1DPtr _histJetEt[4]; 00194 Histo1DPtr _histJetMultNorm; 00195 Scatter2DPtr _histJetMultRatio[4]; 00196 Histo1DPtr _histJetMult[4]; 00197 //@} 00198 00199 }; 00200 00201 00202 00203 // The hook for the plugin system 00204 DECLARE_RIVET_PLUGIN(CDF_2008_S7541902); 00205 00206 } Generated on Fri Dec 21 2012 15:03:39 for The Rivet MC analysis system by ![]() |