12Test for checking if a generated bremsstrahlung cluster is assigned correctly
13to the primary ECL cluster generated by an electron.
14The test is quite delicate: with the current settings the check fails 10% of the times.
18from ROOT
import Belle2
19from ROOT
import TVector3
29 Module which checks if a generated bremsstrahlung cluster
is assigned correctly
30 to the primary ECL cluster generated by an electron.
35 Load the one track from the data store
and check
if the relation to the brem cluster
36 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")
48 if (eventMetaData.getEvent()
in bad_events):
51 assert(
not bremCluster)
59 Module used to define the position and direction of the
'virtual' bremsstrahlung photon
60 generated by the particle gun
61 Not used at the moment (only
for fit location)
69 for recoTrack
in reco_tracks:
71 print(
"!!!!!!!!!!!!!!!!!!!!!!!!!Position!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
72 hit = recoTrack.getMeasuredStateOnPlaneClosestTo(TVector3(10, 5, -2))
73 hit_pos = hit.getPos()
77 print(hit.getMom().Phi())
78 print(hit.getMom().Theta())
82main = b2.create_path()
85main.add_module(
'EventInfoSetter', evtNumList=[4])
88main.add_module(
'ParticleGun',
91 momentumGeneration=
'fixed',
93 thetaGeneration=
'fixed',
95 phiGeneration=
'fixed',
100main.add_module(
'ParticleGun',
103 momentumGeneration=
'fixed',
105 thetaGeneration=
'fixed',
106 thetaParams=1.6614126908216453 * 180 / 3.1415,
107 phiGeneration=
'fixed',
108 phiParams=0.6210485691762964 * 180 / 3.1415,
109 xVertexParams=[9.27695426703659],
110 yVertexParams=[5.949838410158973],
111 zVertexParams=[-0.9875516764256207],
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.
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)