CMS 3D CMS Logo

Classes | Functions | Variables
makeTrackValidationPlots Namespace Reference

Classes

class  LimitTrackAlgo
 

Functions

def limitRelVal (algo, quality)
 
def main (opts)
 

Variables

 action
 
 default
 
 description
 
 group
 
 help
 
 limit_tracking_algo
 
 metavar
 
 nargs
 
 opts
 
 parser
 
 str
 
 type
 

Function Documentation

def makeTrackValidationPlots.limitRelVal (   algo,
  quality 
)

Definition at line 22 of file makeTrackValidationPlots.py.

22 def limitRelVal(algo, quality):
23  return quality in ["", "highPurity", "ByOriginalAlgo", "highPurityByOriginalAlgo"]
24 
def makeTrackValidationPlots.main (   opts)

Definition at line 25 of file makeTrackValidationPlots.py.

25 def main(opts):
26  sample = SimpleSample(opts.subdirprefix, opts.html_sample, [(f, f.replace(".root", "")) for f in opts.files])
27 
28  drawArgs={}
29  if opts.no_ratio:
30  drawArgs["ratio"] = False
31  if opts.separate:
32  drawArgs["separate"] = True
33  if opts.png:
34  drawArgs["saveFormat"] = ".png"
35  if opts.verbose:
36  plotting.verbose = True
37 
38  val = SimpleValidation([sample], opts.outputDir)
39  htmlReport = val.createHtmlReport(validationName=opts.html_validation_name)
40 
41  limitProcessing = LimitTrackAlgo(opts.limit_tracking_algo, includePtCut=opts.ptcut)
42  kwargs_tracking = {
43  "limitSubFoldersOnlyTo": {
44  "": limitProcessing,
45  "allTPEffic": limitProcessing,
46  "fromPV": limitProcessing,
47  "fromPVAllTP": limitProcessing,
48  "tpPtLess09": limitProcessing,
49  "seeding": limitProcessing,
50  "building": limitProcessing,
51  "bhadron": limitProcessing,
52  }
53  }
54  if opts.limit_relval:
55  ignore = lambda a,q: False
56  kwargs_tracking["limitSubFoldersOnlyTo"] = {
57  "": limitRelVal,
58  "allTPEffic": ignore,
59  "fromPV": ignore,
60  "fromPVAllTP": ignore,
61  "tpPtLess09": limitRelVal,
62  "seeding": ignore,
63  "bhadron": limitRelVal,
64  }
65 
66  trk = [trackingPlots.plotter]
67  other = [trackingPlots.timePlotter, vertexPlots.plotter, trackingPlots.plotterHLT]
68  if opts.extended:
69  trk.append(trackingPlots.plotterExt)
70  other.extend([vertexPlots.plotterExt, trackingPlots.plotterHLTExt])
71  val.doPlots(trk, plotterDrawArgs=drawArgs, **kwargs_tracking)
72  val.doPlots(other, plotterDrawArgs=drawArgs)
73  print
74  if opts.no_html:
75  print "Plots created into directory '%s'." % opts.outputDir
76  else:
77  htmlReport.write()
78  print "Plots and HTML report created into directory '%s'. You can just move it to some www area and access the pages via web browser" % opts.outputDir
79 

Variable Documentation

makeTrackValidationPlots.action

Definition at line 88 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.default

Definition at line 84 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.description

Definition at line 81 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.group

Definition at line 111 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.help

Definition at line 83 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.limit_tracking_algo

Definition at line 136 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.metavar

Definition at line 82 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.nargs

Definition at line 82 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.opts

Definition at line 119 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.parser

Definition at line 81 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.str

Definition at line 82 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.type

Definition at line 82 of file makeTrackValidationPlots.py.