<div dir="ltr">Hi, Andy,<div><br></div><div>Aha, that worked great. Thanks!</div><div><br></div><div>Cheers,</div><div>Sal</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 15, 2018 at 5:13 PM, Andy Buckley <span dir="ltr"><<a href="mailto:andy.buckley@cern.ch" target="_blank">andy.buckley@cern.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi Sal,</div><br><div>I suspect we're going to iterate a little until I understand exactly what you want!</div><br><div>First, I assume the N_PT_BINS thing is unrelated to the bins in your histogram, i.e. there's a histo per pT bin?</div><br><div>So for each histo you effectively call normalize(histo, 1000), which will normalize that histogram to have an area of 1000 (including the overflows). This is working, since you can see the "Area" info printout in the file says 1000.</div><br><div>So what do you want? The normalization before normalize() was called? You can get this by rescaling by 1/h.annotation("ScaledBy") -- that attribute records how much scaling has been done, so you can merge parallel runs of normalised observables together. [And we've got a more sophisticated riff on that idea in the pipeline... it'll emerge into daylight some day, I promise.]</div><br><div>Does that help? I feel I probably missed the point, so enlighten me!</div><br><div>Andy</div><br><div><u></u><div><table cellpadding="0" cellspacing="0"><tbody><tr><td colspan="2"><div style="padding-bottom:15px"><div><strong>Dr Andy Buckley, Lecturer / Royal Society University Research Fellow</strong></div><div>Particle Physics Experiment Group, University of Glasgow</div></div></td></tr><tr><td style="vertical-align:top"></td><td><div style="font-size:0.9em;white-space:nowrap;border-left:2px solid gray;margin-left:20px;padding-left:20px"><div><div></div><div></div></div></div></td></tr></tbody></table></div><u></u></div><div><div class="h5"><div class="m_2680622608823000669gmail_quote_attribution">On Mar 15 2018, at 9:01 pm, Salvatore Rappoccio <<a href="mailto:rappoccio@gmail.com" target="_blank">rappoccio@gmail.com</a>> wrote:</div></div></div><blockquote><br><div><div><div class="h5"><div><div>Hi, Folks,</div><div><br></div><div>I'm a bit confused about the normalization of Yoda files from RIVET. I have this at the end of my module, where I normalize a bunch of histograms with unequal bin widths: </div><div><br></div><div><div>    /// Normalise histograms etc., after the run</div><div>    void finalize() {</div><div>      const double normalizationVal = 1000;</div><div>      for (size_t i = 0; i < N_PT_BINS_dj; ++i) {</div><div>        normalize(_h_ungroomedJetMass_<wbr>dj[i], normalizationVal);</div><div>        normalize(_h_sdJetMass_dj[i], normalizationVal);</div><div>      }</div><div>    }</div></div><div><br></div><div>Then I get some yoda output as below (*). How can I get the absolute normalization before any normalization from Rivet? Is that somehow in "ScaledBy" or perhaps "ScaledBy/Area" ?? </div><div><br></div><div>Cheers,</div><div>Sal</div><div><br></div><div><br></div><div><div><br></div><div>BEGIN YODA_HISTO1D /CMS_SMP_16_010/d09-x01-y01</div><div>Path=/CMS_SMP_16_010/d09-x01-<wbr>y01</div><div>ScaledBy=2.1193569211303091e-<wbr>06</div><div>Title=</div><div>Type=Histo1D</div><div>XLabel=</div><div>YLabel=</div><div># Mean: 1.518686e+02</div><div># Area: 1.000000e+03</div><div># ID ID sumw sumw2 sumwx sumwx2 numEntries</div><div>Total   Total   1.000000e+03 9.342226e+01 1.518686e+05 3.082456e+07 10718</div><div>Underflow Underflow 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0</div><div>Overflow Overflow 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0</div><div># xlow xhigh sumw sumw2 sumwx sumwx2 numEntries</div><div>0.000000e+00 1.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0</div><div>1.000000e+00 5.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0</div><div>5.000000e+00 1.000000e+01 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0</div><div>1.000000e+01 2.000000e+01 9.119381e-02 8.316311e-03 1.729448e+00 3.279817e+01 1</div><div>2.000000e+01 4.000000e+01 1.060794e+01 9.968554e-01 3.627352e+02 1.265246e+04 113</div><div>4.000000e+01 6.000000e+01 6.498255e+01 6.082119e+00 3.357938e+03 1.753501e+05 695</div><div>6.000000e+01 8.000000e+01 1.255057e+02 1.173247e+01 8.858834e+03 6.293726e+05 1344</div><div>8.000000e+01 1.000000e+02 1.435704e+02 1.341602e+01 1.288541e+04 1.161209e+06 1538</div><div>1.000000e+02 1.500000e+02 2.662677e+02 2.487217e+01 3.269421e+04 4.068761e+06 2854</div><div>1.500000e+02 2.000000e+02 1.520766e+02 1.419840e+01 2.636244e+04 4.601090e+06 1631</div><div>2.000000e+02 2.500000e+02 9.095334e+01 8.469162e+00 2.028071e+04 4.540426e+06 978</div><div>2.500000e+02 3.000000e+02 6.430813e+01 6.001638e+00 1.763051e+04 4.846869e+06 690</div><div>3.000000e+02 3.500000e+02 4.010750e+01 3.760009e+00 1.294571e+04 4.186287e+06 429</div><div>3.500000e+02 4.000000e+02 2.480605e+01 2.329297e+00 9.231820e+03 3.440384e+06 265</div><div>4.000000e+02 4.500000e+02 1.311072e+01 1.220962e+00 5.534208e+03 2.338449e+06 141</div><div>4.500000e+02 5.000000e+02 3.152555e+00 2.925908e-01 1.479963e+03 6.954321e+05 34</div><div>5.000000e+02 5.500000e+02 3.687638e-01 3.400377e-02 1.891971e+02 9.710031e+04 4</div><div>5.500000e+02 6.000000e+02 9.075043e-02 8.235644e-03 5.316258e+01 3.114319e+04 1</div></div></div></div></div><div>______________________________<wbr>_________________</div><div>Rivet mailing list</div><div><a href="mailto:Rivet@projects.hepforge.org" target="_blank">Rivet@projects.hepforge.org</a></div><div><a href="https://www.hepforge.org/lists/listinfo/rivet" target="_blank">https://www.hepforge.org/<wbr>lists/listinfo/rivet</a></div></div></blockquote></blockquote></div><br></div>