ROOT Version: v6-08-06
Platform: Fedora Core 25 x86_64
_Compiler:GCC
Hi
Dears ROOT users
I have some problems about splitting primary particles and scattered particles from each other.
I think I should use the particles specifications (available in branches of root file) to split them from each other.
For example:
root [0] TFile f = Tfile::Open(“opticalPhotonesCreatedByPrimary00cm.root”);
root [1] f->ls()
TFile* opticalPhotonesCreatedByPrimary00cm.root ROOT file with histograms
TFile* opticalPhotonesCreatedByPrimary00cm.root ROOT file with histograms
KEY: TTree Hits;-32768 The root tree for hits
KEY: TTree Hits;32767 The root tree for hits
KEY: TTree Singles;32767 The root tree for singles
KEY: TTree Singles;-32768 The root tree for singles
KEY: TTree OpticalData;2 OpticalData
KEY: TTree OpticalData;1 OpticalData
KEY: TH1D latest_event_ID;1 latest_event_ID(#)
KEY: TH1D total_nb_primaries;1 total_nb_primaries(#)
root [2] Hits->Show(0)
======> EVENT:0
PDGEncoding = 11
trackID = 2
parentID = 1
trackLocalTime = 4.93825e-12
time = 5.25887e-09
edep = 0.143433
stepLength = 0.254025
trackLength = 1.46422
posX = 0.433647
posY = 0.233214
posZ = 1576.46
localPosX = 0.433647
localPosY = 0.233214
localPosZ = 0.118
momDirX = 0.336407
momDirY = 0.153993
momDirZ = 0.929041
baseID = 0
level1ID = 0
level2ID = 0
level3ID = 0
level4ID = 0
layerID = 0
photonID = -1
nPhantomCompton = -1
nCrystalCompton = -1
nPhantomRayleigh = -1
nCrystalRayleigh = -1
primaryID = -1
sourcePosX = -1
sourcePosY = -1
sourcePosZ = -1
sourceID = 0
eventID = 45
runID = 0
axialPos = 1576.57
rotationAngle = 0
volumeID = 0,
0, 1, 1, -1, -1, -1, -1, -1, -1
processName = Transportation
comptVolName = NULL
RayleighVolName = NULL
root [3]
Unfortunately, I did not understand precisely the concepts of branches such as PDGEncoding, trackID, parentID, baseID, level1ID, level2ID, level3ID, level4ID, layerID, photonID,nPhantomCompton, nCrystalCompton, primaryID, eventID, runID, volumeID and so on.
I realized that to split primary particle and scattered particle so I need to use specifications of particles recorded in root file such as TrackID and ParentID in the form of conditional statements, for example something like the following conditions (these are likely to be wrong):
for primary particles: ParentID == 0 AND TrackID == 0
for first scattering particles: ParentID == 0 AND TrackID ==1
for second scattering particles: ParentID == 0 AND TrackID ==2
for third scattering particles (third time): ParentID == 0 AND TrackID ==3
…
Please guide me to understand these parameters?
In first step, how can I split primary particles from scattered particles?
In second step, how can I split the first order scattering particles from the second order scattering particles?
In third step, how can I split the first order scattering particles from the second order scattering particles?
…
Finally, how do I identify the particle produced by a specified volume?
Please guide me.
I am very grateful if you guide me.
Thanks a lot.
Shahrokh