CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes
plottingOptions.PlottingOptionsTrackSplitting Class Reference
Inheritance diagram for plottingOptions.PlottingOptionsTrackSplitting:
plottingOptions.BasePlottingOptions

Public Member Functions

def __init__ (self, config)
 
def validsubdets (self)
 
- Public Member Functions inherited from plottingOptions.BasePlottingOptions
def __init__ (self, config, valType)
 
def getRepMap (self)
 

Static Public Attributes

dictionary defaults
 
dictionary needpackages = {"Alignment/CommonAlignmentProducer"}
 
 validationclass = TrackSplittingValidation
 
- Static Public Attributes inherited from plottingOptions.BasePlottingOptions
dictionary defaults
 
 mandatories = set()
 
dictionary needpackages = {"Alignment/OfflineValidation"}
 

Additional Inherited Members

- Public Attributes inherited from plottingOptions.BasePlottingOptions
 cmssw
 
 cmsswreleasebase
 
 config
 
 general
 
 randomWorkdirPart
 
 scramarch
 
 type
 

Detailed Description

Definition at line 122 of file plottingOptions.py.

Constructor & Destructor Documentation

def plottingOptions.PlottingOptionsTrackSplitting.__init__ (   self,
  config 
)

Definition at line 129 of file plottingOptions.py.

References plottingOptions.BasePlottingOptions.general, genericValidation.GenericValidation.general, betterConfigParser.BetterConfigParser.general, join(), and plottingOptions.PlottingOptionsTrackSplitting.validsubdets().

129  def __init__(self, config):
130  super(PlottingOptionsTrackSplitting, self).__init__(config, "split")
131  validsubdets = self.validsubdets()
132  if self.general["subdetector"] not in validsubdets:
133  raise AllInOneError("'%s' is not a valid subdetector!\n" % self.general["subdetector"] + "The options are: " + ", ".join(validsubdets))
134 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18

Member Function Documentation

def plottingOptions.PlottingOptionsTrackSplitting.validsubdets (   self)

Definition at line 135 of file plottingOptions.py.

References monteCarloValidation.MonteCarloValidation.getRepMap(), geometryComparison.GeometryComparison.getRepMap(), offlineValidation.OfflineValidation.getRepMap(), plottingOptions.BasePlottingOptions.getRepMap(), genericValidation.GenericValidation.getRepMap(), offlineValidation.OfflineValidationDQM.getRepMap(), alignment.Alignment.getRepMap(), genericValidation.GenericValidationData.getRepMap(), genericValidation.GenericValidationData_CTSR.getRepMap(), python.rootplot.root2matplotlib.replace(), helperFunctions.replaceByMap(), split, and digitizers_cfi.strip.

Referenced by plottingOptions.PlottingOptionsTrackSplitting.__init__().

135  def validsubdets(self):
136  filename = replaceByMap(".oO[Alignment/CommonAlignmentProducer]Oo./python/AlignmentTrackSelector_cfi.py", self.getRepMap())
137  with open(filename) as f:
138  trackselector = f.read()
139 
140  minhitspersubdet = trackselector.split("minHitsPerSubDet")[1].split("(",1)[1]
141 
142  parenthesesdepth = 0
143  i = 0
144  for character in minhitspersubdet:
145  if character == "(":
146  parenthesesdepth += 1
147  if character == ")":
148  parenthesesdepth -= 1
149  if parenthesesdepth < 0:
150  break
151  i += 1
152  minhitspersubdet = minhitspersubdet[0:i]
153 
154  results = minhitspersubdet.split(",")
155  empty = []
156  for i in range(len(results)):
157  results[i] = results[i].split("=")[0].strip().replace("in", "", 1)
158 
159  results.append("none")
160 
161  return [a for a in results if a]
162 
def replace(string, replacements)
def replaceByMap(target, the_map)
— Helpers —############################
double split
Definition: MVATrainer.cc:139

Member Data Documentation

dictionary plottingOptions.PlottingOptionsTrackSplitting.defaults
static
Initial value:
1 = {
2  "outliercut": "-1.0",
3  "subdetector": "none",
4  }

Definition at line 123 of file plottingOptions.py.

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

dictionary plottingOptions.PlottingOptionsTrackSplitting.needpackages = {"Alignment/CommonAlignmentProducer"}
static

Definition at line 127 of file plottingOptions.py.

plottingOptions.PlottingOptionsTrackSplitting.validationclass = TrackSplittingValidation
static

Definition at line 128 of file plottingOptions.py.

Referenced by plottingOptions.BasePlottingOptions.getRepMap().