|
[Rivet-svn] r3796 - trunk/src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Jul 3 21:44:29 BST 2012
Author: hoeth Date: Tue Jul 3 21:44:29 2012 New Revision: 3796 Log: whitespace Modified: trunk/src/Analyses/D0_2001_S4674421.cc Modified: trunk/src/Analyses/D0_2001_S4674421.cc ============================================================================== --- trunk/src/Analyses/D0_2001_S4674421.cc Tue Jul 3 21:32:44 2012 (r3795) +++ trunk/src/Analyses/D0_2001_S4674421.cc Tue Jul 3 21:44:29 2012 (r3796) @@ -71,29 +71,29 @@ if (eeFS.particles().size() >= 2) { // If there is a Z candidate: // Fill Z pT distributions - double deltaM2=1e30,mass2(0.); - double pT=-1.; + double deltaM2=1e30,mass2(0.); + double pT=-1.; const ParticleVector& Zdaughters = eeFS.particles(); - for(unsigned int ix=0;ix<Zdaughters.size();++ix) { - for(unsigned int iy=ix+1;iy<Zdaughters.size();++iy) { - if(Zdaughters[ix].pdgId()!=-Zdaughters[iy].pdgId()) continue; - const FourMomentum pmom = Zdaughters[ix].momentum() + Zdaughters[iy].momentum(); - double mz2 = pmom.mass2(); - double dm2 = abs(mz2-sqr(91.118*GeV)); - if(dm2<deltaM2) { - pT = pmom.pT(); - deltaM2 = dm2; - mass2 = mz2; - } - } - } - if (pT>0. && mass2 > 0. && inRange(sqrt(mass2)/GeV, 75.0, 105.0)) { - _eventsFilledZ += weight; + for(unsigned int ix=0;ix<Zdaughters.size();++ix) { + for(unsigned int iy=ix+1;iy<Zdaughters.size();++iy) { + if(Zdaughters[ix].pdgId()!=-Zdaughters[iy].pdgId()) continue; + const FourMomentum pmom = Zdaughters[ix].momentum() + Zdaughters[iy].momentum(); + double mz2 = pmom.mass2(); + double dm2 = abs(mz2-sqr(91.118*GeV)); + if(dm2<deltaM2) { + pT = pmom.pT(); + deltaM2 = dm2; + mass2 = mz2; + } + } + } + if (pT>0. && mass2 > 0. && inRange(sqrt(mass2)/GeV, 75.0, 105.0)) { + _eventsFilledZ += weight; MSG_DEBUG("Z pmom.pT() = " << pT/GeV << " GeV"); _h_dsigdpt_z->fill(pT/GeV, weight); - // return if found a Z - return; - } + // return if found a Z + return; + } } // There is no Z -> ee candidate... so this might be a W event const LeadingParticlesFinalState& enuFS = applyProjection<LeadingParticlesFinalState>(event, "enuFS"); @@ -102,23 +102,23 @@ double deltaM2=1e30; double pT=-1.; for(unsigned int iw=0;iw<2;++iw) { - ParticleVector Wdaughters; - Wdaughters = iw==0 ? enuFS.particles() : enubFS.particles(); - for(unsigned int ix=0;ix<Wdaughters.size();++ix) { - for(unsigned int iy=ix+1;iy<Wdaughters.size();++iy) { - if(Wdaughters[ix].pdgId()==Wdaughters[iy].pdgId()) continue; - const FourMomentum pmom = Wdaughters[0].momentum() + Wdaughters[1].momentum(); - double dm2 = abs(pmom.mass2()-sqr(80.4*GeV)); - if(dm2<deltaM2) { - pT = pmom.pT(); - deltaM2 = dm2; - } - } - } + ParticleVector Wdaughters; + Wdaughters = iw==0 ? enuFS.particles() : enubFS.particles(); + for(unsigned int ix=0;ix<Wdaughters.size();++ix) { + for(unsigned int iy=ix+1;iy<Wdaughters.size();++iy) { + if(Wdaughters[ix].pdgId()==Wdaughters[iy].pdgId()) continue; + const FourMomentum pmom = Wdaughters[0].momentum() + Wdaughters[1].momentum(); + double dm2 = abs(pmom.mass2()-sqr(80.4*GeV)); + if(dm2<deltaM2) { + pT = pmom.pT(); + deltaM2 = dm2; + } + } + } } if(pT>0.) { - _eventsFilledW += weight; - _h_dsigdpt_w->fill(pT/GeV, weight); + _eventsFilledW += weight; + _h_dsigdpt_w->fill(pT/GeV, weight); } } @@ -150,18 +150,18 @@ const double scalefactor = (xSecW / wpt_integral) / (xSecZ / zpt_integral) * MW_MZ * BRZEE_BRWENU; for (size_t ibin=0; ibin<_h_dsigdpt_scaled_z->numPoints(); ibin++) { if (_h_dsigdpt_w->bin(ibin).area() == 0 || _h_dsigdpt_z->bin(ibin).area() == 0) { - _h_dsigdpt_scaled_z->point(ibin) = Point2D(_h_dsigdpt_w->bin(ibin).midpoint(), 0., - _h_dsigdpt_w->bin(ibin).width(), 0.); + _h_dsigdpt_scaled_z->point(ibin) = Point2D(_h_dsigdpt_w->bin(ibin).midpoint(), 0., + _h_dsigdpt_w->bin(ibin).width(), 0.); } else { - double yval = scalefactor * _h_dsigdpt_w->bin(ibin).area() / _h_dsigdpt_z->bin(ibin).area(); + double yval = scalefactor * _h_dsigdpt_w->bin(ibin).area() / _h_dsigdpt_z->bin(ibin).area(); double dy2 = 0.; // binWidth(ibin) is needed because binHeight is actually sumofweights. It's AIDA. Don't ask. :-(((( dy2 += pow(_h_dsigdpt_w->bin(ibin).areaErr()/_h_dsigdpt_w->bin(ibin).height(),2); dy2 += pow(_h_dsigdpt_z->bin(ibin).areaErr()/_h_dsigdpt_z->bin(ibin).height(),2); double dy = scalefactor * _h_dsigdpt_w->bin(ibin).area()/_h_dsigdpt_z->bin(ibin).area() * sqrt(dy2); - _h_dsigdpt_scaled_z->point(ibin) = Point2D(_h_dsigdpt_w->bin(ibin).midpoint(), yval, - _h_dsigdpt_w->bin(ibin).width(), dy); + _h_dsigdpt_scaled_z->point(ibin) = Point2D(_h_dsigdpt_w->bin(ibin).midpoint(), yval, + _h_dsigdpt_w->bin(ibin).width(), dy); } } }
More information about the Rivet-svn mailing list |