[Rivet-svn] hg-notifications/rivet: Various pre-release tweaks, checks, and ...

Rivet Mercurial rivet at projects.hepforge.org
Mon Aug 13 23:30:01 BST 2018


details:   https://rivet.hepforge.org/hg/hg-notifications/rivet/rev/a938a8eb0bb1
branches:  release-2-6-x
changeset: 6389:a938a8eb0bb1
user:      Andy Buckley <andy at insectnation.org>
date:      Mon Aug 13 23:29:47 2018 +0100
description:
Various pre-release tweaks, checks, and printouts

diffs (truncated from 58 to 50 lines):

--- a/analyses/pluginMC/EXAMPLE_SMEAR.cc	Thu Aug 09 15:11:19 2018 +0100
+++ b/analyses/pluginMC/EXAMPLE_SMEAR.cc	Mon Aug 13 23:29:47 2018 +0100
@@ -119,7 +119,11 @@
       const Vector3 met2 = apply<SmearedMET>(event, "MET2").vectorEt();
       MSG_DEBUG("MET = " << met0.mod()/GeV << ", " << met1.mod()/GeV << ", " << met2.mod()/GeV << " GeV");
       _h_met_true->fill(met0.mod()/GeV, weight);
-      _h_met_reco->fill(met2.mod()/GeV, weight);
+      _h_met_reco->fill(met1.mod()/GeV, weight);
+      if (met0.perp() > 0 && met1.perp() > 0 && deltaPhi(met0, met1) > 0.1) {
+        MSG_WARNING("Large MET phi change: " << met0.phi()  << " -> " << met1.phi() <<
+                    "; dphi = " << deltaPhi(met0, met1));
+      }
 
       const Jets jets0 = apply<JetAlg>(event, "Jets0").jetsByPt(Cuts::pT > 10*GeV);
       const Jets jets1 = apply<JetAlg>(event, "Jets1").jetsByPt(Cuts::pT > 10*GeV);
@@ -127,6 +131,12 @@
       const Jets jets3 = apply<JetAlg>(event, "Jets3").jetsByPt(Cuts::pT > 10*GeV);
       MSG_DEBUG("Numbers of jets = " << jets0.size() << " true; "
                << jets1.size() << ", " << jets2.size() << ", " << jets3.size());
+      if (!jets0.empty() && !jets2.empty() && deltaPhi(jets0[0], jets2[0]) > 0.1) {
+        MSG_DEBUG("Large jet1 phi change (could be a different truth-jet): " <<
+                  jets0[0].phi() << " -> " << jets2[0].phi() <<
+                  "; dphi = " << deltaPhi(jets0[0], jets2[0]) <<
+                  "; pT = " << jets0[0].pT()/GeV << " -> " << jets2[0].pT()/GeV);
+      }
       _h_nj_true->fill(jets0.size(), weight);
       _h_nj_reco->fill(jets2.size(), weight);
       if (!jets0.empty()) {
--- a/include/Rivet/Tools/SmearingFunctions.hh	Thu Aug 09 15:11:19 2018 +0100
+++ b/include/Rivet/Tools/SmearingFunctions.hh	Mon Aug 13 23:29:47 2018 +0100
@@ -543,7 +543,9 @@
     /// @todo Is this the best way to smear? Should we preserve the energy, or pT, or direction?
     const double fsmear = max(randnorm(1., resolution), 0.);
     const double mass = j.mass2() > 0 ? j.mass() : 0; //< numerical carefulness...
-    return Jet(FourMomentum::mkXYZM(j.px()*fsmear, j.py()*fsmear, j.pz()*fsmear, mass));
+    Jet rtn(FourMomentum::mkXYZM(j.px()*fsmear, j.py()*fsmear, j.pz()*fsmear, mass));
+    //if (deltaPhi(j, rtn) > 0.01) cout << "jdphi: " << deltaPhi(j, rtn) << endl;
+    return rtn;
   }
 
   /// ATLAS Run 2 jet smearing
--- a/src/Core/Particle.cc	Thu Aug 09 15:11:19 2018 +0100
+++ b/src/Core/Particle.cc	Mon Aug 13 23:29:47 2018 +0100
@@ -103,10 +103,13 @@
 
   Particles Particle::children(const Cut& c) const {
     Particles rtn;
+    /// @todo Something going wrong with taus -> GenParticle nullptr?
+    if (genParticle() == nullptr) return rtn;
     if (isStable()) return rtn;


More information about the Rivet-svn mailing list