10from ROOT
import Belle2
23 """Check that SVVDShaperDigits are correctly zero-suppressed."""
26 '''initialize python module'''
36 for digit
in storedigits:
37 info = gc.get(digit.getSensorID())
38 isU = digit.isUStrip()
39 noise_in_e = info.getElectronicNoiseU()
if isU
else info.getElectronicNoiseV()
40 adu_equivalent = info.getAduEquivalentU()
if isU
else info.getAduEquivalentV()
41 noise_in_adu = noise_in_e / adu_equivalent
43 samples = digit.getSamples()
45 if s > threshold_in_adu:
48 basf2.B2FATAL(f
"Found digit under threshold: {digit.to_string()}")
51if __name__ ==
"__main__":
55 basf2.B2INFO(
'Creating simhits...')
58 create_simhits = basf2.create_path()
59 create_simhits.add_module(
'EventInfoSetter', evtNumList=[50])
60 create_simhits.add_module(
'Gearbox')
61 create_simhits.add_module(
'Geometry', components=[
'MagneticField',
'SVD'], useDB=
False)
62 create_simhits.add_module(
'ParticleGun')
63 create_simhits.add_module(
'FullSim')
64 create_simhits.add_module(
'RootOutput', outputFileName=
'SimulationForThresholdTest.root',
65 branchNames=[
'EventMetaData',
'SVDSimHits',
'SVDTrueHits'])
69 basf2.B2INFO(
'Threshold testing...')
73 test_threshold = basf2.create_path()
75 test_threshold.add_module(
'RootInput', inputFileName=
'SimulationForThresholdTest.root')
76 test_threshold.add_module(
'Gearbox')
77 test_threshold.add_module(
'Geometry', components=[
'MagneticField',
'SVD'], useDB=
False)
79 test_threshold.add_module(
'SVDDigitizer', ZeroSuppressionCut=threshold)
80 threshold_checker =
CheckZS(threshold)
81 test_threshold.add_module(threshold_checker)
85 basf2.B2INFO(
'Test done.')
A (simplified) python wrapper for StoreArray.
static GeoCache & getInstance()
Return a reference to the singleton instance.
def __init__(self, thresholdSN)
thresholdSN
SNR threshold.
def clean_working_directory()
def safe_process(*args, **kwargs)