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

Question Sampling .root histogram within Geant4? 

Forum: Analysis
Date: 07 Apr, 2011
From: Jonning Kennethson <Jonning Kennethson>

Hi, here is what I am trying to do. I have a root histogram in a .root file with experimental data that I want to sample for my simulation with the TH1F GetRandom() method.

Now this seems not to be trivial.

I have both an aida connection to root and a direct connection.

The direct connection works seemingly fine, I can open the root file get a pointer to the histo and all. But all GetRandom() gives me is not a number "nan". Also GetBinCenter(some integer) gives the same result.

On the other hand, in AIDA I don't know how to import the histogram and sample it. I have not found documentation for anything else than writing output to histograms.

Is there perhaps some example of this somewhere? I can by no means be the first person doing this. Any help is greatly appreciated.

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?   (Andreas Pfeiffer - 07 Apr, 2011)
(_ Question: Re: Sampling .root histogram within Geant4?   (Jonning Kennethson - 07 Apr, 2011)
(_ None: Re: Sampling .root histogram within Geant4?   (Andreas Pfeiffer - 07 Apr, 2011)
(_ None: Re: Sampling .root histogram within Geant4?   (Guy Barrand - 08 Apr, 2011)
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)
... 1 Message(s)
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 Message(s)
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: "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 ]