Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GEM geometry v7 and v7_10deg version to gemGeometryCustoms.py #11602

Merged
merged 3 commits into from Oct 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -36,3 +36,32 @@ def custom_GE11_8and8partitions_v2(process):
process.XMLIdealGeometryESSource.geomXMLFiles.remove('Geometry/MuonCommonData/data/v4/gem11.xml')
process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,'Geometry/MuonCommonData/data/v7/gem11.xml')
return process

### GE2/2 in 2023 scenario
def custom_GE21_v7(process) :
geomReplace( process, 'gem11.xml','Geometry/MuonCommonData/data/v7/gem11.xml')
geomReplace( process, 'gem21.xml','Geometry/MuonCommonData/data/v7/gem21.xml')
geomReplace( process, 'GEMSpecs.xml','Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml')
return process

def custom_GE21_v7_10deg(process) :
geomReplace( process, 'gem11.xml','Geometry/MuonCommonData/data/v7/gem11.xml')
geomReplace( process, 'gem21.xml','Geometry/MuonCommonData/data/v7_10deg/gem21.xml')
geomReplace( process, 'GEMSpecs.xml','Geometry/GEMGeometryBuilder/data/v7_10deg/GEMSpecs.xml')
return process

def geomReplace(process, key, targetXML) :
mynum=-1
originalXML=''
for i, xml in enumerate( process.XMLIdealGeometryESSource.geomXMLFiles) :
if ( xml.find(key) != -1 ) :
mynum, originalXML = i, xml
break ## For now, to change multiple keys is not supported.
if ( mynum != -1 and originalXML != targetXML ) :
print "Changing Geometry from %s to %s"%(originalXML, targetXML)
process.XMLIdealGeometryESSource.geomXMLFiles.remove(originalXML)
process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,targetXML)
if ( mynum == -1) :
print "Alert! key is not found on XMLIdealGeometryESSource"
return process

21 changes: 21 additions & 0 deletions Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd">
<SpecParSection label="GEMSpecs.xml">
<SpecPar name="nStripsGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="nStrips" value="384"/>
</SpecPar>
<SpecPar name="nStripsGE21" eval="true">
<PartSelector path="//GHA2.."/>
<Parameter name="nStrips" value="768"/>
</SpecPar>
<SpecPar name="nPadsGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="nPads" value="192"/>
</SpecPar>
<SpecPar name="nPadsGE21" eval="true">
<PartSelector path="//GHA2.."/>
<Parameter name="nPads" value="192"/>
</SpecPar>
</SpecParSection>
</DDDefinition>
21 changes: 21 additions & 0 deletions Geometry/GEMGeometryBuilder/data/v7_10deg/GEMSpecs.xml
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd">
<SpecParSection label="GEMSpecs.xml">
<SpecPar name="nStripsGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="nStrips" value="384"/>
</SpecPar>
<SpecPar name="nStripsGE21" eval="true">
<PartSelector path="//GHA2.."/>
<Parameter name="nStrips" value="384"/>
</SpecPar>
<SpecPar name="nPadsGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="nPads" value="192"/>
</SpecPar>
<SpecPar name="nPadsGE21" eval="true">
<PartSelector path="//GHA2.."/>
<Parameter name="nPads" value="192"/>
</SpecPar>
</SpecParSection>
</DDDefinition>