3 import globalDictionaries
4 from genericValidation
import GenericValidationData_CTSR, ValidationWithPlots, pythonboolstring
5 from helperFunctions
import replaceByMap
6 from TkAlExceptions
import AllInOneError
9 configBaseName =
"TkAlPrimaryVertexValidation" 10 scriptBaseName =
"TkAlPrimaryVertexValidation" 11 crabCfgBaseName =
"TkAlPrimaryVertexValidation" 12 resultBaseName =
"PrimaryVertexValidation" 13 outputBaseName =
"PrimaryVertexValidation" 15 "pvvalidationreference": (
"/store/caf/user/musich/Alignment/TkAlPrimaryVertexValidation/Reference/PrimaryVertexValidation_test_pvvalidation_upgrade2017_design_mc_48bins.root"),
19 mandatories = {
"isda",
"ismc",
"runboundary",
"trackcollection",
"vertexcollection",
"lumilist",
"ptCut",
"etaCut",
"runControl",
"numberOfBins"}
20 valType =
"primaryvertex" 21 def __init__(self, valName, alignment, config):
22 super(PrimaryVertexValidation, self).
__init__(valName, alignment, config)
24 for name
in "doBPix",
"doFPix":
27 if self.
general[
"pvvalidationreference"].startswith(
"/store"):
28 self.
general[
"pvvalidationreference"] =
"root://eoscms//eos/cms" + self.
general[
"pvvalidationreference"]
30 raise AllInOneError(
"Parallel jobs not implemented for the PrimaryVertex validation!\n" 31 "Please set parallelJobs = 1.")
35 return configTemplates.PrimaryVertexValidationTemplate
39 return configTemplates.PVValidationPath
52 return "PrimaryVertexValidation" 55 return super(PrimaryVertexValidation, self).
createScript(path, template = configTemplates.PVValidationScriptTemplate)
63 repMap = super(PrimaryVertexValidation, self).
getRepMap(alignment)
65 "nEvents": self.
general[
"maxevents"],
66 "TrackCollection": self.
general[
"trackcollection"],
67 "VertexCollection": self.
general[
"vertexcollection"],
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 (
' loadFileList("root://eoscms//eos/cms%(finalResultFile)s",' 91 '"PVValidation","%(title)s", %(color)s, %(style)s);\n')%repMap
95 return configTemplates.PrimaryVertexPlotExecution
99 return "TkAlPrimaryVertexValidationPlot.C" 103 return configTemplates.PrimaryVertexPlotTemplate
107 return "PrimaryVertexValidation" def ValidationSequence(self)
def pythonboolstring(string, name)
def plottingscriptname(cls)
def runPlots(cls, validations)
def plottingscripttemplate(cls)
def createCrabCfg(self, path)
def getRepMap(self, alignment=None)
def createScript(self, path)
static std::string join(char **cmd)
def ValidationTemplate(self)
def getRepMap(self, alignment=None)
def __init__(self, valName, alignment, config)