|
[Rivet-svn] rivet: 3 new changesetsRivet Mercurial rivet at projects.hepforge.orgFri Sep 8 15:15:02 BST 2017
details: https://rivet.hepforge.org/hg/rivet/rev/ef3bd565f507 branches: multiweight changeset: 6007:ef3bd565f507 user: David Grellscheid <david.grellscheid at durham.ac.uk> date: Fri Sep 08 14:17:03 2017 +0100 description: Fix behaviour of boolean testing of active pointers details: https://rivet.hepforge.org/hg/rivet/rev/f9a31157c056 branches: multiweight changeset: 6008:f9a31157c056 user: David Grellscheid <david.grellscheid at durham.ac.uk> date: Fri Sep 08 14:18:03 2017 +0100 description: Extract AOs explicitly from reference wrappers details: https://rivet.hepforge.org/hg/rivet/rev/99a03bece8bc branches: multiweight changeset: 6009:99a03bece8bc user: David Grellscheid <david.grellscheid at durham.ac.uk> date: Fri Sep 08 15:11:38 2017 +0100 description: Can't use temp AOs in init() diffs (truncated from 155 to 50 lines): --- a/analyses/pluginLEP/OPAL_2004_I648738.cc Fri Sep 08 08:44:26 2017 +0100 +++ b/analyses/pluginLEP/OPAL_2004_I648738.cc Fri Sep 08 15:11:38 2017 +0100 @@ -11,7 +11,7 @@ /// Constructor OPAL_2004_I648738() - : Analysis("OPAL_2004_I648738"), _sumW(3,0.) + : Analysis("OPAL_2004_I648738"), _sumW(3), _histo_xE(3) { } @@ -41,15 +41,16 @@ } assert(ih>0); // book the histograms - Histo1DPtr tmp1, tmp2, tmp3; - _histo_xE.push_back(book(tmp1,ih+5,1,1)); - _histo_xE.push_back(book(tmp2,ih+5,1,2)); - if(ih<5) _histo_xE.push_back(book(tmp3,ih+5,1,3)); + book(_histo_xE[0], ih+5,1,1); + book(_histo_xE[1], ih+5,1,2); + if(ih<5) book(_histo_xE[2] ,ih+5,1,3); + book(_sumW[0], "sumW_0"); + book(_sumW[1], "sumW_1"); + book(_sumW[2], "sumW_2"); } /// Perform the per-event analysis void analyze(const Event& event) { - const double weight = 1.0; // find the initial quarks/gluons ParticleVector initial; for (const GenParticle* p : Rivet::particles(event.genEvent())) { @@ -80,11 +81,11 @@ assert(itype<_histo_xE.size()); // fill histograms - _sumW[itype] += 2.*weight; + _sumW[itype]->fill(2.); const Particles& chps = applyProjection<FinalState>(event, "CFS").particles(); foreach(const Particle& p, chps) { double xE = 2.*p.E()/sqrtS(); - _histo_xE[itype]->fill(xE, weight); + _histo_xE[itype]->fill(xE); } } @@ -101,7 +102,7 @@ private:
More information about the Rivet-svn mailing list |