2 from .
import configTemplates
3 from .
import globalDictionaries
4 from .genericValidation
import GenericValidationData, ValidationWithPlots, pythonboolstring
5 from .helperFunctions
import replaceByMap
6 from .TkAlExceptions
import AllInOneError
9 configBaseName =
"TkAlPrimaryVertexResolution" 10 scriptBaseName =
"TkAlPrimaryVertexResolution" 11 crabCfgBaseName =
"TkAlPrimaryVertexResolution" 12 resultBaseName =
"PrimaryVertexResolution" 13 outputBaseName =
"PrimaryVertexResolution" 16 "pvresolutionreference": (
"/store/group/alca_trackeralign/validation/PVResolution/Reference/PrimaryVertexResolution_phaseIMC92X_upgrade2017_Ideal.root"),
24 mandatories = {
"runControl",
"runboundary",
"doTriggerSelection",
"triggerBits",
"trackcollection"}
25 valType =
"pvresolution" 26 def __init__(self, valName, alignment, config):
27 super(PrimaryVertexResolution, self).
__init__(valName, alignment, config)
29 if self.
general[
"pvresolutionreference"].startswith(
"/store"):
30 self.
general[
"pvresolutionreference"] =
"root://eoscms//eos/cms" + self.
general[
"pvresolutionreference"]
32 raise AllInOneError(
"Parallel jobs not implemented for the SplotVertexResolution validation!\n" 33 "Please set parallelJobs = 1.")
36 return configTemplates.PrimaryVertexResolutionTemplate
40 return configTemplates.SingleTrackRefitter
44 return configTemplates.PVResolutionPath
53 return "PrimaryVertexResolution" 56 return super(PrimaryVertexResolution, self).
createScript(path, template = configTemplates.PVResolutionScriptTemplate)
64 repMap = super(PrimaryVertexResolution, self).
getRepMap(alignment)
66 "nEvents": self.
general[
"maxevents"],
67 "TrackCollection": self.
general[
"trackcollection"],
68 "eosdir": os.path.join(self.
general[
"eosdir"]),
70 "workingdir":
".oO[datadir]Oo./%s/%s/%s" % (self.
outputBaseName, self.
name, alignment.name),
71 "plotsdir":
".oO[datadir]Oo./%s/%s/%s/plots" % (self.
outputBaseName, self.
name, alignment.name),
78 if no argument or "" is passed a string with an instantiation is returned, 79 else the validation is appended to the list 83 parameters =
" ".
join(os.path.join(
"root://eoscms//eos/cms", file.lstrip(
"/"))
for file
in repMap[
"resultFiles"])
85 mergedoutputfile = os.path.join(
"root://eoscms//eos/cms", repMap[
"finalResultFile"].lstrip(
"/"))
86 return "hadd -f %s %s\n" % (mergedoutputfile, parameters)
90 return (
' PVResolution::loadFileList("root://eoscms//eos/cms%(finalResultFile)s",' 91 '"PrimaryVertexResolution","%(title)s", %(color)s, %(style)s);\n')%repMap
95 return configTemplates.PVResolutionPlotExecution
99 return "TkAlPrimaryVertexResolutionPlot.C" 103 return configTemplates.PVResolutionPlotTemplate
107 return "PrimaryVertexResolution" def createCrabCfg(self, path)
def runPlots(cls, validations)
def plottingscripttemplate(cls)
def getRepMap(self, alignment=None)
def createScript(self, path)
def plottingscriptname(cls)
def TrackSelectionRefitting(self)
static std::string join(char **cmd)
def ValidationSequence(self)
def getRepMap(self, alignment=None)
def __init__(self, valName, alignment, config)
def ValidationTemplate(self)