use TH1::Scale(double scaleFactor);
keMuon->Scale(scaleFactor);
Rene
On 24/07/2011 04:43, Sean TURNBULL wrote:
> Hello,
>
>
>
> I have a histogram - TH1F keMuon containing the spectrum of muon
> energy from a cosmic shower in MeV.
>
> (TH1F* keMuon = new TH1F("keMuon", "keMuon", 200, 1e-3, 1e5)
>
> keMuon.GetEntries() = 3.2E04
>
>
>
> After the simulation is run, I get the muon flux (a number) which I
> would like to have on the y axis with energy as it is on the x axis.
>
>
>
> Hence I would like to divide the y axis by the flux.
>
> Possibly the best way would be be loop over the contents but I am
> unsure or the correct syntax for that or if there would be a better
> way.
>
>
>
> Thanks!
>
Received on Sun Jul 24 2011 - 08:35:21 CEST
This archive was generated by hypermail 2.2.0 : Sun Jul 24 2011 - 17:50:01 CEST