Message: Re: FW: AIDA histogram analysis problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: FW: AIDA histogram analysis problem 

Keywords: histogram
Forum: Analysis
Re: None AIDA histogram analysis problem (Lei Zhu)
Re: None FW: AIDA histogram analysis problem
Date: 10 Aug, 2003
From: Lei Zhu <leizhu@stanford.edu>

Hi, Tony,

It seems my case is a little complicated... I have the two histograms: hist1 and hist2, and need to get the ratio hist1/hist2. However, some part of hist2 is zero, so if I follow the method you mentioned below, I will get infinity in the resulted new histogram. What I want to do is just set those parts zero, and the other still the ratio of the two histograms. How to deal with this problem?

Regards, Lei

> Hi, I need to analyze the data got in simulation. Now I have
> two histograms, both are AIDA::IHistogram1D*, with the same 
> x-axis range and bin number. I want to get the ratio of the 
> two datasets along x-axis, how to do it?

Hi, use the method,

 AIDA::IHistogramFactory.divide(String name, IHistogram1D hist1,IHistogram1D hist2) 

Where name is the name of the new histogram, and hist1 and hist2 are the existing histograms to be divded. E.g.

     IHistogram1D* newHist = hf->divide("newHistName",hist1,hist2);

Where hf is a pointer to your AIDA::IHistogramFactory.

Tony

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "Re: FW: AIDA histogram analysis problem"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]