CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions | Variables
makeTrackValidationPlots Namespace Reference

Classes

class  LimitTrackAlgo
 

Functions

def limitRelVal
 
def main
 

Variables

tuple group = parser.add_argument_group("deprecated arguments (they have no effect and will be removed in the future):")
 
string help = "DQM file to plot the validation plots from"
 
tuple opts = parser.parse_args()
 
tuple parser = argparse.ArgumentParser(description="Create standard set of tracking validation plots from one or more DQM files.\nNote that for timing plots you have to include FastTimerService (typically it gets included via DQM/VALIDATION), and set\nprocess.FastTimerService.enableDQMbyPath = True")
 

Function Documentation

def makeTrackValidationPlots.limitRelVal (   algo,
  quality 
)

Definition at line 23 of file makeTrackValidationPlots.py.

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

Definition at line 26 of file makeTrackValidationPlots.py.

References print().

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

Variable Documentation

tuple makeTrackValidationPlots.group = parser.add_argument_group("deprecated arguments (they have no effect and will be removed in the future):")

Definition at line 116 of file makeTrackValidationPlots.py.

string makeTrackValidationPlots.help = "DQM file to plot the validation plots from"

Definition at line 88 of file makeTrackValidationPlots.py.

tuple makeTrackValidationPlots.opts = parser.parse_args()

Definition at line 124 of file makeTrackValidationPlots.py.

tuple makeTrackValidationPlots.parser = argparse.ArgumentParser(description="Create standard set of tracking validation plots from one or more DQM files.\nNote that for timing plots you have to include FastTimerService (typically it gets included via DQM/VALIDATION), and set\nprocess.FastTimerService.enableDQMbyPath = True")

Definition at line 86 of file makeTrackValidationPlots.py.