CMS 3D CMS Logo

Functions
GeneralSetup Namespace Reference

Functions

def setup (process, global_tag, zero_tesla=False)
 

Function Documentation

◆ setup()

def GeneralSetup.setup (   process,
  global_tag,
  zero_tesla = False 
)
General setup of an alignment process.

Arguments:
- `process`: cms.Process object
- `global_tag`: global tag to be used
- `zero_tesla`: if 'True' the B-field map for 0T is enforced

Definition at line 2 of file GeneralSetup.py.

References print().

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
30 
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47