Skip to content

Modify the tracker database generation tool so it can read an external input....

Markus Tobias Prim requested to merge maprim/calypso:dev into master

This adds a property to the AlignDBTool to pass a dictionary with the corrections.

The structure of the python dictionary is flattened out to be

Data structure:
x[f"{station}] = [x, y, z, alpha, beta, gamma]
x[f"{station}{layer}] = [x, y, z, alpha, beta, gamma]
x[f"{station}{layer}{module}] = [x, y, z, alpha, beta, gamma]

An explicit full example of the data structure with only 0 corrections is:

{'0': [0, 0, 0, 0, 0, 0], '00': [0, 0, 0, 0, 0, 0], '000': [0, 0, 0, 0, 0, 0], '001': [0, 0, 0, 0, 0, 0], '002': [0, 0, 0, 0, 0, 0], '003': [0, 0, 0, 0, 0, 0], '004': [0, 0, 0, 0, 0, 0], '005': [0, 0, 0, 0, 0, 0], '006': [0, 0, 0, 0, 0, 0], '007': [0, 0, 0, 0, 0, 0], '01': [0, 0, 0, 0, 0, 0], '010': [0, 0, 0, 0, 0, 0], '011': [0, 0, 0, 0, 0, 0], '012': [0, 0, 0, 0, 0, 0], '013': [0, 0, 0, 0, 0, 0], '014': [0, 0, 0, 0, 0, 0], '015': [0, 0, 0, 0, 0, 0], '016': [0, 0, 0, 0, 0, 0], '017': [0, 0, 0, 0, 0, 0], '02': [0, 0, 0, 0, 0, 0], '020': [0, 0, 0, 0, 0, 0], '021': [0, 0, 0, 0, 0, 0], '022': [0, 0, 0, 0, 0, 0], '023': [0, 0, 0, 0, 0, 0], '024': [0, 0, 0, 0, 0, 0], '025': [0, 0, 0, 0, 0, 0], '026': [0, 0, 0, 0, 0, 0], '027': [0, 0, 0, 0, 0, 0], '1': [0, 0, 0, 0, 0, 0], '10': [0, 0, 0, 0, 0, 0], '100': [0, 0, 0, 0, 0, 0], '101': [0, 0, 0, 0, 0, 0], '102': [0, 0, 0, 0, 0, 0], '103': [0, 0, 0, 0, 0, 0], '104': [0, 0, 0, 0, 0, 0], '105': [0, 0, 0, 0, 0, 0], '106': [0, 0, 0, 0, 0, 0], '107': [0, 0, 0, 0, 0, 0], '11': [0, 0, 0, 0, 0, 0], '110': [0, 0, 0, 0, 0, 0], '111': [0, 0, 0, 0, 0, 0], '112': [0, 0, 0, 0, 0, 0], '113': [0, 0, 0, 0, 0, 0], '114': [0, 0, 0, 0, 0, 0], '115': [0, 0, 0, 0, 0, 0], '116': [0, 0, 0, 0, 0, 0], '117': [0, 0, 0, 0, 0, 0], '12': [0, 0, 0, 0, 0, 0], '120': [0, 0, 0, 0, 0, 0], '121': [0, 0, 0, 0, 0, 0], '122': [0, 0, 0, 0, 0, 0], '123': [0, 0, 0, 0, 0, 0], '124': [0, 0, 0, 0, 0, 0], '125': [0, 0, 0, 0, 0, 0], '126': [0, 0, 0, 0, 0, 0], '127': [0, 0, 0, 0, 0, 0], '2': [0, 0, 0, 0, 0, 0], '20': [0, 0, 0, 0, 0, 0], '200': [0, 0, 0, 0, 0, 0], '201': [0, 0, 0, 0, 0, 0], '202': [0, 0, 0, 0, 0, 0], '203': [0, 0, 0, 0, 0, 0], '204': [0, 0, 0, 0, 0, 0], '205': [0, 0, 0, 0, 0, 0], '206': [0, 0, 0, 0, 0, 0], '207': [0, 0, 0, 0, 0, 0], '21': [0, 0, 0, 0, 0, 0], '210': [0, 0, 0, 0, 0, 0], '211': [0, 0, 0, 0, 0, 0], '212': [0, 0, 0, 0, 0, 0], '213': [0, 0, 0, 0, 0, 0], '214': [0, 0, 0, 0, 0, 0], '215': [0, 0, 0, 0, 0, 0], '216': [0, 0, 0, 0, 0, 0], '217': [0, 0, 0, 0, 0, 0], '22': [0, 0, 0, 0, 0, 0], '220': [0, 0, 0, 0, 0, 0], '221': [0, 0, 0, 0, 0, 0], '222': [0, 0, 0, 0, 0, 0], '223': [0, 0, 0, 0, 0, 0], '224': [0, 0, 0, 0, 0, 0], '225': [0, 0, 0, 0, 0, 0], '226': [0, 0, 0, 0, 0, 0], '227': [0, 0, 0, 0, 0, 0], '3': [0, 0, 0, 0, 0, 0], '30': [0, 0, 0, 0, 0, 0], '300': [0, 0, 0, 0, 0, 0], '301': [0, 0, 0, 0, 0, 0], '302': [0, 0, 0, 0, 0, 0], '303': [0, 0, 0, 0, 0, 0], '304': [0, 0, 0, 0, 0, 0], '305': [0, 0, 0, 0, 0, 0], '306': [0, 0, 0, 0, 0, 0], '307': [0, 0, 0, 0, 0, 0], '31': [0, 0, 0, 0, 0, 0], '310': [0, 0, 0, 0, 0, 0], '311': [0, 0, 0, 0, 0, 0], '312': [0, 0, 0, 0, 0, 0], '313': [0, 0, 0, 0, 0, 0], '314': [0, 0, 0, 0, 0, 0], '315': [0, 0, 0, 0, 0, 0], '316': [0, 0, 0, 0, 0, 0], '317': [0, 0, 0, 0, 0, 0], '32': [0, 0, 0, 0, 0, 0], '320': [0, 0, 0, 0, 0, 0], '321': [0, 0, 0, 0, 0, 0], '322': [0, 0, 0, 0, 0, 0], '323': [0, 0, 0, 0, 0, 0], '324': [0, 0, 0, 0, 0, 0], '325': [0, 0, 0, 0, 0, 0], '326': [0, 0, 0, 0, 0, 0], '327': [0, 0, 0, 0, 0, 0]}

If for a particular detector element no corrections are given, then the element is skipped, therefore applying no correction. It is therefore possible to only pass, e.g., only layer corrections, and keep the modules in their default position.

Alignment corrections can be passed from command line, e.g. python python/WriteAlignment/WriteAlignmentConfig_FaserTB00.py 'AlignDbTool.AlignmentConstants={"020": [2, 2, 2, 1, 1, 1]}' will apply corrections to station 0, layer 2, module 0, and keep all other detector elements at their default position.

Edited by Markus Tobias Prim

Merge request reports