CMS 3D CMS Logo

Functions | Variables
alignmentValidation Namespace Reference

Functions

def createCanvasesList (fname="canvases_list.js")
 
def createCanvasToIDList (fname="canvas2id_list.js")
 
def createDirectoryStructure (iteration_name)
 
def dirToID (d)
 
def doCurvaturePlotsDT (dt_basedir, tfiles_plotting)
 
def doFitFunctionsPlotsCSC (csc_basedir, iter_tfile, iter_reports)
 
def doFitFunctionsPlotsDT (dt_basedir, iter_tfile, iter_reports)
 
def doIterationPlots (iteration_directory, tfiles_plotting, iter_tfile, iter_reports)
 
def doMapPlotsCSC (csc_basedir, tfiles_plotting)
 
def doMapPlotsDT (dt_basedir, tfiles_plotting)
 
def doSegDiffPlotsCSC (csc_basedir, tfiles_plotting, iter_reports)
 
def doSegDiffPlotsDT (dt_basedir, tfiles_plotting, iter_reports)
 
def idsForFile (dir_name, file_name)
 
def isFileUnderDir (dir_name, file_name)
 functions definitions More...
 
def saveAs (nm)
 

Variables

 action
 
string allOptions = "-l "+options.runLabel+" -i "+options.inputDir+" --i1 "+options.i1+" --iN "+options.iN
 
 args
 
 binsdxdz
 
 binsdydz
 
 binsx
 
 binsy
 
 c1 = ROOT.TCanvas("c1","c1",800,600)
 do drawing More...
 
list CANVASES_LIST_TEMPLATE
 
string comdir = "common/"
 setup output: More...
 
 default
 
 dest
 
bool DO_CSC = False
 
bool DO_CURVATURE = False
 
 DO_DIAGNOSTIC = options.diagnostic
 
bool DO_DT = False
 
bool DO_FIT = False
 
bool DO_MAP = False
 
bool DO_MEDIAN = False
 
bool DO_SEGDIFF = False
 
string fname = options.inputDir+'/'+options.i1+'/'+i1prefix
 main script More...
 
 help
 
 i1prefix = options.i1prefix
 
 iNprefix = options.iNprefix
 
list iter1_reports = []
 
 iter1_tfile = None
 
string iteration1 = "iter1"
 
string iterationN = "iterN"
 
list iterN_reports = []
 
 iterN_tfile = None
 
 options
 
 outdir = options.outputDir
 
 parser = optparse.OptionParser(usage)
 
def pic_ids = createCanvasToIDList("canvas2id_list.js")
 
int QUICKTESTN = 10000
 
bool SINGLE_ITERATION = False
 
list tfiles1_plotting = []
 
list tfilesN_plotting = []
 
 type
 
string usage = '%prog [options]\n'+\
 To parse commandline args. More...
 
 windowdxdz
 
 windowdydz
 
 windowx
 
 windowy
 

Function Documentation

◆ createCanvasesList()

def alignmentValidation.createCanvasesList (   fname = "canvases_list.js")
Use CANVASES_LIST_TEMPLATE as a template to create a canvases list include for the browser.
   Write out only those canvases which have existing filename.png plots.

Definition at line 862 of file alignmentValidation.py.

References isFileUnderDir(), and print().

862 def createCanvasesList(fname="canvases_list.js"):
863  '''Use CANVASES_LIST_TEMPLATE as a template to create a canvases list include for the browser.
864  Write out only those canvases which have existing filename.png plots.
865  '''
866  CANVASES_LIST = []
867  for scope in CANVASES_LIST_TEMPLATE:
868  scope_entry = []
869  if len(scope)>2:
870  scope_entry = [scope[0],scope[1]]
871  for canvas_entry in scope[2:]:
872  if isFileUnderDir("./",canvas_entry[1]):
873  scope_entry.append(canvas_entry)
874  CANVASES_LIST.append(scope_entry)
875 
876  ff = open(fname,mode="w")
877  print("var CANVASES_LIST = ", file=ff)
878  json.dump(CANVASES_LIST,ff)
879  ff.close()
880 
881 
def createCanvasesList(fname="canvases_list.js")
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def isFileUnderDir(dir_name, file_name)
functions definitions

◆ createCanvasToIDList()

def alignmentValidation.createCanvasToIDList (   fname = "canvas2id_list.js")
Writes out a canvas-2-ids list include for the browser.
   Write out only those canvases which have existing filename.png plots.
   Returns: list of unique IDs that have existing filename.png plots.

Definition at line 882 of file alignmentValidation.py.

References idsForFile(), and print().

882 def createCanvasToIDList(fname="canvas2id_list.js"):
883  '''Writes out a canvas-2-ids list include for the browser.
884  Write out only those canvases which have existing filename.png plots.
885  Returns: list of unique IDs that have existing filename.png plots.
886  '''
887  CANVAS2ID_LIST = []
888  ID_LIST = []
889  for scope in CANVASES_LIST_TEMPLATE:
890  if len(scope)>2:
891  for canvas_entry in scope[2:]:
892  ids = idsForFile("./",canvas_entry[1])
893  # scope_entry.append(canvas_entry)
894  # uniquify:
895  set_ids = set(ids)
896  uids = list(set_ids)
897  ID_LIST.extend(uids)
898  print(canvas_entry, ":", len(uids), "ids")
899  if (len(uids)>0):
900  CANVAS2ID_LIST.append( (canvas_entry[1],uids) )
901  #print CANVAS2ID_LIST
902  CANVAS2ID_LIST_DICT = dict(CANVAS2ID_LIST)
903  #print CANVAS2ID_LIST_DICT
904  ff = open(fname,mode="w")
905  print("var CANVAS2ID_LIST = ", file=ff)
906  json.dump(CANVAS2ID_LIST_DICT,ff)
907  ff.close()
908  set_ids = set(ID_LIST)
909  return list(set_ids)
910 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def createCanvasToIDList(fname="canvas2id_list.js")
def idsForFile(dir_name, file_name)

◆ createDirectoryStructure()

def alignmentValidation.createDirectoryStructure (   iteration_name)

Definition at line 309 of file alignmentValidation.py.

References print(), and FastTimerService_cff.range.

309 def createDirectoryStructure(iteration_name):
310 
311  if not os.access(iteration_name,os.F_OK):
312  os.mkdir(iteration_name)
313 
314  csc_basedir = iteration_name+'/'
315  for endcap in CSC_TYPES:
316  #print csc_basedir+endcap[0]
317  shutil.rmtree(csc_basedir+endcap[0],True)
318  os.mkdir(csc_basedir+endcap[0])
319  for station in endcap[2]:
320  #print csc_basedir+endcap[0]+'/'+station[1]
321  os.mkdir(csc_basedir+endcap[0]+'/'+station[1])
322  for ring in station[2]:
323  #print csc_basedir+endcap[0]+'/'+station[1]+'/'+ring[1]
324  os.mkdir(csc_basedir+endcap[0]+'/'+station[1]+'/'+ring[1])
325  for chamber in range(1,ring[2]+1):
326  schamber = "%02d" % chamber
327  #print csc_basedir+endcap[0]+'/'+station[1]+'/'+ring[1]+'/'+schamber
328  os.mkdir(csc_basedir+endcap[0]+'/'+station[1]+'/'+ring[1]+'/'+schamber)
329 
330  dt_basedir = iteration_name+'/MB/'
331  #print dt_basedir
332  shutil.rmtree(dt_basedir,True)
333  os.mkdir(dt_basedir)
334  for wheel in DT_TYPES:
335  #print dt_basedir+wheel[0]
336  os.mkdir(dt_basedir+wheel[0])
337  for station in wheel[2]:
338  #print dt_basedir+wheel[0]+'/'+station[1]
339  os.mkdir(dt_basedir+wheel[0]+'/'+station[1])
340  for sector in range(1,station[2]+1):
341  ssector = "%02d" % sector
342  #print dt_basedir+wheel[0]+'/'+station[1]+'/'+ssector
343  os.mkdir(dt_basedir+wheel[0]+'/'+station[1]+'/'+ssector)
344 
345  print(os.getcwd())
346 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def createDirectoryStructure(iteration_name)

◆ dirToID()

def alignmentValidation.dirToID (   d)

Definition at line 930 of file alignmentValidation.py.

Referenced by idsForFile().

930 def dirToID(d):
931  if d[-1]!='/': d += '/'
932  dtn = d.find("/MB/")
933  if dtn!=-1:
934  return d[dtn+4:-1]
935  cscn = d.find("/ME-/")
936  if cscn!=-1:
937  return 'ME-'+d[cscn+5:-1]
938  cscn = d.find("/ME+/")
939  if cscn!=-1:
940  return 'ME+'+d[cscn+5:-1]
941  return ''
942 
943 

◆ doCurvaturePlotsDT()

def alignmentValidation.doCurvaturePlotsDT (   dt_basedir,
  tfiles_plotting 
)
write DT curvature plots

"wheel%s_sector%s" % (wheel, sector)

wheel in "m2", "m1", "z", "p1", "p2"
station 1 only!
sector in "01", ..., "12"

"param" may be one of 
  "deltax" (Delta x position residuals),
  "deltadxdz" (Delta (dx/dz) angular residuals),
  "curverr" (Delta x * d(Delta q/pT)/d(Delta x) = Delta q/pT in the absence of misalignment) - not necessary

made for all (wheel,station=1,sector) combinations

Interface: could be accesses through a general DT chambers map for station=1 chambers.

Definition at line 541 of file alignmentValidation.py.

References plotscripts.curvatureplot(), print(), FastTimerService_cff.range, and saveAs().

Referenced by doIterationPlots().

541 def doCurvaturePlotsDT(dt_basedir, tfiles_plotting):
542  """write DT curvature plots
543 
544  "wheel%s_sector%s" % (wheel, sector)
545 
546  wheel in "m2", "m1", "z", "p1", "p2"
547  station 1 only!
548  sector in "01", ..., "12"
549 
550  "param" may be one of
551  "deltax" (Delta x position residuals),
552  "deltadxdz" (Delta (dx/dz) angular residuals),
553  "curverr" (Delta x * d(Delta q/pT)/d(Delta x) = Delta q/pT in the absence of misalignment) - not necessary
554 
555  made for all (wheel,station=1,sector) combinations
556 
557  Interface: could be accesses through a general DT chambers map for station=1 chambers."""
558 
559  w_dict = {'-2':'m2', '-1':'m1', '0':'z', '1':'p1', '2':'p2'}
560  qcount = 0
561  for wheel in DT_TYPES:
562  if wheel[1]=="ALL": continue
563  #station = 1
564  #station = wheel[2][0]
565  for station in wheel[2]:
566  print("curv in ", wheel[0]+'/'+station[1])
567  for sector in range(1,station[2]+1):
568  #if sector>12: break
569  if qcount>QUICKTESTN: break
570  qcount += 1
571  ssector = "%02d" % sector
572  pdir = dt_basedir+'/'+wheel[0]+'/'+station[1]+'/'+ssector+'/'
573  label = "wheel%s_st%s_sector%s" % (w_dict[wheel[1]], station[1], ssector)
574  thetitle ="Wheel %s, station %s, sector %s" % (wheel[1], station[1], ssector)
575  curvatureplot(tfiles_plotting, label, "deltax", title=thetitle, window=10., fitline=True)
576  saveAs(pdir+'dt_curvature_deltax.png')
577  curvatureplot(tfiles_plotting, label, "deltadxdz", title=thetitle, window=10., fitline=True)
578  saveAs(pdir+'dt_curvature_deltadxdz.png')
579 
580 
581 
def curvatureplot(tfiles, name, param, mode="from2d", window=15., widebins=False, title="", fitgauss=False, fitconst=False, fitline=False, fitpeaks=True, reset_palette=False)
"param" may be one of "deltax" (Delta x position residuals), "deltadxdz" (Delta (dx/dz) angular resid...
def doCurvaturePlotsDT(dt_basedir, tfiles_plotting)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ doFitFunctionsPlotsCSC()

def alignmentValidation.doFitFunctionsPlotsCSC (   csc_basedir,
  iter_tfile,
  iter_reports 
)
write fit functions plots for CSC

   CSC bellcurves and polynomials

set of plots of bellcurves
  rphi, drphidz, rphi vs. drphidz

set of plots of polynomials
  rphi vs. rphi pos,    rphi vs drphidz angle
  drphidz vs. rphi pos, drphidz vs drphidz angle

made for all (endcap,station,ring,chamber) combinations

Interface: could be accesses through a general CSC chambers map.

Definition at line 798 of file alignmentValidation.py.

References plotscripts.bellcurves(), plotscripts.clearDDT(), plotscripts.polynomials(), print(), FastTimerService_cff.range, and saveAs().

Referenced by doIterationPlots().

798 def doFitFunctionsPlotsCSC(csc_basedir, iter_tfile, iter_reports):
799  """write fit functions plots for CSC
800 
801  CSC bellcurves and polynomials
802 
803  set of plots of bellcurves
804  rphi, drphidz, rphi vs. drphidz
805 
806  set of plots of polynomials
807  rphi vs. rphi pos, rphi vs drphidz angle
808  drphidz vs. rphi pos, drphidz vs drphidz angle
809 
810  made for all (endcap,station,ring,chamber) combinations
811 
812  Interface: could be accesses through a general CSC chambers map."""
813 
814  qcount = 0
815  clearDDT()
816  for endcap in CSC_TYPES:
817  for station in endcap[2]:
818  for ring in station[2]:
819  if ring[1]=="ALL": continue
820  print(endcap[0]+'/'+station[1]+'/'+ring[1])
821  for chamber in range(1,ring[2]+1):
822  if qcount>QUICKTESTN: break
823  qcount += 1
824  schamber = "%02d" % chamber
825  pdir = csc_basedir+'/'+endcap[0]+'/'+station[1]+'/'+ring[1]+'/'+schamber+'/'
826  label = "ME%s%s%s_%s" % (endcap[1], station[1], ring[1], schamber)
827  bellcurves(iter_tfile, iter_reports, label, False)
828  #c1.SaveAs(pdir+'csc_bellcurves.png')
829  saveAs(pdir+'csc_bellcurves.png')
830  polynomials(iter_tfile, iter_reports, label, False)
831  #c1.SaveAs(pdir+'csc_polynomials.png')
832  saveAs(pdir+'csc_polynomials.png')
833  #printDeltaTs()
834 
835 
836 
def clearDDT()
def doFitFunctionsPlotsCSC(csc_basedir, iter_tfile, iter_reports)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def polynomials(tfile, reports, name, twobin=True, suppressblue=False)
def bellcurves(tfile, reports, name, twobin=True, suppressblue=False)

◆ doFitFunctionsPlotsDT()

def alignmentValidation.doFitFunctionsPlotsDT (   dt_basedir,
  iter_tfile,
  iter_reports 
)
write fit functions plots for DT

   DT bellcurves and polynomials

set of plots of bellcurves
  x, dxdz, x vs. dxdz (for all 4 stations)
  y, dydz, x vs. dxdz (only for stations 1-3?)

set of plots of polynomials -- for stations 1-3 only??
  x vs. xpos,    x vs ypos,    x vs dxdz angle,    x vs dydz angle
  y vs. xpos,    y vs ypos,    y vs dxdz angle,    y vs dydz angle
  dxdz vs. xpos, dxdz vs ypos, dxdz vs dxdz angle, dxdz vs dydz angle
  dydz vs. xpos, dydz vs ypos, dydz vs dxdz angle, dydz vs dydz angle

set of plots of polynomials -- for station 4 only??
  x vs. xpos,    x vs dxdz angle
  dxdz vs. xpos, dxdz vs dxdz angle

made for all (wheel,station,sector) combinations

Interface: could be accesses through a general DT chambers map.

Definition at line 754 of file alignmentValidation.py.

References plotscripts.bellcurves(), plotscripts.clearDDT(), createfilelist.int, plotscripts.polynomials(), print(), FastTimerService_cff.range, saveAs(), and plotscripts.wheelLetter().

Referenced by doIterationPlots().

754 def doFitFunctionsPlotsDT(dt_basedir, iter_tfile, iter_reports):
755  """write fit functions plots for DT
756 
757  DT bellcurves and polynomials
758 
759  set of plots of bellcurves
760  x, dxdz, x vs. dxdz (for all 4 stations)
761  y, dydz, x vs. dxdz (only for stations 1-3?)
762 
763  set of plots of polynomials -- for stations 1-3 only??
764  x vs. xpos, x vs ypos, x vs dxdz angle, x vs dydz angle
765  y vs. xpos, y vs ypos, y vs dxdz angle, y vs dydz angle
766  dxdz vs. xpos, dxdz vs ypos, dxdz vs dxdz angle, dxdz vs dydz angle
767  dydz vs. xpos, dydz vs ypos, dydz vs dxdz angle, dydz vs dydz angle
768 
769  set of plots of polynomials -- for station 4 only??
770  x vs. xpos, x vs dxdz angle
771  dxdz vs. xpos, dxdz vs dxdz angle
772 
773  made for all (wheel,station,sector) combinations
774 
775  Interface: could be accesses through a general DT chambers map."""
776 
777  qcount = 0
778  clearDDT()
779  for wheel in DT_TYPES:
780  if wheel[1]=="ALL": continue
781  for station in wheel[2]:
782  print(wheel[0]+'/'+station[1])
783  for sector in range(1,station[2]+1):
784  if qcount>QUICKTESTN: break
785  qcount += 1
786  ssector = "%02d" % sector
787  pdir = dt_basedir+'/'+wheel[0]+'/'+station[1]+'/'+ssector+'/'
788  label = "MBwh%sst%ssec%s" % (wheelLetter(int(wheel[1])),station[1],ssector)
789  bellcurves(iter_tfile, iter_reports, label, False)
790  #c1.SaveAs(pdir+'dt_bellcurves.png')
791  saveAs(pdir+'dt_bellcurves.png')
792  polynomials(iter_tfile, iter_reports, label, False)
793  #c1.SaveAs(pdir+'dt_polynomials.png')
794  saveAs(pdir+'dt_polynomials.png')
795  #printDeltaTs()
796 
797 
def clearDDT()
def doFitFunctionsPlotsDT(dt_basedir, iter_tfile, iter_reports)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def polynomials(tfile, reports, name, twobin=True, suppressblue=False)
def bellcurves(tfile, reports, name, twobin=True, suppressblue=False)
def wheelLetter(wheel)
Definition: plotscripts.py:39

◆ doIterationPlots()

def alignmentValidation.doIterationPlots (   iteration_directory,
  tfiles_plotting,
  iter_tfile,
  iter_reports 
)

Definition at line 837 of file alignmentValidation.py.

References doCurvaturePlotsDT(), doFitFunctionsPlotsCSC(), doFitFunctionsPlotsDT(), doMapPlotsCSC(), doMapPlotsDT(), doSegDiffPlotsCSC(), and doSegDiffPlotsDT().

837 def doIterationPlots(iteration_directory, tfiles_plotting, iter_tfile, iter_reports):
838  dt_basedir = iteration_directory+'/'+'MB'
839  csc_basedir = iteration_directory+'/'
840 
841  if DO_DT and DO_MAP:
842  doMapPlotsDT(dt_basedir, tfiles_plotting)
843  if DO_CSC and DO_MAP:
844  doMapPlotsCSC(csc_basedir, tfiles_plotting)
845 
846  if DO_DT and DO_CURVATURE:
847  doCurvaturePlotsDT(dt_basedir, tfiles_plotting)
848  #if DO_CSC and DO_CURVATURE:
849  # doCurvaturePlotsCSC(csc_basedir, tfiles_plotting)
850 
851  if DO_DT and DO_SEGDIFF:
852  doSegDiffPlotsDT(dt_basedir, tfiles_plotting, iter_reports)
853  if DO_CSC and DO_SEGDIFF:
854  doSegDiffPlotsCSC(csc_basedir, tfiles_plotting, iter_reports)
855 
856  if DO_DT and DO_FIT:
857  doFitFunctionsPlotsDT(dt_basedir, iter_tfile, iter_reports)
858  if DO_CSC and DO_FIT:
859  doFitFunctionsPlotsCSC(csc_basedir, iter_tfile, iter_reports)
860 
861 
def doFitFunctionsPlotsCSC(csc_basedir, iter_tfile, iter_reports)
def doMapPlotsCSC(csc_basedir, tfiles_plotting)
def doFitFunctionsPlotsDT(dt_basedir, iter_tfile, iter_reports)
def doMapPlotsDT(dt_basedir, tfiles_plotting)
def doCurvaturePlotsDT(dt_basedir, tfiles_plotting)
def doSegDiffPlotsCSC(csc_basedir, tfiles_plotting, iter_reports)
def doSegDiffPlotsDT(dt_basedir, tfiles_plotting, iter_reports)
def doIterationPlots(iteration_directory, tfiles_plotting, iter_tfile, iter_reports)

◆ doMapPlotsCSC()

def alignmentValidation.doMapPlotsCSC (   csc_basedir,
  tfiles_plotting 
)
write CSC map plots

   "CSCvsphi_me%s%d%d" % (endcap, station, ring)

plots "integrated" over ALL SECTORS:
of rphi, drphi/dz vs. phi
made for all (endcap,station,ring) combinations

Interface: may be arranged into two station(1 .. 4) vs. R(1 .. 4) maps for both endcaps
with R range (1 .. 4) for stations 2-4
   It could be incorporated into a general CSC chambers map (column1: endcap, column2: station,
column3: ring, columns4-40 correspond to chamber #) by making ring numbers in column 3
clickable.


   "CSCvsr_me%s%dch%02d" % (endcap, station, chamberNumber)

plots "integrated" over ALL RINGS:
of rphi, drphi/dz vs. z
made for all (endcap,station,chamber) combinations

Interface: may be arranged into two station(1 .. 4) vs. chamber(1 .. 36) maps for both endcaps
It could be incorporated into an EXTENDED general CSC chambers map (extended by adding an
identifier "ALL" in column3 for ring number).

   "CSCvsr_me%s%dchALL" % (endcap, station)

plots spanning over ALL RINGS along r and integrated over all SECTORS:
of rphi, drphi/dz vs. z
made for all (endcap,station) combinations

Interface: may be arranged into two station(1 .. 4) maps for both endcaps
It could be incorporated into an EXTENDED general CSC chambers map (extended by adding an
identifier "ALL" in column3 for ring number).

Definition at line 455 of file alignmentValidation.py.

References plotscripts.mapplot(), FastTimerService_cff.range, and plotscripts.saveTestResultsMap().

Referenced by doIterationPlots().

455 def doMapPlotsCSC(csc_basedir, tfiles_plotting):
456  """write CSC map plots
457 
458  "CSCvsphi_me%s%d%d" % (endcap, station, ring)
459 
460  plots "integrated" over ALL SECTORS:
461  of rphi, drphi/dz vs. phi
462  made for all (endcap,station,ring) combinations
463 
464  Interface: may be arranged into two station(1 .. 4) vs. R(1 .. 4) maps for both endcaps
465  with R range (1 .. 4) for stations 2-4
466  It could be incorporated into a general CSC chambers map (column1: endcap, column2: station,
467  column3: ring, columns4-40 correspond to chamber #) by making ring numbers in column 3
468  clickable.
469 
470 
471  "CSCvsr_me%s%dch%02d" % (endcap, station, chamberNumber)
472 
473  plots "integrated" over ALL RINGS:
474  of rphi, drphi/dz vs. z
475  made for all (endcap,station,chamber) combinations
476 
477  Interface: may be arranged into two station(1 .. 4) vs. chamber(1 .. 36) maps for both endcaps
478  It could be incorporated into an EXTENDED general CSC chambers map (extended by adding an
479  identifier "ALL" in column3 for ring number).
480 
481  "CSCvsr_me%s%dchALL" % (endcap, station)
482 
483  plots spanning over ALL RINGS along r and integrated over all SECTORS:
484  of rphi, drphi/dz vs. z
485  made for all (endcap,station) combinations
486 
487  Interface: may be arranged into two station(1 .. 4) maps for both endcaps
488  It could be incorporated into an EXTENDED general CSC chambers map (extended by adding an
489  identifier "ALL" in column3 for ring number)."""
490 
491  for endcap in CSC_TYPES:
492  for station in endcap[2]:
493  for ring in station[2]:
494  if ring[1]=="ALL": continue
495  pdir = csc_basedir+'/'+endcap[0]+'/'+station[1]+'/'+ring[1]+'/'
496  label = "CSCvsphi_me%s%s%s" % (endcap[1], station[1], ring[1])
497  htitle = "%s%s/%s" % (endcap[0], station[1],ring[1])
498  mapplot(tfiles_plotting, label, "x", window=15., title=htitle, fitsine=True,fitpeaks=True, peaksbins=2)
499  #mapplot(tfiles_plotting, label, "x", window=15., title=htitle, fitsine=True)
500  c1.SaveAs(pdir+'map_CSCvsphi_x.png')
501  mapplot(tfiles_plotting, label, "dxdz", window=15., title=htitle, peaksbins=2)
502  c1.SaveAs(pdir+'map_CSCvsphi_dxdz.png')
503 
504  saveTestResultsMap(options.runLabel)
505 
506  qcount = 0
507  for endcap in CSC_TYPES:
508  for station in endcap[2]:
509  for ring in station[2]:
510  if ring[1]!="ALL": continue
511  for chamber in range(1,ring[2]+1):
512  if qcount>QUICKTESTN: break
513  qcount += 1
514  schamber = "%02d" % chamber
515  pdir = csc_basedir+'/'+endcap[0]+'/'+station[1]+'/'+ring[1]+'/'+schamber+'/'
516  label = "CSCvsr_me%s%sch%s" % (endcap[1], station[1], schamber)
517  htitle = "%s%s/ALL/%d" % (endcap[0], station[1],chamber)
518  mapplot(tfiles_plotting, label, "x", window=15., title=htitle, peaksbins=2)
519  c1.SaveAs(pdir+'map_CSCvsr_x.png')
520  mapplot(tfiles_plotting, label, "dxdz", window=15., title=htitle, peaksbins=2)
521  c1.SaveAs(pdir+'map_CSCvsr_dxdz.png')
522 
523  qcount = 0
524  for endcap in CSC_TYPES:
525  for station in endcap[2]:
526  for ring in station[2]:
527  if ring[1]!="ALL": continue
528  if qcount>QUICKTESTN: break
529  qcount += 1
530  schamber = "%02d" % chamber
531  pdir = csc_basedir+'/'+endcap[0]+'/'+station[1]+'/'+ring[1]+'/'
532  label = "CSCvsr_me%s%schALL" % (endcap[1], station[1])
533  htitle = "%s%s" % (endcap[0], station[1])
534  mapplot(tfiles_plotting, label, "x", window=10., title=htitle, peaksbins=2)
535  c1.SaveAs(pdir+'map_CSCvsr_all_x.png')
536  mapplot(tfiles_plotting, label, "dxdz", window=10., title=htitle, peaksbins=2)
537  c1.SaveAs(pdir+'map_CSCvsr_all_dxdz.png')
538 
539 
540 
def saveTestResultsMap(run_name)
def doMapPlotsCSC(csc_basedir, tfiles_plotting)
def mapplot(tfiles, name, param, mode="from2d", window=10., abscissa=None, title="", widebins=False, fitsine=False, fitline=False, reset_palette=False, fitsawteeth=False, fitpeaks=False, peaksbins=1, fixfitpars={}, args)

◆ doMapPlotsDT()

def alignmentValidation.doMapPlotsDT (   dt_basedir,
  tfiles_plotting 
)
write DT map plots

   "DTvsphi_st%dwh%s" % (station, wheelletter):

plots "integrated" over ALL SECTORS:
of x, y, dxdz, dydz vs. phi (y and dydz only for stations 1-3)
made for all (station,wheel) combinations

Access interface may be arranged into station(1 .. 4) vs. wheel(-2 .. +2) map.
It could be incorporated into a general DT chambers map (column1: wheel, column2: station,
columns3-16 correspond to sector #) by making station numbers in column 2 clickable.


   "DTvsz_st%dsec%02d" % (station, sector)

plots "integrated" over ALL WHEELS:
of x, y, dxdz, dydz vs. z (y and dydz only for stations 1-3)
made for all (station,sector) combinations

Interface: may be arranged into station(1 .. 4) vs. sector(1 .. 14) map with sector range
(1 .. 12) for stations 1-3.
It could be incorporated into an EXTENDED general DT chambers map (extended by adding an
identifier "ALL" in column1 for wheel number).


   "DTvsz_st%dsecALL" % (station)

plots spanning in z over ALL WHEELS and "integrated" over all sectors:
of x, y, dxdz, dydz vs. z (y and dydz only for stations 1-3)
made for all stations

Interface: may be arranged into station(1 .. 4) map 
It could be incorporated into an EXTENDED general DT chambers map (extended by adding an
identifier "ALL" in column1 for wheel number).

Definition at line 349 of file alignmentValidation.py.

References createfilelist.int, plotscripts.mapplot(), print(), FastTimerService_cff.range, plotscripts.saveTestResultsMap(), and plotscripts.wheelLetter().

Referenced by doIterationPlots().

349 def doMapPlotsDT(dt_basedir, tfiles_plotting):
350  """write DT map plots
351 
352  "DTvsphi_st%dwh%s" % (station, wheelletter):
353 
354  plots "integrated" over ALL SECTORS:
355  of x, y, dxdz, dydz vs. phi (y and dydz only for stations 1-3)
356  made for all (station,wheel) combinations
357 
358  Access interface may be arranged into station(1 .. 4) vs. wheel(-2 .. +2) map.
359  It could be incorporated into a general DT chambers map (column1: wheel, column2: station,
360  columns3-16 correspond to sector #) by making station numbers in column 2 clickable.
361 
362 
363  "DTvsz_st%dsec%02d" % (station, sector)
364 
365  plots "integrated" over ALL WHEELS:
366  of x, y, dxdz, dydz vs. z (y and dydz only for stations 1-3)
367  made for all (station,sector) combinations
368 
369  Interface: may be arranged into station(1 .. 4) vs. sector(1 .. 14) map with sector range
370  (1 .. 12) for stations 1-3.
371  It could be incorporated into an EXTENDED general DT chambers map (extended by adding an
372  identifier "ALL" in column1 for wheel number).
373 
374 
375  "DTvsz_st%dsecALL" % (station)
376 
377  plots spanning in z over ALL WHEELS and "integrated" over all sectors:
378  of x, y, dxdz, dydz vs. z (y and dydz only for stations 1-3)
379  made for all stations
380 
381  Interface: may be arranged into station(1 .. 4) map
382  It could be incorporated into an EXTENDED general DT chambers map (extended by adding an
383  identifier "ALL" in column1 for wheel number)."""
384 
385 
386  for wheel in DT_TYPES:
387  if wheel[1]=="ALL": continue
388  for station in wheel[2]:
389  pdir = dt_basedir+'/'+wheel[0]+'/'+station[1]+'/'
390  label = "DTvsphi_st%dwh%s" % (int(station[1]), wheelLetter(int(wheel[1])))
391  htitle = "wheel %+d, station %s" % (int(wheel[1]), station[1])
392  #mapplot(tfiles_plotting, label, "x", window=25., title=htitle, fitsawteeth=True,fitsine=True)
393  mapplot(tfiles_plotting, label, "x", window=10., title=htitle, fitsine=True,fitpeaks=True,peaksbins=2)
394  c1.SaveAs(pdir+'map_DTvsphi_x.png')
395  #mapplot(tfiles_plotting, label, "dxdz", window=25., title=htitle, fitsawteeth=True,fitsine=True)
396  mapplot(tfiles_plotting, label, "dxdz", window=10., title=htitle,peaksbins=2)
397  c1.SaveAs(pdir+'map_DTvsphi_dxdz.png')
398 
399  if station[1]=='4': continue
400  #mapplot(tfiles_plotting, label, "y", window=25., title=htitle, fitsawteeth=True,fitsine=True)
401  mapplot(tfiles_plotting, label, "y", window=10., title=htitle,peaksbins=2)
402  c1.SaveAs(pdir+'map_DTvsphi_y.png')
403  #mapplot(tfiles_plotting, label, "dydz", window=25., title=htitle, fitsawteeth=True,fitsine=True)
404  mapplot(tfiles_plotting, label, "dydz", window=10., title=htitle,peaksbins=2)
405  c1.SaveAs(pdir+'map_DTvsphi_dydz.png')
406 
407 
408  qcount=0
409  for wheel in DT_TYPES:
410  if wheel[1]!="ALL": continue
411  for station in wheel[2]:
412  for sector in range(1,station[2]+1):
413  if qcount>QUICKTESTN: break
414  qcount += 1
415  ssector = "%02d" % sector
416  pdir = dt_basedir+'/'+wheel[0]+'/'+station[1]+'/'+ssector+'/'
417  label = "DTvsz_st%ssec%s" % (station[1], ssector)
418  htitle = "station %s, sector %d" % (station[1], sector)
419  mapplot(tfiles_plotting, label, "x", window=10., title=htitle, peaksbins=2)
420  c1.SaveAs(pdir+'map_DTvsz_x.png')
421  mapplot(tfiles_plotting, label, "dxdz", window=10., title=htitle, peaksbins=2)
422  c1.SaveAs(pdir+'map_DTvsz_dxdz.png')
423 
424  if station[1]=='4': continue
425  mapplot(tfiles_plotting, label, "y", window=10., title=htitle, peaksbins=2)
426  c1.SaveAs(pdir+'map_DTvsz_y.png')
427  mapplot(tfiles_plotting, label, "dydz", window=10., title=htitle, peaksbins=2)
428  c1.SaveAs(pdir+'map_DTvsz_dydz.png')
429 
430  qcount=0
431  for wheel in DT_TYPES:
432  if wheel[1]!="ALL": continue
433  for station in wheel[2]:
434  if qcount>QUICKTESTN: break
435  qcount += 1
436  pdir = dt_basedir+'/'+wheel[0]+'/'+station[1]+'/'
437  label = "DTvsz_st%ssecALL" % (station[1])
438  htitle = "station %s" % (station[1])
439 
440  print(label, end=' ')
441  mapplot(tfiles_plotting, label, "x", window=10., title=htitle, peaksbins=2)
442  c1.SaveAs(pdir+'map_DTvsz_all_x.png')
443  mapplot(tfiles_plotting, label, "dxdz", window=10., title=htitle, peaksbins=2)
444  c1.SaveAs(pdir+'map_DTvsz_all_dxdz.png')
445 
446  if station[1]=='4': continue
447  mapplot(tfiles_plotting, label, "y", window=10., title=htitle, peaksbins=2)
448  c1.SaveAs(pdir+'map_DTvsz_all_y.png')
449  mapplot(tfiles_plotting, label, "dydz", window=10., title=htitle, peaksbins=2)
450  c1.SaveAs(pdir+'map_DTvsz_all_dydz.png')
451 
452  saveTestResultsMap(options.runLabel)
453 
454 
def saveTestResultsMap(run_name)
def mapplot(tfiles, name, param, mode="from2d", window=10., abscissa=None, title="", widebins=False, fitsine=False, fitline=False, reset_palette=False, fitsawteeth=False, fitpeaks=False, peaksbins=1, fixfitpars={}, args)
def doMapPlotsDT(dt_basedir, tfiles_plotting)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def wheelLetter(wheel)
Definition: plotscripts.py:39

◆ doSegDiffPlotsCSC()

def alignmentValidation.doSegDiffPlotsCSC (   csc_basedir,
  tfiles_plotting,
  iter_reports 
)
write segment-difference plots for CSC

   segdiff "csc_resid" and "csc_slope"

set of plots of
rphi vs qpt, rphi for positive, rphi for negative ("csc_resid")
drphidz vs qpt, drphidz for positive, drphidz for negative ("csc_slope")
done for ME1-ME2, ME2-ME3, and ME3-ME4 stations combinations with
  endcap "m" or "p" 
  ring 1 or 2
  chamber 1-18 (r1) or 1-36 (r2)
note: there's no ME3-ME4 plots for R2

Interface: could be accessed through a general CSC chambers map, but only for chambers in
stations 2-4 (e.g., station 2 would provide ME1-ME2 plots).

Definition at line 691 of file alignmentValidation.py.

References createfilelist.int, FastTimerService_cff.range, plotscripts.segdiff(), and plotscripts.segdiffvsphicsc().

Referenced by doIterationPlots().

691 def doSegDiffPlotsCSC(csc_basedir, tfiles_plotting, iter_reports):
692  """write segment-difference plots for CSC
693 
694  segdiff "csc_resid" and "csc_slope"
695 
696  set of plots of
697  rphi vs qpt, rphi for positive, rphi for negative ("csc_resid")
698  drphidz vs qpt, drphidz for positive, drphidz for negative ("csc_slope")
699  done for ME1-ME2, ME2-ME3, and ME3-ME4 stations combinations with
700  endcap "m" or "p"
701  ring 1 or 2
702  chamber 1-18 (r1) or 1-36 (r2)
703  note: there's no ME3-ME4 plots for R2
704 
705  Interface: could be accessed through a general CSC chambers map, but only for chambers in
706  stations 2-4 (e.g., station 2 would provide ME1-ME2 plots)."""
707 
708  qcount = 0
709  for iendcap in CSC_TYPES:
710  for istation in iendcap[2]:
711  if istation[1]=="1": continue
712  dstations = (int(istation[1])-1)*10 + int(istation[1])
713  for iring in istation[2]:
714  if iring[1]=="ALL": continue
715  if istation[1]=="4" and iring[1]=="2": continue
716  for ichamber in range(1,iring[2]+1):
717  if qcount>QUICKTESTN: break
718  qcount += 1
719  schamber = "%02d" % ichamber
720  pdir = csc_basedir+'/'+iendcap[0]+'/'+istation[1]+'/'+iring[1]+'/'+schamber+'/'
721  segdiff(tfiles_plotting, "csc_resid", dstations,
722  endcap=iendcap[1], ring=int(iring[1]), chamber=ichamber, window=15.)
723  c1.SaveAs(pdir + 'segdif_csc_resid.png')
724  segdiff(tfiles_plotting, "csc_slope", dstations,
725  endcap=iendcap[1], ring=int(iring[1]), chamber=ichamber, window=15.)
726  c1.SaveAs(pdir + 'segdif_csc_slope.png')
727 
728  """segdiffvsphicsc "csc_resid" and "csc_slope"
729 
730  plot for a specific deltaME station differences:
731  rphi vs phi of pair ("csc_resid")
732  dxdz vs phi of pair ("csc_slope")
733  contains plots for two (or one for ME4-ME3) rings
734  done for ME1-ME2, ME2-ME3, and ME3-ME4 stations combinations with
735  endcap "m" or "p"
736 
737  Interface: could be accessed by clicking on ME station boxes, but only for stations 2-4
738  (e.g., station 2 would provide ME1-ME2 plots)."""
739 
740  qcount = 0
741  for iendcap in CSC_TYPES:
742  for istation in iendcap[2]:
743  if istation[1]=="1": continue
744  dstations = (int(istation[1])-1)*10 + int(istation[1])
745  if qcount>QUICKTESTN: break
746  qcount += 1
747  pdir = csc_basedir+'/'+iendcap[0]+'/'+istation[1]+'/'
748  segdiffvsphicsc(tfiles_plotting, "csc_resid", dstations, window=10., endcap=iendcap[1])
749  c1.SaveAs(pdir + 'segdifphi_csc_resid.png')
750  segdiffvsphicsc(tfiles_plotting, "csc_slope", dstations, window=10., endcap=iendcap[1])
751  c1.SaveAs(pdir + 'segdifphi_csc_slope.png')
752 
753 
def segdiffvsphicsc(tfiles, component, pair, window=5., args)
def doSegDiffPlotsCSC(csc_basedir, tfiles_plotting, iter_reports)
def segdiff(tfiles, component, pair, args)

◆ doSegDiffPlotsDT()

def alignmentValidation.doSegDiffPlotsDT (   dt_basedir,
  tfiles_plotting,
  iter_reports 
)
write segment-difference plots for DT

   segdiff "dt13_resid" and "dt13_slope"

set of plots of
x vs qpt, x for positive, x for negative ("dt13_resid")
dxdz vs qpt, dxdz for positive, dxdz for negative ("dt13_slope")
done for MB1-MB2, MB2-MB3, and MB3-MB4 stations combinations with all possible (wheel, sector)

Interface: could be accessed through a general DT chambers map, but only for chambers in
stations 2-4 (e.g., station 2 would provide MB1-MB2 plots).

   segdiff "dt2_resid" and "dt2_slope"

set of plots of
y vs q/pt, y for positive, y for negative ("dt2_resid")
dydz vs q/pt, dydz for positive, dydz for negative ("dt2_slope")
done for MB1-MB2, MB2-MB3 stations combinations with all possible (wheel, sector)

Interface: then the interface would still be a general DT map,
but the info only available from station 2 & 3 chambers.

Definition at line 582 of file alignmentValidation.py.

References funct.abs(), createfilelist.int, FastTimerService_cff.range, plotscripts.segdiff(), plotscripts.segdiff_xalign(), plotscripts.segdiffvsphi(), and plotscripts.segdiffvsphi_xalign().

Referenced by doIterationPlots().

582 def doSegDiffPlotsDT(dt_basedir, tfiles_plotting, iter_reports):
583  """write segment-difference plots for DT
584 
585  segdiff "dt13_resid" and "dt13_slope"
586 
587  set of plots of
588  x vs qpt, x for positive, x for negative ("dt13_resid")
589  dxdz vs qpt, dxdz for positive, dxdz for negative ("dt13_slope")
590  done for MB1-MB2, MB2-MB3, and MB3-MB4 stations combinations with all possible (wheel, sector)
591 
592  Interface: could be accessed through a general DT chambers map, but only for chambers in
593  stations 2-4 (e.g., station 2 would provide MB1-MB2 plots).
594 
595  segdiff "dt2_resid" and "dt2_slope"
596 
597  set of plots of
598  y vs q/pt, y for positive, y for negative ("dt2_resid")
599  dydz vs q/pt, dydz for positive, dydz for negative ("dt2_slope")
600  done for MB1-MB2, MB2-MB3 stations combinations with all possible (wheel, sector)
601 
602  Interface: then the interface would still be a general DT map,
603  but the info only available from station 2 & 3 chambers."""
604 
605  qcount = 0
606  for iwheel in DT_TYPES:
607  if iwheel[1]=="ALL": continue
608  for istation in iwheel[2]:
609  if istation[1]=="1": continue
610  dstations = (int(istation[1])-1)*10 + int(istation[1])
611  #print dstations
612  for isector in range(1, istation[2] + 1):
613  if isector > 12: continue
614  if qcount>QUICKTESTN: break
615  qcount += 1
616  ssector = "%02d" % isector
617  pdir = dt_basedir + '/' + iwheel[0] + '/' + istation[1] + '/' + ssector + '/'
618 
619  segdiff(tfiles_plotting, "dt13_resid", dstations, wheel=int(iwheel[1]), sector=isector, window=15.)
620  c1.SaveAs(pdir + 'segdif_dt13_resid.png')
621  segdiff(tfiles_plotting, "dt13_slope", dstations, wheel=int(iwheel[1]), sector=isector, window=15.)
622  c1.SaveAs(pdir + 'segdif_dt13_slope.png')
623 
624  if istation[1] != '4':
625  segdiff(tfiles_plotting, "dt2_resid", dstations, wheel=int(iwheel[1]), sector=isector, window=15.)
626  c1.SaveAs(pdir + 'segdif_dt2_resid.png')
627  segdiff(tfiles_plotting, "dt2_slope", dstations, wheel=int(iwheel[1]), sector=isector, window=15.)
628  c1.SaveAs(pdir + 'segdif_dt2_slope.png')
629 
630  qcount = 0
631  for iwheel in DT_TYPES:
632  if iwheel[1]=="ALL": continue
633  if abs(int(iwheel[1])) != 2: continue
634  for istation in iwheel[2]:
635  if istation[1]=="3": continue
636  #print dstations
637  for isector in range(1, istation[2] + 1):
638  ssector = "%02d" % isector
639  pdir = dt_basedir + '/' + iwheel[0] + '/' + istation[1] + '/' + ssector + '/'
640  if istation[1]=="1":
641  segdiff_xalign(tfiles_plotting, "x_dt1_csc", wheel=int(iwheel[1]), sector=isector, cscstations = "12")
642  c1.SaveAs(pdir + 'segdif_x_dt_csc_resid.png')
643  if istation[1]=="2":
644  segdiff_xalign(tfiles_plotting, "x_dt2_csc", wheel=int(iwheel[1]), sector=isector, cscstations = "1")
645  c1.SaveAs(pdir + 'segdif_x_dt_csc_resid.png')
646 
647  """segdiffvsphi "dt13_resid" and "dt13_slope"
648 
649  plot for a specific wheel #:
650  x vs phi of pair ("dt13_resid")
651  dxdz vs phi of pair ("dt13_slope")
652  contains all three combinations of neighboring stations
653  made for all possible wheel values
654 
655  Interface: could be accessed by clicking on wheel number under the "wheel" column
656  in a general DT map
657 
658  segdiffvsphi "dt2_resid" and "dt2_slope"
659 
660  plot for a specific wheel #:
661  y vs phi of pair ("dt2_resid")
662  dydz vs phi of pair ("dt2_slope")
663  contains both MB1-MB2 and MB2-MB3 combinations
664  made for all possible wheel values
665 
666  Interface: could be accessed by clicking on wheel number under the "wheel" column
667  in a general DT map"""
668 
669  if len(iter_reports)==0: return
670 
671  for iwheel in DT_TYPES:
672  if iwheel[1]=="ALL": continue
673  pdir = dt_basedir + '/' + iwheel[0] + '/'
674  segdiffvsphi(tfiles_plotting, iter_reports, "dt13_resid", int(iwheel[1]), window=10.)#, excludesectors=(1,7))
675  c1.SaveAs(pdir + 'segdifphi_dt13_resid.png')
676  segdiffvsphi(tfiles_plotting, iter_reports, "dt13_slope", int(iwheel[1]), window=10.)#, excludesectors=(1,7))
677  c1.SaveAs(pdir + 'segdifphi_dt13_slope.png')
678  segdiffvsphi(tfiles_plotting, iter_reports, "dt2_resid", int(iwheel[1]), window=10.)#, excludesectors=(1,7))
679  c1.SaveAs(pdir + 'segdifphi_dt2_resid.png')
680  segdiffvsphi(tfiles_plotting, iter_reports, "dt2_slope", int(iwheel[1]), window=15.)#, excludesectors=(1,7))
681  c1.SaveAs(pdir + 'segdifphi_dt2_slope.png')
682 
683  for iwheel in DT_TYPES:
684  if iwheel[1]=="ALL": continue
685  if abs(int(iwheel[1])) != 2: continue
686  pdir = dt_basedir + '/' + iwheel[0] + '/'
687  segdiffvsphi_xalign(tfiles_plotting, int(iwheel[1]), window=10.)
688  c1.SaveAs(pdir + 'segdifphi_x_dt_csc_resid.png')
689 
690 
def segdiffvsphi_xalign(tfiles, wheel, window=10.)
def segdiff_xalign(tfiles, component, args)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def segdiffvsphi(tfiles, reports, component, wheel, window=5., excludesectors=())
def segdiff(tfiles, component, pair, args)
def doSegDiffPlotsDT(dt_basedir, tfiles_plotting, iter_reports)

◆ idsForFile()

def alignmentValidation.idsForFile (   dir_name,
  file_name 
)
Recursively looks for file named file_name under dir_name directory
and fill the list with dir names converted to IDs 

Definition at line 911 of file alignmentValidation.py.

References dirToID().

Referenced by createCanvasToIDList().

911 def idsForFile(dir_name, file_name):
912  '''Recursively looks for file named file_name under dir_name directory
913  and fill the list with dir names converted to IDs
914  '''
915  id_list = []
916  for f in os.listdir(dir_name):
917  dirfile = os.path.join(dir_name, f)
918  if os.path.isfile(dirfile) and f==file_name:
919  if file_name[-4:]=='.php': id_list.append(dir_name+'/'+file_name)
920  else: id_list.append(dirToID(dir_name))
921  # recursively access file names in subdirectories
922  elif os.path.isdir(dirfile):
923  #print "Accessing directory:", dirfile
924  ids = idsForFile(dirfile, file_name)
925  if (len(ids)>0):
926  id_list.extend(ids)
927  return id_list
928 
929 
def idsForFile(dir_name, file_name)

◆ isFileUnderDir()

def alignmentValidation.isFileUnderDir (   dir_name,
  file_name 
)

functions definitions

Recursively looks for file named file_name under dir_name directory

Definition at line 281 of file alignmentValidation.py.

Referenced by createCanvasesList().

281 def isFileUnderDir(dir_name, file_name):
282  '''Recursively looks for file named file_name under dir_name directory
283  '''
284  if not DO_DT and dir_name.find("MB")>-1:
285  return False
286  if not DO_CSC and dir_name.find("ME")>-1:
287  return False
288 
289  for f in os.listdir(dir_name):
290  dirfile = os.path.join(dir_name, f)
291  if os.path.isfile(dirfile) and f==file_name:
292  return True
293  # recursively access file names in subdirectories
294  elif os.path.isdir(dirfile):
295  #print "Accessing directory:", dirfile
296  if isFileUnderDir(dirfile, file_name): return True
297  return False
298 
299 
300 # to time saving of plots
def isFileUnderDir(dir_name, file_name)
functions definitions

◆ saveAs()

def alignmentValidation.saveAs (   nm)

Definition at line 301 of file alignmentValidation.py.

Referenced by doCurvaturePlotsDT(), doFitFunctionsPlotsCSC(), and doFitFunctionsPlotsDT().

301 def saveAs(nm):
302  t1 = time.time()
303  ddt[15] += 1
304  c1.SaveAs(nm)
305  tn = time.time()
306  ddt[16] = 1./ddt[15]*((ddt[15]-1)*ddt[16] + tn-t1)
307 
308 

Variable Documentation

◆ action

alignmentValidation.action

Definition at line 82 of file alignmentValidation.py.

◆ allOptions

string alignmentValidation.allOptions = "-l "+options.runLabel+" -i "+options.inputDir+" --i1 "+options.i1+" --iN "+options.iN

Definition at line 200 of file alignmentValidation.py.

◆ args

alignmentValidation.args

Definition at line 146 of file alignmentValidation.py.

◆ binsdxdz

alignmentValidation.binsdxdz

Definition at line 1040 of file alignmentValidation.py.

◆ binsdydz

alignmentValidation.binsdydz

Definition at line 1040 of file alignmentValidation.py.

◆ binsx

alignmentValidation.binsx

◆ binsy

alignmentValidation.binsy

◆ c1

alignmentValidation.c1 = ROOT.TCanvas("c1","c1",800,600)

do drawing

Definition at line 1025 of file alignmentValidation.py.

Referenced by reco::NamedCompositeCandidate.addDaughter(), reco::CompositeCandidate.addDaughter(), HcalPulseShapes.analyticPulseShapeSiPMHO(), reco::NamedCompositeCandidate.applyRoles(), reco::CompositeCandidate.applyRoles(), trklet::TrackletCalculatorDisplaced.approxtracklet(), CaloGeometryHelper.borderCrossing(), BPHDecayToV0SameMassBuilder.buildCandidate(), BPHDecayToV0DiffMassBuilder.buildCandidate(), TwoBodyDecayModel.cartesianSecondaryMomenta(), condbon.cdbon_write(), HGCalCellUV.cellUVFromXY2(), checkPhiInRange(), NamedCandCombinerBase.combine(), CandCombinerBase< OutputCollection, Cloner::CandPtr >.combine(), HLTDoubletDZ< T1, T2 >.computeDZ(), ConversionEqualByTrack(), ConversionLessByChi2(), PFAlgo.createCandidatesHF(), CTPPSGeometryESModule.CTPPSGeometryESModule(), PFBenchmarkAlgo.deltaEt(), PFBenchmarkAlgo.deltaEta(), PFBenchmarkAlgo.deltaPhi(), PFBenchmarkAlgo.deltaR(), ParabolaFit.det(), HiggsDQM.Distance(), DQMExample_Step1.Distance(), HiggsDQM.DistancePhi(), DQMExample_Step1.DistancePhi(), dqm::impl::MonitorElement.divide(), TwoBodyDecayDerivatives.dqsdm(), TwoBodyDecayDerivatives.dqsdphi(), TwoBodyDecayDerivatives.dqsdpx(), TwoBodyDecayDerivatives.dqsdpy(), TwoBodyDecayDerivatives.dqsdpz(), TwoBodyDecayDerivatives.dqsdtheta(), DTNoiseComputation.endJob(), fastInvertPDM2(), CMTRawAnalyzer.fillDigiAmplitude(), CMTRawAnalyzer.fillDigiAmplitudeHF(), CMTRawAnalyzer.fillDigiAmplitudeHFQIE10(), CMTRawAnalyzer.fillDigiAmplitudeHO(), CMTRawAnalyzer.fillDigiAmplitudeQIE11(), SiStripQualityDQM.fillGrandSummaryMEs(), SiStripHistoPlotter.fillNamedImageBuffer(), SiStripApvGainsDQM.fillSummaryMEs(), SiStripPedestalsDQM.fillSummaryMEs(), SiStripLorentzAngleDQM.fillSummaryMEs(), SiStripQualityDQM.fillSummaryMEs(), SiStripBackPlaneCorrectionDQM.fillSummaryMEs(), SiStripBaseCondObjDQM.fillSummaryMEs(), heppy::Davismt2.find_high(), PFBenchmarkAlgo.findAllInCone(), PFBenchmarkAlgo.findAllInEtWindow(), cscdqm::StripClusterFinder.FindAndMatch(), hitfit::Chisq_Constrainer.fit(), DiMuonMassBiasClient.fitLineShape(), DTLinearFit.fitNpar(), SiStripCablingDQM.getActiveDetIds(), lumi::fPoly.getCorrection(), GridInterpolator3DException.GridInterpolator3DException(), HLTDoubletDZ< T1, T2 >.haveSameSuperCluster(), MonitorElementsDb.htmlOutput(), PFDisplacedVertexHelper.identifyVertex(), CSCWireGeometry.intersection(), CSCLayerGeometry.intersectionOfTwoLines(), PerigeeConversions.jacobianParameters2Cartesian(), cscdqm::StripClusterFinder.KillCluster(), PFDisplacedVertexHelper.lambdaCP(), EvolutionECAL.LightCollectionEfficiency(), EvolutionECAL.LightCollectionEfficiencyWeighted(), GEMStripTopology.localError(), CSCRadialStripTopology.localError(), TkRadialStripTopology.localError(), main(), makeCompositeCandidate(), makeCompositeCandidateWithRefsToMaster(), makeCompositePtrCandidate(), makeNamedCompositeCandidate(), makeNamedCompositeCandidateWithRefsToMaster(), makePlots(), MatcherUsingTracksAlgorithm.match(), FastTrackerRecHitMatcher.match(), SiStripRecHitMatcher.match(), matchByCommonParentSuperClusterRef(), matchByCommonSourceCandidatePtr(), PFBenchmarkAlgo.matchByDeltaEt(), PFBenchmarkAlgo.matchByDeltaR(), reco::modulesNew::Matcher< C1, C2, S, D >.matchDistance(), reco::modules::Matcher< C1, C2, S, D, M >.matchDistance(), GlobalTrackerMuonAlignment.misalignMuon(), GlobalTrackerMuonAlignment.misalignMuonL(), heppy::Davismt2.mt2_bisect(), heppy::Davismt2.nsols(), Clusterizer1DCommons::ComparePairs< T >.operator()(), DistanceToCell.operator()(), OverlapChecker.operator()(), CompareHFCore.operator()(), PseudoBayesGrouping::CandPointGreat.operator()(), SortCandByDecreasingPt.operator()(), deltaRSorter< T, U >.operator()(), deltaEtSorter< T, U >.operator()(), reco.operator==(), HLTDoubletDZ< T1, T2 >.passCutMinDeltaR(), PhiInterval.PhiInterval(), PlotAlignmentValidation.plotOutlierModules(), NamedCandCombinerBase.preselect(), CandCombinerBase< OutputCollection, Cloner::CandPtr >.preselect(), proxim(), CSCTFPtMethods.Pt3Stn(), DTConfigDBProducer.readDTCCBConfig(), RectangularEtaPhiRegion.RectangularEtaPhiRegion(), reco::modulesNew::Matcher< C1, C2, S, D >.select(), reco::modules::Matcher< C1, C2, S, D, M >.select(), reco::PhysObjectMatcher< C1, C2, S, D, Q >.select(), CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >.selectPair(), PFBenchmarkAlgo.sortByDeltaEt(), PFBenchmarkAlgo.sortByDeltaR(), SuperClusterHelper.sortClusters(), heppy::mt2w_bisect::mt2w.teco(), align.toMatrix(), egamma.towersOf(), PFBenchmarkAlgo.vector_add(), VVIObj.VVIObj(), sistripvvi::VVIObj.VVIObj(), VVIObjF.VVIObjF(), CSCWireGeometry.wireEnds(), GlobalTrackerMuonAlignment.writeGlPosRcd(), and ZMassBinFit_OldTool().

◆ CANVASES_LIST_TEMPLATE

list alignmentValidation.CANVASES_LIST_TEMPLATE

Definition at line 224 of file alignmentValidation.py.

◆ comdir

string alignmentValidation.comdir = "common/"

setup output:

Definition at line 1010 of file alignmentValidation.py.

◆ default

alignmentValidation.default

Definition at line 41 of file alignmentValidation.py.

◆ dest

alignmentValidation.dest

Definition at line 42 of file alignmentValidation.py.

◆ DO_CSC

bool alignmentValidation.DO_CSC = False

Definition at line 169 of file alignmentValidation.py.

◆ DO_CURVATURE

bool alignmentValidation.DO_CURVATURE = False

Definition at line 184 of file alignmentValidation.py.

◆ DO_DIAGNOSTIC

alignmentValidation.DO_DIAGNOSTIC = options.diagnostic

Definition at line 198 of file alignmentValidation.py.

◆ DO_DT

bool alignmentValidation.DO_DT = False

Definition at line 168 of file alignmentValidation.py.

◆ DO_FIT

bool alignmentValidation.DO_FIT = False

Definition at line 185 of file alignmentValidation.py.

◆ DO_MAP

bool alignmentValidation.DO_MAP = False

Definition at line 182 of file alignmentValidation.py.

◆ DO_MEDIAN

bool alignmentValidation.DO_MEDIAN = False

Definition at line 186 of file alignmentValidation.py.

◆ DO_SEGDIFF

bool alignmentValidation.DO_SEGDIFF = False

Definition at line 183 of file alignmentValidation.py.

◆ fname

string alignmentValidation.fname = options.inputDir+'/'+options.i1+'/'+i1prefix

main script

Definition at line 959 of file alignmentValidation.py.

Referenced by L1TMuonGlobalParams.absIsoCheckMemLUTPath(), L1TMuonGlobalParamsHelper.absIsoCheckMemLUTPath(), HcalTBWriter.analyze(), EcalSRCondTools.analyze(), SiStripCondVisualizer.beginRun(), L1TMuonGlobalParams.bEtaExtrapolationLUTPath(), L1TMuonGlobalParamsHelper.bEtaExtrapolationLUTPath(), L1TMuonGlobalParams.bONegMatchQualLUTPath(), L1TMuonGlobalParamsHelper.bONegMatchQualLUTPath(), SiStripCondVisualizer.bookModuleHistograms(), L1TMuonGlobalParams.bOPosMatchQualLUTPath(), L1TMuonGlobalParamsHelper.bOPosMatchQualLUTPath(), L1TMuonGlobalParams.bPhiExtrapolationLUTPath(), L1TMuonGlobalParamsHelper.bPhiExtrapolationLUTPath(), clangcms::EDMPluginDumper.checkASTDecl(), FileBlob.computeFileSize(), dd_to_html(), GeometryInfoDump.dumpInfo(), DDLSAX2Handler.dumpStats(), ExternalLHEAsciiDumper.endRun(), TSGForOIDNN.evaluateClassifier(), TSGForOIDNN.evaluateRegressor(), L1TMuonGlobalParams.fEtaExtrapolationLUTPath(), L1TMuonGlobalParamsHelper.fEtaExtrapolationLUTPath(), FileBlob.FileBlob(), trklet::TrackDerTable.fillTable(), L1TMuonGlobalParams.fONegMatchQualLUTPath(), L1TMuonGlobalParamsHelper.fONegMatchQualLUTPath(), L1TMuonGlobalParams.fOPosMatchQualLUTPath(), L1TMuonGlobalParamsHelper.fOPosMatchQualLUTPath(), L1TMuonGlobalParams.fPhiExtrapolationLUTPath(), L1TMuonGlobalParamsHelper.fPhiExtrapolationLUTPath(), L1TMuonGlobalParams.fwdNegSingleMatchQualLUTPath(), L1TMuonGlobalParamsHelper.fwdNegSingleMatchQualLUTPath(), L1TMuonGlobalParams.fwdPosSingleMatchQualLUTPath(), L1TMuonGlobalParamsHelper.fwdPosSingleMatchQualLUTPath(), getCompressedBuffer(), MatacqProducer.getMatacqFile(), DDLParser.getNameSpace(), popcon::EcalTPGFineGrainStripfromFile.getNewObjects(), popcon::EcalTPGFineGrainTowerfromFile.getNewObjects(), popcon::EcalSRPHandler.getNewObjects(), popcon::EcalTPGSpikeThresholdfromFile.getNewObjects(), popcon::EcalLaser_weekly_Linearization.getNewObjects(), popcon::EcalLaser_weekly_Linearization_Check.getNewObjects(), popcon::EcalTPGPhysicsConstfromFile.getNewObjects(), popcon::EcalTPGLinPed.getNewObjects(), popcon::EcalTPGPedfromFile.getNewObjects(), popcon::EcalLaser_weekly_Handler.getNewObjects(), TrackingUtility.goToDir(), SiStripUtility.goToDir(), L1TMuonGlobalParams.idxSelMemEtaLUTPath(), L1TMuonGlobalParamsHelper.idxSelMemEtaLUTPath(), L1TMuonGlobalParams.idxSelMemPhiLUTPath(), L1TMuonGlobalParamsHelper.idxSelMemPhiLUTPath(), L1PrefiringWeightProducer.L1PrefiringWeightProducer(), PreparePVTrends.list_files(), load_dddefinition(), mkfit::ConfigJson.load_File(), main(), L1MuGMTLUT.MakeSubClass(), l1t::MicroGMTAbsoluteIsolationCheckLUT.MicroGMTAbsoluteIsolationCheckLUT(), l1t::MicroGMTCaloIndexSelectionLUT.MicroGMTCaloIndexSelectionLUT(), l1t::MicroGMTExtrapolationLUT.MicroGMTExtrapolationLUT(), l1t::MicroGMTMatchQualFineLUT.MicroGMTMatchQualFineLUT(), l1t::MicroGMTMatchQualSimpleLUT.MicroGMTMatchQualSimpleLUT(), l1t::MicroGMTRankPtQualLUT.MicroGMTRankPtQualLUT(), l1t::MicroGMTRelativeIsolationCheckLUT.MicroGMTRelativeIsolationCheckLUT(), L1TMuonGlobalParams.oEtaExtrapolationLUTPath(), L1TMuonGlobalParamsHelper.oEtaExtrapolationLUTPath(), trklet::Globals.ofstream(), HcalLuttoDB.openChecksums(), trklet::MemoryBase.openFile(), trklet.openfile(), edm.openFileHdl(), HcalLuttoDB.openPerCrate(), HcalLuttoDB.openPerLut1(), HcalLuttoDB.openPerLut2(), mkfit::DataFile.openRead(), mkfit::DataFile.openWrite(), L1TMuonGlobalParams.oPhiExtrapolationLUTPath(), L1TMuonGlobalParamsHelper.oPhiExtrapolationLUTPath(), L1TMuonGlobalParams.ovlNegSingleMatchQualLUTPath(), L1TMuonGlobalParamsHelper.ovlNegSingleMatchQualLUTPath(), L1TMuonGlobalParams.ovlPosSingleMatchQualLUTPath(), L1TMuonGlobalParamsHelper.ovlPosSingleMatchQualLUTPath(), parse_jet_member_function(), parse_peak_member_function(), DDLParser.parseFile(), mkfit::ConfigJson.patch_Files(), mkfit::ConfigJson.patchLoad_File(), MODCCSHFDat.populateClob(), IODConfig.populateClob(), L1TTwinMuxRawToDigi.processFed(), RPCTriggerConfig.produce(), LRHelpFunctions.purityPlot(), FileBlob.read(), mkfit::TrackerInfo.read_bin_file(), MuonResiduals6DOFrphiFitter.readNtuple(), MuonResiduals5DOFFitter.readNtuple(), MuonResiduals6DOFFitter.readNtuple(), L1TMuonGlobalParams.relIsoCheckMemLUTPath(), L1TMuonGlobalParamsHelper.relIsoCheckMemLUTPath(), mkfit::ConfigJson.save_Iterations(), trklet::TrackletConfigBuilder.setDTCphirange(), ODLTCConfig.setParameters(), ODTTCFConfig.setParameters(), ODTTCciConfig.setParameters(), ODDCCConfig.setParameters(), ODSRPConfig.setParameters(), ODLaserConfig.setParameters(), CmsShowMain.setupDataHandling(), LRHelpFunctions.singlePlot(), L1TMuonGlobalParams.sortRankLUTPath(), L1TMuonGlobalParamsHelper.sortRankLUTPath(), LRHelpFunctions.storeControlPlots(), LRHelpFunctions.storeToROOTfile(), FileBlob.write(), mkfit::TrackerInfo.write_bin_file(), trklet::AllProjectionsMemory.writeAP(), trklet::CandidateMatchMemory.writeCM(), trklet::CleanTrackMemory.writeCT(), MODCCSHFDat.writeDB(), trklet::FullMatchMemory.writeMC(), trklet::StubPairsMemory.writeSP(), trklet::StubTripletsMemory.writeST(), trklet::VMStubsMEMemory.writeStubs(), trklet::TrackFitMemory.writeTF(), trklet::TrackletParametersMemory.writeTPAR(), trklet::TrackletProjectionsMemory.writeTPROJ(), and trklet::VMProjectionsMemory.writeVMPROJ().

◆ help

alignmentValidation.help

Definition at line 39 of file alignmentValidation.py.

◆ i1prefix

alignmentValidation.i1prefix = options.i1prefix

Definition at line 157 of file alignmentValidation.py.

◆ iNprefix

alignmentValidation.iNprefix = options.iNprefix

Definition at line 160 of file alignmentValidation.py.

◆ iter1_reports

alignmentValidation.iter1_reports = []

Definition at line 962 of file alignmentValidation.py.

◆ iter1_tfile

alignmentValidation.iter1_tfile = None

Definition at line 961 of file alignmentValidation.py.

◆ iteration1

string alignmentValidation.iteration1 = "iter1"

Definition at line 1011 of file alignmentValidation.py.

◆ iterationN

string alignmentValidation.iterationN = "iterN"

Definition at line 1012 of file alignmentValidation.py.

◆ iterN_reports

alignmentValidation.iterN_reports = []

Definition at line 983 of file alignmentValidation.py.

◆ iterN_tfile

alignmentValidation.iterN_tfile = None

Definition at line 982 of file alignmentValidation.py.

◆ options

alignmentValidation.options

Definition at line 146 of file alignmentValidation.py.

◆ outdir

alignmentValidation.outdir = options.outputDir

Definition at line 154 of file alignmentValidation.py.

Referenced by main().

◆ parser

alignmentValidation.parser = optparse.OptionParser(usage)

Definition at line 36 of file alignmentValidation.py.

◆ pic_ids

def alignmentValidation.pic_ids = createCanvasToIDList("canvas2id_list.js")

Definition at line 1047 of file alignmentValidation.py.

◆ QUICKTESTN

int alignmentValidation.QUICKTESTN = 10000

Definition at line 217 of file alignmentValidation.py.

◆ SINGLE_ITERATION

alignmentValidation.SINGLE_ITERATION = False

Definition at line 179 of file alignmentValidation.py.

◆ tfiles1_plotting

list alignmentValidation.tfiles1_plotting = []

Definition at line 960 of file alignmentValidation.py.

◆ tfilesN_plotting

list alignmentValidation.tfilesN_plotting = []

Definition at line 981 of file alignmentValidation.py.

◆ type

alignmentValidation.type

Definition at line 40 of file alignmentValidation.py.

◆ usage

string alignmentValidation.usage = '%prog [options]\n'+\

To parse commandline args.

Definition at line 19 of file alignmentValidation.py.

◆ windowdxdz

alignmentValidation.windowdxdz

Definition at line 1040 of file alignmentValidation.py.

◆ windowdydz

alignmentValidation.windowdydz

Definition at line 1040 of file alignmentValidation.py.

◆ windowx

alignmentValidation.windowx

Definition at line 1040 of file alignmentValidation.py.

◆ windowy

alignmentValidation.windowy

Definition at line 1040 of file alignmentValidation.py.