[Gate-users] understanding the ROOT file content

Dmitry Hits dmitry.hits at phys.ethz.ch
Wed Mar 3 14:41:40 CET 2021


Dear Gate Users,

I am trying to understand the content of the ROOT file. 
I have the following lines that are meant to specify what will be stored in it.

#==================================================
# OUTPUT
#==================================================
/gate/output/root/enable
/gate/output/root/setFileName TrackerHits
/gate/output/root/setRootHitFlag            1
/gate/output/root/setRootSinglesFlag        0
#/gate/output/root/setRootCoincidencesFlag   0
/gate/output/root/setRootNtupleFlag         0
/gate/output/root/setRootOpticalFlag        0
I commented out the CoincidencesFlag because it gives me an error.

My goal is to store "Hits" produced in a silicon sensor (see definition below).

#system
/gate/world/daughters/name              scanner
/gate/world/daughters/insert            box
/gate/scanner/geometry/setXLength      20 cm
/gate/scanner/geometry/setYLength      1 mm
/gate/scanner/geometry/setZLength      20 cm
/gate/scanner/placement/setTranslation 0.0 0.0 0.0 cm
/gate/scanner/setMaterial Air
#sensor
/gate/scanner/daughters/name sensor1
/gate/scanner/daughters/insert box
/gate/sensor1/geometry/setXLength      20 cm
/gate/sensor1/geometry/setYLength      0.174 mm
/gate/sensor1/geometry/setZLength      20 cm
/gate/sensor1/setMaterial Silicon
/gate/sensor1/placement/setTranslation 0.0 0.0 0.0 cm
/gate/systems/scanner/level1/attach sensor1
/gate/sensor1/attachCrystalSD
When I open my file with uproot I see the following objects inside:
['Hits;12',
 'Hits;11',
 'latest_event_ID;1',
 'total_nb_primaries;1',
 'pet_data;1',
 'OpticalData;1']
Here are my questions:
1. In the "Hits" tree, for each entry (event), I get 10 subentries (sub-events) (see below). Each subentry has identical info with exception of the volumeID. The volumeID have values 0, 3 and -1.
Does someone know:
	- Why  there are so many subentries? 
	- What  is the meaning of the volumeID? I have only one sensor, shouldn't that mean only one volume?
2. Why is there two "Hits" trees? Comparing  them tells  me that  they are identical.
3. Why the cycle numbers of the trees have such high numbers? (12 and  11)  Are they re-written  many times? What determines the cycle numbers?
4. Even though I set setRootOpticalFlag 0 I still get OpticalData tree, why is that?
5. One more thing I failed to understand after reading the manual. What is the meaning of the "level" in relation to the sensor? I randomly used "level1" but I am not sure if that was a correct choice. 

PDGEncoding	trackID	parentID	trackLocalTime	time	edep	stepLength	trackLength	posX	posY	...	axialPos	rotationAngle	volumeID	processName	comptVolName	RayleighVolName	septalNb	sourceType	decayType	gammaType
entry	subentry																					
0	0	2212	1	0	8.399597e-10	8.399597e-10	0.0655	0.174008	250.097992	-3.211607	-0.087	...	0.0	0.0	0	Transportation	NULL	NULL	0	0	0	0
1	2212	1	0	8.399597e-10	8.399597e-10	0.0655	0.174008	250.097992	-3.211607	-0.087	...	0.0	0.0	3	Transportation	NULL	NULL	0	0	0	0
2	2212	1	0	8.399597e-10	8.399597e-10	0.0655	0.174008	250.097992	-3.211607	-0.087	...	0.0	0.0	0	Transportation	NULL	NULL	0	0	0	0
3	2212	1	0	8.399597e-10	8.399597e-10	0.0655	0.174008	250.097992	-3.211607	-0.087	...	0.0	0.0	-1	Transportation	NULL	NULL	0	0	0	0
4	2212	1	0	8.399597e-10	8.399597e-10	0.0655	0.174008	250.097992	-3.211607	-0.087	...	0.0	0.0	-1	Transportation	NULL	NULL	0	0	0	0


Sorry for the long email.

Cheers,

Dmitry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20210303/2171ae07/attachment.html>


More information about the Gate-users mailing list