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 xml file and python customizer for D49 reco tracker material #29910
Conversation
@cmsbuild, please test |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29910/15511
|
The tests are being triggered in jenkins. |
A new Pull Request was created by @mtosi (mia tosi) for master. It involves the following packages: Geometry/TrackerRecoData @civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+1 |
Comparison job queued. |
upgrade: @kpedro88 |
|
||
if hasattr(process,'XMLIdealGeometryESSource') and hasattr(process.XMLIdealGeometryESSource,'geomXMLFiles'): | ||
|
||
print("customizing Tracker Reco Material") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would prefer not to have this printout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleaned
if hasattr(process,'XMLIdealGeometryESSource') and hasattr(process.XMLIdealGeometryESSource,'geomXMLFiles'): | ||
|
||
print("customizing Tracker Reco Material") | ||
process.XMLIdealGeometryESSource.geomXMLFiles.remove( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should probably check if this file is present in the list before removing it, otherwise python will raise a ValueError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks for the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a rather non-pythonic fix though and also the new code allows for silent failing of the application of the customization function if the file is not present.
I had in mind something like:
diff --git a/SLHCUpgradeSimulations/Configuration/python/customise_TkRecoMaterial.py b/SLHCUpgradeSimulations/Configuration/python/customise_TkRecoMaterial.py
index 8d99be95dad..75e64ce891f 100644
--- a/SLHCUpgradeSimulations/Configuration/python/customise_TkRecoMaterial.py
+++ b/SLHCUpgradeSimulations/Configuration/python/customise_TkRecoMaterial.py
@@ -1,20 +1,21 @@
'''Customization functions for cmsDriver to change the phase-2 tracker reco material for geometry D49'''
import FWCore.ParameterSet.Config as cms
-def customizeRecoMaterial(process):
-
+def customizeTkRecoMaterialD49(process):
+
''' will replace one tracker reco material file with another one for geometry D49
- syntax: --customise SLHCUpgradeSimulations/Configuration/customise_TkRecoMaterial.customizeRecoMaterial
+ syntax: --customise SLHCUpgradeSimulations/Configuration/customise_TkRecoMaterial.customizeTkRecoMaterialD49
'''
-
+
if hasattr(process,'XMLIdealGeometryESSource') and hasattr(process.XMLIdealGeometryESSource,'geomXMLFiles'):
-
- print("customizing Tracker Reco Material")
- process.XMLIdealGeometryESSource.geomXMLFiles.remove(
- 'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker613_MB_2019_04/trackerRecoMaterial.xml'
- )
-
- process.XMLIdealGeometryESSource.geomXMLFiles.append(
- 'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker613_MB_2019_04/v2_ITonly/trackerRecoMaterial.xml'
- )
-
+
+ try:
+ process.XMLIdealGeometryESSource.geomXMLFiles.remove(
+ 'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker613_MB_2019_04/trackerRecoMaterial.xml'
+ )
+ process.XMLIdealGeometryESSource.geomXMLFiles.append(
+ 'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker613_MB_2019_04/v2_ITonly/trackerRecoMaterial.xml'
+ )
+ except ValueError:
+ raise SystemExit("\n\n ERROR! Could not replace trackerRecoMaterial.xml file, please check check if D49 geometry is being used \n\n")
+
return process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ciao
thanks for the comment, but the raise SystemExit
will make the code exiting, is it what we want ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, as the customization should simply NOT be run if the geometry is not the correct one.
@@ -0,0 +1,20 @@ | |||
'''Customization functions for cmsDriver to change the phase-2 tracker reco material for geometry D49''' | |||
import FWCore.ParameterSet.Config as cms | |||
def customizeRecoMaterial(process): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will the new file eventually become the default, so this customize function will only be needed temporarily?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kpedro88 yes, eventually, if validation at https://its.cern.ch/jira/projects/PDMVRELVALS/issues/PDMVRELVALS-79 is satisfactory.
Comparison is ready Comparison Summary:
|
The code-checks are being triggered in jenkins. |
by using |
@cmsbuild, please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29910/15523
|
The tests are being triggered in jenkins. |
Pull request #29910 was updated. @civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please check and sign again. |
merge |
thanks a lot ! |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+upgrade |
+1 |
PR description:
during the studies of the tracking performance in phase2 targeting the 111X
it turned out that the current material budget used in the track reconstruction is sub-optimal,
in particular in describing the IT material
preliminary results have been presented and shown during the TK DPG meeting last week [1]
a new --very preliminary-- version of the reco tracker material budget has been derived
thanks to the Rovere's workflow using NeutrinoGun events for the D49 geometry
this PR provides the corresponding
recoTrackerMaterial.xml
file,as well as the customization function for making use of it instead of the default file (thanks @mmusich)
no changes are expected in the standard workflows,
but this customization function is needed in order to make relval samples
[1]
https://indico.cern.ch/event/879450/contributions/3857982/attachments/2036336/3410814/200512_TRKPOGPH2.pdf