Belle II Software development
SegmentFinderParameterExtractorModule Class Reference
Inheritance diagram for SegmentFinderParameterExtractorModule:
HarvestingModule

Public Member Functions

def __init__ (self, local_track_cands_store_array_name, mc_track_cands_store_array_name, output_file_name)
 
def peel (self, local_track_cand)
 

Public Attributes

 mc_track_cands_store_array_name
 cached name of the TrackCands StoreArray
 
 mc_track_matcher
 function to match tracks to MC tracks
 

Static Public Attributes

refiners save_tree
 Refiners to be executed at the end of the harvesting / termination of the module Save a tree of all collected variables in a sub folder.
 

Detailed Description

Harvester module to extract momentum and position information from the found segments and tracks.
You need the apply MC track matcher module.

Definition at line 273 of file harvester.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  local_track_cands_store_array_name,
  mc_track_cands_store_array_name,
  output_file_name 
)
 Init the harvester with the local track candidates StoreArray name and the one for MC track cands
and the output file name for the result root file.

Reimplemented from HarvestingModule.

Definition at line 280 of file harvester.py.

280 def __init__(self, local_track_cands_store_array_name, mc_track_cands_store_array_name, output_file_name):
281 """ Init the harvester with the local track candidates StoreArray name and the one for MC track cands
282 and the output file name for the result root file.
283 """
284 super().__init__(
285 foreach=local_track_cands_store_array_name,
286 output_file_name=output_file_name)
287
288
289 self.mc_track_cands_store_array_name = mc_track_cands_store_array_name
290
291
292 self.mc_track_matcher = Belle2.TrackMatchLookUp(self.mc_track_cands_store_array_name,
293 self.foreach)
294
Class to provide convenient methods to look up matching information between pattern recognition and M...

Member Function Documentation

◆ peel()

def peel (   self,
  local_track_cand 
)
 Extract the information from the local track candidate. 

Reimplemented from HarvestingModule.

Definition at line 295 of file harvester.py.

295 def peel(self, local_track_cand):
296 """ Extract the information from the local track candidate. """
297 mc_track_matcher = self.mc_track_matcher
298
299 is_matched = mc_track_matcher.isAnyChargeMatchedPRRecoTrack(local_track_cand)
300 is_background = mc_track_matcher.isBackgroundPRRecoTrack(local_track_cand)
301 is_ghost = mc_track_matcher.isGhostPRRecoTrack(local_track_cand)
302
303 related_mc_track_cand = mc_track_matcher.getRelatedMCRecoTrack(local_track_cand)
304
305 track_momentum = np.NaN
306 # track_position = np.NaN
307 track_pt = np.NaN
308 track_phi = np.NaN
309
310 segment_momentum = np.NaN
311 # segment_position = np.NaN
312 segment_pt = np.NaN
313 segment_phi = np.NaN
314
315 if is_matched:
316 track_momentum = related_mc_track_cand.getPosSeed()
317 # track_position = related_mc_track_cand.getPosSeed()
318 track_pt = track_momentum.Pt()
319 track_phi = track_momentum.Phi()
320 # trajectory_track = \
321 # Belle2.TrackFindingCDC.CDCTrajectory3D(Belle2.TrackFindingCDC.Vector3D(track_position),
322 # Belle2.TrackFindingCDC.Vector3D(track_momentum),
323 # related_mc_track_cand.getChargeSeed())
324
325 segment_momentum = local_track_cand.getMomSeed()
326 # segment_position = local_track_cand.getPosSeed()
327 segment_pt = segment_momentum.Pt()
328 segment_phi = segment_momentum.Phi()
329 # trajectory_segment = \
330 # Belle2.TrackFindingCDC.CDCTrajectory3D(Belle2.TrackFindingCDC.Vector3D(segment_position),
331 # Belle2.TrackFindingCDC.Vector3D(segment_momentum),
332 # local_track_cand.getChargeSeed())
333
334 return dict(is_matched=is_matched,
335 is_background=is_background,
336 is_ghost=is_ghost,
337 segment_pt=segment_pt,
338 track_pt=track_pt,
339 difference_pt=segment_pt - track_pt,
340 segment_phi=segment_phi,
341 track_phi=track_phi,
342 difference_phi=segment_phi - track_phi)
343

Member Data Documentation

◆ mc_track_cands_store_array_name

mc_track_cands_store_array_name

cached name of the TrackCands StoreArray

Definition at line 289 of file harvester.py.

◆ mc_track_matcher

mc_track_matcher

function to match tracks to MC tracks

Definition at line 292 of file harvester.py.

◆ save_tree

refiners save_tree
static
Initial value:
= refiners.save_tree(
)

Refiners to be executed at the end of the harvesting / termination of the module Save a tree of all collected variables in a sub folder.

Definition at line 346 of file harvester.py.


The documentation for this class was generated from the following file: