diff --git a/Alignment/CommonAlignment/scripts/tkal_create_file_lists.py b/Alignment/CommonAlignment/scripts/tkal_create_file_lists.py
index ee6fce83426b7..ab70a4cd90d56 100755
--- a/Alignment/CommonAlignment/scripts/tkal_create_file_lists.py
+++ b/Alignment/CommonAlignment/scripts/tkal_create_file_lists.py
@@ -916,6 +916,7 @@ def das_client(query, check_key = None):
"""
error = True
+ das_data = {'status': 'error'}
for i in range(5): # maximum of 5 tries
try:
das_data = cmssw_das_client.get_data(query, limit = 0)
@@ -924,6 +925,7 @@ def das_client(query, check_key = None):
continue
except ValueError as e:
if str(e) == "No JSON object could be decoded":
+ das_data['reason'] = str(e)
continue
if das_data["status"] == "ok":
@@ -945,7 +947,7 @@ def das_client(query, check_key = None):
if das_data["status"] == "error":
print_msg("DAS query '{}' failed 5 times. "
"The last time for the the following reason:".format(query))
- print(das_data["reason"])
+ print(das_data.get("reason", "ERROR:UNKNOWN"))
sys.exit(1)
return das_data["data"]
diff --git a/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlJetHT_Output_cff.py b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlJetHT_Output_cff.py
new file mode 100644
index 0000000000000..cfc70596d00e0
--- /dev/null
+++ b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlJetHT_Output_cff.py
@@ -0,0 +1,19 @@
+import FWCore.ParameterSet.Config as cms
+
+# AlCaReco for track based alignment using JetHT events
+OutALCARECOTkAlJetHT_noDrop = cms.PSet(
+ SelectEvents = cms.untracked.PSet(
+ SelectEvents = cms.vstring('pathALCARECOTkAlJetHT')
+ ),
+ outputCommands = cms.untracked.vstring(
+ 'keep *_ALCARECOTkAlJetHT_*_*',
+ 'keep L1AcceptBunchCrossings_*_*_*',
+ 'keep L1GlobalTriggerReadoutRecord_gtDigis_*_*',
+ 'keep *_TriggerResults_*_*',
+ 'keep DcsStatuss_scalersRawToDigi_*_*',
+ 'keep *_offlinePrimaryVertices_*_*',
+ 'keep *_offlineBeamSpot_*_*')
+)
+
+OutALCARECOTkAlJetHT = OutALCARECOTkAlJetHT_noDrop.clone()
+OutALCARECOTkAlJetHT.outputCommands.insert(0, "drop *")
diff --git a/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlJetHT_cff.py b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlJetHT_cff.py
new file mode 100644
index 0000000000000..68013067fc541
--- /dev/null
+++ b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlJetHT_cff.py
@@ -0,0 +1,46 @@
+# AlCaReco for track based alignment using min. bias events
+import FWCore.ParameterSet.Config as cms
+
+import HLTrigger.HLTfilters.hltHighLevel_cfi
+ALCARECOTkAlJetHTHLT = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
+ andOr = True, ## choose logical OR between Triggerbits
+ eventSetupPathsKey = 'TkAlJetHTHLT',
+ throw = False # tolerate triggers stated above, but not available
+ )
+
+# DCS partitions
+# "EBp","EBm","EEp","EEm","HBHEa","HBHEb","HBHEc","HF","HO","RPC"
+# "DT0","DTp","DTm","CSCp","CSCm","CASTOR","TIBTID","TOB","TECp","TECm"
+# "BPIX","FPIX","ESp","ESm"
+import DPGAnalysis.Skims.skim_detstatus_cfi
+ALCARECOTkAlJetHTDCSFilter = DPGAnalysis.Skims.skim_detstatus_cfi.dcsstatus.clone(
+ DetectorType = cms.vstring('TIBTID','TOB','TECp','TECm','BPIX','FPIX'),
+ ApplyFilter = cms.bool(True),
+ AndOr = cms.bool(True),
+ DebugOn = cms.untracked.bool(False)
+)
+
+import FWCore.Modules.preScaler_cfi
+ALCARECOTkAlJetHTPrescaler = FWCore.Modules.preScaler_cfi.preScaler.clone(
+ prescaleFactor = cms.int32(10), # selects one event out of 10
+ prescaleOffset = cms.int32(1)
+)
+
+import Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi
+ALCARECOTkAlJetHT = Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
+ filter = True, ##do not store empty events
+ applyBasicCuts = True,
+ ptMin = 0.65, ##GeV
+ pMin = 1.5, ##GeV
+ etaMin = -3.5,
+ etaMax = 3.5,
+ nHitMin = 7 ## at least 7 hits required
+)
+
+ALCARECOTkAlJetHT.GlobalSelector.applyIsolationtest = False
+ALCARECOTkAlJetHT.GlobalSelector.applyGlobalMuonFilter = False
+ALCARECOTkAlJetHT.TwoBodyDecaySelector.applyMassrangeFilter = False
+ALCARECOTkAlJetHT.TwoBodyDecaySelector.applyChargeFilter = False
+ALCARECOTkAlJetHT.TwoBodyDecaySelector.applyAcoplanarityFilter = False
+
+seqALCARECOTkAlJetHT = cms.Sequence(ALCARECOTkAlJetHTHLT+ALCARECOTkAlJetHTDCSFilter+ALCARECOTkAlJetHTPrescaler*ALCARECOTkAlJetHT)
diff --git a/Alignment/MillePedeAlignmentAlgorithm/test/BuildFile.xml b/Alignment/MillePedeAlignmentAlgorithm/test/BuildFile.xml
index cc366536a8613..733f2b611c2b3 100644
--- a/Alignment/MillePedeAlignmentAlgorithm/test/BuildFile.xml
+++ b/Alignment/MillePedeAlignmentAlgorithm/test/BuildFile.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/Alignment/MuonAlignment/test/muonGeometryDBConverter_cfg.py b/Alignment/MuonAlignment/test/muonGeometryDBConverter_cfg.py
index b5add71845553..b70f9569d469a 100644
--- a/Alignment/MuonAlignment/test/muonGeometryDBConverter_cfg.py
+++ b/Alignment/MuonAlignment/test/muonGeometryDBConverter_cfg.py
@@ -37,7 +37,7 @@
################################################################################
# parameters to configure:
from Configuration.AlCa.GlobalTag import GlobalTag
-process.GlobalTag = GlobalTag(process.GlobalTag, "auto:phase1_2021_design")
+process.GlobalTag = GlobalTag(process.GlobalTag, "auto:phase1_2022_design")
process.muonGeometryDBConverter.input = options.input
process.muonGeometryDBConverter.output = options.output
diff --git a/Alignment/SurveyAnalysis/test/run-converter_cfg.py b/Alignment/SurveyAnalysis/test/run-converter_cfg.py
index 44d0d4ed7db24..329f3b2dda5ff 100644
--- a/Alignment/SurveyAnalysis/test/run-converter_cfg.py
+++ b/Alignment/SurveyAnalysis/test/run-converter_cfg.py
@@ -3,7 +3,7 @@
process = cms.Process("DATACONVERTER")
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
-process.GlobalTag.globaltag = 'auto:phase1_2021_realistic'
+process.GlobalTag.globaltag = 'auto:phase1_2022_realistic'
process.load("Configuration.Geometry.GeometryDB_cff")
process.load("Alignment.SurveyAnalysis.SurveyInfoScenario_cff")
diff --git a/CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMapEcal.h b/CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMapEcal.h
index 0ffd75d042e99..18d4602832e18 100644
--- a/CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMapEcal.h
+++ b/CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMapEcal.h
@@ -1,5 +1,5 @@
-#ifndef _CALO_MISCALIB_MAP_ECAL
-#define _CALO_MISCALIB_MAP_ECAL
+#ifndef CalibCalorimetry_CaloMiscalibTools_CaloMiscalibMapEcal_h
+#define CalibCalorimetry_CaloMiscalibTools_CaloMiscalibMapEcal_h
#include "CondFormats/EcalObjects/interface/EcalIntercalibConstants.h"
#include "CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMap.h"
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
@@ -21,23 +21,17 @@ class CaloMiscalibMapEcal : public CaloMiscalibMap {
if (iEta == 0)
continue;
for (int iPhi = EBDetId::MIN_IPHI; iPhi <= EBDetId::MAX_IPHI; ++iPhi) {
- try {
- EBDetId ebdetid(iEta, iPhi);
- map_.setValue(ebdetid.rawId(), 1.0);
- } catch (...) {
- }
+ EBDetId ebdetid(iEta, iPhi);
+ map_.setValue(ebdetid.rawId(), 1.0);
}
}
for (int iX = EEDetId::IX_MIN; iX <= EEDetId::IX_MAX; ++iX) {
for (int iY = EEDetId::IY_MIN; iY <= EEDetId::IY_MAX; ++iY) {
- try {
- EEDetId eedetidpos(iX, iY, 1);
- map_.setValue(eedetidpos.rawId(), 1.0);
- EEDetId eedetidneg(iX, iY, -1);
- map_.setValue(eedetidneg.rawId(), 1.0);
- } catch (...) {
- }
+ EEDetId eedetidpos(iX, iY, 1);
+ map_.setValue(eedetidpos.rawId(), 1.0);
+ EEDetId eedetidneg(iX, iY, -1);
+ map_.setValue(eedetidneg.rawId(), 1.0);
}
}
}
diff --git a/CalibCalorimetry/CaloMiscalibTools/src/MiscalibReaderXMLEcalEndcap.cc b/CalibCalorimetry/CaloMiscalibTools/src/MiscalibReaderXMLEcalEndcap.cc
index 0e723f3333069..721bc865da9be 100644
--- a/CalibCalorimetry/CaloMiscalibTools/src/MiscalibReaderXMLEcalEndcap.cc
+++ b/CalibCalorimetry/CaloMiscalibTools/src/MiscalibReaderXMLEcalEndcap.cc
@@ -9,18 +9,10 @@ DetId MiscalibReaderFromXMLEcalEndcap::parseCellEntry(XERCES_CPP_NAMESPACE::DOMN
}
EEDetId MiscalibReaderFromXMLEcalEndcap::getCellFromAttributes(int ix, int iy, int iz) {
- try {
- if (EEDetId::validDetId(ix, iy, iz)) {
- EEDetId cell(ix, iy, iz);
- return cell;
- } else {
- return EEDetId(0);
- }
- }
-
- catch (...)
-
- {
+ if (EEDetId::validDetId(ix, iy, iz)) {
+ EEDetId cell(ix, iy, iz);
+ return cell;
+ } else {
std::cout << "Null coordinates = " << ix << "," << iy << "," << iz << std::endl;
return EEDetId(0);
}
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNumbering.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNumbering.h
index 703c35fdfa065..ca6ed217fe326 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNumbering.h
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNumbering.h
@@ -86,11 +86,11 @@ class TEcnaNumbering : public TObject {
TEcnaNumbering();
TEcnaNumbering(TEcnaObject*, const TString&);
- TEcnaNumbering(const TString&, const TEcnaParEcal*);
+ TEcnaNumbering(const TString&, TEcnaParEcal*);
~TEcnaNumbering() override;
void SetEcalSubDetector(const TString&);
- void SetEcalSubDetector(const TString&, const TEcnaParEcal*);
+ void SetEcalSubDetector(const TString&, TEcnaParEcal*);
//================================== BARREL
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParHistos.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParHistos.h
index 6892ba3dbb258..52ec9f4fa87b2 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParHistos.h
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParHistos.h
@@ -79,12 +79,12 @@ class TEcnaParHistos : public TObject {
TEcnaParHistos();
TEcnaParHistos(TEcnaObject*, const TString&);
- TEcnaParHistos(const TString&, const TEcnaParEcal*, const TEcnaNumbering*);
+ TEcnaParHistos(const TString&, TEcnaParEcal*, TEcnaNumbering*);
~TEcnaParHistos() override;
void Init();
void SetEcalSubDetector(const TString&);
- void SetEcalSubDetector(const TString&, const TEcnaParEcal*, const TEcnaNumbering*);
+ void SetEcalSubDetector(const TString&, TEcnaParEcal*, TEcnaNumbering*);
//...................................................... PLOT methods
UInt_t SetCanvasWidth(const TString&, const TString&);
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h
index b70080a074e12..c983faecfea21 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h
@@ -145,13 +145,13 @@ class TEcnaWrite : public TObject {
TEcnaWrite();
TEcnaWrite(TEcnaObject*, const TString&);
- TEcnaWrite(const TString&, const TEcnaParPaths*, const TEcnaParCout*, const TEcnaParEcal*, const TEcnaNumbering*);
+ TEcnaWrite(const TString&, TEcnaParPaths*, TEcnaParCout*, TEcnaParEcal*, TEcnaNumbering*);
~TEcnaWrite() override;
void Init();
void SetEcalSubDetector(const TString&);
- void SetEcalSubDetector(const TString&, const TEcnaParEcal*, const TEcnaNumbering*);
+ void SetEcalSubDetector(const TString&, TEcnaParEcal*, TEcnaNumbering*);
//...................................................... making file name method
void fMakeResultsFileName(); // => default: arg = fCodeRoot
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHistos.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHistos.cc
index 2a8e9bc0bcd94..770f563b1c5e6 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHistos.cc
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHistos.cc
@@ -3037,13 +3037,15 @@ void TEcnaHistos::ViewTowerGrid(const Int_t& SMNumber,
fCnewRoot++;
}
- sup_axis_x->SetTitle(x_var_name);
- sup_axis_x->SetTitleSize(tit_siz_x);
- sup_axis_x->SetTitleOffset(tit_off_x);
- sup_axis_x->SetLabelSize(lab_siz_x);
- sup_axis_x->SetLabelOffset(lab_off_x);
- sup_axis_x->SetTickSize(tic_siz_x);
- sup_axis_x->Draw("SAME");
+ if (sup_axis_x != nullptr) {
+ sup_axis_x->SetTitle(x_var_name);
+ sup_axis_x->SetTitleSize(tit_siz_x);
+ sup_axis_x->SetTitleOffset(tit_off_x);
+ sup_axis_x->SetLabelSize(lab_siz_x);
+ sup_axis_x->SetLabelOffset(lab_off_x);
+ sup_axis_x->SetTickSize(tic_siz_x);
+ sup_axis_x->Draw("SAME");
+ }
//...................................................... Axe phi (y right) (ViewTowerGrid)
Float_t tit_siz_y = fCnaParHistos->AxisTitleSize();
@@ -3083,13 +3085,15 @@ void TEcnaHistos::ViewTowerGrid(const Int_t& SMNumber,
fCnewRoot++;
}
- sup_axis_y->SetTitle(y_var_name);
- sup_axis_y->SetTitleSize(tit_siz_y);
- sup_axis_y->SetTitleOffset(tit_off_y);
- sup_axis_y->SetLabelSize(lab_siz_y);
- sup_axis_y->SetLabelOffset(lab_off_y);
- sup_axis_y->SetTickSize(tic_siz_y);
- sup_axis_y->Draw("SAME");
+ if (sup_axis_y != nullptr) {
+ sup_axis_y->SetTitle(y_var_name);
+ sup_axis_y->SetTitleSize(tit_siz_y);
+ sup_axis_y->SetTitleOffset(tit_off_y);
+ sup_axis_y->SetLabelSize(lab_siz_y);
+ sup_axis_y->SetLabelOffset(lab_off_y);
+ sup_axis_y->SetTickSize(tic_siz_y);
+ sup_axis_y->Draw("SAME");
+ }
}
//...................................................... Axe j(phi) (y left) (ViewTowerGrid)
@@ -4437,13 +4441,15 @@ void TEcnaHistos::ViewSMGrid(const Int_t& SMNumber, const TString& c_option) {
fCnewRoot++;
}
- sup_axis_x->SetTitle(x_var_name);
- sup_axis_x->SetTitleSize(tit_siz_x);
- sup_axis_x->SetTitleOffset(tit_off_x);
- sup_axis_x->SetLabelSize(lab_siz_x);
- sup_axis_x->SetLabelOffset(lab_off_x);
- sup_axis_x->SetTickSize(tic_siz_x);
- sup_axis_x->Draw("SAME");
+ if (sup_axis_x != nullptr) {
+ sup_axis_x->SetTitle(x_var_name);
+ sup_axis_x->SetTitleSize(tit_siz_x);
+ sup_axis_x->SetTitleOffset(tit_off_x);
+ sup_axis_x->SetLabelSize(lab_siz_x);
+ sup_axis_x->SetLabelOffset(lab_off_x);
+ sup_axis_x->SetTickSize(tic_siz_x);
+ sup_axis_x->Draw("SAME");
+ }
//...................................................... Axe phi (y) ViewSMGrid
Double_t phi_min = fEcalNumbering->GetPhiMin(SMNumber);
@@ -4488,13 +4494,15 @@ void TEcnaHistos::ViewSMGrid(const Int_t& SMNumber, const TString& c_option) {
fCnewRoot++;
}
- sup_axis_y->SetTitle(y_var_name);
- sup_axis_y->SetTitleSize(tit_siz_y);
- sup_axis_y->SetTitleOffset(tit_off_y);
- sup_axis_y->SetLabelSize(lab_siz_y);
- sup_axis_y->SetLabelOffset(lab_off_y);
- sup_axis_y->SetTickSize(tic_siz_y);
- sup_axis_y->Draw("SAME");
+ if (sup_axis_y != nullptr) {
+ sup_axis_y->SetTitle(y_var_name);
+ sup_axis_y->SetTitleSize(tit_siz_y);
+ sup_axis_y->SetTitleOffset(tit_off_y);
+ sup_axis_y->SetLabelSize(lab_siz_y);
+ sup_axis_y->SetLabelOffset(lab_off_y);
+ sup_axis_y->SetTickSize(tic_siz_y);
+ sup_axis_y->Draw("SAME");
+ }
//...................................................... Axe jphi (jy) ViewSMGrid
Double_t jphi_min = fEcalNumbering->GetJPhiMin(SMNumber);
@@ -5042,8 +5050,8 @@ void TEcnaHistos::ViewDeeGrid(const Int_t& DeeNumber, const TString& c_option) {
Double_t yline_haut_bot = (Double_t)ymid_bid;
Double_t yline_haut_top = (Double_t)ysup_bid;
- Double_t yline_bas_bot = (Double_t)yinf_bid;
- Double_t yline_bas_top = (Double_t)ymid_bid;
+ Double_t yline_bas_bot;
+ Double_t yline_bas_top;
// coordonnees demi-lignes
// l = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10
@@ -5841,13 +5849,15 @@ void TEcnaHistos::ViewEBGrid() {
Float_t tit_off_x = fCnaParHistos->AxisTitleOffset("EBx");
Float_t lab_off_x = fCnaParHistos->AxisLabelOffset("EBx");
- sup_axis_x->SetTitle(x_var_name);
- sup_axis_x->SetTitleSize(tit_siz_x);
- sup_axis_x->SetTitleOffset(tit_off_x);
- sup_axis_x->SetLabelSize(lab_siz_x);
- sup_axis_x->SetLabelOffset(lab_off_x);
- sup_axis_x->SetTickSize(tic_siz_x);
- sup_axis_x->Draw("SAME");
+ if (sup_axis_x != nullptr) {
+ sup_axis_x->SetTitle(x_var_name);
+ sup_axis_x->SetTitleSize(tit_siz_x);
+ sup_axis_x->SetTitleOffset(tit_off_x);
+ sup_axis_x->SetLabelSize(lab_siz_x);
+ sup_axis_x->SetLabelOffset(lab_off_x);
+ sup_axis_x->SetTickSize(tic_siz_x);
+ sup_axis_x->Draw("SAME");
+ }
//...................................................... Axe eta (y) ViewEBGrid
MatSize = fEcal->MaxTowEtaInSM();
@@ -6268,7 +6278,6 @@ void TEcnaHistos::EEDataSectors(const Float_t& coefcc_x,
}
//............................ numeros des dee's
- ngmax = 4;
Float_t xg_coord_dee[4] = {0, 0, 0, 0};
Float_t yg_coord_dee[4] = {48, 48, 48, 48};
@@ -6310,7 +6319,6 @@ void TEcnaHistos::EEDataSectors(const Float_t& coefcc_x,
//..................................... Numeros des Dee et indication EE+- (option "EE" seulement)
if (opt_plot == "EE") {
//............................ indication EE+-
- ngmax = 4;
Float_t xg_coord_eepm[4] = {0, 0, 0, 0};
Float_t yg_coord_eepm[4] = {95, 95, 95, 95};
@@ -6761,7 +6769,6 @@ void TEcnaHistos::XtalSamplesEv(const TVectorD& arg_read_histo,
ViewHisto(read_histo_samps, xAlreadyRead, StexStin_A, i0_stin_echa, fZerv, "D_MSp_SpNb", fAllXtalsInStinPlot);
xAlreadyRead++;
}
- xAlreadyRead = 0;
} else {
std::cout << "!TEcnaHistos::XtalSamplesEv(...)> Data not available." << std::endl;
}
@@ -6854,7 +6861,6 @@ void TEcnaHistos::EvSamplesXtals(const TVectorD& arg_read_histo,
ViewHisto(read_histo_samps, xAlreadyRead, StexStin_A, i0_stin_echa, fZerv, "D_MSp_SpDs", fAllXtalsInStinPlot);
xAlreadyRead++;
}
- xAlreadyRead = 0;
} else {
std::cout << "!TEcnaHistos::EvSamplesXtals(...)> Data not available." << std::endl;
}
@@ -6947,7 +6953,6 @@ void TEcnaHistos::XtalSamplesSigma(const TVectorD& arg_read_histo,
ViewHisto(read_histo_samps, xAlreadyRead, StexStin_A, i0StinEcha, fZerv, "D_SSp_SpNb", fAllXtalsInStinPlot);
xAlreadyRead++;
}
- xAlreadyRead = 0;
} else {
std::cout << "!TEcnaHistos::XtalSamplesSigma(...)> Data not available." << std::endl;
}
@@ -7040,7 +7045,6 @@ void TEcnaHistos::SigmaSamplesXtals(const TVectorD& arg_read_histo,
ViewHisto(read_histo_samps, xAlreadyRead, StexStin_A, i0StinEcha, fZerv, "D_SSp_SpDs", fAllXtalsInStinPlot);
xAlreadyRead++;
}
- xAlreadyRead = 0;
} else {
std::cout << "!TEcnaHistos::SigmaSamplesXtals(...)> Data not available." << std::endl;
}
@@ -11272,7 +11276,6 @@ void TEcnaHistos::HistoPlot(TH1D* h_his0,
<< std::endl;
ReInitCanvas(HistoCode, opt_plot);
- xMemoPlotSame = 0;
}
// delete MainCanvas; fCdeleteRoot++;
@@ -12158,7 +12161,6 @@ void TEcnaHistos::HistimePlot(TGraph* g_graph0,
<< std::endl;
ReInitCanvas(HistoCode, opt_plot);
- xMemoPlotSame = 0;
}
// delete MainCanvas; fCdeleteRoot++;
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNArrayD.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNArrayD.cc
index b32a82ee8f21d..de7f5965c9f10 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNArrayD.cc
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNArrayD.cc
@@ -366,19 +366,3 @@ Double_t &TEcnaNArrayD::operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4, Int_t
i = OneDim(i1, i2, i3, i4, i5, i6);
return fA[i];
}
-const Double_t &TEcnaNArrayD::operator()(Int_t i1) const { return const_cast(this)->operator()(i1); }
-const Double_t &TEcnaNArrayD::operator()(Int_t i1, Int_t i2) const {
- return const_cast(this)->operator()(i1, i2);
-}
-const Double_t &TEcnaNArrayD::operator()(Int_t i1, Int_t i2, Int_t i3) const {
- return const_cast(this)->operator()(i1, i2, i3);
-}
-const Double_t &TEcnaNArrayD::operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4) const {
- return const_cast(this)->operator()(i1, i2, i3, i4);
-}
-const Double_t &TEcnaNArrayD::operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4, Int_t i5) const {
- return const_cast(this)->operator()(i1, i2, i3, i4, i5);
-}
-const Double_t &TEcnaNArrayD::operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4, Int_t i5, Int_t i6) const {
- return const_cast(this)->operator()(i1, i2, i3, i4, i5, i6);
-}
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNumbering.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNumbering.cc
index 7a90a65932af3..60309213fddfa 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNumbering.cc
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNumbering.cc
@@ -60,7 +60,7 @@ TEcnaNumbering::TEcnaNumbering(TEcnaObject* pObjectManager, const TString& SubDe
SetEcalSubDetector(SubDet.Data());
}
-TEcnaNumbering::TEcnaNumbering(const TString& SubDet, const TEcnaParEcal* pEcal) {
+TEcnaNumbering::TEcnaNumbering(const TString& SubDet, TEcnaParEcal* pEcal) {
// Constructor with argument: call to methods Init() and SetEcalSubDetector(const TString&)
// std::cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << std::endl;
@@ -219,15 +219,14 @@ void TEcnaNumbering::Init() {
}
// end of Init()
//------------------------------------------------------------- SetEcalSubDetector(...)
-void TEcnaNumbering::SetEcalSubDetector(const TString& SubDet, const TEcnaParEcal* pEcal) {
+void TEcnaNumbering::SetEcalSubDetector(const TString& SubDet, TEcnaParEcal* pEcal) {
//Set the current subdetector flag and the current subdetector parameters
fEcal = nullptr;
if (pEcal == nullptr) {
fEcal = new TEcnaParEcal(SubDet.Data()); /*fCnew++*/
- ;
} else {
- fEcal = (TEcnaParEcal*)pEcal;
+ fEcal = pEcal;
}
Int_t MaxCar = fgMaxCar;
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc
index ea0f45353b82e..eb255701c3798 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc
@@ -67,7 +67,7 @@ TEcnaParHistos::TEcnaParHistos(TEcnaObject* pObjectManager, const TString& SubDe
SetEcalSubDetector(SubDet.Data());
}
-TEcnaParHistos::TEcnaParHistos(const TString& SubDet, const TEcnaParEcal* pEcal, const TEcnaNumbering* pEcalNumbering) {
+TEcnaParHistos::TEcnaParHistos(const TString& SubDet, TEcnaParEcal* pEcal, TEcnaNumbering* pEcalNumbering) {
// Constructor with argument
//std::cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << std::endl;
@@ -128,9 +128,7 @@ void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet) {
fFlagSubDet = fEcal->GetEcalSubDetector();
}
-void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet,
- const TEcnaParEcal* pEcal,
- const TEcnaNumbering* pEcalNumbering) {
+void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet, TEcnaParEcal* pEcal, TEcnaNumbering* pEcalNumbering) {
// Set Subdetector (EB or EE)
fEcal = nullptr;
@@ -138,7 +136,7 @@ void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet,
fEcal = new TEcnaParEcal(SubDet.Data()); /*fCnew++*/
;
} else {
- fEcal = (TEcnaParEcal*)pEcal;
+ fEcal = pEcal;
}
Int_t MaxCar = fgMaxCar;
@@ -150,7 +148,7 @@ void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet,
fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal); /*fCnew++*/
;
} else {
- fEcalNumbering = (TEcnaNumbering*)pEcalNumbering;
+ fEcalNumbering = pEcalNumbering;
}
}
@@ -1541,7 +1539,6 @@ TPaveText* TEcnaParHistos::SetPaveGeneralComment(const TString& comment) {
fCdelete++;
} else {
- title_g1 = new TPaveText(0, 0, 0, 0);
title_g1 = nullptr;
fCnewRoot++;
}
@@ -2158,22 +2155,24 @@ TPaveText* TEcnaParHistos::SetPaveLVRB(const Int_t& SMNumber, const Int_t& SMtow
TText* t3 = nullptr;
if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+") {
t3 = com_bot_mid->AddText(" <=== LVRB ");
- }
- if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-") {
+ } else if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-") {
t3 = com_bot_mid->AddText(" LVRB ===> ");
}
- t3->SetTextColor(couleur_rouge);
+ if (t3 != nullptr) {
+ t3->SetTextColor(couleur_rouge);
+ }
}
if (fEcalNumbering->GetTowerLvrbType(SMtower) == "bottom") {
TText* t4 = nullptr;
if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+") {
t4 = com_bot_mid->AddText(" LVRB ===> ");
- }
- if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-") {
+ } else if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-") {
t4 = com_bot_mid->AddText(" <=== LVRB ");
}
- t4->SetTextColor(couleur_bleu_fonce);
+ if (t4 != nullptr) {
+ t4->SetTextColor(couleur_bleu_fonce);
+ }
}
return com_bot_mid;
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc
index 717197abd31bf..13881d4d88b2d 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc
@@ -148,7 +148,6 @@ void TEcnaRead::Init() {
//................................. path for .root files
Int_t MaxCar = fgMaxCar;
- MaxCar = fgMaxCar;
fPathRoot.Resize(MaxCar);
fPathRoot = "fPathRoot not defined";
@@ -160,11 +159,9 @@ void TEcnaRead::Init() {
fLookAtRootFile = 0;
//................................. currently open file
- MaxCar = fgMaxCar;
fFlagNoFileOpen.Resize(MaxCar);
fFlagNoFileOpen = "No file is open";
- MaxCar = fgMaxCar;
fCurrentlyOpenFileName.Resize(MaxCar);
fCurrentlyOpenFileName = fFlagNoFileOpen;
@@ -1290,7 +1287,6 @@ TVectorD TEcnaRead::ReadStinNumbers(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Open .root file failed for file: " << file_name
<< fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -1393,7 +1389,6 @@ TVectorD TEcnaRead::ReadSampleAdcValues(const Int_t &n1StexStin,
std::cout << "!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> Open .root file failed for file: " << file_name
<< fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -1469,7 +1464,6 @@ TVectorD TEcnaRead::ReadSampleMeans(const Int_t &n1StexStin, const Int_t &i0Stin
std::cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " << file_name
<< fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -1542,7 +1536,6 @@ TVectorD TEcnaRead::ReadSampleMeans(const Int_t &n1StexStin, const Int_t &VecDim
std::cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " << file_name
<< fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -1681,7 +1674,6 @@ TVectorD TEcnaRead::ReadSampleSigmas(const Int_t &n1StexStin, const Int_t &VecDi
std::cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " << file_name
<< fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -1809,7 +1801,6 @@ TMatrixD TEcnaRead::ReadNumberOfEventsForSamples(const Int_t &n1StexStin, const
std::cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -1892,7 +1883,6 @@ TVectorD TEcnaRead::ReadPedestals(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> Open .root file failed for file: " << file_name
<< fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -1964,7 +1954,6 @@ TVectorD TEcnaRead::ReadTotalNoise(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> Open .root file failed for file: " << file_name
<< fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2037,7 +2026,6 @@ TVectorD TEcnaRead::ReadMeanCorrelationsBetweenSamples(const Int_t &VecDim) {
<< "!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2110,7 +2098,6 @@ TVectorD TEcnaRead::ReadLowFrequencyNoise(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2183,7 +2170,6 @@ TVectorD TEcnaRead::ReadHighFrequencyNoise(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2258,7 +2244,6 @@ TVectorD TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(const Int_t &VecDim) {
<< "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2404,7 +2389,6 @@ TVectorD TEcnaRead::ReadAveragePedestals(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> Open .root file failed for file: " << file_name
<< fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2478,7 +2462,6 @@ TVectorD TEcnaRead::ReadAverageTotalNoise(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2552,7 +2535,6 @@ TVectorD TEcnaRead::ReadAverageLowFrequencyNoise(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2626,7 +2608,6 @@ TVectorD TEcnaRead::ReadAverageHighFrequencyNoise(const Int_t &VecDim) {
std::cout << "!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2702,7 +2683,6 @@ TVectorD TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(const Int_t &VecDi
"for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2778,7 +2758,6 @@ TVectorD TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(const Int_t &Ve
"failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2863,7 +2842,6 @@ TMatrixD TEcnaRead::ReadCovariancesBetweenSamples(const Int_t &n1StexStin,
std::cout << "!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -2942,7 +2920,6 @@ TMatrixD TEcnaRead::ReadCorrelationsBetweenSamples(const Int_t &n1StexStin,
std::cout << "!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3022,7 +2999,6 @@ TVectorD TEcnaRead::ReadRelevantCorrelationsBetweenSamples(const Int_t &n1StexSt
<< "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3109,7 +3085,6 @@ TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(const Int_t &n1St
"for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3197,7 +3172,6 @@ TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(const Int_t &n1S
"for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3286,7 +3260,6 @@ TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(const Int_t &n1S
"for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3374,7 +3347,6 @@ TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(const Int_t &n1
"failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3465,7 +3437,6 @@ TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(const Int_t &MatD
"for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3565,7 +3536,6 @@ TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(const Int_t &Mat
"for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3665,7 +3635,6 @@ TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(const Int_t &Mat
"for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3765,7 +3734,6 @@ TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(const Int_t &Ma
"failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3864,7 +3832,6 @@ TMatrixD TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(const Int_t &Ma
"failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
@@ -3959,7 +3926,6 @@ TMatrixD TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t &M
"failed for file: "
<< file_name << fTTBELL << std::endl;
allowed_to_read = kFALSE;
- ok_read = kFALSE;
}
}
diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc
index f47e96b627663..fb8b0915cc206 100644
--- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc
+++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc
@@ -90,10 +90,10 @@ TEcnaWrite::TEcnaWrite(TEcnaObject* pObjectManager, const TString& SubDet) {
}
TEcnaWrite::TEcnaWrite(const TString& SubDet,
- const TEcnaParPaths* pCnaParPaths,
- const TEcnaParCout* pCnaParCout,
- const TEcnaParEcal* pEcal,
- const TEcnaNumbering* pEcalNumbering) {
+ TEcnaParPaths* pCnaParPaths,
+ TEcnaParCout* pCnaParCout,
+ TEcnaParEcal* pEcal,
+ TEcnaNumbering* pEcalNumbering) {
// std::cout << "[Info Management] CLASS: TEcnaWrite. CREATE OBJECT: this = " << this << std::endl;
Init();
@@ -104,7 +104,7 @@ TEcnaWrite::TEcnaWrite(const TString& SubDet,
fCnaParPaths = new TEcnaParPaths(); /*fCnew++*/
;
} else {
- fCnaParPaths = (TEcnaParPaths*)pCnaParPaths;
+ fCnaParPaths = pCnaParPaths;
}
//................. Get paths from ECNA directory
@@ -117,7 +117,7 @@ TEcnaWrite::TEcnaWrite(const TString& SubDet,
fCnaParCout = new TEcnaParCout(); /*fCnew++*/
;
} else {
- fCnaParCout = (TEcnaParCout*)pCnaParCout;
+ fCnaParCout = pCnaParCout;
}
fCodePrintAllComments = fCnaParCout->GetCodePrint("AllComments");
@@ -126,7 +126,7 @@ TEcnaWrite::TEcnaWrite(const TString& SubDet,
fEcal = new TEcnaParEcal(SubDet.Data()); /*fCnew++*/
;
} else {
- fEcal = (TEcnaParEcal*)pEcal;
+ fEcal = pEcal;
}
fEcalNumbering = nullptr;
@@ -134,7 +134,7 @@ TEcnaWrite::TEcnaWrite(const TString& SubDet,
fEcalNumbering = new TEcnaNumbering(SubDet.Data(), fEcal); /*fCnew++*/
;
} else {
- fEcalNumbering = (TEcnaNumbering*)pEcalNumbering;
+ fEcalNumbering = pEcalNumbering;
}
SetEcalSubDetector(SubDet.Data(), fEcal, fEcalNumbering);
@@ -277,9 +277,7 @@ void TEcnaWrite::SetEcalSubDetector(const TString& SubDet) {
fNbSampByLine = fEcal->MaxSampADC();
} //---------- (end of SetEcalSubDetector) ------------------
-void TEcnaWrite::SetEcalSubDetector(const TString& SubDet,
- const TEcnaParEcal* pEcal,
- const TEcnaNumbering* pEcalNumbering) {
+void TEcnaWrite::SetEcalSubDetector(const TString& SubDet, TEcnaParEcal* pEcal, TEcnaNumbering* pEcalNumbering) {
// Set Subdetector (EB or EE)
fEcal = nullptr;
@@ -287,7 +285,7 @@ void TEcnaWrite::SetEcalSubDetector(const TString& SubDet,
fEcal = new TEcnaParEcal(SubDet.Data());
fCnew++;
} else {
- fEcal = (TEcnaParEcal*)pEcal;
+ fEcal = pEcal;
}
Int_t MaxCar = fgMaxCar;
@@ -299,7 +297,7 @@ void TEcnaWrite::SetEcalSubDetector(const TString& SubDet,
fEcalNumbering = new TEcnaNumbering(SubDet.Data(), fEcal);
fCnew++;
} else {
- fEcalNumbering = (TEcnaNumbering*)pEcalNumbering;
+ fEcalNumbering = pEcalNumbering;
}
//........................................................................
@@ -2054,9 +2052,11 @@ void TEcnaWrite::fT2dWriteAscii(const Int_t& i_code,
if (i_pasx > isx_max) {
i_pasx = isx_max;
}
- Int_t n_sctx;
+ Int_t n_sctx = 1;
Int_t max_verix;
- n_sctx = isx_max / i_pasx;
+ if (i_pasx > 0) {
+ n_sctx = isx_max / i_pasx;
+ }
max_verix = n_sctx * i_pasx;
if (max_verix < isx_max) {
n_sctx++;
@@ -2070,9 +2070,11 @@ void TEcnaWrite::fT2dWriteAscii(const Int_t& i_code,
if (i_pasy > isy_max) {
i_pasy = isy_max;
}
- Int_t n_scty;
+ Int_t n_scty = 1;
Int_t max_veriy;
- n_scty = isy_max / i_pasy;
+ if (i_pasy > 0) {
+ n_scty = isy_max / i_pasy;
+ }
max_veriy = n_scty * i_pasy;
if (max_veriy < isy_max) {
n_scty++;
diff --git a/CalibCalorimetry/EcalLaserSorting/interface/LaserSorter.h b/CalibCalorimetry/EcalLaserSorting/interface/LaserSorter.h
index 67f9a19d29eb9..8b3067e6967bd 100644
--- a/CalibCalorimetry/EcalLaserSorting/interface/LaserSorter.h
+++ b/CalibCalorimetry/EcalLaserSorting/interface/LaserSorter.h
@@ -162,7 +162,7 @@ class LaserSorter : public edm::one::EDAnalyzer {
* @param lumiBlock luminositu block of the event
* @return pointer of the output stream record or null if not found.
*/
- std::unique_ptr& getStream(int fedId, edm::LuminosityBlockNumber_t lumiBlock);
+ const std::unique_ptr& getStream(int fedId, edm::LuminosityBlockNumber_t lumiBlock);
/** Writes a monitoring events to an output stream.
* @param out stream to write the event out
diff --git a/CalibCalorimetry/EcalLaserSorting/src/LaserSorter.cc b/CalibCalorimetry/EcalLaserSorting/src/LaserSorter.cc
index f7781a4846de1..ce530f0b8edfc 100644
--- a/CalibCalorimetry/EcalLaserSorting/src/LaserSorter.cc
+++ b/CalibCalorimetry/EcalLaserSorting/src/LaserSorter.cc
@@ -306,7 +306,7 @@ void LaserSorter::analyze(const edm::Event& event, const edm::EventSetup& es) {
if (disableOutput_) {
/* NO OP*/
} else {
- auto& out = getStream(triggeredFedId, lumiBlock_);
+ const auto& out = getStream(triggeredFedId, lumiBlock_);
if (out != nullptr) {
assignedLB = out->startingLumiBlock();
@@ -469,9 +469,9 @@ void LaserSorter::closeOldStreams(edm::LuminosityBlockNumber_t lumiBlock) {
}
}
-std::unique_ptr& LaserSorter::getStream(int fedId,
- edm::LuminosityBlockNumber_t lumiBlock) {
- static std::unique_ptr streamNotFound(nullptr);
+const std::unique_ptr& LaserSorter::getStream(int fedId,
+ edm::LuminosityBlockNumber_t lumiBlock) {
+ const static std::unique_ptr streamNotFound(nullptr);
if ((fedId != -1) && (fedId < ecalDccFedIdMin_ || fedId > ecalDccFedIdMax_))
fedId = -1;
@@ -578,7 +578,7 @@ bool LaserSorter::writeFedBlock(std::ofstream& out, const FEDRawData& data) {
if (out.fail())
cout << "[LaserSorter " << now() << "] "
<< "Problem with stream!\n";
- out.write((char*)data.data(), nBytes);
+ out.write((const char*)data.data(), nBytes);
rc = true;
} else {
throw cms::Exception("Bug") << "Bug found in " << __FILE__ << ":" << __LINE__ << ".\n";
diff --git a/CalibPPS/ESProducers/plugins/TotemDAQMappingESSourceXML.cc b/CalibPPS/ESProducers/plugins/TotemDAQMappingESSourceXML.cc
index fae42206bd533..c6b57a1a11acb 100644
--- a/CalibPPS/ESProducers/plugins/TotemDAQMappingESSourceXML.cc
+++ b/CalibPPS/ESProducers/plugins/TotemDAQMappingESSourceXML.cc
@@ -754,8 +754,13 @@ void TotemDAQMappingESSourceXML::ParseTreeTotemTiming(ParseType pType,
unsigned int StationNum = (parentID / 1000) % 10;
unsigned int RpNum = (parentID / 100) % 10;
- vfatInfo.symbolicID.symbolicID = TotemTimingDetId(
- ArmNum, StationNum, RpNum, 0, TotemTimingDetId::ID_NOT_SET); //Dynamical: it is encoded in the frame
+ vfatInfo.symbolicID.symbolicID =
+ TotemTimingDetId(ArmNum,
+ StationNum,
+ RpNum,
+ 0,
+ TotemTimingDetId::ID_NOT_SET,
+ TotemTimingDetId::sdTimingDiamond); //Dynamical: it is encoded in the frame
mapping->insert(framepos, vfatInfo);
diff --git a/CalibPPS/TimingCalibration/python/ALCARECOPromptCalibProdPPSDiamondSampicTimingCalib_Output_cff.py b/CalibPPS/TimingCalibration/python/ALCARECOPromptCalibProdPPSDiamondSampicTimingCalib_Output_cff.py
index 2acc300e856f0..af71c710367da 100644
--- a/CalibPPS/TimingCalibration/python/ALCARECOPromptCalibProdPPSDiamondSampicTimingCalib_Output_cff.py
+++ b/CalibPPS/TimingCalibration/python/ALCARECOPromptCalibProdPPSDiamondSampicTimingCalib_Output_cff.py
@@ -1,6 +1,6 @@
import FWCore.ParameterSet.Config as cms
-OutALCARECOPromptCalibProdPPSDiamondSampicTimingCalib_noDrop = cms.PSet(
+OutALCARECOPromptCalibProdPPSDiamondSampic_noDrop = cms.PSet(
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('pathALCARECOPromptCalibProdPPSDiamondSampicTiming')
),
@@ -9,5 +9,5 @@
)
)
-OutALCARECOPromptCalibProdPPSDiamondSampicTimingCalib = OutALCARECOPromptCalibProdPPSDiamondSampicTimingCalib_noDrop.clone()
-OutALCARECOPromptCalibProdPPSDiamondSampicTimingCalib.outputCommands.insert(0, 'drop *')
+OutALCARECOPromptCalibProdPPSDiamondSampic = OutALCARECOPromptCalibProdPPSDiamondSampic_noDrop.clone()
+OutALCARECOPromptCalibProdPPSDiamondSampic.outputCommands.insert(0, 'drop *')
diff --git a/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLWorker.cc b/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLWorker.cc
index 8a2c08996f331..598257a77dad5 100644
--- a/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLWorker.cc
+++ b/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLWorker.cc
@@ -519,7 +519,7 @@ void SiStripGainsPCLWorker::bookHistograms(DQMStore::IBooker& ibooker,
// this MonitorElement is created to log the number of events / tracks and clusters used
// by the calibration algorithm
- histograms.EventStats = ibooker.book2S("EventStats", "Statistics", 3, -0.5, 2.5, 1, 0, 1);
+ histograms.EventStats = ibooker.book2I("EventStats", "Statistics", 3, -0.5, 2.5, 1, 0, 1);
histograms.EventStats->setBinLabel(1, "events count", 1);
histograms.EventStats->setBinLabel(2, "tracks count", 1);
histograms.EventStats->setBinLabel(3, "clusters count", 1);
diff --git a/CalibTracker/SiStripChannelGain/test/checkMultiRunHarvesting.C b/CalibTracker/SiStripChannelGain/test/checkMultiRunHarvesting.C
index f1eb43e73ed30..9f3e69ab05f58 100644
--- a/CalibTracker/SiStripChannelGain/test/checkMultiRunHarvesting.C
+++ b/CalibTracker/SiStripChannelGain/test/checkMultiRunHarvesting.C
@@ -14,7 +14,7 @@ void checkDQMHarvesting(TString filename) {
exit(EXIT_FAILURE);
} else {
std::string searchstring = "DQMData/Run 999999/AlCaReco/Run summary/SiStripGains/EventStats";
- TH2S *h2 = (TH2S *)f->Get(searchstring.c_str());
+ TH2I *h2 = (TH2I *)f->Get(searchstring.c_str());
if (!h2) {
std::cout << "checkMultiRunHarvesting: ERROR. Could not find the histogram " << searchstring << std::endl;
exit(EXIT_FAILURE);
diff --git a/CalibTracker/SiStripHitEfficiency/interface/SiStripHitEfficiencyHelpers.h b/CalibTracker/SiStripHitEfficiency/interface/SiStripHitEfficiencyHelpers.h
index b5aea232f951c..4f30fe6bbb5a3 100644
--- a/CalibTracker/SiStripHitEfficiency/interface/SiStripHitEfficiencyHelpers.h
+++ b/CalibTracker/SiStripHitEfficiency/interface/SiStripHitEfficiencyHelpers.h
@@ -12,31 +12,40 @@
namespace {
+ enum bounds {
+ k_LayersStart = 0,
+ k_LayersAtTIBEnd = 4,
+ k_LayersAtTOBEnd = 10,
+ k_LayersAtTIDEnd = 13,
+ k_LayersAtTECEnd = 22,
+ k_END_OF_LAYERS = 23
+ };
+
inline unsigned int checkLayer(unsigned int iidd, const TrackerTopology* tTopo) {
switch (DetId(iidd).subdetId()) {
case SiStripSubdetector::TIB:
return tTopo->tibLayer(iidd);
case SiStripSubdetector::TOB:
- return tTopo->tobLayer(iidd) + 4;
+ return tTopo->tobLayer(iidd) + bounds::k_LayersAtTIBEnd;
case SiStripSubdetector::TID:
- return tTopo->tidWheel(iidd) + 10;
+ return tTopo->tidWheel(iidd) + bounds::k_LayersAtTOBEnd;
case SiStripSubdetector::TEC:
- return tTopo->tecWheel(iidd) + 13;
+ return tTopo->tecWheel(iidd) + bounds::k_LayersAtTIDEnd;
default:
- return 0;
+ return bounds::k_LayersStart;
}
}
inline std::string layerName(unsigned int k, const bool showRings, const unsigned int nTEClayers) {
const std::string ringlabel{showRings ? "R" : "D"};
- if (k > 0 && k < 5) {
+ if (k > bounds::k_LayersStart && k <= bounds::k_LayersAtTIBEnd) {
return fmt::format("TIB L{:d}", k);
- } else if (k > 4 && k < 11) {
- return fmt::format("TOB L{:d}", k - 4);
- } else if (k > 10 && k < 14) {
- return fmt::format("TID {0}{1:d}", ringlabel, k - 10);
- } else if (k > 13 && k < 14 + nTEClayers) {
- return fmt::format("TEC {0}{1:d}", ringlabel, k - 13);
+ } else if (k > bounds::k_LayersAtTIBEnd && k <= bounds::k_LayersAtTOBEnd) {
+ return fmt::format("TOB L{:d}", k - bounds::k_LayersAtTIBEnd);
+ } else if (k > bounds::k_LayersAtTOBEnd && k <= bounds::k_LayersAtTIDEnd) {
+ return fmt::format("TID {0}{1:d}", ringlabel, k - bounds::k_LayersAtTOBEnd);
+ } else if (k > bounds::k_LayersAtTIDEnd && k <= bounds::k_LayersAtTIDEnd + nTEClayers) {
+ return fmt::format("TEC {0}{1:d}", ringlabel, k - bounds::k_LayersAtTIDEnd);
} else {
return "";
}
diff --git a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyHarvester.cc b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyHarvester.cc
index a72c60893aa75..fc4d7899e2396 100644
--- a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyHarvester.cc
+++ b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyHarvester.cc
@@ -40,6 +40,7 @@ class SiStripHitEfficiencyHarvester : public DQMEDHarvester {
void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;
private:
+ const std::string inputFolder_;
const bool isAtPCL_;
const bool showRings_, autoIneffModTagging_, doStoreOnDB_;
const unsigned int nTEClayers_;
@@ -59,7 +60,8 @@ class SiStripHitEfficiencyHarvester : public DQMEDHarvester {
std::vector stripDetIds_;
void writeBadStripPayload(const SiStripQuality& quality) const;
- void printTotalStatistics(const std::array& layerFound, const std::array& layerTotal) const;
+ void printTotalStatistics(const std::array& layerFound,
+ const std::array& layerTotal) const;
void printAndWriteBadModules(const SiStripQuality& quality, const SiStripDetInfo& detInfo) const;
bool checkMapsValidity(const std::vector& maps, const std::string& type) const;
void makeSummary(DQMStore::IGetter& getter, TFileService& fs) const;
@@ -69,7 +71,8 @@ class SiStripHitEfficiencyHarvester : public DQMEDHarvester {
};
SiStripHitEfficiencyHarvester::SiStripHitEfficiencyHarvester(const edm::ParameterSet& conf)
- : isAtPCL_(conf.getParameter("isAtPCL")),
+ : inputFolder_(conf.getParameter("inputFolder")),
+ isAtPCL_(conf.getParameter("isAtPCL")),
showRings_(conf.getUntrackedParameter("ShowRings", false)),
autoIneffModTagging_(conf.getUntrackedParameter("AutoIneffModTagging", false)),
doStoreOnDB_(conf.getParameter("doStoreOnDB")),
@@ -142,9 +145,9 @@ void SiStripHitEfficiencyHarvester::dqmEndJob(DQMStore::IBooker& booker, DQMStor
<< " and has at least " << nModsMin_ << " nModsMin.";
auto h_module_total = std::make_unique(tkDetMap_.get());
- h_module_total->loadTkHistoMap("AlCaReco/SiStripHitEfficiency", "perModule_total");
+ h_module_total->loadTkHistoMap(fmt::format("{}/TkDetMaps", inputFolder_), "perModule_total");
auto h_module_found = std::make_unique(tkDetMap_.get());
- h_module_found->loadTkHistoMap("AlCaReco/SiStripHitEfficiency", "perModule_found");
+ h_module_found->loadTkHistoMap(fmt::format("{}/TkDetMaps", inputFolder_), "perModule_found");
// collect how many layers are missing
const auto& totalMaps = h_module_total->getAllMaps();
@@ -168,14 +171,18 @@ void SiStripHitEfficiencyHarvester::dqmEndJob(DQMStore::IBooker& booker, DQMStor
<< "Entries in total TkHistoMap for layer 3: " << h_module_total->getMap(3)->getEntries() << ", found "
<< h_module_found->getMap(3)->getEntries();
+ // come back to the main folder
+ booker.setCurrentFolder(inputFolder_);
+
std::vector hEffInLayer(std::size_t(1), nullptr);
- hEffInLayer.reserve(23);
- for (std::size_t i = 1; i != 23; ++i) {
- hEffInLayer.push_back(
- booker.book1D(Form("eff_layer%i", int(i)), Form("Module efficiency in layer %i", int(i)), 201, 0, 1.005));
+ hEffInLayer.reserve(bounds::k_END_OF_LAYERS);
+ for (std::size_t i = 1; i != bounds::k_END_OF_LAYERS; ++i) {
+ const auto lyrName = ::layerName(i, showRings_, nTEClayers_);
+ hEffInLayer.push_back(booker.book1D(
+ Form("eff_layer%i", int(i)), Form("Module efficiency in layer %s", lyrName.c_str()), 201, 0, 1.005));
}
- std::array layerTotal{};
- std::array layerFound{};
+ std::array layerTotal{};
+ std::array layerFound{};
layerTotal.fill(0);
layerFound.fill(0);
@@ -229,7 +236,7 @@ void SiStripHitEfficiencyHarvester::dqmEndJob(DQMStore::IBooker& booker, DQMStor
}
if (autoIneffModTagging_) {
- for (Long_t i = 1; i <= 22; i++) {
+ for (Long_t i = 1; i <= k_LayersAtTECEnd; i++) {
//Compute threshold to use for each layer
hEffInLayer[i]->getTH1()->GetXaxis()->SetRange(
3, hEffInLayer[i]->getNbinsX() + 1); // Remove from the avg modules below 1%
@@ -318,8 +325,9 @@ void SiStripHitEfficiencyHarvester::dqmEndJob(DQMStore::IBooker& booker, DQMStor
makeSummaryVsLumi(getter); // TODO
}
-void SiStripHitEfficiencyHarvester::printTotalStatistics(const std::array& layerFound,
- const std::array& layerTotal) const {
+void SiStripHitEfficiencyHarvester::printTotalStatistics(
+ const std::array& layerFound,
+ const std::array& layerTotal) const {
//Calculate the statistics by layer
int totalfound = 0;
int totaltotal = 0;
@@ -332,25 +340,25 @@ void SiStripHitEfficiencyHarvester::printTotalStatistics(const std::array= 5 && i < 11) {
+ if (i > bounds::k_LayersAtTIBEnd && i <= bounds::k_LayersAtTOBEnd) {
subdetfound[2] += layerFound[i];
subdettotal[2] += layerTotal[i];
}
- if (i >= 11 && i < 14) {
+ if (i > bounds::k_LayersAtTOBEnd && i <= bounds::k_LayersAtTIDEnd) {
subdetfound[3] += layerFound[i];
subdettotal[3] += layerTotal[i];
}
- if (i >= 14) {
+ if (i > bounds::k_LayersAtTIDEnd) {
subdetfound[4] += layerFound[i];
subdettotal[4] += layerTotal[i];
}
@@ -393,18 +401,16 @@ void SiStripHitEfficiencyHarvester::makeSummaryVsBX(DQMStore::IGetter& getter, T
void SiStripHitEfficiencyHarvester::makeSummaryVsLumi(DQMStore::IGetter& getter) const {
for (unsigned int iLayer = 1; iLayer != (showRings_ ? 20 : 22); ++iLayer) {
- auto hfound =
- getter.get(fmt::format("AlCaReco/SiStripHitEfficiency/layerfound_vsLumi_layer_{}", iLayer))->getTH1F();
- auto htotal =
- getter.get(fmt::format("AlCaReco/SiStripHitEfficiency/layertotal_vsLumi_layer_{}", iLayer))->getTH1F();
+ auto hfound = getter.get(fmt::format("{}/VsLumi/layerfound_vsLumi_layer_{}", inputFolder_, iLayer))->getTH1F();
+ auto htotal = getter.get(fmt::format("{}/VsLumi/layertotal_vsLumi_layer_{}", inputFolder_, iLayer))->getTH1F();
if (hfound == nullptr or htotal == nullptr) {
if (hfound == nullptr)
edm::LogError("SiStripHitEfficiencyHarvester")
- << fmt::format("AlCaReco/SiStripHitEfficiency/layerfound_vsLumi_layer_{}", iLayer) << " was not found!";
+ << fmt::format("{}/VsLumi/layerfound_vsLumi_layer_{}", inputFolder_, iLayer) << " was not found!";
if (htotal == nullptr)
edm::LogError("SiStripHitEfficiencyHarvester")
- << fmt::format("AlCaReco/SiStripHitEfficiency/layertotal_vsLumi_layer_{}", iLayer) << " was not found!";
+ << fmt::format("{}/VsLumi/layertotal_vsLumi_layer_{}", inputFolder_, iLayer) << " was not found!";
// no input histograms -> continue in the loop
continue;
}
@@ -653,6 +659,7 @@ void SiStripHitEfficiencyHarvester::printAndWriteBadModules(const SiStripQuality
void SiStripHitEfficiencyHarvester::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
+ desc.add("inputFolder", "AlCaReco/SiStripHitEfficiency");
desc.add("isAtPCL", false);
desc.add("doStoreOnDB", false);
desc.add("Record", "SiStripBadStrip");
diff --git a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyWorker.cc b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyWorker.cc
index bda67db1184a6..7edba1e473cd8 100644
--- a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyWorker.cc
+++ b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyWorker.cc
@@ -105,6 +105,7 @@ class SiStripHitEfficiencyWorker : public DQMEDAnalyzer {
const edm::ESGetToken tkDetMapToken_;
// configurable parameters
+ std::string dqmDir_;
unsigned int layers_;
bool DEBUG_;
bool addLumi_;
@@ -159,6 +160,7 @@ class SiStripHitEfficiencyWorker : public DQMEDAnalyzer {
};
MonitorElement *h_bx, *h_instLumi, *h_PU;
+ MonitorElement *h_nTracks, *h_nTracksVsPU;
EffME1 h_goodLayer;
EffME1 h_allLayer;
EffME1 h_layer;
@@ -196,6 +198,7 @@ SiStripHitEfficiencyWorker::SiStripHitEfficiencyWorker(const edm::ParameterSet&
chi2EstimatorToken_(esConsumes(edm::ESInputTag{"", "Chi2"})),
propagatorToken_(esConsumes(edm::ESInputTag{"", "PropagatorWithMaterial"})),
tkDetMapToken_(esConsumes()),
+ dqmDir_(conf.getParameter("dqmDir")),
layers_(conf.getParameter("Layer")),
DEBUG_(conf.getUntrackedParameter("Debug", false)),
addLumi_(conf.getUntrackedParameter("addLumi", false)),
@@ -249,56 +252,84 @@ void SiStripHitEfficiencyWorker::beginJob() {
void SiStripHitEfficiencyWorker::bookHistograms(DQMStore::IBooker& booker,
const edm::Run& run,
const edm::EventSetup& setup) {
- const std::string path = "AlCaReco/SiStripHitEfficiency"; // TODO make this configurable
- booker.setCurrentFolder(path);
+ booker.setCurrentFolder(fmt::format("{}/EventInfo", dqmDir_));
h_bx = booker.book1D("bx", "bx", 3600, 0, 3600);
h_instLumi = booker.book1D("instLumi", "inst. lumi.", 250, 0, 25000);
h_PU = booker.book1D("PU", "PU", 200, 0, 200);
+ h_nTracks = booker.book1D("ntracks", "n.tracks;n. tracks;n.events", 500, -0.5, 499.5);
+ h_nTracksVsPU = booker.bookProfile("nTracksVsPU", "n. tracks vs PU; PU; n.tracks ", 200, 0, 200, 500, -0.5, 499.5);
+ booker.setCurrentFolder(dqmDir_);
h_goodLayer = EffME1(booker.book1D("goodlayer_total", "goodlayer_total", 35, 0., 35.),
booker.book1D("goodlayer_found", "goodlayer_found", 35, 0., 35.));
h_allLayer = EffME1(booker.book1D("alllayer_total", "alllayer_total", 35, 0., 35.),
booker.book1D("alllayer_found", "alllayer_found", 35, 0., 35.));
- h_layer = EffME1(booker.book1D("layer_found", "layer_found", 23, 0., 23.),
- booker.book1D("layer_total", "layer_total", 23, 0., 23.));
- for (int layer = 0; layer != 23; ++layer) {
+ h_layer = EffME1(
+ booker.book1D(
+ "layer_found", "layer_found", bounds::k_END_OF_LAYERS, 0., static_cast(bounds::k_END_OF_LAYERS)),
+ booker.book1D(
+ "layer_total", "layer_total", bounds::k_END_OF_LAYERS, 0., static_cast(bounds::k_END_OF_LAYERS)));
+
+ for (int layer = 1; layer != bounds::k_END_OF_LAYERS; ++layer) {
const auto lyrName = ::layerName(layer, showRings_, nTEClayers_);
+
+ // book resolutions
+ booker.setCurrentFolder(fmt::format("{}/Resolutions", dqmDir_));
auto ihres = booker.book1D(Form("resol_layer_%i", layer), lyrName, 125, -125., 125.);
ihres->setAxisTitle("trajX-clusX [strip unit]");
h_resolution.push_back(ihres);
+
+ // book plots vs Lumi
+ booker.setCurrentFolder(fmt::format("{}/VsLumi", dqmDir_));
h_layer_vsLumi.push_back(EffME1(booker.book1D(Form("layertotal_vsLumi_layer_%i", layer), lyrName, 100, 0, 25000),
booker.book1D(Form("layerfound_vsLumi_layer_%i", layer), lyrName, 100, 0, 25000)));
+
+ // book plots vs Lumi
+ booker.setCurrentFolder(fmt::format("{}/VsPu", dqmDir_));
h_layer_vsPU.push_back(EffME1(booker.book1D(Form("layertotal_vsPU_layer_%i", layer), lyrName, 45, 0, 90),
booker.book1D(Form("layerfound_vsPU_layer_%i", layer), lyrName, 45, 0, 90)));
if (addCommonMode_) {
+ // book plots for common mode
+ booker.setCurrentFolder(fmt::format("{}/CommonMode", dqmDir_));
h_layer_vsCM.push_back(EffME1(booker.book1D(Form("layertotal_vsCM_layer_%i", layer), lyrName, 20, 0, 400),
booker.book1D(Form("layerfound_vsCM_layer_%i", layer), lyrName, 20, 0, 400)));
}
- h_layer_vsBx.push_back(
- EffME1(booker.book1D(Form("totalVsBx_layer%i", layer), Form("layer %i", layer), 3565, 0, 3565),
- booker.book1D(Form("foundVsBx_layer%i", layer), Form("layer %i", layer), 3565, 0, 3565)));
- if (layer < 10) {
- const bool isTIB = layer < 4;
+
+ // book plots vs Lumi
+ booker.setCurrentFolder(fmt::format("{}/VsBx", dqmDir_));
+ h_layer_vsBx.push_back(EffME1(
+ booker.book1D(Form("totalVsBx_layer%i", layer), Form("layer %i (%s)", layer, lyrName.c_str()), 3565, 0, 3565),
+ booker.book1D(Form("foundVsBx_layer%i", layer), Form("layer %i (%s)", layer, lyrName.c_str()), 3565, 0, 3565)));
+
+ // book hot and cold
+ booker.setCurrentFolder(fmt::format("{}/MissingHits", dqmDir_));
+ if (layer <= bounds::k_LayersAtTOBEnd) {
+ const bool isTIB = layer <= bounds::k_LayersAtTIBEnd;
const auto partition = (isTIB ? "TIB" : "TOB");
const auto yMax = (isTIB ? 100 : 120);
- auto ihhotcold = booker.book2D(
- Form("%s%i", partition, (isTIB ? layer + 1 : layer - 3)), partition, 100, -1, 361, 100, -yMax, yMax);
- ihhotcold->setAxisTitle("Phi", 1);
+
+ const auto tit = Form("%s%i: Map of missing hits", partition, (isTIB ? layer : layer - bounds::k_LayersAtTIBEnd));
+
+ auto ihhotcold = booker.book2D(tit, tit, 100, -1, 361, 100, -yMax, yMax);
+ ihhotcold->setAxisTitle("#phi [deg]", 1);
ihhotcold->setBinLabel(1, "360", 1);
ihhotcold->setBinLabel(50, "180", 1);
ihhotcold->setBinLabel(100, "0", 1);
- ihhotcold->setAxisTitle("Global Z", 2);
+ ihhotcold->setAxisTitle("Global Z [cm]", 2);
ihhotcold->setOption("colz");
h_hotcold.push_back(ihhotcold);
} else {
- const bool isTID = layer < 13;
+ const bool isTID = layer <= bounds::k_LayersAtTIDEnd;
const auto partitions =
(isTID ? std::vector{"TID-", "TID+"} : std::vector{"TEC-", "TEC+"});
const auto axMax = (isTID ? 100 : 120);
for (const auto& part : partitions) {
- auto ihhotcold = booker.book2D(
- Form("%s%i", part.c_str(), (isTID ? layer - 9 : layer - 12)), part, 100, -axMax, axMax, 100, -axMax, axMax);
+ const auto tit = Form("%s%i: Map of missing hits",
+ part.c_str(),
+ (isTID ? layer - bounds::k_LayersAtTOBEnd : layer - bounds::k_LayersAtTIDEnd));
+
+ auto ihhotcold = booker.book2D(tit, tit, 100, -axMax, axMax, 100, -axMax, axMax);
ihhotcold->setAxisTitle("Global Y", 1);
ihhotcold->setBinLabel(1, "+Y", 1);
ihhotcold->setBinLabel(50, "0", 1);
@@ -313,9 +344,14 @@ void SiStripHitEfficiencyWorker::bookHistograms(DQMStore::IBooker& booker,
}
}
+ // come back to the main folder
+ booker.setCurrentFolder(dqmDir_);
+ const auto tkDetMapFolder = fmt::format("{}/TkDetMaps", dqmDir_);
+
const TkDetMap* tkDetMap = &setup.getData(tkDetMapToken_);
- h_module = EffTkMap(std::make_unique(tkDetMap, booker, path, "perModule_total", 0, false, true),
- std::make_unique(tkDetMap, booker, path, "perModule_found", 0, false, true));
+ h_module =
+ EffTkMap(std::make_unique(tkDetMap, booker, tkDetMapFolder, "perModule_total", 0, false, true),
+ std::make_unique(tkDetMap, booker, tkDetMapFolder, "perModule_found", 0, false, true));
}
void SiStripHitEfficiencyWorker::analyze(const edm::Event& e, const edm::EventSetup& es) {
@@ -376,6 +412,10 @@ void SiStripHitEfficiencyWorker::analyze(const edm::Event& e, const edm::EventSe
// Tracking
LogDebug("SiStripHitEfficiencyWorker") << "number ckf tracks found = " << tracksCKF->size();
+
+ h_nTracks->Fill(tracksCKF->size());
+ h_nTracksVsPU->Fill(PU, tracksCKF->size());
+
if (!tracksCKF->empty()) {
if (cutOnTracks_ && (tracksCKF->size() >= trackMultiplicityCut_))
return;
@@ -408,6 +448,11 @@ void SiStripHitEfficiencyWorker::analyze(const edm::Event& e, const edm::EventSe
unsigned int iidd = theInHit->geographicalId().rawId();
unsigned int TKlayers = ::checkLayer(iidd, tTopo);
+
+ // do not bother with pixel hits
+ if (DetId(iidd).subdetId() < SiStripSubdetector::TIB)
+ continue;
+
LogDebug("SiStripHitEfficiencyWorker") << "TKlayer from trajectory: " << TKlayers << " from module = " << iidd
<< " matched/stereo/rphi = " << ((iidd & 0x3) == 0) << "/"
<< ((iidd & 0x3) == 1) << "/" << ((iidd & 0x3) == 2);
@@ -420,7 +465,7 @@ void SiStripHitEfficiencyWorker::analyze(const edm::Event& e, const edm::EventSe
theInHit->getType() != TrackingRecHit::Type::missing))
continue;
// If Trajectory measurement from TOB 6 or TEC 9, skip it because it's always valid they are filled later
- if (TKlayers == 10 || TKlayers == 22) {
+ if (TKlayers == bounds::k_LayersAtTOBEnd || TKlayers == bounds::k_LayersAtTECEnd) {
LogDebug("SiStripHitEfficiencyWorker") << "skipping original TM for TOB 6 or TEC 9";
continue;
}
@@ -580,8 +625,9 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
const bool withinAcceptance =
tm.withinAcceptance() && (!::isInBondingExclusionZone(iidd, TKlayers, yloc, yErr, tTopo));
- if ( // (TKlayers > 0) && // FIXME confirm this
- ((layers_ == TKlayers) || (layers_ == 0))) { // Look at the layer not used to reconstruct the track
+ if ( // (TKlayers > 0) && // FIXME confirm this
+ ((layers_ == TKlayers) ||
+ (layers_ == bounds::k_LayersStart))) { // Look at the layer not used to reconstruct the track
LogDebug("SiStripHitEfficiencyWorker") << "Looking at layer under study";
unsigned int ModIsBad = 2;
unsigned int SiStripQualBad = 0;
@@ -605,7 +651,7 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
float hapoth = 0.0;
float uylfac = 0.0;
float uxlden = 0.0;
- if (TKlayers >= 11) {
+ if (TKlayers > bounds::k_LayersAtTOBEnd) {
const BoundPlane& plane = stripdet->surface();
const TrapezoidalPlaneBounds* trapezoidalBounds(
dynamic_cast(&(plane.bounds())));
@@ -623,7 +669,7 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
float pitch = stripdet->surface().bounds().width() / nstrips;
TrajStrip = xloc / pitch + nstrips / 2.0;
// Need additionnal corrections for endcap
- if (TKlayers >= 11) {
+ if (TKlayers > bounds::k_LayersAtTOBEnd) {
const float TrajLocXMid = xloc / (1 + (htedge - hbedge) * yloc / (htedge + hbedge) /
hapoth); // radialy extrapolated x loc position at middle
TrajStrip = TrajLocXMid / pitch + nstrips / 2.0;
@@ -641,7 +687,7 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
//const Chi2MeasurementEstimator *theEstimator(100);
//theEstimator->estimate(tm.tsos(), TransientTrackingRecHit);
- if (TKlayers >= 11) {
+ if (TKlayers > bounds::k_LayersAtTOBEnd) {
res = parameters.first.x() - xloc / uxlden; // radialy extrapolated x loc position at middle
sigma = abs(res) / sqrt(parameters.second.xx() + xErr * xErr / uxlden / uxlden +
yErr * yErr * xloc * xloc * uylfac * uylfac / uxlden / uxlden / uxlden / uxlden);
@@ -735,20 +781,21 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
<< ", withinAcceptance=" << withinAcceptance;
unsigned int layer = TKlayers;
- if (showRings_ && layer > 10) { // use rings instead of wheels
- if (layer < 14) { // TID
- layer = 10 + ((iidd >> 9) & 0x3); // 3 disks and also 3 rings -> use the same container
- } else { // TEC
- layer = 13 + ((iidd >> 5) & 0x7);
+ if (showRings_ && layer > bounds::k_LayersAtTOBEnd) { // use rings instead of wheels
+ if (layer <= bounds::k_LayersAtTIDEnd) { // TID
+ layer = bounds::k_LayersAtTOBEnd +
+ tTopo->tidRing(iidd); // ((iidd >> 9) & 0x3); // 3 disks and also 3 rings -> use the same container
+ } else { // TEC
+ layer = bounds::k_LayersAtTIDEnd + tTopo->tecRing(iidd); // ((iidd >> 5) & 0x7);
}
}
unsigned int layerWithSide = layer;
- if (layer > 10 && layer < 14) {
- const auto side = (iidd >> 13) & 0x3; // TID
+ if (layer > bounds::k_LayersAtTOBEnd && layer <= bounds::k_LayersAtTIDEnd) {
+ const auto side = tTopo->tidSide(iidd); //(iidd >> 13) & 0x3; // TID
if (side == 2)
layerWithSide = layer + 3;
- } else if (layer > 13) {
- const auto side = (iidd >> 18) & 0x3; // TEC
+ } else if (layer > bounds::k_LayersAtTIDEnd) {
+ const auto side = tTopo->tecSide(iidd); // (iidd >> 18) & 0x3; // TEC
if (side == 1) {
layerWithSide = layer + 3;
} else if (side == 2) {
@@ -757,7 +804,8 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
}
if ((bunchX_ > 0 && bunchX_ != bunchCrossing) || (!withinAcceptance) ||
- (useOnlyHighPurityTracks_ && !highPurity) || (!showTOB6TEC9_ && (TKlayers == 10 || TKlayers == 22)) ||
+ (useOnlyHighPurityTracks_ && !highPurity) ||
+ (!showTOB6TEC9_ && (TKlayers == bounds::k_LayersAtTOBEnd || TKlayers == bounds::k_LayersAtTECEnd)) ||
(badModules_.end() != badModules_.find(iidd)))
return;
@@ -793,7 +841,7 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
double stripCluster = finalCluster.xLocal / Pitch + nstrips / 2.0;
// For trapezoidal modules: extrapolation of x trajectory position to the y middle of the module
// for correct comparison with cluster position
- if (stripdet && layer >= 11) {
+ if (stripdet && layer > bounds::k_LayersAtTOBEnd) {
const auto& trapezoidalBounds = dynamic_cast(stripdet->surface().bounds());
std::array const& parameters = trapezoidalBounds.parameters();
const float hbedge = parameters[0];
@@ -805,7 +853,9 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
}
if ((!badquality) && (layer < h_resolution.size())) {
- h_resolution[layer]->Fill(finalCluster.xResidualPull != 1000.0 ? stripTrajMid - stripCluster : 1000);
+ LogDebug("SiStripHitEfficiencyWorker")
+ << "layer " << layer << " vector index " << layer - 1 << " before filling h_resolution" << std::endl;
+ h_resolution[layer - 1]->Fill(finalCluster.xResidualPull != 1000.0 ? stripTrajMid - stripCluster : 1000);
}
// New matching methods
@@ -845,23 +895,42 @@ void SiStripHitEfficiencyWorker::fillForTraj(const TrajectoryAtInvalidHit& tm,
// hot/cold maps of hits that are expected but not found
if (badflag) {
- if (layer > 0 && layer <= 10) {
- // 1-4: TIB, 4-10: TOB
- h_hotcold[layer - 1]->Fill(360. - ::calcPhi(tm.globalX(), tm.globalY()), tm.globalZ(), 1.);
- } else if (layer > 10 && layer <= 13) {
- // 11-13: TID, above: TEC
- const int side = layer > 13 ? (iidd >> 13) & 0x3 : (iidd >> 18) & 0x3;
- h_hotcold[2 * layer - 13 + side]->Fill(-tm.globalY(), tm.globalX(), 1.);
+ if (layer > bounds::k_LayersStart && layer <= bounds::k_LayersAtTIBEnd) {
+ //We are in the TIB
+ float phi = ::calcPhi(tm.globalX(), tm.globalY());
+ h_hotcold[layer - 1]->Fill(360. - phi, tm.globalZ(), 1.);
+ } else if (layer > bounds::k_LayersAtTIBEnd && layer <= bounds::k_LayersAtTOBEnd) {
+ //We are in the TOB
+ float phi = ::calcPhi(tm.globalX(), tm.globalY());
+ h_hotcold[layer - 1]->Fill(360. - phi, tm.globalZ(), 1.);
+ } else if (layer > bounds::k_LayersAtTOBEnd && layer <= bounds::k_LayersAtTIDEnd) {
+ //We are in the TID
+ //There are 2 different maps here
+ int side = tTopo->tidSide(iidd);
+ if (side == 1)
+ h_hotcold[(layer - 1) + (layer - 11)]->Fill(-tm.globalY(), tm.globalX(), 1.);
+ else if (side == 2)
+ h_hotcold[(layer - 1) + (layer - 10)]->Fill(-tm.globalY(), tm.globalX(), 1.);
+ } else if (layer > bounds::k_LayersAtTIDEnd) {
+ //We are in the TEC
+ //There are 2 different maps here
+ int side = tTopo->tecSide(iidd);
+ if (side == 1)
+ h_hotcold[(layer + 2) + (layer - 14)]->Fill(-tm.globalY(), tm.globalX(), 1.);
+ else if (side == 2)
+ h_hotcold[(layer + 2) + (layer - 13)]->Fill(-tm.globalY(), tm.globalX(), 1.);
}
}
- h_layer_vsBx[layer].fill(bunchCrossing, !badflag);
+ LogDebug("SiStripHitEfficiencyWorker")
+ << "layer " << layer << " vector index " << layer - 1 << " before filling h_layer_vsSmthg" << std::endl;
+ h_layer_vsBx[layer - 1].fill(bunchCrossing, !badflag);
if (addLumi_) {
- h_layer_vsLumi[layer].fill(instLumi, !badflag);
- h_layer_vsPU[layer].fill(PU, !badflag);
+ h_layer_vsLumi[layer - 1].fill(instLumi, !badflag);
+ h_layer_vsPU[layer - 1].fill(PU, !badflag);
}
if (addCommonMode_) {
- h_layer_vsCM[layer].fill(commonMode, !badflag);
+ h_layer_vsCM[layer - 1].fill(commonMode, !badflag);
}
h_goodLayer.fill(layerWithSide, !badflag);
@@ -909,6 +978,7 @@ void SiStripHitEfficiencyWorker::endJob() {
void SiStripHitEfficiencyWorker::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
+ desc.add("dqmDir", "AlCaReco/SiStripHitEfficiency");
desc.add("UseOnlyHighPurityTracks", true);
desc.add("cutOnTracks", false);
desc.add("useAllHitsFromTracksWithMissingHits", false);
diff --git a/Calibration/HcalAlCaRecoProducers/plugins/AlCaHcalHBHEMuonProducer.cc b/Calibration/HcalAlCaRecoProducers/plugins/AlCaHcalHBHEMuonProducer.cc
index bf7e654a0ea79..875f112db07c4 100644
--- a/Calibration/HcalAlCaRecoProducers/plugins/AlCaHcalHBHEMuonProducer.cc
+++ b/Calibration/HcalAlCaRecoProducers/plugins/AlCaHcalHBHEMuonProducer.cc
@@ -281,7 +281,8 @@ void AlCaHcalHBHEMuonProducer::produce(edm::Event& iEvent, const edm::EventSetup
const EcalSeverityLevelAlgo* sevlv = &iSetup.getData(tok_sevlv_);
const CaloTopology* caloTopology = &iSetup.getData(tok_topo_);
const HcalDbService* conditions = &iSetup.getData(tok_dbservice_);
- HcalRespCorrs* respCorrs = new HcalRespCorrs(*resp);
+ HcalRespCorrs respCorrsObj(*resp);
+ HcalRespCorrs* respCorrs = &respCorrsObj;
respCorrs->setTopo(theHBHETopology);
// Relevant blocks from iEvent
@@ -1014,7 +1015,8 @@ void AlCaHcalHBHEMuonProducer::beginRun(edm::Run const& iRun, edm::EventSetup co
const HcalRespCorrs* resp = &iSetup.getData(tok_respcorr0_);
const HcalTopology* theHBHETopology = &iSetup.getData(tok_htopo0_);
const CaloGeometry* geo = &iSetup.getData(tok_geom0_);
- HcalRespCorrs* respCorrs = new HcalRespCorrs(*resp);
+ HcalRespCorrs respCorrsObj(*resp);
+ HcalRespCorrs* respCorrs = &respCorrsObj;
respCorrs->setTopo(theHBHETopology);
// Write correction factors for all HB/HE events
diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_Output_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_Output_cff.py
index d1894e8c425b2..63e1b795fba73 100644
--- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_Output_cff.py
+++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_Output_cff.py
@@ -1,6 +1,6 @@
import FWCore.ParameterSet.Config as cms
-OutALCARECOPromptCalibProdSiPixelLorentzAngle_noDrop = cms.PSet(
+OutALCARECOPromptCalibProdSiPixelLA_noDrop = cms.PSet(
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('pathALCARECOPromptCalibProdSiPixelLorentzAngle')
),
@@ -9,5 +9,5 @@
'keep *_MEtoEDMConvertSiPixelLorentzAngle_*_*',
)
)
-OutALCARECOPromptCalibProdSiPixelLorentzAngle=OutALCARECOPromptCalibProdSiPixelLorentzAngle_noDrop.clone()
-OutALCARECOPromptCalibProdSiPixelLorentzAngle.outputCommands.insert(0, "drop *")
+OutALCARECOPromptCalibProdSiPixelLA=OutALCARECOPromptCalibProdSiPixelLA_noDrop.clone()
+OutALCARECOPromptCalibProdSiPixelLA.outputCommands.insert(0, "drop *")
diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripHitEfficiency_Output_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripHitEfficiency_Output_cff.py
index 155e27a69883e..05038baa1e583 100644
--- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripHitEfficiency_Output_cff.py
+++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripHitEfficiency_Output_cff.py
@@ -1,9 +1,9 @@
import FWCore.ParameterSet.Config as cms
-OutALCARECOPromptCalibProdSiStripHitEfficiency_noDrop = cms.PSet(
+OutALCARECOPromptCalibProdSiStripHitEff_noDrop = cms.PSet(
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('pathALCARECOPromptCalibProdSiStripHitEfficiency')),
outputCommands = cms.untracked.vstring('keep *_MEtoEDMConvertSiStripHitEff_*_*'))
-OutALCARECOPromptCalibProdSiStripHitEfficiency = OutALCARECOPromptCalibProdSiStripHitEfficiency_noDrop.clone()
-OutALCARECOPromptCalibProdSiStripHitEfficiency.outputCommands.insert(0, "drop *")
+OutALCARECOPromptCalibProdSiStripHitEff = OutALCARECOPromptCalibProdSiStripHitEff_noDrop.clone()
+OutALCARECOPromptCalibProdSiStripHitEff.outputCommands.insert(0, "drop *")
diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripHitEfficiency_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripHitEfficiency_cff.py
index 10a7204fda8aa..8c515b1c1e400 100644
--- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripHitEfficiency_cff.py
+++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripHitEfficiency_cff.py
@@ -47,6 +47,7 @@
# This is the module actually doing the calibration
from CalibTracker.SiStripHitEfficiency.siStripHitEfficiencyWorker_cfi import siStripHitEfficiencyWorker
ALCARECOSiStripHitEff = siStripHitEfficiencyWorker.clone(
+ dqmDir = "AlCaReco/SiStripHitEfficiency",
lumiScalers= "scalersRawToDigi",
addLumi = True,
commonMode = "siStripDigis:CommonMode",
@@ -60,8 +61,8 @@
Layer = 0, # =0 means do all layers
Debug = True,
# do not cut on the total number of tracks
- cutOnTracks = True,
- trackMultiplicity = 100,
+ cutOnTracks = False,
+ trackMultiplicity = 1000,
# use or not first and last measurement of a trajectory (biases), default is false
useFirstMeas = False,
useLastMeas = False,
diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalCosmicsNano_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalCosmicsNano_cff.py
index 59cb4c8ac3789..833d6ec195bb3 100644
--- a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalCosmicsNano_cff.py
+++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalCosmicsNano_cff.py
@@ -13,6 +13,16 @@
throw=cms.bool(False)
)
+# Select only events where tracker had HV on (according to DCS bit information)
+# AND respective partition is in the run (according to FED information)
+import CalibTracker.SiStripCommon.SiStripDCSFilter_cfi
+DCSStatusForSiStripCalCosmicsNano = CalibTracker.SiStripCommon.SiStripDCSFilter_cfi.siStripDCSFilter.clone(
+ DetectorType = cms.vstring('TIBTID','TOB','TECp','TECm'),
+ ApplyFilter = cms.bool(True),
+ AndOr = cms.bool(True),
+ DebugOn = cms.untracked.bool(False)
+ )
+
from CalibTracker.Configuration.Filter_Refit_cff import CalibrationTracks, CalibrationTracksRefit, MeasurementTrackerEvent, offlineBeamSpot
ALCARECOSiStripCalCosmicsNanoCalibTracks = CalibrationTracks.clone(src=cms.InputTag("ALCARECOSiStripCalCosmics"))
@@ -23,6 +33,7 @@
ALCARECOSiStripCalCosmicsNanoTkCalSeq = cms.Sequence(
ALCARECOSiStripCalCosmicsNanoPrescale*
ALCARECOSiStripCalCosmicsNanoHLT*
+ DCSStatusForSiStripCalCosmicsNano*
ALCARECOSiStripCalCosmicsNanoCalibTracks,
cms.Task(MeasurementTrackerEvent),
cms.Task(offlineBeamSpot),
diff --git a/Calibration/TkAlCaRecoProducers/python/AlcaSiStripHitEfficiencyHarvester_cfi.py b/Calibration/TkAlCaRecoProducers/python/AlcaSiStripHitEfficiencyHarvester_cfi.py
index b3658de6db6ff..8ee2e8659a87d 100644
--- a/Calibration/TkAlCaRecoProducers/python/AlcaSiStripHitEfficiencyHarvester_cfi.py
+++ b/Calibration/TkAlCaRecoProducers/python/AlcaSiStripHitEfficiencyHarvester_cfi.py
@@ -1,8 +1,12 @@
+import copy
import FWCore.ParameterSet.Config as cms
from DQM.SiStripCommon.TkHistoMap_cff import *
from CalibTracker.SiStripHitEfficiency.siStripHitEfficiencyHarvester_cfi import siStripHitEfficiencyHarvester
+from Calibration.TkAlCaRecoProducers.ALCARECOPromptCalibProdSiStripHitEfficiency_cff import ALCARECOSiStripHitEff
+
alcasiStripHitEfficiencyHarvester = siStripHitEfficiencyHarvester.clone(
+ inputFolder = copy.copy(ALCARECOSiStripHitEff.dqmDir), # make sure the harvester is always in synch with worker
isAtPCL = True,
Threshold = 0.1,
nModsMin = 5,
diff --git a/CommonTools/MVAUtils/bin/convertXMLToGBRForestROOT.cc b/CommonTools/MVAUtils/bin/convertXMLToGBRForestROOT.cc
index 3c7c9f5805fd7..9b24826adaf8a 100644
--- a/CommonTools/MVAUtils/bin/convertXMLToGBRForestROOT.cc
+++ b/CommonTools/MVAUtils/bin/convertXMLToGBRForestROOT.cc
@@ -1,6 +1,7 @@
#include "CommonTools/MVAUtils/interface/GBRForestTools.h"
#include "TFile.h"
+#include "TTree.h"
#include
#include
@@ -24,10 +25,15 @@ int main(int argc, char **argv) {
return 1;
}
- auto gbrForest = createGBRForest(inputFileName);
+ std::vector variableNames;
+ auto gbrForest = createGBRForest(inputFileName, variableNames);
std::cout << "Read GBRForest " << inputFileName << " successfully." << std::endl;
- TFile{outputFileName, "RECREATE"}.WriteObject(gbrForest.get(), "gbrForest");
+ {
+ TFile f{outputFileName, "RECREATE"};
+ f.WriteObject(gbrForest.get(), "gbrForest");
+ f.WriteObject(&variableNames, "variableNames");
+ }
std::cout << "GBRForest written to " << outputFileName << " successfully." << std::endl;
return 0;
diff --git a/CommonTools/MVAUtils/src/GBRForestTools.cc b/CommonTools/MVAUtils/src/GBRForestTools.cc
index f61390d41996c..c8316920a0247 100644
--- a/CommonTools/MVAUtils/src/GBRForestTools.cc
+++ b/CommonTools/MVAUtils/src/GBRForestTools.cc
@@ -126,7 +126,11 @@ namespace {
if (reco::details::hasEnding(weightsFileFullPath, ".root")) {
TFile gbrForestFile(weightsFileFullPath.c_str());
std::unique_ptr up(gbrForestFile.Get("gbrForest"));
+ std::unique_ptr> vars(gbrForestFile.Get>("variableNames"));
gbrForestFile.Close("nodelete");
+ if (vars) {
+ varNames = std::move(*vars);
+ }
return up;
}
diff --git a/CondCore/CondDB/test/condTestRegression.py b/CondCore/CondDB/test/condTestRegression.py
index 9a3492920f77a..54d546f7cd9ef 100755
--- a/CondCore/CondDB/test/condTestRegression.py
+++ b/CondCore/CondDB/test/condTestRegression.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import print_function
import sys, os
@@ -30,6 +30,8 @@
'CMSSW_7_6_6' : [ ('slc6_amd64_gcc493', 'ref750-s6493.db')]
}
+os2image_overrides = {"slc7": "cc7"}
+
def check_output(*popenargs, **kwargs):
'''Mimics subprocess.check_output() in Python 2.6
'''
@@ -152,6 +154,15 @@ def run(self, rel, arch, readOrWrite, dbName):
cmd += "echo 'CMSSW_BASE='$CMSSW_BASE; echo 'RELEASE_BASE='$RELEASE_BASE; echo 'PATH='$PATH; echo 'LD_LIBRARY_PATH='$LD_LIBRARY_PATH;"
cmd += '$LOCALRT/test/%s/testReadWritePayloads %s sqlite_file:///%s/%s ' % (arch, readOrWrite, self.dbDir, dbName)
+ cur_os = os.environ['SCRAM_ARCH'].split("_")[0]
+ rel_os = arch.split("_")[0]
+ if cur_os in os2image_overrides: cur_os = os2image_overrides[cur_os]
+ if rel_os in os2image_overrides: rel_os = os2image_overrides[rel_os]
+ if rel_os != cur_os:
+ run_script = "%s/run_condTestRegression.sh" % self.topDir
+ check_output("echo '%s' > %s; chmod +x %s" % (cmd, run_script, run_script), shell=True, universal_newlines=True, env={}, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ cmd = "%s/common/cmssw-env --cmsos %s -- %s" % (cmsPath, rel_os, run_script)
+ print("Running:",cmd)
try:
#opening a process with a clean environment ( to avoid to inherit scram variables )
res = check_output(cmd, shell=True, universal_newlines=True, env={}, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
diff --git a/CondCore/PCLConfigPlugins/src/plugin.cc b/CondCore/PCLConfigPlugins/src/plugin.cc
index b9ad38cad20c1..e98e68b914075 100644
--- a/CondCore/PCLConfigPlugins/src/plugin.cc
+++ b/CondCore/PCLConfigPlugins/src/plugin.cc
@@ -1,5 +1,8 @@
#include "CondCore/ESSources/interface/registration_macros.h"
#include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h"
+#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h"
#include "CondFormats/DataRecord/interface/AlignPCLThresholdsRcd.h"
+#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h"
REGISTER_PLUGIN(AlignPCLThresholdsRcd, AlignPCLThresholds);
+REGISTER_PLUGIN(AlignPCLThresholdsHGRcd, AlignPCLThresholdsHG);
diff --git a/CondCore/Utilities/plugins/Module_2XML.cc b/CondCore/Utilities/plugins/Module_2XML.cc
index 34b02814b32b7..0e99a897e891b 100644
--- a/CondCore/Utilities/plugins/Module_2XML.cc
+++ b/CondCore/Utilities/plugins/Module_2XML.cc
@@ -5,6 +5,7 @@ PAYLOAD_2XML_MODULE(pluginUtilities_payload2xml) {
m.def("boost_version_label", &cond::boost_version_label, "Get boost version for this release");
PAYLOAD_2XML_CLASS(AlCaRecoTriggerBits);
PAYLOAD_2XML_CLASS(AlignPCLThresholds);
+ PAYLOAD_2XML_CLASS(AlignPCLThresholdsHG);
PAYLOAD_2XML_CLASS(AlignmentErrors);
PAYLOAD_2XML_CLASS(AlignmentErrorsExtended);
PAYLOAD_2XML_CLASS(AlignmentSurfaceDeformations);
diff --git a/CondCore/Utilities/scripts/conddb b/CondCore/Utilities/scripts/conddb
index 6a27b3c49fc77..862209888895a 100755
--- a/CondCore/Utilities/scripts/conddb
+++ b/CondCore/Utilities/scripts/conddb
@@ -395,7 +395,10 @@ def output(args, string, *parameters, **kwargs):
output_file = kwargs.get('output_file', sys.stdout)
- print(string % parameters + colors.end, end=' ', file=output_file)
+ to_print = string + colors.end
+ if len(parameters)>0:
+ to_print = string % parameters + colors.end
+ print(to_print, end=' ', file=output_file)
if kwargs.get('newline', True):
print(file=output_file)
diff --git a/CondCore/Utilities/src/CondDBFetch.cc b/CondCore/Utilities/src/CondDBFetch.cc
index b7f2885ed9b2f..10b7e3a15436c 100644
--- a/CondCore/Utilities/src/CondDBFetch.cc
+++ b/CondCore/Utilities/src/CondDBFetch.cc
@@ -33,6 +33,7 @@ namespace cond {
FETCH_PAYLOAD_CASE(AlignmentSurfaceDeformations)
FETCH_PAYLOAD_CASE(Alignments)
FETCH_PAYLOAD_CASE(AlignPCLThresholds)
+ FETCH_PAYLOAD_CASE(AlignPCLThresholdsHG)
FETCH_PAYLOAD_CASE(BeamSpotObjects)
FETCH_PAYLOAD_CASE(BeamSpotOnlineObjects)
FETCH_PAYLOAD_CASE(CSCBadChambers)
diff --git a/CondCore/Utilities/src/CondDBImport.cc b/CondCore/Utilities/src/CondDBImport.cc
index 6f2e371abce4e..94262be2d9e61 100644
--- a/CondCore/Utilities/src/CondDBImport.cc
+++ b/CondCore/Utilities/src/CondDBImport.cc
@@ -53,6 +53,7 @@ namespace cond {
IMPORT_PAYLOAD_CASE(AlignmentSurfaceDeformations)
IMPORT_PAYLOAD_CASE(Alignments)
IMPORT_PAYLOAD_CASE(AlignPCLThresholds)
+ IMPORT_PAYLOAD_CASE(AlignPCLThresholdsHG)
IMPORT_PAYLOAD_CASE(BeamSpotObjects)
IMPORT_PAYLOAD_CASE(BeamSpotOnlineObjects)
IMPORT_PAYLOAD_CASE(CSCBadChambers)
diff --git a/CondCore/Utilities/src/CondFormats.h b/CondCore/Utilities/src/CondFormats.h
index 97afa8c3b3464..38e8e8273909f 100644
--- a/CondCore/Utilities/src/CondFormats.h
+++ b/CondCore/Utilities/src/CondFormats.h
@@ -279,6 +279,7 @@
#include "CondFormats/BTauObjects/interface/TrackProbabilityCalibration.h"
#include "CondFormats/MFObjects/interface/MagFieldConfig.h"
#include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h"
+#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h"
#include "CondFormats/SiPhase2TrackerObjects/interface/TrackerDetToDTCELinkCablingMap.h"
#include "CondFormats/SiPhase2TrackerObjects/interface/SiPhase2OuterTrackerLorentzAngle.h"
#include "CondFormats/SiPhase2TrackerObjects/interface/DTCELinkId.h"
diff --git a/CondCore/Utilities/src/PayloadInspector.cc b/CondCore/Utilities/src/PayloadInspector.cc
index 82116f7501f79..0bc7ab0ea2b0a 100644
--- a/CondCore/Utilities/src/PayloadInspector.cc
+++ b/CondCore/Utilities/src/PayloadInspector.cc
@@ -101,7 +101,7 @@ namespace cond {
pSet.addParameter("@service_type", std::string("SiteLocalConfigService"));
psets.push_back(pSet);
static const edm::ServiceToken services(edm::ServiceRegistry::createSet(psets));
- static const edm::ServiceRegistry::Operate operate(services);
+ const edm::ServiceRegistry::Operate operate(services);
bool ret = false;
size_t nt = tagsWithTimeBoundaries.size();
if (nt) {
diff --git a/CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h b/CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h
new file mode 100644
index 0000000000000..0e7761fdfca5e
--- /dev/null
+++ b/CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h
@@ -0,0 +1,8 @@
+#ifndef AlignPCLThresholdsRcd_AlignPCLThresholdsHGRcd_h
+#define AlignPCLThresholdsRcd_AlignPCLThresholdsHGRcd_h
+
+#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"
+
+class AlignPCLThresholdsHGRcd : public edm::eventsetup::EventSetupRecordImplementation {};
+
+#endif
diff --git a/CondFormats/DataRecord/src/AlignPCLThresholdsHGRcd.cc b/CondFormats/DataRecord/src/AlignPCLThresholdsHGRcd.cc
new file mode 100644
index 0000000000000..78c8ab331baa1
--- /dev/null
+++ b/CondFormats/DataRecord/src/AlignPCLThresholdsHGRcd.cc
@@ -0,0 +1,4 @@
+#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h"
+#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"
+
+EVENTSETUP_RECORD_REG(AlignPCLThresholdsHGRcd);
diff --git a/CondFormats/EcalCorrections/src/EcalGlobalShowerContainmentCorrectionsVsEta.cc b/CondFormats/EcalCorrections/src/EcalGlobalShowerContainmentCorrectionsVsEta.cc
index 0dc7458205cde..2c297bc8bf3b7 100644
--- a/CondFormats/EcalCorrections/src/EcalGlobalShowerContainmentCorrectionsVsEta.cc
+++ b/CondFormats/EcalCorrections/src/EcalGlobalShowerContainmentCorrectionsVsEta.cc
@@ -21,11 +21,6 @@ void EcalGlobalShowerContainmentCorrectionsVsEta::fillCorrectionCoefficients(con
const double EcalGlobalShowerContainmentCorrectionsVsEta::correction(
const DetId& xtal, EcalGlobalShowerContainmentCorrectionsVsEta::Type type) const {
if (xtal.det() == DetId::Ecal && xtal.subdetId() == EcalBarrel) {
- int offset = 0;
-
- if (type == e5x5)
- offset += Coefficients::kCoefficients;
-
double corr = 0;
if (EBDetId(xtal).ieta() < coefficients_.data[0])
diff --git a/CondFormats/GEMObjects/interface/GEMChMap.h b/CondFormats/GEMObjects/interface/GEMChMap.h
index 5c83612223289..453060e82e146 100644
--- a/CondFormats/GEMObjects/interface/GEMChMap.h
+++ b/CondFormats/GEMObjects/interface/GEMChMap.h
@@ -139,7 +139,7 @@ class GEMChMap {
const std::vector getVfats(const int type) const { return chamVfats_.at(type); }
void add(int type, uint16_t d) {
- if (std::find(chamVfats_[type].begin(), chamVfats_[type].end(), d) != chamVfats_[type].end())
+ if (std::find(chamVfats_[type].begin(), chamVfats_[type].end(), d) == chamVfats_[type].end())
chamVfats_[type].push_back(d);
}
@@ -147,7 +147,7 @@ class GEMChMap {
return chamIEtas_.at({chamberType, vfatAdd});
}
void add(vfatEC d, int iEta) {
- if (std::find(chamIEtas_[d].begin(), chamIEtas_[d].end(), iEta) != chamIEtas_[d].end())
+ if (std::find(chamIEtas_[d].begin(), chamIEtas_[d].end(), iEta) == chamIEtas_[d].end())
chamIEtas_[d].push_back(iEta);
}
diff --git a/CondFormats/PCLConfig/interface/AlignPCLThreshold.h b/CondFormats/PCLConfig/interface/AlignPCLThreshold.h
index 18ff194848ca5..62a4654a1b630 100644
--- a/CondFormats/PCLConfig/interface/AlignPCLThreshold.h
+++ b/CondFormats/PCLConfig/interface/AlignPCLThreshold.h
@@ -2,6 +2,7 @@
#define CondFormats_PCLConfig_AlignPCLThreshold_h
#include "CondFormats/Serialization/interface/Serializable.h"
+#include
class AlignPCLThreshold {
public:
diff --git a/CondFormats/PCLConfig/interface/AlignPCLThresholds.h b/CondFormats/PCLConfig/interface/AlignPCLThresholds.h
index 9ab1045f6e5d7..c62c52bdc0b76 100644
--- a/CondFormats/PCLConfig/interface/AlignPCLThresholds.h
+++ b/CondFormats/PCLConfig/interface/AlignPCLThresholds.h
@@ -4,6 +4,7 @@
#include "CondFormats/PCLConfig/interface/AlignPCLThreshold.h"
#include "CondFormats/Serialization/interface/Serializable.h"
+#include
#include