Re: [ROOT] detector mapping in root

From: Nick van Eijndhoven (Nick@phys.uu.nl)
Date: Mon Jun 25 2001 - 09:31:25 MEST


Hi Jacek,
In the case this describes wire mapping of e.g. detector DET
I would suggest to make a class DET which is able to 'hold'
cells identified by modules. Every module can then be given
a boardid, channel id etc...
In this way your dbase info can be loaded as datamembers of the
detector class and GetWireId() etc... can be introduced as
memberfunctions of a module.
In ALICE I have used such a scheme (e.g. for the gains and positions
of the individual PbWo4 cells of the PHOS) in AliCalorimeter and
this turned out to be very convenient.

                                              Cheers,
                                               Nick.

-- 
Dr. Nick van Eijndhoven mailto:nick@phys.uu.nl http://www.phys.uu.nl/~nick
--------------------------------------------------------------------------
Org.:    Utrecht University/Nikhef, Department of Subatomic Physics
Address: P.O. Box 80.000, NL-3508 TA Utrecht, The Netherlands
Phone:   +31-30-2532331(direct) +31-30-2531492(secr.)  Fax: +31-30-2518689
NIKHEF:  +31-20-5922178(direct) +31-20-5922000(secr.)  Fax: +31-20-5925155
CERN:    +41-22-7679751(direct) +41-22-7675857(secr.)  Fax: +41-22-7679480
Offices: Buys Ballot lab. 710 (Utrecht)   N241 (Nikhef)   B23 1-020 (CERN)
--------------------------------------------------------------------------



"Jacek M. Holeczek" wrote:
> 
> Hi,
> Assume one has a set of numbers (describing the wire mapping) in form :
>         BoardID ModuleID ChannelID WireNumber WireType
>         ...
>           34      12       0         121         4
>           34      12       1         126         1
>         ...
>           55      15       7         121         4
>           55      37       288       5878        2
>         ...
> Now I would like to have functions like :
>         GetWireID(BoardID,ModuleID,ChannelID)
>         GetBoardID(WireNumber,WireType)
> The canonical approach would be to create a "database", feed it with this
> table, and then make queries. But ... I would like to do this without any
> database connection. Just "pure" root.
> I can't seem to have any good idea how to do this (mapping in both
> directions between "electronic" channels and detector wires).
> Any help appreciated.
> Thanks in advance,
> Jacek.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:50 MET