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 __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.ValidationMetaClass
def __new__ (cls, clsname, bases, dct)
 
- 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 = "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 
)

Definition at line 26 of file primaryVertexResolution.py.

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

26  def __init__(self, valName, alignment, config):
27  super(PrimaryVertexResolution, self).__init__(valName, alignment, config)
28 
29  if self.general["pvresolutionreference"].startswith("/store"):
30  self.general["pvresolutionreference"] = "root://eoscms//eos/cms" + self.general["pvresolutionreference"]
31  if self.NJobs > 1:
32  raise AllInOneError("Parallel jobs not implemented for the SplotVertexResolution validation!\n"
33  "Please set parallelJobs = 1.")
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

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 76 of file primaryVertexResolution.py.

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

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

◆ appendToPlots()

def primaryVertexResolution.PrimaryVertexResolution.appendToPlots (   self)

Definition at line 88 of file primaryVertexResolution.py.

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

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

◆ createCrabCfg()

def primaryVertexResolution.PrimaryVertexResolution.createCrabCfg (   self,
  path 
)

Definition at line 58 of file primaryVertexResolution.py.

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

58  def createCrabCfg(self, path):
59  return super(PrimaryVertexResolution, self).createCrabCfg(path, self.crabCfgBaseName)
60 

◆ createScript()

def primaryVertexResolution.PrimaryVertexResolution.createScript (   self,
  path 
)

Definition at line 55 of file primaryVertexResolution.py.

55  def createScript(self, path):
56  return super(PrimaryVertexResolution, self).createScript(path, template = configTemplates.PVResolutionScriptTemplate)
57 

◆ DefinePath()

def primaryVertexResolution.PrimaryVertexResolution.DefinePath (   self)

Definition at line 43 of file primaryVertexResolution.py.

43  def DefinePath(self):
44  return configTemplates.PVResolutionPath
45 

◆ getRepMap()

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

Definition at line 61 of file primaryVertexResolution.py.

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.

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

◆ plotsdirname()

def primaryVertexResolution.PrimaryVertexResolution.plotsdirname (   cls)

Definition at line 106 of file primaryVertexResolution.py.

Referenced by presentation.ValidationPlots.validationclass().

106  def plotsdirname(cls):
107  return "PrimaryVertexResolution"
108 

◆ plottingscriptname()

def primaryVertexResolution.PrimaryVertexResolution.plottingscriptname (   cls)

Definition at line 98 of file primaryVertexResolution.py.

98  def plottingscriptname(cls):
99  return "TkAlPrimaryVertexResolutionPlot.C"
100 

◆ plottingscripttemplate()

def primaryVertexResolution.PrimaryVertexResolution.plottingscripttemplate (   cls)

Definition at line 102 of file primaryVertexResolution.py.

102  def plottingscripttemplate(cls):
103  return configTemplates.PVResolutionPlotTemplate
104 

◆ ProcessName()

def primaryVertexResolution.PrimaryVertexResolution.ProcessName (   self)

Definition at line 52 of file primaryVertexResolution.py.

52  def ProcessName(self):
53  return "PrimaryVertexResolution"
54 
def ProcessName(process)
Definition: CustomConfigs.py:8

◆ runPlots()

def primaryVertexResolution.PrimaryVertexResolution.runPlots (   cls,
  validations 
)

Definition at line 94 of file primaryVertexResolution.py.

94  def runPlots(cls, validations):
95  return configTemplates.PVResolutionPlotExecution
96 

◆ TrackSelectionRefitting()

def primaryVertexResolution.PrimaryVertexResolution.TrackSelectionRefitting (   self)

Definition at line 39 of file primaryVertexResolution.py.

39  def TrackSelectionRefitting(self):
40  return configTemplates.SingleTrackRefitter
41 

◆ ValidationSequence()

def primaryVertexResolution.PrimaryVertexResolution.ValidationSequence (   self)

Definition at line 47 of file primaryVertexResolution.py.

47  def ValidationSequence(self):
48  #never enters anywhere, since we use the custom DefinePath which includes the goodVertexSkim
49  return ""
50 

◆ ValidationTemplate()

def primaryVertexResolution.PrimaryVertexResolution.ValidationTemplate (   self)

Definition at line 35 of file primaryVertexResolution.py.

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

Member Data Documentation

◆ configBaseName

string primaryVertexResolution.PrimaryVertexResolution.configBaseName = "TkAlPrimaryVertexResolution"
static

◆ crabCfgBaseName

◆ 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",
"startScale":"1.",
"endScale":"1000.",
"nTracksBins":"60.",
"nVtxBins":"40."
}

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 24 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