CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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__
 
def appendToExtendedValidation
 
def createConfiguration
 
def createCrabCfg
 
def createScript
 
def getRepMap
 
- Public Member Functions inherited from genericValidation.GenericValidationData
def __init__
 
def createCrabCfg
 
def createScript
 
def getRepMap
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__
 
def createConfiguration
 
def createCrabCfg
 
def createFiles
 
def createScript
 
def getCompareStrings
 
def getRepMap
 

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

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 
77  def appendToExtendedValidation( self, validationsSoFar = "" ):
78  """
79  if no argument or "" is passed a string with an instantiation is
80  returned, else the validation is appended to the list
81  """
82  repMap = self.getRepMap()
83  if validationsSoFar != "":
84  validationsSoFar += ' '
85  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)
86  return validationsSoFar
def replaceByMap
— Helpers —############################
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(), 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, and helperFunctions.replaceByMap().

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

Definition at line 58 of file zMuMuValidation.py.

References monteCarloValidation.MonteCarloValidation.crabCfgBaseName, trackSplittingValidation.TrackSplittingValidation.crabCfgBaseName, primaryVertexValidation.PrimaryVertexValidation.crabCfgBaseName, zMuMuValidation.ZMuMuValidation.crabCfgBaseName, and offlineValidation.OfflineValidation.crabCfgBaseName.

58 
59  def createCrabCfg(self, path):
60  return GenericValidationData.createCrabCfg(self, path, self.crabCfgBaseName)
def zMuMuValidation.ZMuMuValidation.createScript (   self,
  path 
)

Definition at line 55 of file zMuMuValidation.py.

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

Definition at line 61 of file zMuMuValidation.py.

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

Member Data Documentation

zMuMuValidation.ZMuMuValidation.configBaseName

Definition at line 26 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.createConfiguration().

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

Definition at line 30 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.getRepMap(), and genericValidation.GenericValidationData.getRepMap().

zMuMuValidation.ZMuMuValidation.resultBaseName

Definition at line 29 of file zMuMuValidation.py.

Referenced by genericValidation.GenericValidationData.getRepMap().

zMuMuValidation.ZMuMuValidation.scriptBaseName

Definition at line 27 of file zMuMuValidation.py.

Referenced by genericValidation.GenericValidationData.createScript().