9 detid_default = DetID()
10 if detid_default.subdetector != DetID.Subdetector.kUnknown:
11 print(
"DetID default subdetector value test failed")
14 print(
"DetID default subdetector value test passed")
16 detid = DetID(DetID.Subdetector.kVD_BernCRT)
18 if detid.subdetector != DetID.Subdetector.kVD_BernCRT:
19 print(
"DetID constructor/readwrite field test failed")
22 print(
"DetID constructor/readwrite field test passed")
24 subdetector_name = DetID.subdetector_to_string(detid.subdetector)
25 if subdetector_name !=
"VD_BernCRT":
26 print(f
"subdetector_to_string test failed, got: {subdetector_name}")
29 print(f
"subdetector_to_string test passed, got: {subdetector_name}")
31 parsed = DetID.string_to_subdetector(
"VD_GrenobleCRT")
32 if parsed != DetID.Subdetector.kVD_GrenobleCRT:
33 print(
"string_to_subdetector test failed")
36 print(
"string_to_subdetector test passed")
38 print(
"\nAll DetID Python binding tests passed")