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
 
 jobmode
 
 name
 
 NJobs
 
 randomWorkdirPart
 
 scramarch
 
 scriptFiles
 

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  "resonance": "Z",
17  "switchONfit": "false",
18  "rebinphi": "4",
19  "rebinetadiff": "2",
20  "rebineta": "2",
21  "rebinpt": "8",
22  }
23  mandatories = ["etamaxneg", "etaminneg", "etamaxpos", "etaminpos"]
24  self.configBaseName = configBaseName
25  self.scriptBaseName = scriptBaseName
26  self.crabCfgBaseName = crabCfgBaseName
27  self.resultBaseName = resultBaseName
28  self.outputBaseName = outputBaseName
29  self.needParentFiles = False
30  GenericValidationData.__init__(self, valName, alignment, config,
31  "zmumu", addDefaults=defaults,
32  addMandatories=mandatories)
33  if self.general["zmumureference"].startswith("/store"):
34  self.general["zmumureference"] = "root://eoscms//eos/cms" + self.general["zmumureference"]
35  if self.NJobs > 1:
36  raise AllInOneError("Parallel jobs not implemented for the Z->mumu validation!\n"
37  "Please set parallelJobs = 1.")

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 68 of file zMuMuValidation.py.

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

68 
69  def appendToExtendedValidation( self, validationsSoFar = "" ):
70  """
71  if no argument or "" is passed a string with an instantiation is
72  returned, else the validation is appended to the list
73  """
74  repMap = self.getRepMap()
75  if validationsSoFar != "":
76  validationsSoFar += ' '
77  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)
78  return validationsSoFar
def replaceByMap
— Helpers —############################
def zMuMuValidation.ZMuMuValidation.createConfiguration (   self,
  path 
)

Definition at line 38 of file zMuMuValidation.py.

References monteCarloValidation.MonteCarloValidation.configBaseName, trackSplittingValidation.TrackSplittingValidation.configBaseName, zMuMuValidation.ZMuMuValidation.configBaseName, offlineValidation.OfflineValidation.configBaseName, genericValidation.GenericValidation.filesToCompare, genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, TrackerSectorStruct.name, MuonGeometrySanityCheckPoint.name, plotscripts.SawTeethFunction.name, and helperFunctions.replaceByMap().

38 
39  def createConfiguration(self, path):
40  cfgName = "%s.%s.%s_cfg.py"%( self.configBaseName, self.name,
41  self.alignmentToValidate.name )
42  repMap = self.getRepMap()
43  self.filesToCompare[GenericValidationData.defaultReferenceName] = \
44  replaceByMap(".oO[eosdir]Oo./0_zmumuHisto.root", repMap)
45  cfgs = {cfgName: configTemplates.ZMuMuValidationTemplate}
46  GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
def replaceByMap
— Helpers —############################
def zMuMuValidation.ZMuMuValidation.createCrabCfg (   self,
  path 
)

Definition at line 50 of file zMuMuValidation.py.

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

50 
51  def createCrabCfg(self, path):
52  return GenericValidationData.createCrabCfg(self, path, self.crabCfgBaseName)
def zMuMuValidation.ZMuMuValidation.createScript (   self,
  path 
)

Definition at line 47 of file zMuMuValidation.py.

47 
48  def createScript(self, path):
49  return GenericValidationData.createScript(self, path, template = configTemplates.zMuMuScriptTemplate)
def zMuMuValidation.ZMuMuValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 53 of file zMuMuValidation.py.

References genericValidation.GenericValidation.alignmentToValidate, genericValidation.GenericValidation.general, entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, TrackerSectorStruct.name, MuonGeometrySanityCheckPoint.name, plotscripts.SawTeethFunction.name, monteCarloValidation.MonteCarloValidation.outputBaseName, trackSplittingValidation.TrackSplittingValidation.outputBaseName, zMuMuValidation.ZMuMuValidation.outputBaseName, and offlineValidation.OfflineValidation.outputBaseName.

53 
54  def getRepMap(self, alignment = None):
55  if alignment == None:
56  alignment = self.alignmentToValidate
57  repMap = GenericValidationData.getRepMap(self, alignment)
58  repMap.update({
59  "nEvents": self.general["maxevents"],
60  "outputFile": ("0_zmumuHisto.root"
61  ",genSimRecoPlots.root"
62  ",FitParameters.txt"),
63  "eosdir": os.path.join(self.general["eosdir"], "%s/%s/%s" % (self.outputBaseName, self.name, alignment.name)),
64  "workingdir": ".oO[datadir]Oo./%s/%s/%s" % (self.outputBaseName, self.name, alignment.name),
65  "plotsdir": ".oO[datadir]Oo./%s/%s/%s/plots" % (self.outputBaseName, self.name, alignment.name),
66  })
67  return repMap

Member Data Documentation

zMuMuValidation.ZMuMuValidation.configBaseName

Definition at line 23 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.createConfiguration().

zMuMuValidation.ZMuMuValidation.crabCfgBaseName

Definition at line 25 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.createCrabCfg().

zMuMuValidation.ZMuMuValidation.needParentFiles

Definition at line 28 of file zMuMuValidation.py.

zMuMuValidation.ZMuMuValidation.outputBaseName

Definition at line 27 of file zMuMuValidation.py.

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

zMuMuValidation.ZMuMuValidation.resultBaseName

Definition at line 26 of file zMuMuValidation.py.

Referenced by genericValidation.GenericValidationData.getRepMap().

zMuMuValidation.ZMuMuValidation.scriptBaseName

Definition at line 24 of file zMuMuValidation.py.

Referenced by genericValidation.GenericValidationData.createScript().