18 parser = argparse.ArgumentParser(description=
"PXD+SVD+VXD DQM correlations for Belle II + TB, show all possible histos")
25 help=
'Turn off magnetic field')
27 parser.add_argument(
'--skip-pxd-svd', dest=
'SkipPXDSVD', action=
'store_const', const=
True, default=
False,
28 help=
'Add also PXD and SVD DQM, default = True')
29 parser.add_argument(
'--data-output', dest=
'DataOutput', action=
'store_const', const=
True, default=
False,
30 help=
'Save data to output file, default = False')
31 parser.add_argument(
'--correlation-granulation', dest=
'CorrelationGranulation', action=
'store', default=1.0, type=float,
32 help=
'Set granulation of histogram plots, default is 1 degree, min = 0.02 degree, max = 1 degree')
33 parser.add_argument(
'--cut-correlation-sig-pxd', dest=
'CutCorrelationSigPXD', action=
'store', default=0, type=int,
34 help=
'Cut threshold of PXD signal for accepting to correlations, default = 0 ADU')
35 parser.add_argument(
'--cut-correlation-sig-u-svd', dest=
'CutCorrelationSigUSVD', action=
'store', default=0, type=int,
36 help=
'Cut threshold of SVD signal for accepting to correlations in u, default = 0 ADU')
37 parser.add_argument(
'--cut-correlation-sig-v-svd', dest=
'CutCorrelationSigVSVD', action=
'store', default=0, type=int,
38 help=
'Cut threshold of SVD signal for accepting to correlations in v, default = 0 ADU')
39 parser.add_argument(
'--cut-correlation-time-svd', dest=
'CutCorrelationTimeSVD', action=
'store', default=70, type=int,
40 help=
'Cut threshold of SVD time window for accepting to correlations, default = 70 ns')
42 parser.add_argument(
'--use-digits', dest=
'UseDigits', action=
'store', default=0, type=int,
43 help=
'flag <0,1> for using digits only, no cluster information will be required, default = 0')
44 parser.add_argument(
'--reduce-1d-correl-histos', dest=
'Reduce1DCorrelHistos', action=
'store', default=0, type=int,
45 help=
'flag <0,1> for removing of 1D correlation plots from output, default = 0')
46 parser.add_argument(
'--reduce-2d-correl-histos', dest=
'Reduce2DCorrelHistos', action=
'store', default=0, type=int,
47 help=
'flag <0,1> for removing of 2D correlation plots from output, default = 0')
48 parser.add_argument(
'--only-23-layers-histos', dest=
'Only23LayersHistos', action=
'store', default=0, type=int,
49 help=
'flag <0,1> for to keep only correlation plots between layer 2 and 3 (between PXD and SVD), default = 0')
50 parser.add_argument(
'--save-other-histos', dest=
'SaveOtherHistos', action=
'store', default=1, type=int,
51 help=
'flag <0,1> for creation of correlation plots for non-neighboar layers, default = 0')
52 parser.add_argument(
'--unpacking', dest=
'unpacking', action=
'store_const', const=
True,
53 default=
False, help=
'Add PXD and SVD unpacking modules to the path')
54 parser.add_argument(
'--input-file', dest=
'input_file', action=
'store', default=
None, type=str,
55 help=
'Name of input file')
56 parser.add_argument(
'--filename-histos', dest=
'histo_file_name', action=
'store',
57 default=
'VXD_DQM_Histograms.root', type=str,
58 help=
'Name of output file with histograms in dqm option is used')
59 parser.add_argument(
'--SkipDQM', dest=
'SkipDQM', action=
'store_const', const=
True, default=
False, help=
'Produce DQM plots')
60 parser.add_argument(
'--SkipDQMExpressReco', dest=
'SkipDQMExpressReco', action=
'store_const', const=
True, default=
False,
61 help=
'Skip production of ExpressReco DQM plots')
64 args = parser.parse_args()
66 print(
"Final setting of arguments: ")
67 print(
" SkipPXDSVD: ", args.SkipPXDSVD)
68 print(
" DataOutput: ", args.DataOutput)
69 print(
" CorrelationGranulation: ", args.CorrelationGranulation)
70 print(
" CutCorrelationSigPXD: ", args.CutCorrelationSigPXD)
71 print(
" CutCorrelationSigUSVD: ", args.CutCorrelationSigUSVD)
72 print(
" CutCorrelationSigVSVD: ", args.CutCorrelationSigVSVD)
73 print(
" CutCorrelationTimeSVD: ", args.CutCorrelationTimeSVD)
74 print(
" UseDigits: ", args.UseDigits)
75 print(
" Reduce1DCorrelHistos: ", args.Reduce1DCorrelHistos)
76 print(
" Reduce2DCorrelHistos: ", args.Reduce2DCorrelHistos)
77 print(
" Only23LayersHistos: ", args.Only23LayersHistos)
78 print(
" SaveOtherHistos: ", args.SaveOtherHistos)
79 print(
" unpacking: ", args.unpacking)
80 print(
" input_file: ", args.input_file)
81 print(
" histo_file_name: ", args.histo_file_name)
82 print(
" SkipDQM: ", args.SkipDQM)
83 print(
" SkipDQMExpressReco: ", args.SkipDQMExpressReco)
86 param_vxddqm = {
'CutCorrelationSigPXD': args.CutCorrelationSigPXD,
87 'CutCorrelationSigUSVD': args.CutCorrelationSigUSVD,
88 'CutCorrelationSigVSVD': args.CutCorrelationSigVSVD,
89 'CutCorrelationTimeSVD': args.CutCorrelationTimeSVD,
90 'UseDigits': args.UseDigits
95 main = b2.create_path()
96 main.add_module(
"EventInfoSetter", evtNumList=[1000])
97 main.add_module(
"Gearbox")
99 if (args.magnet_off
is True):
100 main.add_module(
"Geometry", components=[
'BeamPipe',
'PXD',
'SVD'])
102 main.add_module(
"Geometry", components=[
'MagneticFieldConstant4LimitedRSVD',
103 'BeamPipe',
'PXD',
'SVD'])
106 main.add_module(
"EvtGenInput")
107 main.add_module(
"FullSim")
113 if (args.SkipDQM
is False):
114 histomanager = b2.register_module(
'HistoManager', histoFileName=args.histo_file_name)
115 main.add_module(histomanager)
116 if (args.SkipPXDSVD
is False):
117 if (args.SkipDQMExpressReco
is False):
118 pxddqmExpReco = b2.register_module(
'PXDDQMExpressReco')
119 svddqmExpReco = b2.register_module(
'SVDDQMExpressReco')
120 main.add_module(pxddqmExpReco)
121 main.add_module(svddqmExpReco)
123 if (args.SkipDQMExpressReco
is False):
124 vxddqmExpReco = b2.register_module(
'VXDDQMExpressReco')
125 vxddqmExpReco.param(param_vxddqm)
126 main.add_module(vxddqmExpReco)
128 if (args.DataOutput
is True):
129 main.add_module(
'RootOutput')
132 main.add_module(
"Progress")
def add_pxd_reconstruction(path, clusterName=None, digitsName=None, usePXDClusterShapes=False, spacePointsName='PXDSpacePoints')
def add_pxd_simulation(path, digitsName=None, activatePixelMasks=True, activateGainCorrection=True)
def add_svd_simulation(path, useConfigFromDB=False, daqMode=2, relativeShift=9)
def add_svd_reconstruction(path, isROIsimulation=False, createRecoDigits=False, applyMasking=False)