1 from __future__
import absolute_import
3 from .
import configTemplates
4 from .
import globalDictionaries
5 from .genericValidation
import GenericValidationData, ValidationWithPlots
6 from .helperFunctions
import replaceByMap
7 from .TkAlExceptions
import AllInOneError
11 configBaseName =
"TkAlZMuMuValidation" 12 scriptBaseName =
"TkAlZMuMuValidation" 13 crabCfgBaseName =
"TkAlZMuMuValidation" 14 resultBaseName =
"ZMuMuValidation" 15 outputBaseName =
"ZMuMuValidation" 17 "zmumureference": (
"/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
25 deprecateddefaults = {
33 defaults.update(deprecateddefaults)
34 needpackages = {
'MuonAnalysis/MomentumScaleCalibration'}
36 def __init__(self, valName, alignment, config):
37 super(ZMuMuValidation, self).
__init__(valName, alignment, config)
38 if self.
general[
"zmumureference"].startswith(
"/store"):
39 self.
general[
"zmumureference"] =
"root://eoscms//eos/cms" + self.
general[
"zmumureference"]
41 raise AllInOneError(
"Parallel jobs not implemented for the Z->mumu validation!\n" 42 "Please set parallelJobs = 1.")
45 raise AllInOneError(
"The '%s' option has been moved to the [plots:zmumu] section. Please specify it there."%option)
54 return configTemplates.ZMuMuValidationTemplate
66 return super(ZMuMuValidation, self).LoadBasicModules + configTemplates.LoadMuonModules
70 return configTemplates.SingleTrackRefitter
74 return configTemplates.ZMuMuPath
77 return super(ZMuMuValidation, self).
createScript(path, template = configTemplates.zMuMuScriptTemplate)
85 repMap = super(ZMuMuValidation, self).
getRepMap(alignment)
87 "nEvents": self.
general[
"maxevents"],
88 "outputFile": (
"0_zmumuHisto.root" 89 ",genSimRecoPlots.root" 90 ",FitParameters.txt"),
92 "workingdir":
".oO[datadir]Oo./%s/%s/%s" % (self.
outputBaseName, self.
name, alignment.name),
93 "plotsdir":
".oO[datadir]Oo./%s/%s/%s/plots" % (self.
outputBaseName, self.
name, alignment.name),
100 from .plottingOptions
import PlottingOptions
103 return 'ALCARECOTkAlZMuMu' 104 elif resonance ==
"JPsi":
105 return 'ALCARECOTkAlJpsiMuMu' 106 elif resonance
in (
"Y1S",
"Y2S",
"Y3S"):
107 return 'ALCARECOTkAlUpsilonMuMu' 113 if no argument or "" is passed a string with an instantiation is 114 returned, else the validation is appended to the list 117 return replaceByMap(
' filenames.push_back("root://eoscms//eos/cms/store/group/alca_trackeralign/AlignmentValidation/.oO[eosdir]Oo./BiasCheck.root"); titles.push_back(".oO[title]Oo."); colors.push_back(.oO[color]Oo.); linestyles.push_back(.oO[style]Oo.);\n', repMap)
121 return "TkAlMergeZmumuPlots.C" 125 return configTemplates.mergeZmumuPlotsTemplate
129 return ".oO[resonance]Oo.MuMuPlots" def plottingscriptname(cls)
def getRepMap(self, alignment=None)
def createScript(self, path)
def LoadBasicModules(self)
def plottingscripttemplate(cls)
def trackcollection(self)
def FileOutputTemplate(self)
dictionary deprecateddefaults
def PlottingOptions(config, valType)
def replaceByMap(target, the_map)
— Helpers —############################
string defaultReferenceName
def TrackSelectionRefitting(self)
def ValidationTemplate(self)
def getRepMap(self, alignment=None)
def createCrabCfg(self, path)
def __init__(self, valName, alignment, config)