4 def setup(process, global_tag, zero_tesla=False, geometry=""):
5 """General setup of an alignment process. 8 - `process`: cms.Process object 9 - `global_tag`: global tag to be used 10 - `zero_tesla`: if 'True' the B-field map for 0T is enforced 11 - `geometry`: geometry to be used (default is an empty string for the standard geometry) 16 process.load(
'Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.myMessageLogger_cff')
22 process.load(
"Configuration.StandardSequences.MagneticField_0T_cff")
24 process.load(
'Configuration.StandardSequences.MagneticField_cff')
30 print(f
"Using Geometry from DB")
31 process.load(
'Configuration.Geometry.GeometryRecoDB_cff')
34 if re.match(
r"^Extended\w+$", geometry):
36 geometry_module = f
"Configuration.Geometry.Geometry{geometry}Reco_cff" 38 process.load(geometry_module)
39 print(f
"Using Geometry: {geometry_module}")
40 except Exception
as e:
41 print(f
"Error: Unable to load the geometry module '{geometry_module}'.\n{e}")
44 raise ValueError(f
"Invalid geometry format: '{geometry}'. Expected format is 'Extended<X>'.")
48 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
50 from Configuration.AlCa.GlobalTag
import GlobalTag
51 process.GlobalTag =
GlobalTag(process.GlobalTag, global_tag)
52 print(
"Using Global Tag:", process.GlobalTag.globaltag._value)
55 void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def setup(process, global_tag, zero_tesla=False, geometry="")