CMS 3D CMS Logo

GeneralSetup.py
Go to the documentation of this file.
1 def setup(process, global_tag, zero_tesla = False):
2  """General setup of an alignment process.
3 
4  Arguments:
5  - `process`: cms.Process object
6  - `global_tag`: global tag to be used
7  - `zero_tesla`: if 'True' the B-field map for 0T is enforced
8  """
9 
10  # MessageLogger for convenient output
11  # --------------------------------------------------------------------------
12  process.load('Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.myMessageLogger_cff')
13 
14  # Load the conditions
15  # --------------------------------------------------------------------------
16  if zero_tesla:
17  # actually only needed for 0T MC samples, but does not harm for 0T data:
18  process.load("Configuration.StandardSequences.MagneticField_0T_cff")
19  else:
20  process.load('Configuration.StandardSequences.MagneticField_cff')
21  process.load('Configuration.Geometry.GeometryRecoDB_cff')
22  process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
23 
24  from Configuration.AlCa.GlobalTag import GlobalTag
25  process.GlobalTag = GlobalTag(process.GlobalTag, global_tag)
26  print "Using Global Tag:", process.GlobalTag.globaltag._value
27 
28  return process # not required because the cms.Process is modified in place
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1