Belle II Software development
TrackingValidationRun Class Reference
Inheritance diagram for TrackingValidationRun:
BrowseTFileOnTerminateRunMixin ReadOrGenerateTrackedEventsRun PostProcessingRunMixin ReadOrGenerateEventsRun EmptyRun MinimalRun EmptyRun CombinedSVDTrackingValidation CombinedSVDTrackingValidationBkg SVDHoughTrackingValidation SVDHoughTrackingValidationBkg Standalone VXDTF2TrackingValidation VXDTF2TrackingValidationBkg CDCAutomaton CDCAutomaton CDCCR CDCCombined CDCCombined CDCFull CDCFull CDCLegendre CDCLegendre CosmicsAxialHough CosmicsHough Cosmics Full FullBkg fullTrackingValidation_plusECL Full Muon CKFBkg toCDCCKFValidationBkg toCDCfromEclCKF toCDCfromEclCKF

Public Member Functions

def preparePathValidation (self, path)
 
def create_argument_parser (self, **kwds)
 
def create_path (self)
 

Static Public Attributes

TRACKING_MAILING_LIST contact = TRACKING_MAILING_LIST
 Default contact email address for the validation results.
 
str output_file_name = 'TrackingValidation.root'
 Name of the output file for the validation results.
 
None root_output_file = None
 Optional file name as a destination of all event data which is discarded otherwise.
 
bool pulls = True
 Include the pull plots of the fit parameters in the validation.
 
bool resolution = False
 Include the residual plots of the fit parameters in the validation.
 
bool use_expert_folder = True
 Use the "expert" folder in the validation file as the destination of the pull and residual plots.
 
list exclude_profile_mc_parameter = []
 Exclude some of the perigee parameters from the mc side plots.
 
list exclude_profile_pr_parameter = []
 Exclude some of the perigee parameters from the pr side plots.
 
bool use_fit_information = False
 Do not fit the tracks but access the fit information for pulls etc.
 
bool extended = False
 Switch to use the extended harvesting validation instead.
 
bool saveFullTrees = False
 Only works in extended mode.
 
list non_expert_parameters = ['p_{t}']
 List of parameters which should be used as shifter plots (all plots with these x-labels)
 

Detailed Description

Run setup to compose a path to validate the the tracking procedures from pre-simulated events
or from events simulated on the fly. Considering parameters from the commandline.

Definition at line 24 of file run.py.

Member Function Documentation

◆ create_argument_parser()

def create_argument_parser (   self,
**  kwds 
)
Create command line argument parser

Reimplemented from BrowseTFileOnTerminateRunMixin.

Definition at line 102 of file run.py.

102 def create_argument_parser(self, **kwds):
103 """Create command line argument parser"""
104 argument_parser = super().create_argument_parser(**kwds)
105
106 # Left over from earlier parameter settings. Overwrites the more fundamental simulation_only parameter
107 argument_parser.add_argument(
108 '-o',
109 '--output',
110 dest='simulation_output',
111 default=argparse.SUPPRESS,
112 help='Output file to which the simulated events shall be written.'
113 )
114
115 argument_parser.add_argument(
116 '-e',
117 '--extended',
118 dest='extended',
119 action='store_true',
120 default=argparse.SUPPRESS,
121 help='Use the extended validation with more plots and whistles'
122 )
123
124 return argument_parser
125

◆ create_path()

def create_path (   self)
Create path from parameters

Reimplemented from ReadOrGenerateTrackedEventsRun.

Definition at line 126 of file run.py.

126 def create_path(self):
127 """Create path from parameters"""
128 # Sets up a path that plays back pregenerated events or generates events
129 # based on the properties in the base class.
130 path = super().create_path()
131
132 # add the validation module to the path
133 self.preparePathValidation(path)
134
135 if self.root_output_file:
136 path.add_module("RootOutput", outputFileName=self.root_output_file)
137
138 return path
139
140

◆ preparePathValidation()

def preparePathValidation (   self,
  path 
)
The default way to add the validation module to the path.

Derived classes can overload this method modify the validation module
or add more than one validation steps.

Definition at line 64 of file run.py.

64 def preparePathValidation(self, path):
65 """The default way to add the validation module to the path.
66
67 Derived classes can overload this method modify the validation module
68 or add more than one validation steps.
69 """
70
71 if self.extended:
72 expert_level = None
73 if self.saveFullTrees:
74 expert_level = 200
75
76 trackingValidationModule = CombinedTrackingValidationModule(
77 name=self.name,
78 contact=self.contact,
79 output_file_name=self.output_file_name,
80 expert_level=expert_level
81 )
82 else:
83 # Validation module generating plots
84 trackingValidationModule = ExpertTrackingValidationModule(
85 self.name,
86 contact=self.contact,
87 fit=self.use_fit_information or self.fit_tracks,
88 pulls=self.pulls,
89 resolution=self.resolution,
90 output_file_name=self.output_file_name,
91 use_expert_folder=self.use_expert_folder,
92 exclude_profile_mc_parameter=self.exclude_profile_mc_parameter,
93 exclude_profile_pr_parameter=self.exclude_profile_pr_parameter
94 )
95 trackingValidationModule.trackCandidatesColumnName = "RecoTracks"
96
97 # tell the module which are the shifter (aka non-experts) plots
98 trackingValidationModule.non_expert_parameters = self.non_expert_parameters
99
100 path.add_module(trackingValidationModule)
101

Member Data Documentation

◆ contact

TRACKING_MAILING_LIST contact = TRACKING_MAILING_LIST
static

Default contact email address for the validation results.

Definition at line 29 of file run.py.

◆ exclude_profile_mc_parameter

list exclude_profile_mc_parameter = []
static

Exclude some of the perigee parameters from the mc side plots.

Definition at line 47 of file run.py.

◆ exclude_profile_pr_parameter

list exclude_profile_pr_parameter = []
static

Exclude some of the perigee parameters from the pr side plots.

Definition at line 50 of file run.py.

◆ extended

bool extended = False
static

Switch to use the extended harvesting validation instead.

Definition at line 56 of file run.py.

◆ non_expert_parameters

list non_expert_parameters = ['p_{t}']
static

List of parameters which should be used as shifter plots (all plots with these x-labels)

Definition at line 62 of file run.py.

◆ output_file_name

str output_file_name = 'TrackingValidation.root'
static

Name of the output file for the validation results.

Definition at line 32 of file run.py.

◆ pulls

bool pulls = True
static

Include the pull plots of the fit parameters in the validation.

Definition at line 38 of file run.py.

◆ resolution

bool resolution = False
static

Include the residual plots of the fit parameters in the validation.

Definition at line 41 of file run.py.

◆ root_output_file

None root_output_file = None
static

Optional file name as a destination of all event data which is discarded otherwise.

Definition at line 35 of file run.py.

◆ saveFullTrees

bool saveFullTrees = False
static

Only works in extended mode.

Definition at line 59 of file run.py.

◆ use_expert_folder

bool use_expert_folder = True
static

Use the "expert" folder in the validation file as the destination of the pull and residual plots.

Definition at line 44 of file run.py.

◆ use_fit_information

bool use_fit_information = False
static

Do not fit the tracks but access the fit information for pulls etc.

Definition at line 53 of file run.py.


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