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