CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
offlineValidation.OfflineValidation Class Reference
Inheritance diagram for offlineValidation.OfflineValidation:
offlineValidation.OfflineValidationDQM

Public Member Functions

def __init__
 
def appendToMerge
 
def appendToPlots
 
def comparealignmentsname
 
def createCrabCfg
 
def createScript
 
def FileOutputTemplate
 
def getRepMap
 
def initMerge
 
def plotsdirname
 
def plottingscriptname
 
def plottingscripttemplate
 
def presentationsubsections
 
def ProcessName
 
def ValidationSequence
 
def ValidationTemplate
 

Public Attributes

 NTracks
 

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"
 

Detailed Description

Definition at line 10 of file offlineValidation.py.

Constructor & Destructor Documentation

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

Definition at line 35 of file offlineValidation.py.

References offlineValidation.OfflineValidation.deprecateddefaults, preexistingValidation.PreexistingValidation.general, plottingOptions.BasePlottingOptions.general, genericValidation.GenericValidation.general, genericValidation.GenericValidation.NJobs, and helperFunctions.pythonboolstring().

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

Member Function Documentation

def offlineValidation.OfflineValidation.appendToMerge (   self)

Definition at line 109 of file offlineValidation.py.

References monteCarloValidation.MonteCarloValidation.getRepMap(), geometryComparison.GeometryComparison.getRepMap(), offlineValidation.OfflineValidation.getRepMap(), genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), genericValidation.GenericValidationData.getRepMap(), genericValidation.GenericValidationData_CTSR.getRepMap(), and join().

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

Definition at line 93 of file offlineValidation.py.

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

Definition at line 131 of file offlineValidation.py.

132  def comparealignmentsname(cls):
133  return "compareAlignments.cc"
def offlineValidation.OfflineValidation.createCrabCfg (   self,
  path 
)

Definition at line 79 of file offlineValidation.py.

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

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

Definition at line 76 of file offlineValidation.py.

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

Definition at line 73 of file offlineValidation.py.

73 
74  def FileOutputTemplate(self):
75  return configTemplates.offlineFileOutputTemplate
def offlineValidation.OfflineValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 82 of file offlineValidation.py.

References preexistingValidation.PreexistingValidation.general, plottingOptions.BasePlottingOptions.general, and genericValidation.GenericValidation.general.

Referenced by overlapValidation.OverlapValidation.appendToMerge(), trackSplittingValidation.TrackSplittingValidation.appendToMerge(), primaryVertexResolution.PrimaryVertexResolution.appendToMerge(), primaryVertexValidation.PrimaryVertexValidation.appendToMerge(), offlineValidation.OfflineValidation.appendToMerge(), overlapValidation.OverlapValidation.appendToPlots(), trackSplittingValidation.TrackSplittingValidation.appendToPlots(), primaryVertexResolution.PrimaryVertexResolution.appendToPlots(), primaryVertexValidation.PrimaryVertexValidation.appendToPlots(), zMuMuValidation.ZMuMuValidation.appendToPlots(), zMuMuValidation.ZMuMuValidation.filesToCompare(), and plottingOptions.PlottingOptionsTrackSplitting.validsubdets().

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

Definition at line 97 of file offlineValidation.py.

References plottingOptions.PlottingOptions(), print(), and helperFunctions.replaceByMap().

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

Definition at line 127 of file offlineValidation.py.

128  def plotsdirname(cls):
129  return "ExtendedOfflineValidation_Images"
def offlineValidation.OfflineValidation.plottingscriptname (   cls)

Definition at line 119 of file offlineValidation.py.

120  def plottingscriptname(cls):
121  return "TkAlExtendedOfflineValidation.C"
def offlineValidation.OfflineValidation.plottingscripttemplate (   cls)

Definition at line 123 of file offlineValidation.py.

124  def plottingscripttemplate(cls):
125  return configTemplates.extendedValidationTemplate
def offlineValidation.OfflineValidation.presentationsubsections (   cls)

Definition at line 135 of file offlineValidation.py.

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

Definition at line 61 of file offlineValidation.py.

61 
62  def ProcessName(self):
63  return "OfflineValidator"
def offlineValidation.OfflineValidation.ValidationSequence (   self)

Definition at line 69 of file offlineValidation.py.

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

Definition at line 65 of file offlineValidation.py.

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

Member Data Documentation

string offlineValidation.OfflineValidation.configBaseName = "TkAlOfflineValidation"
static

Definition at line 11 of file offlineValidation.py.

Referenced by genericValidation.GenericValidationData.cfgName().

string offlineValidation.OfflineValidation.crabCfgBaseName = "TkAlOfflineValidation"
static

Definition at line 13 of file offlineValidation.py.

Referenced by trackSplittingValidation.TrackSplittingValidation.createCrabCfg(), primaryVertexResolution.PrimaryVertexResolution.createCrabCfg(), primaryVertexValidation.PrimaryVertexValidation.createCrabCfg(), offlineValidation.OfflineValidation.createCrabCfg(), and zMuMuValidation.ZMuMuValidation.createCrabCfg().

dictionary offlineValidation.OfflineValidation.defaults
static
Initial value:
1 = {
2  "offlineModuleLevelHistsTransient": "False",
3  "offlineModuleLevelProfiles": "True",
4  "stripYResiduals": "False",
5  "maxtracks": "0",
6  "chargeCut": "0",
7  "multiIOV": "False",
8  }

Definition at line 16 of file offlineValidation.py.

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

dictionary offlineValidation.OfflineValidation.deprecateddefaults
static
Initial value:
1 = {
2  "DMRMethod":"",
3  "DMRMinimum":"",
4  "DMROptions":"",
5  "OfflineTreeBaseDir":"",
6  "SurfaceShapes":"",
7  }

Definition at line 24 of file offlineValidation.py.

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

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

Definition at line 32 of file offlineValidation.py.

offlineValidation.OfflineValidation.NTracks

Definition at line 52 of file offlineValidation.py.

string offlineValidation.OfflineValidation.outputBaseName = "AlignmentValidation"
static

Definition at line 15 of file offlineValidation.py.

Referenced by primaryVertexResolution.PrimaryVertexResolution.getRepMap(), primaryVertexValidation.PrimaryVertexValidation.getRepMap(), zMuMuValidation.ZMuMuValidation.getRepMap(), and genericValidation.GenericValidationData.getRepMap().

string offlineValidation.OfflineValidation.resultBaseName = "AlignmentValidation"
static

Definition at line 14 of file offlineValidation.py.

Referenced by genericValidation.GenericValidationData.getRepMap().

string offlineValidation.OfflineValidation.scriptBaseName = "TkAlOfflineValidation"
static

Definition at line 12 of file offlineValidation.py.

Referenced by genericValidation.GenericValidationData.createScript().

string offlineValidation.OfflineValidation.valType = "offline"
static

Definition at line 33 of file offlineValidation.py.

Referenced by preexistingValidation.PreexistingValidation.getRepMap(), genericValidation.GenericValidation.getRepMap(), validateAlignments.ValidationJob.runJob(), and zMuMuValidation.ZMuMuValidation.trackcollection().