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"]
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  "seeding": limitProcessing,
49  "building": limitProcessing,
50  }
51  }
52  if opts.limit_relval:
53  ignore = lambda a,q: False
54  kwargs_tracking["limitSubFoldersOnlyTo"] = {
55  "": limitRelVal,
56  "allTPEffic": ignore,
57  "fromPV": ignore,
58  "fromPVAllTP": ignore,
59  "seeding": ignore,
60  "building": ignore,
61  }
62 
63  trk = [trackingPlots.plotter]
64  other = [trackingPlots.timePlotter, vertexPlots.plotter, trackingPlots.plotterHLT]
65  if opts.extended:
66  trk.append(trackingPlots.plotterExt)
67  other.extend([vertexPlots.plotterExt, trackingPlots.plotterHLTExt])
68  val.doPlots(trk, plotterDrawArgs=drawArgs, **kwargs_tracking)
69  val.doPlots(other, plotterDrawArgs=drawArgs)
70  print
71  if opts.no_html:
72  print "Plots created into directory '%s'." % opts.outputDir
73  else:
74  htmlReport.write()
75  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
76 

Variable Documentation

makeTrackValidationPlots.action

Definition at line 85 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.default

Definition at line 81 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.description

Definition at line 78 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.group

Definition at line 108 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.help

Definition at line 80 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.limit_tracking_algo

Definition at line 133 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.metavar

Definition at line 79 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.nargs

Definition at line 79 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.opts

Definition at line 116 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.parser

Definition at line 78 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.str

Definition at line 79 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.type

Definition at line 79 of file makeTrackValidationPlots.py.