CDF_2008_NOTE_9351.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/ParticleIdUtils.hh" 00005 #include "Rivet/Tools/Logging.hh" 00006 #include "Rivet/Projections/ChargedFinalState.hh" 00007 #include "Rivet/Projections/ChargedLeptons.hh" 00008 00009 namespace Rivet { 00010 00011 00012 /// @brief CDF Run II underlying event in Drell-Yan 00013 /// @author Hendrik Hoeth 00014 /// 00015 /// Measurement of the underlying event in Drell-Yan 00016 /// \f$ Z/\gamma^* \to e^+ e^- \f$ and 00017 /// \f$ Z/\gamma^* \to \mu^+ \mu^- \f$ events. The reconstructed 00018 /// Z defines the \f$ \phi \f$ orientation. A Z mass window cut is applied. 00019 /// 00020 /// @par Run conditions 00021 /// 00022 /// @arg \f$ \sqrt{s} = \f$ 1960 GeV 00023 /// @arg produce Drell-Yan events 00024 /// @arg Set particles with c*tau > 10 mm stable 00025 /// @arg Z decay mode: Z -> e+e- and Z -> mu+mu- 00026 /// @arg gamma decay mode: gamma -> e+e- and gamma -> mu+mu- 00027 /// @arg minimum invariant mass of the fermion pair coming from the Z/gamma: 70 GeV 00028 class CDF_2008_NOTE_9351 : public Analysis { 00029 public: 00030 00031 /// Constructor 00032 CDF_2008_NOTE_9351() : Analysis("CDF_2008_NOTE_9351") 00033 { 00034 } 00035 00036 00037 /// @name Analysis methods 00038 //@{ 00039 00040 void init() { 00041 // Set up projections 00042 const ChargedFinalState cfs(-1.0, 1.0, 0.5*GeV); 00043 const ChargedFinalState clfs(-1.0, 1.0, 20*GeV); 00044 addProjection(cfs, "FS"); 00045 addProjection(ChargedLeptons(clfs), "CL"); 00046 00047 // Book histograms 00048 _hist_tnchg = bookProfile1D( 1, 1, 1); 00049 _hist_pnchg = bookProfile1D( 2, 1, 1); 00050 _hist_pmaxnchg = bookProfile1D( 3, 1, 1); 00051 _hist_pminnchg = bookProfile1D( 4, 1, 1); 00052 _hist_pdifnchg = bookProfile1D( 5, 1, 1); 00053 _hist_anchg = bookProfile1D( 6, 1, 1); 00054 00055 _hist_tcptsum = bookProfile1D( 7, 1, 1); 00056 _hist_pcptsum = bookProfile1D( 8, 1, 1); 00057 _hist_pmaxcptsum = bookProfile1D( 9, 1, 1); 00058 _hist_pmincptsum = bookProfile1D(10, 1, 1); 00059 _hist_pdifcptsum = bookProfile1D(11, 1, 1); 00060 _hist_acptsum = bookProfile1D(12, 1, 1); 00061 00062 _hist_tcptave = bookProfile1D(13, 1, 1); 00063 _hist_pcptave = bookProfile1D(14, 1, 1); 00064 _hist_acptave = bookProfile1D(15, 1, 1); 00065 00066 _hist_tcptmax = bookProfile1D(16, 1, 1); 00067 _hist_pcptmax = bookProfile1D(17, 1, 1); 00068 _hist_acptmax = bookProfile1D(18, 1, 1); 00069 00070 _hist_zptvsnchg = bookProfile1D(19, 1, 1); 00071 _hist_cptavevsnchg = bookProfile1D(20, 1, 1); 00072 _hist_cptavevsnchgsmallzpt = bookProfile1D(21, 1, 1); 00073 } 00074 00075 00076 /// Do the analysis 00077 void analyze(const Event& e) { 00078 00079 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00080 const size_t numParticles = fs.particles().size(); 00081 00082 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2. 00083 if (numParticles < 1) { 00084 MSG_DEBUG("Failed multiplicity cut"); 00085 vetoEvent; 00086 } 00087 00088 // Get the event weight 00089 const double weight = e.weight(); 00090 00091 // Get the leptons 00092 const ParticleVector& leptons = applyProjection<ChargedLeptons>(e, "CL").chargedLeptons(); 00093 00094 // We want exactly two leptons of the same flavour. 00095 MSG_DEBUG("lepton multiplicity = " << leptons.size()); 00096 if (leptons.size() != 2 || leptons[0].pdgId() != -leptons[1].pdgId() ) vetoEvent; 00097 00098 // Lepton pT > 20 GeV 00099 if (leptons[0].momentum().pT()/GeV <= 20 || leptons[1].momentum().pT()/GeV <= 20) vetoEvent; 00100 00101 // Lepton pair should have an invariant mass between 70 and 110 and |eta| < 6 00102 const FourMomentum dilepton = leptons[0].momentum() + leptons[1].momentum(); 00103 if (!inRange(dilepton.mass()/GeV, 70., 110.) || fabs(dilepton.eta()) >= 6) vetoEvent; 00104 MSG_DEBUG("Dilepton mass = " << mass(dilepton)/GeV << " GeV"); 00105 MSG_DEBUG("Dilepton pT = " << pT(dilepton)/GeV << " GeV"); 00106 00107 // Calculate the observables 00108 size_t numToward(0), numAway(0); 00109 long int numTrans1(0), numTrans2(0); 00110 double ptSumToward(0.0), ptSumTrans1(0.0), ptSumTrans2(0.0), ptSumAway(0.0); 00111 double ptMaxToward(0.0), ptMaxTrans1(0.0), ptMaxTrans2(0.0), ptMaxAway(0.0); 00112 const double phiZ = azimuthalAngle(dilepton); 00113 const double pTZ = pT(dilepton); 00114 /// @todo Replace with foreach 00115 for (ParticleVector::const_iterator p = fs.particles().begin(); p != fs.particles().end(); ++p) { 00116 // Don't use the leptons 00117 /// @todo Replace with PID::isLepton 00118 if (abs(p->pdgId()) < 20) continue; 00119 00120 const double dPhi = deltaPhi(p->momentum().phi(), phiZ); 00121 const double pT = p->momentum().pT(); 00122 double rotatedphi = p->momentum().phi() - phiZ; 00123 while (rotatedphi < 0) rotatedphi += 2*PI; 00124 00125 if (dPhi < PI/3.0) { 00126 ptSumToward += pT; 00127 ++numToward; 00128 if (pT > ptMaxToward) 00129 ptMaxToward = pT; 00130 } else if (dPhi < 2*PI/3.0) { 00131 if (rotatedphi <= PI) { 00132 ptSumTrans1 += pT; 00133 ++numTrans1; 00134 if (pT > ptMaxTrans1) 00135 ptMaxTrans1 = pT; 00136 } 00137 else { 00138 ptSumTrans2 += pT; 00139 ++numTrans2; 00140 if (pT > ptMaxTrans2) 00141 ptMaxTrans2 = pT; 00142 } 00143 } else { 00144 ptSumAway += pT; 00145 ++numAway; 00146 if (pT > ptMaxAway) 00147 ptMaxAway = pT; 00148 } 00149 // We need to subtract the two leptons from the number of particles to get the correct multiplicity 00150 _hist_cptavevsnchg->fill(numParticles-2, pT, weight); 00151 if (pTZ < 10) 00152 _hist_cptavevsnchgsmallzpt->fill(numParticles-2, pT, weight); 00153 } 00154 00155 // Fill the histograms 00156 _hist_tnchg->fill(pTZ, numToward/(4*PI/3), weight); 00157 _hist_pnchg->fill(pTZ, (numTrans1+numTrans2)/(4*PI/3), weight); 00158 _hist_pmaxnchg->fill(pTZ, (numTrans1>numTrans2 ? numTrans1 : numTrans2)/(2*PI/3), weight); 00159 _hist_pminnchg->fill(pTZ, (numTrans1<numTrans2 ? numTrans1 : numTrans2)/(2*PI/3), weight); 00160 _hist_pdifnchg->fill(pTZ, abs(numTrans1-numTrans2)/(2*PI/3), weight); 00161 _hist_anchg->fill(pTZ, numAway/(4*PI/3), weight); 00162 00163 _hist_tcptsum->fill(pTZ, ptSumToward/(4*PI/3), weight); 00164 _hist_pcptsum->fill(pTZ, (ptSumTrans1+ptSumTrans2)/(4*PI/3), weight); 00165 _hist_pmaxcptsum->fill(pTZ, (ptSumTrans1>ptSumTrans2 ? ptSumTrans1 : ptSumTrans2)/(2*PI/3), weight); 00166 _hist_pmincptsum->fill(pTZ, (ptSumTrans1<ptSumTrans2 ? ptSumTrans1 : ptSumTrans2)/(2*PI/3), weight); 00167 _hist_pdifcptsum->fill(pTZ, fabs(ptSumTrans1-ptSumTrans2)/(2*PI/3), weight); 00168 _hist_acptsum->fill(pTZ, ptSumAway/(4*PI/3), weight); 00169 00170 if (numToward > 0) { 00171 _hist_tcptave->fill(pTZ, ptSumToward/numToward, weight); 00172 _hist_tcptmax->fill(pTZ, ptMaxToward, weight); 00173 } 00174 if ((numTrans1+numTrans2) > 0) { 00175 _hist_pcptave->fill(pTZ, (ptSumTrans1+ptSumTrans2)/(numTrans1+numTrans2), weight); 00176 _hist_pcptmax->fill(pTZ, (ptMaxTrans1 > ptMaxTrans2 ? ptMaxTrans1 : ptMaxTrans2), weight); 00177 } 00178 if (numAway > 0) { 00179 _hist_acptave->fill(pTZ, ptSumAway/numAway, weight); 00180 _hist_acptmax->fill(pTZ, ptMaxAway, weight); 00181 } 00182 00183 // We need to subtract the two leptons from the number of particles to get the correct multiplicity 00184 _hist_zptvsnchg->fill(numParticles-2, pTZ, weight); 00185 } 00186 00187 00188 void finalize() { 00189 // 00190 } 00191 00192 //@} 00193 00194 private: 00195 00196 Profile1DPtr _hist_tnchg; 00197 Profile1DPtr _hist_pnchg; 00198 Profile1DPtr _hist_pmaxnchg; 00199 Profile1DPtr _hist_pminnchg; 00200 Profile1DPtr _hist_pdifnchg; 00201 Profile1DPtr _hist_anchg; 00202 Profile1DPtr _hist_tcptsum; 00203 Profile1DPtr _hist_pcptsum; 00204 Profile1DPtr _hist_pmaxcptsum; 00205 Profile1DPtr _hist_pmincptsum; 00206 Profile1DPtr _hist_pdifcptsum; 00207 Profile1DPtr _hist_acptsum; 00208 Profile1DPtr _hist_tcptave; 00209 Profile1DPtr _hist_pcptave; 00210 Profile1DPtr _hist_acptave; 00211 Profile1DPtr _hist_tcptmax; 00212 Profile1DPtr _hist_pcptmax; 00213 Profile1DPtr _hist_acptmax; 00214 Profile1DPtr _hist_zptvsnchg; 00215 Profile1DPtr _hist_cptavevsnchg; 00216 Profile1DPtr _hist_cptavevsnchgsmallzpt; 00217 00218 }; 00219 00220 00221 00222 // The hook for the plugin system 00223 DECLARE_RIVET_PLUGIN(CDF_2008_NOTE_9351); 00224 00225 } Generated on Fri Dec 21 2012 15:03:39 for The Rivet MC analysis system by ![]() |