[Rivet-svn] rivet: Misc weights and booking conversion

Rivet Mercurial rivet at projects.hepforge.org
Wed Sep 20 13:45:02 BST 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/cc35a7feb881
branches:  multiweights-fixptrs
changeset: 6030:cc35a7feb881
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Wed Sep 20 13:39:01 2017 +0100
description:
Misc weights and booking conversion

diffs (truncated from 1964 to 50 lines):

--- a/analyses/pluginMisc/ARGUS_1993_S2653028.cc	Tue Sep 19 15:59:42 2017 +0100
+++ b/analyses/pluginMisc/ARGUS_1993_S2653028.cc	Wed Sep 20 13:39:01 2017 +0100
@@ -11,14 +11,10 @@
   public:
 
     ARGUS_1993_S2653028()
-      : Analysis("ARGUS_1993_S2653028"),
-        _weightSum(0.)
-    { }
+      : Analysis("ARGUS_1993_S2653028"){ }
 
 
     void analyze(const Event& e) {
-      const double weight = 1.0;
-
       // Find the upsilons
       Particles upsilons;
       // First in unstable final state
@@ -46,7 +42,7 @@
 
       // Find an upsilon
       foreach (const Particle& p, upsilons) {
-        _weightSum += weight;
+        _weightSum->fill();
         vector<GenParticle *> pionsA,pionsB,protonsA,protonsB,kaons;
         // Find the decay products we want
         findDecayProducts(p.genParticle(), pionsA, pionsB, protonsA, protonsB, kaons);
@@ -57,30 +53,30 @@
           FourMomentum ptemp(pionsA[ix]->momentum());
           FourMomentum p2 = cms_boost.transform(ptemp);
           double pcm = cms_boost.transform(ptemp).vector3().mod();
-          _histPiA->fill(pcm,weight);
+          _histPiA->fill(pcm);
         }
-        _multPiA->fill(10.58,double(pionsA.size())*weight);
+        _multPiA->fill(10.58,double(pionsA.size()));
         for (size_t ix = 0; ix < pionsB.size(); ++ix) {
           double pcm = cms_boost.transform(FourMomentum(pionsB[ix]->momentum())).vector3().mod();
-          _histPiB->fill(pcm,weight);
+          _histPiB->fill(pcm);
         }
-        _multPiB->fill(10.58,double(pionsB.size())*weight);
+        _multPiB->fill(10.58,double(pionsB.size()));
         for (size_t ix = 0; ix < protonsA.size(); ++ix) {
           double pcm = cms_boost.transform(FourMomentum(protonsA[ix]->momentum())).vector3().mod();
-          _histpA->fill(pcm,weight);
+          _histpA->fill(pcm);
         }
-        _multpA->fill(10.58,double(protonsA.size())*weight);
+        _multpA->fill(10.58,double(protonsA.size()));


More information about the Rivet-svn mailing list