CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
gemGeometryCustoms Namespace Reference

Functions

def custom_GE11_10partitions_v1
 
def custom_GE11_6partitions_v1
 change the current default GEM geometry More...
 
def custom_GE11_8and8partitions_v1
 
def custom_GE11_8and8partitions_v2
 
def custom_GE11_8partitions_v1
 
def custom_GE11_9and10partitions_v1
 
def custom_GE21_v7
 GE2/2 in 2023 scenario. More...
 
def custom_GE21_v7_10deg
 
def geomReplace
 

Function Documentation

def gemGeometryCustoms.custom_GE11_10partitions_v1 (   process)

Definition at line 22 of file gemGeometryCustoms.py.

22 
23 def custom_GE11_10partitions_v1(process):
24  mynum = process.XMLIdealGeometryESSource.geomXMLFiles.index('Geometry/MuonCommonData/data/v4/gem11.xml')
25  process.XMLIdealGeometryESSource.geomXMLFiles.remove('Geometry/MuonCommonData/data/v4/gem11.xml')
26  process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,'Geometry/MuonCommonData/data/v3/gem11.xml')
27  return process
def gemGeometryCustoms.custom_GE11_6partitions_v1 (   process)

change the current default GEM geometry

GE1/1 in 2019/2023 scenario

Definition at line 6 of file gemGeometryCustoms.py.

6 
7 def custom_GE11_6partitions_v1(process):
8  mynum = process.XMLIdealGeometryESSource.geomXMLFiles.index('Geometry/MuonCommonData/data/v4/gem11.xml')
9  process.XMLIdealGeometryESSource.geomXMLFiles.remove('Geometry/MuonCommonData/data/v4/gem11.xml')
10  process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,'Geometry/MuonCommonData/data/v2/gem11.xml')
11  return process
def custom_GE11_6partitions_v1
change the current default GEM geometry
def gemGeometryCustoms.custom_GE11_8and8partitions_v1 (   process)

Definition at line 28 of file gemGeometryCustoms.py.

28 
30  mynum = process.XMLIdealGeometryESSource.geomXMLFiles.index('Geometry/MuonCommonData/data/v4/gem11.xml')
31  process.XMLIdealGeometryESSource.geomXMLFiles.remove('Geometry/MuonCommonData/data/v4/gem11.xml')
32  process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,'Geometry/MuonCommonData/data/v6/gem11.xml')
33  return process
def gemGeometryCustoms.custom_GE11_8and8partitions_v2 (   process)

Definition at line 34 of file gemGeometryCustoms.py.

34 
36  mynum = process.XMLIdealGeometryESSource.geomXMLFiles.index('Geometry/MuonCommonData/data/v4/gem11.xml')
37  process.XMLIdealGeometryESSource.geomXMLFiles.remove('Geometry/MuonCommonData/data/v4/gem11.xml')
38  process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,'Geometry/MuonCommonData/data/v7/gem11.xml')
39  return process
def gemGeometryCustoms.custom_GE11_8partitions_v1 (   process)

Definition at line 12 of file gemGeometryCustoms.py.

12 
13 def custom_GE11_8partitions_v1(process):
14  mynum = process.XMLIdealGeometryESSource.geomXMLFiles.index('Geometry/MuonCommonData/data/v4/gem11.xml')
15  process.XMLIdealGeometryESSource.geomXMLFiles.remove('Geometry/MuonCommonData/data/v4/gem11.xml')
16  process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,'Geometry/MuonCommonData/data/v5/gem11.xml')
17  return process
def gemGeometryCustoms.custom_GE11_9and10partitions_v1 (   process)

Definition at line 18 of file gemGeometryCustoms.py.

18 
20  ## This is the default version
21  return process
def gemGeometryCustoms.custom_GE21_v7 (   process)

GE2/2 in 2023 scenario.

Definition at line 41 of file gemGeometryCustoms.py.

References geomReplace().

41 
42 def custom_GE21_v7(process) :
43  geomReplace( process, 'gem11.xml','Geometry/MuonCommonData/data/v7/gem11.xml')
44  geomReplace( process, 'gem21.xml','Geometry/MuonCommonData/data/v7/gem21.xml')
45  geomReplace( process, 'GEMSpecs.xml','Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml')
46  return process
def custom_GE21_v7
GE2/2 in 2023 scenario.
def gemGeometryCustoms.custom_GE21_v7_10deg (   process)

Definition at line 47 of file gemGeometryCustoms.py.

References geomReplace().

47 
48 def custom_GE21_v7_10deg(process) :
49  geomReplace( process, 'gem11.xml','Geometry/MuonCommonData/data/v7/gem11.xml')
50  geomReplace( process, 'gem21.xml','Geometry/MuonCommonData/data/v7_10deg/gem21.xml')
51  geomReplace( process, 'GEMSpecs.xml','Geometry/GEMGeometryBuilder/data/v7_10deg/GEMSpecs.xml')
52  return process
def gemGeometryCustoms.geomReplace (   process,
  key,
  targetXML 
)

Definition at line 53 of file gemGeometryCustoms.py.

Referenced by custom_GE21_v7(), and custom_GE21_v7_10deg().

53 
54 def geomReplace(process, key, targetXML) :
55  mynum=-1
56  originalXML=''
57  for i, xml in enumerate( process.XMLIdealGeometryESSource.geomXMLFiles) :
58  if ( xml.find(key) != -1 ) :
59  mynum, originalXML = i, xml
60  break ## For now, to change multiple keys is not supported.
61  if ( mynum != -1 and originalXML != targetXML ) :
62  print "Changing Geometry from %s to %s"%(originalXML, targetXML)
63  process.XMLIdealGeometryESSource.geomXMLFiles.remove(originalXML)
64  process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,targetXML)
65  if ( mynum == -1) :
66  print "Alert! key is not found on XMLIdealGeometryESSource"
67  return process
68