CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes
offlineValidation.OfflineValidation Class Reference
Inheritance diagram for offlineValidation.OfflineValidation:
genericValidation.GenericValidationData_CTSR genericValidation.ParallelValidation genericValidation.ValidationWithComparison genericValidation.ValidationWithPlotsSummary genericValidation.ValidationForPresentation genericValidation.GenericValidationData genericValidation.GenericValidation genericValidation.GenericValidation genericValidation.ValidationWithPlotsSummaryBase genericValidation.ValidationWithPlots genericValidation.GenericValidation genericValidation.ValidationWithPlots genericValidation.ValidationMetaClass genericValidation.ValidationMetaClass genericValidation.GenericValidation offlineValidation.OfflineValidationDQM preexistingValidation.PreexistingOfflineValidation

Public Member Functions

def __init__ (self, valName, alignment, config)
 
def appendToMerge (self)
 
def appendToPlots (self)
 
def comparealignmentsname (cls)
 
def createCrabCfg (self, path)
 
def createScript (self, path)
 
def FileOutputTemplate (self)
 
def getRepMap (self, alignment=None)
 
def initMerge (cls)
 
def plotsdirname (cls)
 
def plottingscriptname (cls)
 
def plottingscripttemplate (cls)
 
def presentationsubsections (cls)
 
def ProcessName (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.ValidationMetaClass
def __new__ (cls, clsname, bases, dct)
 
- Public Member Functions inherited from genericValidation.ParallelValidation
def appendToMerge (self)
 
def doInitMerge (cls)
 
def doMerge (self)
 
def initMerge (cls)
 
- Public Member Functions inherited from genericValidation.ValidationWithComparison
def comparealignmentsname (cls)
 
def comparealignmentspath (cls)
 
def comparisontemplate (cls)
 
def doComparison (cls, validations)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlotsSummary
def getsummaryitems (cls, folder)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlotsSummaryBase
def getsummaryitems (cls, folder)
 
def printsummaryitems (cls, args, kwargs)
 
def summaryitemsstring (cls, folder=None, latex=False, transpose=True)
 
def writesummaryitems (cls, filename, args, kwargs)
 
- 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)
 
- Public Member Functions inherited from genericValidation.ValidationForPresentation
def presentationsubsections (cls)
 

Public Attributes

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

Static Public Attributes

string configBaseName = "TkAlOfflineValidation"
 
string crabCfgBaseName = "TkAlOfflineValidation"
 
dictionary defaults
 
dictionary deprecateddefaults
 
dictionary mandatories = {"trackcollection"}
 
string outputBaseName = "AlignmentValidation"
 
string resultBaseName = "AlignmentValidation"
 
string scriptBaseName = "TkAlOfflineValidation"
 
string valType = "offline"
 
- 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"]
 

Detailed Description

Definition at line 10 of file offlineValidation.py.

Constructor & Destructor Documentation

◆ __init__()

def offlineValidation.OfflineValidation.__init__ (   self,
  valName,
  alignment,
  config 
)

Definition at line 35 of file offlineValidation.py.

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

35  def __init__(self, valName, alignment, config):
36  super(OfflineValidation, self).__init__(valName, alignment, config)
37 
38  for name in "offlineModuleLevelHistsTransient", "offlineModuleLevelProfiles", "stripYResiduals":
39  self.general[name] = pythonboolstring(self.general[name], name)
40 
41  for option in self.deprecateddefaults:
42  if self.general[option]:
43  raise AllInOneError("The '%s' option has been moved to the [plots:offline] section. Please specify it there."%option)
44  del self.general[option]
45 
46  if self.NJobs > 1 and self.general["offlineModuleLevelHistsTransient"] == "True":
47  msg = ("To be able to merge results when running parallel jobs,"
48  " set offlineModuleLevelHistsTransient to false.")
49  raise AllInOneError(msg)
50 
51  try:
52  self.NTracks = int(self.general["maxtracks"])
53  if self.NTracks < 0: raise ValueError
54  except ValueError:
55  raise AllInOneError("maxtracks has to be a positive integer, or 0 for no limit")
56 
57  if self.NTracks / self.NJobs != float(self.NTracks) / self.NJobs:
58  raise AllInOneError("maxtracks has to be divisible by parallelJobs")
59 
def pythonboolstring(string, name)
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 offlineValidation.OfflineValidation.appendToMerge (   self)

Definition at line 109 of file offlineValidation.py.

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

109  def appendToMerge(self):
110  repMap = self.getRepMap()
111 
112  parameters = "root://eoscms//eos/cms" + ",root://eoscms//eos/cms".join(repMap["resultFiles"])
113 
114  mergedoutputfile = "root://eoscms//eos/cms%(finalResultFile)s"%repMap
115  return ('root -x -b -q -l "TkAlOfflineJobsMerge.C(\\\"'
116  +parameters+'\\\",\\\"'+mergedoutputfile+'\\\")"')
117 
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ appendToPlots()

def offlineValidation.OfflineValidation.appendToPlots (   self)

Definition at line 93 of file offlineValidation.py.

93  def appendToPlots(self):
94  return ' p.loadFileList(".oO[filetoplot]Oo.", ".oO[title]Oo.", .oO[color]Oo., .oO[style]Oo.);\n'
95 

◆ comparealignmentsname()

def offlineValidation.OfflineValidation.comparealignmentsname (   cls)

Definition at line 131 of file offlineValidation.py.

131  def comparealignmentsname(cls):
132  return "compareAlignments.cc"
133 

◆ createCrabCfg()

def offlineValidation.OfflineValidation.createCrabCfg (   self,
  path 
)

Definition at line 79 of file offlineValidation.py.

References offlineValidation.OfflineValidation.crabCfgBaseName, and monteCarloValidation.MonteCarloValidation.crabCfgBaseName.

79  def createCrabCfg(self, path):
80  return super(OfflineValidation, self).createCrabCfg(path, self.crabCfgBaseName)
81 

◆ createScript()

def offlineValidation.OfflineValidation.createScript (   self,
  path 
)

Definition at line 76 of file offlineValidation.py.

76  def createScript(self, path):
77  return super(OfflineValidation, self).createScript(path)
78 

◆ FileOutputTemplate()

def offlineValidation.OfflineValidation.FileOutputTemplate (   self)

Definition at line 73 of file offlineValidation.py.

73  def FileOutputTemplate(self):
74  return configTemplates.offlineFileOutputTemplate
75 

◆ getRepMap()

def offlineValidation.OfflineValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 82 of file offlineValidation.py.

References genericValidation.GenericValidation.general.

Referenced by plottingOptions.PlottingOptionsTrackSplitting.validsubdets().

82  def getRepMap(self, alignment = None):
83  repMap = super(OfflineValidation, self).getRepMap(alignment)
84  repMap.update({
85  "nEvents": self.general["maxevents"],
86  "offlineValidationMode": "Standalone",
87  "TrackCollection": self.general["trackcollection"],
88  "filetoplot": "root://eoscms//eos/cms.oO[finalResultFile]Oo.",
89  })
90 
91  return repMap
92 

◆ initMerge()

def offlineValidation.OfflineValidation.initMerge (   cls)

Definition at line 97 of file offlineValidation.py.

References plottingOptions.PlottingOptions(), print(), helperFunctions.replaceByMap(), monteCarloValidation.MonteCarloValidation.valType, offlineValidation.OfflineValidation.valType, and geometryComparison.GeometryComparison.valType.

97  def initMerge(cls):
98  from .plottingOptions import PlottingOptions
99  outFilePath = replaceByMap(".oO[scriptsdir]Oo./TkAlOfflineJobsMerge.C", PlottingOptions(None, cls.valType))
100  print("outFilePath")
101  print(outFilePath)
102  with open(outFilePath, "w") as theFile:
103  theFile.write(replaceByMap(configTemplates.mergeOfflineParJobsTemplate, {}))
104  result = super(OfflineValidation, cls).initMerge()
105  result += ("cp .oO[Alignment/OfflineValidation]Oo./scripts/merge_TrackerOfflineValidation.C .\n"
106  "cp .oO[mergeOfflineParJobsScriptPath]Oo. .\n")
107  return result
108 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def PlottingOptions(config, valType)
def replaceByMap(target, the_map)
— Helpers —############################

◆ plotsdirname()

def offlineValidation.OfflineValidation.plotsdirname (   cls)

Definition at line 127 of file offlineValidation.py.

Referenced by presentation.ValidationPlots.validationclass().

127  def plotsdirname(cls):
128  return "ExtendedOfflineValidation_Images"
129 

◆ plottingscriptname()

def offlineValidation.OfflineValidation.plottingscriptname (   cls)

Definition at line 119 of file offlineValidation.py.

119  def plottingscriptname(cls):
120  return "TkAlExtendedOfflineValidation.C"
121 

◆ plottingscripttemplate()

def offlineValidation.OfflineValidation.plottingscripttemplate (   cls)

Definition at line 123 of file offlineValidation.py.

123  def plottingscripttemplate(cls):
124  return configTemplates.extendedValidationTemplate
125 

◆ presentationsubsections()

def offlineValidation.OfflineValidation.presentationsubsections (   cls)

Definition at line 135 of file offlineValidation.py.

135  def presentationsubsections(cls):
136  return [
137  SubsectionOnePage('chi2', r'$\chi^2$ plots'),
138  SubsectionSubdetectors('DmedianY*R_[^_]*.eps$', 'DMR'),
139  SubsectionSubdetectors('DmedianY*R.*plain.eps$', 'DMR'),
140  SubsectionSubdetectors('DmedianY*R.*split.eps$','Split DMR'),
141  SubsectionSubdetectors('DrmsNY*R_[^_]*.eps$', 'DRnR'),
142  SubsectionSubdetectors('DrmsNY*R.*plain.eps$', 'DRnR'),
143  SubsectionSubdetectors('SurfaceShape', 'Surface Shape'),
144  ]
145 

◆ ProcessName()

def offlineValidation.OfflineValidation.ProcessName (   self)

Definition at line 61 of file offlineValidation.py.

61  def ProcessName(self):
62  return "OfflineValidator"
63 
def ProcessName(process)
Definition: CustomConfigs.py:8

◆ ValidationSequence()

def offlineValidation.OfflineValidation.ValidationSequence (   self)

Definition at line 69 of file offlineValidation.py.

69  def ValidationSequence(self):
70  return configTemplates.OfflineValidationSequence
71 

◆ ValidationTemplate()

def offlineValidation.OfflineValidation.ValidationTemplate (   self)

Definition at line 65 of file offlineValidation.py.

65  def ValidationTemplate(self):
66  return configTemplates.offlineTemplate
67 

Member Data Documentation

◆ configBaseName

string offlineValidation.OfflineValidation.configBaseName = "TkAlOfflineValidation"
static

◆ crabCfgBaseName

string offlineValidation.OfflineValidation.crabCfgBaseName = "TkAlOfflineValidation"
static

◆ defaults

dictionary offlineValidation.OfflineValidation.defaults
static
Initial value:
= {
"offlineModuleLevelHistsTransient": "False",
"offlineModuleLevelProfiles": "True",
"stripYResiduals": "False",
"maxtracks": "0",
"chargeCut": "0",
"multiIOV": "False",
}

Definition at line 16 of file offlineValidation.py.

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

◆ deprecateddefaults

dictionary offlineValidation.OfflineValidation.deprecateddefaults
static
Initial value:
= {
"DMRMethod":"",
"DMRMinimum":"",
"DMROptions":"",
"OfflineTreeBaseDir":"",
"SurfaceShapes":"",
}

Definition at line 24 of file offlineValidation.py.

Referenced by offlineValidation.OfflineValidation.__init__(), zMuMuValidation.ZMuMuValidation.__init__(), and preexistingValidation.PreexistingOfflineValidation.__init__().

◆ mandatories

dictionary offlineValidation.OfflineValidation.mandatories = {"trackcollection"}
static

Definition at line 32 of file offlineValidation.py.

◆ NTracks

offlineValidation.OfflineValidation.NTracks

Definition at line 52 of file offlineValidation.py.

◆ outputBaseName

string offlineValidation.OfflineValidation.outputBaseName = "AlignmentValidation"
static

◆ resultBaseName

string offlineValidation.OfflineValidation.resultBaseName = "AlignmentValidation"
static

◆ scriptBaseName

string offlineValidation.OfflineValidation.scriptBaseName = "TkAlOfflineValidation"
static

◆ valType

string offlineValidation.OfflineValidation.valType = "offline"
static