Tracker-Alignable build-process

Scope

Goal of this page is to describe the build-process of the AlignableTracker -class, which holds and provides access to all alignables of the CMS-Tracker. The creation is introduced and explained based on the output of the test-EDAnalyzer TrackerGeometryAnalyzer, which creates and analyzes an AlignableTracker -object. To comprehend the shown results and log-outputs on this page, simply run the TrackerGeometryAnalyzer with the supplied config-file. You can switch between Run-I geometry and Phase-I geometry by commenting/uncommenting the lines responsible for loading the geometry. Additionally, you can also find most parts of the following content in the presentation linked at the end of this page.

Building Alignables

Basically, the tracker consists of two types of Alignables. First, there are the AlignableDetUnits, which represents the smallest units which can be aligned, usually the modules of a subdetector. Second, the composite Alignables are structures which are composites of other Alignables. The AlignableTrackerBuilder is the responsible class for building all the tracker-alignables. The dependencies of this builder are the TrackerGeometry and the TrackerTopology; based on these given objects the AlignableTrackerBuilder is able to decide which geometry-version is loaded and builds the alignables accordingly. The principle workflow of the Alignable build-process is shown in the sequence diagram and explained more detailed in the following sections.

seq-diagram-alignables.png

The alignable build-process in general is pretty much verbose and let you know, which version of geometry is loaded and what was built during the process etc. To get the log-output one has to add the category 'AlignableBuildProcess' to the logger settings in the python-config, see the config-file for the TrackerGeometryAnalyzer for example.

AlignableDetUnits

AlignableDetUnits will be built from GeomDets and GeomDetUnits. These classes are the CMSSW-Geometry-Framework representation of a detector-unit and can be accessed for each subdetector via the TrackerGeometry, e.g. for the PixelBarrel with TrackerGeometry::detsPXB(). When building the AlignableDetUnits we differentiate between pixel- and strip-detector. In pixel, the tracker consists only of GeomDetUnits (also called 1D-modules) and we can convert them 1 to 1 to AlignableDetUnits (see here), no other efforts are necessary. In the strip-detector, the tracker also consists of 2D-modules; for this kind of GeomDet an AlignableSiStripDet is built (see here). Actually, this is a composite alignable but they were treated in this step of the process as AlignableDetUnits, because internally the AlignableSiStripDet consists of multiple AlignableDetUnits (usually 2). The following output shows the converted PixelBarrel -modules for the Run-I geometry:

%MSG-i AlignableBuildProcess: TrackerGeometryAnalyzer:TrackerGeometryAnalyzer@beginRun AlignableTrackerBuilder::convertGeomDetsToAlignables() 14-Mar-2016 14:07:14 CET Run: 1
converted GeomDets to Alignables for TPBModule
 GeomDets: 768
 AlignableDetUnits: 768
%MSG

This snippet shows the same log-output, but for the Phase-I geometry. Note the two main differences:

1) In Phase-I PixelBarrel there are more modules than in Run-I

2) The name of the modules changes from 'TPBModule' to 'P1PXBModule'

%MSG-i AlignableBuildProcess: TrackerGeometryAnalyzer:TrackerGeometryAnalyzer@beginRun AlignableTrackerBuilder::convertGeomDetsToAlignables() 14-Mar-2016 13:57:13 CET Run: 1
converted GeomDets to Alignables for P1PXBModule
 GeomDets: 1184
 AlignableDetUnits: 1184
%MSG

AlignableComposites

Preparations

Composite Alignables are higher-level structures which ca be aligned, e.g. the ladders of the PixelBarrel. These structure-types are defined in an enum (here) in the CommonAlignment-package and only used for Alignment, that means outside of the Alignment-package there is no equivalent for them, especially the TrackerGeometry only knows about subdetectors, but not of substructures the subdetectors. This makes it necessay to collect information about the existing structures which is done by a class called TrackerAlignmentLevelBuilder during the build-process of the AlignableDetUnits ( here). After an AlignableDetUnit was built, this unit is passed (actually the DetId) to the level-builder, which - by using the TrackerTopology - analyzes and 'squeezes' every possible geometry-related information out of this unit. For example, for the PixelBarrel that means we want to know the layer-ID, the ladder-ID and the module-ID of the unit (here). These numbers are inserted into a std::set, which means we insert and count every ID only once.

After the build-process of the AlignableDetUnits is finished, the TrackerAlignmentLevelBuilder can be asked to build all alignment-levels for the tracker by calling TrackerAlignmentLevelBuilder::build() (called here); for this, the class uses all the before gathered information about the geometry. The log-output shows a summary of the collected information, for the current Run-I geometry of the PixelBarrel:

%MSG-i AlignableBuildProcess: TrackerGeometryAnalyzer:TrackerGeometryAnalyzer@beginRun TrackerAlignmentLevelBuilder::buildPXBAlignmentLevels() 14-Mar-2016 14:07:14 CET Run: 1
determined following numbers for TPBBarrel geometry:
 max. number of modules: 8
 max. number of ladders: 22
 ladders in layer-0: 20
 ladders in layer-1: 32
 ladders in layer-2: 44
 max. number of layers: 3
%MSG

And for the upgraded Phase-I PixelBarrel:

%MSG-i AlignableBuildProcess: TrackerGeometryAnalyzer:TrackerGeometryAnalyzer@beginRun TrackerAlignmentLevelBuilder::buildPXBAlignmentLevels() 14-Mar-2016 13:57:13 CET Run: 1
determined following numbers for P1PXBBarrel geometry:
 max. number of modules: 8
 max. number of ladders: 32
 ladders in layer-0: 12
 ladders in layer-1: 28
 ladders in layer-2: 44
 ladders in layer-3: 64
 max. number of layers: 4
%MSG

AlignmentLevels and AlignableCompositeBuilder

As mentioned before, the result of the TrackerAlignmentLevelBuilder is a vector with AlignmentLevels. An AlignmentLevel simply encapsulates a structure-type and its maximum number of occurrence. The important things is the order of the AlignmentLevels in the vector, because this describes the parent-child relation between the substructures. When building the levels for the PixelBarrel, you can see the order of the created AlignmentLevels starts with the 'smallest' structure, the modules, followed by the ladders, layers, half-barrels and the barrel itself.

Actually, what is returned by the TrackerAlignmentLevelBuilder::build() method is a vector of vectors: for each subdetector one vector with its AlignmentLevels, so for Run-I and Phase-I geometry we get six vectors. The AlignableCompositeBuilder builds - as the name already reveals - composite Alignables, and needs AlignmentLevels for this as an input. Hence, the AlignableTrackerBuilder loops over the vectors with AlignmentLevels created by the level-builder, and adds each AlignmentLevel of a subdetector to the composite builder (here).

Based on the numbers determined by the level-builder, the AlignableCompositeBuilder does following calculations:

1) First, values of Run-I geometry:

1 Barrel * 2 HalfBarrels = 2 HalfBarrels -Alignables

2 HalfBarrels * 3 Layers = 6 Layer-Alignables (actually these are Half-Layers, the naming here is a little impractical)

6 Layers * 22 Ladders = 132 Ladders (! maximum !)

20 Ladders in Layer0 (10 in Layer0+ and 10 in Layer0-) +

32 Ladders in Layer1 (16 in Layer1+ and 16 in Layer1-) +

44 Ladders in Layer2 (22 in Layer2+ and 22 in Layer2-)

= 96 Ladder-Alignables

The according log-output of this calculation looks like this:

%MSG-i AlignableBuildProcess: TrackerGeometryAnalyzer:TrackerGeometryAnalyzer@beginRun AlignableCompositeBuilder::buildAll() 14-Mar-2016 14:07:14 CET Run: 1
building CompositeAlignables for TPBBarrel
 built 96 TPBLadder(s) (theoretical maximum: 132) consisting of 768 TPBModule(s)
 built 6 TPBLayer(s) (theoretical maximum: 6) consisting of 96 TPBLadder(s)
 built 2 TPBHalfBarrel(s) (theoretical maximum: 2) consisting of 6 TPBLayer(s)
 built 1 TPBBarrel(s) (theoretical maximum: 1) consisting of 2 TPBHalfBarrel(s)
built 105 CompositeAlignables for TPBBarrel
%MSG
2) Calculation with values of Phase-I geometry:

1 Barrel * 2 HalfBarrels = 2 HalfBarrels -Alignables

2 HalfBarrels * 4 Layers = 8 Layer-Alignables

8 Layers * 32 Ladders = 256 Ladders (! maximum !)

12 Ladders in Layer0 (6 in Layer0+ and 6 in Layer0-) +

28 Ladders in Layer1 (14 in Layer1+ and 14 in Layer1-) +

44 Ladders in Layer2 (22 in Layer2+ and 22 in Layer2-) +

64 Ladders in Layer2 (32 in Layer2+ and 32 in Layer2-)

= 148 Ladder-Alignables

And again, we can find the same numbers in the log-file:

%MSG-i AlignableBuildProcess: TrackerGeometryAnalyzer:TrackerGeometryAnalyzer@beginRun AlignableCompositeBuilder::buildAll() 14-Mar-2016 13:57:13 CET Run: 1
building CompositeAlignables for P1PXBBarrel
 built 148 P1PXBLadder(s) (theoretical maximum: 256) consisting of 1184 P1PXBModule(s)
 built 8 P1PXBLayer(s) (theoretical maximum: 8) consisting of 148 P1PXBLadder(s)
 built 2 P1PXBHalfBarrel(s) (theoretical maximum: 2) consisting of 8 P1PXBLayer(s)
 built 1 P1PXBBarrel(s) (theoretical maximum: 1) consisting of 2 P1PXBHalfBarrel(s)
built 159 CompositeAlignables for P1PXBBarrel
%MSG

After the composite Alignables of one subdetector was built, the AlignmentLevels of the composite-builder will be cleared (preparation for the next subdetector).

The class AlignableMap

During the build-process all Alignables will be grouped together, that means all module-alignables of a subdetector will be stored in a list, also all Alignables of a AlignmentLevel resp. a substructure will be stored in lists. The resulting AlignableTracker contains this lists (member: alignableMap) and provides access to the Alignables via the method AlignableTracker::subStructures(), which takes the name of the substructure. For example:

AlignableTracker::subStructures("TPBModule") -> delivers all modules of PixelBarrel, but only if current geometry is Run-I

AlignableTracker::subStructures("P1PXBModule") -> delivers all modules of PixelBarrel, but only if current geometry is Phase-I

AlignableTracker::subStructures("TPBLayer") -> delivers all layers in PixelBarrel, again, only if a Run-I geometry is loaded

AlignableTracker::subStructures("P1PXBLayer") -> delivers all layers in PixelBarrel of Phase-I geometry

The name <-> list mapping is done with the Structure-type enum and its translation to strings (here); this translation is done accordingly to the geometry-version, which results in different names for the substructures. One has to take care of this when writing the config-file for an alignment-job, because the selection of what will be aligned is based on these strings.

# Define the high-level structure alignables
process.AlignmentProducer.ParameterBuilder.SelectorRigid = cms.PSet(
  alignParams = cms.vstring(
    'TrackerTPBHalfBarrel,111111',     # --> TrackerP1PXBHafBarrel,111111'
    'TrackerTPEHalfCylinder,111111',   # --> TrackerP1XECHalfCylinder,111111'
    ...
)

NOTICE

The code of the CMSSW-Framework, where the strings of the python-config file and the internal mapping will 'encounter', is in the AlignmentParameterSelector. As you can see there, the AlignmentParameterSelector only uses the AlignableTracker::subStructures() method of the tracker, and calls this methods using the strings of the python-config-file. Hence, one has to enter the proper names of the substructures in an alignment-job according to the currently loaded geometry, otherwise this method will return empty lists. You can also see, that in both classes the code which uses the hardcoded substructure-names is marked as deprecated (here for the AlignableTracker, here for the AlignmentParameterSelector).

Printing the AlignableTracker structure

The TrackerGeometryAnalyzer has a feature which allows to print a descriptive text-output of the AlignableTracker and its sub-Alignables. Therefore the python config must contain following settings:

analyzeAlignables     = cms.bool(True),
printTrackerStructure = cms.bool(True),
maxPrintDepth         = cms.int32(10)

The maxPrintDepth variable determines which substructure-level will be included in the output. For example, for

maxPrintDepth         = cms.int32(1)

the output contains only the first substructure-level of the tracker (Run-I geometry):

TrackerAlignable-structure:
Pixel >> consists of 3 Alignable(s)
Strip >> consists of 6 Alignable(s)

The following snippet shows the output for maxPrintDepth = 4 (also Run-I geometry). Of course you can also set the print-depth to the trackers maximum (just set it to a high number, like 10 or higher), the output then contains each Alignable of the tracker (naturally, this results in a huge output).

TrackerAlignable-structure:
Pixel                    >> consists of 3 Alignable(s)
   TPBBarrel             >> consists of 2 Alignable(s)
      TPBHalfBarrel      >> consists of 3 Alignable(s)
         TPBLayer        >> consists of 10 Alignable(s)
         TPBLayer        >> consists of 16 Alignable(s)
         TPBLayer        >> consists of 22 Alignable(s)
      TPBHalfBarrel      >> consists of 3 Alignable(s)
         TPBLayer        >> consists of 10 Alignable(s)
         TPBLayer        >> consists of 16 Alignable(s)
         TPBLayer        >> consists of 22 Alignable(s)
   TPEEndcap             >> consists of 2 Alignable(s)
      TPEHalfCylinder    >> consists of 2 Alignable(s)
         TPEHalfDisk     >> consists of 12 Alignable(s)
         TPEHalfDisk     >> consists of 12 Alignable(s)
      TPEHalfCylinder    >> consists of 2 Alignable(s)
         TPEHalfDisk     >> consists of 12 Alignable(s)
         TPEHalfDisk     >> consists of 12 Alignable(s)
   TPEEndcap             >> consists of 2 Alignable(s)
      TPEHalfCylinder    >> consists of 2 Alignable(s)
         TPEHalfDisk     >> consists of 12 Alignable(s)
         TPEHalfDisk     >> consists of 12 Alignable(s)
      TPEHalfCylinder    >> consists of 2 Alignable(s)
         TPEHalfDisk     >> consists of 12 Alignable(s)
         TPEHalfDisk     >> consists of 12 Alignable(s)
Strip                    >> consists of 6 Alignable(s)
   TIBBarrel             >> consists of 2 Alignable(s)
      TIBHalfBarrel      >> consists of 4 Alignable(s)
         TIBLayer        >> consists of 2 Alignable(s)
         TIBLayer        >> consists of 2 Alignable(s)
         TIBLayer        >> consists of 2 Alignable(s)
         TIBLayer        >> consists of 2 Alignable(s)
      TIBHalfBarrel      >> consists of 4 Alignable(s)
         TIBLayer        >> consists of 2 Alignable(s)
         TIBLayer        >> consists of 2 Alignable(s)
         TIBLayer        >> consists of 2 Alignable(s)
         TIBLayer        >> consists of 2 Alignable(s)
   TIDEndcap             >> consists of 3 Alignable(s)
      TIDDisk            >> consists of 3 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
      TIDDisk            >> consists of 3 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
      TIDDisk            >> consists of 3 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
   TIDEndcap             >> consists of 3 Alignable(s)
      TIDDisk            >> consists of 3 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
      TIDDisk            >> consists of 3 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
      TIDDisk            >> consists of 3 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
         TIDRing         >> consists of 2 Alignable(s)
   TOBBarrel             >> consists of 2 Alignable(s)
      TOBHalfBarrel      >> consists of 6 Alignable(s)
         TOBLayer        >> consists of 42 Alignable(s)
         TOBLayer        >> consists of 48 Alignable(s)
         TOBLayer        >> consists of 54 Alignable(s)
         TOBLayer        >> consists of 60 Alignable(s)
         TOBLayer        >> consists of 66 Alignable(s)
         TOBLayer        >> consists of 74 Alignable(s)
      TOBHalfBarrel      >> consists of 6 Alignable(s)
         TOBLayer        >> consists of 42 Alignable(s)
         TOBLayer        >> consists of 48 Alignable(s)
         TOBLayer        >> consists of 54 Alignable(s)
         TOBLayer        >> consists of 60 Alignable(s)
         TOBLayer        >> consists of 66 Alignable(s)
         TOBLayer        >> consists of 74 Alignable(s)
   TECEndcap             >> consists of 9 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
   TECEndcap             >> consists of 9 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
      TECDisk            >> consists of 2 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)
         TECSide         >> consists of 8 Alignable(s)

-- MaxGunterStark - 2016-03-14

Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf AlignmentFramework-Phase-I-Upgrade.pdf r1 manage 134.1 K 2016-03-15 - 17:02 MaxGunterStark  
PDFpdf seq-diagram-alignables.pdf r1 manage 31.9 K 2016-03-14 - 12:30 MaxGunterStark Sequence diagram of the tracker-alignable build-process
PNGpng seq-diagram-alignables.png r1 manage 171.3 K 2016-03-14 - 15:37 MaxGunterStark Sequence diagram of the tracker-alignable build-process (png-file)
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2016-03-15 - MaxGunterStark
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback