File indexing completed on 2026-04-09 07:48:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 """
0022 tboolean.py
0023 =============================================
0024
0025 This is invoked by Opticks bi-simulation executables such as OKG4Test
0026 when using the option "--anakey tboolean". See optickscore/OpticksAna.cc.
0027 It compares Opticks and G4 event history categories and deviations.
0028
0029
0030 """
0031 from __future__ import print_function
0032 import os, sys, logging, numpy as np
0033 log = logging.getLogger(__name__)
0034
0035 from opticks.ana.main import opticks_main
0036 from opticks.ana.nload import np_load
0037 from opticks.ana.ab import AB
0038 from opticks.ana.seq import seq2msk
0039
0040
0041 if __name__ == '__main__':
0042 ok = opticks_main(doc=__doc__)
0043
0044 log.info(ok.brief)
0045
0046 log.info("[AB")
0047 ab = AB(ok)
0048 log.info("]AB")
0049 log.info("[ab.dump")
0050 ab.dump()
0051 log.info("]ab.dump")
0052
0053 rc = ab.RC
0054
0055 level = "fatal" if rc > 0 else "info"
0056 getattr(log, level)(" RC 0x%.2x %s " % (rc,bin(rc)) )
0057
0058
0059
0060
0061
0062
0063
0064
0065 a = ab.a
0066 b = ab.b
0067
0068 if ab.is_comparable:
0069
0070 ab.aselhis = None
0071 log.info("[ab.check_utaildebug")
0072 ab.check_utaildebug()
0073 log.info("]ab.check_utaildebug")
0074 pass
0075
0076
0077