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_CTSR genericValidation.ParallelValidation genericValidation.ValidationWithPlots genericValidation.GenericValidationData genericValidation.GenericValidation genericValidation.GenericValidation genericValidation.GenericValidation genericValidation.ValidationMetaClass genericValidation.ValidationMetaClass genericValidation.ValidationMetaClass preexistingValidation.PreexistingPrimaryVertexValidation

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 isPVValidation (self)
 
def plotsdirname (cls)
 
def plottingscriptname (cls)
 
def plottingscripttemplate (cls)
 
def ProcessName (self)
 
def runPlots (cls, validations)
 
def use_d0cut (self)
 
def ValidationSequence (self)
 
def ValidationTemplate (self)
 
- Public Member Functions inherited from genericValidation.GenericValidationData_CTSR
def cosmics0T (self)
 
def TrackSelectionRefitting (self)
 
- Public Member Functions inherited from genericValidation.GenericValidationData
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 FileOutputTemplate (self)
 
def filesToCompare (self)
 
def LoadBasicModules (self)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def createConfiguration (self, fileContents, path, schedule=None, repMap=None, repMaps=None)
 
def createFiles (self, fileContents, path, repMap=None, repMaps=None)
 
def getCompareStrings (self, requestId=None, plain=False)
 
- Public Member Functions inherited from genericValidation.ValidationMetaClass
def __new__ (cls, clsname, bases, dct)
 
- Public Member Functions inherited from genericValidation.ParallelValidation
def doInitMerge (cls)
 
def doMerge (self)
 
def initMerge (cls)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlots
def createPlottingScript (cls, validations)
 
def doRunPlots (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_CTSR
dictionary defaults
 
- 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"}
 
- Static Public Attributes inherited from genericValidation.ValidationMetaClass
list dicts = ["defaults"]
 
list sets = ["mandatories", "optionals", "needpackages"]
 

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 9 of file primaryVertexValidation.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from genericValidation.GenericValidation.

Definition at line 25 of file primaryVertexValidation.py.

25  def __init__(self, valName, alignment, config):
26  super(PrimaryVertexValidation, self).__init__(valName, alignment, config)
27 
28  for name in "doBPix", "doFPix", "forceBeamSpot":
29  self.general[name] = pythonboolstring(self.general[name], name)
30 
31  if self.general["pvvalidationreference"].startswith("/store"):
32  self.general["pvvalidationreference"] = "root://eoscms//eos/cms" + self.general["pvvalidationreference"]
33 

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

Member Function Documentation

◆ appendToMerge()

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

Reimplemented from genericValidation.ParallelValidation.

Definition at line 82 of file primaryVertexValidation.py.

82  def appendToMerge(self):
83  """
84  if no argument or "" is passed a string with an instantiation is returned,
85  else the validation is appended to the list
86  """
87  repMap = self.getRepMap()
88 
89  parameters = " ".join(os.path.join("root://eoscms//eos/cms", file.lstrip("/")) for file in repMap["resultFiles"])
90 
91  mergedoutputfile = os.path.join("root://eoscms//eos/cms", repMap["finalResultFile"].lstrip("/"))
92  return "hadd -f %s %s\n" % (mergedoutputfile, parameters)
93 

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

◆ appendToPlots()

def primaryVertexValidation.PrimaryVertexValidation.appendToPlots (   self)

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 94 of file primaryVertexValidation.py.

94  def appendToPlots(self):
95  repMap = self.getRepMap()
96  return (' loadFileList("%(filetoplot)s",'
97  '"PVValidation", "%(title)s", %(color)s, %(style)s);\n')%repMap
98 

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

◆ createCrabCfg()

def primaryVertexValidation.PrimaryVertexValidation.createCrabCfg (   self,
  path 
)

◆ createScript()

def primaryVertexValidation.PrimaryVertexValidation.createScript (   self,
  path 
)

Definition at line 59 of file primaryVertexValidation.py.

59  def createScript(self, path):
60  return super(PrimaryVertexValidation, self).createScript(path, template = configTemplates.PVValidationScriptTemplate)
61 

◆ DefinePath()

def primaryVertexValidation.PrimaryVertexValidation.DefinePath (   self)

Reimplemented from genericValidation.GenericValidationData_CTSR.

Definition at line 39 of file primaryVertexValidation.py.

39  def DefinePath(self):
40  return configTemplates.PVValidationPath
41 

◆ getRepMap()

def primaryVertexValidation.PrimaryVertexValidation.getRepMap (   self,
  alignment = None 
)

Reimplemented from genericValidation.GenericValidationData_CTSR.

Definition at line 65 of file primaryVertexValidation.py.

65  def getRepMap(self, alignment = None):
66  if alignment == None:
67  alignment = self.alignmentToValidate
68  repMap = super(PrimaryVertexValidation, self).getRepMap(alignment)
69  repMap.update({
70  "nEvents": self.general["maxevents"],
71  "TrackCollection": self.general["trackcollection"],
72  "VertexCollection": self.general["vertexcollection"],
73  "eosdir": os.path.join(self.general["eosdir"]),
74  #"eosdir": os.path.join(self.general["eosdir"], "%s/%s/%s" % (self.outputBaseName, self.name, alignment.name)),
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.",
78  })
79 
80  return repMap
81 

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

◆ isPVValidation()

def primaryVertexValidation.PrimaryVertexValidation.isPVValidation (   self)

Reimplemented from genericValidation.GenericValidationData_CTSR.

Definition at line 52 of file primaryVertexValidation.py.

52  def isPVValidation(self):
53  return True
54 

◆ plotsdirname()

def primaryVertexValidation.PrimaryVertexValidation.plotsdirname (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 112 of file primaryVertexValidation.py.

112  def plotsdirname(cls):
113  return "PrimaryVertexValidation"

Referenced by presentation.ValidationPlots.validationclass().

◆ plottingscriptname()

def primaryVertexValidation.PrimaryVertexValidation.plottingscriptname (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 104 of file primaryVertexValidation.py.

104  def plottingscriptname(cls):
105  return "TkAlPrimaryVertexValidationPlot.C"
106 

◆ plottingscripttemplate()

def primaryVertexValidation.PrimaryVertexValidation.plottingscripttemplate (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 108 of file primaryVertexValidation.py.

108  def plottingscripttemplate(cls):
109  return configTemplates.PrimaryVertexPlotTemplate
110 

◆ ProcessName()

def primaryVertexValidation.PrimaryVertexValidation.ProcessName (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 56 of file primaryVertexValidation.py.

56  def ProcessName(self):
57  return "PrimaryVertexValidation"
58 

◆ runPlots()

def primaryVertexValidation.PrimaryVertexValidation.runPlots (   cls,
  validations 
)

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 100 of file primaryVertexValidation.py.

100  def runPlots(cls, validations):
101  return configTemplates.PrimaryVertexPlotExecution
102 

◆ use_d0cut()

def primaryVertexValidation.PrimaryVertexValidation.use_d0cut (   self)

Reimplemented from genericValidation.GenericValidationData_CTSR.

Definition at line 48 of file primaryVertexValidation.py.

48  def use_d0cut(self):
49  return False
50 

◆ ValidationSequence()

def primaryVertexValidation.PrimaryVertexValidation.ValidationSequence (   self)

Reimplemented from genericValidation.GenericValidationData_CTSR.

Definition at line 43 of file primaryVertexValidation.py.

43  def ValidationSequence(self):
44  #never enters anywhere, since we use the custom DefinePath which includes the goodVertexSkim
45  return ""
46 

◆ ValidationTemplate()

def primaryVertexValidation.PrimaryVertexValidation.ValidationTemplate (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 35 of file primaryVertexValidation.py.

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

Member Data Documentation

◆ configBaseName

string primaryVertexValidation.PrimaryVertexValidation.configBaseName = "TkAlPrimaryVertexValidation"
static

◆ crabCfgBaseName

string primaryVertexValidation.PrimaryVertexValidation.crabCfgBaseName = "TkAlPrimaryVertexValidation"
static

◆ defaults

dictionary primaryVertexValidation.PrimaryVertexValidation.defaults
static
Initial value:
= {
# N.B.: the reference needs to be updated each time the format of the output is changed
"pvvalidationreference": ("/store/group/alca_trackeralign/validation/PVValidation/Reference/PrimaryVertexValidation_phaseIMC92X_upgrade2017_Ideal.root"),
"doBPix":"True",
"doFPix":"True",
"forceBeamSpot":"False",
"multiIOV":"False",
}

Definition at line 15 of file primaryVertexValidation.py.

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

◆ mandatories

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

Definition at line 23 of file primaryVertexValidation.py.

◆ outputBaseName

string primaryVertexValidation.PrimaryVertexValidation.outputBaseName = "PrimaryVertexValidation"
static

◆ resultBaseName

string primaryVertexValidation.PrimaryVertexValidation.resultBaseName = "PrimaryVertexValidation"
static

◆ scriptBaseName

string primaryVertexValidation.PrimaryVertexValidation.scriptBaseName = "TkAlPrimaryVertexValidation"
static

◆ valType

string primaryVertexValidation.PrimaryVertexValidation.valType = "primaryvertex"
static
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
CustomConfigs.ProcessName
def ProcessName(process)
Definition: CustomConfigs.py:8
helperFunctions.pythonboolstring
def pythonboolstring(string, name)
Definition: helperFunctions.py:186