Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:14

0001 from __future__ import print_function
0002 def setup(process, global_tag, zero_tesla = False):
0003     """General setup of an alignment process.
0004 
0005     Arguments:
0006     - `process`: cms.Process object
0007     - `global_tag`: global tag to be used
0008     - `zero_tesla`: if 'True' the B-field map for 0T is enforced
0009     """
0010 
0011     # MessageLogger for convenient output
0012     # --------------------------------------------------------------------------
0013     process.load('Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.myMessageLogger_cff')
0014 
0015     # Load the conditions
0016     # --------------------------------------------------------------------------
0017     if zero_tesla:
0018         # actually only needed for 0T MC samples, but does not harm for 0T data:
0019         process.load("Configuration.StandardSequences.MagneticField_0T_cff")
0020     else:
0021         process.load('Configuration.StandardSequences.MagneticField_cff')
0022     process.load('Configuration.Geometry.GeometryRecoDB_cff')
0023     process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0024 
0025     from Configuration.AlCa.GlobalTag import GlobalTag
0026     process.GlobalTag = GlobalTag(process.GlobalTag, global_tag)
0027     print("Using Global Tag:", process.GlobalTag.globaltag._value)
0028 
0029     return process # not required because the cms.Process is modified in place