3 import globalDictionaries
4 from genericValidation
import GenericValidationData
5 from helperFunctions
import replaceByMap
6 from TkAlExceptions
import AllInOneError
10 def __init__(self, valName, alignment, config,
11 configBaseName =
"TkAlZMuMuValidation", scriptBaseName =
"TkAlZMuMuValidation", crabCfgBaseName =
"TkAlZMuMuValidation",
12 resultBaseName =
"ZMuMuValidation", outputBaseName =
"ZMuMuValidation"):
14 "zmumureference": (
"/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
16 "switchONfit":
"false",
22 mandatories = [
"etamaxneg",
"etaminneg",
"etamaxpos",
"etaminpos"]
29 GenericValidationData.__init__(self, valName, alignment, config,
30 "zmumu", addDefaults=defaults,
31 addMandatories=mandatories)
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.")
40 self.alignmentToValidate.name )
42 self.
filesToCompare[GenericValidationData.defaultReferenceName] = \
44 cfgs = {cfgName: configTemplates.ZMuMuValidationTemplate}
45 GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
48 return GenericValidationData.createScript(self, path, template = configTemplates.zMuMuScriptTemplate)
51 return GenericValidationData.createCrabCfg(self, path, self.
crabCfgBaseName)
56 repMap = GenericValidationData.getRepMap(self, alignment)
58 "nEvents": self.
general[
"maxevents"],
59 "outputFile": (
"0_zmumuHisto.root"
60 ",genSimRecoPlots.root"
61 ",FitParameters.txt"),
63 "workingdir":
".oO[datadir]Oo./%s/%s/%s" % (self.
outputBaseName, self.
name, alignment.name),
64 "plotsdir":
".oO[datadir]Oo./%s/%s/%s/plots" % (self.
outputBaseName, self.
name, alignment.name),
70 if no argument or "" is passed a string with an instantiation is
71 returned, else the validation is appended to the list
74 if validationsSoFar !=
"":
75 validationsSoFar +=
' '
76 validationsSoFar +=
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)
77 return validationsSoFar
def appendToExtendedValidation
def replaceByMap
— Helpers —############################