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 125 of file plottingOptions.py.

Constructor & Destructor Documentation

def plottingOptions.PlottingOptionsTrackSplitting.__init__ (   self,
  config 
)

Definition at line 132 of file plottingOptions.py.

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

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

Member Function Documentation

def plottingOptions.PlottingOptionsTrackSplitting.validsubdets (   self)

Definition at line 138 of file plottingOptions.py.

References overlapValidation.OverlapValidation.getRepMap(), 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__().

138  def validsubdets(self):
139  filename = replaceByMap(".oO[Alignment/CommonAlignmentProducer]Oo./python/AlignmentTrackSelector_cfi.py", self.getRepMap())
140  with open(filename) as f:
141  trackselector = f.read()
142 
143  minhitspersubdet = trackselector.split("minHitsPerSubDet")[1].split("(",1)[1]
144 
145  parenthesesdepth = 0
146  i = 0
147  for character in minhitspersubdet:
148  if character == "(":
149  parenthesesdepth += 1
150  if character == ")":
151  parenthesesdepth -= 1
152  if parenthesesdepth < 0:
153  break
154  i += 1
155  minhitspersubdet = minhitspersubdet[0:i]
156 
157  results = minhitspersubdet.split(",")
158  empty = []
159  for i in range(len(results)):
160  results[i] = results[i].split("=")[0].strip().replace("in", "", 1)
161 
162  results.append("none")
163 
164  return [a for a in results if a]
165 
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 126 of file plottingOptions.py.

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

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

Definition at line 130 of file plottingOptions.py.

plottingOptions.PlottingOptionsTrackSplitting.validationclass = TrackSplittingValidation
static

Definition at line 131 of file plottingOptions.py.

Referenced by plottingOptions.BasePlottingOptions.getRepMap().