[Rivet] mapping of DrawNormalized() method in Root

Andy Buckley andy.buckley at cern.ch
Wed Jun 8 10:38:49 BST 2016


Hi Deberati,

I'm not quite sure what you want -- you want to normalise during 
plotting, or during the analysis?

For the norm-in-analysis route, which we recommend, you can simply call 
normalize(myHistoPtr) in the analysis' finalize() function. You can give 
a second argument to normalise to something other than 1, or use 
scale(hist, factor) if you need to retain some of the original 
normalisation information. Note that these methods include the overflow 
bins in the normalisation: this is usually the correct thing to do, but 
is not possible if only normalising during plotting.

For plotting, you can use those Normalize* attributes I mentioned 
earlier. They should be added to the relevant PLOT section in a .plot or 
.dat file, or given on the rivet-mkhtml or rivet-cmphistos command line 
like PLOT:NormalizeToIntegral=1. The full set of make-plots 
configuration directives is documented at 
https://rivet.hepforge.org/make-plots.html

Andy



On 08/06/16 09:51, Debarati Roy wrote:
> Dear Experts,
>                       Thanks for the feedback. Can you please point to where NormalizeToSum and NormalizeToIntegral are defined ?
>
> Thanks a lot,
> Debarati
>
>
> ________________________________________
> From: Andy Buckley
> Sent: 06 June 2016 17:57
> To: David Grellscheid; Debarati Roy; rivet at projects.hepforge.org
> Subject: Re: [Rivet] mapping of DrawNormalized() method in Root
>
> I agree with David, but Rivet's make-plots system does have some
> plotting options for normalisation -- with the caveat that all it knows
> about is the values to be rendered.
>
> Adding the plot key NormalizeToIntegral=1 will normalise the output plot
> to the inferred histogram area, while NormalizeToSum=1 will scale by the
> sum of bin values.
>
> But like David, I think this is much better done at the data histogram
> level than in plotting.
>
> Andy
>
>
> On 06/06/16 13:12, David Grellscheid wrote:
>> Hi Debarati,
>>
>> I'm not sure I fully understand your question, but Rivet histograms do
>> not know anything about how they get drawn. That's the job of a plotting
>> tool that takes YODA files as input (rivet-mkhtml for example).
>>
>> A histogram can be normalized in the finalize() step of the Rivet
>> analysis using the scale() or normalize() functions. This is done in
>> many of the existing analyses, look there for examples.
>>
>> See you,
>>
>>     David
>>
>>
>> On 05/06/2016 15:00, Debarati Roy wrote:
>>> Dear Experts, Can you please let me know how can I implement the
>>> DrawNormalized() method
>>> (https://root.cern.ch/doc/master/TH1_8cxx_source.html#l02918) of Root
>>> in Rivet for 1D histogram normalisation ? Thanks for your help in
>>> advance.
>>>
>>>
>>> Debarati
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> https://www.hepforge.org/lists/listinfo/rivet
>
>
> --
> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
> Particle Physics Expt Group, University of Glasgow
>


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


More information about the Rivet mailing list