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"),
24 deprecateddefaults = {
32 defaults.update(deprecateddefaults)
33 needpackages = {
'MuonAnalysis/MomentumScaleCalibration'}
35 def __init__(self, valName, alignment, config):
36 super(ZMuMuValidation, self).
__init__(valName, alignment, config)
37 if self.
general[
"zmumureference"].startswith(
"/store"):
38 self.
general[
"zmumureference"] =
"root://eoscms//eos/cms" + self.
general[
"zmumureference"]
40 raise AllInOneError(
"Parallel jobs not implemented for the Z->mumu validation!\n" 41 "Please set parallelJobs = 1.")
44 raise AllInOneError(
"The '%s' option has been moved to the [plots:zmumu] section. Please specify it there."%option)
53 return configTemplates.ZMuMuValidationTemplate
65 return super(ZMuMuValidation, self).LoadBasicModules + configTemplates.LoadMuonModules
69 return configTemplates.SingleTrackRefitter
73 return configTemplates.ZMuMuPath
76 return super(ZMuMuValidation, self).
createScript(path, template = configTemplates.zMuMuScriptTemplate)
84 repMap = super(ZMuMuValidation, self).
getRepMap(alignment)
86 "nEvents": self.
general[
"maxevents"],
87 "outputFile": (
"0_zmumuHisto.root" 88 ",genSimRecoPlots.root" 89 ",FitParameters.txt"),
91 "workingdir":
".oO[datadir]Oo./%s/%s/%s" % (self.
outputBaseName, self.
name, alignment.name),
92 "plotsdir":
".oO[datadir]Oo./%s/%s/%s/plots" % (self.
outputBaseName, self.
name, alignment.name),
99 from plottingOptions
import PlottingOptions
102 return 'ALCARECOTkAlZMuMu' 103 elif resonance ==
"JPsi":
104 return 'ALCARECOTkAlJpsiMuMu' 105 elif resonance
in (
"Y1S",
"Y2S",
"Y3S"):
106 return 'ALCARECOTkAlUpsilonMuMu' 112 if no argument or "" is passed a string with an instantiation is 113 returned, else the validation is appended to the list 116 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)
120 return "TkAlMergeZmumuPlots.C" 124 return configTemplates.mergeZmumuPlotsTemplate
128 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)