CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
zMuMuValidation.ZMuMuValidation Class Reference
Inheritance diagram for zMuMuValidation.ZMuMuValidation:
genericValidation.GenericValidationData genericValidation.GenericValidation

Public Member Functions

def __init__ (self, valName, alignment, config, configBaseName="TkAlZMuMuValidation", scriptBaseName="TkAlZMuMuValidation", crabCfgBaseName="TkAlZMuMuValidation", resultBaseName="ZMuMuValidation", outputBaseName="ZMuMuValidation")
 
def appendToExtendedValidation (self, validationsSoFar="")
 
def createConfiguration (self, path)
 
def createCrabCfg (self, path)
 
def createScript (self, path)
 
def getRepMap (self, alignment=None)
 
- Public Member Functions inherited from genericValidation.GenericValidationData
def __init__ (self, valName, alignment, config, valType, addDefaults={}, addMandatories=[], addneedpackages=[])
 
def createCrabCfg (self, path, crabCfgBaseName)
 
def createScript (self, path, template=configTemplates.scriptTemplate, downloadFiles=[], repMap=None, repMaps=None)
 
def getRepMap (self, alignment=None)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__ (self, valName, alignment, config, valType, addDefaults={}, addMandatories=[], addneedpackages=[])
 
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 getCompareStrings (self, requestId=None, plain=False)
 
def getRepMap (self, alignment=None)
 

Public Attributes

 configBaseName
 
 crabCfgBaseName
 
 needParentFiles
 
 outputBaseName
 
 resultBaseName
 
 scriptBaseName
 
- Public Attributes inherited from genericValidation.GenericValidationData
 crabWorkingDir
 
 dataset
 
- Public Attributes inherited from genericValidation.GenericValidation
 alignmentToValidate
 
 AutoAlternates
 
 cmssw
 
 cmsswreleasebase
 
 config
 
 configFiles
 
 crabConfigFiles
 
 filesToCompare
 
 general
 
 jobid
 
 jobmode
 
 name
 
 NJobs
 
 packages
 
 randomWorkdirPart
 
 scramarch
 
 scriptFiles
 
 valType
 

Additional Inherited Members

- Static Public Attributes inherited from genericValidation.GenericValidation
string defaultReferenceName = "DEFAULT"
 

Detailed Description

Definition at line 9 of file zMuMuValidation.py.

Constructor & Destructor Documentation

def zMuMuValidation.ZMuMuValidation.__init__ (   self,
  valName,
  alignment,
  config,
  configBaseName = "TkAlZMuMuValidation",
  scriptBaseName = "TkAlZMuMuValidation",
  crabCfgBaseName = "TkAlZMuMuValidation",
  resultBaseName = "ZMuMuValidation",
  outputBaseName = "ZMuMuValidation" 
)

Definition at line 12 of file zMuMuValidation.py.

12  resultBaseName = "ZMuMuValidation", outputBaseName = "ZMuMuValidation"):
13  defaults = {
14  "zmumureference": ("/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
15  }
16  deprecateddefaults = {
17  "resonance": "",
18  "switchONfit": "",
19  "rebinphi": "",
20  "rebinetadiff": "",
21  "rebineta": "",
22  "rebinpt": "",
23  }
24  defaults.update(deprecateddefaults)
25  mandatories = ["etamaxneg", "etaminneg", "etamaxpos", "etaminpos"]
26  self.configBaseName = configBaseName
27  self.scriptBaseName = scriptBaseName
28  self.crabCfgBaseName = crabCfgBaseName
29  self.resultBaseName = resultBaseName
30  self.outputBaseName = outputBaseName
31  self.needParentFiles = False
32  GenericValidationData.__init__(self, valName, alignment, config,
33  "zmumu", addDefaults=defaults,
34  addMandatories=mandatories,
35  addneedpackages=['MuonAnalysis/MomentumScaleCalibration'])
36  if self.general["zmumureference"].startswith("/store"):
37  self.general["zmumureference"] = "root://eoscms//eos/cms" + self.general["zmumureference"]
38  if self.NJobs > 1:
39  raise AllInOneError("Parallel jobs not implemented for the Z->mumu validation!\n"
40  "Please set parallelJobs = 1.")
41  for option in deprecateddefaults:
42  if self.general[option]:
43  raise AllInOneError("The '%s' option has been moved to the [plots:zmumu] section. Please specify it there."%option)
44  del self.general[option]
45 

Member Function Documentation

def zMuMuValidation.ZMuMuValidation.appendToExtendedValidation (   self,
  validationsSoFar = "" 
)
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 zMuMuValidation.py.

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

76  def appendToExtendedValidation( self, validationsSoFar = "" ):
77  """
78  if no argument or "" is passed a string with an instantiation is
79  returned, else the validation is appended to the list
80  """
81  repMap = self.getRepMap()
82  if validationsSoFar != "":
83  validationsSoFar += ' '
84  validationsSoFar += replaceByMap('filenames.push_back("root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./BiasCheck.root"); titles.push_back(".oO[title]Oo."); colors.push_back(.oO[color]Oo.); linestyles.push_back(.oO[style]Oo.);\n', repMap)
85  return validationsSoFar
86 
def appendToExtendedValidation(self, validationsSoFar="")
def replaceByMap(target, the_map)
— Helpers —############################
def getRepMap(self, alignment=None)
def zMuMuValidation.ZMuMuValidation.createConfiguration (   self,
  path 
)

Definition at line 46 of file zMuMuValidation.py.

References monteCarloValidation.MonteCarloValidation.configBaseName, trackSplittingValidation.TrackSplittingValidation.configBaseName, primaryVertexValidation.PrimaryVertexValidation.configBaseName, zMuMuValidation.ZMuMuValidation.configBaseName, offlineValidation.OfflineValidation.configBaseName, genericValidation.GenericValidation.filesToCompare, genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), geometrydata.GeometryData.name, AlignableObjectId::entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, TrackerSectorStruct.name, classes.MonitorData.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, geometry.Structure.name, plotscripts.SawTeethFunction.name, and helperFunctions.replaceByMap().

46  def createConfiguration(self, path):
47  cfgName = "%s.%s.%s_cfg.py"%( self.configBaseName, self.name,
48  self.alignmentToValidate.name )
49  repMap = self.getRepMap()
50  self.filesToCompare[GenericValidationData.defaultReferenceName] = \
51  replaceByMap(".oO[eosdir]Oo./0_zmumuHisto.root", repMap)
52  cfgs = {cfgName: configTemplates.ZMuMuValidationTemplate}
53  GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
54 
def replaceByMap(target, the_map)
— Helpers —############################
def getRepMap(self, alignment=None)
def zMuMuValidation.ZMuMuValidation.createScript (   self,
  path 
)

Definition at line 55 of file zMuMuValidation.py.

55  def createScript(self, path):
56  return GenericValidationData.createScript(self, path, template = configTemplates.zMuMuScriptTemplate)
57 
def zMuMuValidation.ZMuMuValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 61 of file zMuMuValidation.py.

References genericValidation.GenericValidation.alignmentToValidate, genericValidation.GenericValidation.general, AlignableObjectId::entry.name, geometrydata.GeometryData.name, genericValidation.GenericValidation.name, alignment.Alignment.name, TrackerSectorStruct.name, classes.MonitorData.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, geometry.Structure.name, plotscripts.SawTeethFunction.name, monteCarloValidation.MonteCarloValidation.outputBaseName, trackSplittingValidation.TrackSplittingValidation.outputBaseName, primaryVertexValidation.PrimaryVertexValidation.outputBaseName, zMuMuValidation.ZMuMuValidation.outputBaseName, and offlineValidation.OfflineValidation.outputBaseName.

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

Member Data Documentation

zMuMuValidation.ZMuMuValidation.configBaseName
zMuMuValidation.ZMuMuValidation.crabCfgBaseName

Definition at line 28 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.createCrabCfg().

zMuMuValidation.ZMuMuValidation.needParentFiles

Definition at line 31 of file zMuMuValidation.py.

zMuMuValidation.ZMuMuValidation.outputBaseName
zMuMuValidation.ZMuMuValidation.resultBaseName
zMuMuValidation.ZMuMuValidation.scriptBaseName