|
[Rivet-svn] r3602 - trunk/src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Mar 8 17:03:32 GMT 2012
Author: buckley Date: Thu Mar 8 17:03:32 2012 New Revision: 3602 Log: Units obsessiveness Modified: trunk/src/Analyses/CMS_2011_S8957746.cc Modified: trunk/src/Analyses/CMS_2011_S8957746.cc ============================================================================== --- trunk/src/Analyses/CMS_2011_S8957746.cc Thu Mar 8 12:31:22 2012 (r3601) +++ trunk/src/Analyses/CMS_2011_S8957746.cc Thu Mar 8 17:03:32 2012 (r3602) @@ -1,5 +1,4 @@ // -*- C++ -*- - #include "Rivet/Analysis.hh" #include "Rivet/RivetAIDA.hh" #include "Rivet/Projections/FinalState.hh" @@ -13,9 +12,9 @@ class CMS_2011_S8957746 : public Analysis { public: - /// Default constructor - CMS_2011_S8957746() : Analysis("CMS_2011_S8957746") { - } + /// Constructor + CMS_2011_S8957746() + : Analysis("CMS_2011_S8957746") { } /// Initialization, called once before running @@ -38,20 +37,20 @@ const double weight = event.weight(); const Jets& jets = applyProjection<FastJets>(event, "Jets").jetsByPt(30.0*GeV); if (jets.size() < 2 || - fabs(jets[0].momentum().eta())>=1.3 || - fabs(jets[1].momentum().eta())>=1.3 || - jets[0].momentum().pT()<90) { + fabs(jets[0].momentum().eta()) >= 1.3 || + fabs(jets[1].momentum().eta()) >= 1.3 || + jets[0].momentum().pT() < 90/GeV) { vetoEvent; } std::vector<Vector3> momenta; foreach (const Jet& j, jets) { - if (fabs(j.momentum().eta())<1.3) { + if (fabs(j.momentum().eta()) < 1.3) { Vector3 mom = j.momentum().vector3(); mom.setZ(0.0); momenta.push_back(mom); } } - if (momenta.size()==2) { + if (momenta.size() == 2) { // We need to use a ghost so that Thrust.calc() doesn't return 1. momenta.push_back(Vector3(1e-10*MeV, 0., 0.)); } @@ -59,15 +58,15 @@ thrust.calc(momenta); // The lowest bin also includes the underflow: - const double T=max(log(1-thrust.thrust()), -12.0); - const double M=max(log(thrust.thrustMajor()), -6.0); - if (jets[0].momentum().pT()>200) { + const double T = max(log(1-thrust.thrust()), -12.0); + const double M = max(log(thrust.thrustMajor()), -6.0); + if (jets[0].momentum().pT()/GeV > 200) { _hist_T_200->fill(T, weight); _hist_m_200->fill(M, weight); - } else if (jets[0].momentum().pT()>125) { + } else if (jets[0].momentum().pT()/GeV > 125) { _hist_T_125->fill(T, weight); _hist_m_125->fill(M, weight); - } else if (jets[0].momentum().pT()>90) { + } else if (jets[0].momentum().pT()/GeV > 90) { _hist_T_90->fill(T, weight); _hist_m_90->fill(M, weight); }
More information about the Rivet-svn mailing list |