From 0b40de0f8d3ed59ce8ad3a580ece26b430e61494 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 31 Jan 2023 07:56:08 +0100 Subject: [PATCH] CorrPlotsforCMTforRun3 --- DPGAnalysis/HcalTools/README | 6 +- .../macros/cmt/RemoteMonitoringGLOBAL.cc | 31 +- .../macros/cmt/RemoteMonitoringMAP_Global.cc | 911 +++++++++++++++-- .../HcalTools/macros/cmt/zadcampltest.cc | 2 +- .../HcalTools/macros/cmt/zamplpedcorr.cc | 711 +++++++++++++ .../macros/cmt/zcorrtsnvsampltest.cc | 787 ++++++++++++++ .../HcalTools/macros/cmt/zlumiadcampltest.cc | 6 +- DPGAnalysis/HcalTools/macros/cmt/ztsmean.cc | 961 ++++++++++++++++++ .../macros/rmt/RemoteMonitoringMAP.cc | 5 +- .../HcalTools/plugins/CMTRawAnalyzer.cc | 69 +- .../remoteMonitoring_LASER_era2021_cfg.py | 590 +++++++++++ ...emoteMonitoring_MIXED_LASER_era2021_cfg.py | 590 +++++++++++ .../remoteMonitoring_MIXED_LED_era2021_cfg.py | 592 +++++++++++ ...teMonitoring_MIXED_PEDESTAL_era2021_cfg.py | 592 +++++++++++ .../remoteMonitoring_PEDESTAL_era2021_cfg.py | 592 +++++++++++ DPGAnalysis/HcalTools/scripts/cmt/a.py.end | 13 +- DPGAnalysis/HcalTools/scripts/cmt/condor.jdl | 3 +- .../HcalTools/scripts/cmt/file_lists.csh | 30 +- .../HcalTools/scripts/cmt/index_zhokin.sh | 17 +- .../scripts/cmt/index_zhokinHcalNZS.sh | 227 +++++ .../scripts/cmt/index_zhokinZeroBias.sh | 227 +++++ .../HcalTools/scripts/cmt/mkcfg_new120.csh | 2 + .../HcalTools/scripts/cmt/run_condor.csh | 14 +- .../rmt/HcalRemoteMonitoringNewNewCombine.csh | 187 ++++ .../scripts/rmt/batch_condor_combine.csh | 72 ++ DPGAnalysis/HcalTools/scripts/rmt/mysort.py | 16 + .../HcalTools/scripts/rmt/mysortled.py | 16 + .../scripts/rmt/parce_newsql_aleko.csh | 51 +- .../scripts/rmt/update_rdmpage_new.csh | 18 +- 29 files changed, 7171 insertions(+), 167 deletions(-) create mode 100644 DPGAnalysis/HcalTools/macros/cmt/zamplpedcorr.cc create mode 100644 DPGAnalysis/HcalTools/macros/cmt/zcorrtsnvsampltest.cc create mode 100644 DPGAnalysis/HcalTools/macros/cmt/ztsmean.cc create mode 100644 DPGAnalysis/HcalTools/python/remoteMonitoring_LASER_era2021_cfg.py create mode 100644 DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_LASER_era2021_cfg.py create mode 100644 DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_LED_era2021_cfg.py create mode 100644 DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_PEDESTAL_era2021_cfg.py create mode 100644 DPGAnalysis/HcalTools/python/remoteMonitoring_PEDESTAL_era2021_cfg.py create mode 100755 DPGAnalysis/HcalTools/scripts/cmt/index_zhokinHcalNZS.sh create mode 100755 DPGAnalysis/HcalTools/scripts/cmt/index_zhokinZeroBias.sh create mode 100755 DPGAnalysis/HcalTools/scripts/rmt/HcalRemoteMonitoringNewNewCombine.csh create mode 100755 DPGAnalysis/HcalTools/scripts/rmt/batch_condor_combine.csh create mode 100644 DPGAnalysis/HcalTools/scripts/rmt/mysort.py create mode 100644 DPGAnalysis/HcalTools/scripts/rmt/mysortled.py diff --git a/DPGAnalysis/HcalTools/README b/DPGAnalysis/HcalTools/README index 6d14f8c074e39..1dd3329635f74 100644 --- a/DPGAnalysis/HcalTools/README +++ b/DPGAnalysis/HcalTools/README @@ -1,3 +1,7 @@ use -setenv SCRAM_ARCH slc7_amd64_gcc900 +##setenv SCRAM_ARCH slc7_amd64_gcc900 + +setenv SCRAM_ARCH ec8_amd64_gcc11 +cmsenv +voms-proxy-init -voms cms -rfc diff --git a/DPGAnalysis/HcalTools/macros/cmt/RemoteMonitoringGLOBAL.cc b/DPGAnalysis/HcalTools/macros/cmt/RemoteMonitoringGLOBAL.cc index e222626509a17..ee73a2dd80743 100644 --- a/DPGAnalysis/HcalTools/macros/cmt/RemoteMonitoringGLOBAL.cc +++ b/DPGAnalysis/HcalTools/macros/cmt/RemoteMonitoringGLOBAL.cc @@ -3500,16 +3500,29 @@ int main(int argc, char *argv[]) { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RBX study: //////////////////////////////////////////////////////////////////////////////////////////////////////// RBX study: //////////////////////////////////////////////////////////////////////////////////// RBX study: + int MaxLum000000 = 0; + MaxLum000000 = MaxLum; cout << " RBX analysis START for **************************" << endl; cout << ">>>>>>>>>>>>>>>>>>>>>>>> " << endl; // int njeta = 22; int njphi = 18; int lsmax=2600; int njeta = 22; int njphi = 18; - int lsmax = 1800; - cout << ">>>>>>>>>>>>>>>>>>>>>>>> int njeta = 22; int njphi = 18; int lsmax=1800; " - << endl; + int lsmax0 = 1850; + cout << ">>>>>>>>>>>>>>>>>>>>>>>> int njeta = 22; int njphi = 18; int lsmax0=1850; MaxLum = " << MaxLum << endl; + cout << ">>>>>>>>>>>>>>>>>>>>>>>> " << endl; + + if (MaxLum > lsmax0) { + MaxLum = lsmax0; + cout << ">>>>>>>>>>>>>>>>>>>>>>>> " << endl; + cout << "*********************************** EXCEEDED limit for MaxLum, it's bigger lsmax0. So we do limit " + "MaxLum = lsmax0 " + << endl; + cout << ">>>>>>>>>>>>>>>>>>>>>>>> " << endl; + } + int lsmax = MaxLum; + //if (lsmax > 1800) lsmax = 1800; double alexall[njeta][njphi][lsmax]; // for phi tables(!): @@ -3524,12 +3537,13 @@ int main(int argc, char *argv[]) { double blexho[njeta][lsmax]; double blexhf[njeta][lsmax]; - cout << ">>>>>>>>>>>>>>>>>>>>>>>> alexall [njeta][njphi][lsmax]; " << endl; + cout << ">>>>>>>>>>>>>>>>>>>>>>>> For massive:alexall AND for eta and phi tables:::: " << endl; + cout << ">>>>>>>>>>>>>>>>>>>>>>>> alex... [njeta][njphi][lsmax]; lsmax = MaxLum; " << endl; + cout << ">>>>>>>>>>>>>>>>>>>>>>>> alex... BUT, Max of lsmax = 1800 " << endl; + cout << ">>>>>>>>>>>>>>>>>>>>>>>> " << endl; int maxbinsRBX = MaxLum; int nx = maxbinsRBX; // # LS cout << ">>>>>>>>>>>>>>>>>>>>>>>> maxbinsRBX = MaxLum; " << endl; - if (MaxLum > lsmax) - cout << "*********************************** ERROR ERROR ERROR ERROR: MaxLum > 1800 " << endl; cout << ">>>>>>>>>>>>>>>>>>>>>>>> " << endl; for (int i = 0; i < nx; i++) { @@ -7516,7 +7530,8 @@ HF: j = 0,1,2, 3 18,19,20,21 htmlFile << "" << std::endl; ind = 0; - for (int i = 1; i <= MaxLum; i++) { + // for (int i = 1; i <= MaxLum; i++) { + for (int i = 1; i <= MaxLum000000; i++) { if ((ind % 2) == 1) raw_class = ""; else @@ -8613,7 +8628,7 @@ HF: j = 0,1,2, 3 18,19,20,21 htmlFile << "
" << std::endl; // htmlFile << "

1. General information

"<< std::endl; - htmlFile << "

1. General information (Full number of LS = " << MaxLum << " ).

" << std::endl; + htmlFile << "

1. General information (Full number of LS = " << MaxLum000000 << " ).

" << std::endl; htmlFile << " " << std::endl; htmlFile << "
" << std::endl; diff --git a/DPGAnalysis/HcalTools/macros/cmt/RemoteMonitoringMAP_Global.cc b/DPGAnalysis/HcalTools/macros/cmt/RemoteMonitoringMAP_Global.cc index 9513cf2af883c..2e65c48237fba 100644 --- a/DPGAnalysis/HcalTools/macros/cmt/RemoteMonitoringMAP_Global.cc +++ b/DPGAnalysis/HcalTools/macros/cmt/RemoteMonitoringMAP_Global.cc @@ -24,6 +24,20 @@ #include "TLine.h" #include "TGraph.h" #include +//##### + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//##### +#include // // https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT @@ -39,6 +53,40 @@ int main(int argc, char *argv[]) { gStyle->SetOptStat(0); gStyle->SetOptTitle(1); + gStyle->SetStatX(0.91); + gStyle->SetStatY(0.75); + gStyle->SetStatW(0.20); + gStyle->SetStatH(0.10); + // gStyle->SetStatH(0.35); + // + + // Float_t LeftOffset = 0.12; + //Float_t TopOffset = 0.12; + Float_t LeftOffset = 0.12; + Float_t TopOffset = 0.22; + + gStyle->SetLineWidth(1); + gStyle->SetErrorX(0); + + //---=[ Titles,Labels ]=----------- + gStyle->SetOptTitle(0); // title on/off + // gStyle->SetTitleColor(0); // title color + gStyle->SetTitleColor(1); // title color + // gStyle->SetTitleX(0.35); // title x-position + gStyle->SetTitleX(0.15); // title x-position + gStyle->SetTitleH(0.15); // title height + // gStyle->SetTitleW(0.53); // title width + gStyle->SetTitleW(0.60); // title width + gStyle->SetTitleFont(42); // title font + gStyle->SetTitleFontSize(0.07); // title font size + + gStyle->SetPalette(1); + //---=[ Pad style ]=---------------- + gStyle->SetPadTopMargin(TopOffset); + gStyle->SetPadBottomMargin(LeftOffset); + gStyle->SetPadRightMargin(TopOffset); + gStyle->SetPadLeftMargin(LeftOffset); + if (argc < 2) return 1; char fname[300]; @@ -112,6 +160,7 @@ int main(int argc, char *argv[]) { TCanvas *cHE = new TCanvas("cHE", "cHE", 1500, 1500); // TCanvas *cONE = new TCanvas("cONE","cONE",500,500); TCanvas *cONE = new TCanvas("cONE", "cONE", 1500, 500); + TCanvas *cHO = new TCanvas("cHO", "cHO", 500, 500); TCanvas *cPED = new TCanvas("cPED", "cPED", 1000, 500); //TCanvas *cHF = new TCanvas("cHF","cHF",1000,1000); TCanvas *cHF = new TCanvas("cHF", "cHF", 1000, 1000); @@ -141,8 +190,8 @@ int main(int argc, char *argv[]) { //int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet int k_max[5] = {0, 4, 7, 4, 4}; // maximum depth for each subdet - TH2F *Map_Ampl[33][5][ALLDEPTH]; // 2D histogramm for test,subdet,depth - TH2F *Map_SUBGOOD[5][ALLDEPTH]; // 2d histogramm for subdet, depth + TH2F *Map_Ampl[33][5][ALLDEPTH]; // 2D histogramm for test,subdet,depth + //AZ2023 TH2F *Map_SUBGOOD[5][ALLDEPTH]; // 2d histogramm for subdet, depth TH2F *Map_SUB[5][ALLDEPTH]; // 2d histogramm for subdet, depth TH1F *HistAmplDepth[22][5][ALLDEPTH]; // 1d histogramm for test,subdet, depth TH1F *HistAmpl[22][5]; // 1d histogramm for test,subdet @@ -176,7 +225,8 @@ int main(int argc, char *argv[]) { Map_SUB[4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2_HF"); Map_SUB[4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3_HF"); Map_SUB[4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4_HF"); - + //AZ2023: + /* Map_SUBGOOD[1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1_HB"); Map_SUBGOOD[1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2_HB"); Map_SUBGOOD[1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3_HB"); @@ -193,7 +243,7 @@ int main(int argc, char *argv[]) { Map_SUBGOOD[4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2_HF"); Map_SUBGOOD[4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3_HF"); Map_SUBGOOD[4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4_HF"); - +*/ //+++++++++++++++++++++++++++++ //Test 0 Entries //+++++++++++++++++++++++++++++ @@ -693,22 +743,34 @@ int main(int argc, char *argv[]) { if (test == 2 && sub == 2) { cONE->cd(2); TH1F *kjkjkhj2 = (TH1F *)dir->FindObjectAny("h_AmplitudeHEtest1"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); kjkjkhj2->Draw(""); - kjkjkhj2->SetTitle("HE, All Depth: shunt1"); + kjkjkhj2->SetXTitle("HE, All Depth: shunt1"); cONE->cd(3); TH1F *kjkjkhj3 = (TH1F *)dir->FindObjectAny("h_AmplitudeHEtest6"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); kjkjkhj3->Draw(""); - kjkjkhj3->SetTitle("HE, All Depth: shunt6"); + kjkjkhj3->SetXTitle("HE, All Depth: shunt6"); } if (test == 2 && sub == 1) { cONE->cd(2); TH1F *kjkjkhb2 = (TH1F *)dir->FindObjectAny("h_AmplitudeHBtest1"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); kjkjkhb2->Draw(""); - kjkjkhb2->SetTitle("HB, All Depth: shunt1"); + kjkjkhb2->SetXTitle("HB, All Depth: shunt1"); cONE->cd(3); TH1F *kjkjkhb3 = (TH1F *)dir->FindObjectAny("h_AmplitudeHBtest6"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); kjkjkhb3->Draw(""); - kjkjkhb3->SetTitle("HB, All Depth: shunt6"); + kjkjkhb3->SetXTitle("HB, All Depth: shunt6"); } cONE->cd(1); @@ -1377,7 +1439,7 @@ int main(int argc, char *argv[]) { //====================================================================== - std::cout << " We are here to print general 2D MAP " << std::endl; + //AZ2023: std::cout << " We are here to print general 2D MAP " << std::endl; //====================================================================== @@ -1391,11 +1453,14 @@ int main(int argc, char *argv[]) { //k-Depth // TH2F *Map_ALL = new TH2F("Map_All", "Map_all", 82, -41, 40, 72, 0, 71); - TH2F *Map_ALL = new TH2F("Map_All", "Map_all", 82, -41, 41, 72, 0, 72); + //AZ2023: + //AZ2023 TH2F *Map_ALL = new TH2F("Map_All", "Map_all", 82, -41, 41, 72, 0, 72); + /* int nx = Map_ALL->GetXaxis()->GetNbins(); int ny = Map_ALL->GetYaxis()->GetNbins(); cout << " nx= " << nx << " ny= " << ny << endl; +*/ // int NBad = 0; // int NWarn = 0; // int NCalib = 0; @@ -1411,6 +1476,8 @@ int main(int argc, char *argv[]) { // int flag_W = 0; // int flag_B = 0; // int flag_P = 0; + //AZ2023: + /* int fffffflag = 0; std::cout << " Map_ALL SUBGOOD update " << std::endl; for (int sub = 1; sub <= 4; sub++) { @@ -1418,14 +1485,16 @@ int main(int argc, char *argv[]) { for (int i = 1; i <= nx; i++) { for (int j = 1; j <= ny; j++) { if (Map_SUB[sub][k]->GetBinContent(i, j) != 0) { - Map_SUBGOOD[sub][k]->SetBinContent(i, j, 0.5); - Map_ALL->SetBinContent(i, j, 0.5); + //AZ2023 Map_SUBGOOD[sub][k]->SetBinContent(i, j, 0.5); + //AZ2023 Map_ALL->SetBinContent(i, j, 0.5); } } } } } - +*/ + //AZ2023: + /* std::cout << " Map_ALL SUBGOOD filling............... " << std::endl; for (int sub = 1; sub <= 4; sub++) { for (int k = k_min[sub]; k <= k_max[sub]; k++) { @@ -1442,47 +1511,18 @@ int main(int argc, char *argv[]) { //Bad //Rate 0.1 for displaying on whole detector map and subdetector map if (Map_Ampl[test][sub][k]->GetBinContent(i, j) > 0.1) { - Map_ALL->SetBinContent(i, j, 1.); - Map_SUBGOOD[sub][k]->SetBinContent(i, j, 1.); + //AZ2023 Map_ALL->SetBinContent(i, j, 1.); + //AZ2023 Map_SUBGOOD[sub][k]->SetBinContent(i, j, 1.); fffffflag = 1; - /* - if (flag_B == 0) { - NBad += 1; - Eta[2][NBad] = i - 41; - Phi[2][NBad] = j - 1; - Sub[2][NBad] = sub; - Depth[2][NBad] = k; - Comment[2][NBad] = Text[test]; - } - else { - Comment[2][NBad] += ", " + Text[test]; - flag_B = 1; - } -*/ } if ((Map_Ampl[test][sub][k]->GetBinContent(i, j) != 0.) && (Map_Ampl[test][sub][k]->GetBinContent(i, j) < 0.001)) { if (Map_SUBGOOD[sub][k]->GetBinContent(i, j) != 1.) - Map_SUBGOOD[sub][k]->SetBinContent(i, j, 0.75); - if (Map_ALL->GetBinContent(i, j) != 1.) - Map_ALL->SetBinContent(i, j, 0.75); + //AZ2023 Map_SUBGOOD[sub][k]->SetBinContent(i, j, 0.75); + //AZ2023 if (Map_ALL->GetBinContent(i, j) != 1.)Map_ALL->SetBinContent(i, j, 0.75); fffffflag = 2; - /* - if (flag_W == 0) { - NWarn +=1; - Eta[1][NWarn]=i-41; - Phi[1][NWarn]=j-1; - Sub[1][NWarn]=sub; - Depth[1][NWarn]=k; - Comment[1][NWarn]=Text[test]; - } - else {Comment[1][NWarn]+=", "+Text[test]; - flag_W = 1; - } -*/ } - //// // if(fffffflag != 0) cout<<"Map_Ampl["<GetBinContent("<GetBinContent(i,j) << "fffffflag = "<< fffffflag <GetBinContent(i, j) != 1.0) Map_SUBGOOD[sub][k]->SetBinContent(i, j, 0.15); + //AZ2023 if (Map_ALL->GetBinContent(i, j) != 1.) Map_ALL->SetBinContent(i, j, 0.15); } // cout<<"Pedestals Map_Ampl["<GetBinContent("<GetBinContent(i,j)<Clear(); } } // end sub - +*/ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TCanvas *cmain1 = new TCanvas("cmain1", "MAP", 200, 10, 1400, 1800); + TCanvas *cmain1 = new TCanvas("cmain1", "cmain1", 200, 10, 1400, 1800); cmain1->Divide(2, 2); cmain1->cd(1); @@ -1621,7 +1647,7 @@ int main(int argc, char *argv[]) { JDBEYESJ0->SetLineColor(1); JDBEYESJ0->SetMinimum(0.8); JDBEYESJ0->Draw("HIST same P0"); - JDBEYESJ0->Clear(); + //JDBEYESJ0->Clear(); cmain1->cd(2); TH1F *JDBEYESJ1 = (TH1F *)dir->FindObjectAny("h_totalAmplitudeHEperEvent"); @@ -1636,7 +1662,7 @@ int main(int argc, char *argv[]) { JDBEYESJ1->SetLineColor(1); JDBEYESJ1->SetMinimum(0.8); JDBEYESJ1->Draw("HIST same P0"); - JDBEYESJ1->Clear(); + //JDBEYESJ1->Clear(); cmain1->cd(3); TH1F *JDBEYESJ2 = (TH1F *)dir->FindObjectAny("h_totalAmplitudeHFperEvent"); @@ -1651,7 +1677,7 @@ int main(int argc, char *argv[]) { JDBEYESJ2->SetLineColor(1); JDBEYESJ2->SetMinimum(0.8); JDBEYESJ2->Draw("HIST same P0"); - JDBEYESJ2->Clear(); + //JDBEYESJ2->Clear(); cmain1->cd(4); TH1F *JDBEYESJ3 = (TH1F *)dir->FindObjectAny("h_totalAmplitudeHOperEvent"); @@ -1666,17 +1692,15 @@ int main(int argc, char *argv[]) { JDBEYESJ3->SetLineColor(1); JDBEYESJ3->SetMinimum(0.8); JDBEYESJ3->Draw("HIST same P0"); - JDBEYESJ3->Clear(); - + //JDBEYESJ3->Clear(); cmain1->Modified(); cmain1->Update(); cmain1->Print("EVENTDEPENDENCE.png"); cmain1->Clear(); - - std::cout << " EVENTDEPENDENCE " << std::endl; - + // std::cout << " EVENTDEPENDENCE " << std::endl; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - + //AZ2023: + /* // ALL SubDet gStyle->SetOptTitle(0); TCanvas *cmain = new TCanvas("cmain", "MAP", 1000, 1000); @@ -1693,11 +1717,702 @@ int main(int argc, char *argv[]) { cmain->Update(); cmain->Print("MAP.png"); cmain->Clear(); - std::cout << " MAP_ALL " << std::endl; +*/ + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // 7. Correlation of Charge(=Amplitude) vs timing, fc (=TSN * 25 ns) + // three plots ----------------------------------------------------------------- + + TCanvas *corravstsn = new TCanvas("corravstsn", "corravstsn", 200, 10, 1400, 1800); + // three plots for HB: + corravstsn->Divide(2, 2); + corravstsn->cd(1); + TH2F *two11 = (TH2F *)dir->FindObjectAny("h2_TSnVsAyear2023_HB"); + gPad->SetGridy(); + gPad->SetGridx(); + two11->SetMarkerStyle(20); + two11->SetMarkerSize(0.4); + two11->SetYTitle("timing HB \b"); + two11->SetXTitle("Q,fc HB\b"); + two11->SetMarkerColor(1); + two11->SetLineColor(1); + two11->Draw("BOX"); + corravstsn->cd(2); + TH1F *TSNvsQ_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HB"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); + TSNvsQ_HB->SetMarkerStyle(20); + TSNvsQ_HB->SetMarkerSize(0.6); + TSNvsQ_HB->GetYaxis()->SetLabelSize(0.04); + TSNvsQ_HB->SetXTitle("Q,fc HB \b"); + TSNvsQ_HB->SetYTitle("iev*ieta*iphi*idepth \b"); + TSNvsQ_HB->SetMarkerColor(4); + TSNvsQ_HB->SetLineColor(0); + TSNvsQ_HB->SetMinimum(0.8); + TSNvsQ_HB->Draw("E"); + corravstsn->cd(3); + TH1F *twod1_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HB"); + TH1F *twod0_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HB"); + // twod1_HB->Sumw2(); + // twod0_HB->Sumw2(); + TH1F *Ceff_HB = (TH1F *)twod1_HB->Clone("Ceff_HB"); + for (int x = 1; x <= twod1_HB->GetXaxis()->GetNbins(); x++) { + twod1_HB->SetBinError(float(x), 0.001); + } //end x + Ceff_HB->Divide(twod1_HB, twod0_HB, 1, 1, "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Ceff_HB->SetMarkerStyle(20); + Ceff_HB->SetMarkerSize(0.4); + Ceff_HB->SetXTitle("Q,fc \b"); + Ceff_HB->SetYTitle("HB \b"); + Ceff_HB->SetMarkerColor(2); + Ceff_HB->SetLineColor(2); + Ceff_HB->SetMaximum(140.); + Ceff_HB->SetMinimum(30.); + Ceff_HB->Draw("E"); + corravstsn->Modified(); + corravstsn->Update(); + corravstsn->Print("corravstsnPLOTSHB.png"); + corravstsn->Clear(); + // std::cout << " corravstsnPLOTSHB.png created " << std::endl; + // three plots for HE: + corravstsn->Divide(2, 2); + corravstsn->cd(1); + TH2F *twoHE = (TH2F *)dir->FindObjectAny("h2_TSnVsAyear2023_HE"); + gPad->SetGridy(); + gPad->SetGridx(); + twoHE->SetMarkerStyle(20); + twoHE->SetMarkerSize(0.4); + twoHE->SetYTitle("timing HE \b"); + twoHE->SetXTitle("Q,fc HE\b"); + twoHE->SetMarkerColor(1); + twoHE->SetLineColor(1); + twoHE->Draw("BOX"); + corravstsn->cd(2); + TH1F *TSNvsQ_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HE"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); + TSNvsQ_HE->SetMarkerStyle(20); + TSNvsQ_HE->SetMarkerSize(0.6); + TSNvsQ_HE->GetYaxis()->SetLabelSize(0.04); + TSNvsQ_HE->SetXTitle("Q,fc HE \b"); + TSNvsQ_HE->SetYTitle("iev*ieta*iphi*idepth \b"); + TSNvsQ_HE->SetMarkerColor(4); + TSNvsQ_HE->SetLineColor(0); + TSNvsQ_HE->SetMinimum(0.8); + TSNvsQ_HE->Draw("E"); + corravstsn->cd(3); + TH1F *twod1_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HE"); + TH1F *twod0_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HE"); + // twod1_HE->Sumw2(); + // twod0_HE->Sumw2(); + TH1F *Ceff_HE = (TH1F *)twod1_HE->Clone("Ceff_HE"); + for (int x = 1; x <= twod1_HE->GetXaxis()->GetNbins(); x++) { + twod1_HE->SetBinError(float(x), 0.001); + } //end x + Ceff_HE->Divide(twod1_HE, twod0_HE, 1, 1, "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Ceff_HE->SetMarkerStyle(20); + Ceff_HE->SetMarkerSize(0.4); + Ceff_HE->SetXTitle("Q,fc \b"); + Ceff_HE->SetYTitle("HE \b"); + Ceff_HE->SetMarkerColor(2); + Ceff_HE->SetLineColor(2); + Ceff_HE->SetMaximum(150.); + Ceff_HE->SetMinimum(25.); + Ceff_HE->Draw("E"); + corravstsn->Modified(); + corravstsn->Update(); + corravstsn->Print("corravstsnPLOTSHE.png"); + corravstsn->Clear(); + // std::cout << " corravstsnPLOTSHE.png created " << std::endl; + // three plots for HF: + corravstsn->Divide(2, 2); + corravstsn->cd(1); + TH2F *twoHF = (TH2F *)dir->FindObjectAny("h2_TSnVsAyear2023_HF"); + gPad->SetGridy(); + gPad->SetGridx(); + twoHF->SetMarkerStyle(20); + twoHF->SetMarkerSize(0.4); + twoHF->SetYTitle("timing HF \b"); + twoHF->SetXTitle("Q,fc HF\b"); + twoHF->SetMarkerColor(1); + twoHF->SetLineColor(1); + twoHF->Draw("BOX"); + corravstsn->cd(2); + TH1F *TSNvsQ_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HF"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); + TSNvsQ_HF->SetMarkerStyle(20); + TSNvsQ_HF->SetMarkerSize(0.6); + TSNvsQ_HF->GetYaxis()->SetLabelSize(0.04); + TSNvsQ_HF->SetXTitle("Q,fc HF \b"); + TSNvsQ_HF->SetYTitle("iev*ieta*iphi*idepth \b"); + TSNvsQ_HF->SetMarkerColor(4); + TSNvsQ_HF->SetLineColor(0); + TSNvsQ_HF->SetMinimum(0.8); + TSNvsQ_HF->Draw("E"); + corravstsn->cd(3); + TH1F *twod1_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HF"); + TH1F *twod0_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HF"); + // twod1_HF->Sumw2(); + // twod0_HF->Sumw2(); + TH1F *Ceff_HF = (TH1F *)twod1_HF->Clone("Ceff_HF"); + for (int x = 1; x <= twod1_HF->GetXaxis()->GetNbins(); x++) { + twod1_HF->SetBinError(float(x), 0.001); + } //end x + Ceff_HF->Divide(twod1_HF, twod0_HF, 1, 1, "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Ceff_HF->SetMarkerStyle(20); + Ceff_HF->SetMarkerSize(0.4); + Ceff_HF->SetXTitle("Q,fc \b"); + Ceff_HF->SetYTitle("HF \b"); + Ceff_HF->SetMarkerColor(2); + Ceff_HF->SetLineColor(2); + Ceff_HF->SetMaximum(50.); + Ceff_HF->SetMinimum(0.); + Ceff_HF->Draw("E"); + corravstsn->Modified(); + corravstsn->Update(); + corravstsn->Print("corravstsnPLOTSHF.png"); + corravstsn->Clear(); + // std::cout << " corravstsnPLOTSHF.png created " << std::endl; + // three plots for HO: + corravstsn->Divide(2, 2); + corravstsn->cd(1); + TH2F *twoHO = (TH2F *)dir->FindObjectAny("h2_TSnVsAyear2023_HO"); + gPad->SetGridy(); + gPad->SetGridx(); + twoHO->SetMarkerStyle(20); + twoHO->SetMarkerSize(0.4); + twoHO->SetYTitle("timing HO \b"); + twoHO->SetXTitle("Q,fc HO\b"); + twoHO->SetMarkerColor(1); + twoHO->SetLineColor(1); + twoHO->Draw("BOX"); + corravstsn->cd(2); + TH1F *TSNvsQ_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HO"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); + TSNvsQ_HO->SetMarkerStyle(20); + TSNvsQ_HO->SetMarkerSize(0.6); + TSNvsQ_HO->GetYaxis()->SetLabelSize(0.04); + TSNvsQ_HO->SetXTitle("Q,fc HO \b"); + TSNvsQ_HO->SetYTitle("iev*ieta*iphi*idepth \b"); + TSNvsQ_HO->SetMarkerColor(4); + TSNvsQ_HO->SetLineColor(0); + TSNvsQ_HO->SetMinimum(0.8); + TSNvsQ_HO->Draw("E"); + corravstsn->cd(3); + TH1F *twod1_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HO"); + TH1F *twod0_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HO"); + // twod1_HO->Sumw2(); + // twod0_HO->Sumw2(); + TH1F *Ceff_HO = (TH1F *)twod1_HO->Clone("Ceff_HO"); + for (int x = 1; x <= twod1_HO->GetXaxis()->GetNbins(); x++) { + twod1_HO->SetBinError(float(x), 0.001); + } //end x + Ceff_HO->Divide(twod1_HO, twod0_HO, 1, 1, "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Ceff_HO->SetMarkerStyle(20); + Ceff_HO->SetMarkerSize(0.4); + Ceff_HO->SetXTitle("Q,fc \b"); + Ceff_HO->SetYTitle("HO \b"); + Ceff_HO->SetMarkerColor(2); + Ceff_HO->SetLineColor(2); + Ceff_HO->SetMaximum(150.); + Ceff_HO->SetMinimum(70.); + Ceff_HO->Draw("E"); + corravstsn->Modified(); + corravstsn->Update(); + corravstsn->Print("corravstsnPLOTSHO.png"); + corravstsn->Clear(); + // std::cout << " corravstsnPLOTSHO.png created " << std::endl; + + // 2D plots (from 1 to 7) ----------------------------------------------------------------- + TCanvas *cHBnew = new TCanvas("cHBnew", "cHBnew", 0, 10, 1400, 1800); + // 4 plots for HB: + cHBnew->Clear(); + cHBnew->Divide(2, 2); + cHBnew->cd(1); + TH2F *dva1_HBDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HB"); + TH2F *dva0_HBDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HB"); + // dva1_HBDepth1->Sumw2(); + // dva0_HBDepth1->Sumw2(); + TH2F *Seff_HBDepth1 = (TH2F *)dva1_HBDepth1->Clone("Seff_HBDepth1"); + Seff_HBDepth1->Divide(dva1_HBDepth1, dva0_HBDepth1, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HBDepth1->SetMarkerStyle(20); + Seff_HBDepth1->SetMarkerSize(0.4); + Seff_HBDepth1->SetXTitle("#eta \b"); + Seff_HBDepth1->SetYTitle("#phi \b"); + Seff_HBDepth1->SetZTitle(" HB Depth1 \b"); + Seff_HBDepth1->SetMarkerColor(2); + Seff_HBDepth1->SetLineColor(2); + Seff_HBDepth1->SetMaximum(100.); + Seff_HBDepth1->SetMinimum(80.); + Seff_HBDepth1->Draw("COLZ"); + cHBnew->cd(2); + TH2F *dva1_HBDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HB"); + TH2F *dva0_HBDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HB"); + TH2F *Seff_HBDepth2 = (TH2F *)dva1_HBDepth2->Clone("Seff_HBDepth2"); + Seff_HBDepth2->Divide(dva1_HBDepth2, dva0_HBDepth2, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HBDepth2->SetMarkerStyle(20); + Seff_HBDepth2->SetMarkerSize(0.4); + Seff_HBDepth2->SetXTitle("#eta \b"); + Seff_HBDepth2->SetYTitle("#phi \b"); + Seff_HBDepth2->SetZTitle(" HB Depth2 \b"); + Seff_HBDepth2->SetMarkerColor(2); + Seff_HBDepth2->SetLineColor(2); + Seff_HBDepth2->SetMaximum(100.); + Seff_HBDepth2->SetMinimum(80.); + Seff_HBDepth2->Draw("COLZ"); + cHBnew->cd(3); + TH2F *dva1_HBDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HB"); + TH2F *dva0_HBDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HB"); + TH2F *Seff_HBDepth3 = (TH2F *)dva1_HBDepth3->Clone("Seff_HBDepth3"); + Seff_HBDepth3->Divide(dva1_HBDepth3, dva0_HBDepth3, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HBDepth3->SetMarkerStyle(20); + Seff_HBDepth3->SetMarkerSize(0.4); + Seff_HBDepth3->SetXTitle("#eta \b"); + Seff_HBDepth3->SetYTitle("#phi \b"); + Seff_HBDepth3->SetZTitle(" HB Depth3 \b"); + Seff_HBDepth3->SetMarkerColor(2); + Seff_HBDepth3->SetLineColor(2); + Seff_HBDepth3->SetMaximum(100.); + Seff_HBDepth3->SetMinimum(80.); + Seff_HBDepth3->Draw("COLZ"); + cHBnew->cd(4); + TH2F *dva1_HBDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HB"); + TH2F *dva0_HBDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HB"); + TH2F *Seff_HBDepth4 = (TH2F *)dva1_HBDepth4->Clone("Seff_HBDepth4"); + Seff_HBDepth4->Divide(dva1_HBDepth4, dva0_HBDepth4, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HBDepth4->SetMarkerStyle(20); + Seff_HBDepth4->SetMarkerSize(0.4); + Seff_HBDepth4->SetXTitle("#eta \b"); + Seff_HBDepth4->SetYTitle("#phi \b"); + Seff_HBDepth4->SetZTitle(" HB Depth4 \b"); + Seff_HBDepth4->SetMarkerColor(2); + Seff_HBDepth4->SetLineColor(2); + Seff_HBDepth4->SetMaximum(100.); + Seff_HBDepth4->SetMinimum(80.); + Seff_HBDepth4->Draw("COLZ"); + cHBnew->Modified(); + cHBnew->Update(); + cHBnew->Print("2DcorravstsnPLOTSHB.png"); + cHBnew->Clear(); + // std::cout << " 2DcorravstsnPLOTSHB.png created " << std::endl; + // clean-up + if (dva1_HBDepth1) + delete dva1_HBDepth1; + if (dva0_HBDepth1) + delete dva0_HBDepth1; + if (Seff_HBDepth1) + delete Seff_HBDepth1; + if (dva1_HBDepth2) + delete dva1_HBDepth2; + if (dva0_HBDepth2) + delete dva0_HBDepth2; + if (Seff_HBDepth2) + delete Seff_HBDepth2; + if (dva1_HBDepth3) + delete dva1_HBDepth3; + if (dva0_HBDepth3) + delete dva0_HBDepth3; + if (Seff_HBDepth3) + delete Seff_HBDepth3; + if (dva1_HBDepth4) + delete dva1_HBDepth4; + if (dva0_HBDepth4) + delete dva0_HBDepth4; + if (Seff_HBDepth4) + delete Seff_HBDepth4; + + // 7 plots for HE: + TCanvas *cHEnew = new TCanvas("cHEnew", "cHEnew", 5, 10, 1400, 1800); + cHEnew->Clear(); + cHEnew->Divide(2, 4); + cHEnew->cd(1); + TH2F *dva1_HEDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HE"); + TH2F *dva0_HEDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HE"); + // dva1_HEDepth1->Sumw2(); + // dva0_HEDepth1->Sumw2(); + TH2F *Seff_HEDepth1 = (TH2F *)dva1_HEDepth1->Clone("Seff_HEDepth1"); + Seff_HEDepth1->Divide(dva1_HEDepth1, dva0_HEDepth1, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HEDepth1->SetMarkerStyle(20); + Seff_HEDepth1->SetMarkerSize(0.4); + Seff_HEDepth1->SetXTitle("#eta \b"); + Seff_HEDepth1->SetYTitle("#phi \b"); + Seff_HEDepth1->SetZTitle(" HE Depth1 \b"); + Seff_HEDepth1->SetMarkerColor(2); + Seff_HEDepth1->SetLineColor(2); + Seff_HEDepth1->SetMaximum(100.); + Seff_HEDepth1->SetMinimum(80.); + Seff_HEDepth1->Draw("COLZ"); + cHEnew->cd(2); + TH2F *dva1_HEDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HE"); + TH2F *dva0_HEDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HE"); + TH2F *Seff_HEDepth2 = (TH2F *)dva1_HEDepth2->Clone("Seff_HEDepth2"); + Seff_HEDepth2->Divide(dva1_HEDepth2, dva0_HEDepth2, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HEDepth2->SetMarkerStyle(20); + Seff_HEDepth2->SetMarkerSize(0.4); + Seff_HEDepth2->SetXTitle("#eta \b"); + Seff_HEDepth2->SetYTitle("#phi \b"); + Seff_HEDepth2->SetZTitle(" HE Depth2 \b"); + Seff_HEDepth2->SetMarkerColor(2); + Seff_HEDepth2->SetLineColor(2); + Seff_HEDepth2->SetMaximum(100.); + Seff_HEDepth2->SetMinimum(80.); + Seff_HEDepth2->Draw("COLZ"); + cHEnew->cd(3); + TH2F *dva1_HEDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HE"); + TH2F *dva0_HEDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HE"); + TH2F *Seff_HEDepth3 = (TH2F *)dva1_HEDepth3->Clone("Seff_HEDepth3"); + Seff_HEDepth3->Divide(dva1_HEDepth3, dva0_HEDepth3, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HEDepth3->SetMarkerStyle(20); + Seff_HEDepth3->SetMarkerSize(0.4); + Seff_HEDepth3->SetXTitle("#eta \b"); + Seff_HEDepth3->SetYTitle("#phi \b"); + Seff_HEDepth3->SetZTitle(" HE Depth3 \b"); + Seff_HEDepth3->SetMarkerColor(2); + Seff_HEDepth3->SetLineColor(2); + Seff_HEDepth3->SetMaximum(100.); + Seff_HEDepth3->SetMinimum(80.); + Seff_HEDepth3->Draw("COLZ"); + cHEnew->cd(4); + TH2F *dva1_HEDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HE"); + TH2F *dva0_HEDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HE"); + TH2F *Seff_HEDepth4 = (TH2F *)dva1_HEDepth4->Clone("Seff_HEDepth4"); + Seff_HEDepth4->Divide(dva1_HEDepth4, dva0_HEDepth4, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HEDepth4->SetMarkerStyle(20); + Seff_HEDepth4->SetMarkerSize(0.4); + Seff_HEDepth4->SetXTitle("#eta \b"); + Seff_HEDepth4->SetYTitle("#phi \b"); + Seff_HEDepth4->SetZTitle(" HE Depth4 \b"); + Seff_HEDepth4->SetMarkerColor(2); + Seff_HEDepth4->SetLineColor(2); + Seff_HEDepth4->SetMaximum(100.); + Seff_HEDepth4->SetMinimum(80.); + Seff_HEDepth4->Draw("COLZ"); + cHEnew->cd(5); + TH2F *dva1_HEDepth5 = (TH2F *)dir->FindObjectAny("h_mapDepth5TSmeanA_HE"); + TH2F *dva0_HEDepth5 = (TH2F *)dir->FindObjectAny("h_mapDepth5_HE"); + TH2F *Seff_HEDepth5 = (TH2F *)dva1_HEDepth5->Clone("Seff_HEDepth5"); + Seff_HEDepth5->Divide(dva1_HEDepth5, dva0_HEDepth5, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HEDepth5->SetMarkerStyle(20); + Seff_HEDepth5->SetMarkerSize(0.4); + Seff_HEDepth5->SetXTitle("#eta \b"); + Seff_HEDepth5->SetYTitle("#phi \b"); + Seff_HEDepth5->SetZTitle(" HE Depth5 \b"); + Seff_HEDepth5->SetMarkerColor(2); + Seff_HEDepth5->SetLineColor(2); + Seff_HEDepth5->SetMaximum(100.); + Seff_HEDepth5->SetMinimum(80.); + Seff_HEDepth5->Draw("COLZ"); + cHEnew->cd(6); + TH2F *dva1_HEDepth6 = (TH2F *)dir->FindObjectAny("h_mapDepth6TSmeanA_HE"); + TH2F *dva0_HEDepth6 = (TH2F *)dir->FindObjectAny("h_mapDepth6_HE"); + TH2F *Seff_HEDepth6 = (TH2F *)dva1_HEDepth6->Clone("Seff_HEDepth6"); + Seff_HEDepth6->Divide(dva1_HEDepth6, dva0_HEDepth6, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HEDepth6->SetMarkerStyle(20); + Seff_HEDepth6->SetMarkerSize(0.4); + Seff_HEDepth6->SetXTitle("#eta \b"); + Seff_HEDepth6->SetYTitle("#phi \b"); + Seff_HEDepth6->SetZTitle(" HE Depth6 \b"); + Seff_HEDepth6->SetMarkerColor(2); + Seff_HEDepth6->SetLineColor(2); + Seff_HEDepth6->SetMaximum(100.); + Seff_HEDepth6->SetMinimum(80.); + Seff_HEDepth6->Draw("COLZ"); + cHEnew->cd(7); + TH2F *dva1_HEDepth7 = (TH2F *)dir->FindObjectAny("h_mapDepth7TSmeanA_HE"); + TH2F *dva0_HEDepth7 = (TH2F *)dir->FindObjectAny("h_mapDepth7_HE"); + TH2F *Seff_HEDepth7 = (TH2F *)dva1_HEDepth7->Clone("Seff_HEDepth7"); + Seff_HEDepth7->Divide(dva1_HEDepth7, dva0_HEDepth7, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HEDepth7->SetMarkerStyle(20); + Seff_HEDepth7->SetMarkerSize(0.4); + Seff_HEDepth7->SetXTitle("#eta \b"); + Seff_HEDepth7->SetYTitle("#phi \b"); + Seff_HEDepth7->SetZTitle(" HE Depth7 \b"); + Seff_HEDepth7->SetMarkerColor(2); + Seff_HEDepth7->SetLineColor(2); + Seff_HEDepth7->SetMaximum(100.); + Seff_HEDepth7->SetMinimum(80.); + Seff_HEDepth7->Draw("COLZ"); + cHEnew->Modified(); + cHEnew->Update(); + cHEnew->Print("2DcorravstsnPLOTSHE.png"); + cHEnew->Clear(); + // std::cout << " 2DcorravstsnPLOTSHE.png created " << std::endl; + // clean-up + if (dva1_HEDepth1) + delete dva1_HEDepth1; + if (dva0_HEDepth1) + delete dva0_HEDepth1; + if (Seff_HEDepth1) + delete Seff_HEDepth1; + if (dva1_HEDepth2) + delete dva1_HEDepth2; + if (dva0_HEDepth2) + delete dva0_HEDepth2; + if (Seff_HEDepth2) + delete Seff_HEDepth2; + if (dva1_HEDepth3) + delete dva1_HEDepth3; + if (dva0_HEDepth3) + delete dva0_HEDepth3; + if (Seff_HEDepth3) + delete Seff_HEDepth3; + if (dva1_HEDepth4) + delete dva1_HEDepth4; + if (dva0_HEDepth4) + delete dva0_HEDepth4; + if (Seff_HEDepth4) + delete Seff_HEDepth4; + if (dva1_HEDepth5) + delete dva1_HEDepth5; + if (dva0_HEDepth5) + delete dva0_HEDepth5; + if (Seff_HEDepth5) + delete Seff_HEDepth5; + if (dva1_HEDepth6) + delete dva1_HEDepth6; + if (dva0_HEDepth6) + delete dva0_HEDepth6; + if (Seff_HEDepth6) + delete Seff_HEDepth6; + if (dva1_HEDepth7) + delete dva1_HEDepth7; + if (dva0_HEDepth7) + delete dva0_HEDepth7; + if (Seff_HEDepth7) + delete Seff_HEDepth7; + // 4 plots for HF: + TCanvas *cHFnew = new TCanvas("cHFnew", "cHFnew", 200, 10, 1400, 1800); + cHFnew->Clear(); + cHFnew->Divide(2, 2); + cHFnew->cd(1); + TH2F *dva1_HFDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HF"); + TH2F *dva0_HFDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HF"); + // dva1_HFDepth1->Sumw2(); + // dva0_HFDepth1->Sumw2(); + TH2F *Seff_HFDepth1 = (TH2F *)dva1_HFDepth1->Clone("Seff_HFDepth1"); + Seff_HFDepth1->Divide(dva1_HFDepth1, dva0_HFDepth1, 25., 1., "B"); + /* + for (int i=1;i<=Seff_HFDepth1->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=Seff_HFDepth1->GetYaxis()->GetNbins();j++) { + double ccc1 = Seff_HFDepth1->GetBinContent(i,j) ; + // if(ccc1 > 0.) std::cout << "******************** i = " << i << " j = " << j << " ccc1 = " << ccc1 << std::endl; + + Seff_HFDepth1->SetBinContent(i,j,0.); + if(ccc1 > 0.) Seff_HFDepth1->SetBinContent(i,j,ccc1); + } + } +*/ + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HFDepth1->SetMarkerStyle(20); + Seff_HFDepth1->SetMarkerSize(0.4); + Seff_HFDepth1->SetXTitle("#eta \b"); + Seff_HFDepth1->SetYTitle("#phi \b"); + Seff_HFDepth1->SetZTitle(" HF Depth1 \b"); + Seff_HFDepth1->SetMarkerColor(2); + Seff_HFDepth1->SetLineColor(2); + Seff_HFDepth1->SetMaximum(50.); + Seff_HFDepth1->SetMinimum(20.); + Seff_HFDepth1->Draw("COLZ"); + cHFnew->cd(2); + TH2F *dva1_HFDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HF"); + TH2F *dva0_HFDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HF"); + TH2F *Seff_HFDepth2 = (TH2F *)dva1_HFDepth2->Clone("Seff_HFDepth2"); + Seff_HFDepth2->Divide(dva1_HFDepth2, dva0_HFDepth2, 25., 1., "B"); + /* + for (int i=1;i<=Seff_HFDepth2->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=Seff_HFDepth2->GetYaxis()->GetNbins();j++) { + double ccc1 = Seff_HFDepth2->GetBinContent(i,j) ; + Seff_HFDepth2->SetBinContent(i,j,0.); + if(ccc1 > 0. ) Seff_HFDepth2->SetBinContent(i,j,ccc1); + } + } + */ + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HFDepth2->SetMarkerStyle(20); + Seff_HFDepth2->SetMarkerSize(0.4); + Seff_HFDepth2->SetXTitle("#eta \b"); + Seff_HFDepth2->SetYTitle("#phi \b"); + Seff_HFDepth2->SetZTitle(" HF Depth2 \b"); + Seff_HFDepth2->SetMarkerColor(2); + Seff_HFDepth2->SetLineColor(2); + Seff_HFDepth2->SetMaximum(50.); + Seff_HFDepth2->SetMinimum(20.); + Seff_HFDepth2->Draw("COLZ"); + cHFnew->cd(3); + TH2F *dva1_HFDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HF"); + TH2F *dva0_HFDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HF"); + TH2F *Seff_HFDepth3 = (TH2F *)dva1_HFDepth3->Clone("Seff_HFDepth3"); + Seff_HFDepth3->Divide(dva1_HFDepth3, dva0_HFDepth3, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HFDepth3->SetMarkerStyle(20); + Seff_HFDepth3->SetMarkerSize(0.4); + Seff_HFDepth3->SetXTitle("#eta \b"); + Seff_HFDepth3->SetYTitle("#phi \b"); + Seff_HFDepth3->SetZTitle(" HF Depth3 \b"); + Seff_HFDepth3->SetMarkerColor(2); + Seff_HFDepth3->SetLineColor(2); + Seff_HFDepth3->SetMaximum(50.); + Seff_HFDepth3->SetMinimum(20.); + Seff_HFDepth3->Draw("COLZ"); + cHFnew->cd(4); + TH2F *dva1_HFDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HF"); + TH2F *dva0_HFDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HF"); + TH2F *Seff_HFDepth4 = (TH2F *)dva1_HFDepth4->Clone("Seff_HFDepth4"); + Seff_HFDepth4->Divide(dva1_HFDepth4, dva0_HFDepth4, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HFDepth4->SetMarkerStyle(20); + Seff_HFDepth4->SetMarkerSize(0.4); + Seff_HFDepth4->SetXTitle("#eta \b"); + Seff_HFDepth4->SetYTitle("#phi \b"); + Seff_HFDepth4->SetZTitle(" HF Depth4 \b"); + Seff_HFDepth4->SetMarkerColor(2); + Seff_HFDepth4->SetLineColor(2); + Seff_HFDepth4->SetMaximum(50.); + Seff_HFDepth4->SetMinimum(20.); + Seff_HFDepth4->Draw("COLZ"); + cHFnew->Modified(); + cHFnew->Update(); + cHFnew->Print("2DcorravstsnPLOTSHF.png"); + cHFnew->Clear(); + // std::cout << " 2DcorravstsnPLOTSHF.png created " << std::endl; + if (dva1_HFDepth1) + delete dva1_HFDepth1; + if (dva0_HFDepth1) + delete dva0_HFDepth1; + if (Seff_HFDepth1) + delete Seff_HFDepth1; + if (dva1_HFDepth2) + delete dva1_HFDepth2; + if (dva0_HFDepth2) + delete dva0_HFDepth2; + if (Seff_HFDepth2) + delete Seff_HFDepth2; + if (dva1_HFDepth3) + delete dva1_HFDepth3; + if (dva0_HFDepth3) + delete dva0_HFDepth3; + if (Seff_HFDepth3) + delete Seff_HFDepth3; + if (dva1_HFDepth4) + delete dva1_HFDepth4; + if (dva0_HFDepth4) + delete dva0_HFDepth4; + if (Seff_HFDepth4) + delete Seff_HFDepth4; + // 1 plot for HO: + TCanvas *cHOnew = new TCanvas("cHOnew", "cHOnew", 200, 10, 1400, 1800); + // TCanvas *cHOnew = new TCanvas("cHOnew", "cHOnew", 1500, 500); + cHOnew->Clear(); + cHOnew->Divide(1, 1); + cHOnew->cd(1); + TH2F *dva1_HODepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HO"); + /* + for (int i=1;i<=dva1_HODepth4->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=dva1_HODepth4->GetYaxis()->GetNbins();j++) { + double ccc1 = dva1_HODepth4->GetBinContent(i,j) ; + if(ccc1 > 0.) std::cout << "****** dva1_HODepth4 ************** i = " << i << " j = " << j << " ccc1 = " << ccc1 << std::endl; + } + } +*/ + TH2F *dva0_HODepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HO"); + /* + for (int i=1;i<=dva0_HODepth4->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=dva0_HODepth4->GetYaxis()->GetNbins();j++) { + double ccc1 = dva0_HODepth4->GetBinContent(i,j) ; + if(ccc1 > 0.) std::cout << "****** dva0_HODepth4 ************** i = " << i << " j = " << j << " ccc1 = " << ccc1 << std::endl; + } + } + */ + TH2F *Seff_HODepth4 = (TH2F *)dva1_HODepth4->Clone("Seff_HODepth4"); + /* + for (int x = 1; x <= Seff_HODepth4->GetXaxis()->GetNbins(); x++) { + for (int y = 1; y <= Seff_HODepth4->GetYaxis()->GetNbins(); y++) { + // dva1_HODepth4->SetBinError(float(x), float(y), 0.001); + // Seff_HODepth4->SetBinContent(float(x), float(y), 0.0); + } //end x + } //end y +*/ + Seff_HODepth4->Divide(dva1_HODepth4, dva0_HODepth4, 25., 1., "B"); + /* + for (int i=1;i<=Seff_HODepth4->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=Seff_HODepth4->GetYaxis()->GetNbins();j++) { + double ccc1 = Seff_HODepth4->GetBinContent(i,j); + if(ccc1 > 0.) std::cout << "****** Seff_HODepth4 ************** i = " << i << " j = " << j << " ccc1 = " << ccc1 << std::endl; + } + } +*/ + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HODepth4->SetMarkerStyle(20); + Seff_HODepth4->SetMarkerSize(0.4); + Seff_HODepth4->SetXTitle("#eta \b"); + Seff_HODepth4->SetYTitle("#phi \b"); + Seff_HODepth4->SetZTitle(" HO Depth4 \b"); + Seff_HODepth4->SetMarkerColor(2); + Seff_HODepth4->SetLineColor(2); + Seff_HODepth4->SetMaximum(130.); + Seff_HODepth4->SetMinimum(70.); + Seff_HODepth4->Draw("COLZ"); + cHOnew->Modified(); + cHOnew->Update(); + cHOnew->Print("2DcorravstsnPLOTSHO.png"); + cHOnew->Clear(); + // std::cout << " 2DcorravstsnPLOTSHO.png created " << std::endl; + if (dva1_HODepth4) + delete dva1_HODepth4; + if (dva0_HODepth4) + delete dva0_HODepth4; + if (Seff_HODepth4) + delete Seff_HODepth4; + + // std::cout << " END OF 2023 " << std::endl; + // + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// //====================================================================== //====================================================================== html pages CREATING: + std::cout << " html pages CREATING: " << std::endl; //====================================================================== // Creating each test kind for each subdet html pages: std::string raw_class, raw_class1, raw_class2, raw_class3; @@ -1928,6 +2643,33 @@ int main(int argc, char *argv[]) { htmlFileT << " " << std::endl; htmlFileT << "
" << std::endl; + // Correlation of A vs TSn done in 2023 for Run3 and for GlobalRMT only + htmlFileT << "

7....... Correlation of A(=Q) vs timing(=25ns*MeanTSposition)

" << std::endl; + + htmlFileT << "

7.A..... 1)2D-correlation of timing vs Q,fc;.......... 2)Q,fc;................ 3)mean timing vs " + "Q,fc .......

" + << std::endl; + if (sub == 1) + htmlFileT << " " << std::endl; + if (sub == 2) + htmlFileT << " " << std::endl; + if (sub == 3) + htmlFileT << " " << std::endl; + if (sub == 4) + htmlFileT << " " << std::endl; + htmlFileT << "
" << std::endl; + + htmlFileT << "

7.B....... Mean timing in 2D space of eta-phi for different Depthes........

" << std::endl; + if (sub == 1) + htmlFileT << " " << std::endl; + if (sub == 2) + htmlFileT << " " << std::endl; + if (sub == 3) + htmlFileT << " " << std::endl; + if (sub == 4) + htmlFileT << " " << std::endl; + htmlFileT << "
" << std::endl; + htmlFileT << " " << std::endl; htmlFileT << " " << std::endl; htmlFileT.close(); @@ -2221,6 +2963,8 @@ int main(int argc, char *argv[]) { htmlFile << "" << std::endl; htmlFile << "
" << std::endl; + //AZ2023: + /* htmlFile << "\n"; if (sub == 1) htmlFile << "

2.Status HB over all criteria

" << std::endl; @@ -2246,7 +2990,7 @@ int main(int argc, char *argv[]) { htmlFile << " " << std::endl; htmlFile << "
" << std::endl; htmlFile << "to top
\n"; - +*/ ///////////////////////////////////////////////////////////////// AZ 19.03.2018 /* // htmlFile << "

2.B.List of Bad channels (rate > 0.1) and its rates for each RMT criteria (for GS - %)

"<< std::endl; @@ -2712,7 +3456,8 @@ int main(int argc, char *argv[]) { htmlFile << "" << std::endl; htmlFile << "" << std::endl; htmlFile << "
" << std::endl; - + //AZ2023: + /* htmlFile << "

2. HCAL status over all criteria and subdetectors

" << std::endl; htmlFile << "

2.A. Channels in detector space

" << std::endl; htmlFile << "

Legend for channel status: green - good, others - may be a problems, white - not applicable or out " @@ -2750,8 +3495,8 @@ int main(int argc, char *argv[]) { htmlFile << "HTR_FPGA" << std::endl; htmlFile << "RMT-criteria" << std::endl; htmlFile << "" << std::endl; - - ind = 0; +*/ + //AZ2023 ind = 0; // AZ 19.03.2018 /* for (int i=1;i<=NBad;i++) { @@ -2793,8 +3538,8 @@ int main(int argc, char *argv[]) { } } /// end loop */ - htmlFile << "" << std::endl; - htmlFile << "
" << std::endl; + //AZ2023 htmlFile << "" << std::endl; + //AZ2023 htmlFile << "
" << std::endl; /* htmlFile << "

2.C.List of Gain unstable channels

"<< std::endl; //htmlFile << " Description of criteria for bad channel selection"<< std::endl; diff --git a/DPGAnalysis/HcalTools/macros/cmt/zadcampltest.cc b/DPGAnalysis/HcalTools/macros/cmt/zadcampltest.cc index 4dc6d40b1e6c9..dbcc727c4dab1 100644 --- a/DPGAnalysis/HcalTools/macros/cmt/zadcampltest.cc +++ b/DPGAnalysis/HcalTools/macros/cmt/zadcampltest.cc @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) { // TFile *hfile1= new TFile("LEDtest.root", "READ"); // TFile *hfile1 = new TFile("Global_346445.root", "READ"); - TFile *hfile1 = new TFile("Global_346300.root", "READ"); + TFile *hfile1 = new TFile("Global_362365.root", "READ"); // TH1D *hist1(nullptr); // hist1 = (TH1D *)dir->FindObjectAny("h_mapDepth1_HE"); diff --git a/DPGAnalysis/HcalTools/macros/cmt/zamplpedcorr.cc b/DPGAnalysis/HcalTools/macros/cmt/zamplpedcorr.cc new file mode 100644 index 0000000000000..b52bddfe8f6cf --- /dev/null +++ b/DPGAnalysis/HcalTools/macros/cmt/zamplpedcorr.cc @@ -0,0 +1,711 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//##### +#include +#include +#include "TH1.h" +#include "TH2.h" +#include "TCanvas.h" +#include "TROOT.h" +#include +#include "TStyle.h" +#include "TSystem.h" +#include "TLegend.h" +#include "TText.h" +#include "TAxis.h" +#include "TFile.h" +#include "TLine.h" +#include "TGraph.h" +#include +#include +#include + +// +using namespace std; +// +// + +//inline void HERE(const char *msg) { std::cout << msg << std::endl; } + +int main(int argc, char *argv[]) { + std::string dirnm = "Analyzer"; + //====================================================================== + printf("reco: gROOT Reset \n"); + gROOT->Reset(); + gROOT->SetStyle("Plain"); + // gStyle->SetOptStat(0); // no statistics _or_ + // gStyle->SetOptStat(11111111); + //gStyle->SetOptStat(1101);// name mean and rms + // gStyle->SetOptStat(0101);// name and entries + // gStyle->SetOptStat(1100);// mean and rms only !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // gStyle->SetOptStat(1110000);// und over, integral !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + gStyle->SetOptStat(101110); // entries, mean, rms, overflow !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // gStyle->SetOptStat(100000);// over !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // + //gStyle->SetOptFit(00010);// constant, mean and sigma only !! + // gStyle->SetOptFit(00001);// hi2/nu, constant, mean and sigma only !! + gStyle->SetOptFit(0010); // constant, mean and sigma only !! + // gStyle->SetOptFit(00011);// constant, mean and sigma only !! + // gStyle->SetOptFit(1101); + // gStyle->SetOptFit(1011); + // + //gStyle->SetStatX(0.98); + //gStyle->SetStatY(0.99); + //gStyle->SetStatW(0.30); + //gStyle->SetStatH(0.25); + gStyle->SetStatX(0.91); + gStyle->SetStatY(0.75); + gStyle->SetStatW(0.20); + gStyle->SetStatH(0.10); + // gStyle->SetStatH(0.35); + // + + // Float_t LeftOffset = 0.12; + //Float_t TopOffset = 0.12; + Float_t LeftOffset = 0.12; + Float_t TopOffset = 0.22; + + gStyle->SetLineWidth(1); + gStyle->SetErrorX(0); + + //---=[ Titles,Labels ]=----------- + gStyle->SetOptTitle(0); // title on/off + // gStyle->SetTitleColor(0); // title color + gStyle->SetTitleColor(1); // title color + // gStyle->SetTitleX(0.35); // title x-position + gStyle->SetTitleX(0.15); // title x-position + gStyle->SetTitleH(0.15); // title height + // gStyle->SetTitleW(0.53); // title width + gStyle->SetTitleW(0.60); // title width + gStyle->SetTitleFont(42); // title font + gStyle->SetTitleFontSize(0.07); // title font size + + gStyle->SetPalette(1); + //---=[ Histogram style ]=---------- + // gStyle->SetHistFillColor(38); + // gStyle->SetFrameFillColor(41);// jelto-kori4nev-svetl + // gStyle->SetFrameFillColor(5);// jeltyi + // gStyle->SetFrameFillColor(17);// seryi + // gStyle->SetFrameFillColor(18);// svetlo seryi + // gStyle->SetFrameFillColor(20);// svetlo kori4nev + // gStyle->SetFrameFillColor(33);// sine-seryi + // gStyle->SetFrameFillColor(40);// fiolet-seryi + // gStyle->SetFrameFillColor(23);// sv.kor + + //---=[ Pad style ]=---------------- + gStyle->SetPadTopMargin(TopOffset); + gStyle->SetPadBottomMargin(LeftOffset); + gStyle->SetPadRightMargin(TopOffset); + gStyle->SetPadLeftMargin(LeftOffset); + //---=[ SetCanvasDef ]=---------------- + //====================================================================== + // + // Connect the input file and get the 2-d histogram in memory + //====================================================================== + // TBrowser *b = new TBrowser + + // TFile *hfile1= new TFile("test.root", "READ"); + // + + // TFile *hfile1= new TFile("testNZS.root", "READ"); + // TFile *hfile1= new TFile("test.root", "READ"); + + // TFile *hfile1= new TFile("newruns/Global_234034.root", "READ"); + // + + // TFile *hfile1= new TFile("/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/CMTweb/histos/Global_234556.root", "READ"); + // TFile *hfile1= new TFile("Global_234034.root", "READ"); + // TFile *hfile1= new TFile("test211006.root", "READ"); + // TFile *hfile1= new TFile("test234457.root", "READ"); + + // TFile *hfile1= new TFile("Global_51.root", "READ"); + // TFile *hfile1= new TFile("Global_235698.root", "READ"); + + // TFile *hfile1= new TFile("Global_39.root", "READ"); + // TFile *hfile1= new TFile("test237165.root", "READ"); + // + // TFile *hfile1= new TFile("Laser_238187.root", "READ"); + // TFile *hfile1= new TFile("Laser_238183.root", "READ"); + + // TFile *hfile1= new TFile("Global_255031.root", "READ"); + + // TFile *hfile1= new TFile("Global_256001.root", "READ"); + // TFile *hfile1= new TFile("Global_256167.root", "READ"); + // TFile *hfile1= new TFile("Global_256348.root", "READ"); + // TFile *hfile1= new TFile("Global_256630.root", "READ"); + + // TFile *hfile1= new TFile("../PYTHON_runlist_test/Global_283884_1.root", "READ"); + // TFile *hfile1= new TFile("Global_test.root", "READ"); + + // TFile *hfile1= new TFile("LED_280702.root", "READ"); + // TFile *hfile2= new TFile("LED_287824.root", "READ"); + + // TFile *hfile1= new TFile("LED_284352.root", "READ"); + // TFile *hfile1= new TFile("LEDtest.root", "READ"); + // TFile *hfile1 = new TFile("Global_346445.root", "READ"); + + TFile *hfile1 = new TFile("Global_362365.root", "READ"); + // TH1D *hist1(nullptr); + // hist1 = (TH1D *)dir->FindObjectAny("h_mapDepth1_HE"); + + // TFile *hfile2= new TFile("LED_284902.root", "READ"); + // TFile *hfile2= new TFile("LED_284499.root", "READ"); + // TFile *hfile2= new TFile("LED_284352.root", "READ"); + + // TFile *hfile2= new TFile("LED_286590.root", "READ"); + + // getchar(); + // + TPostScript psfile("zamplpedcorr.ps", 111); + + // + + TCanvas *c1 = new TCanvas("c1", "Hcal4test", 200, 10, 700, 900); + + hfile1->ls(); + TDirectory *dir = (TDirectory *)hfile1->FindObjectAny(dirnm.c_str()); + + //=============================================================================================== 1 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + c1->cd(1); + TH1F *twod1= (TH1F*)dir->FindObjectAny("h_pedvsampl_HB"); + TH1F *twod0= (TH1F*)dir->FindObjectAny("h_pedvsampl0_HB"); + twod1->Sumw2(); + twod0->Sumw2(); +// if(twod0->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefz225= (TH1F*)twod1->Clone("Cefz225"); + Cefz225->Divide(twod1,twod0, 1, 1, "B"); + Cefz225->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefz225->SetMarkerStyle(20); + Cefz225->SetMarkerSize(0.4); + Cefz225->SetXTitle("Pedestals \b"); + Cefz225->SetYTitle(" \b"); + Cefz225->SetMarkerColor(2); + Cefz225->SetLineColor(2); + // Cefz225->SetMaximum(1.000); + // Cefz225->SetMinimum(0.0001); + Cefz225->Draw("COLZ"); + + c1->cd(2); + TH1F *twod61= (TH1F*)dir->FindObjectAny("h_pedwvsampl_HB"); + TH1F *twod60= (TH1F*)dir->FindObjectAny("h_pedwvsampl0_HB"); + twod61->Sumw2(); + twod60->Sumw2(); +// if(twod60->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefz226= (TH1F*)twod61->Clone("Cefz226"); + Cefz226->Divide(twod61,twod60, 1, 1, "B"); + Cefz226->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefz226->SetMarkerStyle(20); + Cefz226->SetMarkerSize(0.4); + Cefz226->SetXTitle("Width_Pedestals \b"); + Cefz226->SetYTitle(" \b"); + Cefz226->SetMarkerColor(2); + Cefz226->SetLineColor(2); + // Cefz226->SetMaximum(1.000); + // Cefz226->SetMinimum(0.0001); + Cefz226->Draw("COLZ"); + + c1->cd(3); + TH1F *twod71= (TH1F*)dir->FindObjectAny("h_amplvsped_HB"); + TH1F *twod70= (TH1F*)dir->FindObjectAny("h_amplvsped0_HB"); + twod71->Sumw2(); + twod70->Sumw2(); +// if(twod70->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefz227= (TH1F*)twod71->Clone("Cefz227"); + Cefz227->Divide(twod71,twod70, 1, 1, "B"); + Cefz227->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefz227->SetMarkerStyle(20); + Cefz227->SetMarkerSize(0.4); + Cefz227->SetXTitle("Amplitude \b"); + Cefz227->SetYTitle(" \b"); + Cefz227->SetMarkerColor(2); + Cefz227->SetLineColor(2); + // Cefz227->SetMaximum(1.000); + // Cefz227->SetMinimum(0.0001); + Cefz227->Draw("COLZ"); + + c1->cd(4); + TH1F *twod81= (TH1F*)dir->FindObjectAny("h_amplvspedw_HB"); + TH1F *twod80= (TH1F*)dir->FindObjectAny("h_amplvsped0_HB"); + twod81->Sumw2(); + twod80->Sumw2(); +// if(twod80->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefz228= (TH1F*)twod81->Clone("Cefz228"); + Cefz228->Divide(twod81,twod80, 1, 1, "B"); + Cefz228->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefz228->SetMarkerStyle(20); + Cefz228->SetMarkerSize(0.4); + Cefz228->SetXTitle("Amplitude \b"); + Cefz228->SetYTitle(" \b"); + Cefz228->SetMarkerColor(2); + Cefz228->SetLineColor(2); + // Cefz228->SetMaximum(1.000); + // Cefz228->SetMinimum(0.0001); + Cefz228->Draw("COLZ"); + + + c1->Update(); + + + + //========================================================================================= 2 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + c1->cd(1); + TH2F *two11= (TH2F*)dir->FindObjectAny("h2_pedvsampl_HB"); + gPad->SetGridy(); + gPad->SetGridx(); + two11->SetMarkerStyle(20); + two11->SetMarkerSize(0.4); + two11->SetXTitle("Pedestals HB \b"); + two11->SetYTitle("Amplitude HB\b"); + two11->SetMarkerColor(2); + two11->SetLineColor(2); + // gPad->SetLogy(); + two11->Draw("COLZ"); + + c1->cd(2); + TH2F *two12= (TH2F*)dir->FindObjectAny("h2_pedwvsampl_HB"); + gPad->SetGridy(); + gPad->SetGridx(); + two12->SetMarkerStyle(20); + two12->SetMarkerSize(0.4); + two12->SetXTitle("Width_Pedestals HB \b"); + two12->SetYTitle("Amplitude HB\b"); + two12->SetMarkerColor(2); + two12->SetLineColor(2); + // gPad->SetLogy(); + two12->Draw("COLZ"); + + c1->cd(3); + TH2F *two22= (TH2F*)dir->FindObjectAny("h2_amplvsped_HB"); + gPad->SetGridy(); + gPad->SetGridx(); + two22->SetMarkerStyle(20); + two22->SetMarkerSize(0.4); + two22->SetYTitle("Pedestals HB \b"); + two22->SetXTitle("Amplitude HB\b"); + two22->SetMarkerColor(2); + two22->SetLineColor(2); + two22->Draw("COLZ"); + + c1->cd(4); + TH2F *two23= (TH2F*)dir->FindObjectAny("h2_amplvspedw_HB"); + gPad->SetGridy(); + gPad->SetGridx(); + two23->SetMarkerStyle(20); + two23->SetMarkerSize(0.4); + two23->SetYTitle("Width_Pedestals HB \b"); + two23->SetXTitle("Amplitude HB\b"); + two23->SetMarkerColor(2); + two23->SetLineColor(2); + two23->Draw("COLZ"); + + c1->Update(); + + //========================================================================================= 3 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + + c1->cd(1); + TH1F *aaaaaa1= (TH1F*)dir->FindObjectAny("h_sumADCAmplLS1copy2"); + gPad->SetLogy(); + aaaaaa1->SetMarkerStyle(20); + aaaaaa1->SetMarkerSize(0.8); + aaaaaa1->GetYaxis()->SetLabelSize(0.04); + aaaaaa1->SetXTitle("(ev.in LS) in LSs & channels - HB depth1\b"); + aaaaaa1->SetMarkerColor(4); + aaaaaa1->SetLineColor(0); + aaaaaa1->Draw("Error"); + + c1->cd(2); + TH1F *aaaaaa2= (TH1F*)dir->FindObjectAny("h_sumADCAmplLS1copy3"); + gPad->SetLogy(); + aaaaaa2->SetMarkerStyle(20); + aaaaaa2->SetMarkerSize(0.8); + aaaaaa2->GetYaxis()->SetLabelSize(0.04); + aaaaaa2->SetXTitle("(ev.in LS) in LSs & channels - HB depth1\b"); + aaaaaa2->SetMarkerColor(4); + aaaaaa2->SetLineColor(0); + aaaaaa2->Draw("Error"); + + c1->cd(3); + TH1F *aaaaaa3= (TH1F*)dir->FindObjectAny("h_sumADCAmplLS1copy4"); + gPad->SetLogy(); + aaaaaa3->SetMarkerStyle(20); + aaaaaa3->SetMarkerSize(0.8); + aaaaaa3->GetYaxis()->SetLabelSize(0.04); + aaaaaa3->SetXTitle("(ev.in LS) in LSs & channels - HB depth1\b"); + aaaaaa3->SetMarkerColor(4); + aaaaaa3->SetLineColor(0); + aaaaaa3->Draw("Error"); + c1->cd(4); + TH1F *aaaaaa4= (TH1F*)dir->FindObjectAny("h_sumADCAmplLS1copy5"); + gPad->SetLogy(); + aaaaaa4->SetMarkerStyle(20); + aaaaaa4->SetMarkerSize(0.8); + aaaaaa4->GetYaxis()->SetLabelSize(0.04); + aaaaaa4->SetXTitle("(ev.in LS) in LSs & channels - HB depth1\b"); + aaaaaa4->SetMarkerColor(4); + aaaaaa4->SetLineColor(0); + aaaaaa4->Draw("Error"); + + c1->Update(); + + //=============================================================================================== 4 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + /* + c1->cd(1); + TH1F *twodhe1= (TH1F*)dir->FindObjectAny("h_pedvsampl_HE"); + TH1F *twodhe0= (TH1F*)dir->FindObjectAny("h_pedvsampl0_HE"); + twodhe1->Sumw2(); + twodhe0->Sumw2(); +// if(twodhe0->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzhe225= (TH1F*)twodhe1->Clone("Cefzhe225"); + Cefzhe225->Divide(twodhe1,twodhe0, 1, 1, "B"); + Cefzhe225->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzhe225->SetMarkerStyle(20); + Cefzhe225->SetMarkerSize(0.4); + Cefzhe225->SetXTitle("Pedestals \b"); + Cefzhe225->SetYTitle(" \b"); + Cefzhe225->SetMarkerColor(2); + Cefzhe225->SetLineColor(2); + // Cefzhe225->SetMaximum(1.000); + // Cefzhe225->SetMinimum(0.0001); + Cefzhe225->Draw("COLZ"); + + c1->cd(2); + TH1F *twodhe61= (TH1F*)dir->FindObjectAny("h_pedwvsampl_HE"); + TH1F *twodhe60= (TH1F*)dir->FindObjectAny("h_pedwvsampl0_HE"); + twodhe61->Sumw2(); + twodhe60->Sumw2(); +// if(twodhe60->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzhe226= (TH1F*)twodhe61->Clone("Cefzhe226"); + Cefzhe226->Divide(twodhe61,twodhe60, 1, 1, "B"); + Cefzhe226->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzhe226->SetMarkerStyle(20); + Cefzhe226->SetMarkerSize(0.4); + Cefzhe226->SetXTitle("Width_Pedestals \b"); + Cefzhe226->SetYTitle(" \b"); + Cefzhe226->SetMarkerColor(2); + Cefzhe226->SetLineColor(2); + // Cefzhe226->SetMaximum(1.000); + // Cefzhe226->SetMinimum(0.0001); + Cefzhe226->Draw("COLZ"); + + c1->cd(3); + TH1F *twodhe71= (TH1F*)dir->FindObjectAny("h_amplvsped_HE"); + TH1F *twodhe70= (TH1F*)dir->FindObjectAny("h_amplvsped0_HE"); + twodhe71->Sumw2(); + twodhe70->Sumw2(); +// if(twodhe70->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzhe227= (TH1F*)twodhe71->Clone("Cefzhe227"); + Cefzhe227->Divide(twodhe71,twodhe70, 1, 1, "B"); + Cefzhe227->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzhe227->SetMarkerStyle(20); + Cefzhe227->SetMarkerSize(0.4); + Cefzhe227->SetXTitle("Amplitude \b"); + Cefzhe227->SetYTitle(" \b"); + Cefzhe227->SetMarkerColor(2); + Cefzhe227->SetLineColor(2); + // Cefzhe227->SetMaximum(1.000); + // Cefzhe227->SetMinimum(0.0001); + Cefzhe227->Draw("COLZ"); + + c1->cd(4); + TH1F *twodhe81= (TH1F*)dir->FindObjectAny("h_amplvspedw_HE"); + TH1F *twodhe80= (TH1F*)dir->FindObjectAny("h_amplvsped0_HE"); + twodhe81->Sumw2(); + twodhe80->Sumw2(); +// if(twodhe80->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzhe228= (TH1F*)twodhe81->Clone("Cefzhe228"); + Cefzhe228->Divide(twodhe81,twodhe80, 1, 1, "B"); + Cefzhe228->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzhe228->SetMarkerStyle(20); + Cefzhe228->SetMarkerSize(0.4); + Cefzhe228->SetXTitle("Amplitude \b"); + Cefzhe228->SetYTitle(" \b"); + Cefzhe228->SetMarkerColor(2); + Cefzhe228->SetLineColor(2); + // Cefzhe228->SetMaximum(1.000); + // Cefzhe228->SetMinimum(0.0001); + Cefzhe228->Draw("COLZ"); + + */ + c1->Update(); + + + //=============================================================================================== 5 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + /* + c1->cd(1); + TH1F *twodhf1= (TH1F*)dir->FindObjectAny("h_pedvsampl_HF"); + TH1F *twodhf0= (TH1F*)dir->FindObjectAny("h_pedvsampl0_HF"); + twodhf1->Sumw2(); + twodhf0->Sumw2(); +// if(twodhf0->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzhf225= (TH1F*)twodhf1->Clone("Cefzhf225"); + Cefzhf225->Divide(twodhf1,twodhf0, 1, 1, "B"); + Cefzhf225->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzhf225->SetMarkerStyle(20); + Cefzhf225->SetMarkerSize(0.4); + Cefzhf225->SetXTitle("Pedestals \b"); + Cefzhf225->SetYTitle(" \b"); + Cefzhf225->SetMarkerColor(2); + Cefzhf225->SetLineColor(2); + // Cefzhf225->SetMaximum(1.000); + // Cefzhf225->SetMinimum(0.0001); + Cefzhf225->Draw("COLZ"); + + c1->cd(2); + TH1F *twodhf61= (TH1F*)dir->FindObjectAny("h_pedwvsampl_HF"); + TH1F *twodhf60= (TH1F*)dir->FindObjectAny("h_pedwvsampl0_HF"); + twodhf61->Sumw2(); + twodhf60->Sumw2(); +// if(twodhf60->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzhf226= (TH1F*)twodhf61->Clone("Cefzhf226"); + Cefzhf226->Divide(twodhf61,twodhf60, 1, 1, "B"); + Cefzhf226->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzhf226->SetMarkerStyle(20); + Cefzhf226->SetMarkerSize(0.4); + Cefzhf226->SetXTitle("Width_Pedestals \b"); + Cefzhf226->SetYTitle(" \b"); + Cefzhf226->SetMarkerColor(2); + Cefzhf226->SetLineColor(2); + // Cefzhf226->SetMaximum(1.000); + // Cefzhf226->SetMinimum(0.0001); + Cefzhf226->Draw("COLZ"); + + c1->cd(3); + TH1F *twodhf71= (TH1F*)dir->FindObjectAny("h_amplvsped_HF"); + TH1F *twodhf70= (TH1F*)dir->FindObjectAny("h_amplvsped0_HF"); + twodhf71->Sumw2(); + twodhf70->Sumw2(); +// if(twodhf70->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzhf227= (TH1F*)twodhf71->Clone("Cefzhf227"); + Cefzhf227->Divide(twodhf71,twodhf70, 1, 1, "B"); + Cefzhf227->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzhf227->SetMarkerStyle(20); + Cefzhf227->SetMarkerSize(0.4); + Cefzhf227->SetXTitle("Amplitude \b"); + Cefzhf227->SetYTitle(" \b"); + Cefzhf227->SetMarkerColor(2); + Cefzhf227->SetLineColor(2); + // Cefzhf227->SetMaximum(1.000); + // Cefzhf227->SetMinimum(0.0001); + Cefzhf227->Draw("COLZ"); + + c1->cd(4); + TH1F *twodhf81= (TH1F*)dir->FindObjectAny("h_amplvspedw_HF"); + TH1F *twodhf80= (TH1F*)dir->FindObjectAny("h_amplvsped0_HF"); + twodhf81->Sumw2(); + twodhf80->Sumw2(); +// if(twodhf80->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzhf228= (TH1F*)twodhf81->Clone("Cefzhf228"); + Cefzhf228->Divide(twodhf81,twodhf80, 1, 1, "B"); + Cefzhf228->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzhf228->SetMarkerStyle(20); + Cefzhf228->SetMarkerSize(0.4); + Cefzhf228->SetXTitle("Amplitude \b"); + Cefzhf228->SetYTitle(" \b"); + Cefzhf228->SetMarkerColor(2); + Cefzhf228->SetLineColor(2); + // Cefzhf228->SetMaximum(1.000); + // Cefzhf228->SetMinimum(0.0001); + Cefzhf228->Draw("COLZ"); + + */ + + c1->Update(); + + + //=============================================================================================== 6 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + /* + c1->cd(1); + TH1F *twodho1= (TH1F*)dir->FindObjectAny("h_pedvsampl_HO"); + TH1F *twodho0= (TH1F*)dir->FindObjectAny("h_pedvsampl0_HO"); + twodho1->Sumw2(); + twodho0->Sumw2(); +// if(twodho0->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzho225= (TH1F*)twodho1->Clone("Cefzho225"); + Cefzho225->Divide(twodho1,twodho0, 1, 1, "B"); + Cefzho225->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzho225->SetMarkerStyle(20); + Cefzho225->SetMarkerSize(0.4); + Cefzho225->SetXTitle("Pedestals \b"); + Cefzho225->SetYTitle(" \b"); + Cefzho225->SetMarkerColor(2); + Cefzho225->SetLineColor(2); + // Cefzho225->SetMaximum(1.000); + // Cefzho225->SetMinimum(0.0001); + Cefzho225->Draw("COLZ"); + + c1->cd(2); + TH1F *twodho61= (TH1F*)dir->FindObjectAny("h_pedwvsampl_HO"); + TH1F *twodho60= (TH1F*)dir->FindObjectAny("h_pedwvsampl0_HO"); + twodho61->Sumw2(); + twodho60->Sumw2(); +// if(twodho60->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzho226= (TH1F*)twodho61->Clone("Cefzho226"); + Cefzho226->Divide(twodho61,twodho60, 1, 1, "B"); + Cefzho226->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzho226->SetMarkerStyle(20); + Cefzho226->SetMarkerSize(0.4); + Cefzho226->SetXTitle("Width_Pedestals \b"); + Cefzho226->SetYTitle(" \b"); + Cefzho226->SetMarkerColor(2); + Cefzho226->SetLineColor(2); + // Cefzho226->SetMaximum(1.000); + // Cefzho226->SetMinimum(0.0001); + Cefzho226->Draw("COLZ"); + + c1->cd(3); + TH1F *twodho71= (TH1F*)dir->FindObjectAny("h_amplvsped_HO"); + TH1F *twodho70= (TH1F*)dir->FindObjectAny("h_amplvsped0_HO"); + twodho71->Sumw2(); + twodho70->Sumw2(); +// if(twodho70->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzho227= (TH1F*)twodho71->Clone("Cefzho227"); + Cefzho227->Divide(twodho71,twodho70, 1, 1, "B"); + Cefzho227->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzho227->SetMarkerStyle(20); + Cefzho227->SetMarkerSize(0.4); + Cefzho227->SetXTitle("Amplitude \b"); + Cefzho227->SetYTitle(" \b"); + Cefzho227->SetMarkerColor(2); + Cefzho227->SetLineColor(2); + // Cefzho227->SetMaximum(1.000); + // Cefzho227->SetMinimum(0.0001); + Cefzho227->Draw("COLZ"); + + c1->cd(4); + TH1F *twodho81= (TH1F*)dir->FindObjectAny("h_amplvspedw_HO"); + TH1F *twodho80= (TH1F*)dir->FindObjectAny("h_amplvsped0_HO"); + twodho81->Sumw2(); + twodho80->Sumw2(); +// if(twodho80->IsA()->InheritsFrom("TH1F")){ + TH1F* Cefzho228= (TH1F*)twodho81->Clone("Cefzho228"); + Cefzho228->Divide(twodho81,twodho80, 1, 1, "B"); + Cefzho228->Sumw2(); +// } + gPad->SetGridy(); + gPad->SetGridx(); + Cefzho228->SetMarkerStyle(20); + Cefzho228->SetMarkerSize(0.4); + Cefzho228->SetXTitle("Amplitude \b"); + Cefzho228->SetYTitle(" \b"); + Cefzho228->SetMarkerColor(2); + Cefzho228->SetLineColor(2); + // Cefzho228->SetMaximum(1.000); + // Cefzho228->SetMinimum(0.0001); + Cefzho228->Draw("COLZ"); + + */ + + c1->Update(); + + + + //====================================================================== + //======================================================================================== end + //====================================================================== + //====================================================================== + // close and delete all possible things: + + // psfile->Close(); + psfile.Close(); + + hfile1->Close(); + // hfile1->Delete(); + hfile1->Close(); + // hfile1->Delete(); + + // Exit Root + gSystem->Exit(0); + //====================================================================== +} diff --git a/DPGAnalysis/HcalTools/macros/cmt/zcorrtsnvsampltest.cc b/DPGAnalysis/HcalTools/macros/cmt/zcorrtsnvsampltest.cc new file mode 100644 index 0000000000000..9246e0d483ec8 --- /dev/null +++ b/DPGAnalysis/HcalTools/macros/cmt/zcorrtsnvsampltest.cc @@ -0,0 +1,787 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//##### +#include +#include +#include "TH1.h" +#include "TH2.h" +#include "TCanvas.h" +#include "TROOT.h" +#include +#include "TStyle.h" +#include "TSystem.h" +#include "TLegend.h" +#include "TText.h" +#include "TAxis.h" +#include "TFile.h" +#include "TLine.h" +#include "TGraph.h" +#include +#include +#include + +// +using namespace std; +// +// + +//inline void HERE(const char *msg) { std::cout << msg << std::endl; } + +int main(int argc, char *argv[]) { + std::string dirnm = "Analyzer"; + //====================================================================== + printf("reco: gROOT Reset \n"); + gROOT->Reset(); + gROOT->SetStyle("Plain"); + gStyle->SetOptStat(0); // no statistics _or_ + // gStyle->SetOptStat(11111111); + //gStyle->SetOptStat(1101);// name mean and rms + // gStyle->SetOptStat(0101);// name and entries + // gStyle->SetOptStat(1100);// mean and rms only !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // gStyle->SetOptStat(1110000);// und over, integral !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// gStyle->SetOptStat(101110); // entries, mean, rms, overflow !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // gStyle->SetOptStat(100000);// over !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // + //gStyle->SetOptFit(00010);// constant, mean and sigma only !! + // gStyle->SetOptFit(00001);// hi2/nu, constant, mean and sigma only !! + gStyle->SetOptFit(0010); // constant, mean and sigma only !! + // gStyle->SetOptFit(00011);// constant, mean and sigma only !! + // gStyle->SetOptFit(1101); + // gStyle->SetOptFit(1011); + // + //gStyle->SetStatX(0.98); + //gStyle->SetStatY(0.99); + //gStyle->SetStatW(0.30); + //gStyle->SetStatH(0.25); + gStyle->SetStatX(0.91); + gStyle->SetStatY(0.75); + gStyle->SetStatW(0.20); + gStyle->SetStatH(0.10); + // gStyle->SetStatH(0.35); + // + + // Float_t LeftOffset = 0.12; + //Float_t TopOffset = 0.12; + Float_t LeftOffset = 0.12; + Float_t TopOffset = 0.22; + + gStyle->SetLineWidth(1); + gStyle->SetErrorX(0); + + //---=[ Titles,Labels ]=----------- + gStyle->SetOptTitle(0); // title on/off + // gStyle->SetTitleColor(0); // title color + gStyle->SetTitleColor(1); // title color + // gStyle->SetTitleX(0.35); // title x-position + gStyle->SetTitleX(0.15); // title x-position + gStyle->SetTitleH(0.15); // title height + // gStyle->SetTitleW(0.53); // title width + gStyle->SetTitleW(0.60); // title width + gStyle->SetTitleFont(42); // title font + gStyle->SetTitleFontSize(0.07); // title font size + + gStyle->SetPalette(1); + //---=[ Histogram style ]=---------- + // gStyle->SetHistFillColor(38); + // gStyle->SetFrameFillColor(41);// jelto-kori4nev-svetl + // gStyle->SetFrameFillColor(5);// jeltyi + // gStyle->SetFrameFillColor(17);// seryi + // gStyle->SetFrameFillColor(18);// svetlo seryi + // gStyle->SetFrameFillColor(20);// svetlo kori4nev + // gStyle->SetFrameFillColor(33);// sine-seryi + // gStyle->SetFrameFillColor(40);// fiolet-seryi + // gStyle->SetFrameFillColor(23);// sv.kor + + //---=[ Pad style ]=---------------- + gStyle->SetPadTopMargin(TopOffset); + gStyle->SetPadBottomMargin(LeftOffset); + gStyle->SetPadRightMargin(TopOffset); + gStyle->SetPadLeftMargin(LeftOffset); + //---=[ SetCanvasDef ]=---------------- + //====================================================================== + // + // Connect the input file and get the 2-d histogram in memory + //====================================================================== + // TBrowser *b = new TBrowser + + + + TFile *hfile1 = new TFile("Global_362596.root", "READ"); + //TFile *hfile1 = new TFile("Global_362365.root", "READ"); + + TPostScript psfile("zcorrtsnvsampltest.ps", 111); + + // + + TCanvas *c1 = new TCanvas("c1", "Hcal4test", 200, 10, 700, 900); + + hfile1->ls(); + TDirectory *dir = (TDirectory *)hfile1->FindObjectAny(dirnm.c_str()); + + //=============================================================================================== 1 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + c1->cd(1); + TH2F *two11= (TH2F*)dir->FindObjectAny("h2_TSnVsAyear2023_HB"); + gPad->SetGridy(); + gPad->SetGridx(); + two11->SetMarkerStyle(20); + two11->SetMarkerSize(0.4); + two11->SetYTitle("timing HB \b"); + two11->SetXTitle("Q HB\b"); + two11->SetMarkerColor(1); + two11->SetLineColor(1); + // gPad->SetLogx(); + // gPad->SetLogy(); + two11->Draw("BOX"); + // two11->Draw(""); + // two11->Draw("COLZ"); + + c1->cd(2); + TH2F *two12= (TH2F*)dir->FindObjectAny("h2_TSnVsAyear2023_HE"); + gPad->SetGridy(); + gPad->SetGridx(); + two12->SetMarkerStyle(20); + two12->SetMarkerSize(0.4); + two12->SetYTitle("timing HE \b"); + two12->SetXTitle("Q HE\b"); + two12->SetMarkerColor(1); + two12->SetLineColor(1); + // gPad->SetLogy(); + two12->Draw("BOX"); + // two12->Draw("SCAT"); + + c1->cd(3); + TH2F *two22= (TH2F*)dir->FindObjectAny("h2_TSnVsAyear2023_HF"); + gPad->SetGridy(); + gPad->SetGridx(); + two22->SetMarkerStyle(20); + two22->SetMarkerSize(0.4); + two22->SetYTitle("timing HF \b"); + two22->SetXTitle("Q HF\b"); + two22->SetMarkerColor(1); + two22->SetLineColor(1); + two22->Draw("BOX"); + // two22->Draw("ARR"); + + c1->cd(4); + TH2F *two23= (TH2F*)dir->FindObjectAny("h2_TSnVsAyear2023_HO"); + gPad->SetGridy(); + gPad->SetGridx(); + two23->SetMarkerStyle(20); + two23->SetMarkerSize(0.4); + two23->SetYTitle("timing HO \b"); + two23->SetXTitle("Q HO\b"); + two23->SetMarkerColor(1); + two23->SetLineColor(1); + two23->Draw("BOX"); + + c1->Update(); + + //========================================================================================== 2 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(1, 4); + + c1->cd(1); + TH1F *TSNvsQ_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HB"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); + TSNvsQ_HB->SetMarkerStyle(20); + TSNvsQ_HB->SetMarkerSize(0.6); + TSNvsQ_HB->GetYaxis()->SetLabelSize(0.04); + TSNvsQ_HB->SetXTitle("Q,fb HB \b"); + TSNvsQ_HB->SetYTitle("iev*ieta*iphi*idepth \b"); + TSNvsQ_HB->SetMarkerColor(4); + TSNvsQ_HB->SetLineColor(0); + TSNvsQ_HB->SetMinimum(0.8); + //TSNvsQ_HB->GetXaxis()->SetRangeUser(0, MaxLumDanila + 5.); + TSNvsQ_HB->Draw("E"); + + c1->cd(2); + TH1F *TSNvsQ_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HE"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); + TSNvsQ_HE->SetMarkerStyle(20); + TSNvsQ_HE->SetMarkerSize(0.6); + TSNvsQ_HE->GetYaxis()->SetLabelSize(0.04); + TSNvsQ_HE->SetXTitle("Q,fb HE \b"); + TSNvsQ_HE->SetYTitle("iev*ieta*iphi*idepth \b"); + TSNvsQ_HE->SetMarkerColor(4); + TSNvsQ_HE->SetLineColor(0); + TSNvsQ_HE->SetMinimum(0.8); + //TSNvsQ_HE->GetXaxis()->SetRangeUser(0, MaxLumDanila + 5.); + TSNvsQ_HE->Draw("E"); + + c1->cd(3); + TH1F *TSNvsQ_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HF"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); + TSNvsQ_HF->SetMarkerStyle(20); + TSNvsQ_HF->SetMarkerSize(0.6); + TSNvsQ_HF->GetYaxis()->SetLabelSize(0.04); + TSNvsQ_HF->SetXTitle("Q,fb HF \b"); + TSNvsQ_HF->SetYTitle("iev*ieta*iphi*idepth \b"); + TSNvsQ_HF->SetMarkerColor(4); + TSNvsQ_HF->SetLineColor(0); + TSNvsQ_HF->SetMinimum(0.8); + //TSNvsQ_HF->GetXaxis()->SetRangeUser(0, MaxLumDanila + 5.); + TSNvsQ_HF->Draw("E"); + + c1->cd(4); + TH1F *TSNvsQ_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HO"); + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogy(); + TSNvsQ_HO->SetMarkerStyle(20); + TSNvsQ_HO->SetMarkerSize(0.6); + TSNvsQ_HO->GetYaxis()->SetLabelSize(0.04); + TSNvsQ_HO->SetXTitle("Q,fb HO \b"); + TSNvsQ_HO->SetYTitle("iev*ieta*iphi*idepth \b"); + TSNvsQ_HO->SetMarkerColor(4); + TSNvsQ_HO->SetLineColor(0); + TSNvsQ_HO->SetMinimum(0.8); + //TSNvsQ_HO->GetXaxis()->SetRangeUser(0, MaxLumDanila + 5.); + TSNvsQ_HO->Draw("E"); + + + + c1->Update(); + + //========================================================================================== 3 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(1, 4); + + c1->cd(1); + TH1F *twod1_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HB"); + TH1F *twod0_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HB"); + twod1_HB->Sumw2(); + twod0_HB->Sumw2(); + TH1F* Ceff_HB= (TH1F*)twod1_HB->Clone("Ceff_HB"); + // Ceff_HB->Sumw2(); + for (int x = 1; x <= twod1_HB->GetXaxis()->GetNbins(); x++) { + twod1_HB->SetBinError(float(x), 0.001); + } //end x + Ceff_HB->Divide(twod1_HB,twod0_HB, 1, 1, "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Ceff_HB->SetMarkerStyle(20); + Ceff_HB->SetMarkerSize(0.4); + Ceff_HB->SetXTitle("Q, fc \b"); + Ceff_HB->SetYTitle("HB \b"); + Ceff_HB->SetMarkerColor(2); + Ceff_HB->SetLineColor(2); + Ceff_HB->SetMaximum(140.); + Ceff_HB->SetMinimum(30.); + Ceff_HB->Draw("E"); + //Ceff_HB->Draw("COLZ"); + + c1->cd(2); + TH1F *twod1_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HE"); + TH1F *twod0_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HE"); + // twod1_HE->Sumw2(); + // twod0_HE->Sumw2(); + TH1F* Ceff_HE= (TH1F*)twod1_HE->Clone("Ceff_HE"); + // Ceff_HE->Sumw2(); + for (int x = 1; x <= twod1_HE->GetXaxis()->GetNbins(); x++) { + twod1_HE->SetBinError(float(x), 0.001); + } //end x + Ceff_HE->Divide(twod1_HE,twod0_HE, 1, 1, "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Ceff_HE->SetMarkerStyle(20); + Ceff_HE->SetMarkerSize(0.4); + Ceff_HE->SetXTitle("Q, fc \b"); + Ceff_HE->SetYTitle("HE \b"); + Ceff_HE->SetMarkerColor(2); + Ceff_HE->SetLineColor(2); + Ceff_HE->SetMaximum(150.); + Ceff_HE->SetMinimum(25.); + Ceff_HE->Draw("E"); + //Ceff_HE->Draw("COLZ"); + + c1->cd(3); + TH1F *twod1_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HF"); + TH1F *twod0_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HF"); + // twod1_HF->Sumw2(); + // twod0_HF->Sumw2(); + TH1F* Ceff_HF= (TH1F*)twod1_HF->Clone("Ceff_HF"); + // Ceff_HF->Sumw2(); + for (int x = 1; x <= twod1_HF->GetXaxis()->GetNbins(); x++) { + twod1_HF->SetBinError(float(x), 0.001); + } //end x + Ceff_HF->Divide(twod1_HF,twod0_HF, 1, 1, "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Ceff_HF->SetMarkerStyle(20); + Ceff_HF->SetMarkerSize(0.4); + Ceff_HF->SetXTitle("Q, fc \b"); + Ceff_HF->SetYTitle("HF \b"); + Ceff_HF->SetMarkerColor(2); + Ceff_HF->SetLineColor(2); + Ceff_HF->SetMaximum(50.); + Ceff_HF->SetMinimum(0.); + Ceff_HF->Draw("E"); + //Ceff_HF->Draw("COLZ"); + + c1->cd(4); + TH1F *twod1_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HO"); + TH1F *twod0_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HO"); + // twod1_HO->Sumw2(); + // twod0_HO->Sumw2(); + TH1F* Ceff_HO= (TH1F*)twod1_HO->Clone("Ceff_HO"); + // Ceff_HO->Sumw2(); + for (int x = 1; x <= twod1_HO->GetXaxis()->GetNbins(); x++) { + twod1_HO->SetBinError(float(x), 0.001); + } //end x + Ceff_HO->Divide(twod1_HO,twod0_HO, 1, 1, "B"); + gPad->SetGridy(); + gPad->SetGridx(); + Ceff_HO->SetMarkerStyle(20); + Ceff_HO->SetMarkerSize(0.4); + Ceff_HO->SetXTitle("Q, fc \b"); + Ceff_HO->SetYTitle("HO \b"); + Ceff_HO->SetMarkerColor(2); + Ceff_HO->SetLineColor(2); + Ceff_HO->SetMaximum(150.); + Ceff_HO->SetMinimum(70.); + Ceff_HO->Draw("E"); + //Ceff_HO->Draw("COLZ"); + + + c1->Update(); + + //========================================================================================== 4 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2, 2); + + c1->cd(1); + TH2F *dva1_HBDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HB"); + TH2F *dva0_HBDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HB"); + //dva1_HBDepth1->Sumw2(); + //dva0_HBDepth1->Sumw2(); + TH2F* Seff_HBDepth1= (TH2F*)dva1_HBDepth1->Clone("Seff_HBDepth1"); + Seff_HBDepth1->Divide(dva1_HBDepth1,dva0_HBDepth1, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HBDepth1->SetMarkerStyle(20); + Seff_HBDepth1->SetMarkerSize(0.4); + Seff_HBDepth1->SetXTitle("#eta \b"); + Seff_HBDepth1->SetYTitle("#phi \b"); + Seff_HBDepth1->SetZTitle(" HB Depth1 \b"); + Seff_HBDepth1->SetMarkerColor(2); + Seff_HBDepth1->SetLineColor(2); + Seff_HBDepth1->SetMaximum(90.); + Seff_HBDepth1->SetMinimum(85.); + Seff_HBDepth1->Draw("COLZ"); + + c1->cd(2); + TH2F *dva1_HBDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HB"); + TH2F *dva0_HBDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HB"); + //dva1_HBDepth2->Sumw2(); + //dva0_HBDepth2->Sumw2(); + TH2F* Seff_HBDepth2= (TH2F*)dva1_HBDepth2->Clone("Seff_HBDepth2"); + Seff_HBDepth2->Divide(dva1_HBDepth2,dva0_HBDepth2, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HBDepth2->SetMarkerStyle(20); + Seff_HBDepth2->SetMarkerSize(0.4); + Seff_HBDepth2->SetXTitle("#eta \b"); + Seff_HBDepth2->SetYTitle("#phi \b"); + Seff_HBDepth2->SetZTitle(" HB Depth2 \b"); + Seff_HBDepth2->SetMarkerColor(2); + Seff_HBDepth2->SetLineColor(2); + Seff_HBDepth2->SetMaximum(90.); + Seff_HBDepth2->SetMinimum(85.); + Seff_HBDepth2->Draw("COLZ"); + + c1->cd(3); + TH2F *dva1_HBDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HB"); + TH2F *dva0_HBDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HB"); + //dva1_HBDepth3->Sumw2(); + //dva0_HBDepth3->Sumw2(); + TH2F* Seff_HBDepth3= (TH2F*)dva1_HBDepth3->Clone("Seff_HBDepth3"); + Seff_HBDepth3->Divide(dva1_HBDepth3,dva0_HBDepth3, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HBDepth3->SetMarkerStyle(20); + Seff_HBDepth3->SetMarkerSize(0.4); + Seff_HBDepth3->SetXTitle("#eta \b"); + Seff_HBDepth3->SetYTitle("#phi \b"); + Seff_HBDepth3->SetZTitle(" HB Depth3 \b"); + Seff_HBDepth3->SetMarkerColor(2); + Seff_HBDepth3->SetLineColor(2); + Seff_HBDepth3->SetMaximum(90.); + Seff_HBDepth3->SetMinimum(85.); + Seff_HBDepth3->Draw("COLZ"); + + c1->cd(4); + TH2F *dva1_HBDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HB"); + TH2F *dva0_HBDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HB"); + //dva1_HBDepth4->Sumw2(); + //dva0_HBDepth4->Sumw2(); + TH2F* Seff_HBDepth4= (TH2F*)dva1_HBDepth4->Clone("Seff_HBDepth4"); + Seff_HBDepth4->Divide(dva1_HBDepth4,dva0_HBDepth4, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HBDepth4->SetMarkerStyle(20); + Seff_HBDepth4->SetMarkerSize(0.4); + Seff_HBDepth4->SetXTitle("#eta \b"); + Seff_HBDepth4->SetYTitle("#phi \b"); + Seff_HBDepth4->SetZTitle(" HB Depth4 \b"); + Seff_HBDepth4->SetMarkerColor(2); + Seff_HBDepth4->SetLineColor(2); + Seff_HBDepth4->SetMaximum(90.); + Seff_HBDepth4->SetMinimum(85.); + Seff_HBDepth4->Draw("COLZ"); + + + c1->Update(); + + //========================================================================================== 5 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2, 4); + + c1->cd(1); + TH2F *dva1_HEDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HE"); + TH2F *dva0_HEDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HE"); + //dva1_HEDepth1->Sumw2(); + //dva0_HEDepth1->Sumw2(); + TH2F* Seff_HEDepth1= (TH2F*)dva1_HEDepth1->Clone("Seff_HEDepth1"); + Seff_HEDepth1->Divide(dva1_HEDepth1,dva0_HEDepth1, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HEDepth1->SetMarkerStyle(20); + Seff_HEDepth1->SetMarkerSize(0.4); + Seff_HEDepth1->SetXTitle("#eta \b"); + Seff_HEDepth1->SetYTitle("#phi \b"); + Seff_HEDepth1->SetZTitle(" HE Depth1 \b"); + Seff_HEDepth1->SetMarkerColor(2); + Seff_HEDepth1->SetLineColor(2); + Seff_HEDepth1->SetMaximum(90.); + Seff_HEDepth1->SetMinimum(85.); + Seff_HEDepth1->Draw("COLZ"); + + c1->cd(2); + TH2F *dva1_HEDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HE"); + TH2F *dva0_HEDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HE"); + //dva1_HEDepth2->Sumw2(); + //dva0_HEDepth2->Sumw2(); + TH2F* Seff_HEDepth2= (TH2F*)dva1_HEDepth2->Clone("Seff_HEDepth2"); + Seff_HEDepth2->Divide(dva1_HEDepth2,dva0_HEDepth2, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HEDepth2->SetMarkerStyle(20); + Seff_HEDepth2->SetMarkerSize(0.4); + Seff_HEDepth2->SetXTitle("#eta \b"); + Seff_HEDepth2->SetYTitle("#phi \b"); + Seff_HEDepth2->SetZTitle(" HE Depth2 \b"); + Seff_HEDepth2->SetMarkerColor(2); + Seff_HEDepth2->SetLineColor(2); + Seff_HEDepth2->SetMaximum(90.); + Seff_HEDepth2->SetMinimum(85.); + Seff_HEDepth2->Draw("COLZ"); + + c1->cd(3); + TH2F *dva1_HEDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HE"); + TH2F *dva0_HEDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HE"); + //dva1_HEDepth3->Sumw2(); + //dva0_HEDepth3->Sumw2(); + TH2F* Seff_HEDepth3= (TH2F*)dva1_HEDepth3->Clone("Seff_HEDepth3"); + Seff_HEDepth3->Divide(dva1_HEDepth3,dva0_HEDepth3, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HEDepth3->SetMarkerStyle(20); + Seff_HEDepth3->SetMarkerSize(0.4); + Seff_HEDepth3->SetXTitle("#eta \b"); + Seff_HEDepth3->SetYTitle("#phi \b"); + Seff_HEDepth3->SetZTitle(" HE Depth3 \b"); + Seff_HEDepth3->SetMarkerColor(2); + Seff_HEDepth3->SetLineColor(2); + Seff_HEDepth3->SetMaximum(90.); + Seff_HEDepth3->SetMinimum(85.); + Seff_HEDepth3->Draw("COLZ"); + + c1->cd(4); + TH2F *dva1_HEDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HE"); + TH2F *dva0_HEDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HE"); + //dva1_HEDepth4->Sumw2(); + //dva0_HEDepth4->Sumw2(); + TH2F* Seff_HEDepth4= (TH2F*)dva1_HEDepth4->Clone("Seff_HEDepth4"); + Seff_HEDepth4->Divide(dva1_HEDepth4,dva0_HEDepth4, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HEDepth4->SetMarkerStyle(20); + Seff_HEDepth4->SetMarkerSize(0.4); + Seff_HEDepth4->SetXTitle("#eta \b"); + Seff_HEDepth4->SetYTitle("#phi \b"); + Seff_HEDepth4->SetZTitle(" HE Depth4 \b"); + Seff_HEDepth4->SetMarkerColor(2); + Seff_HEDepth4->SetLineColor(2); + Seff_HEDepth4->SetMaximum(90.); + Seff_HEDepth4->SetMinimum(85.); + Seff_HEDepth4->Draw("COLZ"); + + c1->cd(5); + TH2F *dva1_HEDepth5 = (TH2F *)dir->FindObjectAny("h_mapDepth5TSmeanA_HE"); + TH2F *dva0_HEDepth5 = (TH2F *)dir->FindObjectAny("h_mapDepth5_HE"); + //dva1_HEDepth5->Sumw2(); + //dva0_HEDepth5->Sumw2(); + TH2F* Seff_HEDepth5= (TH2F*)dva1_HEDepth5->Clone("Seff_HEDepth5"); + Seff_HEDepth5->Divide(dva1_HEDepth5,dva0_HEDepth5, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HEDepth5->SetMarkerStyle(20); + Seff_HEDepth5->SetMarkerSize(0.4); + Seff_HEDepth5->SetXTitle("#eta \b"); + Seff_HEDepth5->SetYTitle("#phi \b"); + Seff_HEDepth5->SetZTitle(" HE Depth5 \b"); + Seff_HEDepth5->SetMarkerColor(2); + Seff_HEDepth5->SetLineColor(2); + Seff_HEDepth5->SetMaximum(90.); + Seff_HEDepth5->SetMinimum(85.); + Seff_HEDepth5->Draw("COLZ"); + + c1->cd(6); + TH2F *dva1_HEDepth6 = (TH2F *)dir->FindObjectAny("h_mapDepth6TSmeanA_HE"); + TH2F *dva0_HEDepth6 = (TH2F *)dir->FindObjectAny("h_mapDepth6_HE"); + //dva1_HEDepth6->Sumw2(); + //dva0_HEDepth6->Sumw2(); + TH2F* Seff_HEDepth6= (TH2F*)dva1_HEDepth6->Clone("Seff_HEDepth6"); + Seff_HEDepth6->Divide(dva1_HEDepth6,dva0_HEDepth6, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HEDepth6->SetMarkerStyle(20); + Seff_HEDepth6->SetMarkerSize(0.4); + Seff_HEDepth6->SetXTitle("#eta \b"); + Seff_HEDepth6->SetYTitle("#phi \b"); + Seff_HEDepth6->SetZTitle(" HE Depth6 \b"); + Seff_HEDepth6->SetMarkerColor(2); + Seff_HEDepth6->SetLineColor(2); + Seff_HEDepth6->SetMaximum(90.); + Seff_HEDepth6->SetMinimum(85.); + Seff_HEDepth6->Draw("COLZ"); + + c1->cd(7); + TH2F *dva1_HEDepth7 = (TH2F *)dir->FindObjectAny("h_mapDepth7TSmeanA_HE"); + TH2F *dva0_HEDepth7 = (TH2F *)dir->FindObjectAny("h_mapDepth7_HE"); + //dva1_HEDepth7->Sumw2(); + //dva0_HEDepth7->Sumw2(); + TH2F* Seff_HEDepth7= (TH2F*)dva1_HEDepth7->Clone("Seff_HEDepth7"); + Seff_HEDepth7->Divide(dva1_HEDepth7,dva0_HEDepth7, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HEDepth7->SetMarkerStyle(20); + Seff_HEDepth7->SetMarkerSize(0.4); + Seff_HEDepth7->SetXTitle("#eta \b"); + Seff_HEDepth7->SetYTitle("#phi \b"); + Seff_HEDepth7->SetZTitle(" HE Depth7 \b"); + Seff_HEDepth7->SetMarkerColor(2); + Seff_HEDepth7->SetLineColor(2); + Seff_HEDepth7->SetMaximum(90.); + Seff_HEDepth7->SetMinimum(85.); + Seff_HEDepth7->Draw("COLZ"); + + + c1->Update(); + + //========================================================================================== 6 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2, 2); + + c1->cd(1); + TH2F *dva1_HFDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HF"); + TH2F *dva0_HFDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HF"); + //dva1_HFDepth1->Sumw2(); + //dva0_HFDepth1->Sumw2(); + TH2F* Seff_HFDepth1= (TH2F*)dva1_HFDepth1->Clone("Seff_HFDepth1"); + Seff_HFDepth1->Divide(dva1_HFDepth1,dva0_HFDepth1, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HFDepth1->SetMarkerStyle(20); + Seff_HFDepth1->SetMarkerSize(0.4); + Seff_HFDepth1->SetXTitle("#eta \b"); + Seff_HFDepth1->SetYTitle("#phi \b"); + Seff_HFDepth1->SetZTitle(" HF Depth1 \b"); + Seff_HFDepth1->SetMarkerColor(2); + Seff_HFDepth1->SetLineColor(2); + Seff_HFDepth1->SetMaximum(27.); + Seff_HFDepth1->SetMinimum(23.); + Seff_HFDepth1->Draw("COLZ"); + + c1->cd(2); + TH2F *dva1_HFDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HF"); + TH2F *dva0_HFDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HF"); + //dva1_HFDepth2->Sumw2(); + //dva0_HFDepth2->Sumw2(); + TH2F* Seff_HFDepth2= (TH2F*)dva1_HFDepth2->Clone("Seff_HFDepth2"); + Seff_HFDepth2->Divide(dva1_HFDepth2,dva0_HFDepth2, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HFDepth2->SetMarkerStyle(20); + Seff_HFDepth2->SetMarkerSize(0.4); + Seff_HFDepth2->SetXTitle("#eta \b"); + Seff_HFDepth2->SetYTitle("#phi \b"); + Seff_HFDepth2->SetZTitle(" HF Depth2 \b"); + Seff_HFDepth2->SetMarkerColor(2); + Seff_HFDepth2->SetLineColor(2); + Seff_HFDepth2->SetMaximum(27.); + Seff_HFDepth2->SetMinimum(23.); + Seff_HFDepth2->Draw("COLZ"); + + c1->cd(3); + TH2F *dva1_HFDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HF"); + TH2F *dva0_HFDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HF"); + //dva1_HFDepth3->Sumw2(); + //dva0_HFDepth3->Sumw2(); + TH2F* Seff_HFDepth3= (TH2F*)dva1_HFDepth3->Clone("Seff_HFDepth3"); + Seff_HFDepth3->Divide(dva1_HFDepth3,dva0_HFDepth3, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HFDepth3->SetMarkerStyle(20); + Seff_HFDepth3->SetMarkerSize(0.4); + Seff_HFDepth3->SetXTitle("#eta \b"); + Seff_HFDepth3->SetYTitle("#phi \b"); + Seff_HFDepth3->SetZTitle(" HF Depth3 \b"); + Seff_HFDepth3->SetMarkerColor(2); + Seff_HFDepth3->SetLineColor(2); + Seff_HFDepth3->SetMaximum(27.); + Seff_HFDepth3->SetMinimum(23.); + Seff_HFDepth3->Draw("COLZ"); + + c1->cd(4); + TH2F *dva1_HFDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HF"); + TH2F *dva0_HFDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HF"); + //dva1_HFDepth4->Sumw2(); + //dva0_HFDepth4->Sumw2(); + TH2F* Seff_HFDepth4= (TH2F*)dva1_HFDepth4->Clone("Seff_HFDepth4"); + Seff_HFDepth4->Divide(dva1_HFDepth4,dva0_HFDepth4, 25., 1., "B"); + gPad->SetGridy(); + gPad->SetGridx(); + //gPad->SetLogz(); + Seff_HFDepth4->SetMarkerStyle(20); + Seff_HFDepth4->SetMarkerSize(0.4); + Seff_HFDepth4->SetXTitle("#eta \b"); + Seff_HFDepth4->SetYTitle("#phi \b"); + Seff_HFDepth4->SetZTitle(" HF Depth4 \b"); + Seff_HFDepth4->SetMarkerColor(2); + Seff_HFDepth4->SetLineColor(2); + Seff_HFDepth4->SetMaximum(27.); + Seff_HFDepth4->SetMinimum(23.); + Seff_HFDepth4->Draw("COLZ"); + + + c1->Update(); + + //========================================================================================== 7 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(1, 1); + + c1->cd(1); + TH2F *dva1_HODepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HO"); + for (int i=1;i<=dva1_HODepth4->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=dva1_HODepth4->GetYaxis()->GetNbins();j++) { + double ccc1 = dva1_HODepth4->GetBinContent(i,j) ; + if(ccc1 > 0.) std::cout << "****** dva1_HODepth4 ************** i = " << i << " j = " << j << " ccc1 = " << ccc1 << std::endl; + } + } + TH2F *dva0_HODepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HO"); + for (int i=1;i<=dva0_HODepth4->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=dva0_HODepth4->GetYaxis()->GetNbins();j++) { + double ccc1 = dva0_HODepth4->GetBinContent(i,j) ; + if(ccc1 > 0.) std::cout << "****** dva0_HODepth4 ************** i = " << i << " j = " << j << " ccc1 = " << ccc1 << std::endl; + } + } + TH2F* Seff_HODepth4= (TH2F*)dva1_HODepth4->Clone("Seff_HODepth4"); + Seff_HODepth4->Divide(dva1_HODepth4,dva0_HODepth4, 25., 1., "B"); + for (int i=1;i<=Seff_HODepth4->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=Seff_HODepth4->GetYaxis()->GetNbins();j++) { + double ccc1 = Seff_HODepth4->GetBinContent(i,j); + if(ccc1 > 0.) std::cout << "****** Seff_HODepth4 ************** i = " << i << " j = " << j << " ccc1 = " << ccc1 << std::endl; + } + } + gPad->SetGridy(); + gPad->SetGridx(); + Seff_HODepth4->SetMarkerStyle(20); + Seff_HODepth4->SetMarkerSize(0.4); + Seff_HODepth4->SetXTitle("#eta \b"); + Seff_HODepth4->SetYTitle("#phi \b"); + Seff_HODepth4->SetZTitle(" HB Depth1 \b"); + Seff_HODepth4->SetMarkerColor(2); + Seff_HODepth4->SetLineColor(2); + Seff_HODepth4->SetMaximum(115.); + Seff_HODepth4->SetMinimum(110.); + Seff_HODepth4->Draw("COLZ"); + + c1->Update(); + //====================================================================== + //======================================================================================== end + //====================================================================== + //====================================================================== + // close and delete all possible things: + + // psfile->Close(); + psfile.Close(); + + hfile1->Close(); + // hfile1->Delete(); + hfile1->Close(); + // hfile1->Delete(); + + // Exit Root + gSystem->Exit(0); + //====================================================================== +} diff --git a/DPGAnalysis/HcalTools/macros/cmt/zlumiadcampltest.cc b/DPGAnalysis/HcalTools/macros/cmt/zlumiadcampltest.cc index fdcd16932cf91..3d589497d1f32 100644 --- a/DPGAnalysis/HcalTools/macros/cmt/zlumiadcampltest.cc +++ b/DPGAnalysis/HcalTools/macros/cmt/zlumiadcampltest.cc @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) { // TFile *hfile1= new TFile("LEDtest.root", "READ"); // TFile *hfile1 = new TFile("Global_346445.root", "READ"); - TFile *hfile1 = new TFile("Global_346511.root", "READ"); + TFile *hfile1 = new TFile("Global_362365.root", "READ"); // TH1D *hist1(nullptr); // hist1 = (TH1D *)dir->FindObjectAny("h_mapDepth1_HE"); @@ -169,8 +169,8 @@ int main(int argc, char *argv[]) { // - // TCanvas *c1 = new TCanvas("c1", "Hcal4test", 200, 10, 700, 900); - TCanvas *c1 = new TCanvas("c1", "Hcal4test", 1000, 500); + TCanvas *c1 = new TCanvas("c1", "Hcal4test", 200, 10, 700, 900); + // TCanvas *c1 = new TCanvas("c1", "Hcal4test", 1000, 500); hfile1->ls(); TDirectory *dir = (TDirectory *)hfile1->FindObjectAny(dirnm.c_str()); diff --git a/DPGAnalysis/HcalTools/macros/cmt/ztsmean.cc b/DPGAnalysis/HcalTools/macros/cmt/ztsmean.cc new file mode 100644 index 0000000000000..323c5b8f225cf --- /dev/null +++ b/DPGAnalysis/HcalTools/macros/cmt/ztsmean.cc @@ -0,0 +1,961 @@ +#include +#include +//##### +#include +#include +#include "TH1.h" +#include "TH2.h" +#include "TCanvas.h" +#include "TROOT.h" +#include +#include "TStyle.h" +#include "TSystem.h" +#include "TLegend.h" +#include "TText.h" +#include "TAxis.h" +#include "TFile.h" +#include "TLine.h" +#include "TGraph.h" +#include +#include +#include + +// +using namespace std; +// +// + +//inline void HERE(const char *msg) { std::cout << msg << std::endl; } + + +int main(int argc, char *argv[]){ + std::string dirnm = "Analyzer"; + //====================================================================== + printf("reco: gROOT Reset \n"); + gROOT->Reset(); + gROOT->SetStyle("Plain"); + gStyle->SetOptStat(0); // no statistics _or_ + // gStyle->SetOptStat(11111111); + //gStyle->SetOptStat(1101);// mame mean and rms + // gStyle->SetOptStat(0101);// name and entries + // gStyle->SetOptStat(1110000);// und over, integral !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // gStyle->SetOptStat(1100);// mean and rms only !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // gStyle->SetOptStat(1110000);// und over, integral !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // gStyle->SetOptStat(101110); // entries, meam, rms, overflow !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // + //gStyle->SetOptFit(00010);// constant, mean and sigma only !! + // gStyle->SetOptFit(00001);// hi2/nu, constant, mean and sigma only !! + gStyle->SetOptFit(0010);// constant, mean and sigma only !! + // gStyle->SetOptFit(00011);// constant, mean and sigma only !! + // gStyle->SetOptFit(1101); + // gStyle->SetOptFit(1011); + // + //gStyle->SetStatX(0.98); + //gStyle->SetStatY(0.99); + //gStyle->SetStatW(0.30); + //gStyle->SetStatH(0.25); + gStyle->SetStatX(0.91); + gStyle->SetStatY(0.75); + gStyle->SetStatW(0.20); + gStyle->SetStatH(0.10); + // gStyle->SetStatH(0.35); + // + + // Float_t LeftOffset = 0.12; + //Float_t TopOffset = 0.12; + Float_t LeftOffset = 0.12; + Float_t TopOffset = 0.22; + + gStyle->SetLineWidth(1); + gStyle->SetErrorX(0); + +//---=[ Titles,Labels ]=----------- + gStyle->SetOptTitle(0); // title on/off + // gStyle->SetTitleColor(0); // title color + gStyle->SetTitleColor(1); // title color + // gStyle->SetTitleX(0.35); // title x-position + gStyle->SetTitleX(0.15); // title x-position + gStyle->SetTitleH(0.15); // title height + // gStyle->SetTitleW(0.53); // title width + gStyle->SetTitleW(0.60); // title width + gStyle->SetTitleFont(42); // title font + gStyle->SetTitleFontSize(0.07); // title font size + + gStyle->SetPalette(1); +//---=[ Histogram style ]=---------- + // gStyle->SetHistFillColor(38); + // gStyle->SetFrameFillColor(41);// jelto-kori4nev-svetl + // gStyle->SetFrameFillColor(5);// jeltyi + // gStyle->SetFrameFillColor(17);// seryi + // gStyle->SetFrameFillColor(18);// svetlo seryi + // gStyle->SetFrameFillColor(20);// svetlo kori4nev + // gStyle->SetFrameFillColor(33);// sine-seryi + // gStyle->SetFrameFillColor(40);// fiolet-seryi + // gStyle->SetFrameFillColor(23);// sv.kor + +//---=[ Pad style ]=---------------- + gStyle->SetPadTopMargin(TopOffset); + gStyle->SetPadBottomMargin(LeftOffset); + gStyle->SetPadRightMargin(TopOffset); + gStyle->SetPadLeftMargin(LeftOffset); +//---=[ SetCanvasDef ]=---------------- + //====================================================================== +// +// Connect the input file and get the 2-d histogram in memory + //====================================================================== +// TBrowser *b = new TBrowser + +// TFile *hfile1= new TFile("/afs/cern.ch/user/z/zhokin/public/html/RMT/lastMarch2014/cmt/Global_229713.root", "READ"); + // TFile *hfile1= new TFile("test.root", "READ"); +// + + + TFile *hfile1 = new TFile("Global_362596.root", "READ"); + //TFile *hfile1 = new TFile("Global_362365.root", "READ"); + + TPostScript psfile("ztsmean.ps", 111); + + // + + TCanvas *c1 = new TCanvas("c1", "Hcal4test", 200, 10, 700, 900); + + + hfile1->ls(); + TDirectory *dir = (TDirectory *)hfile1->FindObjectAny(dirnm.c_str()); + + + + + + + //=============================================================================================== 1 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + TH2F *twod1= (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA_HB"); + TH2F *twod0= (TH2F*)dir->FindObjectAny("h_mapDepth1_HB"); + twod1->Sumw2(); + twod0->Sumw2(); + // if(twod0->IsA()->InheritsFrom("TH2F")){ + TH2F* Ceff = (TH2F*)twod1->Clone("Ceff"); + Ceff->Divide(twod1,twod0, 1, 1, "B"); + Ceff->Sumw2(); + // } + c1->cd(1); + TH2F *twop1= (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA225_HB"); + TH2F *twop0= (TH2F*)dir->FindObjectAny("h_mapDepth1_HB"); + twop1->Sumw2(); + twop0->Sumw2(); + // if(twop0->IsA()->InheritsFrom("TH2F")){ + TH2F* Cefz225= (TH2F*)twop1->Clone("Cefz225"); + Cefz225->Divide(twop1,twop0, 1, 1, "B"); + Cefz225->Sumw2(); + // } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Cefz225->SetMarkerStyle(20); + Cefz225->SetMarkerSize(0.4); + // Cefz225->GetYaxis()->SetLabelSize(0.04); + Cefz225->GetZaxis()->SetLabelSize(0.08); + Cefz225->SetXTitle("#eta \b"); + Cefz225->SetYTitle("#phi \b"); + Cefz225->SetZTitle("Rate for TSmeanA in each event & cell out 2.3-5 - HB Depth1 \b"); + Cefz225->SetMarkerColor(2); + Cefz225->SetLineColor(2); + Cefz225->SetMaximum(1.000); + Cefz225->SetMinimum(0.0001); + Cefz225->Draw("COLZ"); + + c1->cd(2); + TH1F *aaaaaa1= (TH1F*)dir->FindObjectAny("h_TSmeanA_HB"); + gPad->SetLogy(); + aaaaaa1->SetMarkerStyle(20); + aaaaaa1->SetMarkerSize(0.8); + aaaaaa1->GetYaxis()->SetLabelSize(0.04); + aaaaaa1->SetXTitle("TSmeanA in each event & cell HB \b"); + aaaaaa1->SetMarkerColor(2); + aaaaaa1->SetLineColor(2); + aaaaaa1->Draw(""); + + c1->cd(3); + /////////////////////////////////////// + TH2F* Diffe_Depth1_HB = (TH2F*)Ceff->Clone("Diffe_Depth1_HB"); + for (int i=1;i<=Ceff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=Ceff->GetYaxis()->GetNbins();j++) { + double ccc1 = Ceff->GetBinContent(i,j) ; + Diffe_Depth1_HB->SetBinContent(i,j,0.); + // Diffe_Depth1_HB->SetBinContent(i,j,ccc1); + if(ccc1 < 2.5 || ccc1>4.5) Diffe_Depth1_HB->SetBinContent(i,j,ccc1); + } + } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Diffe_Depth1_HB->SetMarkerStyle(20); + Diffe_Depth1_HB->SetMarkerSize(0.4); + Diffe_Depth1_HB->GetZaxis()->SetLabelSize(0.08); + // Diffe_Depth1_HB->SetTitle("any Error, HB Depth1 \n"); + Diffe_Depth1_HB->SetXTitle("#eta \b"); + Diffe_Depth1_HB->SetYTitle("#phi \b"); + Diffe_Depth1_HB->SetZTitle(" out 2.5-4.5- HB Depth1 \b"); + Diffe_Depth1_HB->SetMarkerColor(2); + Diffe_Depth1_HB->SetLineColor(2); + Diffe_Depth1_HB->Draw("COLZ"); + + + c1->cd(4); + TH1F* diffTSmeanA_Depth1_HB = new TH1F("diffTSmeanA_Depth1_HB","", 100, 1.0,6.0); + for (int i=1;i<=Ceff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=Ceff->GetYaxis()->GetNbins();j++) { + if(Ceff->GetBinContent(i,j) !=0 ) { + double ccc1 = Ceff->GetBinContent(i,j) ; + diffTSmeanA_Depth1_HB->Fill(ccc1); + } + } + } + gPad->SetLogy(); + diffTSmeanA_Depth1_HB->SetMarkerStyle(20); + diffTSmeanA_Depth1_HB->SetMarkerSize(0.4); + diffTSmeanA_Depth1_HB->GetYaxis()->SetLabelSize(0.04); + diffTSmeanA_Depth1_HB->SetXTitle(" in each cell \b"); + diffTSmeanA_Depth1_HB->SetMarkerColor(2); + diffTSmeanA_Depth1_HB->SetLineColor(2); + diffTSmeanA_Depth1_HB->Draw(""); + + c1->Update(); + + + + //=============================================================================================== 2 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + TH2F *awod1= (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA_HB"); + TH2F *awod0= (TH2F*)dir->FindObjectAny("h_mapDepth2_HB"); + awod1->Sumw2(); + awod0->Sumw2(); + // if(awod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C2ff = (TH2F*)awod1->Clone("C2ff"); + C2ff->Divide(awod1,awod0, 1, 1, "B"); + C2ff->Sumw2(); + // } + c1->cd(1); + TH2F *bwod1= (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA225_HB"); + TH2F *bwod0= (TH2F*)dir->FindObjectAny("h_mapDepth2_HB"); + bwod1->Sumw2(); + bwod0->Sumw2(); + // if(bwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C2fz225= (TH2F*)bwod1->Clone("C2fz225"); + C2fz225->Divide(bwod1,bwod0, 1, 1, "B"); + C2fz225->Sumw2(); + // } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + C2fz225->SetMarkerStyle(20); + C2fz225->SetMarkerSize(0.4); + C2fz225->GetZaxis()->SetLabelSize(0.08); + C2fz225->SetXTitle("#eta \b"); + C2fz225->SetYTitle("#phi \b"); + C2fz225->SetZTitle("Rate for TSmeanA in each event & cell out 2.3-5 - HB Depth2 \b"); + C2fz225->SetMarkerColor(2); + C2fz225->SetLineColor(2); + C2fz225->SetMaximum(1.000); + C2fz225->SetMinimum(0.0001); + C2fz225->Draw("COLZ"); + + c1->cd(2); + TH1F *aaaaaa2= (TH1F*)dir->FindObjectAny("h_TSmeanA_HB"); + gPad->SetLogy(); + aaaaaa2->SetMarkerStyle(20); + aaaaaa2->SetMarkerSize(0.8); + aaaaaa2->GetYaxis()->SetLabelSize(0.04); + aaaaaa2->SetXTitle("TSmeanA in each event & cell HB \b"); + aaaaaa2->SetMarkerColor(2); + aaaaaa2->SetLineColor(2); + aaaaaa2->Draw(""); + + c1->cd(3); + /////////////////////////////////////// + TH2F* Diffe_Depth2_HB = (TH2F*)C2ff->Clone("Diffe_Depth2_HB"); + for (int i=1;i<=C2ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C2ff->GetYaxis()->GetNbins();j++) { + double ccc1 = C2ff->GetBinContent(i,j) ; + Diffe_Depth2_HB->SetBinContent(i,j,0.); + if(ccc1 < 2.4 || ccc1>4.4) Diffe_Depth2_HB->SetBinContent(i,j,ccc1); + } + } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Diffe_Depth2_HB->SetMarkerStyle(20); + Diffe_Depth2_HB->SetMarkerSize(0.4); + Diffe_Depth2_HB->GetZaxis()->SetLabelSize(0.08); + // Diffe_Depth2_HB->SetTitle("any Error, HB Depth2 \n"); + Diffe_Depth2_HB->SetXTitle("#eta \b"); + Diffe_Depth2_HB->SetYTitle("#phi \b"); + Diffe_Depth2_HB->SetZTitle(" out 2.4-4.4 - HB Depth2 \b"); + Diffe_Depth2_HB->SetMarkerColor(2); + Diffe_Depth2_HB->SetLineColor(2); + Diffe_Depth2_HB->Draw("COLZ"); + + + c1->cd(4); + TH1F* diffTSmeanA_Depth2_HB = new TH1F("diffTSmeanA_Depth2_HB","", 100, 1.0,6.0); + for (int i=1;i<=C2ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C2ff->GetYaxis()->GetNbins();j++) { + if(C2ff->GetBinContent(i,j) !=0 ) { + double ccc1 = C2ff->GetBinContent(i,j) ; + diffTSmeanA_Depth2_HB->Fill(ccc1); + } + } + } + gPad->SetLogy(); + diffTSmeanA_Depth2_HB->SetMarkerStyle(20); + diffTSmeanA_Depth2_HB->SetMarkerSize(0.4); + diffTSmeanA_Depth2_HB->GetYaxis()->SetLabelSize(0.04); + diffTSmeanA_Depth2_HB->SetXTitle(" in each cell \b"); + diffTSmeanA_Depth2_HB->SetMarkerColor(2); + diffTSmeanA_Depth2_HB->SetLineColor(2); + diffTSmeanA_Depth2_HB->Draw(""); + + c1->Update(); + + + + //=============================================================================================== 3 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + TH2F *cwod1= (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA_HE"); + TH2F *cwod0= (TH2F*)dir->FindObjectAny("h_mapDepth1_HE"); + cwod1->Sumw2(); + cwod0->Sumw2(); + // if(cwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C3ff = (TH2F*)cwod1->Clone("C3ff"); + C3ff->Divide(cwod1,cwod0, 1, 1, "B"); + C3ff->Sumw2(); + // } + c1->cd(1); + TH2F *dwod1= (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA225_HE"); + TH2F *dwod0= (TH2F*)dir->FindObjectAny("h_mapDepth1_HE"); + dwod1->Sumw2(); + dwod0->Sumw2(); + // if(dwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C3fz225= (TH2F*)dwod1->Clone("C3fz225"); + C3fz225->Divide(dwod1,dwod0, 1, 1, "B"); + C3fz225->Sumw2(); + // } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + C3fz225->SetMarkerStyle(20); + C3fz225->SetMarkerSize(0.4); + C3fz225->GetZaxis()->SetLabelSize(0.08); + C3fz225->SetXTitle("#eta \b"); + C3fz225->SetYTitle("#phi \b"); + C3fz225->SetZTitle("Rate for TSmeanA in each event & cell out 2.3-5 - HE Depth1 \b"); + C3fz225->SetMarkerColor(2); + C3fz225->SetLineColor(2); + C3fz225->SetMaximum(1.000); + C3fz225->SetMinimum(0.0001); + C3fz225->Draw("COLZ"); + + c1->cd(2); + TH1F *aaaaaa3= (TH1F*)dir->FindObjectAny("h_TSmeanA_HE"); + gPad->SetLogy(); + aaaaaa3->SetMarkerStyle(20); + aaaaaa3->SetMarkerSize(0.8); + aaaaaa3->GetYaxis()->SetLabelSize(0.04); + aaaaaa3->SetXTitle("TSmeanA in each event & cell HE \b"); + aaaaaa3->SetMarkerColor(2); + aaaaaa3->SetLineColor(2); + aaaaaa3->Draw(""); + + c1->cd(3); + /////////////////////////////////////// + TH2F* Diffe_Depth1_HE = (TH2F*)C3ff->Clone("Diffe_Depth1_HE"); + for (int i=1;i<=C3ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C3ff->GetYaxis()->GetNbins();j++) { + double ccc1 = C3ff->GetBinContent(i,j) ; + Diffe_Depth1_HE->SetBinContent(i,j,0.); + if(ccc1 < 2.4 || ccc1>4.6) Diffe_Depth1_HE->SetBinContent(i,j,ccc1); + } + } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Diffe_Depth1_HE->SetMarkerStyle(20); + Diffe_Depth1_HE->SetMarkerSize(0.4); + Diffe_Depth1_HE->GetZaxis()->SetLabelSize(0.08); + // Diffe_Depth1_HE->SetTitle("any Error, HE Depth1 \n"); + Diffe_Depth1_HE->SetXTitle("#eta \b"); + Diffe_Depth1_HE->SetYTitle("#phi \b"); + Diffe_Depth1_HE->SetZTitle(" out 2.4-4.6 - HE Depth1 \b"); + Diffe_Depth1_HE->SetMarkerColor(2); + Diffe_Depth1_HE->SetLineColor(2); + Diffe_Depth1_HE->Draw("COLZ"); + + + c1->cd(4); + TH1F* diffTSmeanA_Depth1_HE = new TH1F("diffTSmeanA_Depth1_HE","", 100, 0.0,7.0); + for (int i=1;i<=C3ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C3ff->GetYaxis()->GetNbins();j++) { + if(C3ff->GetBinContent(i,j) !=0 ) { + double ccc1 = C3ff->GetBinContent(i,j) ; + diffTSmeanA_Depth1_HE->Fill(ccc1); + } + } + } + gPad->SetLogy(); + diffTSmeanA_Depth1_HE->SetMarkerStyle(20); + diffTSmeanA_Depth1_HE->SetMarkerSize(0.4); + diffTSmeanA_Depth1_HE->GetYaxis()->SetLabelSize(0.04); + diffTSmeanA_Depth1_HE->SetXTitle(" in each cell \b"); + diffTSmeanA_Depth1_HE->SetMarkerColor(2); + diffTSmeanA_Depth1_HE->SetLineColor(2); + diffTSmeanA_Depth1_HE->Draw(""); + + c1->Update(); + + + + //=============================================================================================== 4 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + TH2F *ewod1= (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA_HE"); + TH2F *ewod0= (TH2F*)dir->FindObjectAny("h_mapDepth2_HE"); + ewod1->Sumw2(); + ewod0->Sumw2(); + // if(ewod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C4ff = (TH2F*)ewod1->Clone("C4ff"); + C4ff->Divide(ewod1,ewod0, 1, 1, "B"); + C4ff->Sumw2(); + // } + c1->cd(1); + TH2F *fwod1= (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA225_HE"); + TH2F *fwod0= (TH2F*)dir->FindObjectAny("h_mapDepth2_HE"); + fwod1->Sumw2(); + fwod0->Sumw2(); + // if(fwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C4fz225= (TH2F*)fwod1->Clone("C4fz225"); + C4fz225->Divide(fwod1,fwod0, 1, 1, "B"); + C4fz225->Sumw2(); + // } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + C4fz225->SetMarkerStyle(20); + C4fz225->SetMarkerSize(0.4); + C4fz225->GetZaxis()->SetLabelSize(0.08); + C4fz225->SetXTitle("#eta \b"); + C4fz225->SetYTitle("#phi \b"); + C4fz225->SetZTitle("Rate for TSmeanA in each event & cell out 2.3-5 - HE Depth2 \b"); + C4fz225->SetMarkerColor(2); + C4fz225->SetLineColor(2); + C4fz225->SetMaximum(1.000); + C4fz225->SetMinimum(0.0001); + C4fz225->Draw("COLZ"); + + c1->cd(2); + TH1F *aaaaaa4= (TH1F*)dir->FindObjectAny("h_TSmeanA_HE"); + gPad->SetLogy(); + aaaaaa4->SetMarkerStyle(20); + aaaaaa4->SetMarkerSize(0.8); + aaaaaa4->GetYaxis()->SetLabelSize(0.04); + aaaaaa4->SetXTitle("TSmeanA in each event & cell HE \b"); + aaaaaa4->SetMarkerColor(2); + aaaaaa4->SetLineColor(2); + aaaaaa4->Draw(""); + + c1->cd(3); + /////////////////////////////////////// + TH2F* Diffe_Depth2_HE = (TH2F*)C4ff->Clone("Diffe_Depth2_HE"); + for (int i=1;i<=C4ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C4ff->GetYaxis()->GetNbins();j++) { + double ccc1 = C4ff->GetBinContent(i,j) ; + Diffe_Depth2_HE->SetBinContent(i,j,0.); + if(ccc1 < 2.4 || ccc1>4.6) Diffe_Depth2_HE->SetBinContent(i,j,ccc1); + } + } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Diffe_Depth2_HE->SetMarkerStyle(20); + Diffe_Depth2_HE->SetMarkerSize(0.4); + Diffe_Depth2_HE->GetZaxis()->SetLabelSize(0.08); + // Diffe_Depth2_HE->SetTitle("any Error, HE Depth2 \n"); + Diffe_Depth2_HE->SetXTitle("#eta \b"); + Diffe_Depth2_HE->SetYTitle("#phi \b"); + Diffe_Depth2_HE->SetZTitle(" out 2.4-4.6 - HE Depth2 \b"); + Diffe_Depth2_HE->SetMarkerColor(2); + Diffe_Depth2_HE->SetLineColor(2); + Diffe_Depth2_HE->Draw("COLZ"); + + + c1->cd(4); + TH1F* diffTSmeanA_Depth2_HE = new TH1F("diffTSmeanA_Depth2_HE","", 100, 0.0,7.0); + for (int i=1;i<=C4ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C4ff->GetYaxis()->GetNbins();j++) { + if(C4ff->GetBinContent(i,j) !=0 ) { + double ccc1 = C4ff->GetBinContent(i,j) ; + diffTSmeanA_Depth2_HE->Fill(ccc1); + } + } + } + gPad->SetLogy(); + diffTSmeanA_Depth2_HE->SetMarkerStyle(20); + diffTSmeanA_Depth2_HE->SetMarkerSize(0.4); + diffTSmeanA_Depth2_HE->GetYaxis()->SetLabelSize(0.04); + diffTSmeanA_Depth2_HE->SetXTitle(" in each cell \b"); + diffTSmeanA_Depth2_HE->SetMarkerColor(2); + diffTSmeanA_Depth2_HE->SetLineColor(2); + diffTSmeanA_Depth2_HE->Draw(""); + + c1->Update(); + + + + //=============================================================================================== 5 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + TH2F *gwod1= (TH2F*)dir->FindObjectAny("h_mapDepth3TSmeanA_HE"); + TH2F *gwod0= (TH2F*)dir->FindObjectAny("h_mapDepth3_HE"); + gwod1->Sumw2(); + gwod0->Sumw2(); + // if(gwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C5ff = (TH2F*)gwod1->Clone("C5ff"); + C5ff->Divide(gwod1,gwod0, 1, 1, "B"); + C5ff->Sumw2(); + // } + c1->cd(1); + TH2F *jwod1= (TH2F*)dir->FindObjectAny("h_mapDepth3TSmeanA225_HE"); + TH2F *jwod0= (TH2F*)dir->FindObjectAny("h_mapDepth3_HE"); + jwod1->Sumw2(); + jwod0->Sumw2(); + // if(jwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C5fz225= (TH2F*)jwod1->Clone("C5fz225"); + C5fz225->Divide(jwod1,jwod0, 1, 1, "B"); + C5fz225->Sumw2(); + // } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + C5fz225->SetMarkerStyle(20); + C5fz225->SetMarkerSize(0.4); + C5fz225->GetZaxis()->SetLabelSize(0.08); + C5fz225->SetXTitle("#eta \b"); + C5fz225->SetYTitle("#phi \b"); + C5fz225->SetZTitle("Rate for TSmeanA in each event & cell out 2.3-5 - HE Depth3 \b"); + C5fz225->SetMarkerColor(2); + C5fz225->SetLineColor(2); + C5fz225->SetMaximum(1.000); + C5fz225->SetMinimum(0.0001); + C5fz225->Draw("COLZ"); + + c1->cd(2); + TH1F *aaaaaa5= (TH1F*)dir->FindObjectAny("h_TSmeanA_HE"); + gPad->SetLogy(); + aaaaaa5->SetMarkerStyle(20); + aaaaaa5->SetMarkerSize(0.8); + aaaaaa5->GetYaxis()->SetLabelSize(0.04); + aaaaaa5->SetXTitle("TSmeanA in each event & cell HE \b"); + aaaaaa5->SetMarkerColor(2); + aaaaaa5->SetLineColor(2); + aaaaaa5->Draw(""); + + c1->cd(3); + /////////////////////////////////////// + TH2F* Diffe_Depth3_HE = (TH2F*)C5ff->Clone("Diffe_Depth3_HE"); + for (int i=1;i<=C5ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C5ff->GetYaxis()->GetNbins();j++) { + double ccc1 = C5ff->GetBinContent(i,j) ; + Diffe_Depth3_HE->SetBinContent(i,j,0.); + if(ccc1 < 2.4 || ccc1>4.6) Diffe_Depth3_HE->SetBinContent(i,j,ccc1); + } + } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Diffe_Depth3_HE->SetMarkerStyle(20); + Diffe_Depth3_HE->SetMarkerSize(0.4); + Diffe_Depth3_HE->GetZaxis()->SetLabelSize(0.08); + // Diffe_Depth3_HE->SetTitle("any Error, HE Depth3 \n"); + Diffe_Depth3_HE->SetXTitle("#eta \b"); + Diffe_Depth3_HE->SetYTitle("#phi \b"); + Diffe_Depth3_HE->SetZTitle(" out 2.4-4.6 - HE Depth3 \b"); + Diffe_Depth3_HE->SetMarkerColor(2); + Diffe_Depth3_HE->SetLineColor(2); + Diffe_Depth3_HE->Draw("COLZ"); + + + c1->cd(4); + TH1F* diffTSmeanA_Depth3_HE = new TH1F("diffTSmeanA_Depth3_HE","", 100, 0.0,7.0); + for (int i=1;i<=C5ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C5ff->GetYaxis()->GetNbins();j++) { + if(C5ff->GetBinContent(i,j) !=0 ) { + double ccc1 = C5ff->GetBinContent(i,j) ; + diffTSmeanA_Depth3_HE->Fill(ccc1); + } + } + } + gPad->SetLogy(); + diffTSmeanA_Depth3_HE->SetMarkerStyle(20); + diffTSmeanA_Depth3_HE->SetMarkerSize(0.4); + diffTSmeanA_Depth3_HE->GetYaxis()->SetLabelSize(0.04); + diffTSmeanA_Depth3_HE->SetXTitle(" in each cell \b"); + diffTSmeanA_Depth3_HE->SetMarkerColor(2); + diffTSmeanA_Depth3_HE->SetLineColor(2); + diffTSmeanA_Depth3_HE->Draw(""); + + c1->Update(); + + + + //=============================================================================================== 6 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + TH2F *iwod1= (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA_HF"); + TH2F *iwod0= (TH2F*)dir->FindObjectAny("h_mapDepth1_HF"); + iwod1->Sumw2(); + iwod0->Sumw2(); + // if(iwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C6ff = (TH2F*)iwod1->Clone("C6ff"); + C6ff->Divide(iwod1,iwod0, 1, 1, "B"); + C6ff->Sumw2(); + // } + c1->cd(1); + TH2F *kwod1= (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA225_HF"); + TH2F *kwod0= (TH2F*)dir->FindObjectAny("h_mapDepth1_HF"); + kwod1->Sumw2(); + kwod0->Sumw2(); + // if(kwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C6fz225= (TH2F*)kwod1->Clone("C6fz225"); + C6fz225->Divide(kwod1,kwod0, 1, 1, "B"); + C6fz225->Sumw2(); + // } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + C6fz225->SetMarkerStyle(20); + C6fz225->SetMarkerSize(0.4); + // C6fz225->GetYaxis()->SetLabelSize(0.04); + C6fz225->GetZaxis()->SetLabelSize(0.08); + C6fz225->SetXTitle("#eta \b"); + C6fz225->SetYTitle("#phi \b"); + C6fz225->SetZTitle("Rate for TSmeanA in each event & cell out 2.3-5 - HF Depth1 \b"); + C6fz225->SetMarkerColor(2); + C6fz225->SetLineColor(2); + C6fz225->SetMaximum(1.000); + C6fz225->SetMinimum(0.0001); + C6fz225->Draw("COLZ"); + + c1->cd(2); + TH1F *aaaaaa6= (TH1F*)dir->FindObjectAny("h_TSmeanA_HF"); + gPad->SetLogy(); + aaaaaa6->SetMarkerStyle(20); + aaaaaa6->SetMarkerSize(0.8); + aaaaaa6->GetYaxis()->SetLabelSize(0.04); + aaaaaa6->SetXTitle("TSmeanA in each event & cell HF \b"); + aaaaaa6->SetMarkerColor(2); + aaaaaa6->SetLineColor(2); + aaaaaa6->Draw(""); + + c1->cd(3); + /////////////////////////////////////// + TH2F* Diffe_Depth1_HF = (TH2F*)C6ff->Clone("Diffe_Depth1_HF"); + for (int i=1;i<=C6ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C6ff->GetYaxis()->GetNbins();j++) { + double ccc1 = C6ff->GetBinContent(i,j) ; + Diffe_Depth1_HF->SetBinContent(i,j,0.); + if(ccc1 < 0.5 || ccc1>1.5 ) Diffe_Depth1_HF->SetBinContent(i,j,ccc1); + } + } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Diffe_Depth1_HF->SetMarkerStyle(20); + Diffe_Depth1_HF->SetMarkerSize(0.4); + Diffe_Depth1_HF->GetZaxis()->SetLabelSize(0.08); + // Diffe_Depth1_HF->SetTitle("any Error, HF Depth1 \n"); + Diffe_Depth1_HF->SetXTitle("#eta \b"); + Diffe_Depth1_HF->SetYTitle("#phi \b"); + Diffe_Depth1_HF->SetZTitle(" out 0.5-1.5 - HF Depth1 \b"); + Diffe_Depth1_HF->SetMarkerColor(2); + Diffe_Depth1_HF->SetLineColor(2); + Diffe_Depth1_HF->Draw("COLZ"); + + + c1->cd(4); + TH1F* diffTSmeanA_Depth1_HF = new TH1F("diffTSmeanA_Depth1_HF","", 100, 0.0,2.0); + for (int i=1;i<=C6ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C6ff->GetYaxis()->GetNbins();j++) { + if(C6ff->GetBinContent(i,j) !=0 ) { + double ccc1 = C6ff->GetBinContent(i,j) ; + diffTSmeanA_Depth1_HF->Fill(ccc1); + } + } + } + gPad->SetLogy(); + diffTSmeanA_Depth1_HF->SetMarkerStyle(20); + diffTSmeanA_Depth1_HF->SetMarkerSize(0.4); + diffTSmeanA_Depth1_HF->GetYaxis()->SetLabelSize(0.04); + diffTSmeanA_Depth1_HF->SetXTitle(" in each cell \b"); + diffTSmeanA_Depth1_HF->SetMarkerColor(2); + diffTSmeanA_Depth1_HF->SetLineColor(2); + diffTSmeanA_Depth1_HF->Draw(""); + + c1->Update(); + + + + //=============================================================================================== 7 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + TH2F *lwod1= (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA_HF"); + TH2F *lwod0= (TH2F*)dir->FindObjectAny("h_mapDepth2_HF"); + lwod1->Sumw2(); + lwod0->Sumw2(); + // if(lwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C7ff = (TH2F*)lwod1->Clone("C7ff"); + C7ff->Divide(lwod1,lwod0, 1, 1, "B"); + C7ff->Sumw2(); + // } + c1->cd(1); + TH2F *mwod1= (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA225_HF"); + TH2F *mwod0= (TH2F*)dir->FindObjectAny("h_mapDepth2_HF"); + mwod1->Sumw2(); + mwod0->Sumw2(); + // if(mwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C7fz225= (TH2F*)mwod1->Clone("C7fz225"); + C7fz225->Divide(mwod1,mwod0, 1, 1, "B"); + C7fz225->Sumw2(); + // } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + C7fz225->SetMarkerStyle(20); + C7fz225->SetMarkerSize(0.4); + C7fz225->GetZaxis()->SetLabelSize(0.08); + C7fz225->SetXTitle("#eta \b"); + C7fz225->SetYTitle("#phi \b"); + C7fz225->SetZTitle("Rate for TSmeanA in each event & cell out 2.3-5 - HF Depth2 \b"); + C7fz225->SetMarkerColor(2); + C7fz225->SetLineColor(2); + C7fz225->SetMaximum(1.000); + C7fz225->SetMinimum(0.0001); + C7fz225->Draw("COLZ"); + + c1->cd(2); + TH1F *aaaaaa7= (TH1F*)dir->FindObjectAny("h_TSmeanA_HF"); + gPad->SetLogy(); + aaaaaa7->SetMarkerStyle(20); + aaaaaa7->SetMarkerSize(0.8); + aaaaaa7->GetYaxis()->SetLabelSize(0.04); + aaaaaa7->SetXTitle("TSmeanA in each event & cell HF \b"); + aaaaaa7->SetMarkerColor(2); + aaaaaa7->SetLineColor(2); + aaaaaa7->Draw(""); + + c1->cd(3); + /////////////////////////////////////// + TH2F* Diffe_Depth2_HF = (TH2F*)C7ff->Clone("Diffe_Depth2_HF"); + for (int i=1;i<=C7ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C7ff->GetYaxis()->GetNbins();j++) { + double ccc1 = C7ff->GetBinContent(i,j) ; + Diffe_Depth2_HF->SetBinContent(i,j,0.); + if(ccc1 < 0.5 || ccc1>1.5) Diffe_Depth2_HF->SetBinContent(i,j,ccc1); + } + } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Diffe_Depth2_HF->SetMarkerStyle(20); + Diffe_Depth2_HF->SetMarkerSize(0.4); + Diffe_Depth2_HF->GetZaxis()->SetLabelSize(0.08); + // Diffe_Depth2_HF->SetTitle("any Error, HF Depth2 \n"); + Diffe_Depth2_HF->SetXTitle("#eta \b"); + Diffe_Depth2_HF->SetYTitle("#phi \b"); + Diffe_Depth2_HF->SetZTitle(" out 0.5-1.5 -HF Depth2 \b"); + Diffe_Depth2_HF->SetMarkerColor(2); + Diffe_Depth2_HF->SetLineColor(2); + Diffe_Depth2_HF->Draw("COLZ"); + + + c1->cd(4); + TH1F* diffTSmeanA_Depth2_HF = new TH1F("diffTSmeanA_Depth2_HF","", 100, 0.0,2.0); + for (int i=1;i<=C7ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C7ff->GetYaxis()->GetNbins();j++) { + if(C7ff->GetBinContent(i,j) !=0 ) { + double ccc1 = C7ff->GetBinContent(i,j) ; + diffTSmeanA_Depth2_HF->Fill(ccc1); + } + } + } + gPad->SetLogy(); + diffTSmeanA_Depth2_HF->SetMarkerStyle(20); + diffTSmeanA_Depth2_HF->SetMarkerSize(0.4); + diffTSmeanA_Depth2_HF->GetYaxis()->SetLabelSize(0.04); + diffTSmeanA_Depth2_HF->SetXTitle(" in each cell \b"); + diffTSmeanA_Depth2_HF->SetMarkerColor(2); + diffTSmeanA_Depth2_HF->SetLineColor(2); + diffTSmeanA_Depth2_HF->Draw(""); + + c1->Update(); + + + + //=============================================================================================== 8 + //====================================================================== + //====================================================================== + //================ + //====================================================================== + c1->Clear(); + c1->Divide(2,2); + + TH2F *nwod1= (TH2F*)dir->FindObjectAny("h_mapDepth4TSmeanA_HO"); + TH2F *nwod0= (TH2F*)dir->FindObjectAny("h_mapDepth4_HO"); + nwod1->Sumw2(); + nwod0->Sumw2(); + // if(nwod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C8ff = (TH2F*)nwod1->Clone("C8ff"); + C8ff->Divide(nwod1,nwod0, 1, 1, "B"); + C8ff->Sumw2(); + // } + c1->cd(1); + TH2F *owod1= (TH2F*)dir->FindObjectAny("h_mapDepth4TSmeanA225_HO"); + TH2F *owod0= (TH2F*)dir->FindObjectAny("h_mapDepth4_HO"); + owod1->Sumw2(); + owod0->Sumw2(); + // if(owod0->IsA()->InheritsFrom("TH2F")){ + TH2F* C8fz225= (TH2F*)owod1->Clone("C8fz225"); + C8fz225->Divide(owod1,owod0, 1, 1, "B"); + C8fz225->Sumw2(); + // } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + C8fz225->SetMarkerStyle(20); + C8fz225->SetMarkerSize(0.4); + C8fz225->GetZaxis()->SetLabelSize(0.08); + C8fz225->SetXTitle("#eta \b"); + C8fz225->SetYTitle("#phi \b"); + C8fz225->SetZTitle("Rate for TSmeanA in each event & cell out 2.3-5.5 - HO Depth4 \b"); + C8fz225->SetMarkerColor(2); + C8fz225->SetLineColor(2); + C8fz225->SetMaximum(1.000); + C8fz225->SetMinimum(0.000005); + C8fz225->Draw("COLZ"); + + c1->cd(2); + TH1F *aaaaaa8= (TH1F*)dir->FindObjectAny("h_TSmeanA_HO"); + gPad->SetLogy(); + aaaaaa8->SetMarkerStyle(20); + aaaaaa8->SetMarkerSize(0.8); + aaaaaa8->GetYaxis()->SetLabelSize(0.04); + aaaaaa8->SetXTitle("TSmeanA in each event & cell HO \b"); + aaaaaa8->SetMarkerColor(2); + aaaaaa8->SetLineColor(2); + aaaaaa8->Draw(""); + + c1->cd(3); + /////////////////////////////////////// + TH2F* Diffe_Depth4_HO = (TH2F*)C8ff->Clone("Diffe_Depth4_HO"); + for (int i=1;i<=C8ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C8ff->GetYaxis()->GetNbins();j++) { + double ccc1 = C8ff->GetBinContent(i,j) ; + Diffe_Depth4_HO->SetBinContent(i,j,0.); + if(ccc1 < 4.0 || ccc1>5.0) Diffe_Depth4_HO->SetBinContent(i,j,ccc1); + } + } + gPad->SetGridy(); + gPad->SetGridx(); + gPad->SetLogz(); + Diffe_Depth4_HO->SetMarkerStyle(20); + Diffe_Depth4_HO->SetMarkerSize(0.4); + Diffe_Depth4_HO->GetZaxis()->SetLabelSize(0.08); + // Diffe_Depth4_HO->SetTitle("any Error, HO Depth4 \n"); + Diffe_Depth4_HO->SetXTitle("#eta \b"); + Diffe_Depth4_HO->SetYTitle("#phi \b"); + Diffe_Depth4_HO->SetZTitle(" out 4.0-5.0 - HO Depth4 \b"); + Diffe_Depth4_HO->SetMarkerColor(2); + Diffe_Depth4_HO->SetLineColor(2); + Diffe_Depth4_HO->Draw("COLZ"); + + + c1->cd(4); + TH1F* diffTSmeanA_Depth4_HO = new TH1F("diffTSmeanA_Depth4_HO","", 100, 4.0,5.0); + for (int i=1;i<=C8ff->GetXaxis()->GetNbins();i++) { + for (int j=1;j<=C8ff->GetYaxis()->GetNbins();j++) { + if(C8ff->GetBinContent(i,j) !=0 ) { + double ccc1 = C8ff->GetBinContent(i,j) ; + diffTSmeanA_Depth4_HO->Fill(ccc1); + } + } + } + gPad->SetLogy(); + diffTSmeanA_Depth4_HO->SetMarkerStyle(20); + diffTSmeanA_Depth4_HO->SetMarkerSize(0.4); + diffTSmeanA_Depth4_HO->GetYaxis()->SetLabelSize(0.04); + diffTSmeanA_Depth4_HO->SetXTitle(" in each cell \b"); + diffTSmeanA_Depth4_HO->SetMarkerColor(2); + diffTSmeanA_Depth4_HO->SetLineColor(2); + diffTSmeanA_Depth4_HO->Draw(""); + + c1->Update(); + + + + + + //====================================================================== + //======================================================================================== end + //====================================================================== + //====================================================================== + // close and delete all possible things: + + // psfile->Close(); + psfile.Close(); + + hfile1->Close(); + // hfile1->Delete(); + hfile1->Close(); + // hfile1->Delete(); + + // Exit Root + gSystem->Exit(0); + //====================================================================== +} diff --git a/DPGAnalysis/HcalTools/macros/rmt/RemoteMonitoringMAP.cc b/DPGAnalysis/HcalTools/macros/rmt/RemoteMonitoringMAP.cc index daf8b0e86263f..10bd317af709c 100644 --- a/DPGAnalysis/HcalTools/macros/rmt/RemoteMonitoringMAP.cc +++ b/DPGAnalysis/HcalTools/macros/rmt/RemoteMonitoringMAP.cc @@ -21651,8 +21651,9 @@ std::cout<<" We are here to print ADC "<GetBinContent(i, j) > - 0.1) { //Rate 0.1 for displaying on whole detector map and subdetector map + + if (Map_Ampl[test][sub][k]->GetBinContent(i, j) > 0.1 && + NBad < 9999) { //Rate 0.1 for displaying on whole detector map and subdetector map Map_ALL->SetBinContent(i, j, 1.); Map_SUB[sub][k]->SetBinContent(i, j, 1.); if (flag_B == 0) { diff --git a/DPGAnalysis/HcalTools/plugins/CMTRawAnalyzer.cc b/DPGAnalysis/HcalTools/plugins/CMTRawAnalyzer.cc index 745b035c71409..e1b33574a2eb0 100644 --- a/DPGAnalysis/HcalTools/plugins/CMTRawAnalyzer.cc +++ b/DPGAnalysis/HcalTools/plugins/CMTRawAnalyzer.cc @@ -2256,6 +2256,19 @@ class CMTRawAnalyzer : public edm::one::EDAnalyzermake("h_timecorr_HO", " ", 100, 0., 30.); h_lutcorr_HO = fs_->make("h_lutcorr_HO", " ", 100, 0., 10.); //-------------------------------------------------- + h2_TSnVsAyear2023_HB = fs_->make("h2_TSnVsAyear2023_HB", " ", 100, 200., 30200., 100, 0., 175.); + h2_TSnVsAyear2023_HE = fs_->make("h2_TSnVsAyear2023_HE", " ", 100, 200., 75200., 100, 0., 175.); + h2_TSnVsAyear2023_HF = fs_->make("h2_TSnVsAyear2023_HF", " ", 100, 0., 2000., 100, 0., 50.); + h2_TSnVsAyear2023_HO = fs_->make("h2_TSnVsAyear2023_HO", " ", 100, 0., 1000., 100, 0., 225.); + //----------------------------- + h1_TSnVsAyear2023_HB = fs_->make("h1_TSnVsAyear2023_HB", " ", 100, 200., 15200); + h1_TSnVsAyear2023_HE = fs_->make("h1_TSnVsAyear2023_HE", " ", 100, 200., 25200); + h1_TSnVsAyear2023_HF = fs_->make("h1_TSnVsAyear2023_HF", " ", 100, 0., 1500); + h1_TSnVsAyear2023_HO = fs_->make("h1_TSnVsAyear2023_HO", " ", 100, 0., 750); + h1_TSnVsAyear20230_HB = fs_->make("h1_TSnVsAyear20230_HB", " ", 100, 200., 15200); + h1_TSnVsAyear20230_HE = fs_->make("h1_TSnVsAyear20230_HE", " ", 100, 200., 25200); + h1_TSnVsAyear20230_HF = fs_->make("h1_TSnVsAyear20230_HF", " ", 100, 0., 1500); + h1_TSnVsAyear20230_HO = fs_->make("h1_TSnVsAyear20230_HO", " ", 100, 0., 750); + //-------------------------------------------------- float est6 = 2500.; int ist6 = 30; int ist2 = 60; @@ -8013,6 +8040,7 @@ void CMTRawAnalyzer::fillDigiErrors(HBHEDigiCollection::const_iterator& digiItr) bool anydv = true; // for help: int firstcapid = 0; + int sumcapid = 0; int lastcapid = 0, capid = 0; int ERRORfiber = -10; int ERRORfiberChan = -10; @@ -8043,6 +8071,7 @@ void CMTRawAnalyzer::fillDigiErrors(HBHEDigiCollection::const_iterator& digiItr) if (ii == 0) firstcapid = capid; + sumcapid += capid; if (er) { anyer = true; @@ -8174,6 +8203,7 @@ void CMTRawAnalyzer::fillDigiErrorsQIE11(QIE11DataFrame qie11df) { // bool anydv = true; // for help: int firstcapid = 0; + int sumcapid = 0; int lastcapid = 0, capid = 0; int repetedcapid = 0; // loop over the samples in the digi @@ -8191,6 +8221,7 @@ void CMTRawAnalyzer::fillDigiErrorsQIE11(QIE11DataFrame qie11df) { lastcapid = capid; if (ii == 0) firstcapid = capid; + sumcapid += capid; } // for /////////////////////////////////////// if (!anycapid) @@ -8286,6 +8317,7 @@ void CMTRawAnalyzer::fillDigiErrorsHF(HFDigiCollection::const_iterator& digiItr) bool anydv = true; // for help: int firstcapid = 0; + int sumcapid = 0; int lastcapid = 0, capid = 0; int ERRORfiber = -10; int ERRORfiberChan = -10; @@ -8315,6 +8347,7 @@ void CMTRawAnalyzer::fillDigiErrorsHF(HFDigiCollection::const_iterator& digiItr) lastcapid = capid; if (ii == 0) firstcapid = capid; + sumcapid += capid; if (er) { anyer = true; ERRORfiber = fiber; @@ -8409,6 +8442,7 @@ void CMTRawAnalyzer::fillDigiErrorsHFQIE10(QIE10DataFrame qie10df) { // bool anydv = true; // for help: int firstcapid = 0; + int sumcapid = 0; int lastcapid = 0, capid = 0; int repetedcapid = 0; // loop over the samples in the digi @@ -8426,6 +8460,7 @@ void CMTRawAnalyzer::fillDigiErrorsHFQIE10(QIE10DataFrame qie10df) { lastcapid = capid; if (ii == 0) firstcapid = capid; + sumcapid += capid; } // for /////////////////////////////////////// if (!anycapid) @@ -8486,6 +8521,7 @@ void CMTRawAnalyzer::fillDigiErrorsHO(HODigiCollection::const_iterator& digiItr) bool anydv = true; // for help: int firstcapid = 0; + int sumcapid = 0; int lastcapid = 0, capid = 0; int ERRORfiber = -10; int ERRORfiberChan = -10; @@ -8512,6 +8548,7 @@ void CMTRawAnalyzer::fillDigiErrorsHO(HODigiCollection::const_iterator& digiItr) if (ii == 0) firstcapid = capid; + sumcapid += capid; if (er) { anyer = true; @@ -8634,12 +8671,10 @@ void CMTRawAnalyzer::fillDigiAmplitude(HBHEDigiCollection::const_iterator& digiI double difpedestal2 = 0.; double difpedestal3 = 0.; - /* double amplitudewithPedSubtr1 = 0.; double amplitudewithPedSubtr2 = 0.; double amplitudewithPedSubtr3 = 0.; double amplitudewithPedSubtr4 = 0.; -*/ double amplitude = 0.; double absamplitude = 0.; double amplitude345 = 0.; @@ -8743,7 +8778,6 @@ void CMTRawAnalyzer::fillDigiAmplitude(HBHEDigiCollection::const_iterator& digiI max_signal = ampldefault; ts_with_max_signal = ii; } - /* /// for choice TSs, raddam only: // TS = 1 to 10: 1 2 3 4 5 6 7 8 9 10 // ii = 0 to 9: 0 1 2 3 4 5 6 7 8 9 @@ -8765,7 +8799,6 @@ void CMTRawAnalyzer::fillDigiAmplitude(HBHEDigiCollection::const_iterator& digiI if (ii > 2 && ii < 6) amplitudewithPedSubtr4 += ampldefaultwithPedSubtr; // // - */ amplitude += ampldefault; // absamplitude += abs(ampldefault); // @@ -9117,6 +9150,10 @@ void CMTRawAnalyzer::fillDigiAmplitude(HBHEDigiCollection::const_iterator& digiI // // // // // // // // // HB TSmean: if (studyTSmeanShapeHist_) { h_TSmeanA_HB->Fill(aveamplitude1, 1.); + // h2_TSnVsAyear2023_HB->Fill(25.*aveamplitude1, amplitude); + h2_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear20230_HB->Fill(amplitude, 1.); if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) { if (studyRunDependenceHist_ && flagtodefinebadchannel_ == 4) ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71 @@ -9369,6 +9406,10 @@ void CMTRawAnalyzer::fillDigiAmplitude(HBHEDigiCollection::const_iterator& digiI // // // // // // // // // HE TSmean: if (studyTSmeanShapeHist_) { h_TSmeanA_HE->Fill(aveamplitude1, 1.); + // h2_TSnVsAyear2023_HE->Fill(25.*aveamplitude1, amplitude); + h2_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear20230_HE->Fill(amplitude, 1.); if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) { if (studyRunDependenceHist_ && flagtodefinebadchannel_ == 4) ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71 @@ -10142,6 +10183,10 @@ void CMTRawAnalyzer::fillDigiAmplitudeQIE11(QIE11DataFrame qie11df) { // // // // // // // // // HB TSmean: if (studyTSmeanShapeHist_) { h_TSmeanA_HB->Fill(aveamplitude1, 1.); + // h2_TSnVsAyear2023_HB->Fill(25.*aveamplitude1, amplitude); + h2_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear20230_HB->Fill(amplitude, 1.); if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) { if (studyRunDependenceHist_ && flagtodefinebadchannel_ == 4) ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71 @@ -10520,6 +10565,10 @@ void CMTRawAnalyzer::fillDigiAmplitudeQIE11(QIE11DataFrame qie11df) { // // // // // // // // // HE QIE11 TSmean: if (studyTSmeanShapeHist_) { h_TSmeanA_HE->Fill(aveamplitude1, 1.); + // h2_TSnVsAyear2023_HE->Fill(25.*aveamplitude1, amplitude); + h2_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear20230_HE->Fill(amplitude, 1.); if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) { if (studyRunDependenceHist_ && flagtodefinebadchannel_ == 4) ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71 @@ -11093,6 +11142,10 @@ void CMTRawAnalyzer::fillDigiAmplitudeHF(HFDigiCollection::const_iterator& digiI // // // // // // // // // HF TSmean: if (studyTSmeanShapeHist_) { h_TSmeanA_HF->Fill(aveamplitude1, 1.); + // h2_TSnVsAyear2023_HF->Fill(25.*aveamplitude1, amplitude); + h2_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear20230_HF->Fill(amplitude, 1.); if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) { if (studyRunDependenceHist_ && flagtodefinebadchannel_ == 4) ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71 @@ -11594,6 +11647,10 @@ void CMTRawAnalyzer::fillDigiAmplitudeHFQIE10(QIE10DataFrame qie10df) { // // // // // // // // // HFQIE10 TSmean: if (studyTSmeanShapeHist_) { h_TSmeanA_HF->Fill(aveamplitude1, 1.); + // h2_TSnVsAyear2023_HF->Fill(25.*aveamplitude1, amplitude); + h2_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear20230_HF->Fill(amplitude, 1.); if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) { if (studyRunDependenceHist_ && flagtodefinebadchannel_ == 4) ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71 @@ -12053,6 +12110,10 @@ void CMTRawAnalyzer::fillDigiAmplitudeHO(HODigiCollection::const_iterator& digiI } //if(studyADCAmplHist_ if (studyTSmeanShapeHist_) { h_TSmeanA_HO->Fill(aveamplitude1, 1.); + // h2_TSnVsAyear2023_HO->Fill(25.*aveamplitude1, amplitude); + h2_TSnVsAyear2023_HO->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear2023_HO->Fill(amplitude, 25. * aveamplitude1); + h1_TSnVsAyear20230_HO->Fill(amplitude, 1.); if (aveamplitude1 < TSmeanHOMin_ || aveamplitude1 > TSmeanHOMax_) { if (studyRunDependenceHist_ && flagtodefinebadchannel_ == 4) ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71 diff --git a/DPGAnalysis/HcalTools/python/remoteMonitoring_LASER_era2021_cfg.py b/DPGAnalysis/HcalTools/python/remoteMonitoring_LASER_era2021_cfg.py new file mode 100644 index 0000000000000..710aaa6cc8ff3 --- /dev/null +++ b/DPGAnalysis/HcalTools/python/remoteMonitoring_LASER_era2021_cfg.py @@ -0,0 +1,590 @@ +#eoscms ls -l /eos/cms/store/group/dpg_hcal/comm_hcal/USC/run327785/USC_327785.root +# choose run in /store/group/dpg_hcal/comm_hcal/USC/ +#how to run: cmsRun remoteMonitoring_LASER_era2019_cfg.py 331311 /store/group/dpg_hcal/comm_hcal/USC/ /afs/cern.ch/work/z/zhokin/hcal/voc2/CMSSW_11_1_0_pre3/src/DPGAnalysis/HcalTools/scripts/rmt + +import sys +import FWCore.ParameterSet.Config as cms +from Configuration.StandardSequences.Eras import eras +#process = cms.Process("TEST", eras.Run2_2018) +process = cms.Process("TEST", eras.Run3) +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("CondCore.CondDB.CondDB_cfi") +process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi") +process.l1GtUnpack.DaqGtInputTag = 'source' +# from RelValAlCaPedestal_cfg_2018.py +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') +process.load('Configuration.StandardSequences.Reconstruction_Data_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +#process.load('RecoLocalCalo.Configuration.hcalLocalReco_cff') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') + +##runnumber = sys.argv[2][4:-5] +runnumber = sys.argv[2] +rundir = sys.argv[3] +histodir = sys.argv[4] + +#print 'RUN = '+runnumber +#print 'Input file = '+rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +##print 'Input file = '+rundir+'/USC_'+runnumber+'.root' +#print 'Output file = '+histodir+'/LASER_'+runnumber+'.root' + +process.maxEvents = cms.untracked.PSet( +# input = cms.untracked.int32(100) + input = cms.untracked.int32(-1) + ) + +process.TFileService = cms.Service("TFileService", + fileName = cms.string(histodir+'/LASER_'+runnumber+'.root') +# ,closeFileFast = cms.untracked.bool(True) + ) + + +#process.source = cms.Source("PoolSource", +process.source = cms.Source("HcalTBSource", + skipBadFiles=cms.untracked.bool(True), + firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID([]), + firstRun = cms.untracked.uint32(331370), +# firstRun = cms.untracked.uint32(330153), +# firstRun = cms.untracked.uint32(329416), + fileNames = cms.untracked.vstring( +rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +#rundir+'/USC_'+runnumber+'.root' +# '/store/group/dpg_hcal/comm_hcal/USC/run331370/USC_331370.root' + +), + secondaryFileNames = cms.untracked.vstring() + ) + +process.Analyzer = cms.EDAnalyzer("CMTRawAnalyzer", + # + Verbosity = cms.untracked.int32(0), + #Verbosity = cms.untracked.int32(-9062), + #Verbosity = cms.untracked.int32(-9063), + #Verbosity = cms.untracked.int32(-9064), + #Verbosity = cms.untracked.int32(-9065), + #Verbosity = cms.untracked.int32(-84), + #Verbosity = cms.untracked.int32(-91), + #Verbosity = cms.untracked.int32(-92), + # + MapCreation = cms.untracked.int32(1), + # + recordNtuples = cms.untracked.bool(False), + #recordNtuples = cms.untracked.bool(True), + maxNeventsInNtuple = cms.int32(1), + # + #recordHistoes = cms.untracked.bool(False), + recordHistoes = cms.untracked.bool(True), + # + ##scripts: zRunRatio34.C, zRunNbadchan.C + studyRunDependenceHist = cms.untracked.bool(True), + #studyRunDependenceHist = cms.untracked.bool(False), + # + ##scripts: zerrors.C + studyCapIDErrorsHist = cms.untracked.bool(True), + #studyCapIDErrorsHist = cms.untracked.bool(False), + # + ##scripts: zrms.C + studyRMSshapeHist = cms.untracked.bool(True), + #studyRMSshapeHist = cms.untracked.bool(False), + # + ##scripts: zratio34.C + studyRatioShapeHist = cms.untracked.bool(True), + #studyRatioShapeHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyADCAmplHist = cms.untracked.bool(True), + #studyADCAmplHist = cms.untracked.bool(False), + # + ##scripts: ztsmean.C + studyTSmeanShapeHist = cms.untracked.bool(True), + #studyTSmeanShapeHist = cms.untracked.bool(False), + # + ##scripts: ztsmaxa.C + studyTSmaxShapeHist = cms.untracked.bool(True), + #studyTSmaxShapeHist = cms.untracked.bool(False), + # + ##scripts: zcalib....C + studyCalibCellsHist = cms.untracked.bool(True), + #studyCalibCellsHist = cms.untracked.bool(False), + # + ##scripts: zdifampl.C + studyDiffAmplHist = cms.untracked.bool(True), + #studyDiffAmplHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyPedestalsHist = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + ##scripts: zamplpedcorr.C + studyPedestalCorrelations = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + # + ##DigiCollectionLabel = cms.untracked.InputTag("hcalDigis"), + #Verbosity = cms.untracked.int32(-54), + #Verbosity = cms.untracked.int32(-22), + #Verbosity = cms.untracked.int32(-11), + #Verbosity = cms.untracked.int32(-12), + #Verbosity = cms.untracked.int32(-13), + #Verbosity = cms.untracked.int32(-51), + #Verbosity = cms.untracked.int32(-24), + #Verbosity = cms.untracked.int32(-244), + #Verbosity = cms.untracked.int32(-233), + # + # + # Normal channels: + # + # -53 for BAD HBHEHF channels from study on shape Ratio + #Verbosity = cms.untracked.int32(-53), + ratioHBMin = cms.double(0.50), + ratioHBMax = cms.double(1.00), + ratioHEMin = cms.double(0.55), + ratioHEMax = cms.double(1.00), + ratioHFMin = cms.double(0.60), + ratioHFMax = cms.double(1.02), + ratioHOMin = cms.double(0.55), + ratioHOMax = cms.double(1.04), + # -54 for BAD HBHEHF channels from study on RMS of shapes + #Verbosity = cms.untracked.int32(-54), + rmsHBMin = cms.double(0.3), + rmsHBMax = cms.double(2.5), + rmsHEMin = cms.double(0.9), + rmsHEMax = cms.double(3.6), + rmsHFMin = cms.double(0.2), + rmsHFMax = cms.double(2.1), + rmsHOMin = cms.double(0.2), + rmsHOMax = cms.double(2.6), + # -55 for BAD HBHEHF channels from study on TSmean of shapes + #Verbosity = cms.untracked.int32(-55), + TSmeanHBMin = cms.double(5.0), + TSmeanHBMax = cms.double(7.5), + TSmeanHEMin = cms.double(2.5), + TSmeanHEMax = cms.double(6.5), + TSmeanHFMin = cms.double(5.5), + TSmeanHFMax = cms.double(8.5), + TSmeanHOMin = cms.double(1.5), + TSmeanHOMax = cms.double(4.4), + # -55 for BAD HBHEHF channels from study on TSmax of shapes + #Verbosity = cms.untracked.int32(-55), + TSpeakHBMin = cms.double(1.8), + TSpeakHBMax = cms.double(8.5), + TSpeakHEMin = cms.double(1.5), + TSpeakHEMax = cms.double(8.5), + TSpeakHFMin = cms.double(1.5), + TSpeakHFMax = cms.double(8.5), + TSpeakHOMin = cms.double(0.5), + TSpeakHOMax = cms.double(6.5), + # -56 for BAD HBHEHOHF channels from study on ADC Amplitude + #Verbosity = cms.untracked.int32(-56), + ADCAmplHBMin = cms.double(10000.), + ADCAmplHBMax = cms.double(300000.), + ADCAmplHEMin = cms.double(20000.), + ADCAmplHEMax = cms.double(300000.), + ADCAmplHFMin = cms.double(50.), + ADCAmplHFMax = cms.double(9000.), + ADCAmplHOMin = cms.double(50.), + ADCAmplHOMax = cms.double(9000.), + # + # to see channels w/ PedestalSigma < cut + #Verbosity = cms.untracked.int32(-57), + pedestalwHBMax = cms.double(0.1), + pedestalwHEMax = cms.double(0.1), + pedestalwHFMax = cms.double(0.4), + pedestalwHOMax = cms.double(0.1), + # + # to see channels for pedestal < cut + pedestalHBMax = cms.double(0.1), + pedestalHEMax = cms.double(0.6), + pedestalHFMax = cms.double(0.8), + pedestalHOMax = cms.double(0.1), + # + # + # CALIBRATION channels: + # + # for BAD HBHEHOHF CALIBRATION channels from study on ADC amplitude + # cuts for Laser runs: + #calibrADCHBMin = cms.double(15.0), + #calibrADCHEMin = cms.double(15.0), + #calibrADCHOMin = cms.double(15.0), + #calibrADCHFMin = cms.double(15.0), + # cuts for LASER runs: + calibrADCHBMin = cms.double(1000.), + calibrADCHBMax = cms.double(100000000.), + calibrADCHEMin = cms.double(1000.), + calibrADCHEMax = cms.double(100000000.), + calibrADCHOMin = cms.double(1000.), + calibrADCHOMax = cms.double(100000000.), + calibrADCHFMin = cms.double(100.), + calibrADCHFMax = cms.double(100000000.), + + # for BAD HBHEHOHF CALIBRATION channels from study on shape Ratio + calibrRatioHBMin = cms.double(0.76), + calibrRatioHBMax = cms.double(0.94), + calibrRatioHEMin = cms.double(0.76), + calibrRatioHEMax = cms.double(0.94), + calibrRatioHOMin = cms.double(0.85), + calibrRatioHOMax = cms.double(0.99), + calibrRatioHFMin = cms.double(0.5), + calibrRatioHFMax = cms.double(0.8), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmax + calibrTSmaxHBMin = cms.double(1.50), + calibrTSmaxHBMax = cms.double(2.50), + calibrTSmaxHEMin = cms.double(1.50), + calibrTSmaxHEMax = cms.double(2.50), + calibrTSmaxHOMin = cms.double(1.50), + calibrTSmaxHOMax = cms.double(2.50), + calibrTSmaxHFMin = cms.double(3.50), + calibrTSmaxHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmean + calibrTSmeanHBMin = cms.double(2.40), + calibrTSmeanHBMax = cms.double(3.70), + calibrTSmeanHEMin = cms.double(2.40), + calibrTSmeanHEMax = cms.double(3.70), + calibrTSmeanHOMin = cms.double(1.50), + calibrTSmeanHOMax = cms.double(2.70), + calibrTSmeanHFMin = cms.double(3.50), + calibrTSmeanHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on Width + calibrWidthHBMin = cms.double(1.30), + calibrWidthHBMax = cms.double(1.90), + calibrWidthHEMin = cms.double(1.30), + calibrWidthHEMax = cms.double(1.90), + calibrWidthHOMin = cms.double(0.70), + calibrWidthHOMax = cms.double(1.65), + calibrWidthHFMin = cms.double(0.30), + calibrWidthHFMax = cms.double(1.50), + # + # Special task of run or LS quality: + # + # flag for ask runs of LSs for RMT & CMT accordingly: + #=0-runs, =1-LSs + # keep for LASER runs this flags =0 always + flagtoaskrunsorls = cms.int32(0), + # + # flag for choice of criterion of bad channels: + #=0-CapIdErr, =1-Ratio, =2-Width, =3-TSmax, =4-TSmean, =5-adcAmplitud + # keep for CMT (global runs) this flags =0 always + flagtodefinebadchannel = cms.int32(0), + #how many bins you want on the plots:better to choice (#LS+1) + howmanybinsonplots = cms.int32(25), + # + # ls - range for RBX study (and ??? perhaps for gain stability via abort gap): + lsmin = cms.int32(1), + #lsmax = cms.int32(620), + lsmax = cms.int32(2600), + # + flagabortgaprejected = cms.int32(1), + bcnrejectedlow = cms.int32(3446), + bcnrejectedhigh= cms.int32(3564), + # + # flag cpu time reducing + #=0-all plots, =1-optimized number of plots (for Global runs) + flagcpuoptimization = cms.int32(0), + # + # flag for ask type of Normalization for CMT estimators: + #=0-normalizationOn#evOfLS; =1-averageVariable-normalizationOn#entriesInLS; + flagestimatornormalization = cms.int32(1), + # + # + # cuts on Nbadchannels to see LS dependences: + # Verbosity = cms.untracked.int32(-77), + # to select abnormal events,for which Nbcs > this limits + lsdep_cut1_peak_HBdepth1 = cms.int32(20), + lsdep_cut1_peak_HBdepth2 = cms.int32(7), + lsdep_cut1_peak_HEdepth1 = cms.int32(16), + lsdep_cut1_peak_HEdepth2 = cms.int32(13), + lsdep_cut1_peak_HEdepth3 = cms.int32(4), + lsdep_cut1_peak_HFdepth1 = cms.int32(10), + lsdep_cut1_peak_HFdepth2 = cms.int32(5), + lsdep_cut1_peak_HOdepth4 = cms.int32(45), + # to select events with Nbcs > this limits + lsdep_cut3_max_HBdepth1 = cms.int32(19), + lsdep_cut3_max_HBdepth2 = cms.int32(6), + lsdep_cut3_max_HEdepth1 = cms.int32(15), + lsdep_cut3_max_HEdepth2 = cms.int32(12), + lsdep_cut3_max_HEdepth3 = cms.int32(3), + lsdep_cut3_max_HFdepth1 = cms.int32(9), + lsdep_cut3_max_HFdepth2 = cms.int32(4), + lsdep_cut3_max_HOdepth4 = cms.int32(40), + # + # + #old was for runs: + # nbadchannels1 = cms.int32(7), + # nbadchannels2 = cms.int32(12), + # nbadchannels3 = cms.int32(50), + # + #Verbosity = cms.untracked.int32(-79), + # cuts on Estimator1 to see LS dependences: + lsdep_estimator1_HBdepth1 = cms.double(2500.), + lsdep_estimator1_HBdepth2 = cms.double(2500.), + lsdep_estimator1_HBdepth3 = cms.double(2500.), + lsdep_estimator1_HBdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth1 = cms.double(2500.), + lsdep_estimator1_HEdepth2 = cms.double(2500.), + lsdep_estimator1_HEdepth3 = cms.double(2500.), + lsdep_estimator1_HEdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth5 = cms.double(2500.), + lsdep_estimator1_HEdepth6 = cms.double(2500.), + lsdep_estimator1_HEdepth7 = cms.double(2500.), + lsdep_estimator1_HFdepth1 = cms.double(2500.), + lsdep_estimator1_HFdepth2 = cms.double(2500.), + lsdep_estimator1_HFdepth3 = cms.double(2500.), + lsdep_estimator1_HFdepth4 = cms.double(2500.), + lsdep_estimator1_HOdepth4 = cms.double(2500.), + # cuts on Estimator2 to see LS dependences: + lsdep_estimator2_HBdepth1 = cms.double(7.), + lsdep_estimator2_HBdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth1 = cms.double(7.), + lsdep_estimator2_HEdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth3 = cms.double(7.), + lsdep_estimator2_HFdepth1 = cms.double(7.), + lsdep_estimator2_HFdepth2 = cms.double(7.), + lsdep_estimator2_HOdepth4 = cms.double(7.), + # cuts on Estimator3 to see LS dependences: + lsdep_estimator3_HBdepth1 = cms.double(7.), + lsdep_estimator3_HBdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth1 = cms.double(7.), + lsdep_estimator3_HEdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth3 = cms.double(7.), + lsdep_estimator3_HFdepth1 = cms.double(7.), + lsdep_estimator3_HFdepth2 = cms.double(7.), + lsdep_estimator3_HOdepth4 = cms.double(7.), + # cuts on Estimator4 to see LS dependences: + lsdep_estimator4_HBdepth1 = cms.double(5.), + lsdep_estimator4_HBdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth1 = cms.double(5.), + lsdep_estimator4_HEdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth3 = cms.double(5.), + lsdep_estimator4_HFdepth1 = cms.double(5.), + lsdep_estimator4_HFdepth2 = cms.double(5.), + lsdep_estimator4_HOdepth4 = cms.double(5.), + # cuts on Estimator5 to see LS dependences: + lsdep_estimator5_HBdepth1 = cms.double(1.8), + lsdep_estimator5_HBdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth1 = cms.double(1.8), + lsdep_estimator5_HEdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth3 = cms.double(1.8), + lsdep_estimator5_HFdepth1 = cms.double(1.8), + lsdep_estimator5_HFdepth2 = cms.double(1.8), + lsdep_estimator5_HOdepth4 = cms.double(1.8), + # + # + #Verbosity = cms.untracked.int32(-81), + #Verbosity = cms.untracked.int32(-82), + #Verbosity = cms.untracked.int32(-83), + # + # use ADC amplitude: + useADCmassive = cms.untracked.bool(True), + useADCfC = cms.untracked.bool(False), + useADCcounts = cms.untracked.bool(False), + # + # Pedestals in fC + #usePedestalSubtraction = cms.untracked.bool(True), + usePedestalSubtraction = cms.untracked.bool(False), + # + # for possible ignoring of channels w/o signal, apply same cut for + # HBHEHFHO on Amplitude, usable for all Estimators 1,2,3,4,5: + # forallestimators_amplitude_bigger = cms.double(10.), + forallestimators_amplitude_bigger = cms.double(-100.), + # + # + # if 0 - do not use digis at all + flagToUseDigiCollectionsORNot = cms.int32(1), + # + #usecontinuousnumbering = cms.untracked.bool(False), + usecontinuousnumbering = cms.untracked.bool(True), + # + # + # + hcalCalibDigiCollectionTag = cms.InputTag('hcalDigis'), + hbheDigiCollectionTag = cms.InputTag('hcalDigis'), + hoDigiCollectionTag = cms.InputTag('hcalDigis'), + hfDigiCollectionTag = cms.InputTag('hcalDigis'), + # + # + # + # + #for upgrade: --------------------------------------------------------- + hbheQIE11DigiCollectionTag = cms.InputTag('hcalDigis'), + hbheQIE10DigiCollectionTag = cms.InputTag('hcalDigis'), + # flag to use either only old QIE8 digiCollections or only new QIE10,11 digiCollections + #=0-all digiCollections(default for normal running), =1-only old QIE8 digiCollections, + #=2-only new QIE1011 digiCollections, =3-only new QIE1011 digiCollections w/o new high depthes + #=4-2016fall, =5-2016fall w/o new high depthes, =6-2017bebin, =7-2017bebin w/o new high depthes in HEonly + #=8--2017bebin w/o new high depthes, =9-all digiCollections w/o new high depthes + # flag HBHE8 HBHE11 HF8 HF10 comments: + # 0 + + + + all + # 1 + - + - old + # 2 - + - + new + # 3 - + - + new w/o high depthes + # 4 + - + + 2016fall + # 5 + - + + 2016fall w/o high depthes + # 6 + + - + 2017 && 2018 && 2021 + # 7 + + - + 2017begin w/o high depthes in HEonly + # 8 + + - + 2017begin w/o high depthes + # 9 + + + + all w/o high depthes + # 10 + - - + 2017 w/o HEP17 + # + flagupgradeqie1011 = cms.int32(6), + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # flaguseshunt = 1 or 6 (6 is default for global runs) + flaguseshunt = cms.int32(6), + # flagsipmcorrection: != 0 yes,apply; = 0 do not use; + flagsipmcorrection = cms.int32(1), + #end upgrade: --------------------------------------------------------- end upgrade + # + # + # for local LASER runs ONLY!!! to be > 0 (,else = 0) + flagLaserRaddam = cms.int32(1), + # for gaussian fit for local shunt1 (Gsel0) led low-intensity or ped ONLY!!! to be > 0 (,else = 0) + flagfitshunt1pedorledlowintensity = cms.int32(0), + # + splashesUpperLimit = cms.int32(10000), + # + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupDigi = cms.int32(1), + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupReco = cms.int32(1), + # + hbheInputSignalTag = cms.InputTag('hbherecoMBNZS'), + hbheInputNoiseTag = cms.InputTag('hbherecoNoise'), + hfInputSignalTag = cms.InputTag('hfrecoMBNZS'), + hfInputNoiseTag = cms.InputTag('hfrecoNoise'), + # + # + # + # + # + # + #HistOutFile = cms.untracked.string('LASER_331370.root'), + #HistOutFile = cms.untracked.string(histodir+'/LASER_'+runnumber+'.root'), + #MAPOutFile = cms.untracked.string('LogEleMapdb.h') + # + ##OutputFilePath = cms.string('/tmp/zhokin/'), + ##OutputFileExt = cms.string(''), + # + ) + +process.hcal_db_producer = cms.ESProducer("HcalDbProducer", + dump = cms.untracked.vstring(''), + file = cms.untracked.string('') +) +process.es_hardcode = cms.ESSource("HcalHardcodeCalibrations", + toGet = cms.untracked.vstring('QIEShape', + 'QIEData', + 'ChannelQuality', + 'HcalQIEData', + 'Pedestals', + 'PedestalWidths', + 'Gains', + 'GainWidths', + 'ZSThresholds', + 'RespCorrs') +) + +## Jula's recipe for too many files +#process.options = cms.untracked.PSet( +# wantSummary = cms.untracked.bool(False), +# Rethrow = cms.untracked.vstring("ProductNotFound"), # make this exception fatal +# fileMode = cms.untracked.string('NOMERGE') # no ordering needed, but calls endRun/beginRun etc. at file boundaries +#) + +######################################################################################## Global Tags for 2018 data taking : +# use twiki site to specify HLT reconstruction Global tags: +# https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFrontierConditions +# +# 100X_dataRun2_HLT_v2 for CMSSW_10_0_3 onwards CRUZET 2018 update of 0T templates for SiPixels +# 100X_dataRun2_HLT_v1 for CMSSW_10_0_0 onwards MWGRs 2018 first HLT GT for 2018 +# +# +############################################################################ GlobalTag :1+ good as 5 +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '100X_dataRun2_HLT_v2', '') + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data_FULL', '') + + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '101X_dataRun2_HLT_v7', '') + +# 2019 Ultra Legacy 2017 +#process.GlobalTag.globaltag = '106X_dataRun2_trackerAlignment2017_v1' +# 2019 Ultra Legacy 2018 test TkAl +#process.GlobalTag.globaltag = '106X_dataRun2_v17' +# 2019 Ultra Legacy 2018 +#process.GlobalTag.globaltag = '106X_dataRun2_newTkAl_v18' +# 2019 Ultra Legacy 2016 +#process.GlobalTag.globaltag = '106X_dataRun2_UL2016TkAl_v24' +#process.GlobalTag.globaltag = '105X_dataRun2_v8' + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +from Configuration.AlCa.autoCond import autoCond +#process.GlobalTag.globaltag = '104X_dataRun2_v1' +#process.GlobalTag.globaltag = '105X_postLS2_design_v4' +process.GlobalTag.globaltag = '106X_dataRun3_HLT_v3' + + +############################################################################ +# V.EPSHTEIN: +#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +#process.GlobalTag.globaltag = '100X_dataRun2_Prompt_Candidate_2018_01_31_16_01_36' +### +#process.hcal_db_producer = cms.ESProducer("HcalDbProducer", +# dump = cms.untracked.vstring(''), +# file = cms.untracked.string('') +#) +# +#process.hcalDigis= cms.EDProducer("HcalRawToDigi", +# FilterDataQuality = cms.bool(True), +# HcalFirstFED = cms.untracked.int32(700), +# InputLabel = cms.InputTag("source"), +# UnpackCalib = cms.untracked.bool(True), +# FEDs = cms.untracked.vint32(1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117), +#) +### +############################################################################ +process.load('Configuration.StandardSequences.RawToDigi_Data_cff') +process.hcalDigis.FilterDataQuality = cms.bool(False) +process.hcalDigis.InputLabel = cms.InputTag("source") +############################################################################ +process.load('EventFilter.HcalRawToDigi.hcalRawToDigi_cfi') +process.hcalDigis= process.hcalRawToDigi.clone( + FilterDataQuality = False, + InputLabel = "source", + #InputLabel = cms.InputTag("rawDataCollector"), +) +############################################################################ +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestal_cff") +process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestalLocal_cff") +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalMinBias_cff") +#process.load("ALCARECOHcalCalPedestalLocal_cff") +############################################################################ +#process.p = cms.Path(process.hcalDigis*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.minbiasana) + +process.p = cms.Path(process.hcalDigis*process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) + +# see /afs/cern.ch/work/z/zhokin/public/CMSSW_10_4_0_patch1/src/Calibration/HcalAlCaRecoProducers/python/ALCARECOHcalCalMinBias_cff.py +############################################################################ +process.MessageLogger = cms.Service("MessageLogger", + categories = cms.untracked.vstring(''), + destinations = cms.untracked.vstring('cout'), + debugModules = cms.untracked.vstring('*'), + cout = cms.untracked.PSet( + threshold = cms.untracked.string('WARNING'), + WARNING = cms.untracked.PSet(limit = cms.untracked.int32(0)) + ) + ) +############################################################################ + + + diff --git a/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_LASER_era2021_cfg.py b/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_LASER_era2021_cfg.py new file mode 100644 index 0000000000000..710aaa6cc8ff3 --- /dev/null +++ b/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_LASER_era2021_cfg.py @@ -0,0 +1,590 @@ +#eoscms ls -l /eos/cms/store/group/dpg_hcal/comm_hcal/USC/run327785/USC_327785.root +# choose run in /store/group/dpg_hcal/comm_hcal/USC/ +#how to run: cmsRun remoteMonitoring_LASER_era2019_cfg.py 331311 /store/group/dpg_hcal/comm_hcal/USC/ /afs/cern.ch/work/z/zhokin/hcal/voc2/CMSSW_11_1_0_pre3/src/DPGAnalysis/HcalTools/scripts/rmt + +import sys +import FWCore.ParameterSet.Config as cms +from Configuration.StandardSequences.Eras import eras +#process = cms.Process("TEST", eras.Run2_2018) +process = cms.Process("TEST", eras.Run3) +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("CondCore.CondDB.CondDB_cfi") +process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi") +process.l1GtUnpack.DaqGtInputTag = 'source' +# from RelValAlCaPedestal_cfg_2018.py +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') +process.load('Configuration.StandardSequences.Reconstruction_Data_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +#process.load('RecoLocalCalo.Configuration.hcalLocalReco_cff') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') + +##runnumber = sys.argv[2][4:-5] +runnumber = sys.argv[2] +rundir = sys.argv[3] +histodir = sys.argv[4] + +#print 'RUN = '+runnumber +#print 'Input file = '+rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +##print 'Input file = '+rundir+'/USC_'+runnumber+'.root' +#print 'Output file = '+histodir+'/LASER_'+runnumber+'.root' + +process.maxEvents = cms.untracked.PSet( +# input = cms.untracked.int32(100) + input = cms.untracked.int32(-1) + ) + +process.TFileService = cms.Service("TFileService", + fileName = cms.string(histodir+'/LASER_'+runnumber+'.root') +# ,closeFileFast = cms.untracked.bool(True) + ) + + +#process.source = cms.Source("PoolSource", +process.source = cms.Source("HcalTBSource", + skipBadFiles=cms.untracked.bool(True), + firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID([]), + firstRun = cms.untracked.uint32(331370), +# firstRun = cms.untracked.uint32(330153), +# firstRun = cms.untracked.uint32(329416), + fileNames = cms.untracked.vstring( +rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +#rundir+'/USC_'+runnumber+'.root' +# '/store/group/dpg_hcal/comm_hcal/USC/run331370/USC_331370.root' + +), + secondaryFileNames = cms.untracked.vstring() + ) + +process.Analyzer = cms.EDAnalyzer("CMTRawAnalyzer", + # + Verbosity = cms.untracked.int32(0), + #Verbosity = cms.untracked.int32(-9062), + #Verbosity = cms.untracked.int32(-9063), + #Verbosity = cms.untracked.int32(-9064), + #Verbosity = cms.untracked.int32(-9065), + #Verbosity = cms.untracked.int32(-84), + #Verbosity = cms.untracked.int32(-91), + #Verbosity = cms.untracked.int32(-92), + # + MapCreation = cms.untracked.int32(1), + # + recordNtuples = cms.untracked.bool(False), + #recordNtuples = cms.untracked.bool(True), + maxNeventsInNtuple = cms.int32(1), + # + #recordHistoes = cms.untracked.bool(False), + recordHistoes = cms.untracked.bool(True), + # + ##scripts: zRunRatio34.C, zRunNbadchan.C + studyRunDependenceHist = cms.untracked.bool(True), + #studyRunDependenceHist = cms.untracked.bool(False), + # + ##scripts: zerrors.C + studyCapIDErrorsHist = cms.untracked.bool(True), + #studyCapIDErrorsHist = cms.untracked.bool(False), + # + ##scripts: zrms.C + studyRMSshapeHist = cms.untracked.bool(True), + #studyRMSshapeHist = cms.untracked.bool(False), + # + ##scripts: zratio34.C + studyRatioShapeHist = cms.untracked.bool(True), + #studyRatioShapeHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyADCAmplHist = cms.untracked.bool(True), + #studyADCAmplHist = cms.untracked.bool(False), + # + ##scripts: ztsmean.C + studyTSmeanShapeHist = cms.untracked.bool(True), + #studyTSmeanShapeHist = cms.untracked.bool(False), + # + ##scripts: ztsmaxa.C + studyTSmaxShapeHist = cms.untracked.bool(True), + #studyTSmaxShapeHist = cms.untracked.bool(False), + # + ##scripts: zcalib....C + studyCalibCellsHist = cms.untracked.bool(True), + #studyCalibCellsHist = cms.untracked.bool(False), + # + ##scripts: zdifampl.C + studyDiffAmplHist = cms.untracked.bool(True), + #studyDiffAmplHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyPedestalsHist = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + ##scripts: zamplpedcorr.C + studyPedestalCorrelations = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + # + ##DigiCollectionLabel = cms.untracked.InputTag("hcalDigis"), + #Verbosity = cms.untracked.int32(-54), + #Verbosity = cms.untracked.int32(-22), + #Verbosity = cms.untracked.int32(-11), + #Verbosity = cms.untracked.int32(-12), + #Verbosity = cms.untracked.int32(-13), + #Verbosity = cms.untracked.int32(-51), + #Verbosity = cms.untracked.int32(-24), + #Verbosity = cms.untracked.int32(-244), + #Verbosity = cms.untracked.int32(-233), + # + # + # Normal channels: + # + # -53 for BAD HBHEHF channels from study on shape Ratio + #Verbosity = cms.untracked.int32(-53), + ratioHBMin = cms.double(0.50), + ratioHBMax = cms.double(1.00), + ratioHEMin = cms.double(0.55), + ratioHEMax = cms.double(1.00), + ratioHFMin = cms.double(0.60), + ratioHFMax = cms.double(1.02), + ratioHOMin = cms.double(0.55), + ratioHOMax = cms.double(1.04), + # -54 for BAD HBHEHF channels from study on RMS of shapes + #Verbosity = cms.untracked.int32(-54), + rmsHBMin = cms.double(0.3), + rmsHBMax = cms.double(2.5), + rmsHEMin = cms.double(0.9), + rmsHEMax = cms.double(3.6), + rmsHFMin = cms.double(0.2), + rmsHFMax = cms.double(2.1), + rmsHOMin = cms.double(0.2), + rmsHOMax = cms.double(2.6), + # -55 for BAD HBHEHF channels from study on TSmean of shapes + #Verbosity = cms.untracked.int32(-55), + TSmeanHBMin = cms.double(5.0), + TSmeanHBMax = cms.double(7.5), + TSmeanHEMin = cms.double(2.5), + TSmeanHEMax = cms.double(6.5), + TSmeanHFMin = cms.double(5.5), + TSmeanHFMax = cms.double(8.5), + TSmeanHOMin = cms.double(1.5), + TSmeanHOMax = cms.double(4.4), + # -55 for BAD HBHEHF channels from study on TSmax of shapes + #Verbosity = cms.untracked.int32(-55), + TSpeakHBMin = cms.double(1.8), + TSpeakHBMax = cms.double(8.5), + TSpeakHEMin = cms.double(1.5), + TSpeakHEMax = cms.double(8.5), + TSpeakHFMin = cms.double(1.5), + TSpeakHFMax = cms.double(8.5), + TSpeakHOMin = cms.double(0.5), + TSpeakHOMax = cms.double(6.5), + # -56 for BAD HBHEHOHF channels from study on ADC Amplitude + #Verbosity = cms.untracked.int32(-56), + ADCAmplHBMin = cms.double(10000.), + ADCAmplHBMax = cms.double(300000.), + ADCAmplHEMin = cms.double(20000.), + ADCAmplHEMax = cms.double(300000.), + ADCAmplHFMin = cms.double(50.), + ADCAmplHFMax = cms.double(9000.), + ADCAmplHOMin = cms.double(50.), + ADCAmplHOMax = cms.double(9000.), + # + # to see channels w/ PedestalSigma < cut + #Verbosity = cms.untracked.int32(-57), + pedestalwHBMax = cms.double(0.1), + pedestalwHEMax = cms.double(0.1), + pedestalwHFMax = cms.double(0.4), + pedestalwHOMax = cms.double(0.1), + # + # to see channels for pedestal < cut + pedestalHBMax = cms.double(0.1), + pedestalHEMax = cms.double(0.6), + pedestalHFMax = cms.double(0.8), + pedestalHOMax = cms.double(0.1), + # + # + # CALIBRATION channels: + # + # for BAD HBHEHOHF CALIBRATION channels from study on ADC amplitude + # cuts for Laser runs: + #calibrADCHBMin = cms.double(15.0), + #calibrADCHEMin = cms.double(15.0), + #calibrADCHOMin = cms.double(15.0), + #calibrADCHFMin = cms.double(15.0), + # cuts for LASER runs: + calibrADCHBMin = cms.double(1000.), + calibrADCHBMax = cms.double(100000000.), + calibrADCHEMin = cms.double(1000.), + calibrADCHEMax = cms.double(100000000.), + calibrADCHOMin = cms.double(1000.), + calibrADCHOMax = cms.double(100000000.), + calibrADCHFMin = cms.double(100.), + calibrADCHFMax = cms.double(100000000.), + + # for BAD HBHEHOHF CALIBRATION channels from study on shape Ratio + calibrRatioHBMin = cms.double(0.76), + calibrRatioHBMax = cms.double(0.94), + calibrRatioHEMin = cms.double(0.76), + calibrRatioHEMax = cms.double(0.94), + calibrRatioHOMin = cms.double(0.85), + calibrRatioHOMax = cms.double(0.99), + calibrRatioHFMin = cms.double(0.5), + calibrRatioHFMax = cms.double(0.8), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmax + calibrTSmaxHBMin = cms.double(1.50), + calibrTSmaxHBMax = cms.double(2.50), + calibrTSmaxHEMin = cms.double(1.50), + calibrTSmaxHEMax = cms.double(2.50), + calibrTSmaxHOMin = cms.double(1.50), + calibrTSmaxHOMax = cms.double(2.50), + calibrTSmaxHFMin = cms.double(3.50), + calibrTSmaxHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmean + calibrTSmeanHBMin = cms.double(2.40), + calibrTSmeanHBMax = cms.double(3.70), + calibrTSmeanHEMin = cms.double(2.40), + calibrTSmeanHEMax = cms.double(3.70), + calibrTSmeanHOMin = cms.double(1.50), + calibrTSmeanHOMax = cms.double(2.70), + calibrTSmeanHFMin = cms.double(3.50), + calibrTSmeanHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on Width + calibrWidthHBMin = cms.double(1.30), + calibrWidthHBMax = cms.double(1.90), + calibrWidthHEMin = cms.double(1.30), + calibrWidthHEMax = cms.double(1.90), + calibrWidthHOMin = cms.double(0.70), + calibrWidthHOMax = cms.double(1.65), + calibrWidthHFMin = cms.double(0.30), + calibrWidthHFMax = cms.double(1.50), + # + # Special task of run or LS quality: + # + # flag for ask runs of LSs for RMT & CMT accordingly: + #=0-runs, =1-LSs + # keep for LASER runs this flags =0 always + flagtoaskrunsorls = cms.int32(0), + # + # flag for choice of criterion of bad channels: + #=0-CapIdErr, =1-Ratio, =2-Width, =3-TSmax, =4-TSmean, =5-adcAmplitud + # keep for CMT (global runs) this flags =0 always + flagtodefinebadchannel = cms.int32(0), + #how many bins you want on the plots:better to choice (#LS+1) + howmanybinsonplots = cms.int32(25), + # + # ls - range for RBX study (and ??? perhaps for gain stability via abort gap): + lsmin = cms.int32(1), + #lsmax = cms.int32(620), + lsmax = cms.int32(2600), + # + flagabortgaprejected = cms.int32(1), + bcnrejectedlow = cms.int32(3446), + bcnrejectedhigh= cms.int32(3564), + # + # flag cpu time reducing + #=0-all plots, =1-optimized number of plots (for Global runs) + flagcpuoptimization = cms.int32(0), + # + # flag for ask type of Normalization for CMT estimators: + #=0-normalizationOn#evOfLS; =1-averageVariable-normalizationOn#entriesInLS; + flagestimatornormalization = cms.int32(1), + # + # + # cuts on Nbadchannels to see LS dependences: + # Verbosity = cms.untracked.int32(-77), + # to select abnormal events,for which Nbcs > this limits + lsdep_cut1_peak_HBdepth1 = cms.int32(20), + lsdep_cut1_peak_HBdepth2 = cms.int32(7), + lsdep_cut1_peak_HEdepth1 = cms.int32(16), + lsdep_cut1_peak_HEdepth2 = cms.int32(13), + lsdep_cut1_peak_HEdepth3 = cms.int32(4), + lsdep_cut1_peak_HFdepth1 = cms.int32(10), + lsdep_cut1_peak_HFdepth2 = cms.int32(5), + lsdep_cut1_peak_HOdepth4 = cms.int32(45), + # to select events with Nbcs > this limits + lsdep_cut3_max_HBdepth1 = cms.int32(19), + lsdep_cut3_max_HBdepth2 = cms.int32(6), + lsdep_cut3_max_HEdepth1 = cms.int32(15), + lsdep_cut3_max_HEdepth2 = cms.int32(12), + lsdep_cut3_max_HEdepth3 = cms.int32(3), + lsdep_cut3_max_HFdepth1 = cms.int32(9), + lsdep_cut3_max_HFdepth2 = cms.int32(4), + lsdep_cut3_max_HOdepth4 = cms.int32(40), + # + # + #old was for runs: + # nbadchannels1 = cms.int32(7), + # nbadchannels2 = cms.int32(12), + # nbadchannels3 = cms.int32(50), + # + #Verbosity = cms.untracked.int32(-79), + # cuts on Estimator1 to see LS dependences: + lsdep_estimator1_HBdepth1 = cms.double(2500.), + lsdep_estimator1_HBdepth2 = cms.double(2500.), + lsdep_estimator1_HBdepth3 = cms.double(2500.), + lsdep_estimator1_HBdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth1 = cms.double(2500.), + lsdep_estimator1_HEdepth2 = cms.double(2500.), + lsdep_estimator1_HEdepth3 = cms.double(2500.), + lsdep_estimator1_HEdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth5 = cms.double(2500.), + lsdep_estimator1_HEdepth6 = cms.double(2500.), + lsdep_estimator1_HEdepth7 = cms.double(2500.), + lsdep_estimator1_HFdepth1 = cms.double(2500.), + lsdep_estimator1_HFdepth2 = cms.double(2500.), + lsdep_estimator1_HFdepth3 = cms.double(2500.), + lsdep_estimator1_HFdepth4 = cms.double(2500.), + lsdep_estimator1_HOdepth4 = cms.double(2500.), + # cuts on Estimator2 to see LS dependences: + lsdep_estimator2_HBdepth1 = cms.double(7.), + lsdep_estimator2_HBdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth1 = cms.double(7.), + lsdep_estimator2_HEdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth3 = cms.double(7.), + lsdep_estimator2_HFdepth1 = cms.double(7.), + lsdep_estimator2_HFdepth2 = cms.double(7.), + lsdep_estimator2_HOdepth4 = cms.double(7.), + # cuts on Estimator3 to see LS dependences: + lsdep_estimator3_HBdepth1 = cms.double(7.), + lsdep_estimator3_HBdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth1 = cms.double(7.), + lsdep_estimator3_HEdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth3 = cms.double(7.), + lsdep_estimator3_HFdepth1 = cms.double(7.), + lsdep_estimator3_HFdepth2 = cms.double(7.), + lsdep_estimator3_HOdepth4 = cms.double(7.), + # cuts on Estimator4 to see LS dependences: + lsdep_estimator4_HBdepth1 = cms.double(5.), + lsdep_estimator4_HBdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth1 = cms.double(5.), + lsdep_estimator4_HEdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth3 = cms.double(5.), + lsdep_estimator4_HFdepth1 = cms.double(5.), + lsdep_estimator4_HFdepth2 = cms.double(5.), + lsdep_estimator4_HOdepth4 = cms.double(5.), + # cuts on Estimator5 to see LS dependences: + lsdep_estimator5_HBdepth1 = cms.double(1.8), + lsdep_estimator5_HBdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth1 = cms.double(1.8), + lsdep_estimator5_HEdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth3 = cms.double(1.8), + lsdep_estimator5_HFdepth1 = cms.double(1.8), + lsdep_estimator5_HFdepth2 = cms.double(1.8), + lsdep_estimator5_HOdepth4 = cms.double(1.8), + # + # + #Verbosity = cms.untracked.int32(-81), + #Verbosity = cms.untracked.int32(-82), + #Verbosity = cms.untracked.int32(-83), + # + # use ADC amplitude: + useADCmassive = cms.untracked.bool(True), + useADCfC = cms.untracked.bool(False), + useADCcounts = cms.untracked.bool(False), + # + # Pedestals in fC + #usePedestalSubtraction = cms.untracked.bool(True), + usePedestalSubtraction = cms.untracked.bool(False), + # + # for possible ignoring of channels w/o signal, apply same cut for + # HBHEHFHO on Amplitude, usable for all Estimators 1,2,3,4,5: + # forallestimators_amplitude_bigger = cms.double(10.), + forallestimators_amplitude_bigger = cms.double(-100.), + # + # + # if 0 - do not use digis at all + flagToUseDigiCollectionsORNot = cms.int32(1), + # + #usecontinuousnumbering = cms.untracked.bool(False), + usecontinuousnumbering = cms.untracked.bool(True), + # + # + # + hcalCalibDigiCollectionTag = cms.InputTag('hcalDigis'), + hbheDigiCollectionTag = cms.InputTag('hcalDigis'), + hoDigiCollectionTag = cms.InputTag('hcalDigis'), + hfDigiCollectionTag = cms.InputTag('hcalDigis'), + # + # + # + # + #for upgrade: --------------------------------------------------------- + hbheQIE11DigiCollectionTag = cms.InputTag('hcalDigis'), + hbheQIE10DigiCollectionTag = cms.InputTag('hcalDigis'), + # flag to use either only old QIE8 digiCollections or only new QIE10,11 digiCollections + #=0-all digiCollections(default for normal running), =1-only old QIE8 digiCollections, + #=2-only new QIE1011 digiCollections, =3-only new QIE1011 digiCollections w/o new high depthes + #=4-2016fall, =5-2016fall w/o new high depthes, =6-2017bebin, =7-2017bebin w/o new high depthes in HEonly + #=8--2017bebin w/o new high depthes, =9-all digiCollections w/o new high depthes + # flag HBHE8 HBHE11 HF8 HF10 comments: + # 0 + + + + all + # 1 + - + - old + # 2 - + - + new + # 3 - + - + new w/o high depthes + # 4 + - + + 2016fall + # 5 + - + + 2016fall w/o high depthes + # 6 + + - + 2017 && 2018 && 2021 + # 7 + + - + 2017begin w/o high depthes in HEonly + # 8 + + - + 2017begin w/o high depthes + # 9 + + + + all w/o high depthes + # 10 + - - + 2017 w/o HEP17 + # + flagupgradeqie1011 = cms.int32(6), + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # flaguseshunt = 1 or 6 (6 is default for global runs) + flaguseshunt = cms.int32(6), + # flagsipmcorrection: != 0 yes,apply; = 0 do not use; + flagsipmcorrection = cms.int32(1), + #end upgrade: --------------------------------------------------------- end upgrade + # + # + # for local LASER runs ONLY!!! to be > 0 (,else = 0) + flagLaserRaddam = cms.int32(1), + # for gaussian fit for local shunt1 (Gsel0) led low-intensity or ped ONLY!!! to be > 0 (,else = 0) + flagfitshunt1pedorledlowintensity = cms.int32(0), + # + splashesUpperLimit = cms.int32(10000), + # + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupDigi = cms.int32(1), + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupReco = cms.int32(1), + # + hbheInputSignalTag = cms.InputTag('hbherecoMBNZS'), + hbheInputNoiseTag = cms.InputTag('hbherecoNoise'), + hfInputSignalTag = cms.InputTag('hfrecoMBNZS'), + hfInputNoiseTag = cms.InputTag('hfrecoNoise'), + # + # + # + # + # + # + #HistOutFile = cms.untracked.string('LASER_331370.root'), + #HistOutFile = cms.untracked.string(histodir+'/LASER_'+runnumber+'.root'), + #MAPOutFile = cms.untracked.string('LogEleMapdb.h') + # + ##OutputFilePath = cms.string('/tmp/zhokin/'), + ##OutputFileExt = cms.string(''), + # + ) + +process.hcal_db_producer = cms.ESProducer("HcalDbProducer", + dump = cms.untracked.vstring(''), + file = cms.untracked.string('') +) +process.es_hardcode = cms.ESSource("HcalHardcodeCalibrations", + toGet = cms.untracked.vstring('QIEShape', + 'QIEData', + 'ChannelQuality', + 'HcalQIEData', + 'Pedestals', + 'PedestalWidths', + 'Gains', + 'GainWidths', + 'ZSThresholds', + 'RespCorrs') +) + +## Jula's recipe for too many files +#process.options = cms.untracked.PSet( +# wantSummary = cms.untracked.bool(False), +# Rethrow = cms.untracked.vstring("ProductNotFound"), # make this exception fatal +# fileMode = cms.untracked.string('NOMERGE') # no ordering needed, but calls endRun/beginRun etc. at file boundaries +#) + +######################################################################################## Global Tags for 2018 data taking : +# use twiki site to specify HLT reconstruction Global tags: +# https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFrontierConditions +# +# 100X_dataRun2_HLT_v2 for CMSSW_10_0_3 onwards CRUZET 2018 update of 0T templates for SiPixels +# 100X_dataRun2_HLT_v1 for CMSSW_10_0_0 onwards MWGRs 2018 first HLT GT for 2018 +# +# +############################################################################ GlobalTag :1+ good as 5 +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '100X_dataRun2_HLT_v2', '') + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data_FULL', '') + + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '101X_dataRun2_HLT_v7', '') + +# 2019 Ultra Legacy 2017 +#process.GlobalTag.globaltag = '106X_dataRun2_trackerAlignment2017_v1' +# 2019 Ultra Legacy 2018 test TkAl +#process.GlobalTag.globaltag = '106X_dataRun2_v17' +# 2019 Ultra Legacy 2018 +#process.GlobalTag.globaltag = '106X_dataRun2_newTkAl_v18' +# 2019 Ultra Legacy 2016 +#process.GlobalTag.globaltag = '106X_dataRun2_UL2016TkAl_v24' +#process.GlobalTag.globaltag = '105X_dataRun2_v8' + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +from Configuration.AlCa.autoCond import autoCond +#process.GlobalTag.globaltag = '104X_dataRun2_v1' +#process.GlobalTag.globaltag = '105X_postLS2_design_v4' +process.GlobalTag.globaltag = '106X_dataRun3_HLT_v3' + + +############################################################################ +# V.EPSHTEIN: +#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +#process.GlobalTag.globaltag = '100X_dataRun2_Prompt_Candidate_2018_01_31_16_01_36' +### +#process.hcal_db_producer = cms.ESProducer("HcalDbProducer", +# dump = cms.untracked.vstring(''), +# file = cms.untracked.string('') +#) +# +#process.hcalDigis= cms.EDProducer("HcalRawToDigi", +# FilterDataQuality = cms.bool(True), +# HcalFirstFED = cms.untracked.int32(700), +# InputLabel = cms.InputTag("source"), +# UnpackCalib = cms.untracked.bool(True), +# FEDs = cms.untracked.vint32(1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117), +#) +### +############################################################################ +process.load('Configuration.StandardSequences.RawToDigi_Data_cff') +process.hcalDigis.FilterDataQuality = cms.bool(False) +process.hcalDigis.InputLabel = cms.InputTag("source") +############################################################################ +process.load('EventFilter.HcalRawToDigi.hcalRawToDigi_cfi') +process.hcalDigis= process.hcalRawToDigi.clone( + FilterDataQuality = False, + InputLabel = "source", + #InputLabel = cms.InputTag("rawDataCollector"), +) +############################################################################ +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestal_cff") +process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestalLocal_cff") +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalMinBias_cff") +#process.load("ALCARECOHcalCalPedestalLocal_cff") +############################################################################ +#process.p = cms.Path(process.hcalDigis*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.minbiasana) + +process.p = cms.Path(process.hcalDigis*process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) + +# see /afs/cern.ch/work/z/zhokin/public/CMSSW_10_4_0_patch1/src/Calibration/HcalAlCaRecoProducers/python/ALCARECOHcalCalMinBias_cff.py +############################################################################ +process.MessageLogger = cms.Service("MessageLogger", + categories = cms.untracked.vstring(''), + destinations = cms.untracked.vstring('cout'), + debugModules = cms.untracked.vstring('*'), + cout = cms.untracked.PSet( + threshold = cms.untracked.string('WARNING'), + WARNING = cms.untracked.PSet(limit = cms.untracked.int32(0)) + ) + ) +############################################################################ + + + diff --git a/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_LED_era2021_cfg.py b/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_LED_era2021_cfg.py new file mode 100644 index 0000000000000..a22cf0210b942 --- /dev/null +++ b/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_LED_era2021_cfg.py @@ -0,0 +1,592 @@ +#eoscms ls -l /eos/cms/store/group/dpg_hcal/comm_hcal/USC/run327785/USC_327785.root +# choose run in /store/group/dpg_hcal/comm_hcal/USC/ +#how to run: cmsRun remoteMonitoring_LED_era2019_cfg.py 331370 /store/group/dpg_hcal/comm_hcal/USC/ /afs/cern.ch/work/z/zhokin/hcal/voc2/CMSSW_11_1_0_pre3/src/DPGAnalysis/HcalTools/scripts/rmt + +import sys +import FWCore.ParameterSet.Config as cms +from Configuration.StandardSequences.Eras import eras +#process = cms.Process("TEST", eras.Run2_2018) + +process = cms.Process("TEST", eras.Run3) +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("CondCore.CondDB.CondDB_cfi") +process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi") +process.l1GtUnpack.DaqGtInputTag = 'source' +# from RelValAlCaPedestal_cfg_2018.py +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') +process.load('Configuration.StandardSequences.Reconstruction_Data_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +#process.load('RecoLocalCalo.Configuration.hcalLocalReco_cff') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') + +##runnumber = sys.argv[2][4:-5] +runnumber = sys.argv[2] +rundir = sys.argv[3] +histodir = sys.argv[4] + +#print 'RUN = '+runnumber +#print 'Input file = '+rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +##print 'Input file = '+rundir+'/USC_'+runnumber+'.root' +#print 'Output file = '+histodir+'/LED_'+runnumber+'.root' + +process.maxEvents = cms.untracked.PSet( +# input = cms.untracked.int32(100) + input = cms.untracked.int32(1000) + ) + +process.TFileService = cms.Service("TFileService", + fileName = cms.string(histodir+'/MIXED_LED_'+runnumber+'.root') +# ,closeFileFast = cms.untracked.bool(True) + ) + + +#process.source = cms.Source("PoolSource", +process.source = cms.Source("HcalTBSource", + skipBadFiles=cms.untracked.bool(True), + firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID([]), + firstRun = cms.untracked.uint32(331370), +# firstRun = cms.untracked.uint32(330153), +# firstRun = cms.untracked.uint32(329416), + fileNames = cms.untracked.vstring( + rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +), + skipEvents=cms.untracked.uint32(1000), + secondaryFileNames = cms.untracked.vstring() + ) + +process.Analyzer = cms.EDAnalyzer("CMTRawAnalyzer", + # + Verbosity = cms.untracked.int32(0), + #Verbosity = cms.untracked.int32(-9062), + #Verbosity = cms.untracked.int32(-9063), + #Verbosity = cms.untracked.int32(-9064), + #Verbosity = cms.untracked.int32(-9065), + #Verbosity = cms.untracked.int32(-84), + #Verbosity = cms.untracked.int32(-91), + #Verbosity = cms.untracked.int32(-92), + # + MapCreation = cms.untracked.int32(1), + # + recordNtuples = cms.untracked.bool(False), + #recordNtuples = cms.untracked.bool(True), + maxNeventsInNtuple = cms.int32(1), + # + #recordHistoes = cms.untracked.bool(False), + recordHistoes = cms.untracked.bool(True), + # + ##scripts: zRunRatio34.C, zRunNbadchan.C + studyRunDependenceHist = cms.untracked.bool(True), + #studyRunDependenceHist = cms.untracked.bool(False), + # + ##scripts: zerrors.C + studyCapIDErrorsHist = cms.untracked.bool(True), + #studyCapIDErrorsHist = cms.untracked.bool(False), + # + ##scripts: zrms.C + studyRMSshapeHist = cms.untracked.bool(True), + #studyRMSshapeHist = cms.untracked.bool(False), + # + ##scripts: zratio34.C + studyRatioShapeHist = cms.untracked.bool(True), + #studyRatioShapeHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyADCAmplHist = cms.untracked.bool(True), + #studyADCAmplHist = cms.untracked.bool(False), + # + ##scripts: ztsmean.C + studyTSmeanShapeHist = cms.untracked.bool(True), + #studyTSmeanShapeHist = cms.untracked.bool(False), + # + ##scripts: ztsmaxa.C + studyTSmaxShapeHist = cms.untracked.bool(True), + #studyTSmaxShapeHist = cms.untracked.bool(False), + # + ##scripts: zcalib....C + studyCalibCellsHist = cms.untracked.bool(True), + #studyCalibCellsHist = cms.untracked.bool(False), + # + ##scripts: zdifampl.C + studyDiffAmplHist = cms.untracked.bool(True), + #studyDiffAmplHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyPedestalsHist = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + ##scripts: zamplpedcorr.C + studyPedestalCorrelations = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + # + ##DigiCollectionLabel = cms.untracked.InputTag("hcalDigis"), + #Verbosity = cms.untracked.int32(-54), + #Verbosity = cms.untracked.int32(-22), + #Verbosity = cms.untracked.int32(-11), + #Verbosity = cms.untracked.int32(-12), + #Verbosity = cms.untracked.int32(-13), + #Verbosity = cms.untracked.int32(-51), + #Verbosity = cms.untracked.int32(-24), + #Verbosity = cms.untracked.int32(-244), + #Verbosity = cms.untracked.int32(-233), + # + # + # Normal channels: + # + # -53 for BAD HBHEHF channels from study on shape Ratio + #Verbosity = cms.untracked.int32(-53), + ratioHBMin = cms.double(0.70), + ratioHBMax = cms.double(0.94), + ratioHEMin = cms.double(0.60), + ratioHEMax = cms.double(0.95), + ratioHFMin = cms.double(0.45), + ratioHFMax = cms.double(1.02), + ratioHOMin = cms.double(0.40), + ratioHOMax = cms.double(1.04), + # -54 for BAD HBHEHF channels from study on RMS of shapes + #Verbosity = cms.untracked.int32(-54), + rmsHBMin = cms.double(0.7), + rmsHBMax = cms.double(2.5), + rmsHEMin = cms.double(0.7), + rmsHEMax = cms.double(2.2), + rmsHFMin = cms.double(0.1), + rmsHFMax = cms.double(2.6), + rmsHOMin = cms.double(0.1), + rmsHOMax = cms.double(2.8), + # -55 for BAD HBHEHF channels from study on TSmean of shapes + #Verbosity = cms.untracked.int32(-55), + TSmeanHBMin = cms.double(2.5), + TSmeanHBMax = cms.double(5.5), + TSmeanHEMin = cms.double(1.0), + TSmeanHEMax = cms.double(5.2), + TSmeanHFMin = cms.double(1.0), + TSmeanHFMax = cms.double(4.2), + TSmeanHOMin = cms.double(1.0), + TSmeanHOMax = cms.double(4.8), + # -55 for BAD HBHEHF channels from study on TSmax of shapes + #Verbosity = cms.untracked.int32(-55), + TSpeakHBMin = cms.double(2.2), + TSpeakHBMax = cms.double(5.5), + TSpeakHEMin = cms.double(1.5), + TSpeakHEMax = cms.double(6.5), + TSpeakHFMin = cms.double(0.5), + TSpeakHFMax = cms.double(4.5), + TSpeakHOMin = cms.double(0.5), + TSpeakHOMax = cms.double(7.5), + # -56 for BAD HBHEHOHF channels from study on ADC Amplitude + #Verbosity = cms.untracked.int32(-56), + ADCAmplHBMin = cms.double(10000.), + ADCAmplHBMax = cms.double(300000.), + ADCAmplHEMin = cms.double(20000.), + ADCAmplHEMax = cms.double(300000.), + ADCAmplHFMin = cms.double(50.), + ADCAmplHFMax = cms.double(9000.), + ADCAmplHOMin = cms.double(50.), + ADCAmplHOMax = cms.double(9000.), + # + # to see channels w/ PedestalSigma < cut + #Verbosity = cms.untracked.int32(-57), + pedestalwHBMax = cms.double(0.1), + pedestalwHEMax = cms.double(0.1), + pedestalwHFMax = cms.double(0.4), + pedestalwHOMax = cms.double(0.1), + # + # to see channels for pedestal < cut + pedestalHBMax = cms.double(0.1), + pedestalHEMax = cms.double(0.6), + pedestalHFMax = cms.double(0.8), + pedestalHOMax = cms.double(0.1), + # + # + # CALIBRATION channels: + # + # for BAD HBHEHOHF CALIBRATION channels from study on ADC amplitude + # cuts for Laser runs: + #calibrADCHBMin = cms.double(15.0), + #calibrADCHEMin = cms.double(15.0), + #calibrADCHOMin = cms.double(15.0), + #calibrADCHFMin = cms.double(15.0), + # cuts for LED runs: + calibrADCHBMin = cms.double(1000.), + calibrADCHBMax = cms.double(100000000.), + calibrADCHEMin = cms.double(1000.), + calibrADCHEMax = cms.double(100000000.), + calibrADCHOMin = cms.double(1000.), + calibrADCHOMax = cms.double(100000000.), + calibrADCHFMin = cms.double(100.), + calibrADCHFMax = cms.double(100000000.), + + # for BAD HBHEHOHF CALIBRATION channels from study on shape Ratio + calibrRatioHBMin = cms.double(0.76), + calibrRatioHBMax = cms.double(0.94), + calibrRatioHEMin = cms.double(0.76), + calibrRatioHEMax = cms.double(0.94), + calibrRatioHOMin = cms.double(0.85), + calibrRatioHOMax = cms.double(0.99), + calibrRatioHFMin = cms.double(0.5), + calibrRatioHFMax = cms.double(0.8), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmax + calibrTSmaxHBMin = cms.double(1.50), + calibrTSmaxHBMax = cms.double(2.50), + calibrTSmaxHEMin = cms.double(1.50), + calibrTSmaxHEMax = cms.double(2.50), + calibrTSmaxHOMin = cms.double(1.50), + calibrTSmaxHOMax = cms.double(2.50), + calibrTSmaxHFMin = cms.double(3.50), + calibrTSmaxHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmean + calibrTSmeanHBMin = cms.double(2.40), + calibrTSmeanHBMax = cms.double(3.70), + calibrTSmeanHEMin = cms.double(2.40), + calibrTSmeanHEMax = cms.double(3.70), + calibrTSmeanHOMin = cms.double(1.50), + calibrTSmeanHOMax = cms.double(2.70), + calibrTSmeanHFMin = cms.double(3.50), + calibrTSmeanHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on Width + calibrWidthHBMin = cms.double(1.30), + calibrWidthHBMax = cms.double(1.90), + calibrWidthHEMin = cms.double(1.30), + calibrWidthHEMax = cms.double(1.90), + calibrWidthHOMin = cms.double(0.70), + calibrWidthHOMax = cms.double(1.65), + calibrWidthHFMin = cms.double(0.30), + calibrWidthHFMax = cms.double(1.50), + # + # Special task of run or LS quality: + # + # flag for ask runs of LSs for RMT & CMT accordingly: + #=0-runs, =1-LSs + # keep for LED runs this flags =0 always + flagtoaskrunsorls = cms.int32(0), + # + # flag for choice of criterion of bad channels: + #=0-CapIdErr, =1-Ratio, =2-Width, =3-TSmax, =4-TSmean, =5-adcAmplitud + # keep for CMT (global runs) this flags =0 always + flagtodefinebadchannel = cms.int32(0), + #how many bins you want on the plots:better to choice (#LS+1) + howmanybinsonplots = cms.int32(25), + # + # ls - range for RBX study (and ??? perhaps for gain stability via abort gap): + lsmin = cms.int32(1), + #lsmax = cms.int32(620), + lsmax = cms.int32(2600), + # + flagabortgaprejected = cms.int32(1), + bcnrejectedlow = cms.int32(3446), + bcnrejectedhigh= cms.int32(3564), + # + # flag cpu time reducing + #=0-all plots, =1-optimized number of plots (for Global runs) + flagcpuoptimization = cms.int32(0), + # + # flag for ask type of Normalization for CMT estimators: + #=0-normalizationOn#evOfLS; =1-averageVariable-normalizationOn#entriesInLS; + flagestimatornormalization = cms.int32(1), + # + # + # cuts on Nbadchannels to see LS dependences: + # Verbosity = cms.untracked.int32(-77), + # to select abnormal events,for which Nbcs > this limits + lsdep_cut1_peak_HBdepth1 = cms.int32(20), + lsdep_cut1_peak_HBdepth2 = cms.int32(7), + lsdep_cut1_peak_HEdepth1 = cms.int32(16), + lsdep_cut1_peak_HEdepth2 = cms.int32(13), + lsdep_cut1_peak_HEdepth3 = cms.int32(4), + lsdep_cut1_peak_HFdepth1 = cms.int32(10), + lsdep_cut1_peak_HFdepth2 = cms.int32(5), + lsdep_cut1_peak_HOdepth4 = cms.int32(45), + # to select events with Nbcs > this limits + lsdep_cut3_max_HBdepth1 = cms.int32(19), + lsdep_cut3_max_HBdepth2 = cms.int32(6), + lsdep_cut3_max_HEdepth1 = cms.int32(15), + lsdep_cut3_max_HEdepth2 = cms.int32(12), + lsdep_cut3_max_HEdepth3 = cms.int32(3), + lsdep_cut3_max_HFdepth1 = cms.int32(9), + lsdep_cut3_max_HFdepth2 = cms.int32(4), + lsdep_cut3_max_HOdepth4 = cms.int32(40), + # + # + #old was for runs: + # nbadchannels1 = cms.int32(7), + # nbadchannels2 = cms.int32(12), + # nbadchannels3 = cms.int32(50), + # + #Verbosity = cms.untracked.int32(-79), + # cuts on Estimator1 to see LS dependences: + lsdep_estimator1_HBdepth1 = cms.double(2500.), + lsdep_estimator1_HBdepth2 = cms.double(2500.), + lsdep_estimator1_HBdepth3 = cms.double(2500.), + lsdep_estimator1_HBdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth1 = cms.double(2500.), + lsdep_estimator1_HEdepth2 = cms.double(2500.), + lsdep_estimator1_HEdepth3 = cms.double(2500.), + lsdep_estimator1_HEdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth5 = cms.double(2500.), + lsdep_estimator1_HEdepth6 = cms.double(2500.), + lsdep_estimator1_HEdepth7 = cms.double(2500.), + lsdep_estimator1_HFdepth1 = cms.double(2500.), + lsdep_estimator1_HFdepth2 = cms.double(2500.), + lsdep_estimator1_HFdepth3 = cms.double(2500.), + lsdep_estimator1_HFdepth4 = cms.double(2500.), + lsdep_estimator1_HOdepth4 = cms.double(2500.), + # cuts on Estimator2 to see LS dependences: + lsdep_estimator2_HBdepth1 = cms.double(7.), + lsdep_estimator2_HBdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth1 = cms.double(7.), + lsdep_estimator2_HEdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth3 = cms.double(7.), + lsdep_estimator2_HFdepth1 = cms.double(7.), + lsdep_estimator2_HFdepth2 = cms.double(7.), + lsdep_estimator2_HOdepth4 = cms.double(7.), + # cuts on Estimator3 to see LS dependences: + lsdep_estimator3_HBdepth1 = cms.double(7.), + lsdep_estimator3_HBdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth1 = cms.double(7.), + lsdep_estimator3_HEdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth3 = cms.double(7.), + lsdep_estimator3_HFdepth1 = cms.double(7.), + lsdep_estimator3_HFdepth2 = cms.double(7.), + lsdep_estimator3_HOdepth4 = cms.double(7.), + # cuts on Estimator4 to see LS dependences: + lsdep_estimator4_HBdepth1 = cms.double(5.), + lsdep_estimator4_HBdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth1 = cms.double(5.), + lsdep_estimator4_HEdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth3 = cms.double(5.), + lsdep_estimator4_HFdepth1 = cms.double(5.), + lsdep_estimator4_HFdepth2 = cms.double(5.), + lsdep_estimator4_HOdepth4 = cms.double(5.), + # cuts on Estimator5 to see LS dependences: + lsdep_estimator5_HBdepth1 = cms.double(1.8), + lsdep_estimator5_HBdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth1 = cms.double(1.8), + lsdep_estimator5_HEdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth3 = cms.double(1.8), + lsdep_estimator5_HFdepth1 = cms.double(1.8), + lsdep_estimator5_HFdepth2 = cms.double(1.8), + lsdep_estimator5_HOdepth4 = cms.double(1.8), + # + # + #Verbosity = cms.untracked.int32(-81), + #Verbosity = cms.untracked.int32(-82), + #Verbosity = cms.untracked.int32(-83), + # + # use ADC amplitude: + useADCmassive = cms.untracked.bool(True), + useADCfC = cms.untracked.bool(False), + useADCcounts = cms.untracked.bool(False), + # + # Pedestals in fC + #usePedestalSubtraction = cms.untracked.bool(True), + usePedestalSubtraction = cms.untracked.bool(False), + # + # for possible ignoring of channels w/o signal, apply same cut for + # HBHEHFHO on Amplitude, usable for all Estimators 1,2,3,4,5: + # forallestimators_amplitude_bigger = cms.double(10.), + forallestimators_amplitude_bigger = cms.double(-100.), + # + # + # if 0 - do not use digis at all + flagToUseDigiCollectionsORNot = cms.int32(1), + # + #usecontinuousnumbering = cms.untracked.bool(False), + usecontinuousnumbering = cms.untracked.bool(True), + # + # + # + hcalCalibDigiCollectionTag = cms.InputTag('hcalDigis'), + hbheDigiCollectionTag = cms.InputTag('hcalDigis'), + hoDigiCollectionTag = cms.InputTag('hcalDigis'), + hfDigiCollectionTag = cms.InputTag('hcalDigis'), + # + # + # + # + #for upgrade: --------------------------------------------------------- + hbheQIE11DigiCollectionTag = cms.InputTag('hcalDigis'), + hbheQIE10DigiCollectionTag = cms.InputTag('hcalDigis'), + # flag to use either only old QIE8 digiCollections or only new QIE10,11 digiCollections + #=0-all digiCollections(default for normal running), =1-only old QIE8 digiCollections, + #=2-only new QIE1011 digiCollections, =3-only new QIE1011 digiCollections w/o new high depthes + #=4-2016fall, =5-2016fall w/o new high depthes, =6-2017bebin, =7-2017bebin w/o new high depthes in HEonly + #=8--2017bebin w/o new high depthes, =9-all digiCollections w/o new high depthes + # flag HBHE8 HBHE11 HF8 HF10 comments: + # 0 + + + + all + # 1 + - + - old + # 2 - + - + new + # 3 - + - + new w/o high depthes + # 4 + - + + 2016fall + # 5 + - + + 2016fall w/o high depthes + # 6 + + - + 2017 && 2018 && 2021 + # 7 + + - + 2017begin w/o high depthes in HEonly + # 8 + + - + 2017begin w/o high depthes + # 9 + + + + all w/o high depthes + # 10 + - - + 2017 w/o HEP17 + # + flagupgradeqie1011 = cms.int32(6), + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # flaguseshunt = 1 or 6 (6 is default for global runs) + flaguseshunt = cms.int32(6), + # flagsipmcorrection: != 0 yes,apply; = 0 do not use; + flagsipmcorrection = cms.int32(1), + #end upgrade: --------------------------------------------------------- end upgrade + # + # + # for local LASER runs ONLY!!! to be > 0 (,else = 0) + flagLaserRaddam = cms.int32(0), + # for gaussian fit for local shunt1 (Gsel0) led low-intensity or ped ONLY!!! to be > 0 (,else = 0) + flagfitshunt1pedorledlowintensity = cms.int32(0), + # + splashesUpperLimit = cms.int32(10000), + # + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupDigi = cms.int32(1), + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupReco = cms.int32(1), + # + hbheInputSignalTag = cms.InputTag('hbherecoMBNZS'), + hbheInputNoiseTag = cms.InputTag('hbherecoNoise'), + hfInputSignalTag = cms.InputTag('hfrecoMBNZS'), + hfInputNoiseTag = cms.InputTag('hfrecoNoise'), + # + # + # + # + # + # + #HistOutFile = cms.untracked.string('LED_331370.root'), + #HistOutFile = cms.untracked.string(histodir+'/LED_'+runnumber+'.root'), + #MAPOutFile = cms.untracked.string('LogEleMapdb.h') + # + ##OutputFilePath = cms.string('/tmp/zhokin/'), + ##OutputFileExt = cms.string(''), + # + ) + +process.hcal_db_producer = cms.ESProducer("HcalDbProducer", + dump = cms.untracked.vstring(''), + file = cms.untracked.string('') +) +process.es_hardcode = cms.ESSource("HcalHardcodeCalibrations", + toGet = cms.untracked.vstring('QIEShape', + 'QIEData', + 'ChannelQuality', + 'HcalQIEData', + 'Pedestals', + 'PedestalWidths', + 'Gains', + 'GainWidths', + 'ZSThresholds', + 'RespCorrs') +) + +## Jula's recipe for too many files +#process.options = cms.untracked.PSet( +# wantSummary = cms.untracked.bool(False), +# Rethrow = cms.untracked.vstring("ProductNotFound"), # make this exception fatal +# fileMode = cms.untracked.string('NOMERGE') # no ordering needed, but calls endRun/beginRun etc. at file boundaries +#) + +######################################################################################## Global Tags for 2018 data taking : +# use twiki site to specify HLT reconstruction Global tags: +# https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFrontierConditions +# +# 100X_dataRun2_HLT_v2 for CMSSW_10_0_3 onwards CRUZET 2018 update of 0T templates for SiPixels +# 100X_dataRun2_HLT_v1 for CMSSW_10_0_0 onwards MWGRs 2018 first HLT GT for 2018 +# +# +############################################################################ GlobalTag :1+ good as 5 +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '100X_dataRun2_HLT_v2', '') + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data_FULL', '') + + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '101X_dataRun2_HLT_v7', '') + +# 2019 Ultra Legacy 2017 +#process.GlobalTag.globaltag = '106X_dataRun2_trackerAlignment2017_v1' +# 2019 Ultra Legacy 2018 test TkAl +#process.GlobalTag.globaltag = '106X_dataRun2_v17' +# 2019 Ultra Legacy 2018 +#process.GlobalTag.globaltag = '106X_dataRun2_newTkAl_v18' +# 2019 Ultra Legacy 2016 +#process.GlobalTag.globaltag = '106X_dataRun2_UL2016TkAl_v24' +#process.GlobalTag.globaltag = '105X_dataRun2_v8' + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +from Configuration.AlCa.autoCond import autoCond +#process.GlobalTag.globaltag = '104X_dataRun2_v1' +#process.GlobalTag.globaltag = '105X_postLS2_design_v4' +process.GlobalTag.globaltag = '113X_dataRun3_HLT_v3' + + +############################################################################ +# V.EPSHTEIN: +#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +#process.GlobalTag.globaltag = '100X_dataRun2_Prompt_Candidate_2018_01_31_16_01_36' +### +#process.hcal_db_producer = cms.ESProducer("HcalDbProducer", +# dump = cms.untracked.vstring(''), +# file = cms.untracked.string('') +#) +# +#process.hcalDigis= cms.EDProducer("HcalRawToDigi", +# FilterDataQuality = cms.bool(True), +# HcalFirstFED = cms.untracked.int32(700), +# InputLabel = cms.InputTag("source"), +# UnpackCalib = cms.untracked.bool(True), +# FEDs = cms.untracked.vint32(1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117), +#) +### +############################################################################ +process.load('Configuration.StandardSequences.RawToDigi_Data_cff') +process.hcalDigis.FilterDataQuality = cms.bool(False) +process.hcalDigis.InputLabel = cms.InputTag("source") +############################################################################ +process.hcalDigis= cms.EDProducer("HcalRawToDigi", +# FilterDataQuality = cms.bool(True), + FilterDataQuality = cms.bool(False), + HcalFirstFED = cms.untracked.int32(700), + InputLabel = cms.InputTag("source"), + #InputLabel = cms.InputTag("rawDataCollector"), +) +#process.hcalDigis.FilterDataQuality = cms.bool(False) +#process.hcalDigis.InputLabel = cms.InputTag("source") +############################################################################ +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestal_cff") +process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestalLocal_cff") +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalMinBias_cff") +#process.load("ALCARECOHcalCalPedestalLocal_cff") +############################################################################ +#process.p = cms.Path(process.hcalDigis*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.minbiasana) + +process.p = cms.Path(process.hcalDigis*process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) + +# see /afs/cern.ch/work/z/zhokin/public/CMSSW_10_4_0_patch1/src/Calibration/HcalAlCaRecoProducers/python/ALCARECOHcalCalMinBias_cff.py +############################################################################ +process.MessageLogger = cms.Service("MessageLogger", + categories = cms.untracked.vstring(''), + destinations = cms.untracked.vstring('cout'), + debugModules = cms.untracked.vstring('*'), + cout = cms.untracked.PSet( + threshold = cms.untracked.string('WARNING'), + WARNING = cms.untracked.PSet(limit = cms.untracked.int32(0)) + ) + ) +############################################################################ + + + diff --git a/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_PEDESTAL_era2021_cfg.py b/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_PEDESTAL_era2021_cfg.py new file mode 100644 index 0000000000000..a3812f5edf37c --- /dev/null +++ b/DPGAnalysis/HcalTools/python/remoteMonitoring_MIXED_PEDESTAL_era2021_cfg.py @@ -0,0 +1,592 @@ +#eoscms ls -l /eos/cms/store/group/dpg_hcal/comm_hcal/USC/run327785/USC_327785.root +# choose run in /store/group/dpg_hcal/comm_hcal/USC/ +#how to run: cmsRun remoteMonitoring_PEDESTAL_era2019_cfg.py 331301 /store/group/dpg_hcal/comm_hcal/USC/ /afs/cern.ch/work/z/zhokin/hcal/voc2/CMSSW_11_1_0_pre3/src/DPGAnalysis/HcalTools/scripts/rmt + +import sys +import FWCore.ParameterSet.Config as cms +from Configuration.StandardSequences.Eras import eras +#process = cms.Process("TEST", eras.Run2_2018) +process = cms.Process("TEST", eras.Run3) +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("CondCore.CondDB.CondDB_cfi") +process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi") +process.l1GtUnpack.DaqGtInputTag = 'source' +# from RelValAlCaPedestal_cfg_2018.py +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') +process.load('Configuration.StandardSequences.Reconstruction_Data_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +#process.load('RecoLocalCalo.Configuration.hcalLocalReco_cff') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') + +##runnumber = sys.argv[2][4:-5] +runnumber = sys.argv[2] +rundir = sys.argv[3] +histodir = sys.argv[4] + +#print 'RUN = '+runnumber +#print 'Input file = '+rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +##print 'Input file = '+rundir+'/USC_'+runnumber+'.root' +#print 'Output file = '+histodir+'/PEDESTAL_'+runnumber+'.root' + +process.maxEvents = cms.untracked.PSet( +# input = cms.untracked.int32(100) + input = cms.untracked.int32(1000) + ) + +process.TFileService = cms.Service("TFileService", + fileName = cms.string(histodir+'/MIXED_PEDESTAL_'+runnumber+'.root') +# ,closeFileFast = cms.untracked.bool(True) + ) + +#process.source = cms.Source("PoolSource", +process.source = cms.Source("HcalTBSource", + skipBadFiles=cms.untracked.bool(True), + firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID([]), + firstRun = cms.untracked.uint32(331370), +# firstRun = cms.untracked.uint32(330153), +# firstRun = cms.untracked.uint32(329416), + fileNames = cms.untracked.vstring( +rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +#rundir+'/USC_'+runnumber+'.root' +# '/store/group/dpg_hcal/comm_hcal/USC/run331370/USC_331370.root' + +), + secondaryFileNames = cms.untracked.vstring() + ) + +process.Analyzer = cms.EDAnalyzer("CMTRawAnalyzer", + # + Verbosity = cms.untracked.int32(0), + #Verbosity = cms.untracked.int32(-9062), + #Verbosity = cms.untracked.int32(-9063), + #Verbosity = cms.untracked.int32(-9064), + #Verbosity = cms.untracked.int32(-9065), + #Verbosity = cms.untracked.int32(-84), + #Verbosity = cms.untracked.int32(-91), + #Verbosity = cms.untracked.int32(-92), + # + MapCreation = cms.untracked.int32(1), + # + recordNtuples = cms.untracked.bool(False), + #recordNtuples = cms.untracked.bool(True), + maxNeventsInNtuple = cms.int32(1), + # + #recordHistoes = cms.untracked.bool(False), + recordHistoes = cms.untracked.bool(True), + # + ##scripts: zRunRatio34.C, zRunNbadchan.C + studyRunDependenceHist = cms.untracked.bool(True), + #studyRunDependenceHist = cms.untracked.bool(False), + # + ##scripts: zerrors.C + studyCapIDErrorsHist = cms.untracked.bool(True), + #studyCapIDErrorsHist = cms.untracked.bool(False), + # + ##scripts: zrms.C + studyRMSshapeHist = cms.untracked.bool(True), + #studyRMSshapeHist = cms.untracked.bool(False), + # + ##scripts: zratio34.C + studyRatioShapeHist = cms.untracked.bool(True), + #studyRatioShapeHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyADCAmplHist = cms.untracked.bool(True), + #studyADCAmplHist = cms.untracked.bool(False), + # + ##scripts: ztsmean.C + studyTSmeanShapeHist = cms.untracked.bool(True), + #studyTSmeanShapeHist = cms.untracked.bool(False), + # + ##scripts: ztsmaxa.C + studyTSmaxShapeHist = cms.untracked.bool(True), + #studyTSmaxShapeHist = cms.untracked.bool(False), + # + ##scripts: zcalib....C + studyCalibCellsHist = cms.untracked.bool(True), + #studyCalibCellsHist = cms.untracked.bool(False), + # + ##scripts: zdifampl.C + studyDiffAmplHist = cms.untracked.bool(True), + #studyDiffAmplHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyPedestalsHist = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + ##scripts: zamplpedcorr.C + studyPedestalCorrelations = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + # + ##DigiCollectionLabel = cms.untracked.InputTag("hcalDigis"), + #Verbosity = cms.untracked.int32(-54), + #Verbosity = cms.untracked.int32(-22), + #Verbosity = cms.untracked.int32(-11), + #Verbosity = cms.untracked.int32(-12), + #Verbosity = cms.untracked.int32(-13), + #Verbosity = cms.untracked.int32(-51), + #Verbosity = cms.untracked.int32(-24), + #Verbosity = cms.untracked.int32(-244), + #Verbosity = cms.untracked.int32(-233), + # + # + # Normal channels: + # + # -53 for BAD HBHEHF channels from study on shape Ratio + #Verbosity = cms.untracked.int32(-53), + ratioHBMin = cms.double(0.31), + ratioHBMax = cms.double(0.95), + ratioHEMin = cms.double(0.31), + ratioHEMax = cms.double(1.00), + ratioHFMin = cms.double(0.05), + ratioHFMax = cms.double(0.98), + ratioHOMin = cms.double(0.15), + ratioHOMax = cms.double(1.00), + # -54 for BAD HBHEHF channels from study on RMS of shapes + #Verbosity = cms.untracked.int32(-54), + rmsHBMin = cms.double(2.7), + rmsHBMax = cms.double(3.0), + rmsHEMin = cms.double(2.7), + rmsHEMax = cms.double(3.0), + rmsHFMin = cms.double(0.2), + rmsHFMax = cms.double(5.0), + rmsHOMin = cms.double(2.7), + rmsHOMax = cms.double(3.0), + # -55 for BAD HBHEHF channels from study on TSmean of shapes + #Verbosity = cms.untracked.int32(-55), + TSmeanHBMin = cms.double(4.5), + TSmeanHBMax = cms.double(4.6), + TSmeanHEMin = cms.double(4.5), + TSmeanHEMax = cms.double(4.6), + TSmeanHFMin = cms.double(2.0), + TSmeanHFMax = cms.double(7.0), + TSmeanHOMin = cms.double(4.5), + TSmeanHOMax = cms.double(4.6), + # -55 for BAD HBHEHF channels from study on TSmax of shapes + #Verbosity = cms.untracked.int32(-55), + TSpeakHBMin = cms.double(0.5), + TSpeakHBMax = cms.double(9.5), + TSpeakHEMin = cms.double(0.5), + TSpeakHEMax = cms.double(9.5), + TSpeakHFMin = cms.double(0.5), + TSpeakHFMax = cms.double(8.5), + TSpeakHOMin = cms.double(0.5), + TSpeakHOMax = cms.double(8.5), + # -56 for BAD HBHEHOHF channels from study on ADC Amplitude + #Verbosity = cms.untracked.int32(-56), + ADCAmplHBMin = cms.double(10000.), + ADCAmplHBMax = cms.double(300000.), + ADCAmplHEMin = cms.double(20000.), + ADCAmplHEMax = cms.double(300000.), + ADCAmplHFMin = cms.double(50.), + ADCAmplHFMax = cms.double(9000.), + ADCAmplHOMin = cms.double(50.), + ADCAmplHOMax = cms.double(9000.), + # + # to see channels w/ PedestalSigma < cut + #Verbosity = cms.untracked.int32(-57), + pedestalwHBMax = cms.double(0.1), + pedestalwHEMax = cms.double(0.1), + pedestalwHFMax = cms.double(0.4), + pedestalwHOMax = cms.double(0.1), + # + # to see channels for pedestal < cut + pedestalHBMax = cms.double(0.1), + pedestalHEMax = cms.double(0.6), + pedestalHFMax = cms.double(0.8), + pedestalHOMax = cms.double(0.1), + # + # + # CALIBRATION channels: + # + # for BAD HBHEHOHF CALIBRATION channels from study on ADC amplitude + # cuts for Laser runs: + #calibrADCHBMin = cms.double(15.0), + #calibrADCHEMin = cms.double(15.0), + #calibrADCHOMin = cms.double(15.0), + #calibrADCHFMin = cms.double(15.0), + # cuts for PEDESTAL runs: + calibrADCHBMin = cms.double(1000.), + calibrADCHBMax = cms.double(100000000.), + calibrADCHEMin = cms.double(1000.), + calibrADCHEMax = cms.double(100000000.), + calibrADCHOMin = cms.double(1000.), + calibrADCHOMax = cms.double(100000000.), + calibrADCHFMin = cms.double(100.), + calibrADCHFMax = cms.double(100000000.), + + # for BAD HBHEHOHF CALIBRATION channels from study on shape Ratio + calibrRatioHBMin = cms.double(0.76), + calibrRatioHBMax = cms.double(0.94), + calibrRatioHEMin = cms.double(0.76), + calibrRatioHEMax = cms.double(0.94), + calibrRatioHOMin = cms.double(0.85), + calibrRatioHOMax = cms.double(0.99), + calibrRatioHFMin = cms.double(0.5), + calibrRatioHFMax = cms.double(0.8), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmax + calibrTSmaxHBMin = cms.double(1.50), + calibrTSmaxHBMax = cms.double(2.50), + calibrTSmaxHEMin = cms.double(1.50), + calibrTSmaxHEMax = cms.double(2.50), + calibrTSmaxHOMin = cms.double(1.50), + calibrTSmaxHOMax = cms.double(2.50), + calibrTSmaxHFMin = cms.double(3.50), + calibrTSmaxHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmean + calibrTSmeanHBMin = cms.double(2.40), + calibrTSmeanHBMax = cms.double(3.70), + calibrTSmeanHEMin = cms.double(2.40), + calibrTSmeanHEMax = cms.double(3.70), + calibrTSmeanHOMin = cms.double(1.50), + calibrTSmeanHOMax = cms.double(2.70), + calibrTSmeanHFMin = cms.double(3.50), + calibrTSmeanHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on Width + calibrWidthHBMin = cms.double(1.30), + calibrWidthHBMax = cms.double(1.90), + calibrWidthHEMin = cms.double(1.30), + calibrWidthHEMax = cms.double(1.90), + calibrWidthHOMin = cms.double(0.70), + calibrWidthHOMax = cms.double(1.65), + calibrWidthHFMin = cms.double(0.30), + calibrWidthHFMax = cms.double(1.50), + # + # Special task of run or LS quality: + # + # flag for ask runs of LSs for RMT & CMT accordingly: + #=0-runs, =1-LSs + # keep for PEDESTAL runs this flags =0 always + flagtoaskrunsorls = cms.int32(0), + # + # flag for choice of criterion of bad channels: + #=0-CapIdErr, =1-Ratio, =2-Width, =3-TSmax, =4-TSmean, =5-adcAmplitud + # keep for CMT (global runs) this flags =0 always + flagtodefinebadchannel = cms.int32(0), + #how many bins you want on the plots:better to choice (#LS+1) + howmanybinsonplots = cms.int32(25), + # + # ls - range for RBX study (and ??? perhaps for gain stability via abort gap): + lsmin = cms.int32(1), + #lsmax = cms.int32(620), + lsmax = cms.int32(2600), + # + flagabortgaprejected = cms.int32(1), + bcnrejectedlow = cms.int32(3446), + bcnrejectedhigh= cms.int32(3564), + # + # flag cpu time reducing + #=0-all plots, =1-optimized number of plots (for Global runs) + flagcpuoptimization = cms.int32(0), + # + # flag for ask type of Normalization for CMT estimators: + #=0-normalizationOn#evOfLS; =1-averageVariable-normalizationOn#entriesInLS; + flagestimatornormalization = cms.int32(1), + # + # + # cuts on Nbadchannels to see LS dependences: + # Verbosity = cms.untracked.int32(-77), + # to select abnormal events,for which Nbcs > this limits + lsdep_cut1_peak_HBdepth1 = cms.int32(20), + lsdep_cut1_peak_HBdepth2 = cms.int32(7), + lsdep_cut1_peak_HEdepth1 = cms.int32(16), + lsdep_cut1_peak_HEdepth2 = cms.int32(13), + lsdep_cut1_peak_HEdepth3 = cms.int32(4), + lsdep_cut1_peak_HFdepth1 = cms.int32(10), + lsdep_cut1_peak_HFdepth2 = cms.int32(5), + lsdep_cut1_peak_HOdepth4 = cms.int32(45), + # to select events with Nbcs > this limits + lsdep_cut3_max_HBdepth1 = cms.int32(19), + lsdep_cut3_max_HBdepth2 = cms.int32(6), + lsdep_cut3_max_HEdepth1 = cms.int32(15), + lsdep_cut3_max_HEdepth2 = cms.int32(12), + lsdep_cut3_max_HEdepth3 = cms.int32(3), + lsdep_cut3_max_HFdepth1 = cms.int32(9), + lsdep_cut3_max_HFdepth2 = cms.int32(4), + lsdep_cut3_max_HOdepth4 = cms.int32(40), + # + # + #old was for runs: + # nbadchannels1 = cms.int32(7), + # nbadchannels2 = cms.int32(12), + # nbadchannels3 = cms.int32(50), + # + #Verbosity = cms.untracked.int32(-79), + # cuts on Estimator1 to see LS dependences: + lsdep_estimator1_HBdepth1 = cms.double(2500.), + lsdep_estimator1_HBdepth2 = cms.double(2500.), + lsdep_estimator1_HBdepth3 = cms.double(2500.), + lsdep_estimator1_HBdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth1 = cms.double(2500.), + lsdep_estimator1_HEdepth2 = cms.double(2500.), + lsdep_estimator1_HEdepth3 = cms.double(2500.), + lsdep_estimator1_HEdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth5 = cms.double(2500.), + lsdep_estimator1_HEdepth6 = cms.double(2500.), + lsdep_estimator1_HEdepth7 = cms.double(2500.), + lsdep_estimator1_HFdepth1 = cms.double(2500.), + lsdep_estimator1_HFdepth2 = cms.double(2500.), + lsdep_estimator1_HFdepth3 = cms.double(2500.), + lsdep_estimator1_HFdepth4 = cms.double(2500.), + lsdep_estimator1_HOdepth4 = cms.double(2500.), + # cuts on Estimator2 to see LS dependences: + lsdep_estimator2_HBdepth1 = cms.double(7.), + lsdep_estimator2_HBdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth1 = cms.double(7.), + lsdep_estimator2_HEdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth3 = cms.double(7.), + lsdep_estimator2_HFdepth1 = cms.double(7.), + lsdep_estimator2_HFdepth2 = cms.double(7.), + lsdep_estimator2_HOdepth4 = cms.double(7.), + # cuts on Estimator3 to see LS dependences: + lsdep_estimator3_HBdepth1 = cms.double(7.), + lsdep_estimator3_HBdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth1 = cms.double(7.), + lsdep_estimator3_HEdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth3 = cms.double(7.), + lsdep_estimator3_HFdepth1 = cms.double(7.), + lsdep_estimator3_HFdepth2 = cms.double(7.), + lsdep_estimator3_HOdepth4 = cms.double(7.), + # cuts on Estimator4 to see LS dependences: + lsdep_estimator4_HBdepth1 = cms.double(5.), + lsdep_estimator4_HBdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth1 = cms.double(5.), + lsdep_estimator4_HEdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth3 = cms.double(5.), + lsdep_estimator4_HFdepth1 = cms.double(5.), + lsdep_estimator4_HFdepth2 = cms.double(5.), + lsdep_estimator4_HOdepth4 = cms.double(5.), + # cuts on Estimator5 to see LS dependences: + lsdep_estimator5_HBdepth1 = cms.double(1.8), + lsdep_estimator5_HBdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth1 = cms.double(1.8), + lsdep_estimator5_HEdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth3 = cms.double(1.8), + lsdep_estimator5_HFdepth1 = cms.double(1.8), + lsdep_estimator5_HFdepth2 = cms.double(1.8), + lsdep_estimator5_HOdepth4 = cms.double(1.8), + # + # + #Verbosity = cms.untracked.int32(-81), + #Verbosity = cms.untracked.int32(-82), + #Verbosity = cms.untracked.int32(-83), + # + # use ADC amplitude: + useADCmassive = cms.untracked.bool(True), + useADCfC = cms.untracked.bool(False), + useADCcounts = cms.untracked.bool(False), + # + # Pedestals in fC + #usePedestalSubtraction = cms.untracked.bool(True), + usePedestalSubtraction = cms.untracked.bool(False), + # + # for possible ignoring of channels w/o signal, apply same cut for + # HBHEHFHO on Amplitude, usable for all Estimators 1,2,3,4,5: + # forallestimators_amplitude_bigger = cms.double(10.), + forallestimators_amplitude_bigger = cms.double(-100.), + # + # + # + #usecontinuousnumbering = cms.untracked.bool(False), + usecontinuousnumbering = cms.untracked.bool(True), + # + # if 0 - do not use digis at all + flagToUseDigiCollectionsORNot = cms.int32(1), + # + # + hcalCalibDigiCollectionTag = cms.InputTag('hcalDigis'), + hbheDigiCollectionTag = cms.InputTag('hcalDigis'), + hoDigiCollectionTag = cms.InputTag('hcalDigis'), + hfDigiCollectionTag = cms.InputTag('hcalDigis'), + # + # + # + # + #for upgrade: --------------------------------------------------------- + hbheQIE11DigiCollectionTag = cms.InputTag('hcalDigis'), + hbheQIE10DigiCollectionTag = cms.InputTag('hcalDigis'), + # flag to use either only old QIE8 digiCollections or only new QIE10,11 digiCollections + #=0-all digiCollections(default for normal running), =1-only old QIE8 digiCollections, + #=2-only new QIE1011 digiCollections, =3-only new QIE1011 digiCollections w/o new high depthes + #=4-2016fall, =5-2016fall w/o new high depthes, =6-2017bebin, =7-2017bebin w/o new high depthes in HEonly + #=8--2017bebin w/o new high depthes, =9-all digiCollections w/o new high depthes + # flag HBHE8 HBHE11 HF8 HF10 comments: + # 0 + + + + all + # 1 + - + - old + # 2 - + - + new + # 3 - + - + new w/o high depthes + # 4 + - + + 2016fall + # 5 + - + + 2016fall w/o high depthes + # 6 + + - + 2017 && 2018 && 2021 + # 7 + + - + 2017begin w/o high depthes in HEonly + # 8 + + - + 2017begin w/o high depthes + # 9 + + + + all w/o high depthes + # 10 + - - + 2017 w/o HEP17 + # + flagupgradeqie1011 = cms.int32(6), + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # flaguseshunt = 1 or 6 (6 is default for global runs) + flaguseshunt = cms.int32(6), + # flagsipmcorrection: != 0 yes,apply; = 0 do not use; + flagsipmcorrection = cms.int32(1), + #end upgrade: --------------------------------------------------------- end upgrade + # + # + # for local LASER runs ONLY!!! to be > 0 (,else = 0) + flagLaserRaddam = cms.int32(0), + # for gaussian fit for local shunt1 (Gsel0) led low-intensity or ped ONLY!!! to be > 0 (,else = 0) + flagfitshunt1pedorledlowintensity = cms.int32(0), + # + splashesUpperLimit = cms.int32(10000), + # + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupDigi = cms.int32(1), + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupReco = cms.int32(1), + # + hbheInputSignalTag = cms.InputTag('hbherecoMBNZS'), + hbheInputNoiseTag = cms.InputTag('hbherecoNoise'), + hfInputSignalTag = cms.InputTag('hfrecoMBNZS'), + hfInputNoiseTag = cms.InputTag('hfrecoNoise'), + # + # + # + # + # + # + #HistOutFile = cms.untracked.string('PEDESTAL_331370.root'), + #HistOutFile = cms.untracked.string(histodir+'/PEDESTAL_'+runnumber+'.root'), + #MAPOutFile = cms.untracked.string('LogEleMapdb.h') + # + ##OutputFilePath = cms.string('/tmp/zhokin/'), + ##OutputFileExt = cms.string(''), + # + ) + +process.hcal_db_producer = cms.ESProducer("HcalDbProducer", + dump = cms.untracked.vstring(''), + file = cms.untracked.string('') +) +process.es_hardcode = cms.ESSource("HcalHardcodeCalibrations", + toGet = cms.untracked.vstring('QIEShape', + 'QIEData', + 'ChannelQuality', + 'HcalQIEData', + 'Pedestals', + 'PedestalWidths', + 'Gains', + 'GainWidths', + 'ZSThresholds', + 'RespCorrs') +) + +## Jula's recipe for too many files +#process.options = cms.untracked.PSet( +# wantSummary = cms.untracked.bool(False), +# Rethrow = cms.untracked.vstring("ProductNotFound"), # make this exception fatal +# fileMode = cms.untracked.string('NOMERGE') # no ordering needed, but calls endRun/beginRun etc. at file boundaries +#) + +######################################################################################## Global Tags for 2018 data taking : +# use twiki site to specify HLT reconstruction Global tags: +# https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFrontierConditions +# +# 100X_dataRun2_HLT_v2 for CMSSW_10_0_3 onwards CRUZET 2018 update of 0T templates for SiPixels +# 100X_dataRun2_HLT_v1 for CMSSW_10_0_0 onwards MWGRs 2018 first HLT GT for 2018 +# +# +############################################################################ GlobalTag :1+ good as 5 +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '100X_dataRun2_HLT_v2', '') + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data_FULL', '') + + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '101X_dataRun2_HLT_v7', '') + +# 2019 Ultra Legacy 2017 +#process.GlobalTag.globaltag = '106X_dataRun2_trackerAlignment2017_v1' +# 2019 Ultra Legacy 2018 test TkAl +#process.GlobalTag.globaltag = '106X_dataRun2_v17' +# 2019 Ultra Legacy 2018 +#process.GlobalTag.globaltag = '106X_dataRun2_newTkAl_v18' +# 2019 Ultra Legacy 2016 +#process.GlobalTag.globaltag = '106X_dataRun2_UL2016TkAl_v24' +#process.GlobalTag.globaltag = '105X_dataRun2_v8' + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +from Configuration.AlCa.autoCond import autoCond +#process.GlobalTag.globaltag = '104X_dataRun2_v1' +#process.GlobalTag.globaltag = '105X_postLS2_design_v4' +process.GlobalTag.globaltag = '106X_dataRun3_HLT_v3' + + +############################################################################ +# V.EPSHTEIN: +#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +#process.GlobalTag.globaltag = '100X_dataRun2_Prompt_Candidate_2018_01_31_16_01_36' +### +#process.hcal_db_producer = cms.ESProducer("HcalDbProducer", +# dump = cms.untracked.vstring(''), +# file = cms.untracked.string('') +#) +# +#process.hcalDigis= cms.EDProducer("HcalRawToDigi", +# FilterDataQuality = cms.bool(True), +# HcalFirstFED = cms.untracked.int32(700), +# InputLabel = cms.InputTag("source"), +# UnpackCalib = cms.untracked.bool(True), +# FEDs = cms.untracked.vint32(1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117), +#) +### +############################################################################ +process.load('Configuration.StandardSequences.RawToDigi_Data_cff') +process.hcalDigis.FilterDataQuality = cms.bool(False) +process.hcalDigis.InputLabel = cms.InputTag("source") +############################################################################ +process.hcalDigis= cms.EDProducer("HcalRawToDigi", +# FilterDataQuality = cms.bool(True), + FilterDataQuality = cms.bool(False), + HcalFirstFED = cms.untracked.int32(700), + InputLabel = cms.InputTag("source"), + #InputLabel = cms.InputTag("rawDataCollector"), +) +#process.hcalDigis.FilterDataQuality = cms.bool(False) +#process.hcalDigis.InputLabel = cms.InputTag("source") +############################################################################ +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestal_cff") +process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestalLocal_cff") +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalMinBias_cff") +#process.load("ALCARECOHcalCalPedestalLocal_cff") +############################################################################ +#process.p = cms.Path(process.hcalDigis*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.minbiasana) + +process.p = cms.Path(process.hcalDigis*process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) + +# see /afs/cern.ch/work/z/zhokin/public/CMSSW_10_4_0_patch1/src/Calibration/HcalAlCaRecoProducers/python/ALCARECOHcalCalMinBias_cff.py +############################################################################ +process.MessageLogger = cms.Service("MessageLogger", + categories = cms.untracked.vstring(''), + destinations = cms.untracked.vstring('cout'), + debugModules = cms.untracked.vstring('*'), + cout = cms.untracked.PSet( + threshold = cms.untracked.string('WARNING'), + WARNING = cms.untracked.PSet(limit = cms.untracked.int32(0)) + ) + ) +############################################################################ + + + diff --git a/DPGAnalysis/HcalTools/python/remoteMonitoring_PEDESTAL_era2021_cfg.py b/DPGAnalysis/HcalTools/python/remoteMonitoring_PEDESTAL_era2021_cfg.py new file mode 100644 index 0000000000000..767d534c95231 --- /dev/null +++ b/DPGAnalysis/HcalTools/python/remoteMonitoring_PEDESTAL_era2021_cfg.py @@ -0,0 +1,592 @@ +#eoscms ls -l /eos/cms/store/group/dpg_hcal/comm_hcal/USC/run327785/USC_327785.root +# choose run in /store/group/dpg_hcal/comm_hcal/USC/ +#how to run: cmsRun remoteMonitoring_PEDESTAL_era2019_cfg.py 331301 /store/group/dpg_hcal/comm_hcal/USC/ /afs/cern.ch/work/z/zhokin/hcal/voc2/CMSSW_11_1_0_pre3/src/DPGAnalysis/HcalTools/scripts/rmt + +import sys +import FWCore.ParameterSet.Config as cms +from Configuration.StandardSequences.Eras import eras +#process = cms.Process("TEST", eras.Run2_2018) +process = cms.Process("TEST", eras.Run3) +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("CondCore.CondDB.CondDB_cfi") +process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi") +process.l1GtUnpack.DaqGtInputTag = 'source' +# from RelValAlCaPedestal_cfg_2018.py +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') +process.load('Configuration.StandardSequences.Reconstruction_Data_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +#process.load('RecoLocalCalo.Configuration.hcalLocalReco_cff') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') + +##runnumber = sys.argv[2][4:-5] +runnumber = sys.argv[2] +rundir = sys.argv[3] +histodir = sys.argv[4] + +#print 'RUN = '+runnumber +#print 'Input file = '+rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +##print 'Input file = '+rundir+'/USC_'+runnumber+'.root' +#print 'Output file = '+histodir+'/PEDESTAL_'+runnumber+'.root' + +process.maxEvents = cms.untracked.PSet( +# input = cms.untracked.int32(100) + input = cms.untracked.int32(-1) + ) + +process.TFileService = cms.Service("TFileService", + fileName = cms.string(histodir+'/PEDESTAL_'+runnumber+'.root') +# ,closeFileFast = cms.untracked.bool(True) + ) + +#process.source = cms.Source("PoolSource", +process.source = cms.Source("HcalTBSource", + skipBadFiles=cms.untracked.bool(True), + firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID([]), + firstRun = cms.untracked.uint32(331370), +# firstRun = cms.untracked.uint32(330153), +# firstRun = cms.untracked.uint32(329416), + fileNames = cms.untracked.vstring( +rundir+'/run'+runnumber+'/USC_'+runnumber+'.root' +#rundir+'/USC_'+runnumber+'.root' +# '/store/group/dpg_hcal/comm_hcal/USC/run331370/USC_331370.root' + +), + secondaryFileNames = cms.untracked.vstring() + ) + +process.Analyzer = cms.EDAnalyzer("CMTRawAnalyzer", + # + Verbosity = cms.untracked.int32(0), + #Verbosity = cms.untracked.int32(-9062), + #Verbosity = cms.untracked.int32(-9063), + #Verbosity = cms.untracked.int32(-9064), + #Verbosity = cms.untracked.int32(-9065), + #Verbosity = cms.untracked.int32(-84), + #Verbosity = cms.untracked.int32(-91), + #Verbosity = cms.untracked.int32(-92), + # + MapCreation = cms.untracked.int32(1), + # + recordNtuples = cms.untracked.bool(False), + #recordNtuples = cms.untracked.bool(True), + maxNeventsInNtuple = cms.int32(1), + # + #recordHistoes = cms.untracked.bool(False), + recordHistoes = cms.untracked.bool(True), + # + ##scripts: zRunRatio34.C, zRunNbadchan.C + studyRunDependenceHist = cms.untracked.bool(True), + #studyRunDependenceHist = cms.untracked.bool(False), + # + ##scripts: zerrors.C + studyCapIDErrorsHist = cms.untracked.bool(True), + #studyCapIDErrorsHist = cms.untracked.bool(False), + # + ##scripts: zrms.C + studyRMSshapeHist = cms.untracked.bool(True), + #studyRMSshapeHist = cms.untracked.bool(False), + # + ##scripts: zratio34.C + studyRatioShapeHist = cms.untracked.bool(True), + #studyRatioShapeHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyADCAmplHist = cms.untracked.bool(True), + #studyADCAmplHist = cms.untracked.bool(False), + # + ##scripts: ztsmean.C + studyTSmeanShapeHist = cms.untracked.bool(True), + #studyTSmeanShapeHist = cms.untracked.bool(False), + # + ##scripts: ztsmaxa.C + studyTSmaxShapeHist = cms.untracked.bool(True), + #studyTSmaxShapeHist = cms.untracked.bool(False), + # + ##scripts: zcalib....C + studyCalibCellsHist = cms.untracked.bool(True), + #studyCalibCellsHist = cms.untracked.bool(False), + # + ##scripts: zdifampl.C + studyDiffAmplHist = cms.untracked.bool(True), + #studyDiffAmplHist = cms.untracked.bool(False), + # + ##scripts: zadcamplitude.C + studyPedestalsHist = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + ##scripts: zamplpedcorr.C + studyPedestalCorrelations = cms.untracked.bool(True), + #studyPedestalsHist = cms.untracked.bool(False), + # + # + ##DigiCollectionLabel = cms.untracked.InputTag("hcalDigis"), + #Verbosity = cms.untracked.int32(-54), + #Verbosity = cms.untracked.int32(-22), + #Verbosity = cms.untracked.int32(-11), + #Verbosity = cms.untracked.int32(-12), + #Verbosity = cms.untracked.int32(-13), + #Verbosity = cms.untracked.int32(-51), + #Verbosity = cms.untracked.int32(-24), + #Verbosity = cms.untracked.int32(-244), + #Verbosity = cms.untracked.int32(-233), + # + # + # Normal channels: + # + # -53 for BAD HBHEHF channels from study on shape Ratio + #Verbosity = cms.untracked.int32(-53), + ratioHBMin = cms.double(0.31), + ratioHBMax = cms.double(0.95), + ratioHEMin = cms.double(0.31), + ratioHEMax = cms.double(1.00), + ratioHFMin = cms.double(0.05), + ratioHFMax = cms.double(0.98), + ratioHOMin = cms.double(0.15), + ratioHOMax = cms.double(1.00), + # -54 for BAD HBHEHF channels from study on RMS of shapes + #Verbosity = cms.untracked.int32(-54), + rmsHBMin = cms.double(2.7), + rmsHBMax = cms.double(3.0), + rmsHEMin = cms.double(2.7), + rmsHEMax = cms.double(3.0), + rmsHFMin = cms.double(0.2), + rmsHFMax = cms.double(5.0), + rmsHOMin = cms.double(2.7), + rmsHOMax = cms.double(3.0), + # -55 for BAD HBHEHF channels from study on TSmean of shapes + #Verbosity = cms.untracked.int32(-55), + TSmeanHBMin = cms.double(4.5), + TSmeanHBMax = cms.double(4.6), + TSmeanHEMin = cms.double(4.5), + TSmeanHEMax = cms.double(4.6), + TSmeanHFMin = cms.double(2.0), + TSmeanHFMax = cms.double(7.0), + TSmeanHOMin = cms.double(4.5), + TSmeanHOMax = cms.double(4.6), + # -55 for BAD HBHEHF channels from study on TSmax of shapes + #Verbosity = cms.untracked.int32(-55), + TSpeakHBMin = cms.double(0.5), + TSpeakHBMax = cms.double(9.5), + TSpeakHEMin = cms.double(0.5), + TSpeakHEMax = cms.double(9.5), + TSpeakHFMin = cms.double(0.5), + TSpeakHFMax = cms.double(8.5), + TSpeakHOMin = cms.double(0.5), + TSpeakHOMax = cms.double(8.5), + # -56 for BAD HBHEHOHF channels from study on ADC Amplitude + #Verbosity = cms.untracked.int32(-56), + ADCAmplHBMin = cms.double(10000.), + ADCAmplHBMax = cms.double(300000.), + ADCAmplHEMin = cms.double(20000.), + ADCAmplHEMax = cms.double(300000.), + ADCAmplHFMin = cms.double(50.), + ADCAmplHFMax = cms.double(9000.), + ADCAmplHOMin = cms.double(50.), + ADCAmplHOMax = cms.double(9000.), + # + # to see channels w/ PedestalSigma < cut + #Verbosity = cms.untracked.int32(-57), + pedestalwHBMax = cms.double(0.1), + pedestalwHEMax = cms.double(0.1), + pedestalwHFMax = cms.double(0.4), + pedestalwHOMax = cms.double(0.1), + # + # to see channels for pedestal < cut + pedestalHBMax = cms.double(0.1), + pedestalHEMax = cms.double(0.6), + pedestalHFMax = cms.double(0.8), + pedestalHOMax = cms.double(0.1), + # + # + # CALIBRATION channels: + # + # for BAD HBHEHOHF CALIBRATION channels from study on ADC amplitude + # cuts for Laser runs: + #calibrADCHBMin = cms.double(15.0), + #calibrADCHEMin = cms.double(15.0), + #calibrADCHOMin = cms.double(15.0), + #calibrADCHFMin = cms.double(15.0), + # cuts for PEDESTAL runs: + calibrADCHBMin = cms.double(1000.), + calibrADCHBMax = cms.double(100000000.), + calibrADCHEMin = cms.double(1000.), + calibrADCHEMax = cms.double(100000000.), + calibrADCHOMin = cms.double(1000.), + calibrADCHOMax = cms.double(100000000.), + calibrADCHFMin = cms.double(100.), + calibrADCHFMax = cms.double(100000000.), + + # for BAD HBHEHOHF CALIBRATION channels from study on shape Ratio + calibrRatioHBMin = cms.double(0.76), + calibrRatioHBMax = cms.double(0.94), + calibrRatioHEMin = cms.double(0.76), + calibrRatioHEMax = cms.double(0.94), + calibrRatioHOMin = cms.double(0.85), + calibrRatioHOMax = cms.double(0.99), + calibrRatioHFMin = cms.double(0.5), + calibrRatioHFMax = cms.double(0.8), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmax + calibrTSmaxHBMin = cms.double(1.50), + calibrTSmaxHBMax = cms.double(2.50), + calibrTSmaxHEMin = cms.double(1.50), + calibrTSmaxHEMax = cms.double(2.50), + calibrTSmaxHOMin = cms.double(1.50), + calibrTSmaxHOMax = cms.double(2.50), + calibrTSmaxHFMin = cms.double(3.50), + calibrTSmaxHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on TSmean + calibrTSmeanHBMin = cms.double(2.40), + calibrTSmeanHBMax = cms.double(3.70), + calibrTSmeanHEMin = cms.double(2.40), + calibrTSmeanHEMax = cms.double(3.70), + calibrTSmeanHOMin = cms.double(1.50), + calibrTSmeanHOMax = cms.double(2.70), + calibrTSmeanHFMin = cms.double(3.50), + calibrTSmeanHFMax = cms.double(4.50), + # for BAD HBHEHOHF CALIBRATION channels from study on Width + calibrWidthHBMin = cms.double(1.30), + calibrWidthHBMax = cms.double(1.90), + calibrWidthHEMin = cms.double(1.30), + calibrWidthHEMax = cms.double(1.90), + calibrWidthHOMin = cms.double(0.70), + calibrWidthHOMax = cms.double(1.65), + calibrWidthHFMin = cms.double(0.30), + calibrWidthHFMax = cms.double(1.50), + # + # Special task of run or LS quality: + # + # flag for ask runs of LSs for RMT & CMT accordingly: + #=0-runs, =1-LSs + # keep for PEDESTAL runs this flags =0 always + flagtoaskrunsorls = cms.int32(0), + # + # flag for choice of criterion of bad channels: + #=0-CapIdErr, =1-Ratio, =2-Width, =3-TSmax, =4-TSmean, =5-adcAmplitud + # keep for CMT (global runs) this flags =0 always + flagtodefinebadchannel = cms.int32(0), + #how many bins you want on the plots:better to choice (#LS+1) + howmanybinsonplots = cms.int32(25), + # + # ls - range for RBX study (and ??? perhaps for gain stability via abort gap): + lsmin = cms.int32(1), + #lsmax = cms.int32(620), + lsmax = cms.int32(2600), + # + flagabortgaprejected = cms.int32(1), + bcnrejectedlow = cms.int32(3446), + bcnrejectedhigh= cms.int32(3564), + # + # flag cpu time reducing + #=0-all plots, =1-optimized number of plots (for Global runs) + flagcpuoptimization = cms.int32(0), + # + # flag for ask type of Normalization for CMT estimators: + #=0-normalizationOn#evOfLS; =1-averageVariable-normalizationOn#entriesInLS; + flagestimatornormalization = cms.int32(1), + # + # + # cuts on Nbadchannels to see LS dependences: + # Verbosity = cms.untracked.int32(-77), + # to select abnormal events,for which Nbcs > this limits + lsdep_cut1_peak_HBdepth1 = cms.int32(20), + lsdep_cut1_peak_HBdepth2 = cms.int32(7), + lsdep_cut1_peak_HEdepth1 = cms.int32(16), + lsdep_cut1_peak_HEdepth2 = cms.int32(13), + lsdep_cut1_peak_HEdepth3 = cms.int32(4), + lsdep_cut1_peak_HFdepth1 = cms.int32(10), + lsdep_cut1_peak_HFdepth2 = cms.int32(5), + lsdep_cut1_peak_HOdepth4 = cms.int32(45), + # to select events with Nbcs > this limits + lsdep_cut3_max_HBdepth1 = cms.int32(19), + lsdep_cut3_max_HBdepth2 = cms.int32(6), + lsdep_cut3_max_HEdepth1 = cms.int32(15), + lsdep_cut3_max_HEdepth2 = cms.int32(12), + lsdep_cut3_max_HEdepth3 = cms.int32(3), + lsdep_cut3_max_HFdepth1 = cms.int32(9), + lsdep_cut3_max_HFdepth2 = cms.int32(4), + lsdep_cut3_max_HOdepth4 = cms.int32(40), + # + # + #old was for runs: + # nbadchannels1 = cms.int32(7), + # nbadchannels2 = cms.int32(12), + # nbadchannels3 = cms.int32(50), + # + #Verbosity = cms.untracked.int32(-79), + # cuts on Estimator1 to see LS dependences: + lsdep_estimator1_HBdepth1 = cms.double(2500.), + lsdep_estimator1_HBdepth2 = cms.double(2500.), + lsdep_estimator1_HBdepth3 = cms.double(2500.), + lsdep_estimator1_HBdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth1 = cms.double(2500.), + lsdep_estimator1_HEdepth2 = cms.double(2500.), + lsdep_estimator1_HEdepth3 = cms.double(2500.), + lsdep_estimator1_HEdepth4 = cms.double(2500.), + lsdep_estimator1_HEdepth5 = cms.double(2500.), + lsdep_estimator1_HEdepth6 = cms.double(2500.), + lsdep_estimator1_HEdepth7 = cms.double(2500.), + lsdep_estimator1_HFdepth1 = cms.double(2500.), + lsdep_estimator1_HFdepth2 = cms.double(2500.), + lsdep_estimator1_HFdepth3 = cms.double(2500.), + lsdep_estimator1_HFdepth4 = cms.double(2500.), + lsdep_estimator1_HOdepth4 = cms.double(2500.), + # cuts on Estimator2 to see LS dependences: + lsdep_estimator2_HBdepth1 = cms.double(7.), + lsdep_estimator2_HBdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth1 = cms.double(7.), + lsdep_estimator2_HEdepth2 = cms.double(7.), + lsdep_estimator2_HEdepth3 = cms.double(7.), + lsdep_estimator2_HFdepth1 = cms.double(7.), + lsdep_estimator2_HFdepth2 = cms.double(7.), + lsdep_estimator2_HOdepth4 = cms.double(7.), + # cuts on Estimator3 to see LS dependences: + lsdep_estimator3_HBdepth1 = cms.double(7.), + lsdep_estimator3_HBdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth1 = cms.double(7.), + lsdep_estimator3_HEdepth2 = cms.double(7.), + lsdep_estimator3_HEdepth3 = cms.double(7.), + lsdep_estimator3_HFdepth1 = cms.double(7.), + lsdep_estimator3_HFdepth2 = cms.double(7.), + lsdep_estimator3_HOdepth4 = cms.double(7.), + # cuts on Estimator4 to see LS dependences: + lsdep_estimator4_HBdepth1 = cms.double(5.), + lsdep_estimator4_HBdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth1 = cms.double(5.), + lsdep_estimator4_HEdepth2 = cms.double(5.), + lsdep_estimator4_HEdepth3 = cms.double(5.), + lsdep_estimator4_HFdepth1 = cms.double(5.), + lsdep_estimator4_HFdepth2 = cms.double(5.), + lsdep_estimator4_HOdepth4 = cms.double(5.), + # cuts on Estimator5 to see LS dependences: + lsdep_estimator5_HBdepth1 = cms.double(1.8), + lsdep_estimator5_HBdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth1 = cms.double(1.8), + lsdep_estimator5_HEdepth2 = cms.double(1.8), + lsdep_estimator5_HEdepth3 = cms.double(1.8), + lsdep_estimator5_HFdepth1 = cms.double(1.8), + lsdep_estimator5_HFdepth2 = cms.double(1.8), + lsdep_estimator5_HOdepth4 = cms.double(1.8), + # + # + #Verbosity = cms.untracked.int32(-81), + #Verbosity = cms.untracked.int32(-82), + #Verbosity = cms.untracked.int32(-83), + # + # use ADC amplitude: + useADCmassive = cms.untracked.bool(True), + useADCfC = cms.untracked.bool(False), + useADCcounts = cms.untracked.bool(False), + # + # Pedestals in fC + #usePedestalSubtraction = cms.untracked.bool(True), + usePedestalSubtraction = cms.untracked.bool(False), + # + # for possible ignoring of channels w/o signal, apply same cut for + # HBHEHFHO on Amplitude, usable for all Estimators 1,2,3,4,5: + # forallestimators_amplitude_bigger = cms.double(10.), + forallestimators_amplitude_bigger = cms.double(-100.), + # + # + # + #usecontinuousnumbering = cms.untracked.bool(False), + usecontinuousnumbering = cms.untracked.bool(True), + # + # if 0 - do not use digis at all + flagToUseDigiCollectionsORNot = cms.int32(1), + # + # + hcalCalibDigiCollectionTag = cms.InputTag('hcalDigis'), + hbheDigiCollectionTag = cms.InputTag('hcalDigis'), + hoDigiCollectionTag = cms.InputTag('hcalDigis'), + hfDigiCollectionTag = cms.InputTag('hcalDigis'), + # + # + # + # + #for upgrade: --------------------------------------------------------- + hbheQIE11DigiCollectionTag = cms.InputTag('hcalDigis'), + hbheQIE10DigiCollectionTag = cms.InputTag('hcalDigis'), + # flag to use either only old QIE8 digiCollections or only new QIE10,11 digiCollections + #=0-all digiCollections(default for normal running), =1-only old QIE8 digiCollections, + #=2-only new QIE1011 digiCollections, =3-only new QIE1011 digiCollections w/o new high depthes + #=4-2016fall, =5-2016fall w/o new high depthes, =6-2017bebin, =7-2017bebin w/o new high depthes in HEonly + #=8--2017bebin w/o new high depthes, =9-all digiCollections w/o new high depthes + # flag HBHE8 HBHE11 HF8 HF10 comments: + # 0 + + + + all + # 1 + - + - old + # 2 - + - + new + # 3 - + - + new w/o high depthes + # 4 + - + + 2016fall + # 5 + - + + 2016fall w/o high depthes + # 6 + + - + 2017 && 2018 && 2021 + # 7 + + - + 2017begin w/o high depthes in HEonly + # 8 + + - + 2017begin w/o high depthes + # 9 + + + + all w/o high depthes + # 10 + - - + 2017 w/o HEP17 + # + flagupgradeqie1011 = cms.int32(6), + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # flaguseshunt = 1 or 6 (6 is default for global runs) + flaguseshunt = cms.int32(6), + # flagsipmcorrection: != 0 yes,apply; = 0 do not use; + flagsipmcorrection = cms.int32(1), + #end upgrade: --------------------------------------------------------- end upgrade + # + # + # for local LASER runs ONLY!!! to be > 0 (,else = 0) + flagLaserRaddam = cms.int32(0), + # for gaussian fit for local shunt1 (Gsel0) led low-intensity or ped ONLY!!! to be > 0 (,else = 0) + flagfitshunt1pedorledlowintensity = cms.int32(0), + # + splashesUpperLimit = cms.int32(10000), + # + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupDigi = cms.int32(1), + # + # for use in IterativeMethod of CalibrationGroup!!! to be > 1 (,else = 0) + flagIterativeMethodCalibrationGroupReco = cms.int32(1), + # + hbheInputSignalTag = cms.InputTag('hbherecoMBNZS'), + hbheInputNoiseTag = cms.InputTag('hbherecoNoise'), + hfInputSignalTag = cms.InputTag('hfrecoMBNZS'), + hfInputNoiseTag = cms.InputTag('hfrecoNoise'), + # + # + # + # + # + # + #HistOutFile = cms.untracked.string('PEDESTAL_331370.root'), + #HistOutFile = cms.untracked.string(histodir+'/PEDESTAL_'+runnumber+'.root'), + #MAPOutFile = cms.untracked.string('LogEleMapdb.h') + # + ##OutputFilePath = cms.string('/tmp/zhokin/'), + ##OutputFileExt = cms.string(''), + # + ) + +process.hcal_db_producer = cms.ESProducer("HcalDbProducer", + dump = cms.untracked.vstring(''), + file = cms.untracked.string('') +) +process.es_hardcode = cms.ESSource("HcalHardcodeCalibrations", + toGet = cms.untracked.vstring('QIEShape', + 'QIEData', + 'ChannelQuality', + 'HcalQIEData', + 'Pedestals', + 'PedestalWidths', + 'Gains', + 'GainWidths', + 'ZSThresholds', + 'RespCorrs') +) + +## Jula's recipe for too many files +#process.options = cms.untracked.PSet( +# wantSummary = cms.untracked.bool(False), +# Rethrow = cms.untracked.vstring("ProductNotFound"), # make this exception fatal +# fileMode = cms.untracked.string('NOMERGE') # no ordering needed, but calls endRun/beginRun etc. at file boundaries +#) + +######################################################################################## Global Tags for 2018 data taking : +# use twiki site to specify HLT reconstruction Global tags: +# https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFrontierConditions +# +# 100X_dataRun2_HLT_v2 for CMSSW_10_0_3 onwards CRUZET 2018 update of 0T templates for SiPixels +# 100X_dataRun2_HLT_v1 for CMSSW_10_0_0 onwards MWGRs 2018 first HLT GT for 2018 +# +# +############################################################################ GlobalTag :1+ good as 5 +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '100X_dataRun2_HLT_v2', '') + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data_FULL', '') + + +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '101X_dataRun2_HLT_v7', '') + +# 2019 Ultra Legacy 2017 +#process.GlobalTag.globaltag = '106X_dataRun2_trackerAlignment2017_v1' +# 2019 Ultra Legacy 2018 test TkAl +#process.GlobalTag.globaltag = '106X_dataRun2_v17' +# 2019 Ultra Legacy 2018 +#process.GlobalTag.globaltag = '106X_dataRun2_newTkAl_v18' +# 2019 Ultra Legacy 2016 +#process.GlobalTag.globaltag = '106X_dataRun2_UL2016TkAl_v24' +#process.GlobalTag.globaltag = '105X_dataRun2_v8' + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +from Configuration.AlCa.autoCond import autoCond +#process.GlobalTag.globaltag = '104X_dataRun2_v1' +#process.GlobalTag.globaltag = '105X_postLS2_design_v4' +process.GlobalTag.globaltag = '106X_dataRun3_HLT_v3' + + +############################################################################ +# V.EPSHTEIN: +#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +#process.GlobalTag.globaltag = '100X_dataRun2_Prompt_Candidate_2018_01_31_16_01_36' +### +#process.hcal_db_producer = cms.ESProducer("HcalDbProducer", +# dump = cms.untracked.vstring(''), +# file = cms.untracked.string('') +#) +# +#process.hcalDigis= cms.EDProducer("HcalRawToDigi", +# FilterDataQuality = cms.bool(True), +# HcalFirstFED = cms.untracked.int32(700), +# InputLabel = cms.InputTag("source"), +# UnpackCalib = cms.untracked.bool(True), +# FEDs = cms.untracked.vint32(1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117), +#) +### +############################################################################ +process.load('Configuration.StandardSequences.RawToDigi_Data_cff') +process.hcalDigis.FilterDataQuality = cms.bool(False) +process.hcalDigis.InputLabel = cms.InputTag("source") +############################################################################ +process.hcalDigis= cms.EDProducer("HcalRawToDigi", +# FilterDataQuality = cms.bool(True), + FilterDataQuality = cms.bool(False), + HcalFirstFED = cms.untracked.int32(700), + InputLabel = cms.InputTag("source"), + #InputLabel = cms.InputTag("rawDataCollector"), +) +#process.hcalDigis.FilterDataQuality = cms.bool(False) +#process.hcalDigis.InputLabel = cms.InputTag("source") +############################################################################ +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestal_cff") +process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalPedestalLocal_cff") +##process.load("Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalMinBias_cff") +#process.load("ALCARECOHcalCalPedestalLocal_cff") +############################################################################ +#process.p = cms.Path(process.hcalDigis*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.minbiasana) + +process.p = cms.Path(process.hcalDigis*process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) +#process.p = cms.Path(process.seqALCARECOHcalCalMinBiasDigiNoHLT*process.seqALCARECOHcalCalMinBias*process.Analyzer) + +# see /afs/cern.ch/work/z/zhokin/public/CMSSW_10_4_0_patch1/src/Calibration/HcalAlCaRecoProducers/python/ALCARECOHcalCalMinBias_cff.py +############################################################################ +process.MessageLogger = cms.Service("MessageLogger", + categories = cms.untracked.vstring(''), + destinations = cms.untracked.vstring('cout'), + debugModules = cms.untracked.vstring('*'), + cout = cms.untracked.PSet( + threshold = cms.untracked.string('WARNING'), + WARNING = cms.untracked.PSet(limit = cms.untracked.int32(0)) + ) + ) +############################################################################ + + + diff --git a/DPGAnalysis/HcalTools/scripts/cmt/a.py.end b/DPGAnalysis/HcalTools/scripts/cmt/a.py.end index 9fec060f23c6f..9b41862f2af60 100644 --- a/DPGAnalysis/HcalTools/scripts/cmt/a.py.end +++ b/DPGAnalysis/HcalTools/scripts/cmt/a.py.end @@ -110,14 +110,14 @@ process.Analyzer = cms.EDAnalyzer("CMTRawAnalyzer", rmsHOMax = cms.double(4.4), # -55 for BAD HBHEHF channels from study on TSmean of shapes #Verbosity = cms.untracked.int32(-55), - TSmeanHBMin = cms.double(0.8), + TSmeanHBMin = cms.double(1.8), TSmeanHBMax = cms.double(8.0), - TSmeanHEMin = cms.double(0.8), + TSmeanHEMin = cms.double(1.8), TSmeanHEMax = cms.double(8.0), - TSmeanHFMin = cms.double(1.0), + TSmeanHFMin = cms.double(0.4), TSmeanHFMax = cms.double(2.8), - TSmeanHOMin = cms.double(0.8), - TSmeanHOMax = cms.double(8.0), + TSmeanHOMin = cms.double(1.8), + TSmeanHOMax = cms.double(7.0), # -55 for BAD HBHEHF channels from study on TSmax of shapes #Verbosity = cms.untracked.int32(-55), TSpeakHBMin = cms.double(-0.5), @@ -457,7 +457,8 @@ from Configuration.AlCa.autoCond import autoCond #process.GlobalTag.globaltag = '105X_postLS2_design_v4' #process.GlobalTag.globaltag = '106X_dataRun3_HLT_v3' #process.GlobalTag.globaltag = '113X_dataRun3_HLT_v3' -process.GlobalTag.globaltag = '120X_dataRun3_HLT_v3' +#process.GlobalTag.globaltag = '120X_dataRun3_HLT_v3' +process.GlobalTag.globaltag = '123X_dataRun3_HLT_v7' ########################################################################### process.load('Configuration.StandardSequences.RawToDigi_Data_cff') #process.hcalDigis.FilterDataQuality = cms.bool(False) diff --git a/DPGAnalysis/HcalTools/scripts/cmt/condor.jdl b/DPGAnalysis/HcalTools/scripts/cmt/condor.jdl index 68071e859df13..e60eabb16c2f6 100755 --- a/DPGAnalysis/HcalTools/scripts/cmt/condor.jdl +++ b/DPGAnalysis/HcalTools/scripts/cmt/condor.jdl @@ -8,8 +8,7 @@ arguments = runlist_run $(ClusterID) $(ProcId) $(Proxy_path) Should_Transfer_Files = YES WhenToTransferOutput = ON_EXIT -Transfer_Input_Files = run_condor.csh,mkcfg_new120.csh,file_lists.csh,a.py.beg,a.py.end,runlist_run,/afs/cern.ch/work/z/zhokin/public/salavat8/CMSSW_12_3_0_pre4/src/DPGAnalysis/HcalTools/plugins/CMTRawAnalyzer.cc,/afs/cern.ch/work/z/zhokin/public/salavat8/CMSSW_12_3_0_pre4/src/DPGAnalysis/HcalTools/plugins/BuildFile.xml - +Transfer_Input_Files = run_condor.csh,mkcfg_new120.csh,file_lists.csh,a.py.beg,a.py.end,runlist_run,/afs/cern.ch/user/z/zhokin/run3A1/CMSSW_13_0_0_pre1/src/DPGAnalysis/HcalTools/plugins/CMTRawAnalyzer.cc,/afs/cern.ch/user/z/zhokin/run3A1/CMSSW_13_0_0_pre1/src/DPGAnalysis/HcalTools/plugins/BuildFile.xml output = output/zhokin.$(ClusterId).$(ProcId).out diff --git a/DPGAnalysis/HcalTools/scripts/cmt/file_lists.csh b/DPGAnalysis/HcalTools/scripts/cmt/file_lists.csh index 035cc6f05b7f7..735f462971d12 100755 --- a/DPGAnalysis/HcalTools/scripts/cmt/file_lists.csh +++ b/DPGAnalysis/HcalTools/scripts/cmt/file_lists.csh @@ -15,27 +15,29 @@ echo ${i} #dasgoclient --query="file dataset=/Cosmics/Commissioning2018-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} #dasgoclient --query="file dataset=/MinimumBias/Commissioning2018-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} ## -## -#dasgoclient --query="file dataset=/HcalNZS/Commissioning2017-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -#dasgoclient --query="file dataset=/Cosmics/Commissioning2021-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -#dasgoclient --query="file dataset= /MinimumBias/Commissioning2021-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -dasgoclient --query="file dataset= /HcalNZS/Commissioning2021-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file dataset= /HcalNZS/Run2022A-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file dataset= /MinimumBias/Run2022A-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file dataset= /ZeroBias/Run2022A-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /ZeroBias/Run2022B-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /HcalNZS/Run2022A-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /HcalNZS/Run2022B-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /HcalNZS/Run2022C-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /HcalNZS/Run2022D-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /ZeroBias/Run2022E-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /HcalNZS/Run2022E-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /HcalNZS/Run2022F-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +dasgoclient --query="file site=T2_CH_CERN dataset= /HcalNZS/Run2022G-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} +#dasgoclient --query="file site=T2_CH_CERN dataset= /HcalNZS/Run2022H-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -#dasgoclient --query="file dataset=/ZeroBias/Run2018A-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -#dasgoclient --query="file dataset=/ZeroBias/Run2018B-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -#dasgoclient --query="file dataset=/ZeroBias/Run2018C-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -#dasgoclient --query="file dataset=/ZeroBias/Run2018D-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -# this dataset only! for ions: -#dasgoclient --query="file dataset=/HIHcalNZS/HIRun2018A-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} -# games with dedicated abort gap dataset : -#dasgoclient --query="file dataset=/TestEnablesEcalHcal/Run2018D-Express-v1/RAW run=${i}" --limit=0 | sed "s/\/store/\'\/store/g" | sed "s/root/root\',/g"> TXT_${1}/run_${i} # ## -## end echo "DONE: file_list.csh" + ## + + diff --git a/DPGAnalysis/HcalTools/scripts/cmt/index_zhokin.sh b/DPGAnalysis/HcalTools/scripts/cmt/index_zhokin.sh index 269beafcf979d..15ecdeb343089 100755 --- a/DPGAnalysis/HcalTools/scripts/cmt/index_zhokin.sh +++ b/DPGAnalysis/HcalTools/scripts/cmt/index_zhokin.sh @@ -87,7 +87,7 @@ cat index.html | head -n -1 > index_draft.html #let "k = k + 1" #done -k=47 +k=101 ########################################## type by hands number of new runs k=k-number: @@ -127,20 +127,29 @@ if [ ${got} -eq 0 ] ; then #echo "runnumber:" #dasgoclient --query="file dataset=/HcalNZS/Run2018D-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp #dasgoclient --query="file dataset=/Cosmics/Commissioning2021-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp -dasgoclient --query="file dataset=/HcalNZS/Commissioning2021-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp +#dasgoclient --query="file dataset=/HcalNZS/Commissioning2021-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp + +#dasgoclient --query="file dataset=/ZeroBias0/Run2022A-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp + +dasgoclient --query="file dataset=/ZeroBias/Run2022B-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp + + #echo "${runnumber}" fi timetmp=`cat tmp | head -n 1 | awk '{print $3}'` ############################################################################################################ printout: #type='Cosmics' -type='HcalNZS' +#type='HcalNZS' +#type='ZeroBias0' +type='ZeroBias' timetmp2=`date -d @${timetmp} +%Y-%m-%d:%H-%M-%S` sizetmp=`cat tmp | head -n 1 | awk '{print $1}'` neventstmp=`cat tmp | head -n 1 | awk '{print $2}'` #commentariy='CRUZET2021' #commentariy='CRAFT2021' -commentariy='Commissioning2021' +#commentariy='Commissioning2021' +commentariy='Run3 2022B-v1' #cat runs_info echo 'RUN Type = '$type echo ${sizetmp} ${neventstmp} ${timetmp2} diff --git a/DPGAnalysis/HcalTools/scripts/cmt/index_zhokinHcalNZS.sh b/DPGAnalysis/HcalTools/scripts/cmt/index_zhokinHcalNZS.sh new file mode 100755 index 0000000000000..3e0274a4a275c --- /dev/null +++ b/DPGAnalysis/HcalTools/scripts/cmt/index_zhokinHcalNZS.sh @@ -0,0 +1,227 @@ +#!/bin/bash + +WebDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring' +WebSite='https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring' +HistoDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/CMT/histos' + + +cmsenv 2>/dev/null +if [ $? == 0 ] ; then + eval `scramv1 runtime -sh` +fi + +#echo "0" + +# Process arguments and set the flags +fileName=$1 + +# Obtain the runList from a file, if needed +runList="" +if [ ${#fileName} -gt 0 ] ; then + if [ -s ${fileName} ] ; then + runList=`cat ${fileName}` + else + echo "<${fileName}> does not seem to be a valid file" + exit 2 + fi +else + if [ ${ignoreFile} -eq 0 ] ; then + echo " ! no file provided" + fi + echo " ! will produce only the global html page" +fi + + +# Check the runList and correct the correctables +# Replace ',' and ';' by empty spaces +runList=`echo "${runList}" | sed 'sk,k\ kg' | sed 'sk;k\ kg'` +ok=1 +for r in ${runList} ; do + if [ ! ${#r} -eq 6 ] ; then + echo "run numbers are expected to be of length 6. Check <$r>" + ok=0 + fi + debug_loc=0 + if [ "$r" -eq "$r" ] 2>/dev/null ; then + if [ ${debug_loc} -eq 1 ] ; then echo "run variable <$r> is a number (ok)"; fi + else + echo "error: run variable <$r> is not an integer number" + ok=0 + fi +done + +echo "Tested `wc -w <<< "${runList}"` runs from file ${fileName}" +if [ ${ok} -eq 0 ] ; then + echo "errors in the file ${fileName} with run numbers" + exit 3 +else + if [ ${#fileName} -gt 0 ] ; then + echo "run numbers in ${fileName} verified ok" + fi +fi + +echo +echo +echo 'Numbers of NEW runs for processing' +echo "${runList}" +echo -e "runList complete\n" + +echo -e '\n\nRun numbers:' +runListEOS=`echo $runList | tee _runlist_` +echo "${runListEOS}" +echo -e "Full runList for EOS complete\n" + + +# copy index.html from EOS: +echo 'next message is Fine: ' +rm index.html +eoscp $WebDir/CMT/index.html index.html +cp index.html OLDindex.html + +# delete last line of copied index_draft.html which close the table +cat index.html | head -n -1 > index_draft.html + +#extract run numbers for correct continuation +#k=0 +#for i in ${runListEOSall} ; do +#let "k = k + 1" +#done + +k=643 + + +########################################## type by hands number of new runs k=k-number: +#let "k = k - 1" +echo ' ================>>> k in old list = '$k + +for i in ${runListEOS} ; do + +#runnumber=$(echo $i | sed -e 's/[^0-9]*//g') +#runnumber=$(echo $i | awk -F 'run' '{print $2}'| awk -F '.' '{print $1}') +runnumber=${i} +#if [[ "$runnumber" > 243400 ]] ; then +let "k = k + 1" +echo +echo ' ================>>> new k in loop = '$k +echo +echo +echo 'RUN number = '$runnumber + +# extract the date of file +dasInfo=${DAS_DIR}/das_${runnumber}.txt +got=0 +#echo "1" +if [[ ${dasCache} == "1" ]] ; then + rm -f tmp + if [ -s ${dasInfo} ] ; then + cp ${dasInfo} tmp + got=1 + else + echo "no ${dasInfo} found. Will use dasgoclient" + fi +fi +#echo "2" + +if [ ${got} -eq 0 ] ; then +#echo "3" +#echo "runnumber:" +#dasgoclient --query="file dataset=/HcalNZS/Run2018D-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp +#dasgoclient --query="file dataset=/Cosmics/Commissioning2021-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp +#dasgoclient --query="file dataset=/HcalNZS/Commissioning2021-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp + +dasgoclient --query="file dataset=/HcalNZS/Run2022G-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp + + +#echo "${runnumber}" +fi + +timetmp=`cat tmp | head -n 1 | awk '{print $3}'` +############################################################################################################ printout: +#type='Cosmics' +type='HcalNZS' +#type='ZeroBias0' +timetmp2=`date -d @${timetmp} +%Y-%m-%d:%H-%M-%S` +sizetmp=`cat tmp | head -n 1 | awk '{print $1}'` +neventstmp=`cat tmp | head -n 1 | awk '{print $2}'` +#commentariy='CRUZET2021' +#commentariy='CRAFT2021' +#commentariy='Commissioning2021' +commentariy='Run3 2022G-v1' +#cat runs_info +echo 'RUN Type = '$type +echo ${sizetmp} ${neventstmp} ${timetmp2} +echo 'RUN Comment = '$commentariy + +#echo "4" + + +#adding entry to list of file index_draft.html +let "raw = (k % 2) + 2" +echo ''>> index_draft.html +echo ''$k''>> index_draft.html +echo ''$runnumber''>> index_draft.html +echo ''$type''>> index_draft.html +echo ''$timetmp2''>> index_draft.html +echo ''$sizetmp''>> index_draft.html +echo ''$neventstmp''>> index_draft.html +echo 'CMT_'$runnumber''>> index_draft.html +echo 'RMT_'$runnumber''>> index_draft.html +echo ''$commentariy''>> index_draft.html + + +rm tmp +#echo "5" + +############################################################################################################ record index_draft.html + +if [ ${#comment} -gt 0 ] ; then + #echo "runList=${runList}, check ${runnumber}" + temp_var=${runList/${runnumber}/} + if [ ${#temp_var} -lt ${#runList} ] ; then + echo "adding a commentary for this run" + echo "${comment}" >> index_draft.html + fi +fi +echo ''>> index_draft.html +prev=$i + +#fi +done +#echo "6" + + +# print footer to index.html +echo `cat footer.txt`>> index_draft.html + + +status=0 +if [[ ${debug} == "1" ]] ; then + echo "debug=${debug}. No upload to eos" + status=-1 +else +### echo "Commented by me: eoscp index_draft.html $WebDir/CMT/index.html No upload to eos" +# eoscp OLDindex.html $WebDir/CMT/OLDindex.html +# eoscp index_draft.html $WebDir/CMT/index.html + status="$?" +# rm index_draft.html +fi +#echo "7" + +# delete temp files + +if [[ ${debug} == "0" ]] ; then +# rm -f *.root + rm -f _runlist_ + rm -f _runlistEOSall_ +fi +#echo "8" + +# check eos-upload exit code +if [[ "${status}" == "0" ]]; then + echo "Successfully uploaded!" +else + echo "ERROR: Auto-uploading failed: do it by hands !!!" + exit 1 +fi + +echo "index script done" diff --git a/DPGAnalysis/HcalTools/scripts/cmt/index_zhokinZeroBias.sh b/DPGAnalysis/HcalTools/scripts/cmt/index_zhokinZeroBias.sh new file mode 100755 index 0000000000000..044f7606c240c --- /dev/null +++ b/DPGAnalysis/HcalTools/scripts/cmt/index_zhokinZeroBias.sh @@ -0,0 +1,227 @@ +#!/bin/bash + +WebDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring' +WebSite='https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring' +HistoDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/CMT/histos' + + +cmsenv 2>/dev/null +if [ $? == 0 ] ; then + eval `scramv1 runtime -sh` +fi + +#echo "0" + +# Process arguments and set the flags +fileName=$1 + +# Obtain the runList from a file, if needed +runList="" +if [ ${#fileName} -gt 0 ] ; then + if [ -s ${fileName} ] ; then + runList=`cat ${fileName}` + else + echo "<${fileName}> does not seem to be a valid file" + exit 2 + fi +else + if [ ${ignoreFile} -eq 0 ] ; then + echo " ! no file provided" + fi + echo " ! will produce only the global html page" +fi + + +# Check the runList and correct the correctables +# Replace ',' and ';' by empty spaces +runList=`echo "${runList}" | sed 'sk,k\ kg' | sed 'sk;k\ kg'` +ok=1 +for r in ${runList} ; do + if [ ! ${#r} -eq 6 ] ; then + echo "run numbers are expected to be of length 6. Check <$r>" + ok=0 + fi + debug_loc=0 + if [ "$r" -eq "$r" ] 2>/dev/null ; then + if [ ${debug_loc} -eq 1 ] ; then echo "run variable <$r> is a number (ok)"; fi + else + echo "error: run variable <$r> is not an integer number" + ok=0 + fi +done + +echo "Tested `wc -w <<< "${runList}"` runs from file ${fileName}" +if [ ${ok} -eq 0 ] ; then + echo "errors in the file ${fileName} with run numbers" + exit 3 +else + if [ ${#fileName} -gt 0 ] ; then + echo "run numbers in ${fileName} verified ok" + fi +fi + +echo +echo +echo 'Numbers of NEW runs for processing' +echo "${runList}" +echo -e "runList complete\n" + +echo -e '\n\nRun numbers:' +runListEOS=`echo $runList | tee _runlist_` +echo "${runListEOS}" +echo -e "Full runList for EOS complete\n" + + +# copy index.html from EOS: +echo 'next message is Fine: ' +rm index.html +eoscp $WebDir/CMT/index.html index.html +cp index.html OLDindex.html + +# delete last line of copied index_draft.html which close the table +cat index.html | head -n -1 > index_draft.html + +#extract run numbers for correct continuation +#k=0 +#for i in ${runListEOSall} ; do +#let "k = k + 1" +#done + +k=431 + + +########################################## type by hands number of new runs k=k-number: +#let "k = k - 1" +echo ' ================>>> k in old list = '$k + +for i in ${runListEOS} ; do + +#runnumber=$(echo $i | sed -e 's/[^0-9]*//g') +#runnumber=$(echo $i | awk -F 'run' '{print $2}'| awk -F '.' '{print $1}') +runnumber=${i} +#if [[ "$runnumber" > 243400 ]] ; then +let "k = k + 1" +echo +echo ' ================>>> new k in loop = '$k +echo +echo +echo 'RUN number = '$runnumber + +# extract the date of file +dasInfo=${DAS_DIR}/das_${runnumber}.txt +got=0 +#echo "1" +if [[ ${dasCache} == "1" ]] ; then + rm -f tmp + if [ -s ${dasInfo} ] ; then + cp ${dasInfo} tmp + got=1 + else + echo "no ${dasInfo} found. Will use dasgoclient" + fi +fi +#echo "2" + +if [ ${got} -eq 0 ] ; then +#echo "3" +#echo "runnumber:" +#dasgoclient --query="file dataset=/HcalNZS/Run2018D-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp +#dasgoclient --query="file dataset=/Cosmics/Commissioning2021-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp +#dasgoclient --query="file dataset=/HcalNZS/Commissioning2021-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp + +dasgoclient --query="file dataset=/ZeroBias/Run2022E-v1/RAW run=${i} | grep file.size, file.nevents, file.modification_time " > tmp + + +#echo "${runnumber}" +fi + +timetmp=`cat tmp | head -n 1 | awk '{print $3}'` +############################################################################################################ printout: +#type='Cosmics' +type='ZeroBias' +#type='ZeroBias0' +timetmp2=`date -d @${timetmp} +%Y-%m-%d:%H-%M-%S` +sizetmp=`cat tmp | head -n 1 | awk '{print $1}'` +neventstmp=`cat tmp | head -n 1 | awk '{print $2}'` +#commentariy='CRUZET2021' +#commentariy='CRAFT2021' +#commentariy='Commissioning2021' +commentariy='Run3 2022E-v1' +#cat runs_info +echo 'RUN Type = '$type +echo ${sizetmp} ${neventstmp} ${timetmp2} +echo 'RUN Comment = '$commentariy + +#echo "4" + + +#adding entry to list of file index_draft.html +let "raw = (k % 2) + 2" +echo ''>> index_draft.html +echo ''$k''>> index_draft.html +echo ''$runnumber''>> index_draft.html +echo ''$type''>> index_draft.html +echo ''$timetmp2''>> index_draft.html +echo ''$sizetmp''>> index_draft.html +echo ''$neventstmp''>> index_draft.html +echo 'CMT_'$runnumber''>> index_draft.html +echo 'RMT_'$runnumber''>> index_draft.html +echo ''$commentariy''>> index_draft.html + + +rm tmp +#echo "5" + +############################################################################################################ record index_draft.html + +if [ ${#comment} -gt 0 ] ; then + #echo "runList=${runList}, check ${runnumber}" + temp_var=${runList/${runnumber}/} + if [ ${#temp_var} -lt ${#runList} ] ; then + echo "adding a commentary for this run" + echo "${comment}" >> index_draft.html + fi +fi +echo ''>> index_draft.html +prev=$i + +#fi +done +#echo "6" + + +# print footer to index.html +echo `cat footer.txt`>> index_draft.html + + +status=0 +if [[ ${debug} == "1" ]] ; then + echo "debug=${debug}. No upload to eos" + status=-1 +else +### echo "Commented by me: eoscp index_draft.html $WebDir/CMT/index.html No upload to eos" +# eoscp OLDindex.html $WebDir/CMT/OLDindex.html +# eoscp index_draft.html $WebDir/CMT/index.html + status="$?" +# rm index_draft.html +fi +#echo "7" + +# delete temp files + +if [[ ${debug} == "0" ]] ; then +# rm -f *.root + rm -f _runlist_ + rm -f _runlistEOSall_ +fi +#echo "8" + +# check eos-upload exit code +if [[ "${status}" == "0" ]]; then + echo "Successfully uploaded!" +else + echo "ERROR: Auto-uploading failed: do it by hands !!!" + exit 1 +fi + +echo "index script done" diff --git a/DPGAnalysis/HcalTools/scripts/cmt/mkcfg_new120.csh b/DPGAnalysis/HcalTools/scripts/cmt/mkcfg_new120.csh index 758fc948a9e11..bae1bef02334c 100755 --- a/DPGAnalysis/HcalTools/scripts/cmt/mkcfg_new120.csh +++ b/DPGAnalysis/HcalTools/scripts/cmt/mkcfg_new120.csh @@ -21,6 +21,8 @@ echo "nn= ${nn} , i= ${i}, kk= ${kk}" #if( ${nn} < "120" ) then #if( ${nn} < "50" ) then #if( ${nn} < "30" ) then +#if( ${nn} < "3" ) then + if( ${nn} < "3" ) then echo "${i}" >> PYTHON_${1}/Reco_${jj}_${kk}_cfg.py diff --git a/DPGAnalysis/HcalTools/scripts/cmt/run_condor.csh b/DPGAnalysis/HcalTools/scripts/cmt/run_condor.csh index ee614f99c5c5e..fc76efee2c676 100755 --- a/DPGAnalysis/HcalTools/scripts/cmt/run_condor.csh +++ b/DPGAnalysis/HcalTools/scripts/cmt/run_condor.csh @@ -10,9 +10,13 @@ echo "myStart: set dir pwd" set m=`pwd` cd ${m} -setenv SCRAM_ARCH slc7_amd64_gcc10 -cmsrel CMSSW_12_3_0_pre4 -cd CMSSW_12_3_0_pre4/src +#setenv SCRAM_ARCH slc7_amd64_gcc10 +#cmsrel CMSSW_12_3_4 +#cd CMSSW_12_3_4/src +#setenv SCRAM_ARCH ec8_amd64_gcc10 +setenv SCRAM_ARCH ec8_amd64_gcc11 +cmsrel CMSSW_13_0_0_pre1 +cd CMSSW_13_0_0_pre1/src mkdir DPGAnalysis cd DPGAnalysis @@ -63,7 +67,9 @@ cmsRun PYTHON_${1}/Reco_${j}_${k}_cfg.py ### Copy output files to EOS ### xrdcp -f Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/test/Global_${j}_${k}.root -eoscp Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/RootFilesToBeMarched/2022/Global_${j}_${k}.root +#eoscp Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/RootFilesToBeMarched/2022/Global_${j}_${k}.root +#eoscp Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/RootFilesToBeMarched/2022/run3a1/Global_${j}_${k}.root +eoscp Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/RootFilesToBeMarched/2023/Global_${j}_${k}.root #eoscp Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/test/Global_${j}_${k}.root ################################################################ diff --git a/DPGAnalysis/HcalTools/scripts/rmt/HcalRemoteMonitoringNewNewCombine.csh b/DPGAnalysis/HcalTools/scripts/rmt/HcalRemoteMonitoringNewNewCombine.csh new file mode 100755 index 0000000000000..c79bd37238230 --- /dev/null +++ b/DPGAnalysis/HcalTools/scripts/rmt/HcalRemoteMonitoringNewNewCombine.csh @@ -0,0 +1,187 @@ +#!/bin/csh + +#unsetenv HOME +#echo "HOME" ${HOME} + +set runnumber=${1} +set mydate=${2} +set refnumber=${3} +set runNevents=${4} +set CALIB=${5} +set CALIB1=${5} +if($5 == "MIXED_PEDESTAL" && ${5} == "MIXED_LED" && ${5} == "MIXED_LASER") then +set CALIB1=`echo ${5} | awk -F _ '{print $1}'` +endif +set ERA=${6} +set RELEASE=${7} +set SCRAM_ARCH=${8} +set SCRIPT=${9} +set rundate=${10} +set runtime=${11} + +set fullSrc0='/eos/cms/store/group/dpg_hcal/comm_hcal/USC' +set fullSrc='NO' +set HistoDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT/histos' +set WD="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript" + +set WebDir='http://cms-hcal-dpg.web.cern.ch/cms-hcal-dpg/HcalRemoteMonitoring/RMT' +set WDS="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis/HcalTools/scripts/rmt" +set WDM="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis/HcalTools/macros/rmt" +set PlotsDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT' + +echo ${runnumber} >> ${WD}/LOG/batchlog +grep -q ${runnumber} ${WD}/${CALIB}_LIST/fullSrc0_list_${mydate} +if( ${status} == "0" ) then +set namef0=`grep ${runnumber} ${WD}/${CALIB}_LIST/fullSrc0_list_${mydate}` +set namef=`echo ${namef0} | awk '{print $1}'` +echo ${namef} +if( ${namef} == "run${runnumber}" ) then +set fullSrc=${fullSrc0}/run${runnumber} +else +set fullSrc=${fullSrc0} +endif + +echo "here" +endif + +echo ${fullSrc} >> ${WD}/LOG/batchlog + +if( ${fullSrc} == "NO" ) then +echo "No Batch submission" ${runnumber} >> ${WD}/LOG/batchlog +exit +endif + +echo "Batch submission" ${fullSrc} " " ${runnumber} >> ${WD}/LOG/batchlog + +###exit + +### We are at working node +mkdir ${runnumber} +setenv WORK `pwd`/${runnumber} +source /cvmfs/cms.cern.ch/cmsset_default.csh +setenv SCRAM_ARCH slc7_amd64_gcc10 +cd ${WORK} +cmsrel ${RELEASE} +cd ${RELEASE}/src +cmsenv + +pwd + +ls -l +echo /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis + +cp -r /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis `pwd`/ +cp -r /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/Calibration `pwd`/ +scramv1 build + +cd ${WORK} +set HistoDirTMP="./" +pwd > ${WD}/LOG/log_${CALIB}_${runnumber} +echo ${CALIB} >> ${WD}/LOG/log_${CALIB}_${runnumber} +echo ${CALIB1} >> ${WD}/LOG/log_${CALIB}_${runnumber} + +cp ${SCRIPT}/remoteMonitoring_${CALIB}_${ERA}_cfg.py ${WORK} +cp ${WD}/${CALIB}_LIST/runlist.tmp.${2} ${WORK}/runlist.tmp +ls >> ${WD}/LOG/log_${CALIB}_${runnumber} + +echo "WORKDIR " ${WD} ${WORK} >> ${WD}/LOG/log_${CALIB}_${runnumber} + +echo " Start CMS run " >> ${WD}/LOG/log_${CALIB}_${runnumber} +echo ${LD_LIBRARY_PATH} >> ${WD}/LOG/log_${CALIB}_${runnumber} +echo ${HistoDir} >> ${WD}/LOG/log_${CALIB}_${runnumber} +echo ${CMSSW_BASE} >> ${WD}/LOG/log_${CALIB}_${runnumber} +pwd >> ${WD}/LOG/log_${CALIB}_${runnumber} +ls ${WORK} >> ${WD}/LOG/log_${CALIB}_${runnumber} + +mkdir run${runnumber} + +xrdcp ${fullSrc}/USC_${runnumber}.root run${runnumber}/USC_${runnumber}.root + +echo "File was copied to workdir" >> & ${WD}/LOG/log_${CALIB}_${runnumber} + +set runpath="file:." + +cmsRun remoteMonitoring_${CALIB}_${ERA}_cfg.py ${runnumber} ${runpath} ${HistoDirTMP} >> & ${WD}/LOG/log_${CALIB}_${runnumber} + +ls >> ${WD}/LOG/log_${CALIB}_${runnumber} + +xrdcp -f ${HistoDirTMP}${CALIB}_${runnumber}.root ${HistoDir}/${CALIB}_${runnumber}.root + +echo "Output was copied to ${HistoDir}" >> & ${WD}/LOG/log_${CALIB}_${runnumber} + +###eos ls ${HistoDir}/${CALIB}_${runnumber}.root >> & ${WD}/LOG/log_${runnumber} + +echo " After CMS run ">>${WD}/LOG/log_${CALIB}_${runnumber} + +#### Start root session + +ls >> & ${WD}/LOG/logn_${CALIB}_${runnumber} + +cp ${WDM}/RemoteMonitoringMAP.cc . +cp ${WDM}/compile.csh . +cp ${WDS}/LogEleMapdb.h . +cp ${WDS}/tmp.list.${CALIB} runlist.tmp + +./compile.csh RemoteMonitoringMAP.cc + +echo " Start CMS run ">${WD}/LOG/logn_${CALIB}_${runnumber} +echo ${LD_LIBRARY_PATH} >>${WD}/LOG/logn_${CALIB}_${runnumber} + +./RemoteMonitoringMAP.cc.exe "${HistoDir}/${CALIB}_${runnumber}.root" "${HistoDir}/${CALIB}_${refnumber}.root" "${CALIB1}" >> ${WD}/LOG/logn_${CALIB}_${runnumber} + +ls -l >> ${WD}/LOG/logn_${CALIB}_${runnumber} + +#set j=`cat runlist.tmp | grep ${runnumber}` +#echo ${j} >> ${WD}/LOG/batchlog +setenv runtype ${CALIB1} +setenv runHTML NO +#setenv runtime `echo $j | awk -F _ '{print $3}'` +#setenv rundate `echo $j | awk -F _ '{print $2}'` + +echo 'RUN Date = '${rundate} ${runtime} >> ${WD}/LOG/batchlog +echo 'RUN Type = '${runtype} >> ${WD}/LOG/batchlog +echo 'Reference RUN number ='${refnumber} >> ${WD}/LOG/batchlog + +touch index_draft.html + +#adding entry to list of file index_draft.html +set raw=3 +echo ''>> index_draft.html +echo ''ktemp''>> index_draft.html +echo ''$runnumber''>> index_draft.html +echo ''$runtype''>> index_draft.html +echo ''$runNevents''>> index_draft.html +echo ''$rundate''>> index_draft.html +echo ''$runtime''>> index_draft.html +echo ''$refnumber''>> index_draft.html +echo ''${CALIB}'_'$runnumber''>> index_draft.html +echo 'NO'>> index_draft.html +echo 'OK'>> index_draft.html +echo ''>> index_draft.html + +#### PUT Corresponding calib type to html + +ls *.html >> ${WD}/LOG/logn_${CALIB}_${runnumber} + +foreach i (`ls *.html`) +cat ${i} | sed s/LED/${CALIB1}/g > ${i}_t +mv ${i}_t ${i} +end + +####### Copy to the new site +ls *.png +eos rm -rf ${PlotsDir}/${CALIB1}_${runnumber} +eos mkdir ${PlotsDir}/${CALIB1}_${runnumber} >> & ${WD}/LOG/logn_${CALIB}_${runnumber} + +if(${status} == "0") then +#### Copy to the new site +foreach i (`ls *.html`) +xrdcp ${i} ${PlotsDir}/${CALIB1}_${runnumber} +end +foreach k (`ls *.png`) +xrdcp ${k} ${PlotsDir}/${CALIB1}_${runnumber} +end +endif + + + diff --git a/DPGAnalysis/HcalTools/scripts/rmt/batch_condor_combine.csh b/DPGAnalysis/HcalTools/scripts/rmt/batch_condor_combine.csh new file mode 100755 index 0000000000000..109a279a10da9 --- /dev/null +++ b/DPGAnalysis/HcalTools/scripts/rmt/batch_condor_combine.csh @@ -0,0 +1,72 @@ +#!/bin/csh + +###set DAT="TEST" +###set DAT="2015-10-07_14_50_47" + +cmsenv + +set DAT=`date '+%Y-%m-%d_%H_%M_%S'` +set ERA=${2} +set RELEASE=${CMSSW_VERSION} + +### Get list of done from RDM webpage ### +set TYPE=${1} +echo ${TYPE} +if( ${TYPE} != "LED" && ${TYPE} != "LASER" && ${TYPE} != "PEDESTAL" && ${TYPE} != "MIXED_PEDESTAL" && ${TYPE} != "MIXED_LED" && ${TYPE} != "MIXED_LASER") then +echo "Please check type " ${TYPE} "should be LED or LASER or PEDESTAL or MIXED_PEDESTAL or MIXED_LED or MIXED_LASER" +exit +endif + +set WD="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript" +set SCRIPT=`pwd` +set PYTHON=${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python +echo ${WD} + +${CMSSW_BASE}/src/DPGAnalysis/HcalTools/scripts/rmt/parce_newsql_aleko.csh ${TYPE} ${DAT} ${ERA} + +ls ${WD}/${TYPE}_LIST/runlist.tmp.${DAT} +rm ${WD}/${TYPE}_LIST/RUNS_TMP +cat ${WD}/${TYPE}_LIST/runlist.tmp.${DAT} > ${WD}/${TYPE}_LIST/RUNS_TMP + +set jold=194165 +foreach i (`cat ${WD}/${TYPE}_LIST/RUNS_TMP`) +echo "Run" ${i} + +set iold=`echo ${i} | awk -F _ '{print $1}'` +set jold=`echo ${i} | awk -F _ '{print $2}'` +set rundat = `echo ${i} | awk -F _ '{print $3}'` +set runtime = `echo ${i} | awk -F _ '{print $4}'` +set year=`echo ${i} | awk -F _ '{print $3}' | awk -F - '{print $1}'` +set nevent=`echo ${i} | awk -F _ '{print $5}'` +echo ${iold} ${jold} ${year} ${nevent} +if( ${nevent} != "None" ) then +if( ${nevent} >= "500" && ${nevent} <= "11000") then +echo "Start job " + +touch ${WD}/BATCHLOG/batchlog_${TYPE}_${iold}.log ${WD}/BATCHLOG/ebatchlog_${TYPE}_${iold}.log +set MYOUTJOB=${WD}/BATCHLOG/batchlog_${TYPE}_${iold}.log +echo ${MYOUTJOB} +set MYERRJOB=${WD}/BATCHLOG/ebatchlog_${TYPE}_${iold}.log +echo ${MYERRJOB} +set MYCONDOR=${WD}/BATCHLOG/condor.log +echo ${MYCONDOR} + +rm ${WD}/BSUB/job_${TYPE}_${iold}_${jold}.sub + +cat >> ${WD}/BSUB/job_${TYPE}_${iold}_${jold}.sub << EOF +executable = ${SCRIPT}/HcalRemoteMonitoringNewNewCombine.csh +arguments = ${iold} ${DAT} ${iold} ${nevent} ${TYPE} ${ERA} ${RELEASE} ${SCRAM_ARCH} ${PYTHON} ${rundat} ${runtime} +output = ${MYOUTJOB} +error = ${MYERRJOB} +log = ${MYCONDOR} ++JobFlavour = "workday" +queue 1 +EOF + +echo "Make a job" +condor_submit ${WD}/BSUB/job_${TYPE}_${iold}_${jold}.sub +echo "End job " +sleep 1 +endif +endif +end diff --git a/DPGAnalysis/HcalTools/scripts/rmt/mysort.py b/DPGAnalysis/HcalTools/scripts/rmt/mysort.py new file mode 100644 index 0000000000000..b861c36b4e00f --- /dev/null +++ b/DPGAnalysis/HcalTools/scripts/rmt/mysort.py @@ -0,0 +1,16 @@ +#!/usr/bin/python3 +import argparse +import pprint +import json +import os +parser = argparse.ArgumentParser() +parser.add_argument('version',action="store",help="Software version") +results = parser.parse_args() +FileName = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/'+results.version+'/src/DPGAnalysis/HcalTools/scripts/rmt/mycurrentlist' +FileNameSorted = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/'+results.version+'/src/DPGAnalysis/HcalTools/scripts/rmt/currentlist' +with open(FileName,'r') as first_file: + rows = first_file.readlines() + sorted_rows = sorted(rows, key=lambda x: int(x.split('PEDESTAL_')[1]), reverse=True) + with open(FileNameSorted,'w') as second_file: + for row in sorted_rows: + second_file.write(row) diff --git a/DPGAnalysis/HcalTools/scripts/rmt/mysortled.py b/DPGAnalysis/HcalTools/scripts/rmt/mysortled.py new file mode 100644 index 0000000000000..793115a1cebd8 --- /dev/null +++ b/DPGAnalysis/HcalTools/scripts/rmt/mysortled.py @@ -0,0 +1,16 @@ +#!/usr/bin/python3 +import argparse +import pprint +import json +import os +parser = argparse.ArgumentParser() +parser.add_argument('version',action="store",help="Software version") +results = parser.parse_args() +FileName = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/'+results.version+'/src/DPGAnalysis/HcalTools/scripts/rmt/mycurrentlist' +FileNameSorted = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/'+results.version+'/src/DPGAnalysis/HcalTools/scripts/rmt/currentlist' +with open(FileName,'r') as first_file: + rows = first_file.readlines() + sorted_rows = sorted(rows, key=lambda x: int(x.split('LED_')[1]), reverse=True) + with open(FileNameSorted,'w') as second_file: + for row in sorted_rows: + second_file.write(row) diff --git a/DPGAnalysis/HcalTools/scripts/rmt/parce_newsql_aleko.csh b/DPGAnalysis/HcalTools/scripts/rmt/parce_newsql_aleko.csh index ec977c647e6dc..a94c3f744da6a 100755 --- a/DPGAnalysis/HcalTools/scripts/rmt/parce_newsql_aleko.csh +++ b/DPGAnalysis/HcalTools/scripts/rmt/parce_newsql_aleko.csh @@ -2,7 +2,7 @@ ### Make list of files: LED, pedestal, laser #set DAT=`date '+%Y-%m-%d_%H_%M_%S'` -if( ${1} != "LED" && ${1} != "LASER" && ${1} != "PEDESTAL" ) then +if( ${1} != "LED" && ${1} != "LASER" && ${1} != "PEDESTAL" && ${1} != "MIXED_PEDESTAL" && ${1} != "MIXED_LED" && ${1} != "MIXED_LASER" ) then echo " Please select run type ./parce_newsql_aleko.csh LED `date '+%Y-%m-%d_%H_%M_%S'` era2019" exit endif @@ -28,54 +28,45 @@ set runref=0 set outfile="" echo "Here" ${1} + setenv HCALDQM_DBCONNECT cms_hcl_runinfo/Donald_2_Duck@cms_omds_adg -if( ${1} == "LED" ) then -set LAST=`cat ${WD}/LED_LIST/LASTRUN` -set OUTLAST=${WD}/LED_LIST/LASTRUN -echo ${LAST} +set LAST=`cat ${WD}/${1}_LIST/LASTRUN` + +set OUTLAST=${WD}/${1}_LIST/LASTRUN + +set outfile=${WD}/${1}_LIST/runlist.tmp.${2} +echo ${LAST} ${OUTLAST} ${outfile} + +if($1 == "MIXED_PEDESTAL" || ${1} == "MIXED_LED" || ${1} == "MIXED_LASER") then +python ${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python/getInfo.py --runmin=${LAST} | grep led-ped-Gsel-bv-sequence | awk '{print $1"_"$3"_"$4"_"$7"_"$11}' > tmp.list.${1} +set runref=${runorigled} +endif +if( ${1} == "LED") then python ${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python/getInfo.py --runmin=${LAST} | grep LED | awk '{print $1"_"$3"_"$4"_"$7"_"$11}' > tmp.list.${1} set runref=${runorigled} -touch ${WD}/LED_LIST/runlist.tmp.${2} -set outfile=${WD}/LED_LIST/runlist.tmp.${2} endif - if( ${1} == "LASER" ) then -echo "Laser" -set runref=${runoriglas} -set LAST=`cat ${WD}/LASER_LIST/LASTRUN` -set OUTLAST=${WD}/LASER_LIST/LASTRUN python ${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python/getInfo.py --runmin=${LAST} | grep Laser | awk '{print $1"_"$3"_"$4"_"$7"_"$11}' > tmp.list.${1} -touch ${WD}/LASER_LIST/runlist.tmp.${2} -set outfile=${WD}/LASER_LIST/runlist.tmp.${2} +set runref=${runoriglas} endif - if( ${1} == "PEDESTAL" ) then set runref=${runorigped} -set LAST=`cat ${WD}/PEDESTAL_LIST/LASTRUN` -set OUTLAST=${WD}/PEDESTAL_LIST/LASTRUN python ${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python/getInfo.py --runmin=${LAST} | grep Pedestal | awk '{print $1"_"$3"_"$4"_"$7"_"$11}' > tmp.list.${1} -touch ${WD}/PEDESTAL_LIST/runlist.tmp.${2} -set outfile=${WD}/PEDESTAL_LIST/runlist.tmp.${2} endif -echo "Here 1" +touch ${outfile} + foreach i (`cat tmp.list.${1}`) +echo ${i} set run=`echo ${i} | awk -F_ '{print $1}'` set mydate=`echo ${i} | awk -F_ '{print $2}'` set mytime=`echo ${i} | awk -F_ '{print $3}'` set nevent=`echo ${i} | awk -F_ '{print $4}'` +echo ${outfile} echo ${run}"_"${run}"_"${mydate}"_"${mytime}"_"${nevent} >> ${outfile} -rm ${OUTLAST} +echo ${OUTLAST} echo ${run} > ${OUTLAST} end -if( ${1} == "LED" ) then -eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/LED_LIST/fullSrc0_list_${2} -endif -if( ${1} == "LASER" ) then -eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/LASER_LIST/fullSrc0_list_${2} -endif -if( ${1} == "PEDESTAL" ) then -eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/PEDESTAL_LIST/fullSrc0_list_${2} -endif +eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/${1}_LIST/fullSrc0_list_${2} diff --git a/DPGAnalysis/HcalTools/scripts/rmt/update_rdmpage_new.csh b/DPGAnalysis/HcalTools/scripts/rmt/update_rdmpage_new.csh index fb6ea65ef748f..b0dc6727a13da 100755 --- a/DPGAnalysis/HcalTools/scripts/rmt/update_rdmpage_new.csh +++ b/DPGAnalysis/HcalTools/scripts/rmt/update_rdmpage_new.csh @@ -13,19 +13,23 @@ set NHEAD=`grep -n 'LED Runs' index.html.orig.${DAT} | awk -F : '{print $1}'` @ NHEAD = ${NHEAD} + "13" head -n ${NHEAD} ${WD}/index.html.orig.${DAT} >> ${WD}/index_test.html -ls ${WebDir} | grep LED_ | sort -r > ${WD}/currentlist +ls ${WebDir} | grep LED_ | sort -r > ${WD}/mycurrentlist +python mysortled.py ${CMSSW_VERSION} + cp ${WD}/currentlist ${WD}/currentlist.LED set j=0 foreach i (`cat ${WD}/currentlist`) ls ${WebDir}/${i}/*.png > /dev/null if(${status} == "0") then @ j = ${j} + "1" -tail -12 ${WebDir}/${i}/index_draft.html > tmp.txt +tail -12 ${WebDir}/${i}/index_draft.html > tmp0.txt +cat tmp0.txt | sed s/MIXED_MIXED/MIXED/g > tmp.txt cat tmp.txt | sed s/ktemp/${j}/ >> ${WD}/index_test.html -rm tmp.txt +rm tmp.txt tmp0.txt endif end rm ${WD}/currentlist +rm ${WD}/mycurrentlist ls ${WebDir} | grep LASER_ | sort -r > ${WD}/currentlist set j=0 @@ -40,7 +44,9 @@ endif end rm ${WD}/currentlist -ls ${WebDir} | grep PEDESTAL_ | sort -r > ${WD}/currentlist +ls ${WebDir} | grep PEDESTAL_ | sort -r > ${WD}/mycurrentlist +#### need to set the order according run number +python mysort.py ${CMSSW_VERSION} set j=0 foreach i (`cat ${WD}/currentlist`) ls ${WebDir}/${i}/*.png > /dev/null @@ -52,10 +58,12 @@ rm tmp.txt endif end rm ${WD}/currentlist +rm ${WD}/mycurrentlist cat ${WD}/footer.txt >> ${WD}/index_test.html -#mv ${WD}/index_test.html ${WebDir}/index.html +cp ${WD}/index_test.html ${WebDir}/index.html +mv ${WD}/index_test.html ${WD}/index_test.html.${DAT} #rm ${WD}/currentlist #cat ${WebDir}/index.html | sed 's#cms-cpt-software.web.cern.ch\/cms-cpt-software\/General\/Validation\/SVSuite#cms-conddb-prod.cern.ch\/eosweb\/hcal#g'> tmp.html #xrdcp -f tmp.html /eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT/index.html