Belle II Software development
SVDEventT0ConfigurationImporter.py
1#!/usr/bin/env python
2
3
10
11"""
12Importer of the SVD EventT0 Configuration
13"""
14import basf2
15from ROOT import Belle2
16import datetime
17
18now = datetime.datetime.now()
19
20selectTracksFromIP = True
21minimumPtSelection = 0.25
22absPzSelection = 0.0
23absD0Selection = 0.5
24absZ0Selection = 2
25
26
28 ''' Importer of the SVD EventT0 Configuration'''
29
30 def beginRun(self):
31 '''begin run'''
32
34
35 uniqueID = f"SVDEventT0Configuration_default_{now.isoformat()}_INFO:min-pt={minimumPtSelection}_pz={absPzSelection}"
36
37 svdEventT0ConfigurationSpecificString = ""
38 if selectTracksFromIP:
39 svdEventT0ConfigurationSpecificString = f"_selectTracksFromIP_d0={absD0Selection}_z0={absZ0Selection}"
40
41 uniqueID += svdEventT0ConfigurationSpecificString
42
43 payload = Belle2.SVDEventT0Configuration(uniqueID)
44
45 payload.setSelectTracksFromIP(selectTracksFromIP)
46 payload.setMinimumPtSelection(minimumPtSelection)
47 payload.setAbsPzSelection(absPzSelection)
48 payload.setAbsD0Selection(absD0Selection)
49 payload.setAbsZ0Selection(absZ0Selection)
50
51 Belle2.Database.Instance().storeData(payload.get_name(), payload, iov)
52
53
54main = basf2.create_path()
55
56# Event info setter - execute single event
57eventinfosetter = basf2.register_module('EventInfoSetter')
58eventinfosetter.param({'evtNumList': [1], 'expList': 0, 'runList': 0})
59main.add_module(eventinfosetter)
60
61main.add_module(svdEventT0ConfigurationImporter())
62
63# Process events
64basf2.process(main)
static IntervalOfValidity always()
Function that returns an interval of validity that is always valid, c.f.
This class store the configuration of the selections applied on the tracks used to compute the SVD Ev...
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:42