Message: Re: Sampling .root histogram within Geant4? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Sampling .root histogram within Geant4? 

Forum: Analysis
Re: Question Sampling .root histogram within Geant4? (Jonning Kennethson)
Re: None Re: Sampling .root histogram within Geant4? (Andreas Pfeiffer)
Re: Question Re: Sampling .root histogram within Geant4? (Jonning Kennethson)
Re: None Re: Sampling .root histogram within Geant4? (Andreas Pfeiffer)
Date: 08 Apr, 2011
From: Guy Barrand <Guy Barrand>

    Hi Jonning

  Well, by looking to the TH1.cxx/GetRandom() code, instead of arranging to convert the AIDA histo
 to a TH1, it seems to me more simple to write a "get_random" helper working on an AIDA::IHistogram1D.
 There is all the "getter API" in the interface to write one. It should not resist too much...
 (It is sufficient to have first a "get_integral" helper that returns the std::vector<double> integral of the
 histo, and then have a "get_random" working on the integral vector. The "binary_search" is something
 trivial to have. Moreover, you could also have a more direct mastering on which flat random generator
 you want to use).

   Cheers.

    Guy

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

1 None: Re: Sampling .root histogram within Geant4?   (Guy Barrand - 08 Apr, 2011)
1 None: Re: Sampling .root histogram within Geant4?   (Andreas Pfeiffer - 09 Apr, 2011)
(_ None: Re: Sampling .root histogram within Geant4?   (Jonning Kennethson - 09 Apr, 2011)
2 Question: Re: Sampling .root histogram within Geant4?   (Jonning Kennethson - 08 Apr, 2011)
1 None: Re: Sampling .root histogram within Geant4?   (Guy Barrand - 09 Apr, 2011)
1 None: Re: Sampling .root histogram within Geant4?   (Andreas Pfeiffer - 09 Apr, 2011)
2 None: Re: Sampling .root histogram within Geant4?   (Andreas Pfeiffer - 09 Apr, 2011)
3 None: Re: Sampling .root histogram within Geant4?   (Guy Barrand - 11 Apr, 2011)
 Add Message Add Message
to: "Re: Sampling .root histogram within Geant4?"

 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 ]