3 import globalDictionaries
4 from genericValidation
import GenericValidationData, ValidationWithPlots
5 from helperFunctions
import replaceByMap
6 from TkAlExceptions
import AllInOneError
10 configBaseName =
"TkAlZMuMuValidation" 11 scriptBaseName =
"TkAlZMuMuValidation" 12 crabCfgBaseName =
"TkAlZMuMuValidation" 13 resultBaseName =
"ZMuMuValidation" 14 outputBaseName =
"ZMuMuValidation" 16 "zmumureference": (
"/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
18 deprecateddefaults = {
26 defaults.update(deprecateddefaults)
27 needpackages = {
'MuonAnalysis/MomentumScaleCalibration'}
28 mandatories = {
"etamaxneg",
"etaminneg",
"etamaxpos",
"etaminpos"}
30 def __init__(self, valName, alignment, config):
31 super(ZMuMuValidation, self).
__init__(valName, alignment, config)
32 if self.
general[
"zmumureference"].startswith(
"/store"):
33 self.
general[
"zmumureference"] =
"root://eoscms//eos/cms" + self.
general[
"zmumureference"]
35 raise AllInOneError(
"Parallel jobs not implemented for the Z->mumu validation!\n" 36 "Please set parallelJobs = 1.")
39 raise AllInOneError(
"The '%s' option has been moved to the [plots:zmumu] section. Please specify it there."%option)
48 return configTemplates.ZMuMuValidationTemplate
60 return super(ZMuMuValidation, self).LoadBasicModules + configTemplates.LoadMuonModules
64 return configTemplates.SingleTrackRefitter
68 return configTemplates.ZMuMuPath
71 return super(ZMuMuValidation, self).
createScript(path, template = configTemplates.zMuMuScriptTemplate)
79 repMap = super(ZMuMuValidation, self).
getRepMap(alignment)
81 "nEvents": self.
general[
"maxevents"],
82 "outputFile": (
"0_zmumuHisto.root" 83 ",genSimRecoPlots.root" 84 ",FitParameters.txt"),
86 "workingdir":
".oO[datadir]Oo./%s/%s/%s" % (self.
outputBaseName, self.
name, alignment.name),
87 "plotsdir":
".oO[datadir]Oo./%s/%s/%s/plots" % (self.
outputBaseName, self.
name, alignment.name),
94 from plottingOptions
import PlottingOptions
97 return 'ALCARECOTkAlZMuMu' 98 elif resonance ==
"JPsi":
99 return 'ALCARECOTkAlJpsiMuMu' 100 elif resonance
in (
"Y1S",
"Y2S",
"Y3S"):
101 return 'ALCARECOTkAlUpsilonMuMu' 107 if no argument or "" is passed a string with an instantiation is 108 returned, else the validation is appended to the list 111 return replaceByMap(
' filenames.push_back("root://eoscms//eos/cms/store/caf/user/$USER/.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)
115 return "TkAlMergeZmumuPlots.C" 119 return configTemplates.mergeZmumuPlotsTemplate
123 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)