-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
MF standardized regression tests + fix some loose ends in MF #28642
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
|
||
# This cfi contains everything needed to use the VolumeBased magnetic | ||
# field engine version 160812 built using dd4hep for the geometry. | ||
# | ||
# PLEASE DO NOT USE THIS DIRECTLY | ||
# Always use the standard sequence Configuration.StandardSequences.MagneticField_cff | ||
|
||
|
||
DDDetectorESProducer = cms.ESSource("DDDetectorESProducer", | ||
confGeomXMLFiles = cms.FileInPath('MagneticField/GeomBuilder/data/cms-mf-geometry_160812.xml'), | ||
rootDDName = cms.string('cmsMagneticField:MAGF'), | ||
appendToDataLabel = cms.string('magfield') | ||
) | ||
|
||
|
||
DDCompactViewMFESProducer = cms.ESProducer("DDCompactViewMFESProducer", | ||
appendToDataLabel = cms.string('magfield') | ||
) | ||
|
||
|
||
ParametrizedMagneticFieldProducer = cms.ESProducer("ParametrizedMagneticFieldProducer", | ||
version = cms.string('OAE_1103l_071212'), | ||
parameters = cms.PSet( | ||
BValue = cms.string('3_8T') | ||
), | ||
label = cms.untracked.string('parametrizedField') | ||
) | ||
|
||
|
||
VolumeBasedMagneticFieldESProducer = cms.ESProducer("DD4hep_VolumeBasedMagneticFieldESProducer", | ||
DDDetector = cms.ESInputTag('', 'magfield'), | ||
appendToDataLabel = cms.string(''), | ||
useParametrizedTrackerField = cms.bool(True), | ||
label = cms.untracked.string(''), | ||
attribute = cms.string('magfield'), | ||
value = cms.string('magfield'), | ||
paramLabel = cms.string('parametrizedField'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it looks like only DDDetector, attribute, and value are different from volumeBasedMagneticField_160812_cfi. ParametrizedMagneticFieldProducer = cms.ESProducer("ParametrizedMagneticFieldProducer",
...
VolumeBasedMagneticFieldCommon = cms.PSet (
#common parts here
) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is supposed to stay until DD4Hep becomes the default and DDD is dropped, which I guess is not happening in a week or so. BTW could you suggest what I should do with the file that I removed (FromGun2DigiAnal_.py) which is also being addressed in another PR (see above)? Thanks. |
||
version = cms.string('grid_160812_3_8t'), | ||
geometryVersion = cms.int32(160812), | ||
debugBuilder = cms.untracked.bool(False), | ||
cacheLastVolume = cms.untracked.bool(True), | ||
scalingVolumes = cms.vint32(), | ||
scalingFactors = cms.vdouble(), | ||
|
||
|
||
gridFiles = cms.VPSet( | ||
# ### Specs for using specific tables for every volume | ||
# cms.PSet( | ||
# volumes = cms.string('1001-1464,2001-2464'), | ||
# sectors = cms.string('0') , | ||
# master = cms.int32(0), | ||
# path = cms.string('s[s]/grid.[v].bin'), | ||
# ), | ||
|
||
|
||
# Volumes for which specific tables are used for each sector | ||
cms.PSet( | ||
volumes = cms.string('1001-1010,1012-1027,1030-1033,1036-1041,1044-1049,1052-1057,1060-1063,1066-1071,1074-1077,1080-1097,1102-1129,1138-1402,1415-1416,' + | ||
'2001-2010,2012-2027,2030-2033,2036-2041,2044-2049,2052-2057,2060-2063,2066-2071,2074-2077,2080-2097,2102-2129,2138-2402,2415-2416'), | ||
sectors = cms.string('0') , | ||
master = cms.int32(0), | ||
path = cms.string('s[s]/grid.[v].bin'), | ||
), | ||
|
||
# Replicate sector 1 for volumes outside any detector | ||
cms.PSet( | ||
volumes = cms.string('1011,1028-1029,1034-1035,1042-1043,1050-1051,1058-1059,1064-1065,1072-1073,1078-1079,'+ # volumes extending from R~7.6 m to to R=9 m, | ||
'1098-1101,1130-1137,' + # Forward volumes, ouside CASTOR/HF | ||
'1403-1414,1417-1464,' # Volumes beyond |Z|>17.74 | ||
'2011,2028-2029,2034-2035,2042-2043,2050-2051,2058-2059,2064-2065,2072-2073,2078-2079,'+ | ||
'2098-2101,2130-2137,'+ | ||
'2403-2414,2417-2464'), | ||
sectors = cms.string('0'), | ||
master = cms.int32(1), | ||
path = cms.string('s01/grid.[v].bin'), | ||
), | ||
) | ||
) | ||
|
||
|
||
### To set a different nominal map, set the following in your .py: | ||
|
||
### 3T | ||
#VolumeBasedMagneticFieldESProducer.version = cms.string('grid_160812_3t') | ||
#ParametrizedMagneticFieldProducer.parameters.BValue = cms.string('3_0T') | ||
|
||
### 3.5T | ||
#VolumeBasedMagneticFieldESProducer.version = cms.string('grid_160812_3_5t') | ||
#ParametrizedMagneticFieldProducer.parameters.BValue = cms.string('3_5T') | ||
|
||
|
||
### Run I, 3.8T | ||
#VolumeBasedMagneticFieldESProducer.version = cms.string('grid_160812_3_8t_Run1') |
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.
IIUC, this will not work in the standard setup due to a conflict with DDDetectorESProducer DD4hep_GeometrySim_cff.
perhaps add
MF
or smth for a different name?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.
Good point, will do
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.
Funny, enough it does not work if I rename it to eg
process.DDDetectorMFESProducer = cms.ESSource("DDDetectorESProducer", ...
I then get:
It can be quickly reproduced editing
cmssw/MagneticField/GeomBuilder/test/python/testMagGeometry.py
Line 40 in 5d038bc
@cvuosalo, @ianna, any idea of why this happens and how to avoid this?
@slava77 I will go on with the other fixes (in a new PR) while this is getting understood.
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.
I'm confused in what's failing and what is edited.
volumeBasedMagneticField_dd4hep_160812_cfi.py is currently included only in regression.py, but it runs only testMagneticField, while the error message is coming from testMagGeometryAnalyzer.
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.
I am trying to apply the modification in cmssw/MagneticField/GeomBuilder/test/python/testMagGeometry.py first, as mentioned in my message above. This contains a (stripped-down) copy of the same config, for the purpose of testing the geometry.
Of course I need to fix volumeBasedMagneticField_dd4hep_160812_cfi.py as well, but the problem would be the same.