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.

References print().

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, nProc=opts.jobs)
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  "displaced": limitProcessing,
55  }
56  }
57  if opts.limit_relval:
58  ignore = lambda a,q: False
59  kwargs_tracking["limitSubFoldersOnlyTo"] = {
60  "": limitRelVal,
61  "allTPEffic": ignore,
62  "fromPV": ignore,
63  "fromPVAllTP": ignore,
64  "tpPtLess09": limitRelVal,
65  "tpEtaGreater2p7": limitRelVal,
66  "seeding": ignore,
67  "bhadron": limitRelVal,
68  "displaced": limitRelVal,
69  }
70 
71  trk = [trackingPlots.plotter]
72  other = [trackingPlots.timePlotter, vertexPlots.plotter, trackingPlots.plotterHLT]
73  if opts.extended:
74  trk.append(trackingPlots.plotterExt)
75  other.extend([vertexPlots.plotterExt, trackingPlots.plotterHLTExt])
76  val.doPlots(trk, plotterDrawArgs=drawArgs, **kwargs_tracking)
77  val.doPlots(other, plotterDrawArgs=drawArgs)
78  print()
79  if opts.no_html:
80  print("Plots created into directory '%s'." % opts.outputDir)
81  else:
82  htmlReport.write()
83  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)
84 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Variable Documentation

◆ action

makeTrackValidationPlots.action

Definition at line 93 of file makeTrackValidationPlots.py.

◆ default

makeTrackValidationPlots.default

Definition at line 89 of file makeTrackValidationPlots.py.

◆ description

makeTrackValidationPlots.description

Definition at line 86 of file makeTrackValidationPlots.py.

◆ group

makeTrackValidationPlots.group

Definition at line 118 of file makeTrackValidationPlots.py.

◆ help

makeTrackValidationPlots.help

Definition at line 88 of file makeTrackValidationPlots.py.

◆ limit_tracking_algo

makeTrackValidationPlots.limit_tracking_algo

Definition at line 143 of file makeTrackValidationPlots.py.

◆ metavar

makeTrackValidationPlots.metavar

Definition at line 87 of file makeTrackValidationPlots.py.

◆ nargs

makeTrackValidationPlots.nargs

Definition at line 87 of file makeTrackValidationPlots.py.

◆ opts

makeTrackValidationPlots.opts

Definition at line 126 of file makeTrackValidationPlots.py.

◆ parser

makeTrackValidationPlots.parser

Definition at line 86 of file makeTrackValidationPlots.py.

◆ str

makeTrackValidationPlots.str

Definition at line 87 of file makeTrackValidationPlots.py.

◆ type

makeTrackValidationPlots.type

Definition at line 87 of file makeTrackValidationPlots.py.