Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-07 06:12:25

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