CMS 3D CMS Logo

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