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" 16 "pvvalidationreference": (
"/store/group/alca_trackeralign/validation/PVValidation/Reference/PrimaryVertexValidation_phaseIMC92X_upgrade2017_Ideal.root"),
20 mandatories = {
"isda",
"ismc",
"runboundary",
"trackcollection",
"vertexcollection",
"lumilist",
"ptCut",
"etaCut",
"runControl",
"numberOfBins"}
21 valType =
"primaryvertex" 22 def __init__(self, valName, alignment, config):
23 super(PrimaryVertexValidation, self).
__init__(valName, alignment, config)
25 for name
in "doBPix",
"doFPix":
28 if self.
general[
"pvvalidationreference"].startswith(
"/store"):
29 self.
general[
"pvvalidationreference"] =
"root://eoscms//eos/cms" + self.
general[
"pvvalidationreference"]
31 raise AllInOneError(
"Parallel jobs not implemented for the PrimaryVertex validation!\n" 32 "Please set parallelJobs = 1.")
36 return configTemplates.PrimaryVertexValidationTemplate
40 return configTemplates.PVValidationPath
57 return "PrimaryVertexValidation" 60 return super(PrimaryVertexValidation, self).
createScript(path, template = configTemplates.PVValidationScriptTemplate)
68 repMap = super(PrimaryVertexValidation, self).
getRepMap(alignment)
70 "nEvents": self.
general[
"maxevents"],
71 "TrackCollection": self.
general[
"trackcollection"],
72 "VertexCollection": self.
general[
"vertexcollection"],
73 "eosdir": os.path.join(self.
general[
"eosdir"]),
75 "workingdir":
".oO[datadir]Oo./%s/%s/%s" % (self.
outputBaseName, self.
name, alignment.name),
76 "plotsdir":
".oO[datadir]Oo./%s/%s/%s/plots" % (self.
outputBaseName, self.
name, alignment.name),
83 if no argument or "" is passed a string with an instantiation is returned, 84 else the validation is appended to the list 88 parameters =
" ".
join(os.path.join(
"root://eoscms//eos/cms", file.lstrip(
"/"))
for file
in repMap[
"resultFiles"])
90 mergedoutputfile = os.path.join(
"root://eoscms//eos/cms", repMap[
"finalResultFile"].lstrip(
"/"))
91 return "hadd -f %s %s\n" % (mergedoutputfile, parameters)
95 return (
' loadFileList("root://eoscms//eos/cms%(finalResultFile)s",' 96 '"PVValidation","%(title)s", %(color)s, %(style)s);\n')%repMap
100 return configTemplates.PrimaryVertexPlotExecution
104 return "TkAlPrimaryVertexValidationPlot.C" 108 return configTemplates.PrimaryVertexPlotTemplate
112 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)