3 import globalDictionaries
4 from genericValidation
import GenericValidationData_CTSR, ParallelValidation, 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"),
19 "forceBeamSpot":
"False",
21 mandatories = {
"isda",
"ismc",
"runboundary",
"trackcollection",
"vertexcollection",
"lumilist",
"ptCut",
"etaCut",
"runControl",
"numberOfBins"}
22 valType =
"primaryvertex" 23 def __init__(self, valName, alignment, config):
24 super(PrimaryVertexValidation, self).
__init__(valName, alignment, config)
26 for name
in "doBPix",
"doFPix",
"forceBeamSpot":
29 if self.
general[
"pvvalidationreference"].startswith(
"/store"):
30 self.
general[
"pvvalidationreference"] =
"root://eoscms//eos/cms" + self.
general[
"pvvalidationreference"]
34 return configTemplates.PrimaryVertexValidationTemplate
38 return configTemplates.PVValidationPath
55 return "PrimaryVertexValidation" 58 return super(PrimaryVertexValidation, self).
createScript(path, template = configTemplates.PVValidationScriptTemplate)
66 repMap = super(PrimaryVertexValidation, self).
getRepMap(alignment)
68 "nEvents": self.
general[
"maxevents"],
69 "TrackCollection": self.
general[
"trackcollection"],
70 "VertexCollection": self.
general[
"vertexcollection"],
71 "eosdir": os.path.join(self.
general[
"eosdir"]),
73 "workingdir":
".oO[datadir]Oo./%s/%s/%s" % (self.
outputBaseName, self.
name, alignment.name),
74 "plotsdir":
".oO[datadir]Oo./%s/%s/%s/plots" % (self.
outputBaseName, self.
name, alignment.name),
75 "filetoplot":
"root://eoscms//eos/cms.oO[finalResultFile]Oo.",
82 if no argument or "" is passed a string with an instantiation is returned, 83 else the validation is appended to the list 87 parameters =
" ".
join(os.path.join(
"root://eoscms//eos/cms", file.lstrip(
"/"))
for file
in repMap[
"resultFiles"])
89 mergedoutputfile = os.path.join(
"root://eoscms//eos/cms", repMap[
"finalResultFile"].lstrip(
"/"))
90 return "hadd -f %s %s\n" % (mergedoutputfile, parameters)
94 return (
' loadFileList("%(filetoplot)s",' 95 '"PVValidation", "%(title)s", %(color)s, %(style)s);\n')%repMap
99 return configTemplates.PrimaryVertexPlotExecution
103 return "TkAlPrimaryVertexValidationPlot.C" 107 return configTemplates.PrimaryVertexPlotTemplate
111 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)