Hi Allister,
In the following proposal, I assume that for each event you have
hits in all sampling layers and tiles. So there is no point
in having dynamicity. Simply create one object with members
being 2-d arrays. Put this object in a Tree branch.
Using TTree::Draw, you can make queries selecting one particular
layer or tile is you like. See TTree::Draw and Users Guide
to see the list of all possible query types on multi-dim arrays
const Int_t kLAYERS=25, kTILES=9;
class Calorimterer : public TObject {
Int_t fNparticles[kLAYERS,kTILES];
Float_t fEdep[kLAYERS,kTILES];
etc.
Rene Brun
On Wed, 1 May 2002, Allister Levi Sanchez wrote:
> Hi ROOTers,
>
> I'm making a simulation of a calorimeter beam test. I want to save,
> say, the the number of shower particles and the energy deposit, etc., in
> each scintillator tile for each event. For each sampling layer, I have
> nTiles(say, 9) tiles. Then I have nLayers sampling layers.
> I'd like to save my data into a TTree during the simulation.
> Afterwards, I want to draw histograms easily from this TTree using a
> ROOT macro. I would appreciate any suggestion before I start writing my
> code.
>
> Thanks,
> Allister Levi Sanchez
>
> --
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-+
> | Allister Levi C. Sanchez | _________ |
> | High Energy Physics Laboratory | /.-------.\ |
> | Graduate School of Science and Technology | |II** **II| |
> | Niigata University | |II \\ // II| |
> | Ikarashi 2-no-cho 8050 | -=-=-=-=->X<-=-=-=-=-=- |
> | Niigata 950-2181 JAPAN | |II // \\ II| |
> | Tel: +81 25 262 6138 | |II** **II| |
> | mailto: allister@hep.sc.niigata-u.ac.jp | \`-------'/ |
> | http://www.hep.sc.niigata-u.ac.jp/~allister/ | TTTTTTTTT |
> +-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-+
> @lc$2002.04
>
>
>
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:51 MET