10 if hasattr( runArgs,
'RunNumber' ):
11 flags.SCTCalib.RunNumber = runArgs.RunNumber
14 if hasattr( runArgs,
'EventNumber' ):
15 flags.SCTCalib.EventNumber = runArgs.EventNumber
18 if hasattr( runArgs,
'maxEvents' ):
19 flags.SCTCalib.EvtMax = runArgs.maxEvents
22 if hasattr( runArgs,
'InputType' )
and runArgs.InputType ==
'RAW':
23 flags.SCTCalib.ReadBS =
True
25 flags.SCTCalib.ReadBS =
False
28 if hasattr( runArgs,
'InputType' ):
29 flags.SCTCalib.InputType = runArgs.InputType
32 if hasattr( runArgs,
'part' ):
33 if 'doNoisyStrip' in runArgs.part:
34 flags.SCTCalib.DoNoisyStrip =
True
36 flags.SCTCalib.DoNoisyStrip =
False
37 if 'doHV' in runArgs.part:
38 flags.SCTCalib.DoHV =
True
40 flags.SCTCalib.DoHV =
False
41 if 'doDeadStrip' in runArgs.part:
42 flags.SCTCalib.DoDeadStrip =
True
44 flags.SCTCalib.DoDeadStrip =
False
45 if 'doDeadChip' in runArgs.part:
46 flags.SCTCalib.DoDeadChip =
True
48 flags.SCTCalib.DoDeadChip =
False
49 if 'doQuietStrip' in runArgs.part:
50 flags.SCTCalib.DoQuietStrip =
True
52 flags.SCTCalib.DoQuietStrip =
False
53 if 'doQuietChip' in runArgs.part:
54 flags.SCTCalib.DoQuietChip =
True
56 flags.SCTCalib.DoQuietChip =
False
57 if 'doNoiseOccupancy' in runArgs.part:
58 flags.SCTCalib.DoNoiseOccupancy =
True
60 flags.SCTCalib.DoNoiseOccupancy =
False
61 if 'doRawOccupancy' in runArgs.part:
62 flags.SCTCalib.DoRawOccupancy =
True
64 flags.SCTCalib.DoRawOccupancy =
False
65 if 'doEfficiency' in runArgs.part:
66 flags.SCTCalib.DoEfficiency =
True
68 flags.SCTCalib.DoEfficiency =
False
69 if 'doBSErrorDB' in runArgs.part:
70 flags.SCTCalib.DoBSErrorDB =
True
72 flags.SCTCalib.DoBSErrorDB =
False
73 if 'doLorentzAngle' in runArgs.part:
74 flags.SCTCalib.DoLorentzAngle =
True
76 flags.SCTCalib.DoLorentzAngle =
False
78 if hasattr( runArgs,
'splitHitMap' ):
79 if runArgs.splitHitMap == 0:
80 if flags.SCTCalib.DoNoisyStrip:
81 flags.SCTCalib.DoHitMapsLB =
True
83 flags.SCTCalib.DoHitMapsLB =
False
84 flags.SCTCalib.DoHitMaps =
True
85 flags.SCTCalib.ReadHitMaps =
False
86 if runArgs.splitHitMap == 1:
87 if flags.SCTCalib.DoNoisyStrip:
88 flags.SCTCalib.DoHitMapsLB =
True
90 flags.SCTCalib.DoHitMapsLB =
False
91 flags.SCTCalib.DoHitMaps =
True
92 flags.SCTCalib.ReadHitMaps =
True
93 elif runArgs.splitHitMap == 2:
94 flags.SCTCalib.DoHitMapsLB =
False
95 flags.SCTCalib.DoHitMaps =
False
96 flags.SCTCalib.ReadHitMaps =
True
97 if flags.SCTCalib.EvtMax != 1:
98 print(
'WARNING! EvtMax is not 1, although HitMap analysis is run!')
100 flags.SCTCalib.DoHitMapsLB =
False
101 flags.SCTCalib.DoHitMaps =
False
102 flags.SCTCalib.ReadHitMaps =
False
105 doHIST = flags.SCTCalib.DoNoiseOccupancy
or flags.SCTCalib.DoRawOccupancy
or flags.SCTCalib.DoEfficiency
or flags.SCTCalib.DoBSErrorDB
or flags.SCTCalib.DoLorentzAngle
108 if flags.SCTCalib.DoHV
and flags.SCTCalib.DataSource ==
'data':
109 flags.SCTCalib.UseDCS =
True
111 if flags.SCTCalib.DoHV
or doHIST:
112 flags.SCTCalib.UseConfiguration =
False
114 if flags.SCTCalib.DataSource ==
'geant4':
115 flags.SCTCalib.UseCalibration =
False
116 if not flags.SCTCalib.DoNoisyStrip:
117 flags.SCTCalib.UseCalibration =
False
119 if not flags.SCTCalib.DoNoisyStrip:
120 flags.SCTCalib.UseMajority =
False
122 if flags.SCTCalib.DoDeadStrip
or flags.SCTCalib.DoDeadChip:
123 flags.SCTCalib.UseBSError =
True
125 if flags.SCTCalib.DoHV
or doHIST:
126 flags.SCTCalib.DoHitMaps =
False
127 flags.SCTCalib.DoHitMapsLB =
False
129 if (flags.SCTCalib.DoDeadStrip
or flags.SCTCalib.DoDeadChip
or
130 flags.SCTCalib.DoQuietStrip
or flags.SCTCalib.DoQuietChip):
131 flags.SCTCalib.DoBSErrors =
True
135 flags.SCTCalib.InputHist = runArgs.inputNames
136 flags.SCTCalib.EvtMax = 1
139 if hasattr( runArgs,
'forceRefRunNumber' ):
140 flags.SCTCalib.ForceRefRunNumber = runArgs.forceRefRunNumber