[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Tue Sep 19 13:00:02 BST 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/4c382d8bcf3e
branches:  multiweights-fixptrs
changeset: 6023:4c382d8bcf3e
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Tue Sep 19 11:22:44 2017 +0100
description:
More Sphericity workarounds. All these trigger an assert in Vector<3>::mod() otherwise

details:   https://rivet.hepforge.org/hg/rivet/rev/cec2542600a9
branches:  multiweights-fixptrs
changeset: 6024:cec2542600a9
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Tue Sep 19 11:41:31 2017 +0100
description:
CDF / D0 weights and booking conversion

diffs (truncated from 4119 to 50 lines):

--- a/analyses/pluginCDF/CDF_1988_S1865951.cc	Tue Sep 19 09:58:55 2017 +0100
+++ b/analyses/pluginCDF/CDF_1988_S1865951.cc	Tue Sep 19 11:41:31 2017 +0100
@@ -13,9 +13,7 @@
     /// Constructor
     CDF_1988_S1865951()
       : Analysis("CDF_1988_S1865951")
-    {
-      _sumWTrig = 0;
-    }
+    {}
 
 
     /// @name Analysis methods
@@ -34,6 +32,9 @@
       } else if (fuzzyEquals(sqrtS()/GeV, 630, 1E-3)) {
         book(_hist_pt ,2, 1, 1);
       }
+
+      book(_sumWTrig, "sumWTrig");
+    
     }
 
 
@@ -42,14 +43,13 @@
       // Trigger
       const bool trigger = apply<TriggerCDFRun0Run1>(event, "Trigger").minBiasDecision();
       if (!trigger) vetoEvent;
-      const double weight = 1.0;
-      _sumWTrig += weight;
+      _sumWTrig->fill();
 
       const FinalState& trackfs = apply<ChargedFinalState>(event, "CFS");
       foreach (Particle p, trackfs.particles()) {
         const double pt = p.pT()/GeV;
         // Effective weight for d3sig/dp3 = weight / ( Delta eta * 2pi * pt ), with Delta(eta) = 2
-        const double eff_weight = weight/(2*2*TWOPI*pt);
+        const double eff_weight = 1.0/(2*2*TWOPI*pt);
         _hist_pt->fill(pt, eff_weight);
       }
     }
@@ -67,7 +67,7 @@
 
     /// @name Counters
     //@{
-    double _sumWTrig;
+    CounterPtr _sumWTrig;
     //@}
 
     /// @name Histos
--- a/analyses/pluginCDF/CDF_1990_S2089246.cc	Tue Sep 19 09:58:55 2017 +0100


More information about the Rivet-svn mailing list