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

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 __init__ (self, valName, alignment, config)
 
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)
 
def DefinePath (self)
 
def FileOutputTemplate (self)
 
def filesToCompare (self)
 
def getRepMap (self, alignment=None)
 
def LoadBasicModules (self)
 
def ProcessName (self)
 
def TrackSelectionRefitting (self)
 
def ValidationTemplate (self)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__ (self, valName, alignment, config)
 
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 filesToCompare (self)
 
def getCompareStrings (self, requestId=None, plain=False)
 
def getRepMap (self, alignment=None)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlots
def appendToPlots (self)
 
def createPlottingScript (cls, validations)
 
def doRunPlots (cls, validations)
 
def plotsdirname (cls)
 
def plottingscriptname (cls)
 
def plottingscripttemplate (cls)
 
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"}
 

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

def zMuMuValidation.ZMuMuValidation.__init__ (   self,
  valName,
  alignment,
  config 
)

Definition at line 36 of file zMuMuValidation.py.

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

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

Member Function Documentation

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

Definition at line 111 of file zMuMuValidation.py.

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

111  def appendToPlots(self):
112  """
113  if no argument or "" is passed a string with an instantiation is
114  returned, else the validation is appended to the list
115  """
116  repMap = self.getRepMap()
117  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)
118 
def replaceByMap(target, the_map)
— Helpers —############################
def getRepMap(self, alignment=None)
def zMuMuValidation.ZMuMuValidation.createCrabCfg (   self,
  path 
)
def zMuMuValidation.ZMuMuValidation.createScript (   self,
  path 
)

Definition at line 76 of file zMuMuValidation.py.

76  def createScript(self, path):
77  return super(ZMuMuValidation, self).createScript(path, template = configTemplates.zMuMuScriptTemplate)
78 
def zMuMuValidation.ZMuMuValidation.DefinePath (   self)

Definition at line 73 of file zMuMuValidation.py.

73  def DefinePath(self):
74  return configTemplates.ZMuMuPath
75 
def zMuMuValidation.ZMuMuValidation.FileOutputTemplate (   self)

Definition at line 61 of file zMuMuValidation.py.

61  def FileOutputTemplate(self):
62  return ""
63 
def zMuMuValidation.ZMuMuValidation.filesToCompare (   self)

Definition at line 49 of file zMuMuValidation.py.

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

49  def filesToCompare(self):
50  return {self.defaultReferenceName: replaceByMap(".oO[eosdir]Oo./0_zmumuHisto.root", self.getRepMap())}
51 
def replaceByMap(target, the_map)
— Helpers —############################
def getRepMap(self, alignment=None)
def zMuMuValidation.ZMuMuValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 82 of file zMuMuValidation.py.

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

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

Definition at line 65 of file zMuMuValidation.py.

65  def LoadBasicModules(self):
66  return super(ZMuMuValidation, self).LoadBasicModules + configTemplates.LoadMuonModules
67 
def zMuMuValidation.ZMuMuValidation.plotsdirname (   cls)

Definition at line 128 of file zMuMuValidation.py.

Referenced by presentation.ValidationPlots.validationclass().

128  def plotsdirname(cls):
129  return ".oO[resonance]Oo.MuMuPlots"
def zMuMuValidation.ZMuMuValidation.plottingscriptname (   cls)

Definition at line 120 of file zMuMuValidation.py.

121  return "TkAlMergeZmumuPlots.C"
122 
def zMuMuValidation.ZMuMuValidation.plottingscripttemplate (   cls)

Definition at line 124 of file zMuMuValidation.py.

125  return configTemplates.mergeZmumuPlotsTemplate
126 
def zMuMuValidation.ZMuMuValidation.ProcessName (   self)

Definition at line 57 of file zMuMuValidation.py.

57  def ProcessName(self):
58  return "ONLYHISTOS"
59 
def zMuMuValidation.ZMuMuValidation.trackcollection (   self)

Definition at line 99 of file zMuMuValidation.py.

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

Referenced by zMuMuValidation.ZMuMuValidation.getRepMap().

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

Definition at line 69 of file zMuMuValidation.py.

70  return configTemplates.SingleTrackRefitter
71 
def zMuMuValidation.ZMuMuValidation.ValidationTemplate (   self)

Definition at line 53 of file zMuMuValidation.py.

53  def ValidationTemplate(self):
54  return configTemplates.ZMuMuValidationTemplate
55 

Member Data Documentation

string zMuMuValidation.ZMuMuValidation.configBaseName = "TkAlZMuMuValidation"
static

Definition at line 11 of file zMuMuValidation.py.

Referenced by genericValidation.GenericValidationData.cfgName().

string zMuMuValidation.ZMuMuValidation.crabCfgBaseName = "TkAlZMuMuValidation"
static

Definition at line 13 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.createCrabCfg().

dictionary zMuMuValidation.ZMuMuValidation.defaults
static
Initial value:
1 = {
2  "zmumureference": ("/store/caf/user/emiglior/Alignment/TkAlDiMuonValidation/Reference/BiasCheck_DYToMuMu_Summer12_TkAlZMuMu_IDEAL.root"),
3  "minpt" : "0.",
4  "maxpt" : "1000.",
5  "etamaxneg" : "2.4",
6  "etaminneg" : "-2.4",
7  "etamaxpos" : "2.4",
8  "etaminpos" : "-2.4",
9  }

Definition at line 16 of file zMuMuValidation.py.

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

dictionary zMuMuValidation.ZMuMuValidation.deprecateddefaults
static
Initial value:
1 = {
2  "resonance": "",
3  "switchONfit": "",
4  "rebinphi": "",
5  "rebinetadiff": "",
6  "rebineta": "",
7  "rebinpt": "",
8  }

Definition at line 25 of file zMuMuValidation.py.

Referenced by zMuMuValidation.ZMuMuValidation.__init__().

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

Definition at line 34 of file zMuMuValidation.py.

string zMuMuValidation.ZMuMuValidation.outputBaseName = "ZMuMuValidation"
static
string zMuMuValidation.ZMuMuValidation.resultBaseName = "ZMuMuValidation"
static
string zMuMuValidation.ZMuMuValidation.scriptBaseName = "TkAlZMuMuValidation"
static
string zMuMuValidation.ZMuMuValidation.valType = "zmumu"
static