[Rivet] Rivet scaling

Andy Buckley andy.buckley at cern.ch
Mon Jan 16 15:33:56 GMT 2017


Hi Bjoern,

What are you doing to the histograms in the analysis that produces these 
scale factors? This isn't automatic: if nothing is done in finalize() 
then the ScaledBy=1 (or is absent -- I forget which).

If you call scale() on a histogram, the given scale factor is the one 
that will appear in the ScaledBy annotation. If you call normalize(), 
the scale factor is calculated from the integral (*not* the sum: bin 
widths matter) of the histogram, including overflows.

Hope we can help...

Andy



On 15/01/17 20:47, Bjoern Penning wrote:
> Hi Andy
>
> I have some trouble understanding the way rivet scales.  My impression
> was that in the yoda files I need to take the MC true stat which I
> multiply with the 'ScaledBy' factor. Doing that I obtain consistent
> numbers when comparing to the ROOT histograms using the yoda2root
> converter. However, I have a bunch of histograms filled after the last
> cut state and while the number of MC tru events matched the scaling
> doesn't. On example.
>
> In my cutflow the 4th cut is the final one, I higlight relevant numbers
> (I hope) in *red*.
>
> BEGIN YODA_HISTO1D /FatHiggsTagging/cutflow
> Path=/FatHiggsTagging/cutflow
> ScaledBy=*4.55347186630250185e-08*
> Title=
> Type=Histo1D
> XLabel=
> YLabel=
> # Mean: 7.155888e-01
> # Area: 2.396082e-03
> # ID     ID      sumw    sumw2   sumwx   sumwx2  numEntries
> Total           Total           2.396082e-03    1.091049e-10
>  1.714610e-03    3.357685e-03    52621
> Underflow       Underflow       0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
> Overflow        Overflow        0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
> # xlow   xhigh   sumw    sumw2   sumwx   sumwx2  numEntries
> -5.000000e-01   5.000000e-01    1.297648e-03    5.908806e-11
>  0.000000e+00    0.000000e+00    28498
> 5.000000e-01    1.500000e+00    6.876198e-04    3.131057e-11
>  6.876198e-04    6.876198e-04    15101
> 1.500000e+00    2.500000e+00    2.054527e-04    9.355229e-12
>  4.109053e-04    8.218106e-04    4512
> 2.500000e+00    3.500000e+00    2.053616e-04    9.351082e-12
>  6.160847e-04    1.848254e-03    *4510*
> 3.500000e+00    4.500000e+00    0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
> 4.500000e+00    5.500000e+00    0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
> 5.500000e+00    6.500000e+00    0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
> 6.500000e+00    7.500000e+00    0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
> 7.500000e+00    8.500000e+00    0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
> 8.500000e+00    9.500000e+00    0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
>
>
> After final selection I have 4510 MC true events that are scaled by
> 4.55e-08, e.g we obtain a yield of 0.0002 events. However
> However, checking the some jet property I filll afterwards the MC truth
> number corresponds but the overall scaling is very different:
>
> BEGIN YODA_HISTO1D /FatHiggsTagging/fatjetmass
> Path=/FatHiggsTagging/fatjetmass
> ScaledBy=*9.10694373260500369e-07*
> Title=
> Type=Histo1D
> XLabel=
> YLabel=
> # Mean: 9.943376e+01
> # Area: 4.107232e-03
> # ID     ID      sumw    sumw2   sumwx   sumwx2  numEntries
> Total           Total           4.107232e-03    3.740433e-09
>  4.083975e-01    5.621008e+01    *4510*
> Underflow       Underflow       0.000000e+00    0.000000e+00
>  0.000000e+00    0.000000e+00    0
> Overflow        Overflow        1.220330e-04    1.111348e-10
>  4.262763e-02    1.551509e+01    134
> # xlow   xhigh   sumw    sumw2   sumwx   sumwx2  numEntries
> 0.000000e+00    2.000000e+01    8.196249e-05    7.464278e-11
>  1.187054e-03    1.813769e-02    90
> 2.000000e+01    4.000000e+01    1.056405e-04    9.620625e-11
>  3.076675e-03    9.277008e-02    116
> 4.000000e+01    6.000000e+01    1.948886e-04    1.774839e-10
>  1.030750e-02    5.508886e-01    214
> 6.000000e+01    8.000000e+01    1.028174e-03    9.363522e-10
>  7.446399e-02    5.424086e+00    1129
> 8.000000e+01    1.000000e+02    1.987135e-03    1.809673e-09
>  1.729751e-01    1.508170e+01    2182
> 1.000000e+02    1.200000e+02    5.919513e-05    5.390868e-11
>  6.488093e-03    7.131021e-01    65
> 1.200000e+02    1.400000e+02    7.923041e-05    7.215469e-11
>  1.029270e-02    1.339829e+00    87
> 1.400000e+02    1.600000e+02    1.001764e-04    9.123007e-11
>  1.496791e-02    2.239871e+00    110
> 1.600000e+02    1.800000e+02    9.106944e-05    8.293642e-11
>  1.542030e-02    2.613879e+00    100
> 1.800000e+02    2.000000e+02    7.649833e-05    6.966660e-11
>  1.447084e-02    2.739626e+00    84
> 2.000000e+02    2.200000e+02    6.921277e-05    6.303168e-11
>  1.456050e-02    3.065705e+00    76
> 2.200000e+02    2.400000e+02    5.373097e-05    4.893249e-11
>  1.240573e-02    2.866340e+00    59
> 2.400000e+02    2.600000e+02    2.641014e-05    2.405156e-11
>  6.547057e-03    1.624088e+00    29
> 2.600000e+02    2.800000e+02    3.187430e-05    2.902775e-11
>  8.606442e-03    2.324967e+00    35
>
>
> So here 4510 * 9.11e-07 means a yield of 0.004 evts. way more. I checked
> other variables filled at the same cut stage and all containt the proper
> number of MC truth events. But the scale factor differs by up to three
> orders of magnitude (!)
>
> Path=/FatHiggsTagging/fatjetc2
> ScaledBy=2.27673593315125084e-09
> --
> Path=/FatHiggsTagging/fatjetd2
> ScaledBy=9.10694373260500501e-09
> --
> Path=/FatHiggsTagging/fatjetdphimet
> ScaledBy=2.27673593315125125e-09
> --
> Path=/FatHiggsTagging/fatjeteta
> ScaledBy=9.10694373260501163e-09
> --
> Path=/FatHiggsTagging/fatjetmass
> ScaledBy=9.10694373260500369e-07
> --
> Path=/FatHiggsTagging/fatjetmasscorr
> ScaledBy=9.10694373260500369e-07
> --
> Path=/FatHiggsTagging/fatjetnsub21
> ScaledBy=4.55347186630250251e-09
> --
> Path=/FatHiggsTagging/fatjetntjets
> ScaledBy=4.55347186630250185e-08
> --
> Path=/FatHiggsTagging/fatjetpt
> ScaledBy=2.27673593315125082e-06
>
>
>
> The numbers I calculate and the ones obtained from the converted
> yoda2root file are the same, E.g. looking at the histos in root these
> yields correspond in cutflow and jet property. First cutflow with 0.0002
> evts as expected:
> Inline image 1
>
> But in jet property only the single single highest bin has already ten
> times more scaled events:
>
> Inline image 2
>
>
> What am I missing?
>
> Thanks, Cheers
>  Bjoern
>
>


-- 
Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow


More information about the Rivet mailing list