CMS 3D CMS Logo

Functions | Variables
plot_hgcal_utils Namespace Reference

Functions

def acustompalette ()
 
def TwikiPrintout (plotname, label, zoom)
 

Variables

 _LABELS2COMPS
 
 COMPOUNDS
 
 dEdx
 
 DETECTORS
 
 hist_label_to_num
 
 MatXo
 
 plots
 
 sDETS
 

Function Documentation

def plot_hgcal_utils.acustompalette ( )

Definition at line 156 of file plot_hgcal_utils.py.

References mps_check.array.

157  NRGBs = 7
158  NCont = 100
159  ncolors = array('i', [])
160  gStyle.SetNumberContours(NCont);
161  stops = [ 0.00, 0.10, 0.25, 0.45, 0.60, 0.75, 1.00 ]
162  red = [ 1.00, 0.00, 0.00, 0.00, 0.97, 0.97, 0.10 ]
163  green = [ 1.00, 0.97, 0.30, 0.40, 0.97, 0.00, 0.00 ]
164  blue = [ 1.00, 0.97, 0.97, 0.00, 0.00, 0.00, 0.00 ]
165  stopsArray = array('d', stops)
166  redArray = array('d', red)
167  greenArray = array('d', green)
168  blueArray = array('d', blue)
169  first_color_number = TColor.CreateGradientColorTable(NRGBs, stopsArray, redArray, greenArray, blueArray, NCont);
170  gStyle.SetNumberContours(NCont)
171 
172 
173  palsize = NCont
174  palette = []
175  for i in range(palsize):
176  palette.append(first_color_number+i)
177  palarray = array('i',palette)
178 
179  gStyle.SetPalette(palsize,palarray)
180 
181 
182 #In MeV/mm
def plot_hgcal_utils.TwikiPrintout (   plotname,
  label,
  zoom 
)
The plots in the twiki are already too much and to avoid mistakes 
   we will try to automatize the procedure

Definition at line 95 of file plot_hgcal_utils.py.

References edm.print().

95 def TwikiPrintout(plotname, label, zoom):
96  """The plots in the twiki are already too much and to avoid mistakes
97  we will try to automatize the procedure
98  """
99 
100  #Twiki will strip out spaces
101  label = label.replace(" ", "_")
102 
103  zoomstring = ""
104 
105  if zoom == "all":
106  zoomstring = ""
107  zoomtitle = "in all HGCal"
108  zoomdir = "%s/" % label
109  elif zoom == "zplus":
110  zoomstring = "_ZplusZoom"
111  zoomtitle = "in Z+ endcap of HGCal"
112  zoomdir = "%s/ZPlusZoom/" % label
113  elif zoom == "zminus":
114  zoomstring = "_ZminusZoom"
115  zoomtitle = "in Z- endcap of HGCal"
116  zoomdir = "%s/ZMinusZoom/" % label
117  else :
118  print("WRONG OPTION")
119 
120 
121  #Here for the hide button
122  if plotname == "x_vs_z_vs_Rsum":
123  print("%%TWISTY{ mode=\"div\" showlink=\"Click to see the %s plots %s \" hidelink=\"Hide %s %s\" showimgright=\"%%ICONURLPATH{toggleopen-small}%%\" hideimgright=\"%%ICONURLPATH{toggleclose-small}%%\"}%%" % (label,zoomtitle, label, zoomtitle))
124 
125  if "Rsum" in plotname and "x_vs" in plotname and not "cos" in plotname:
126  print("| <img alt=\"HGCal_%s%s%s.png\" height=\"300\" width=\"550\" src=\"http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.png\" /> | The plot on the left shows the 2D profile histogram for *%s* %s that displays the mean value of the material budget in units of radiation length in each R-z cell. R-z cell is 1 cm x 1 mm. The plot depicts the accumulated material budget as seen by the track, as the track travels throughout the detector.[[http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.pdf][Click to enlarge plot]] |" % (plotname,label,zoomstring,zoomdir,plotname,label,zoomstring, label, zoomtitle,zoomdir,plotname,label,zoomstring))
127 
128  if "Rsum" in plotname and "l_vs" in plotname and not "cos" in plotname:
129  print("| <img alt=\"HGCal_%s%s%s.png\" height=\"300\" width=\"550\" src=\"http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.png\" /> | The plot on the left shows the 2D profile histogram for *%s* %s that displays the mean value of the material budget in units of interaction length in each R-z cell. R-z cell is 1 cm x 1 mm. The plot depicts the accumulated material budget as seen by the track, as the track travels throughout the detector.[[http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.pdf][Click to enlarge plot]] |" % (plotname,label,zoomstring,zoomdir,plotname,label,zoomstring, label, zoomtitle,zoomdir,plotname,label,zoomstring))
130 
131  if "Rsumcos" in plotname and "x_vs" in plotname:
132  print("| <img alt=\"HGCal_%s%s%s.png\" height=\"300\" width=\"550\" src=\"http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.png\" /> | The plot on the left shows the 2D profile histogram for *%s* %s that displays the mean value of the material budget in units of radiation length in each R-z cell. R-z cell is 1 cm x 1 mm. The plot depicts the orthogonal accumulated material budget, that is cos(theta) what the track sees.[[http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.pdf][Click to enlarge plot]] |" % (plotname,label,zoomstring,zoomdir,plotname,label,zoomstring, label, zoomtitle,zoomdir,plotname,label,zoomstring))
133 
134  if "Rsumcos" in plotname and "l_vs" in plotname:
135  print("| <img alt=\"HGCal_%s%s%s.png\" height=\"300\" width=\"550\" src=\"http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.png\" /> | The plot on the left shows the 2D profile histogram for *%s* %s that displays the mean value of the material budget in units of interaction length in each R-z cell. R-z cell is 1 cm x 1 mm. The plot depicts the orthogonal accumulated material budget, that is cos(theta) what the track sees.[[http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.pdf][Click to enlarge plot]] |" % (plotname,label,zoomstring,zoomdir,plotname,label,zoomstring, label, zoomtitle,zoomdir,plotname,label,zoomstring))
136 
137  if "Rloc" in plotname and "x_vs" in plotname and not "cos" in plotname:
138  print("| <img alt=\"HGCal_%s%s%s.png\" height=\"300\" width=\"550\" src=\"http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.png\" /> | The plot on the left shows the 2D profile histogram for *%s* %s that displays the local mean value of the material budget in units of radiation length in each R-z cell. R-z cell is 1 cm x 1 mm. The plot depicts the local material budget as seen by the track, as the track travels throughout the detector.[[http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.pdf][Click to enlarge plot]] |" % (plotname,label,zoomstring,zoomdir,plotname,label,zoomstring, label, zoomtitle,zoomdir,plotname,label,zoomstring))
139 
140  if "Rloc" in plotname and "l_vs" in plotname and not "cos" in plotname:
141  print("| <img alt=\"HGCal_%s%s%s.png\" height=\"300\" width=\"550\" src=\"http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.png\" /> | The plot on the left shows the 2D profile histogram for *%s* %s that displays the local mean value of the material budget in units of interaction length in each R-z cell. R-z cell is 1 cm x 1 mm. The plot depicts the local material budget as seen by the track, as the track travels throughout the detector.[[http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.pdf][Click to enlarge plot]] |" % (plotname,label,zoomstring,zoomdir,plotname,label,zoomstring, label, zoomtitle,zoomdir,plotname,label,zoomstring))
142 
143  #Here again for the closing of the hide button
144  if plotname == "l_vs_z_vs_Rloc":
145  print("%ENDTWISTY%")
146 
147  """
148  I won't put the local cos plots for now, only the sum cos above
149  if "Rloccos" in plotname and "x_vs" in plotname:
150  print "| <img alt=\"HGCal_%s%s%s.png\" height=\"300\" width=\"550\" src=\"http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.png\" /> | The plot on the left shows the 2D profile histogram for *%s* %s that displays the local mean value of the material budget in units of radiation length in each R-z cell. R-z cell is 1 cm x 1 mm. The plot depicts the orthogonal accumulated material budget, that is cos(theta) what the track sees.[[http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.pdf][Click to enlarge plot]] |" % (plotname,label,zoomstring,zoomdir,plotname,label,zoomstring, label, zoomtitle,zoomdir,plotname,label,zoomstring)
151 
152  if "Rloccos" in plotname and "l_vs" in plotname:
153  print "| <img alt=\"HGCal_%s%s%s.png\" height=\"300\" width=\"550\" src=\"http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.png\" /> | The plot on the left shows the 2D profile histogram for *%s* %s that displays the local mean value of the material budget in units of interaction length in each R-z cell. R-z cell is 1 cm x 1 mm. The plot depicts the orthogonal accumulated material budget, that is cos(theta) what the track sees.[[http://apsallid.web.cern.ch/apsallid/HGCalMaterial/%sHGCal_%s%s%s.pdf][Click to enlarge plot]] |" % (plotname,label,zoomstring,zoomdir,plotname,label,zoomstring, label, zoomtitle,zoomdir,plotname,label,zoomstring)
154  """
155 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
def TwikiPrintout(plotname, label, zoom)

Variable Documentation

plot_hgcal_utils._LABELS2COMPS
private

Definition at line 37 of file plot_hgcal_utils.py.

plot_hgcal_utils.COMPOUNDS

Definition at line 49 of file plot_hgcal_utils.py.

plot_hgcal_utils.dEdx
plot_hgcal_utils.DETECTORS

Definition at line 57 of file plot_hgcal_utils.py.

plot_hgcal_utils.hist_label_to_num

Definition at line 83 of file plot_hgcal_utils.py.

plot_hgcal_utils.MatXo

Definition at line 217 of file plot_hgcal_utils.py.

plot_hgcal_utils.plots

Definition at line 14 of file plot_hgcal_utils.py.

plot_hgcal_utils.sDETS

Definition at line 70 of file plot_hgcal_utils.py.