CMS 3D CMS Logo

Functions
allPlotsResiduals Namespace Reference

Functions

def main ()
 
def runt0 (name, filename, run)
 
def runttrig (name, filename, path, run)
 
def runvdrift (name, run, filename)
 

Function Documentation

def allPlotsResiduals.main ( )

Definition at line 8 of file allPlotsResiduals.py.

References edm.print(), runt0(), runttrig(), and runvdrift().

8 def main():
9  parser = optparse.OptionParser()
10  (options, args) = parser.parse_args()
11  ROOT.gROOT.SetBatch(True)
12  for filename in args:
13  if "vDrift_segment_" in filename:
14  #name="DQM"
15  m=re.search("vDrift_segment_(\d*)",filename)
16  run=m.group(1)
17 
18  #path="DQMData/Run "+run+"/DT/Run summary/DTCalibValidation"
19 
20  f = open('dtVDriftAnalyzer_cfg.py','w')
21  print("from CalibMuon.DTCalibration.Workflow.addPoolDBESSource import addPoolDBESSource", file=f)
22  print("from CalibMuon.DTCalibration.dtVDriftAnalyzer_cfg import process", file=f)
23  print("addPoolDBESSource(process = process, moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift', connect = 'sqlite_file:"+filename+"')", file=f)
24  print("process.dtVDriftAnalyzer.rootFileName = 'dtVDriftAnalyzer_dtVDriftCalibration"+run+".root'", file=f)
25  f.close()
26  os.system("cmsRun dtVDriftAnalyzer_cfg.py")
27  name="vdrift"
28  runvdrift(name, run, "dtVDriftAnalyzer_dtVDriftCalibration"+run+".root")
29 
30  if "vDrift_meantimer_" in filename:
31  #name="DQM"
32  m=re.search("vDrift_meantimer_(\d*)",filename)
33  run=m.group(1)
34 
35  #path="DQMData/Run "+run+"/DT/Run summary/DTCalibValidation"
36 
37  f = open('dtVDriftAnalyzer_cfg.py','w')
38  print("from CalibMuon.DTCalibration.Workflow.addPoolDBESSource import addPoolDBESSource", file=f)
39  print("from CalibMuon.DTCalibration.dtVDriftAnalyzer_cfg import process", file=f)
40  print("addPoolDBESSource(process = process, moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift', connect = 'sqlite_file:"+filename+"')", file=f)
41  print("process.dtVDriftAnalyzer.rootFileName = 'dtVDriftAnalyzer_dtVDriftCalibration"+run+".root'", file=f)
42  f.close()
43  os.system("cmsRun dtVDriftAnalyzer_cfg.py")
44  name="vdrift"
45  runvdrift(name, run, "dtVDriftAnalyzer_dtVDriftCalibration"+run+".root")
46 
47  elif "DQM" in filename:
48  name="DQM"
49  m=re.search("R000(\d*)__",filename)
50  run=m.group(1)
51  path="DQMData/Run "+run+"/DT/Run summary/DTCalibValidation"
52  runttrig(name, filename, path, run)
53  elif "TestPulses" in filename:
54  name="T0"
55  runt0(name,filename,123456)
56  else:
57  name="DTRV"
58  m=re.search("DTResidualValidation_(\d*)\.root",filename)
59  run=m.group(1)
60  path="DTResiduals"
61  runttrig(name, filename, path, run)
62 
def runvdrift(name, run, filename)
def runt0(name, filename, run)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def runttrig(name, filename, path, run)
def allPlotsResiduals.runt0 (   name,
  filename,
  run 
)

Definition at line 81 of file allPlotsResiduals.py.

References plotFactory.plot, and str.

Referenced by main().

81 def runt0(name,filename,run):
82  from CalibMuon.DTCalibration.PlottingTools.plotT0FromHistos import *
83  for SL in [1,2,3]:
84  mean = plot(filename, SL ,run)
85  mean[0].Print(name+run+"-SL"+str(SL)+"-mean.pdf")
86  mean[0].SaveAs(name+run+"-SL"+str(SL)+"-mean.root")
87 
def runt0(name, filename, run)
#define str(s)
def allPlotsResiduals.runttrig (   name,
  filename,
  path,
  run 
)

Definition at line 63 of file allPlotsResiduals.py.

References plotFactory.plot, and str.

Referenced by main().

63 def runttrig(name, filename, path, run):
64  from CalibMuon.DTCalibration.PlottingTools.plotResiduals import *
65  for SL in [1,2,3]:
66  mean,sigma = plot(filename, SL,dir=path)
67  mean[0].Print(name+run+"-SL"+str(SL)+"-mean.pdf")
68  mean[0].SaveAs(name+run+"-SL"+str(SL)+"-mean.root")
69  sigma[0].Print(name+run+"-SL"+str(SL)+"-sigma.pdf")
70  sigma[0].SaveAs(name+run+"-SL"+str(SL)+"-sigma.root")
def runttrig(name, filename, path, run)
#define str(s)
def allPlotsResiduals.runvdrift (   name,
  run,
  filename 
)

Definition at line 71 of file allPlotsResiduals.py.

References plotFactory.plot, and str.

Referenced by main().

71 def runvdrift(name, run, filename):
72  from CalibMuon.DTCalibration.PlottingTools.plotVDriftFromHistos import *
73  for SL in [1,2,3]:
74  mean = plot(filename, SL)
75  mean[0].Print(name+run+"-SL"+str(SL)+"-mean.pdf")
76  mean[0].SaveAs(name+run+"-SL"+str(SL)+"-mean.root")
77  #sigma[0].Print(name+run+"-SL"+str(SL)+"-sigma.pdf")
78 
79  #plot("DTResidualValidation_210614.root", 1,dir="DTResiduals")
80  #plot("DQM_V0001_R000210634__StreamExpress__HIRun2013-DtCalib-Express-v1-dtTtrigCalibrationFromResiduals-NEW-usedb-rev1__ALCARECO.root", 1,dir="DQMData/Run 210634/DT/Run summary/DTCalibValidation")
def runvdrift(name, run, filename)
#define str(s)