本文整理汇总了Python中genericValidation.GenericValidationData类的典型用法代码示例。如果您正苦于以下问题:Python GenericValidationData类的具体用法?Python GenericValidationData怎么用?Python GenericValidationData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GenericValidationData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, valName, alignment, config,
configBaseName = "TkAlZMuMuValidation", scriptBaseName = "TkAlZMuMuValidation", crabCfgBaseName = "TkAlZMuMuValidation",
resultBaseName = "ZMuMuValidation", outputBaseName = "ZMuMuValidation"):
defaults = {
"zmumureference": ("/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
}
deprecateddefaults = {
"resonance": "",
"switchONfit": "",
"rebinphi": "",
"rebinetadiff": "",
"rebineta": "",
"rebinpt": "",
}
defaults.update(deprecateddefaults)
mandatories = ["etamaxneg", "etaminneg", "etamaxpos", "etaminpos"]
self.configBaseName = configBaseName
self.scriptBaseName = scriptBaseName
self.crabCfgBaseName = crabCfgBaseName
self.resultBaseName = resultBaseName
self.outputBaseName = outputBaseName
self.needParentFiles = False
GenericValidationData.__init__(self, valName, alignment, config,
"zmumu", addDefaults=defaults,
addMandatories=mandatories,
addneedpackages=['MuonAnalysis/MomentumScaleCalibration'])
if self.general["zmumureference"].startswith("/store"):
self.general["zmumureference"] = "root://eoscms//eos/cms" + self.general["zmumureference"]
if self.NJobs > 1:
raise AllInOneError("Parallel jobs not implemented for the Z->mumu validation!\n"
"Please set parallelJobs = 1.")
for option in deprecateddefaults:
if self.general[option]:
raise AllInOneError("The '%s' option has been moved to the [plots:zmumu] section. Please specify it there."%option)
del self.general[option]
示例2: createConfiguration
def createConfiguration(self, path, configBaseName = "TkAlZMuMuValidation" ):
cfgName = "%s.%s.%s_cfg.py"%( configBaseName, self.name,
self.alignmentToValidate.name )
repMap = self.getRepMap()
cfgs = {cfgName:replaceByMap(configTemplates.ZMuMuValidationTemplate,
repMap)}
GenericValidationData.createConfiguration(self, cfgs, path)
示例3: __init__
def __init__(self, valName, alignment, config,
configBaseName = "TkAlZMuMuValidation", scriptBaseName = "TkAlZMuMuValidation", crabCfgBaseName = "TkAlZMuMuValidation",
resultBaseName = "ZMuMuValidation", outputBaseName = "ZMuMuValidation"):
defaults = {
"zmumureference": ("/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
"resonance": "Z",
"switchONfit": "false",
"rebinphi": "4",
"rebinetadiff": "2",
"rebineta": "2",
"rebinpt": "8",
}
mandatories = ["etamaxneg", "etaminneg", "etamaxpos", "etaminpos"]
self.configBaseName = configBaseName
self.scriptBaseName = scriptBaseName
self.crabCfgBaseName = crabCfgBaseName
self.resultBaseName = resultBaseName
self.outputBaseName = outputBaseName
self.needParentFiles = False
GenericValidationData.__init__(self, valName, alignment, config,
"zmumu", addDefaults=defaults,
addMandatories=mandatories)
if self.general["zmumureference"].startswith("/store"):
self.general["zmumureference"] = "root://eoscms//eos/cms" + self.general["zmumureference"]
if self.NJobs > 1:
raise AllInOneError("Parallel jobs not implemented for the Z->mumu validation!\n"
"Please set parallelJobs = 1.")
示例4: __init__
def __init__(self, valName, alignment, config, addDefaults = {}, addMandatories = [],
configBaseName = "TkAlOfflineValidation", scriptBaseName = "TkAlOfflineValidation", crabCfgBaseName = "TkAlOfflineValidation",
resultBaseName = "AlignmentValidation", outputBaseName = "AlignmentValidation"):
defaults = {
"DMRMethod":"median,rmsNorm",
"DMRMinimum":"30",
"DMROptions":"",
"offlineModuleLevelHistsTransient":"False",
"offlineModuleLevelProfiles":"True",
"OfflineTreeBaseDir":"TrackHitFilter",
"SurfaceShapes":"coarse",
"stripYResiduals":"False",
}
mandatories = [ "trackcollection" ]
defaults.update(addDefaults)
mandatories += addMandatories
self.configBaseName = configBaseName
self.scriptBaseName = scriptBaseName
self.crabCfgBaseName = crabCfgBaseName
self.resultBaseName = resultBaseName
self.outputBaseName = outputBaseName
self.needParentFiles = False
GenericValidationData.__init__(self, valName, alignment, config,
"offline", addDefaults=defaults,
addMandatories=mandatories)
示例5: __init__
def __init__(self, valName, alignment, config,
configBaseName = "TkAlPrimaryVertexValidation",
scriptBaseName = "TkAlPrimaryVertexValidation",
crabCfgBaseName = "TkAlPrimaryVertexValidation",
resultBaseName = "PrimaryVertexValidation",
outputBaseName = "PrimaryVertexValidation"):
defaults = {
"pvvalidationreference": ("/store/caf/user/musich/Alignment/TkAlPrimaryVertexValidation/Reference/PrimaryVertexValidation_test_pvvalidation_mc_design_mc_48bins.root"),
"ttrhbuilder":"WithAngleAndTemplate",
"doBPix":"True",
"doFPix":"True"
}
mandatories = ["isda","ismc","runboundary","trackcollection","vertexcollection","lumilist","ptCut","etaCut","runControl","numberOfBins"]
self.configBaseName = configBaseName
self.scriptBaseName = scriptBaseName
self.crabCfgBaseName = crabCfgBaseName
self.resultBaseName = resultBaseName
self.outputBaseName = outputBaseName
self.needParentFiles = False
GenericValidationData.__init__(self, valName, alignment, config,
"primaryvertex", addDefaults=defaults,
addMandatories=mandatories)
if self.general["pvvalidationreference"].startswith("/store"):
self.general["pvvalidationreference"] = "root://eoscms//eos/cms" + self.general["pvvalidationreference"]
if self.NJobs > 1:
raise AllInOneError("Parallel jobs not implemented for the PrimaryVertex validation!\n"
"Please set parallelJobs = 1.")
示例6: createScript
def createScript(self, path, scriptBaseName = "TkAlOfflineValidation"):
# A separate script is created for each parallel jobs.
# Since only one cfg is saved a bit ugly solution is needed in the loop.
returnValue = []
numJobs = int( self.general["parallelJobs"] )
for index in range(numJobs):
scriptName = "%s.%s.%s_%s.sh"%(scriptBaseName, self.name,
self.alignmentToValidate.name,
str(index))
repMap = GenericValidationData.getRepMap(self)
repMap["nIndex"]=""
repMap["nIndex"]=str(index)
repMap["CommandLine"]=""
for cfg in self.configFiles:
# The ugly solution here is to change the name for each parallel job
cfgtemp = cfg.replace(str(numJobs-1)+"_cfg.py",
str(index)+"_cfg.py")
repMap["CommandLine"]+= repMap["CommandLineTemplate"]%{"cfgFile":cfgtemp,
"postProcess":""
}
scripts = {scriptName: replaceByMap(configTemplates.parallelScriptTemplate,
repMap ) }
returnValue.extend(GenericValidationData.createScript(self,
scripts,
path) )
return returnValue
示例7: createConfiguration
def createConfiguration(self, path):
cfgName = "%s.%s.%s_cfg.py"%( self.configBaseName, self.name,
self.alignmentToValidate.name )
repMap = self.getRepMap()
cfgs = {cfgName: configTemplates.PrimaryVertexValidationTemplate}
self.filesToCompare[GenericValidationData.defaultReferenceName] = \
repMap["finalResultFile"]
GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
示例8: createConfiguration
def createConfiguration(self, path):
cfgName = "%s.%s.%s_cfg.py"%( self.configBaseName, self.name,
self.alignmentToValidate.name )
repMap = self.getRepMap()
self.filesToCompare[GenericValidationData.defaultReferenceName] = \
replaceByMap(".oO[eosdir]Oo./0_zmumuHisto.root", repMap)
cfgs = {cfgName: configTemplates.ZMuMuValidationTemplate}
GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
示例9: createConfiguration
def createConfiguration(self, path ):
cfgName = "TkAlMcValidate.%s.%s_cfg.py"%(self.name,
self.alignmentToValidate.name)
repMap = self.getRepMap()
cfgs = {cfgName:replaceByMap(configTemplates.mcValidateTemplate,
repMap)}
self.filesToCompare[GenericValidationData.defaultReferenceName] = \
repMap["resultFile"]
GenericValidationData.createConfiguration(self, cfgs, path)
示例10: __init__
def __init__(self, valName, alignment,config):
defaults = {
"zmumureference": ("/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
"resonance": "Z"
}
mandatories = ["dataset", "maxevents",
"etamaxneg", "etaminneg", "etamaxpos", "etaminpos"]
GenericValidationData.__init__(self, valName, alignment, config,
"zmumu", addDefaults=defaults,
addMandatories=mandatories)
示例11: __init__
def __init__(self, valName, alignment, config,
configBaseName = "TkAlTrackSplitting", scriptBaseName = "TkAlTrackSplitting", crabCfgBaseName = "TkAlTrackSplitting",
resultBaseName = "TrackSplitting", outputBaseName = "TrackSplitting"):
mandatories = ["trackcollection"]
self.configBaseName = configBaseName
self.scriptBaseName = scriptBaseName
self.crabCfgBaseName = crabCfgBaseName
self.resultBaseName = resultBaseName
self.outputBaseName = outputBaseName
self.needParentFiles = False
GenericValidationData.__init__(self, valName, alignment, config,
"split", addMandatories = mandatories)
示例12: __init__
def __init__(self, valName, alignment, config):
defaults = {
"zmumureference": (
"/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2"
"/TMP_EM/ZMuMu/data/MC/BiasCheck_DYToMuMu_Summer"
"11_TkAlZMuMu_IDEAL.root"
)
}
mandatories = ["dataset", "maxevents", "etamaxneg", "etaminneg", "etamaxpos", "etaminpos"]
GenericValidationData.__init__(
self, valName, alignment, config, "zmumu", addDefaults=defaults, addMandatories=mandatories
)
示例13: __init__
def __init__(self, valName, alignment, config,
configBaseName = "TkAlMcValidate", scriptBaseName = "TkAlMcValidate", crabCfgBaseName = "TkAlMcValidate",
resultBaseName = "McValidation", outputBaseName = "McValidation"):
self.configBaseName = configBaseName
self.scriptBaseName = scriptBaseName
self.crabCfgBaseName = crabCfgBaseName
self.resultBaseName = resultBaseName
self.outputBaseName = outputBaseName
self.needParentFiles = True
GenericValidationData.__init__(self, valName, alignment, config,
"mcValidate")
if self.NJobs > 1:
raise AllInOneError("Parallel jobs not implemented for the MC validation!\n"
"Please set parallelJobs = 1.")
示例14: __init__
def __init__(self, valName, alignment,config):
defaults = {
"DMRMethod":"median,rmsNorm",
"DMRMinimum":"30",
"DMROptions":"",
"offlineModuleLevelHistsTransient":"False",
"offlineModuleLevelProfiles":"False",
"OfflineTreeBaseDir":"TrackHitFilter",
"SurfaceShapes":"none"
}
mandatories = [ "dataset", "maxevents", "trackcollection" ]
GenericValidationData.__init__(self, valName, alignment, config,
"offline", addDefaults=defaults,
addMandatories=mandatories)
示例15: __init__
def __init__(self, valName, alignment, config,
configBaseName = "TkAlTrackSplitting", scriptBaseName = "TkAlTrackSplitting", crabCfgBaseName = "TkAlTrackSplitting",
resultBaseName = "TrackSplitting", outputBaseName = "TrackSplitting"):
mandatories = ["trackcollection"]
defaults = {"subdetector": "BPIX"}
self.configBaseName = configBaseName
self.scriptBaseName = scriptBaseName
self.crabCfgBaseName = crabCfgBaseName
self.resultBaseName = resultBaseName
self.outputBaseName = outputBaseName
self.needParentFiles = False
GenericValidationData.__init__(self, valName, alignment, config,
"split", addMandatories = mandatories, addDefaults = defaults)
validsubdets = self.validsubdets()
if self.general["subdetector"] not in validsubdets:
raise AllInOneError("'%s' is not a valid subdetector!\n" % self.general["subdetector"] + "The options are: " + ", ".join(validsubdets))