Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-14 00:30:02

0001 import FWCore.ParameterSet.Config as cms
0002 process = cms.Process("Alignment")
0003 
0004 ################################################################################
0005 # Variables edited by mps_alisetup.py. Used in functions below.
0006 # You can change them manually as well.
0007 # ------------------------------------------------------------------------------
0008 setupGlobaltag = "122X_dataRun3_Prompt_v3"
0009 setupCollection = "ALCARECOTkAlCosmicsCosmicTF0T"
0010 setupCosmicsDecoMode = True
0011 setupCosmicsZeroTesla = False
0012 setupPrimaryWidth     = -1.0
0013 setupJson             = "placeholder_json"
0014 setupRunStartGeometry = 348908
0015 
0016 ################################################################################
0017 # Variables edited by MPS (mps_setup and mps_merge). Be careful.
0018 # ------------------------------------------------------------------------------
0019 # Default is "mille". Gets changed to "pede" by mps_merge.
0020 setupAlgoMode = "pede"
0021 
0022 # MPS looks specifically for the string "001" so don't change this.
0023 setupMonitorFile      = "millePedeMonitor001.root"
0024 setupBinaryFile       = "milleBinary001.dat"
0025 
0026 # Input files. Edited by mps_splice.py
0027 readFiles = cms.untracked.vstring()
0028 readFiles.extend([
0029     '/store/data/Commissioning2022/Cosmics/ALCARECO/TkAlCosmics0T-PromptReco-v1/000/348/268/00000/863844bd-0350-4131-8ef0-bc2fc1c6cb85.root'])
0030 ################################################################################
0031 
0032 
0033 ################################################################################
0034 # General setup
0035 # ------------------------------------------------------------------------------
0036 import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.GeneralSetup as generalSetup
0037 generalSetup.setup(process, setupGlobaltag, setupCosmicsZeroTesla)
0038 
0039 
0040 ################################################################################
0041 # setup alignment producer
0042 # ------------------------------------------------------------------------------
0043 import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.ConfigureAlignmentProducer as confAliProducer
0044 
0045 confAliProducer.setConfiguration(process,
0046     collection   = setupCollection,
0047     mode         = setupAlgoMode,
0048     monitorFile  = setupMonitorFile,
0049     binaryFile   = setupBinaryFile,
0050     primaryWidth = setupPrimaryWidth,
0051     cosmicsZeroTesla = setupCosmicsZeroTesla)
0052 
0053 
0054 ################################################################################
0055 # Overwrite some conditions in global tag
0056 # ------------------------------------------------------------------------------
0057 import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.SetCondition as tagwriter
0058 
0059 #######################
0060 ## insert Alignables ##
0061 #######################
0062 
0063 # # to run a high-level alignment on real data (including TOB centering; use
0064 # # pixel-barrel centering for MC) of the whole tracker you can use the
0065 # # following configuration:
0066 ##
0067 process.AlignmentProducer.ParameterBuilder.parameterTypes = [
0068     "SelectorRigid,RigidBody"
0069     ]
0070 #
0071 # # Define the high-level structure alignables
0072 process.AlignmentProducer.ParameterBuilder.SelectorRigid = cms.PSet(
0073     alignParams = cms.vstring(
0074         "TrackerP1PXBHalfBarrel,111111",
0075         "TrackerP1PXECHalfCylinder,111111",
0076         "TrackerTIBHalfBarrel,111111",
0077         "TrackerTOBHalfBarrel,rrrrrr",
0078         "TrackerTIDEndcap,111111",
0079         "TrackerTECEndcap,111111",
0080         )
0081     )
0082 
0083 #########################
0084 ## insert Pedesettings ##
0085 #########################
0086 import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.helper as helper
0087 helper.set_pede_option(process, "entries 100 10 2")
0088 # helper.set_pede_option(process, "compress", drop = True)
0089 
0090 import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.helper as helper
0091 helper.set_pede_option(process, "skipemptycons")
0092 
0093 ################################################################################
0094 # Mille-procedure
0095 # ------------------------------------------------------------------------------
0096 if setupAlgoMode == "mille":
0097     import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.MilleSetup as mille
0098     mille.setup(process,
0099                 input_files        = readFiles,
0100                 collection         = setupCollection,
0101                 json_file          = setupJson,
0102                 cosmics_zero_tesla = setupCosmicsZeroTesla,
0103                 cosmics_deco_mode  = setupCosmicsDecoMode)
0104 
0105 ################################################################################
0106 # Pede-procedure
0107 # ------------------------------------------------------------------------------
0108 else:
0109     # placeholers get replaced by mps_merge.py, which is called in mps_setup.pl
0110     merge_binary_files = [
0111         'milleBinary055.dat',
0112         'milleBinary056.dat',
0113         'milleBinary057.dat',
0114         'milleBinary058.dat',
0115         'milleBinary059.dat',
0116         'milleBinary076.dat',
0117         'milleBinary077.dat',
0118         'milleBinary078.dat',
0119         'milleBinary079.dat',
0120         'milleBinary096.dat',
0121         'milleBinary098.dat',
0122         'milleBinary099.dat',
0123         'milleBinary100.dat',
0124         'milleBinary101.dat',
0125         'milleBinary134.dat',
0126         'milleBinary135.dat',
0127         'milleBinary136.dat',
0128         'milleBinary137.dat',
0129         'milleBinary138.dat',
0130         'milleBinary139.dat',
0131         'milleBinary140.dat',
0132         'milleBinary141.dat',
0133         'milleBinary142.dat',
0134         'milleBinary143.dat',
0135         'milleBinary144.dat',
0136         'milleBinary145.dat',
0137         'milleBinary146.dat',
0138         'milleBinary147.dat',
0139         'milleBinary149.dat',
0140         'milleBinary150.dat',
0141         'milleBinary151.dat',
0142         'milleBinary152.dat',
0143         'milleBinary153.dat',
0144         'milleBinary154.dat',
0145         'milleBinary163.dat',
0146         'milleBinary164.dat',
0147         'milleBinary165.dat',
0148         'milleBinary166.dat',
0149         'milleBinary167.dat',
0150         'milleBinary168.dat',
0151         'milleBinary177.dat',
0152         'milleBinary180.dat',
0153         'milleBinary182.dat',
0154         'milleBinary183.dat',
0155         'milleBinary184.dat',
0156         'milleBinary185.dat',
0157         'milleBinary186.dat',
0158         'milleBinary187.dat']
0159     merge_tree_files = [
0160         'treeFile055.dat',
0161         'treeFile056.dat',
0162         'treeFile057.dat',
0163         'treeFile058.dat',
0164         'treeFile059.dat',
0165         'treeFile076.dat',
0166         'treeFile077.dat',
0167         'treeFile078.dat',
0168         'treeFile079.dat',
0169         'treeFile096.dat',
0170         'treeFile098.dat',
0171         'treeFile099.dat',
0172         'treeFile100.dat',
0173         'treeFile101.dat',
0174         'treeFile134.dat',
0175         'treeFile135.dat',
0176         'treeFile136.dat',
0177         'treeFile137.dat',
0178         'treeFile138.dat',
0179         'treeFile139.dat',
0180         'treeFile140.dat',
0181         'treeFile141.dat',
0182         'treeFile142.dat',
0183         'treeFile143.dat',
0184         'treeFile144.dat',
0185         'treeFile145.dat',
0186         'treeFile146.dat',
0187         'treeFile147.dat',
0188         'treeFile149.dat',
0189         'treeFile150.dat',
0190         'treeFile151.dat',
0191         'treeFile152.dat',
0192         'treeFile153.dat',
0193         'treeFile154.dat',
0194         'treeFile163.dat',
0195         'treeFile164.dat',
0196         'treeFile165.dat',
0197         'treeFile166.dat',
0198         'treeFile167.dat',
0199         'treeFile168.dat',
0200         'treeFile177.dat',
0201         'treeFile180.dat',
0202         'treeFile182.dat',
0203         'treeFile183.dat',
0204         'treeFile184.dat',
0205         'treeFile185.dat',
0206         'treeFile186.dat',
0207         'treeFile187.dat']
0208 
0209     import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.PedeSetup as pede
0210     pede.setup(process,
0211                binary_files = merge_binary_files,
0212                tree_files = merge_tree_files,
0213                run_start_geometry = setupRunStartGeometry)
0214 
0215 import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.SetCondition as tagwriter
0216 
0217 tagwriter.setCondition(process,
0218        connect = "sqlite_file:alignment_input.db",
0219        record = "TrackerAlignmentRcd",
0220        tag = "TrackerAlignment_PCL_byRun_v2_express_348155")
0221 
0222 tagwriter.setCondition(process,
0223        connect = "sqlite_file:alignment_input.db",
0224        record = "TrackerSurfaceDeformationRcd",
0225        tag = "TrackerSurafceDeformations_v1_express_299685")
0226 
0227 tagwriter.setCondition(process,
0228        connect = "sqlite_file:alignment_input.db",
0229        record = "TrackerAlignmentErrorExtendedRcd",
0230        tag = "TrackerAlignmentExtendedErr_2009_v2_express_IOVs_347303")