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.ValidationWithPlots genericValidation.GenericValidationData genericValidation.GenericValidation genericValidation.GenericValidation 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 DefinePath (self)
 
def getRepMap (self, alignment=None)
 
def isPVValidation (self)
 
def TrackSelectionRefitting (self)
 
def use_d0cut (self)
 
def ValidationSequence (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_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"}
 

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

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

23  def __init__(self, valName, alignment, config):
24  super(PrimaryVertexValidation, self).__init__(valName, alignment, config)
25 
26  for name in "doBPix", "doFPix", "forceBeamSpot":
27  self.general[name] = pythonboolstring(self.general[name], name)
28 
29  if self.general["pvvalidationreference"].startswith("/store"):
30  self.general["pvvalidationreference"] = "root://eoscms//eos/cms" + self.general["pvvalidationreference"]
31  if self.NJobs > 1:
32  raise AllInOneError("Parallel jobs not implemented for the PrimaryVertex validation!\n"
33  "Please set parallelJobs = 1.")
34 
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 83 of file primaryVertexValidation.py.

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

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

Definition at line 95 of file primaryVertexValidation.py.

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

95  def appendToPlots(self):
96  repMap = self.getRepMap()
97  return (' loadFileList("%(filetoplot)s",'
98  '"PVValidation", "%(title)s", %(color)s, %(style)s);\n')%repMap
99 
def getRepMap(self, alignment=None)
def primaryVertexValidation.PrimaryVertexValidation.createCrabCfg (   self,
  path 
)
def primaryVertexValidation.PrimaryVertexValidation.createScript (   self,
  path 
)

Definition at line 60 of file primaryVertexValidation.py.

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

Definition at line 40 of file primaryVertexValidation.py.

40  def DefinePath(self):
41  return configTemplates.PVValidationPath
42 
def primaryVertexValidation.PrimaryVertexValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 66 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.

66  def getRepMap(self, alignment = None):
67  if alignment == None:
68  alignment = self.alignmentToValidate
69  repMap = super(PrimaryVertexValidation, self).getRepMap(alignment)
70  repMap.update({
71  "nEvents": self.general["maxevents"],
72  "TrackCollection": self.general["trackcollection"],
73  "VertexCollection": self.general["vertexcollection"],
74  "eosdir": os.path.join(self.general["eosdir"]),
75  #"eosdir": os.path.join(self.general["eosdir"], "%s/%s/%s" % (self.outputBaseName, self.name, alignment.name)),
76  "workingdir": ".oO[datadir]Oo./%s/%s/%s" % (self.outputBaseName, self.name, alignment.name),
77  "plotsdir": ".oO[datadir]Oo./%s/%s/%s/plots" % (self.outputBaseName, self.name, alignment.name),
78  "filetoplot": "root://eoscms//eos/cms.oO[finalResultFile]Oo.",
79  })
80 
81  return repMap
82 
def primaryVertexValidation.PrimaryVertexValidation.isPVValidation (   self)

Definition at line 53 of file primaryVertexValidation.py.

53  def isPVValidation(self):
54  return True
55 
def primaryVertexValidation.PrimaryVertexValidation.plotsdirname (   cls)

Definition at line 113 of file primaryVertexValidation.py.

Referenced by presentation.ValidationPlots.validationclass().

113  def plotsdirname(cls):
114  return "PrimaryVertexValidation"
def primaryVertexValidation.PrimaryVertexValidation.plottingscriptname (   cls)

Definition at line 105 of file primaryVertexValidation.py.

106  return "TkAlPrimaryVertexValidationPlot.C"
107 
def primaryVertexValidation.PrimaryVertexValidation.plottingscripttemplate (   cls)

Definition at line 109 of file primaryVertexValidation.py.

110  return configTemplates.PrimaryVertexPlotTemplate
111 
def primaryVertexValidation.PrimaryVertexValidation.ProcessName (   self)

Definition at line 57 of file primaryVertexValidation.py.

57  def ProcessName(self):
58  return "PrimaryVertexValidation"
59 
def primaryVertexValidation.PrimaryVertexValidation.runPlots (   cls,
  validations 
)

Definition at line 101 of file primaryVertexValidation.py.

101  def runPlots(cls, validations):
102  return configTemplates.PrimaryVertexPlotExecution
103 
def primaryVertexValidation.PrimaryVertexValidation.use_d0cut (   self)

Definition at line 49 of file primaryVertexValidation.py.

49  def use_d0cut(self):
50  return False
51 
def primaryVertexValidation.PrimaryVertexValidation.ValidationSequence (   self)

Definition at line 44 of file primaryVertexValidation.py.

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

Definition at line 36 of file primaryVertexValidation.py.

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

Member Data Documentation

string primaryVertexValidation.PrimaryVertexValidation.configBaseName = "TkAlPrimaryVertexValidation"
static
string primaryVertexValidation.PrimaryVertexValidation.crabCfgBaseName = "TkAlPrimaryVertexValidation"
static
dictionary primaryVertexValidation.PrimaryVertexValidation.defaults
static
Initial value:
1 = {
2  # N.B.: the reference needs to be updated each time the format of the output is changed
3  "pvvalidationreference": ("/store/group/alca_trackeralign/validation/PVValidation/Reference/PrimaryVertexValidation_phaseIMC92X_upgrade2017_Ideal.root"),
4  "doBPix":"True",
5  "doFPix":"True",
6  "forceBeamSpot":"False",
7  }

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