CMS 3D CMS Logo

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

Public Member Functions

def __init__ (self, valName, alignment, config)
 
def appendToPlots (self)
 
def createCrabCfg (self, path)
 
def createScript (self, path)
 
def DefinePath (self)
 
def FileOutputTemplate (self)
 
def filesToCompare (self)
 
def getRepMap (self, alignment=None)
 
def LoadBasicModules (self)
 
def plotsdirname (cls)
 
def plottingscriptname (cls)
 
def plottingscripttemplate (cls)
 
def ProcessName (self)
 
def trackcollection (self)
 
def TrackSelectionRefitting (self)
 
def ValidationTemplate (self)
 
- Public Member Functions inherited from genericValidation.GenericValidationData
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)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def createConfiguration (self, fileContents, path, schedule=None, repMap=None, repMaps=None)
 
def createFiles (self, fileContents, path, repMap=None, repMaps=None)
 
def getCompareStrings (self, requestId=None, plain=False)
 
- Public Member Functions inherited from genericValidation.ValidationMetaClass
def __new__ (cls, clsname, bases, dct)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlots
def createPlottingScript (cls, validations)
 
def doRunPlots (cls, validations)
 
def runPlots (cls, validations)
 

Static Public Attributes

string configBaseName = "TkAlZMuMuValidation"
 
string crabCfgBaseName = "TkAlZMuMuValidation"
 
dictionary defaults
 
dictionary deprecateddefaults
 
dictionary needpackages = {'MuonAnalysis/MomentumScaleCalibration'}
 
string outputBaseName = "ZMuMuValidation"
 
string resultBaseName = "ZMuMuValidation"
 
string scriptBaseName = "TkAlZMuMuValidation"
 
string valType = "zmumu"
 
- 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"]
 

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 10 of file zMuMuValidation.py.

Constructor & Destructor Documentation

◆ __init__()

def zMuMuValidation.ZMuMuValidation.__init__ (   self,
  valName,
  alignment,
  config 
)
This method adds additional items to the `self.general` dictionary
which are only needed for validations using datasets.

Arguments:
- `valName`: String which identifies individual validation instances
- `alignment`: `Alignment` instance to validate
- `config`: `BetterConfigParser` instance which includes the
    configuration of the validations

Reimplemented from genericValidation.GenericValidationData.

Definition at line 39 of file zMuMuValidation.py.

39  def __init__(self, valName, alignment, config):
40  super(ZMuMuValidation, self).__init__(valName, alignment, config)
41  if self.general["zmumureference"].startswith("/store"):
42  self.general["zmumureference"] = "root://eoscms//eos/cms" + self.general["zmumureference"]
43  if self.NJobs > 1:
44  raise AllInOneError("Parallel jobs not implemented for the Z->mumu validation!\n"
45  "Please set parallelJobs = 1.")
46  for option in self.deprecateddefaults:
47  if self.general[option]:
48  raise AllInOneError("The '%s' option has been moved to the [plots:zmumu] section. Please specify it there."%option)
49  del self.general[option]
50 

References offlineValidation.OfflineValidation.deprecateddefaults, zMuMuValidation.ZMuMuValidation.deprecateddefaults, preexistingValidation.PreexistingOfflineValidation.deprecateddefaults, genericValidation.GenericValidation.general, and genericValidation.GenericValidation.NJobs.

Member Function Documentation

◆ appendToPlots()

def zMuMuValidation.ZMuMuValidation.appendToPlots (   self)
if no argument or "" is passed a string with an instantiation is
returned, else the validation is appended to the list

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 114 of file zMuMuValidation.py.

114  def appendToPlots(self):
115  """
116  if no argument or "" is passed a string with an instantiation is
117  returned, else the validation is appended to the list
118  """
119  repMap = self.getRepMap()
120  return replaceByMap(' filenames.push_back("root://eoscms//eos/cms/store/group/alca_trackeralign/AlignmentValidation/.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)
121 

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

◆ createCrabCfg()

def zMuMuValidation.ZMuMuValidation.createCrabCfg (   self,
  path 
)

◆ createScript()

def zMuMuValidation.ZMuMuValidation.createScript (   self,
  path 
)

Definition at line 79 of file zMuMuValidation.py.

79  def createScript(self, path):
80  return super(ZMuMuValidation, self).createScript(path, template = configTemplates.zMuMuScriptTemplate)
81 

◆ DefinePath()

def zMuMuValidation.ZMuMuValidation.DefinePath (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 76 of file zMuMuValidation.py.

76  def DefinePath(self):
77  return configTemplates.ZMuMuPath
78 

◆ FileOutputTemplate()

def zMuMuValidation.ZMuMuValidation.FileOutputTemplate (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 64 of file zMuMuValidation.py.

64  def FileOutputTemplate(self):
65  return ""
66 

◆ filesToCompare()

def zMuMuValidation.ZMuMuValidation.filesToCompare (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 52 of file zMuMuValidation.py.

52  def filesToCompare(self):
53  return {self.defaultReferenceName: replaceByMap(".oO[eosdir]Oo./0_zmumuHisto.root", self.getRepMap())}
54 

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

◆ getRepMap()

def zMuMuValidation.ZMuMuValidation.getRepMap (   self,
  alignment = None 
)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 85 of file zMuMuValidation.py.

85  def getRepMap(self, alignment = None):
86  if alignment == None:
87  alignment = self.alignmentToValidate
88  repMap = super(ZMuMuValidation, self).getRepMap(alignment)
89  repMap.update({
90  "nEvents": self.general["maxevents"],
91  "outputFile": ("0_zmumuHisto.root"
92  ",genSimRecoPlots.root"
93  ",FitParameters.txt"),
94  "eosdir": os.path.join(self.general["eosdir"], "%s/%s/%s" % (self.outputBaseName, self.name, alignment.name)),
95  "workingdir": ".oO[datadir]Oo./%s/%s/%s" % (self.outputBaseName, self.name, alignment.name),
96  "plotsdir": ".oO[datadir]Oo./%s/%s/%s/plots" % (self.outputBaseName, self.name, alignment.name),
97  "TrackCollection": self.trackcollection,
98  })
99  return repMap
100 

References genericValidation.GenericValidation.alignmentToValidate, genericValidation.GenericValidation.general, AlignableObjectId::entry.name, alignment.Alignment.name, genericValidation.GenericValidation.name, TrackerSectorStruct.name, MuonGeometrySanityCheckPoint.name, classes.MonitorData.name, classes.OutputData.name, geometry.Structure.name, plotscripts.SawTeethFunction.name, primaryVertexResolution.PrimaryVertexResolution.outputBaseName, primaryVertexValidation.PrimaryVertexValidation.outputBaseName, offlineValidation.OfflineValidation.outputBaseName, zMuMuValidation.ZMuMuValidation.outputBaseName, trackSplittingValidation.TrackSplittingValidation.outputBaseName, monteCarloValidation.MonteCarloValidation.outputBaseName, overlapValidation.OverlapValidation.outputBaseName, and zMuMuValidation.ZMuMuValidation.trackcollection().

◆ LoadBasicModules()

def zMuMuValidation.ZMuMuValidation.LoadBasicModules (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 68 of file zMuMuValidation.py.

68  def LoadBasicModules(self):
69  return super(ZMuMuValidation, self).LoadBasicModules + configTemplates.LoadMuonModules
70 

◆ plotsdirname()

def zMuMuValidation.ZMuMuValidation.plotsdirname (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 131 of file zMuMuValidation.py.

131  def plotsdirname(cls):
132  return ".oO[resonance]Oo.MuMuPlots"

Referenced by presentation.ValidationPlots.validationclass().

◆ plottingscriptname()

def zMuMuValidation.ZMuMuValidation.plottingscriptname (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 123 of file zMuMuValidation.py.

123  def plottingscriptname(cls):
124  return "TkAlMergeZmumuPlots.C"
125 

◆ plottingscripttemplate()

def zMuMuValidation.ZMuMuValidation.plottingscripttemplate (   cls)
override with a classmethod

Reimplemented from genericValidation.ValidationWithPlots.

Definition at line 127 of file zMuMuValidation.py.

127  def plottingscripttemplate(cls):
128  return configTemplates.mergeZmumuPlotsTemplate
129 

◆ ProcessName()

def zMuMuValidation.ZMuMuValidation.ProcessName (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 60 of file zMuMuValidation.py.

60  def ProcessName(self):
61  return "ONLYHISTOS"
62 

◆ trackcollection()

def zMuMuValidation.ZMuMuValidation.trackcollection (   self)

Definition at line 102 of file zMuMuValidation.py.

102  def trackcollection(self):
103  from .plottingOptions import PlottingOptions
104  resonance = PlottingOptions(self.config, self.valType)["resonance"]
105  if resonance == "Z":
106  return 'ALCARECOTkAlZMuMu'
107  elif resonance == "JPsi":
108  return 'ALCARECOTkAlJpsiMuMu'
109  elif resonance in ("Y1S", "Y2S", "Y3S"):
110  return 'ALCARECOTkAlUpsilonMuMu'
111  else:
112  raise AllInOneError("Unknown resonance {}!".format(resonance))
113 

References geometry.Alignables.config, genericValidation.GenericValidation.config, plottingOptions.PlottingOptions(), trackSplittingValidation.TrackSplittingValidation.valType, monteCarloValidation.MonteCarloValidation.valType, overlapValidation.OverlapValidation.valType, primaryVertexResolution.PrimaryVertexResolution.valType, primaryVertexValidation.PrimaryVertexValidation.valType, offlineValidation.OfflineValidation.valType, zMuMuValidation.ZMuMuValidation.valType, and geometryComparison.GeometryComparison.valType.

Referenced by zMuMuValidation.ZMuMuValidation.getRepMap().

◆ TrackSelectionRefitting()

def zMuMuValidation.ZMuMuValidation.TrackSelectionRefitting (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 72 of file zMuMuValidation.py.

72  def TrackSelectionRefitting(self):
73  return configTemplates.SingleTrackRefitter
74 

◆ ValidationTemplate()

def zMuMuValidation.ZMuMuValidation.ValidationTemplate (   self)

Reimplemented from genericValidation.GenericValidationData.

Definition at line 56 of file zMuMuValidation.py.

56  def ValidationTemplate(self):
57  return configTemplates.ZMuMuValidationTemplate
58 

Member Data Documentation

◆ configBaseName

string zMuMuValidation.ZMuMuValidation.configBaseName = "TkAlZMuMuValidation"
static

Definition at line 11 of file zMuMuValidation.py.

Referenced by genericValidation.GenericValidationData.cfgName().

◆ crabCfgBaseName

string zMuMuValidation.ZMuMuValidation.crabCfgBaseName = "TkAlZMuMuValidation"
static

Definition at line 13 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.createCrabCfg().

◆ defaults

dictionary zMuMuValidation.ZMuMuValidation.defaults
static
Initial value:
= {
"zmumureference": ("/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
"minpt" : "0.",
"maxpt" : "1000.",
"etamaxneg" : "2.4",
"etaminneg" : "-2.4",
"etamaxpos" : "2.4",
"etaminpos" : "-2.4",
"CustomMinY": "90.85",
"CustomMaxY": "91.4",
"multiIOV":"False",
}

Definition at line 16 of file zMuMuValidation.py.

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

◆ deprecateddefaults

dictionary zMuMuValidation.ZMuMuValidation.deprecateddefaults
static
Initial value:
= {
"resonance": "",
"switchONfit": "",
"rebinphi": "",
"rebinetadiff": "",
"rebineta": "",
"rebinpt": "",
}

Definition at line 28 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.__init__().

◆ needpackages

dictionary zMuMuValidation.ZMuMuValidation.needpackages = {'MuonAnalysis/MomentumScaleCalibration'}
static

Definition at line 37 of file zMuMuValidation.py.

◆ outputBaseName

string zMuMuValidation.ZMuMuValidation.outputBaseName = "ZMuMuValidation"
static

◆ resultBaseName

string zMuMuValidation.ZMuMuValidation.resultBaseName = "ZMuMuValidation"
static

◆ scriptBaseName

string zMuMuValidation.ZMuMuValidation.scriptBaseName = "TkAlZMuMuValidation"
static

◆ valType

string zMuMuValidation.ZMuMuValidation.valType = "zmumu"
static
helperFunctions.replaceByMap
def replaceByMap(target, the_map)
— Helpers —############################
Definition: helperFunctions.py:12
plottingOptions.PlottingOptions
def PlottingOptions(config, valType)
Definition: plottingOptions.py:239
configTemplates.LoadBasicModules
string LoadBasicModules
Definition: configTemplates.py:197
CustomConfigs.ProcessName
def ProcessName(process)
Definition: CustomConfigs.py:8
configTemplates.FileOutputTemplate
string FileOutputTemplate
Definition: configTemplates.py:207
format