CMS 3D CMS Logo

Functions | Variables
makeHGCalValidationPlots Namespace Reference

Functions

def main (opts)
 

Variables

 action
 
 allLabel
 
 choices
 
 collection_choices
 
 default
 
 description
 
 help
 
 hitCalibrationLabel
 
 hitValidationLabel
 
 layerClustersGeneralLabel
 
 metavar
 
 multiclustersGeneralLabel
 
 nargs
 
 opts
 
 parser
 
 str
 
 trackstersGeneralLabel
 
 trackstersIters
 
 type
 

Function Documentation

◆ main()

def makeHGCalValidationPlots.main (   opts)

Definition at line 27 of file makeHGCalValidationPlots.py.

27 def main(opts):
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  filenames = [(f, f.replace(".root", "")) for f in opts.files]
40  sample = SimpleSample(opts.subdirprefix[0], opts.html_sample, filenames)
41 
42  val = SimpleValidation([sample], opts.outputDir[0])
43  if opts.separate:
44  val = SeparateValidation([sample], opts.outputDir[0])
45  htmlReport = val.createHtmlReport(validationName=opts.html_validation_name[0])
46 
47  if opts.collection==layerClustersGeneralLabel:
48  hgclayclus = [hgcalPlots.hgcalLayerClustersPlotter]
49  hgcalPlots.append_hgcalLayerClustersPlots("hgcalLayerClusters", "Layer Clusters")
50  val.doPlots(hgclayclus, plotterDrawArgs=drawArgs)
51  elif opts.collection == multiclustersGeneralLabel:
52  hgcmulticlus = [hgcalPlots.hgcalMultiClustersPlotter]
53  hgcalPlots.append_hgcalMultiClustersPlots(multiclustersGeneralLabel, "MultiClusters")
54  val.doPlots(hgcmulticlus, plotterDrawArgs=drawArgs)
55  elif (opts.collection == trackstersGeneralLabel) :
56  hgcmulticlus = [hgcalPlots.hgcalMultiClustersPlotter]
57  for i_iter in trackstersIters :
58  tracksterCollection = i_iter.replace("ticlMultiClustersFromTracksters","ticlTracksters")
59  hgcalPlots.append_hgcalMultiClustersPlots(i_iter, tracksterCollection)
60  val.doPlots(hgcmulticlus, plotterDrawArgs=drawArgs)
61  elif opts.collection==hitValidationLabel:
62  hgchit = [hgcalPlots.hgcalHitPlotter]
63  hgcalPlots.append_hgcalHitsPlots('HGCalSimHitsV', "Simulated Hits")
64  hgcalPlots.append_hgcalHitsPlots('HGCalRecHitsV', "Reconstruced Hits")
65  hgcalPlots.append_hgcalDigisPlots('HGCalDigisV', "Digis")
66  val.doPlots(hgchit, plotterDrawArgs=drawArgs)
67  elif opts.collection==hitCalibrationLabel:
68  hgchitcalib = [hgcalPlots.hgcalHitCalibPlotter]
69  val.doPlots(hgchitcalib, plotterDrawArgs=drawArgs)
70  else :
71 
72  #hits
73  hgchit = [hgcalPlots.hgcalHitPlotter]
74  hgcalPlots.append_hgcalHitsPlots('HGCalSimHitsV', "Simulated Hits")
75  hgcalPlots.append_hgcalHitsPlots('HGCalRecHitsV', "Reconstruced Hits")
76  hgcalPlots.append_hgcalDigisPlots('HGCalDigisV', "Digis")
77  val.doPlots(hgchit, plotterDrawArgs=drawArgs)
78 
79  #calib
80  hgchitcalib = [hgcalPlots.hgcalHitCalibPlotter]
81  val.doPlots(hgchitcalib, plotterDrawArgs=drawArgs)
82 
83  #layer clusters
84  hgclayclus = [hgcalPlots.hgcalLayerClustersPlotter]
85  hgcalPlots.append_hgcalLayerClustersPlots("hgcalLayerClusters", "Layer Clusters")
86  val.doPlots(hgclayclus, plotterDrawArgs=drawArgs)
87 
88  #multiclusters
89  hgcmulticlus = [hgcalPlots.hgcalMultiClustersPlotter]
90  for i_iter in trackstersIters :
91  tracksterCollection = i_iter.replace("ticlMultiClustersFromTracksters","ticlTracksters")
92  hgcalPlots.append_hgcalMultiClustersPlots(i_iter, tracksterCollection)
93  val.doPlots(hgcmulticlus, plotterDrawArgs=drawArgs)
94 
95  if opts.no_html:
96  print("Plots created into directory '%s'." % opts.outputDir)
97  else:
98  htmlReport.write()
99 
100  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" % (','.join(opts.outputDir)))
101 

References hgcalPlots.append_hgcalDigisPlots(), hgcalPlots.append_hgcalHitsPlots(), hgcalPlots.append_hgcalLayerClustersPlots(), hgcalPlots.append_hgcalMultiClustersPlots(), join(), and print().

Variable Documentation

◆ action

makeHGCalValidationPlots.action

Definition at line 111 of file makeHGCalValidationPlots.py.

◆ allLabel

makeHGCalValidationPlots.allLabel

Definition at line 22 of file makeHGCalValidationPlots.py.

◆ choices

makeHGCalValidationPlots.choices

Definition at line 125 of file makeHGCalValidationPlots.py.

◆ collection_choices

makeHGCalValidationPlots.collection_choices

Definition at line 24 of file makeHGCalValidationPlots.py.

◆ default

makeHGCalValidationPlots.default

Definition at line 105 of file makeHGCalValidationPlots.py.

◆ description

makeHGCalValidationPlots.description

Definition at line 103 of file makeHGCalValidationPlots.py.

◆ help

makeHGCalValidationPlots.help

Definition at line 106 of file makeHGCalValidationPlots.py.

◆ hitCalibrationLabel

makeHGCalValidationPlots.hitCalibrationLabel

Definition at line 21 of file makeHGCalValidationPlots.py.

◆ hitValidationLabel

makeHGCalValidationPlots.hitValidationLabel

Definition at line 20 of file makeHGCalValidationPlots.py.

◆ layerClustersGeneralLabel

makeHGCalValidationPlots.layerClustersGeneralLabel

Definition at line 17 of file makeHGCalValidationPlots.py.

◆ metavar

makeHGCalValidationPlots.metavar

Definition at line 104 of file makeHGCalValidationPlots.py.

◆ multiclustersGeneralLabel

makeHGCalValidationPlots.multiclustersGeneralLabel

Definition at line 18 of file makeHGCalValidationPlots.py.

◆ nargs

makeHGCalValidationPlots.nargs

Definition at line 104 of file makeHGCalValidationPlots.py.

◆ opts

makeHGCalValidationPlots.opts

Definition at line 128 of file makeHGCalValidationPlots.py.

◆ parser

makeHGCalValidationPlots.parser

Definition at line 103 of file makeHGCalValidationPlots.py.

◆ str

makeHGCalValidationPlots.str

Definition at line 104 of file makeHGCalValidationPlots.py.

◆ trackstersGeneralLabel

makeHGCalValidationPlots.trackstersGeneralLabel

Definition at line 19 of file makeHGCalValidationPlots.py.

◆ trackstersIters

makeHGCalValidationPlots.trackstersIters

Definition at line 12 of file makeHGCalValidationPlots.py.

◆ type

makeHGCalValidationPlots.type

Definition at line 104 of file makeHGCalValidationPlots.py.

hgcalPlots.append_hgcalDigisPlots
def append_hgcalDigisPlots(collection="HGCalDigisV", name_collection="Digis")
Definition: hgcalPlots.py:2121
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
hgcalPlots.append_hgcalMultiClustersPlots
def append_hgcalMultiClustersPlots(collection='ticlMultiClustersFromTrackstersMerge', name_collection="MultiClustersMerge")
Definition: hgcalPlots.py:2005
makeHGCalValidationPlots.main
def main(opts)
Definition: makeHGCalValidationPlots.py:27
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
hgcalPlots.append_hgcalHitsPlots
def append_hgcalHitsPlots(collection="HGCalSimHitsV", name_collection="Simulated Hits")
Definition: hgcalPlots.py:2052
hgcalPlots.append_hgcalLayerClustersPlots
def append_hgcalLayerClustersPlots(collection="hgcalLayerClusters", name_collection=layerClustersLabel)
Definition: hgcalPlots.py:1961