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

Public Member Functions

def __init__ (self, mc_track_cands_store_array_name, legendre_track_cand_store_array_name, output_file_name)
 
def prepare (self)
 
def peel (self, legendre_track_cand)
 

Public Attributes

 mc_track_cands_store_array_name
 cached name of the MCTrackCands StoreArray
 
 legendre_track_cand_store_array_name
 cached name of the LegendreTrackCands StoreArray
 
 circle_fitter
 Use the Riemann fitter for circles.
 
 fast_fitter
 Use the standard track fitter for speed.
 
 cdcHits
 cached name of the CDCHits StoreArray
 

Static Public Attributes

refiners save_tree = refiners.save_tree(folder_name="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

Validate the track fit

Definition at line 23 of file fitValidation.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  mc_track_cands_store_array_name,
  legendre_track_cand_store_array_name,
  output_file_name 
)
Constructor

Reimplemented from HarvestingModule.

Definition at line 26 of file fitValidation.py.

30 output_file_name):
31 """Constructor"""
32 super().__init__(
33 foreach=legendre_track_cand_store_array_name,
34 output_file_name=output_file_name)
35
36
37 self.mc_track_cands_store_array_name = mc_track_cands_store_array_name
38
39 self.legendre_track_cand_store_array_name = legendre_track_cand_store_array_name
40
41
43
44 self.fast_fitter = Belle2.TrackFindingCDC.TrackFitter()
45
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.

Member Function Documentation

◆ peel()

def peel (   self,
  legendre_track_cand 
)
Aggregate the track and MC information for track-fit validation

Reimplemented from HarvestingModule.

Definition at line 52 of file fitValidation.py.

52 def peel(self, legendre_track_cand):
53 """Aggregate the track and MC information for track-fit validation"""
54
55 cdc_hit_store_array = self.cdcHits
56
57 # observations_variance = Belle2.TrackFindingCDC.CDCObservations2D()
59 hits = ROOT.std.vector("Belle2::TrackFindingCDC::TrackHit*")()
60
61 cdc_hit_ids = legendre_track_cand.getHitIDs(Belle2.Const.CDC)
62 for cdc_hit_id in cdc_hit_ids:
63 cdc_hit = cdc_hit_store_array[cdc_hit_id]
64
65 # We will only use the axial hits here as the FastFit can only process axial hits too
66 if cdc_hit.getISuperLayer() % 2 == 0:
67 cdc_wire_hit = Belle2.TrackFindingCDC.CDCWireHit(cdc_hit)
68
69 wireRefPos2D = cdc_wire_hit.getRefPos2D()
70 drift_length = cdc_wire_hit.getRefDriftLength()
71 observations.append(wireRefPos2D.x(), wireRefPos2D.y(), 0, 1 / abs(drift_length))
72 hits.push_back(Belle2.TrackFindingCDC.TrackHit(cdc_wire_hit))
73
74 # Viktors method
75 track_par = ROOT.std.pair("double, double")()
76 ref_point = ROOT.std.pair("double, double")()
77 # Careful: viktors result is a reduced chi2
78 viktor_chi2 = self.fast_fitter.fitTrackCandidateFast(hits, track_par, ref_point, False) * (hits.size() - 4)
79
80 # Riemann without drift variances
82 self.circle_fitter.update(trajectory2D, observations)
83 riemann_chi2 = trajectory2D.getChi2()
84
85 return_dict = dict(
86 riemann_chi2=riemann_chi2,
87 viktor_chi2=viktor_chi2,
88 )
89
90 return return_dict
91
Class serving as a storage of observed drift circles to present to the Riemann fitter.
Particle trajectory as it is seen in xy projection represented as a circle.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55

◆ prepare()

def prepare (   self)
 Initialize the harvester

Reimplemented from HarvestingModule.

Definition at line 46 of file fitValidation.py.

46 def prepare(self):
47 """ Initialize the harvester"""
48
49 self.cdcHits = Belle2.PyStoreArray("CDCHits")
50 return HarvestingModule.prepare(self)
51
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

Member Data Documentation

◆ cdcHits

cdcHits

cached name of the CDCHits StoreArray

Definition at line 49 of file fitValidation.py.

◆ circle_fitter

circle_fitter

Use the Riemann fitter for circles.

Definition at line 42 of file fitValidation.py.

◆ fast_fitter

fast_fitter

Use the standard track fitter for speed.

Definition at line 44 of file fitValidation.py.

◆ legendre_track_cand_store_array_name

legendre_track_cand_store_array_name

cached name of the LegendreTrackCands StoreArray

Definition at line 39 of file fitValidation.py.

◆ mc_track_cands_store_array_name

mc_track_cands_store_array_name

cached name of the MCTrackCands StoreArray

Definition at line 37 of file fitValidation.py.

◆ save_tree

refiners save_tree = refiners.save_tree(folder_name="tree")
static

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 94 of file fitValidation.py.


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