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 159 of file plot_hgcal_utils.py.

References mps_check.array.

160  NRGBs = 7
161  NCont = 100
162  ncolors = array('i', [])
163  gStyle.SetNumberContours(NCont);
164  stops = [ 0.00, 0.10, 0.25, 0.45, 0.60, 0.75, 1.00 ]
165  red = [ 1.00, 0.00, 0.00, 0.00, 0.97, 0.97, 0.10 ]
166  green = [ 1.00, 0.97, 0.30, 0.40, 0.97, 0.00, 0.00 ]
167  blue = [ 1.00, 0.97, 0.97, 0.00, 0.00, 0.00, 0.00 ]
168  stopsArray = array('d', stops)
169  redArray = array('d', red)
170  greenArray = array('d', green)
171  blueArray = array('d', blue)
172  first_color_number = TColor.CreateGradientColorTable(NRGBs, stopsArray, redArray, greenArray, blueArray, NCont);
173  gStyle.SetNumberContours(NCont)
174 
175 
176  palsize = NCont
177  palette = []
178  for i in range(palsize):
179  palette.append(first_color_number+i)
180  palarray = array('i',palette)
181 
182  gStyle.SetPalette(palsize,palarray)
183 
184 
185 #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 98 of file plot_hgcal_utils.py.

References edm.print().

98 def TwikiPrintout(plotname, label, zoom):
99  """The plots in the twiki are already too much and to avoid mistakes
100  we will try to automatize the procedure
101  """
102 
103  #Twiki will strip out spaces
104  label = label.replace(" ", "_")
105 
106  zoomstring = ""
107 
108  if zoom == "all":
109  zoomstring = ""
110  zoomtitle = "in all HGCal"
111  zoomdir = "%s/" % label
112  elif zoom == "zplus":
113  zoomstring = "_ZplusZoom"
114  zoomtitle = "in Z+ endcap of HGCal"
115  zoomdir = "%s/ZPlusZoom/" % label
116  elif zoom == "zminus":
117  zoomstring = "_ZminusZoom"
118  zoomtitle = "in Z- endcap of HGCal"
119  zoomdir = "%s/ZMinusZoom/" % label
120  else :
121  print("WRONG OPTION")
122 
123 
124  #Here for the hide button
125  if plotname == "x_vs_z_vs_Rsum":
126  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))
127 
128  if "Rsum" in plotname and "x_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 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))
130 
131  if "Rsum" in plotname and "l_vs" in plotname and not "cos" 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 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))
133 
134  if "Rsumcos" in plotname and "x_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 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))
136 
137  if "Rsumcos" in plotname and "l_vs" 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 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))
139 
140  if "Rloc" in plotname and "x_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 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))
142 
143  if "Rloc" in plotname and "l_vs" in plotname and not "cos" in plotname:
144  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))
145 
146  #Here again for the closing of the hide button
147  if plotname == "l_vs_z_vs_Rloc":
148  print("%ENDTWISTY%")
149 
150  """
151  I won't put the local cos plots for now, only the sum cos above
152  if "Rloccos" in plotname and "x_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 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)
154 
155  if "Rloccos" in plotname and "l_vs" in plotname:
156  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)
157  """
158 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
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 223 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.