1 from __future__
import absolute_import
3 from .
import configTemplates
4 from .
import globalDictionaries
5 from .genericValidation
import GenericValidationData_CTSR, ParallelValidation, ValidationWithPlots, pythonboolstring
6 from .helperFunctions
import replaceByMap
7 from .TkAlExceptions
import AllInOneError
10 configBaseName =
"TkAlPrimaryVertexValidation" 11 scriptBaseName =
"TkAlPrimaryVertexValidation" 12 crabCfgBaseName =
"TkAlPrimaryVertexValidation" 13 resultBaseName =
"PrimaryVertexValidation" 14 outputBaseName =
"PrimaryVertexValidation" 17 "pvvalidationreference": (
"/store/group/alca_trackeralign/validation/PVValidation/Reference/PrimaryVertexValidation_phaseIMC92X_upgrade2017_Ideal.root"),
20 "forceBeamSpot":
"False",
23 mandatories = {
"isda",
"ismc",
"runboundary",
"trackcollection",
"vertexcollection",
"lumilist",
"ptCut",
"etaCut",
"runControl",
"numberOfBins"}
24 valType =
"primaryvertex" 25 def __init__(self, valName, alignment, config):
26 super(PrimaryVertexValidation, self).
__init__(valName, alignment, config)
28 for name
in "doBPix",
"doFPix",
"forceBeamSpot":
31 if self.
general[
"pvvalidationreference"].startswith(
"/store"):
32 self.
general[
"pvvalidationreference"] =
"root://eoscms//eos/cms" + self.
general[
"pvvalidationreference"]
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),
77 "filetoplot":
"root://eoscms//eos/cms.oO[finalResultFile]Oo.",
84 if no argument or "" is passed a string with an instantiation is returned, 85 else the validation is appended to the list 89 parameters =
" ".
join(os.path.join(
"root://eoscms//eos/cms", file.lstrip(
"/"))
for file
in repMap[
"resultFiles"])
91 mergedoutputfile = os.path.join(
"root://eoscms//eos/cms", repMap[
"finalResultFile"].lstrip(
"/"))
92 return "hadd -f %s %s\n" % (mergedoutputfile, parameters)
96 return (
' loadFileList("%(filetoplot)s",' 97 '"PVValidation", "%(title)s", %(color)s, %(style)s);\n')%repMap
101 return configTemplates.PrimaryVertexPlotExecution
105 return "TkAlPrimaryVertexValidationPlot.C" 109 return configTemplates.PrimaryVertexPlotTemplate
113 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)