Belle II Software
release-08-01-10
muonTrackingValidation.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
<header>
13
<contact>software-tracking@belle2.org</contact>
14
<input>MuonGenSimNoBkg.root</input>
15
<output>MuonTrackingValidation.root</output>
16
<description>This script validates the full track finding chain in easy 1 muon events.</description>
17
</header>
18
"""
19
20
from
tracking.validation.run
import
TrackingValidationRun
21
import
tracking
22
import
logging
23
import
basf2
24
VALIDATION_OUTPUT_FILE =
'MuonTrackingValidation.root'
25
N_EVENTS = 10000
26
ACTIVE =
True
27
28
29
class
Muon
(
TrackingValidationRun
):
30
"""Validate the full track-finding chain with single-muon events"""
31
32
n_events = N_EVENTS
33
34
generator_module =
'gun'
35
36
root_input_file =
'../MuonGenSimNoBkg.root'
37
38
finder_module = staticmethod(tracking.add_tracking_reconstruction)
39
40
tracking_coverage = {
41
'WhichParticles'
: [],
# Include all particles, also secondaries
42
'UsePXDHits'
:
True
,
43
'UseSVDHits'
:
True
,
44
'UseCDCHits'
:
True
,
45
"UseReassignedHits"
:
True
,
46
'UseOnlyBeforeTOP'
:
True
,
47
'UseNLoops'
: 1,
48
}
49
51
fit_tracks =
False
52
53
use_fit_information =
True
54
55
use_expert_folder =
False
56
57
pulls =
True
58
59
resolution =
True
60
61
output_file_name = VALIDATION_OUTPUT_FILE
62
63
64
def
main
():
65
basf2.set_random_seed(1337)
66
validation_run =
Muon
()
67
validation_run.configure_and_execute_from_commandline()
68
69
70
if
__name__ ==
'__main__'
:
71
logging.basicConfig(level=logging.INFO)
72
if
ACTIVE:
73
main
()
74
else
:
75
print(
"This validation deactivated and thus basf2 is not executed.\n"
76
"If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
77
"Exiting."
)
muonTrackingValidation.Muon
Definition:
muonTrackingValidation.py:29
tracking.validation.run.TrackingValidationRun
Definition:
run.py:25
main
Definition:
main.py:1
tracking.validation.run
Definition:
run.py:1
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:91
tracking
validation
muonTrackingValidation.py
Generated on Mon Sep 23 2024 14:06:43 for Belle II Software by
1.9.1