CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes
primaryVertexValidation.PrimaryVertexValidation Class Reference
Inheritance diagram for primaryVertexValidation.PrimaryVertexValidation:
genericValidation.GenericValidationData genericValidation.ValidationWithPlots genericValidation.GenericValidation genericValidation.GenericValidation

Public Member Functions

def __init__ (self, valName, alignment, config)
 
def appendToMerge (self)
 
def appendToPlots (self)
 
def createCrabCfg (self, path)
 
def createScript (self, path)
 
def DefinePath (self)
 
def getRepMap (self, alignment=None)
 
def plotsdirname (cls)
 
def plottingscriptname (cls)
 
def plottingscripttemplate (cls)
 
def ProcessName (self)
 
def runPlots (cls, validations)
 
def TrackSelectionRefitting (self)
 
def ValidationTemplate (self)
 
- Public Member Functions inherited from genericValidation.GenericValidationData
def __init__ (self, valName, alignment, config)
 
def Bookkeeping (self)
 
def cfgName (self)
 
def cfgTemplate (self)
 
def createConfiguration (self, path)
 
def createCrabCfg (self, path, crabCfgBaseName)
 
def createScript (self, path, template=configTemplates.scriptTemplate, downloadFiles=[], repMap=None, repMaps=None)
 
def DefinePath (self)
 
def FileOutputTemplate (self)
 
def filesToCompare (self)
 
def getRepMap (self, alignment=None)
 
def LoadBasicModules (self)
 
def ProcessName (self)
 
def TrackSelectionRefitting (self)
 
def ValidationTemplate (self)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__ (self, valName, alignment, config)
 
def createConfiguration (self, fileContents, path, schedule=None, repMap=None, repMaps=None)
 
def createCrabCfg (self, fileContents, path)
 
def createFiles (self, fileContents, path, repMap=None, repMaps=None)
 
def createScript (self, fileContents, path, downloadFiles=[], repMap=None, repMaps=None)
 
def filesToCompare (self)
 
def getCompareStrings (self, requestId=None, plain=False)
 
def getRepMap (self, alignment=None)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlots
def appendToPlots (self)
 
def createPlottingScript (cls, validations)
 
def doRunPlots (cls, validations)
 
def plotsdirname (cls)
 
def plottingscriptname (cls)
 
def plottingscripttemplate (cls)
 
def runPlots (cls, validations)
 

Static Public Attributes

string configBaseName = "TkAlPrimaryVertexValidation"
 
string crabCfgBaseName = "TkAlPrimaryVertexValidation"
 
dictionary defaults
 
dictionary mandatories = {"isda","ismc","runboundary","trackcollection","vertexcollection","lumilist","ptCut","etaCut","runControl","numberOfBins"}
 
string outputBaseName = "PrimaryVertexValidation"
 
string resultBaseName = "PrimaryVertexValidation"
 
string scriptBaseName = "TkAlPrimaryVertexValidation"
 
string valType = "primaryvertex"
 
- Static Public Attributes inherited from genericValidation.GenericValidationData
dictionary defaults
 
dictionary mandatories = {"dataset", "maxevents"}
 
bool needParentFiles = False
 
dictionary optionals = {"magneticfield"}
 
- Static Public Attributes inherited from genericValidation.GenericValidation
string defaultReferenceName = "DEFAULT"
 
dictionary defaults
 
 mandatories = set()
 
dictionary needpackages = {"Alignment/OfflineValidation"}
 
dictionary optionals = {"jobmode"}
 

Additional Inherited Members

- Public Attributes inherited from genericValidation.GenericValidationData
 crabWorkingDir
 
 dataset
 
- Public Attributes inherited from genericValidation.GenericValidation
 alignmentToValidate
 
 AutoAlternates
 
 cmssw
 
 cmsswreleasebase
 
 config
 
 configFiles
 
 crabConfigFiles
 
 general
 
 jobid
 
 jobmode
 
 name
 
 needsproxy
 
 NJobs
 
 packages
 
 randomWorkdirPart
 
 scramarch
 
 scriptFiles
 

Detailed Description

Definition at line 8 of file primaryVertexValidation.py.

Constructor & Destructor Documentation

def primaryVertexValidation.PrimaryVertexValidation.__init__ (   self,
  valName,
  alignment,
  config 
)

Definition at line 21 of file primaryVertexValidation.py.

References genericValidation.GenericValidation.general, genericValidation.GenericValidation.NJobs, and helperFunctions.pythonboolstring().

21  def __init__(self, valName, alignment, config):
22  super(PrimaryVertexValidation, self).__init__(valName, alignment, config)
23 
24  for name in "doBPix", "doFPix":
25  self.general[name] = pythonboolstring(self.general[name], name)
26 
27  if self.general["pvvalidationreference"].startswith("/store"):
28  self.general["pvvalidationreference"] = "root://eoscms//eos/cms" + self.general["pvvalidationreference"]
29  if self.NJobs > 1:
30  raise AllInOneError("Parallel jobs not implemented for the PrimaryVertex validation!\n"
31  "Please set parallelJobs = 1.")
32 
def pythonboolstring(string, name)
def __init__(self, valName, alignment, config)

Member Function Documentation

def primaryVertexValidation.PrimaryVertexValidation.appendToMerge (   self)
if no argument or "" is passed a string with an instantiation is returned,
else the validation is appended to the list

Definition at line 71 of file primaryVertexValidation.py.

References genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), and join().

71  def appendToMerge(self):
72  """
73  if no argument or "" is passed a string with an instantiation is returned,
74  else the validation is appended to the list
75  """
76  repMap = self.getRepMap()
77 
78  parameters = " ".join(os.path.join("root://eoscms//eos/cms", file.lstrip("/")) for file in repMap["resultFiles"])
79 
80  mergedoutputfile = os.path.join("root://eoscms//eos/cms", repMap["finalResultFile"].lstrip("/"))
81  return "hadd -f %s %s\n" % (mergedoutputfile, parameters)
82 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRepMap(self, alignment=None)
def primaryVertexValidation.PrimaryVertexValidation.appendToPlots (   self)

Definition at line 83 of file primaryVertexValidation.py.

References genericValidation.GenericValidation.getRepMap(), and alignment.Alignment.getRepMap().

83  def appendToPlots(self):
84  repMap = self.getRepMap()
85  return (' loadFileList("root://eoscms//eos/cms%(finalResultFile)s",'
86  '"PVValidation","%(title)s", %(color)s, %(style)s);\n')%repMap
87 
def getRepMap(self, alignment=None)
def primaryVertexValidation.PrimaryVertexValidation.createCrabCfg (   self,
  path 
)
def primaryVertexValidation.PrimaryVertexValidation.createScript (   self,
  path 
)

Definition at line 49 of file primaryVertexValidation.py.

49  def createScript(self, path):
50  return super(PrimaryVertexValidation, self).createScript(path, template = configTemplates.PVValidationScriptTemplate)
51 
def primaryVertexValidation.PrimaryVertexValidation.DefinePath (   self)

Definition at line 46 of file primaryVertexValidation.py.

46  def DefinePath(self):
47  return configTemplates.PVValidationPath
48 
def primaryVertexValidation.PrimaryVertexValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 55 of file primaryVertexValidation.py.

References genericValidation.GenericValidation.alignmentToValidate, genericValidation.GenericValidation.general, AlignableObjectId::entry.name, alignment.Alignment.name, genericValidation.GenericValidation.name, TrackerSectorStruct.name, classes.MonitorData.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, geometry.Structure.name, plotscripts.SawTeethFunction.name, primaryVertexValidation.PrimaryVertexValidation.outputBaseName, offlineValidation.OfflineValidation.outputBaseName, and monteCarloValidation.MonteCarloValidation.outputBaseName.

55  def getRepMap(self, alignment = None):
56  if alignment == None:
57  alignment = self.alignmentToValidate
58  repMap = super(PrimaryVertexValidation, self).getRepMap(alignment)
59  repMap.update({
60  "nEvents": self.general["maxevents"],
61  "TrackCollection": self.general["trackcollection"],
62  "VertexCollection": self.general["vertexcollection"],
63  "eosdir": os.path.join(self.general["eosdir"]),
64  #"eosdir": os.path.join(self.general["eosdir"], "%s/%s/%s" % (self.outputBaseName, self.name, alignment.name)),
65  "workingdir": ".oO[datadir]Oo./%s/%s/%s" % (self.outputBaseName, self.name, alignment.name),
66  "plotsdir": ".oO[datadir]Oo./%s/%s/%s/plots" % (self.outputBaseName, self.name, alignment.name),
67  })
68 
69  return repMap
70 
def primaryVertexValidation.PrimaryVertexValidation.plotsdirname (   cls)

Definition at line 101 of file primaryVertexValidation.py.

Referenced by presentation.ValidationPlots.validationclass().

101  def plotsdirname(cls):
102  return "PrimaryVertexValidation"
def primaryVertexValidation.PrimaryVertexValidation.plottingscriptname (   cls)

Definition at line 93 of file primaryVertexValidation.py.

94  return "TkAlPrimaryVertexValidationPlot.C"
95 
def primaryVertexValidation.PrimaryVertexValidation.plottingscripttemplate (   cls)

Definition at line 97 of file primaryVertexValidation.py.

98  return configTemplates.PrimaryVertexPlotTemplate
99 
def primaryVertexValidation.PrimaryVertexValidation.ProcessName (   self)

Definition at line 42 of file primaryVertexValidation.py.

42  def ProcessName(self):
43  return "PrimaryVertexValidation"
44 
def primaryVertexValidation.PrimaryVertexValidation.runPlots (   cls,
  validations 
)

Definition at line 89 of file primaryVertexValidation.py.

89  def runPlots(cls, validations):
90  return configTemplates.PrimaryVertexPlotExecution
91 
def primaryVertexValidation.PrimaryVertexValidation.TrackSelectionRefitting (   self)

Definition at line 38 of file primaryVertexValidation.py.

39  return configTemplates.SingleTrackRefitter
40 
def primaryVertexValidation.PrimaryVertexValidation.ValidationTemplate (   self)

Definition at line 34 of file primaryVertexValidation.py.

34  def ValidationTemplate(self):
35  return configTemplates.PrimaryVertexValidationTemplate
36 

Member Data Documentation

string primaryVertexValidation.PrimaryVertexValidation.configBaseName = "TkAlPrimaryVertexValidation"
static
string primaryVertexValidation.PrimaryVertexValidation.crabCfgBaseName = "TkAlPrimaryVertexValidation"
static
dictionary primaryVertexValidation.PrimaryVertexValidation.defaults
static
Initial value:
1 = {
2  "pvvalidationreference": ("/store/caf/user/musich/Alignment/TkAlPrimaryVertexValidation/Reference/PrimaryVertexValidation_test_pvvalidation_upgrade2017_design_mc_48bins.root"),
3  "doBPix":"True",
4  "doFPix":"True"
5  }

Definition at line 14 of file primaryVertexValidation.py.

Referenced by tree.Tree.reset(), and tree.Tree.var().

dictionary primaryVertexValidation.PrimaryVertexValidation.mandatories = {"isda","ismc","runboundary","trackcollection","vertexcollection","lumilist","ptCut","etaCut","runControl","numberOfBins"}
static

Definition at line 19 of file primaryVertexValidation.py.

string primaryVertexValidation.PrimaryVertexValidation.outputBaseName = "PrimaryVertexValidation"
static
string primaryVertexValidation.PrimaryVertexValidation.resultBaseName = "PrimaryVertexValidation"
static
string primaryVertexValidation.PrimaryVertexValidation.scriptBaseName = "TkAlPrimaryVertexValidation"
static
string primaryVertexValidation.PrimaryVertexValidation.valType = "primaryvertex"
static