Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:20

0001 #

0002 
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 process = cms.Process("MAGNETICFIELDTEST")
0007 
0008 process.source = cms.Source("EmptySource")
0009 process.maxEvents = cms.untracked.PSet(
0010     input = cms.untracked.int32(1)
0011 )
0012 
0013 #process.source.firstRun = cms.untracked.uint32(220642) # To get Run 2 IOVs

0014 
0015 process.load("MagneticField.Engine.volumeBasedMagneticFieldFromDB_cfi")
0016 
0017 process.load("Configuration/StandardSequences/FrontierConditions_GlobalTag_cff")
0018 from Configuration.AlCa.GlobalTag import GlobalTag
0019 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:mc', '')
0020 
0021 
0022 process.GlobalTag.toGet = cms.VPSet(
0023     # Geometries

0024 #     cms.PSet(record = cms.string("MFGeometryFileRcd"),

0025 #              tag = cms.string("MFGeometry_90322"),

0026 #              connect = cms.string("frontier://FrontierProd/CMS_COND_GEOMETRY"),

0027 #              label = cms.untracked.string("90322")

0028 #              ),

0029 #     cms.PSet(record = cms.string("MFGeometryFileRcd"),

0030 #              tag = cms.string("MFGeometry_120812"),

0031 #              connect = cms.string("frontier://FrontierPrep/CMS_COND_GEOMETRY"),

0032 #              label = cms.untracked.string("120812")

0033 #              ),

0034 #     cms.PSet(record = cms.string("MFGeometryFileRcd"),

0035 #              tag = cms.string("MFGeometry_130503"),

0036 #              connect = cms.string("frontier://FrontierPrep/CMS_COND_GEOMETRY"),

0037 #              label = cms.untracked.string("130503")

0038 #              ),

0039     cms.PSet(record = cms.string("MFGeometryFileRcd"),
0040 #              tag = cms.string("MagneticFieldGeometry_160812"),

0041 #              connect = cms.string("sqlite_file:DB_Geom/mfGeometry_160812.db"),

0042              tag = cms.string("MFGeometry_160812"),
0043 #             connect = cms.string("frontier://FrontierPrep/CMS_CONDITIONS"),

0044 #             connect = cms.string("frontier://PromptProd/CMS_CONDITIONS"),

0045              connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS"),
0046              label = cms.untracked.string("160812")
0047              ),
0048 
0049 
0050 
0051 
0052     # Configurations

0053      cms.PSet(record = cms.string("MagFieldConfigRcd"),
0054               tag = cms.string("MFConfig_71212_0T"),
0055               connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS"),
0056               label = cms.untracked.string("0T")
0057               ),
0058 
0059      cms.PSet(record = cms.string("MagFieldConfigRcd"),
0060               tag = cms.string("MFConfig_71212_2T"),
0061               connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS"),
0062               label = cms.untracked.string("2T")
0063               ),
0064 
0065      cms.PSet(record = cms.string("MagFieldConfigRcd"), # version 160812, 3T (good also for Run1)

0066 #              tag = cms.string("MagFieldConfig"),

0067 #              connect = cms.string("sqlite_file:DB_Conf/MFConfig_160812_Run2_3T.db"),

0068               tag = cms.string("MFConfig_160812_Run2_3T"),
0069               connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS"),
0070               label = cms.untracked.string("3T")
0071               ),
0072 
0073      cms.PSet(record = cms.string("MagFieldConfigRcd"), # version 160812, 3.5T (good also for Run1)

0074 #              tag = cms.string("MagFieldConfig"),

0075 #              connect = cms.string("sqlite_file:DB_Conf/MFConfig_160812_Run2_3_5T.db"),

0076               tag = cms.string("MFConfig_160812_Run2_3_5T"),
0077               connect = cms.string("frontier://PromptProd/CMS_CONDITIONS"),
0078               label = cms.untracked.string("3.5T")
0079               ),
0080 
0081      cms.PSet(record = cms.string("MagFieldConfigRcd"), # version 160812, 3.8T

0082 #              tag = cms.string("MagFieldConfig"),

0083 #              connect = cms.string("sqlite_file:DB_Conf/MFConfig_160812_Run1_3_8T.db"), #Run 1, version 160812, 3.8T (single IOV, for MC)

0084 #              connect = cms.string("sqlite_file:DB_Conf/MFConfig_160812_Run2_3_8T.db"), #Run 2, version 160812, 3.8T (single IOV, for MC)

0085 #              connect = cms.string("sqlite_file:DB_Conf/MFConfig_RI_RII_160812_3_8T.db"),#Run 1+2, version 160812, 3.8T (two IOVs, for data)

0086 #              connect = cms.string("sqlite_file:DB_Conf/MFConfig_RI90322_RII160812_3_8T.db"),#Run 1+2, version 160812, 3.8T (two IOVs, for data)              

0087 #              tag = cms.string("MFConfig_90322_2pi_scaled_3_8T"), #Run 1, version 90322, 3.8T (single IOV, for MC)

0088 #              tag = cms.string("MFConfig_160812_Run1_3_8T"), #Run 1, version 160812, 3.8T (single IOV, for MC)

0089               tag = cms.string("MFConfig_160812_Run2_3_8T"), #Run 2, version 160812, 3.8T (single IOV, for MC)

0090               connect = cms.string("frontier://PromptProd/CMS_CONDITIONS"),
0091 #              connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS"),

0092               label = cms.untracked.string("3.8T")
0093               ),
0094 
0095      cms.PSet(record = cms.string("MagFieldConfigRcd"),
0096               tag = cms.string("MFConfig_71212_4T"),
0097               connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS"),
0098               label = cms.untracked.string("4T")
0099               ),
0100 
0101 )
0102 
0103 # Set the nominal current 

0104 # process.VolumeBasedMagneticFieldESProducer.valueOverride =   9500 #2T

0105 # process.VolumeBasedMagneticFieldESProducer.valueOverride =  14340 #3T

0106 # process.VolumeBasedMagneticFieldESProducer.valueOverride =  16730 #3.5T

0107 # process.VolumeBasedMagneticFieldESProducer.valueOverride =  18164 #3.8T (default for MC)

0108 # process.VolumeBasedMagneticFieldESProducer.valueOverride =  19140 #4T

0109 
0110 process.MessageLogger = cms.Service("MessageLogger",
0111     cerr = cms.untracked.PSet(
0112         enable = cms.untracked.bool(False)
0113     ),
0114     cout = cms.untracked.PSet(
0115         MagneticField = cms.untracked.PSet(
0116             limit = cms.untracked.int32(10000000)
0117         ),
0118         WARNING = cms.untracked.PSet(
0119             limit = cms.untracked.int32(0)
0120         ),
0121         enable = cms.untracked.bool(True),
0122         noLineBreaks = cms.untracked.bool(True),
0123         threshold = cms.untracked.string('WARNING')
0124     )
0125 )
0126 
0127 
0128 process.testMagneticField = cms.EDAnalyzer("testMagneticField",
0129 
0130 ## Use the specified reference file 

0131 #        inputTable = cms.untracked.string("/afs/cern.ch/cms/OO/mag_field/CMSSW/regression/referenceField_90322_2pi_scaled_3.8T_750.txt"),

0132 #   inputTable = cms.untracked.string("/afs/cern.ch/cms/OO/mag_field/CMSSW/regression/referenceField_160812_Run1_3_8t.txt"),

0133 #   inputTable = cms.untracked.string("/afs/cern.ch/cms/OO/mag_field/CMSSW/regression/referenceField_160812_3t.txt"),

0134 #   inputTable = cms.untracked.string("/afs/cern.ch/cms/OO/mag_field/CMSSW/regression/referenceField_160812_3_5t.txt"),

0135     inputTable = cms.untracked.string("/afs/cern.ch/cms/OO/mag_field/CMSSW/regression/referenceField_160812_3_8t.txt"),
0136                                            
0137 
0138 ## Valid input file types: "xyz_cm", "rpz_m", "xyz_m", "TOSCA" 

0139     inputTableType = cms.untracked.string("xyz_cm"),
0140 
0141 ## Resolution used for validation, number of points

0142     resolution     = cms.untracked.double(0.0001),
0143     numberOfPoints = cms.untracked.int32(1000000),
0144 
0145 ## Size of testing volume (cm):

0146     InnerRadius = cms.untracked.double(0),    
0147     OuterRadius = cms.untracked.double(900),  
0148         HalfLength  = cms.untracked.double(2400)
0149 
0150 )
0151 
0152 process.p1 = cms.Path(process.testMagneticField)
0153 
0154 
0155 # process.testField  = cms.EDAnalyzer("testMagneticField")

0156 
0157 # process.p1 = cms.Path(process.testField)

0158