|Message: Re: Histogram starting from -0.5 x-axis||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
On Sun, 28 Aug 2016 23:57:52 GMT, jeonyboy wrote:
> On Thu, 25 Aug 2016 15:17:13 GMT, Ivana Hrivnacova wrote: > > > The histogram range is defined via min, max value which you pass when > > you create (or set) the histogram. The values in underflow and overflow > > bin do not contribute to the histogram mena() etc. > > > > So you need to use the command > > > > /analysis/h1/set 1 100 0 100 MeV" > > > > When you fill this histogram with 0. value, it will be accounted in the > > bin , which center is at 0.5 MeV, but its range is [0.,1.] MeV. You > > can for example try to add such a fill in the B4a example (in > > B4aEventAction class) > > > > analysisManager->FillH1(1, fEnergyAbs); > > analysisManager->FillH1(1, 0.); // added > > > > and then, when you print the resulting histogram, you will get (I ran > > 1000 events): > > > > root  h1->Print("all") > > TH1.Print Name = 1, Entries= 2000, Total sum= 2000 > > fSumw=0, x=-4, error=0 > > fSumw=1000, x=4, error=31.6228 <== the bin which was filled > > (note that the histogram range in this example is 100 bins within 0. and 800. MeV) > > fSumw=0, x=12, error=0 > > Thanks for your help! However, I am not clear on your solution to my > problem. What I want is number of particles that deposit exactly 0 > energy.
You can't do that with a histogram. A histogram (any histogram!) counts the number of entries which satisfy some range of values. You can _approximate_ it by giving your histogram very narrow bins (so, for example, count anything energy deposit between 0 and 0.0001 MeV), but can't get an exact result.
To do an exact match on a specific value, you need to store an N-tuple, with one entry (row) per particle.
-- Michael Kelsey
|Inline Depth:||Outline Depth:||Add message:|