13from ROOT
import Belle2
21 Module which checks relations/variables have been properly set for track-cluster matching
22 Note that this does
not check the performance of the track-cluster matching
27 Load tracks from StoreArray
for each event,
and perform tests of module
33 cluster = track.getRelatedTo(
"ECLClusters")
36 assert cluster.isTrack(),
"Cluster does not have track set despite relation existing"
38 fit_result = track.getTrackFitResultWithClosestMass(211)
39 pt = fit_result.getTransverseMomentum()
40 theta = fit_result.getMomentum().Theta()
41 if (pt < 0.3
and theta > 0.5480334)
or (pt > 0.3
and theta > 0.5480334
and theta < 0.561996):
42 assert track.getRelatedTo(
43 "ECLClusters",
"EnterCrystal")
is not None,
"Relation set with EnterCrystal method does not exist"
45 assert track.getRelatedTo(
46 "ECLClusters",
"AngularDistance")
is not None,
"Relation set with AngularDistance method does not exist"
51main = b2.create_path()
53main.add_module(
'EventInfoSetter', evtNumList=[10])
55main.add_module(
'ParticleGun',
58 momentumGeneration=
'uniform',
59 momentumParams=[0.1, 1])
62main.add_module(
'ParticleGun',
65 momentumGeneration=
'fixed',
67 thetaGeneration=
'uniform',
68 thetaParams=[31.4, 32.2])
A (simplified) python wrapper for StoreArray.
def add_reconstruction(path, components=None, pruneTracks=True, add_trigger_calculation=True, skipGeometryAdding=False, trackFitHypotheses=None, addClusterExpertModules=True, use_second_cdc_hits=False, add_muid_hits=False, reconstruct_cdst=None, event_abort=default_event_abort, use_random_numbers_for_hlt_prescale=True, pxd_filtering_offline=False, create_intercepts_for_pxd_ckf=False, append_full_grid_cdc_eventt0=True, legacy_ecl_charged_pid=False, emulate_HLT=False, skip_full_grid_cdc_eventt0_if_svd_time_present=True)
def add_simulation(path, components=None, bkgfiles=None, bkgOverlay=True, forceSetPXDDataReduction=False, usePXDDataReduction=True, cleanupPXDDataReduction=True, generate_2nd_cdc_hits=False, simulateT0jitter=True, isCosmics=False, FilterEvents=False, usePXDGatedMode=False, skipExperimentCheckForBG=False, save_slow_pions_in_mc=False)