Warning, /Validation/DTRecHits/test/produceWWWDoc.r is written in an unsupported language. File is not indexed.
0001
0002
0003 /*
0004 * Produce plots for documentation of DT performance on the web.
0005 * The root files are opened and gif pictures are produced and placed
0006 * in the directory specified by the user.
0007 * The results are directly browserable at the address:
0008 * http://cmsdoc.cern.ch/cms/Physics/muon/CMSSW/Performance/DT/DTLocalRecoQualityTest/
0009 *
0010 * Intructions to run the macro:
0011 * root
0012 * .x produceWWWDoc.r
0013 *
0014 * NOTE: The user must have right access on afs dir:
0015 * /afs/cern.ch/cms/Physics/muon/CMSSW/Performance/DT/DTLocalRecoQualityTest
0016 *
0017 *
0018 * Author G. Cerminara - INFN Torino
0019 *
0020 */
0021
0022
0023
0024
0025 {
0026 TString dirBase = "/afs/cern.ch/cms/Physics/muon/CMSSW/Performance/DT/DTLocalRecoQualityTest/";
0027 // Ask for the directory name (only the last part, es: CMSSW_1_2_0)
0028 TString nameDir;
0029 cout << "Set the name of the www directory: " << endl;
0030 cin >> nameDir;
0031
0032 // Load 1D RecHits histos
0033 TFile *file = new TFile("DQM_V0001_R000000001__Cosmics__CMSSW_2_2_X-Testing__RECO.root");
0034 gROOT->LoadMacro("plotHitReso.r");
0035 gROOT->LoadMacro("plotHitPull.r");
0036
0037 if(file->IsOpen()) {
0038 // plot residuals
0039 plotWWWHitReso(dirBase, 1, nameDir);
0040 // Close all open canvases
0041 TIter iter(gROOT->GetListOfCanvases());
0042 TCanvas *c;
0043 while( (c = (TCanvas *)iter()) ) {
0044 cout << "Closing " << c->GetName() << endl;
0045 c->Close();
0046 }
0047
0048 // plot pulls
0049 cout<<"entro en pull"<<endl;
0050 plotWWWHitPull(dirBase, 1, nameDir);
0051 // Close all open canvases
0052 TIter iter(gROOT->GetListOfCanvases());
0053 TCanvas *c;
0054 while( (c = (TCanvas *)iter()) ) {
0055 cout << "Closing " << c->GetName() << endl;
0056 c->Close();
0057 }
0058 // file1->Close();
0059 }
0060
0061
0062 /*
0063 // Load 2D Segments histos
0064 //TFile *file2 = new TFile("DTSeg2DQualityPlots.root");
0065 if(file2->IsOpen()) {
0066 plotWWWHitReso(dirBase, 2, nameDir);
0067 // Close all open canvases
0068 TIter iter(gROOT->GetListOfCanvases());
0069 TCanvas *c;
0070 while( (c = (TCanvas *)iter()) ) {
0071 cout << "Closing " << c->GetName() << endl;
0072 c->Close();
0073 }
0074
0075
0076 // plot pulls
0077 plotWWWHitPull(dirBase, 2, nameDir);
0078 // Close all open canvases
0079 TIter iter(gROOT->GetListOfCanvases());
0080 TCanvas *c;
0081 while( (c = (TCanvas *)iter()) ) {
0082 cout << "Closing " << c->GetName() << endl;
0083 c->Close();
0084 }
0085
0086
0087 file2->Close();
0088 }
0089 */
0090
0091 // Load 2D SuperPhi Segments histos
0092 //TFile *file3 = new TFile("DTSeg2DSLPhiQualityPlots.root");
0093 if(file->IsOpen()) {
0094 plotWWWHitReso(dirBase, 3, nameDir);
0095 // Close all open canvases
0096 TIter iter(gROOT->GetListOfCanvases());
0097 TCanvas *c;
0098 while( (c = (TCanvas *)iter()) ) {
0099 cout << "Closing " << c->GetName() << endl;
0100 c->Close();
0101 }
0102
0103
0104 // plot pulls
0105 plotWWWHitPull(dirBase, 3, nameDir);
0106 // Close all open canvases
0107 TIter iter(gROOT->GetListOfCanvases());
0108 TCanvas *c;
0109 while( (c = (TCanvas *)iter()) ) {
0110 cout << "Closing " << c->GetName() << endl;
0111 c->Close();
0112 }
0113
0114
0115 //file3->Close();
0116 }
0117
0118
0119 // Load 4D Segments histos
0120 //TFile *file4 = new TFile("DTSeg4DQualityPlots.root");
0121 if(file->IsOpen()) {
0122 plotWWWHitReso(dirBase, 4, nameDir);
0123 // Close all open canvases
0124 TIter iter(gROOT->GetListOfCanvases());
0125 TCanvas *c;
0126 while( (c = (TCanvas *)iter()) ) {
0127 cout << "Closing " << c->GetName() << endl;
0128 c->Close();
0129 }
0130
0131 // plot pulls
0132 plotWWWHitPull(dirBase, 4, nameDir);
0133 // Close all open canvases
0134 TIter iter(gROOT->GetListOfCanvases());
0135 TCanvas *c;
0136 while( (c = (TCanvas *)iter()) ) {
0137 cout << "Closing " << c->GetName() << endl;
0138 c->Close();
0139 }
0140
0141
0142
0143 file->Close();
0144 }
0145 }