13 Test for checking if a generated bremsstrahlung cluster is assigned correctly
14 to the primary ECL cluster generated by an electron.
15 The test is quite delicate: with the current settings the check fails 10% of the times.
19 from ROOT
import Belle2
20 from ROOT
import TVector3
25 b2.set_random_seed(42)
30 Module which checks if a generated bremsstrahlung cluster is assigned correctly
31 to the primary ECL cluster generated by an electron.
36 Load the one track from the data store and check if the relation to the brem cluster
37 can been set correctly.
41 for cluster
in clusters:
43 if cluster.isTrack()
and cluster.hasHypothesis(Belle2.ECLCluster.EHypothesisBit.c_nPhotons):
45 bremCluster = cluster.getRelated(
"ECLClusters")
52 Module used to define the position and direction of the 'virtual' bremsstrahlung photon
53 generated by the particle gun
54 Not used at the moment (only for fit location)
62 for recoTrack
in reco_tracks:
64 print(
"!!!!!!!!!!!!!!!!!!!!!!!!!Position!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
65 hit = recoTrack.getMeasuredStateOnPlaneClosestTo(TVector3(10, 5, -2))
66 hit_pos = hit.getPos()
70 print(hit.getMom().Phi())
71 print(hit.getMom().Theta())
75 main = b2.create_path()
78 main.add_module(
'EventInfoSetter', evtNumList=[4])
81 main.add_module(
'ParticleGun',
84 momentumGeneration=
'fixed',
86 thetaGeneration=
'fixed',
88 phiGeneration=
'fixed',
93 main.add_module(
'ParticleGun',
96 momentumGeneration=
'fixed',
98 thetaGeneration=
'fixed',
99 thetaParams=1.6614126908216453 * 180 / 3.1415,
100 phiGeneration=
'fixed',
101 phiParams=0.6210485691762964 * 180 / 3.1415,
102 xVertexParams=[9.27695426703659],
103 yVertexParams=[5.949838410158973],
104 zVertexParams=[-0.9875516764256207],
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)
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)