[Frost] rootbear type declarations for banks

Ken Livingston k.livingston at physics.gla.ac.uk
Wed May 12 07:56:40 EDT 2010


Hi Michael, Brian,
Firstly, don't mix up you beers and your bears. It can be confusing when
you order a large one in a bar!

The structures rootbeer uses for banks are in
$ROOTBEER/include/bankheader.h, which is made by parsing clasbanks.dll.
Look for GPID in there (in CUE clasg9 account for example). I've
explicitly inculded at the end of this mail too.

A quick way to see the struct for any BANK is to bankdump a file:

clasg9>bankdump -GGPID <bosfile|rootDST>

Not sure what you want to do. I'll stress what rootbeer does in case you
don't know. 
rootbeer handles the reading of banks from BOS files or rootDST files,
and the writing of banks in rootDST files.
It was designed specifically for folk with no experience in C++, and
little root experience. If you're using the rootbeer scheme you don't
NEED to write your own trees for banks. You can just make DSTs.
You could make you own trees, or add your own branches to the main DST
tree for things which are not handled in a BANK format - eg if you do
PID and want to write out TLorentzVectors or something.
If you really need to shrink the output and only write essential
information then it's best to write your own tree rather than a DST.

There's a link on the frost wiki about rootbeer, with a pointer to the
manual and tutorials.

http://clasweb.jlab.org/rungroups/g9/wiki/index.php/Rootbeer%
2C_including_eloss_and_ExpTable




GPID struct is like this

....
....
typedef struct GPID_t {		//  ST-SC PID bank 
	int	pid;            //  particle id (GEANT)
	float	x;              //  vector3_t vert; Vertex position {x,y,z} 
	float	y;              //  y
	float	z;              //  z
	float	E;              //  vector4_t p; Energy
	float	px;             //  momentum {x,y,z}
	float	py;             //   py
	float	pz;             //  pz
	int	q;              //  charge
	int	trkid;          //  index to TBID bank, counting from 1
	int	sec;            //  Sector track is in
	int	paddle;         //  Paddle hit
	float	dedx;           //  Energy deposited in TOF
	float	beta;           //  beta pmag/E
	int	sc_stat;        //  status of hit matching to SC: see sc.h
	float	sc_time;        //  SC calibrated time for this track (ns)
	float	sc_len;         //  track length [cm] from origin to SC
	int	st_stat;        //  ST status
	float	st_time;        //  ST calibrated time for this track (ns) 
	float	st_len;         //  track length [cm] from origin to ST
	float	mass;           //  mass from time-of-flight
	int	mass_ref;       //  0: mass calc from SC & TAG, 1: SC & ST; -1
neutral or no SC;2:from PART
	float	betam;          //  beta from time_of-flight
	float	epho;           //  closest photon energy (GeV)
	float	tpho;           //  Time of the photon after RF correction
	int	tagrid;         //  index to TAGR bank, counting from 1
	int	ngrf;           //  number of photons in the same RF bucket
	int	ppid;           //  pid as seen in PART bank
} GPID_t;
....
....

The way of accessing the info in the struct is, for example,

time=GPID[row].st_time;




Cheers,
Ken

On Tue, 2010-05-11 at 19:13 -0400, Michael Dugger wrote:
> Hi,
> 
> Where can I find the type declarations for the banks? In particular, I 
> would like to know the type declaration for each of the GPID variables 
> within the rootbear framework.
> 
> Thanks for your time.
> 
> -Michael
> _______________________________________________
> Frost mailing list
> Frost at jlab.org
> https://mailman.jlab.org/mailman/listinfo/frost




More information about the Frost mailing list