1 from __future__
import print_function
2 from array
import array
4 from LayerMaterialUtils
import *
5 from TrackingVolumeUtils
import *
9 atlasStyle = TStyle(
'ATLAS',
'Atlas style')
12 atlasStyle.SetFrameBorderMode(icol)
13 atlasStyle.SetCanvasBorderMode(icol)
14 atlasStyle.SetPadBorderMode(icol)
15 atlasStyle.SetPadColor(icol)
16 atlasStyle.SetCanvasColor(icol)
17 atlasStyle.SetStatColor(icol)
19 atlasStyle.SetOptTitle(0)
20 atlasStyle.SetOptStat(0)
21 atlasStyle.SetOptFit(0)
23 atlasStyle.SetPadTickX(1)
24 atlasStyle.SetPadTickY(1)
25 atlasStyle.SetPadRightMargin(0.2)
26 atlasStyle.SetPalette(1)
30 stops = [0.00, 0.34, 0.61, 0.84, 1.00]
31 red = [0.00, 0.00, 0.87, 1.00, 0.51]
32 green = [0.00, 0.81, 1.00, 0.20, 0.00]
33 blue = [0.51, 1.00, 0.12, 0.00, 0.00]
39 TColor.CreateGradientColorTable(npoints, s, r, g, b, ncontours)
40 atlasStyle.SetNumberContours(ncontours)
41 gROOT.SetStyle(
'ATLAS')
44 DetDescrVersion =
'ATLAS-GEO-16-00-00'
47 tgMapFile = TFile(
'AtlasMaterialMap-'+DetDescrVersion+
'.root')
48 lmiDirectory = tgMapFile.Get(
'LayerMaterialInspector')
49 lmiListOfKeys = lmiDirectory.GetListOfKeys()
51 for key
in lmiListOfKeys :
52 curLayerMap = lmiDirectory.Get(key.GetName())
53 print (
'Processing: ', curLayerMap.GetName())
54 if curLayerMap.GetName().
find(
'CylinderLayer') > -1 :
55 layershname = curLayerMap.GetName().
split(
'Cylinder')[1]
56 g4Tree = TChain(layershname)
57 g4Tree.Add(
'AtlasMaterialG4-*.root')
58 tgTree = TChain(layershname)
59 tgTree.Add(
'AtlasMaterialTG-*.root')
61 if curLayerMap.GetName().
find(
'DiscLayer') > -1 :
62 layershname = curLayerMap.GetName().
split(
'Disc')[1]
63 g4Tree = TChain(layershname)
64 g4Tree.Add(
'AtlasMaterialG4-*.root')
65 tgTree = TChain(layershname)
66 tgTree.Add(
'AtlasMaterialTG-*.root')
70 tvFile = TFile(
'AtlasMaterialG4-'+DetDescrVersion+
'.root')
71 tvListOfKeys = tvFile.GetListOfKeys()
72 for key
in tvListOfKeys :
73 if key.GetName().
find(
'TVolume') > -1 :
74 g4Tree = TChain(key.GetName())
75 g4Tree.Add(
'AtlasMaterialG4-*.root')
76 tgTree = TChain(key.GetName())
77 tgTree.Add(
'AtlasMaterialTG-*.root')