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

◆ limitRelVal()

def makeTrackValidationPlots.limitRelVal (   algo,
  quality 
)

Definition at line 23 of file makeTrackValidationPlots.py.

23 def limitRelVal(algo, quality):
24  return quality in ["", "highPurity", "ByOriginalAlgo", "highPurityByOriginalAlgo"]
25 

◆ main()

def makeTrackValidationPlots.main (   opts)

Definition at line 26 of file makeTrackValidationPlots.py.

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

References print().

Variable Documentation

◆ action

makeTrackValidationPlots.action

Definition at line 91 of file makeTrackValidationPlots.py.

◆ default

makeTrackValidationPlots.default

Definition at line 87 of file makeTrackValidationPlots.py.

◆ description

makeTrackValidationPlots.description

Definition at line 84 of file makeTrackValidationPlots.py.

◆ group

makeTrackValidationPlots.group

Definition at line 114 of file makeTrackValidationPlots.py.

◆ help

makeTrackValidationPlots.help

Definition at line 86 of file makeTrackValidationPlots.py.

◆ limit_tracking_algo

makeTrackValidationPlots.limit_tracking_algo

Definition at line 139 of file makeTrackValidationPlots.py.

◆ metavar

makeTrackValidationPlots.metavar

Definition at line 85 of file makeTrackValidationPlots.py.

◆ nargs

makeTrackValidationPlots.nargs

Definition at line 85 of file makeTrackValidationPlots.py.

◆ opts

makeTrackValidationPlots.opts

Definition at line 122 of file makeTrackValidationPlots.py.

◆ parser

makeTrackValidationPlots.parser

Definition at line 84 of file makeTrackValidationPlots.py.

◆ str

makeTrackValidationPlots.str

Definition at line 85 of file makeTrackValidationPlots.py.

◆ type

makeTrackValidationPlots.type

Definition at line 85 of file makeTrackValidationPlots.py.

makeTrackValidationPlots.limitRelVal
def limitRelVal(algo, quality)
Definition: makeTrackValidationPlots.py:23
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
makeTrackValidationPlots.main
def main(opts)
Definition: makeTrackValidationPlots.py:26