CMS 3D CMS Logo

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

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 ValidationSequence (self)
 
def ValidationTemplate (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.ValidationWithPlots
def createPlottingScript (cls, validations)
 
def doRunPlots (cls, validations)
 

Static Public Attributes

string configBaseName = "TkAlPrimaryVertexResolution"
 
string crabCfgBaseName = "TkAlPrimaryVertexResolution"
 
dictionary defaults
 
dictionary mandatories = {"runControl","runboundary","doTriggerSelection","triggerBits","trackcollection"}
 
string outputBaseName = "PrimaryVertexResolution"
 
string resultBaseName = "PrimaryVertexResolution"
 
string scriptBaseName = "TkAlPrimaryVertexResolution"
 
string valType = "pvresolution"
 
- 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 8 of file primaryVertexResolution.py.

Constructor & Destructor Documentation

◆ __init__()

def primaryVertexResolution.PrimaryVertexResolution.__init__ (   self,
  valName,
  alignment,
  config 
)
This method adds additional items to the `self.general` dictionary
which are only needed for validations using datasets.

Arguments:
- `valName`: String which identifies individual validation instances
- `alignment`: `Alignment` instance to validate
- `config`: `BetterConfigParser` instance which includes the
    configuration of the validations

Reimplemented from genericValidation.GenericValidationData.

Definition at line 22 of file primaryVertexResolution.py.

22  def __init__(self, valName, alignment, config):
23  super(PrimaryVertexResolution, self).__init__(valName, alignment, config)
24 
25  if self.general["pvresolutionreference"].startswith("/store"):
26  self.general["pvresolutionreference"] = "root://eoscms//eos/cms" + self.general["pvresolutionreference"]
27  if self.NJobs > 1:
28  raise AllInOneError("Parallel jobs not implemented for the SplotVertexResolution validation!\n"
29  "Please set parallelJobs = 1.")

References genericValidation.GenericValidation.general, and genericValidation.GenericValidation.NJobs.

Member Function Documentation

◆ appendToMerge()

def primaryVertexResolution.PrimaryVertexResolution.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 72 of file primaryVertexResolution.py.

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

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

◆ appendToPlots()

def primaryVertexResolution.PrimaryVertexResolution.appendToPlots (   self)

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 84 of file primaryVertexResolution.py.

84  def appendToPlots(self):
85  repMap = self.getRepMap()
86  return (' PVResolution::loadFileList("root://eoscms//eos/cms%(finalResultFile)s",'
87  '"PrimaryVertexResolution","%(title)s", %(color)s, %(style)s);\n')%repMap
88 

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

◆ createCrabCfg()

def primaryVertexResolution.PrimaryVertexResolution.createCrabCfg (   self,
  path 
)

Definition at line 54 of file primaryVertexResolution.py.

54  def createCrabCfg(self, path):
55  return super(PrimaryVertexResolution, self).createCrabCfg(path, self.crabCfgBaseName)
56 

References primaryVertexResolution.PrimaryVertexResolution.crabCfgBaseName, offlineValidation.OfflineValidation.crabCfgBaseName, monteCarloValidation.MonteCarloValidation.crabCfgBaseName, and overlapValidation.OverlapValidation.crabCfgBaseName.

◆ createScript()

def primaryVertexResolution.PrimaryVertexResolution.createScript (   self,
  path 
)

Definition at line 51 of file primaryVertexResolution.py.

51  def createScript(self, path):
52  return super(PrimaryVertexResolution, self).createScript(path, template = configTemplates.PVResolutionScriptTemplate)
53 

◆ DefinePath()

def primaryVertexResolution.PrimaryVertexResolution.DefinePath (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 39 of file primaryVertexResolution.py.

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

◆ getRepMap()

def primaryVertexResolution.PrimaryVertexResolution.getRepMap (   self,
  alignment = None 
)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 57 of file primaryVertexResolution.py.

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

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, offlineValidation.OfflineValidation.outputBaseName, monteCarloValidation.MonteCarloValidation.outputBaseName, and overlapValidation.OverlapValidation.outputBaseName.

◆ plotsdirname()

def primaryVertexResolution.PrimaryVertexResolution.plotsdirname (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 102 of file primaryVertexResolution.py.

102  def plotsdirname(cls):
103  return "PrimaryVertexResolution"

Referenced by presentation.ValidationPlots.validationclass().

◆ plottingscriptname()

def primaryVertexResolution.PrimaryVertexResolution.plottingscriptname (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 94 of file primaryVertexResolution.py.

94  def plottingscriptname(cls):
95  return "TkAlPrimaryVertexResolutionPlot.C"
96 

◆ plottingscripttemplate()

def primaryVertexResolution.PrimaryVertexResolution.plottingscripttemplate (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 98 of file primaryVertexResolution.py.

98  def plottingscripttemplate(cls):
99  return configTemplates.PVResolutionPlotTemplate
100 

◆ ProcessName()

def primaryVertexResolution.PrimaryVertexResolution.ProcessName (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 48 of file primaryVertexResolution.py.

48  def ProcessName(self):
49  return "PrimaryVertexResolution"
50 

◆ runPlots()

def primaryVertexResolution.PrimaryVertexResolution.runPlots (   cls,
  validations 
)

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 90 of file primaryVertexResolution.py.

90  def runPlots(cls, validations):
91  return configTemplates.PVResolutionPlotExecution
92 

◆ TrackSelectionRefitting()

def primaryVertexResolution.PrimaryVertexResolution.TrackSelectionRefitting (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 35 of file primaryVertexResolution.py.

35  def TrackSelectionRefitting(self):
36  return configTemplates.SingleTrackRefitter
37 

◆ ValidationSequence()

def primaryVertexResolution.PrimaryVertexResolution.ValidationSequence (   self)

Definition at line 43 of file primaryVertexResolution.py.

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

◆ ValidationTemplate()

def primaryVertexResolution.PrimaryVertexResolution.ValidationTemplate (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 31 of file primaryVertexResolution.py.

31  def ValidationTemplate(self):
32  return configTemplates.PrimaryVertexResolutionTemplate
33 

Member Data Documentation

◆ configBaseName

string primaryVertexResolution.PrimaryVertexResolution.configBaseName = "TkAlPrimaryVertexResolution"
static

◆ crabCfgBaseName

string primaryVertexResolution.PrimaryVertexResolution.crabCfgBaseName = "TkAlPrimaryVertexResolution"
static

◆ defaults

dictionary primaryVertexResolution.PrimaryVertexResolution.defaults
static
Initial value:
= {
# N.B.: the reference needs to be updated each time the format of the output is changed
"pvresolutionreference": ("/store/group/alca_trackeralign/validation/PVResolution/Reference/PrimaryVertexResolution_phaseIMC92X_upgrade2017_Ideal.root"),
"multiIOV":"False",
}

Definition at line 14 of file primaryVertexResolution.py.

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

◆ mandatories

dictionary primaryVertexResolution.PrimaryVertexResolution.mandatories = {"runControl","runboundary","doTriggerSelection","triggerBits","trackcollection"}
static

Definition at line 20 of file primaryVertexResolution.py.

◆ outputBaseName

string primaryVertexResolution.PrimaryVertexResolution.outputBaseName = "PrimaryVertexResolution"
static

◆ resultBaseName

string primaryVertexResolution.PrimaryVertexResolution.resultBaseName = "PrimaryVertexResolution"
static

◆ scriptBaseName

string primaryVertexResolution.PrimaryVertexResolution.scriptBaseName = "TkAlPrimaryVertexResolution"
static

◆ valType

string primaryVertexResolution.PrimaryVertexResolution.valType = "pvresolution"
static
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
CustomConfigs.ProcessName
def ProcessName(process)
Definition: CustomConfigs.py:8