diff --git a/Alignment/APEEstimation/interface/TrackerSectorStruct.h b/Alignment/APEEstimation/interface/TrackerSectorStruct.h index eeab8005ebf1b..ee36a999d913a 100644 --- a/Alignment/APEEstimation/interface/TrackerSectorStruct.h +++ b/Alignment/APEEstimation/interface/TrackerSectorStruct.h @@ -212,8 +212,8 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString const std::string &o(options); CorrelationHists correlationHists; - if (!(o.find("n") != std::string::npos || o.find("p") != std::string::npos || o.find("h") != std::string::npos || - o.find("t") != std::string::npos || o.find("r") != std::string::npos)) + if (!(o.find('n') != std::string::npos || o.find('p') != std::string::npos || o.find('h') != std::string::npos || + o.find('t') != std::string::npos || o.find('r') != std::string::npos)) return correlationHists; TFileDirectory *directory(directory_); @@ -228,7 +228,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString minBinX, maxBinX); - if (options.find("n") != std::string::npos) + if (options.find('n') != std::string::npos) correlationHists.NorResXVsVar = directory->make("h2_norRes" + xY + "Vs" + varName, "r_{" + xy + "}/#sigma_{r," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + @@ -239,7 +239,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 25, -norResXMax, norResXMax); - if (options.find("p") != std::string::npos) + if (options.find('p') != std::string::npos) correlationHists.ProbXVsVar = directory->make("h2_prob" + xY + "Vs" + varName, "prob_{" + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";prob_{" + xy + "}", @@ -249,7 +249,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 60, -0.1, 1.1); - if (options.find("h") != std::string::npos) + if (options.find('h') != std::string::npos) correlationHists.SigmaXHitVsVar = directory->make( "h2_sigma" + xY + "HitVs" + varName, "#sigma_{hit," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{hit," + xy + "} [#mum]", @@ -259,7 +259,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 50, 0 * 10000., sigmaXHitMax * 10000.); - if (options.find("t") != std::string::npos) + if (options.find('t') != std::string::npos) correlationHists.SigmaXTrkVsVar = directory->make( "h2_sigma" + xY + "TrkVs" + varName, "#sigma_{trk," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{trk," + xy + "} [#mum]", @@ -269,7 +269,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 50, 0 * 10000., sigmaXMax * 10000.); - if (options.find("r") != std::string::npos) + if (options.find('r') != std::string::npos) correlationHists.SigmaXVsVar = directory->make( "h2_sigma" + xY + "Vs" + varName, "#sigma_{r," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{r," + xy + "} [#mum]", @@ -280,7 +280,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 0 * 10000., sigmaXMax * 10000.); - if (options.find("n") != std::string::npos) + if (options.find('n') != std::string::npos) correlationHists.PNorResXVsVar = directory->make("p_norRes" + xY + "Vs" + varName, "r_{" + xy + "}/#sigma_{r," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + @@ -289,7 +289,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString minBinX, maxBinX, "s"); - if (options.find("p") != std::string::npos) + if (options.find('p') != std::string::npos) correlationHists.PProbXVsVar = directory->make( "p_prob" + xY + "Vs" + varName, "prob_{" + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";prob_{" + xy + "}", @@ -297,21 +297,21 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString minBinX, maxBinX, "s"); - if (options.find("h") != std::string::npos) + if (options.find('h') != std::string::npos) correlationHists.PSigmaXHitVsVar = directory->make( "p_sigma" + xY + "HitVs" + varName, "#sigma_{hit," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{hit," + xy + "} [#mum]", nBinX2D, minBinX, maxBinX); - if (options.find("t") != std::string::npos) + if (options.find('t') != std::string::npos) correlationHists.PSigmaXTrkVsVar = directory->make( "p_sigma" + xY + "TrkVs" + varName, "#sigma_{trk," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{trk," + xy + "} [#mum]", nBinX2D, minBinX, maxBinX); - if (options.find("r") != std::string::npos) + if (options.find('r') != std::string::npos) correlationHists.PSigmaXVsVar = directory->make( "p_sigma" + xY + "Vs" + varName, "#sigma_{r," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{r," + xy + "} [#mum]", @@ -349,8 +349,8 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString const std::string &o(options); CorrelationHists correlationHists; - if (!(o.find("n") != std::string::npos || o.find("p") != std::string::npos || o.find("h") != std::string::npos || - o.find("t") != std::string::npos || o.find("r") != std::string::npos)) + if (!(o.find('n') != std::string::npos || o.find('p') != std::string::npos || o.find('h') != std::string::npos || + o.find('t') != std::string::npos || o.find('r') != std::string::npos)) return correlationHists; TFileDirectory *directory(directory_); @@ -359,7 +359,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString if (!directory) return correlationHists; - if (options.find("n") != std::string::npos) + if (options.find('n') != std::string::npos) correlationHists.NorResXVsVar = directory->make("h2_norRes" + xY + "Vs" + varName, "r_{" + xy + "}/#sigma_{r," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + @@ -370,7 +370,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 25, -norResXMax, norResXMax); - if (options.find("p") != std::string::npos) + if (options.find('p') != std::string::npos) correlationHists.ProbXVsVar = directory->make("h2_prob" + xY + "Vs" + varName, "prob_{" + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";prob_{" + xy + "}", @@ -380,7 +380,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 60, -0.1, 1.1); - if (options.find("h") != std::string::npos) + if (options.find('h') != std::string::npos) correlationHists.SigmaXHitVsVar = directory->make( "h2_sigma" + xY + "HitVs" + varName, "#sigma_{hit," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{hit," + xy + "} [#mum]", @@ -390,7 +390,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 50, 0 * 10000., sigmaXHitMax * 10000.); - if (options.find("t") != std::string::npos) + if (options.find('t') != std::string::npos) correlationHists.SigmaXTrkVsVar = directory->make( "h2_sigma" + xY + "TrkVs" + varName, "#sigma_{trk," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{trk," + xy + "} [#mum]", @@ -400,7 +400,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 50, 0 * 10000., sigmaXMax * 10000.); - if (options.find("r") != std::string::npos) + if (options.find('r') != std::string::npos) correlationHists.SigmaXVsVar = directory->make( "h2_sigma" + xY + "Vs" + varName, "#sigma_{r," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{r," + xy + "} [#mum]", @@ -411,7 +411,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString 0 * 10000., sigmaXMax * 10000.); - if (options.find("n") != std::string::npos) + if (options.find('n') != std::string::npos) correlationHists.PNorResXVsVar = directory->make("p_norRes" + xY + "Vs" + varName, "r_{" + xy + "}/#sigma_{r," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + @@ -420,7 +420,7 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString minBinX, maxBinX, "s"); - if (options.find("p") != std::string::npos) + if (options.find('p') != std::string::npos) correlationHists.PProbXVsVar = directory->make( "p_prob" + xY + "Vs" + varName, "prob_{" + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";prob_{" + xy + "}", @@ -428,21 +428,21 @@ TrackerSectorStruct::CorrelationHists TrackerSectorStruct::bookCorrHists(TString minBinX, maxBinX, "s"); - if (options.find("h") != std::string::npos) + if (options.find('h') != std::string::npos) correlationHists.PSigmaXHitVsVar = directory->make( "p_sigma" + xY + "HitVs" + varName, "#sigma_{hit," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{hit," + xy + "} [#mum]", nBinX, minBinX, maxBinX); - if (options.find("t") != std::string::npos) + if (options.find('t') != std::string::npos) correlationHists.PSigmaXTrkVsVar = directory->make( "p_sigma" + xY + "TrkVs" + varName, "#sigma_{trk," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{trk," + xy + "} [#mum]", nBinX, minBinX, maxBinX); - if (options.find("r") != std::string::npos) + if (options.find('r') != std::string::npos) correlationHists.PSigmaXVsVar = directory->make( "p_sigma" + xY + "Vs" + varName, "#sigma_{r," + xy + "} vs. " + labelX + ";" + labelX + " " + unitX + ";#sigma_{r," + xy + "} [#mum]", diff --git a/Alignment/CommonAlignment/src/AlignableObjectId.cc b/Alignment/CommonAlignment/src/AlignableObjectId.cc index a2f4ae904db84..b74e24f1aec91 100644 --- a/Alignment/CommonAlignment/src/AlignableObjectId.cc +++ b/Alignment/CommonAlignment/src/AlignableObjectId.cc @@ -225,8 +225,9 @@ namespace { } constexpr enum align::StructureType stringToObjectId(char const *name, AlignableObjectId::entry const *entries) { - return !entries->name ? align::invalid - : same(entries->name, name) ? entries->type : stringToObjectId(name, entries + 1); + return !entries->name ? align::invalid + : same(entries->name, name) ? entries->type + : stringToObjectId(name, entries + 1); } } // namespace diff --git a/Alignment/MillePedeAlignmentAlgorithm/scripts/mps_alisetup.py b/Alignment/MillePedeAlignmentAlgorithm/scripts/mps_alisetup.py index 02baba149d8e6..d7aafc93d6c93 100755 --- a/Alignment/MillePedeAlignmentAlgorithm/scripts/mps_alisetup.py +++ b/Alignment/MillePedeAlignmentAlgorithm/scripts/mps_alisetup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import os diff --git a/Alignment/OfflineValidation/plugins/BuildFile.xml b/Alignment/OfflineValidation/plugins/BuildFile.xml index d4a5090ea8a50..9a516c4315241 100644 --- a/Alignment/OfflineValidation/plugins/BuildFile.xml +++ b/Alignment/OfflineValidation/plugins/BuildFile.xml @@ -10,6 +10,7 @@ + diff --git a/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py b/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py index b06f58ab7868f..edfbf5a2fa6d5 100644 --- a/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py +++ b/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py @@ -56,7 +56,7 @@ def best_match(rcd): "seed number") options.register ('myfile', - 'root://cms-xrd-global.cern.ch//store/relval/CMSSW_10_6_1/RelValZMM_13/GEN-SIM-RECO/PU25ns_106X_mc2017_realistic_v6_HS-v1/10000/44690279-DDF3-0D43-B92D-F5CB57EF7E6A.root', # default value + '/store/relval/CMSSW_10_6_1/RelValZMM_13/GEN-SIM-RECO/PU25ns_106X_mc2017_realistic_v6_HS-v1/10000/44690279-DDF3-0D43-B92D-F5CB57EF7E6A.root', # default value VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "file name") diff --git a/Alignment/OfflineValidation/test/submitAllJobs.py b/Alignment/OfflineValidation/test/submitAllJobs.py index 830922c1f3153..67ea198218f00 100644 --- a/Alignment/OfflineValidation/test/submitAllJobs.py +++ b/Alignment/OfflineValidation/test/submitAllJobs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 '''Script that submits CMS Tracker Alignment Primary Vertex Validation workflows ''' diff --git a/CalibCalorimetry/CastorCalib/src/CastorDbASCIIIO.cc b/CalibCalorimetry/CastorCalib/src/CastorDbASCIIIO.cc index 366e77e4a1809..9c50af5691026 100644 --- a/CalibCalorimetry/CastorCalib/src/CastorDbASCIIIO.cc +++ b/CalibCalorimetry/CastorCalib/src/CastorDbASCIIIO.cc @@ -24,11 +24,10 @@ namespace CastorDbASCIIIO { if (first.isHcalDetId()) { HcalDetId f1(first); HcalDetId s1(second); - return f1.zside() != s1.zside() - ? f1.zside() < s1.zside() - : f1.iphi() != s1.iphi() - ? f1.iphi() < s1.iphi() - : f1.ietaAbs() != s1.ietaAbs() ? f1.ietaAbs() < s1.ietaAbs() : f1.depth() < s1.depth(); + return f1.zside() != s1.zside() ? f1.zside() < s1.zside() + : f1.iphi() != s1.iphi() ? f1.iphi() < s1.iphi() + : f1.ietaAbs() != s1.ietaAbs() ? f1.ietaAbs() < s1.ietaAbs() + : f1.depth() < s1.depth(); } else { return first.rawId() < second.rawId(); } @@ -39,12 +38,10 @@ namespace CastorDbASCIIIO { bool operator()(CastorElectronicsId first, CastorElectronicsId second) const { return first.readoutVMECrateId() != second.readoutVMECrateId() ? first.readoutVMECrateId() < second.readoutVMECrateId() - : first.htrSlot() != second.htrSlot() - ? first.htrSlot() < second.htrSlot() - : first.htrTopBottom() != second.htrTopBottom() - ? first.htrTopBottom() < second.htrTopBottom() - : first.fiberIndex() != second.fiberIndex() ? first.fiberIndex() < second.fiberIndex() - : first.fiberChanId() < second.fiberChanId(); + : first.htrSlot() != second.htrSlot() ? first.htrSlot() < second.htrSlot() + : first.htrTopBottom() != second.htrTopBottom() ? first.htrTopBottom() < second.htrTopBottom() + : first.fiberIndex() != second.fiberIndex() ? first.fiberIndex() < second.fiberIndex() + : first.fiberChanId() < second.fiberChanId(); } }; diff --git a/CalibCalorimetry/HcalAlgos/src/HcalDbASCIIIO.cc b/CalibCalorimetry/HcalAlgos/src/HcalDbASCIIIO.cc index 4c0e485b50505..d07e1d1cdeef4 100644 --- a/CalibCalorimetry/HcalAlgos/src/HcalDbASCIIIO.cc +++ b/CalibCalorimetry/HcalAlgos/src/HcalDbASCIIIO.cc @@ -28,11 +28,10 @@ namespace { if (first.isHcalDetId()) { HcalDetId f1(first); HcalDetId s1(second); - return f1.zside() != s1.zside() - ? f1.zside() < s1.zside() - : f1.iphi() != s1.iphi() - ? f1.iphi() < s1.iphi() - : f1.ietaAbs() != s1.ietaAbs() ? f1.ietaAbs() < s1.ietaAbs() : f1.depth() < s1.depth(); + return f1.zside() != s1.zside() ? f1.zside() < s1.zside() + : f1.iphi() != s1.iphi() ? f1.iphi() < s1.iphi() + : f1.ietaAbs() != s1.ietaAbs() ? f1.ietaAbs() < s1.ietaAbs() + : f1.depth() < s1.depth(); } else { return first.rawId() < second.rawId(); } @@ -43,12 +42,10 @@ namespace { bool operator()(HcalElectronicsId first, HcalElectronicsId second) const { return first.readoutVMECrateId() != second.readoutVMECrateId() ? first.readoutVMECrateId() < second.readoutVMECrateId() - : first.htrSlot() != second.htrSlot() - ? first.htrSlot() < second.htrSlot() - : first.htrTopBottom() != second.htrTopBottom() - ? first.htrTopBottom() < second.htrTopBottom() - : first.fiberIndex() != second.fiberIndex() ? first.fiberIndex() < second.fiberIndex() - : first.fiberChanId() < second.fiberChanId(); + : first.htrSlot() != second.htrSlot() ? first.htrSlot() < second.htrSlot() + : first.htrTopBottom() != second.htrTopBottom() ? first.htrTopBottom() < second.htrTopBottom() + : first.fiberIndex() != second.fiberIndex() ? first.fiberIndex() < second.fiberIndex() + : first.fiberChanId() < second.fiberChanId(); } }; } // namespace diff --git a/CalibCalorimetry/HcalAlgos/src/HcalLedAnalysis.cc b/CalibCalorimetry/HcalAlgos/src/HcalLedAnalysis.cc index b865ed04a6c84..ec2177eeeff15 100644 --- a/CalibCalorimetry/HcalAlgos/src/HcalLedAnalysis.cc +++ b/CalibCalorimetry/HcalAlgos/src/HcalLedAnalysis.cc @@ -1003,13 +1003,11 @@ void HcalLedAnalysis::ProcessCalibEvent(int fiberChan, HcalCalibDetId calibId, c char name[1024]; std::string prefix; if (calibId.calibFlavor() == HcalCalibDetId::CalibrationBox) { - std::string sector = (calibId.hcalSubdet() == HcalBarrel) - ? ("HB") - : (calibId.hcalSubdet() == HcalEndcap) - ? ("HE") - : (calibId.hcalSubdet() == HcalOuter) - ? ("HO") - : (calibId.hcalSubdet() == HcalForward) ? ("HF") : ""; + std::string sector = (calibId.hcalSubdet() == HcalBarrel) ? ("HB") + : (calibId.hcalSubdet() == HcalEndcap) ? ("HE") + : (calibId.hcalSubdet() == HcalOuter) ? ("HO") + : (calibId.hcalSubdet() == HcalForward) ? ("HF") + : ""; snprintf(name, sizeof name, "%s %+d iphi=%d %s", diff --git a/CalibFormats/CastorObjects/interface/CastorDbService.h b/CalibFormats/CastorObjects/interface/CastorDbService.h index 2a1b78fdac673..3e58cebf6cd53 100644 --- a/CalibFormats/CastorObjects/interface/CastorDbService.h +++ b/CalibFormats/CastorObjects/interface/CastorDbService.h @@ -17,9 +17,6 @@ #include "CalibFormats/CastorObjects/interface/CastorCalibrationsSet.h" #include "CalibFormats/CastorObjects/interface/CastorCalibrationWidthsSet.h" -#include "FWCore/Framework/interface/ModuleFactory.h" -#include "FWCore/Framework/interface/ESProducer.h" - #include "CondFormats/CastorObjects/interface/AllObjects.h" class CastorCalibrations; diff --git a/CalibFormats/CastorObjects/src/CastorText2DetIdConverter.cc b/CalibFormats/CastorObjects/src/CastorText2DetIdConverter.cc index 3a18bedd5523f..e83f20b87c4a6 100644 --- a/CalibFormats/CastorObjects/src/CastorText2DetIdConverter.cc +++ b/CalibFormats/CastorObjects/src/CastorText2DetIdConverter.cc @@ -85,9 +85,9 @@ bool CastorText2DetIdConverter::init(const std::string& fFlavor, field2 = strip(fField2); field3 = strip(fField3); if (flavorName.find("CASTOR_") == 0) { - HcalCastorDetId::Section section = - flavorName == "CASTOR_EM" ? HcalCastorDetId::EM - : flavorName == "CASTOR_HAD" ? HcalCastorDetId::HAD : HcalCastorDetId::Unknown; + HcalCastorDetId::Section section = flavorName == "CASTOR_EM" ? HcalCastorDetId::EM + : flavorName == "CASTOR_HAD" ? HcalCastorDetId::HAD + : HcalCastorDetId::Unknown; mId = HcalCastorDetId(section, getField(1) > 0, getField(2), getField(3)); } diff --git a/CalibFormats/HcalObjects/interface/HcalDbService.h b/CalibFormats/HcalObjects/interface/HcalDbService.h index a8c5f341961c4..1a3e5889ede9d 100644 --- a/CalibFormats/HcalObjects/interface/HcalDbService.h +++ b/CalibFormats/HcalObjects/interface/HcalDbService.h @@ -14,9 +14,6 @@ #include "CalibFormats/HcalObjects/interface/HcalCalibrationsSet.h" #include "CalibFormats/HcalObjects/interface/HcalCalibrationWidthsSet.h" -#include "FWCore/Framework/interface/ModuleFactory.h" -#include "FWCore/Framework/interface/ESProducer.h" - #include "CondFormats/HcalObjects/interface/AllObjects.h" class HcalCalibrations; diff --git a/CalibFormats/HcalObjects/src/HcalText2DetIdConverter.cc b/CalibFormats/HcalObjects/src/HcalText2DetIdConverter.cc index afd18bf36770e..086e55b32dc48 100644 --- a/CalibFormats/HcalObjects/src/HcalText2DetIdConverter.cc +++ b/CalibFormats/HcalObjects/src/HcalText2DetIdConverter.cc @@ -26,17 +26,14 @@ namespace { } int calibChannel(const std::string& fName) { - return fName == "Mixer-High" - ? 1 - : fName == "Mixer-Low" - ? 2 - : fName == "Megatile" - ? 3 - : fName == "Mixer-Scintillator" - ? 4 - : fName == "RadDam1" - ? 5 - : fName == "RadDam2" ? 6 : fName == "RadDam3" ? 7 : atoi(fName.c_str()); + return fName == "Mixer-High" ? 1 + : fName == "Mixer-Low" ? 2 + : fName == "Megatile" ? 3 + : fName == "Mixer-Scintillator" ? 4 + : fName == "RadDam1" ? 5 + : fName == "RadDam2" ? 6 + : fName == "RadDam3" ? 7 + : atoi(fName.c_str()); // 0; } } // namespace @@ -73,13 +70,11 @@ bool HcalText2DetIdConverter::init(DetId fId) { flavorName = "NA"; } else if (genId.isHcalDetId()) { HcalDetId hcalId(mId); - flavorName = genId.genericSubdet() == HcalGenericDetId::HcalGenBarrel - ? "HB" - : genId.genericSubdet() == HcalGenericDetId::HcalGenEndcap - ? "HE" - : genId.genericSubdet() == HcalGenericDetId::HcalGenOuter - ? "HO" - : genId.genericSubdet() == HcalGenericDetId::HcalGenForward ? "HF" : "H_UNKNOWN"; + flavorName = genId.genericSubdet() == HcalGenericDetId::HcalGenBarrel ? "HB" + : genId.genericSubdet() == HcalGenericDetId::HcalGenEndcap ? "HE" + : genId.genericSubdet() == HcalGenericDetId::HcalGenOuter ? "HO" + : genId.genericSubdet() == HcalGenericDetId::HcalGenForward ? "HF" + : "H_UNKNOWN"; setField(1, hcalId.ieta()); setField(2, hcalId.iphi()); setField(3, hcalId.depth()); @@ -199,9 +194,10 @@ bool HcalText2DetIdConverter::init(const std::string& fFlavor, field2 = strip(fField2); field3 = strip(fField3); if (flavorName == "HB" || flavorName == "HE" || flavorName == "HF" || flavorName == "HO") { - HcalSubdetector sub = flavorName == "HB" - ? HcalBarrel - : flavorName == "HE" ? HcalEndcap : flavorName == "HO" ? HcalOuter : HcalForward; + HcalSubdetector sub = flavorName == "HB" ? HcalBarrel + : flavorName == "HE" ? HcalEndcap + : flavorName == "HO" ? HcalOuter + : HcalForward; mId = HcalDetId(sub, getField(1), getField(2), getField(3)); } else if (flavorName == "HT") { // We use the depth to signal the "version" being used (RCT or 1x1 HF). RCT diff --git a/CalibFormats/SiStripObjects/BuildFile.xml b/CalibFormats/SiStripObjects/BuildFile.xml index b6120ab636473..325f0aa1bcb9f 100644 --- a/CalibFormats/SiStripObjects/BuildFile.xml +++ b/CalibFormats/SiStripObjects/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/CalibFormats/SiStripObjects/interface/SiStripDetInfo.h b/CalibFormats/SiStripObjects/interface/SiStripDetInfo.h new file mode 100644 index 0000000000000..d9ab626dd12ef --- /dev/null +++ b/CalibFormats/SiStripObjects/interface/SiStripDetInfo.h @@ -0,0 +1,71 @@ +#ifndef CalibFormats_SiStripObjects_SiStripDetInfo_h +#define CalibFormats_SiStripObjects_SiStripDetInfo_h +// -*- C++ -*- +// +// Package: CalibFormats/SiStripObjects +// Class : SiStripDetInfo +// +/**\class SiStripDetInfo SiStripDetInfo.h "SiStripDetInfo.h" + + Description: [one line class summary] + + Usage: + + +*/ +// +// Original Author: Christopher Jones +// Created: Fri, 28 May 2021 20:02:00 GMT +// + +// system include files + +// user include files +#include +#include +#include +// forward declarations + +class SiStripDetInfo { +public: + struct DetInfo { + DetInfo(){}; + DetInfo(unsigned short _nApvs, double _stripLength, float _thickness) + : nApvs(_nApvs), stripLength(_stripLength), thickness(_thickness){}; + + unsigned short nApvs; + double stripLength; + float thickness; + }; + + SiStripDetInfo(std::map iDetData, std::vector iIDs) noexcept + : detData_{std::move(iDetData)}, detIds_{std::move(iIDs)} {} + + SiStripDetInfo() = default; + ~SiStripDetInfo() = default; + + SiStripDetInfo(const SiStripDetInfo&) = default; + SiStripDetInfo& operator=(const SiStripDetInfo&) = default; + SiStripDetInfo(SiStripDetInfo&&) = default; + SiStripDetInfo& operator=(SiStripDetInfo&&) = default; + + // ---------- const member functions --------------------- + const std::vector& getAllDetIds() const noexcept { return detIds_; } + + const std::pair getNumberOfApvsAndStripLength(uint32_t detId) const; + + const float& getThickness(uint32_t detId) const; + + const std::map& getAllData() const noexcept { return detData_; } + + // ---------- static member functions -------------------- + + // ---------- member functions --------------------------- + +private: + // ---------- member data -------------------------------- + std::map detData_; + std::vector detIds_; +}; + +#endif diff --git a/CalibFormats/SiStripObjects/interface/SiStripGain.h b/CalibFormats/SiStripObjects/interface/SiStripGain.h index dbd91f09a3d22..c38e314afbbea 100644 --- a/CalibFormats/SiStripObjects/interface/SiStripGain.h +++ b/CalibFormats/SiStripObjects/interface/SiStripGain.h @@ -40,6 +40,7 @@ #include class TrackerTopology; +class SiStripDetInfo; class SiStripGain { public: @@ -48,22 +49,25 @@ class SiStripGain { const SiStripGain &operator=(const SiStripGain &) = delete; /// Kept for compatibility - inline SiStripGain(const SiStripApvGain &apvgain, const double &factor) : apvgain_(nullptr) { - multiply(apvgain, factor, std::make_pair("", "")); + inline SiStripGain(const SiStripApvGain &apvgain, const double &factor, const SiStripDetInfo &detInfo) + : apvgain_(nullptr) { + multiply(apvgain, factor, std::make_pair("", ""), detInfo); } inline SiStripGain(const SiStripApvGain &apvgain, const double &factor, - const std::pair &recordLabelPair) + const std::pair &recordLabelPair, + const SiStripDetInfo &detInfo) : apvgain_(nullptr) { - multiply(apvgain, factor, recordLabelPair); + multiply(apvgain, factor, recordLabelPair, detInfo); } /// Used to input additional gain values that will be multiplied to the first /// one void multiply(const SiStripApvGain &apvgain, const double &factor, - const std::pair &recordLabelPair); + const std::pair &recordLabelPair, + const SiStripDetInfo &detInfo); // getters // For the product of all apvGains @@ -103,6 +107,7 @@ class SiStripGain { private: void fillNewGain(const SiStripApvGain *apvgain, const double &factor, + SiStripDetInfo const &detInfo, const SiStripApvGain *apvgain2 = nullptr, const double &factor2 = 1.); diff --git a/CalibFormats/SiStripObjects/interface/SiStripQuality.h b/CalibFormats/SiStripObjects/interface/SiStripQuality.h index 9e1a88296b156..9f97d70b3ce9f 100644 --- a/CalibFormats/SiStripObjects/interface/SiStripQuality.h +++ b/CalibFormats/SiStripObjects/interface/SiStripQuality.h @@ -22,11 +22,11 @@ #include "CondFormats/RunInfo/interface/RunInfo.h" #include "CondFormats/SiStripObjects/interface/SiStripBadStrip.h" #include "CondFormats/SiStripObjects/interface/SiStripDetVOff.h" -#include "FWCore/ParameterSet/interface/FileInPath.h" +#include "CalibFormats/SiStripObjects/interface/SiStripDetInfo.h" #include class SiStripDetCabling; -class SiStripDetInfoFileReader; +class SiStripDetInfo; class TrackerTopology; class SiStripQuality final : public SiStripBadStrip { @@ -43,11 +43,12 @@ class SiStripQuality final : public SiStripBadStrip { bool operator()(const BadComponent &p, const uint32_t i) const { return p.detid < i; } }; - SiStripQuality(); // takes default file for SiStripDetInfoFileReader - SiStripQuality(edm::FileInPath &); - SiStripQuality(const SiStripQuality &); // copy constructor + SiStripQuality() = delete; + explicit SiStripQuality(SiStripDetInfo); + SiStripQuality(const SiStripQuality &) = default; + SiStripQuality(SiStripQuality &&) = default; - ~SiStripQuality() override; + ~SiStripQuality() override = default; void clear() { v_badstrips.clear(); @@ -76,13 +77,7 @@ class SiStripQuality final : public SiStripBadStrip { void ReduceGranularity(double); - SiStripQuality &operator+=(const SiStripQuality &); - SiStripQuality &operator-=(const SiStripQuality &); - const SiStripQuality operator-(const SiStripQuality &) const; - bool operator==(const SiStripQuality &) const; - bool operator!=(const SiStripQuality &) const; - - edm::FileInPath getFileInPath() const { return FileInPath_; } + SiStripQuality difference(const SiStripQuality &) const; //------- Interface for the user ----------// bool IsModuleUsable(const uint32_t &detid) const; @@ -149,10 +144,8 @@ class SiStripQuality final : public SiStripBadStrip { const std::vector &differentFeds, const bool printDebug); + SiStripDetInfo info_; bool toCleanUp; - edm::FileInPath FileInPath_; - SiStripDetInfoFileReader *reader; - std::vector BadComponentVect; const SiStripDetCabling *SiStripDetCabling_; diff --git a/CalibFormats/SiStripObjects/src/SiStripDelay.cc b/CalibFormats/SiStripObjects/src/SiStripDelay.cc index 72ea0fbc5ba31..bf98bfc9034f6 100644 --- a/CalibFormats/SiStripObjects/src/SiStripDelay.cc +++ b/CalibFormats/SiStripObjects/src/SiStripDelay.cc @@ -8,7 +8,6 @@ // Created: 26/10/2010 #include "CalibFormats/SiStripObjects/interface/SiStripDelay.h" -#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" #include "CondFormats/SiStripObjects/interface/SiStripDetSummary.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/typelookup.h" diff --git a/CalibFormats/SiStripObjects/src/SiStripDetInfo.cc b/CalibFormats/SiStripObjects/src/SiStripDetInfo.cc new file mode 100644 index 0000000000000..8688a2cc61d1d --- /dev/null +++ b/CalibFormats/SiStripObjects/src/SiStripDetInfo.cc @@ -0,0 +1,47 @@ +// -*- C++ -*- +// +// Package: CalibFormats/SiStripObjects +// Class : SiStripDetInfo +// +// Implementation: +// [Notes on implementation] +// +// Original Author: Christopher Jones +// Created: Fri, 28 May 2021 20:10:25 GMT +// + +// system include files + +// user include files +#include "CalibFormats/SiStripObjects/interface/SiStripDetInfo.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +const std::pair SiStripDetInfo::getNumberOfApvsAndStripLength(uint32_t detId) const { + std::map::const_iterator it = detData_.find(detId); + + if (it != detData_.end()) { + return std::pair(it->second.nApvs, it->second.stripLength); + + } else { + std::pair defaultValue(0, 0.); + edm::LogWarning( + "SiStripDetInfoFileReader::getNumberOfApvsAndStripLength - Unable to find requested detid. Returning invalid " + "data ") + << std::endl; + return defaultValue; + } +} + +const float& SiStripDetInfo::getThickness(uint32_t detId) const { + std::map::const_iterator it = detData_.find(detId); + + if (it != detData_.end()) { + return it->second.thickness; + + } else { + static const float defaultValue = 0; + edm::LogWarning("SiStripDetInfo::getThickness - Unable to find requested detid. Returning invalid data ") + << std::endl; + return defaultValue; + } +} diff --git a/CalibFormats/SiStripObjects/src/SiStripGain.cc b/CalibFormats/SiStripObjects/src/SiStripGain.cc index 4a85e5f423271..1bc4cc9dec09b 100644 --- a/CalibFormats/SiStripObjects/src/SiStripGain.cc +++ b/CalibFormats/SiStripObjects/src/SiStripGain.cc @@ -8,7 +8,7 @@ // Created: Wed Mar 22 12:24:33 CET 2006 #include "CalibFormats/SiStripObjects/interface/SiStripGain.h" -#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" +#include "CalibFormats/SiStripObjects/interface/SiStripDetInfo.h" #include "CondFormats/SiStripObjects/interface/SiStripDetSummary.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/typelookup.h" @@ -16,11 +16,12 @@ void SiStripGain::multiply(const SiStripApvGain &apvgain, const double &factor, - const std::pair &recordLabelPair) { + const std::pair &recordLabelPair, + const SiStripDetInfo &detInfo) { // When inserting the first ApvGain if (apvgain_ == nullptr) { if ((factor != 1) && (factor != 0)) { - fillNewGain(&apvgain, factor); + fillNewGain(&apvgain, factor, detInfo); } else { // If the normalization factor is one, no need to create a new // SiStripApvGain @@ -29,7 +30,7 @@ void SiStripGain::multiply(const SiStripApvGain &apvgain, } else { // There is already an ApvGain inside the SiStripGain. Multiply it by the // new one and save the new pointer. - fillNewGain(apvgain_, 1., &apvgain, factor); + fillNewGain(apvgain_, 1., detInfo, &apvgain, factor); } recordLabelPair_.push_back(recordLabelPair); apvgainVector_.push_back(&apvgain); @@ -38,12 +39,11 @@ void SiStripGain::multiply(const SiStripApvGain &apvgain, void SiStripGain::fillNewGain(const SiStripApvGain *apvgain, const double &factor, + const SiStripDetInfo &detInfo, const SiStripApvGain *apvgain2, const double &factor2) { SiStripApvGain *newApvGain = new SiStripApvGain; - edm::FileInPath fp("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); - SiStripDetInfoFileReader reader(fp.fullPath()); - const std::map &DetInfos = reader.getAllData(); + const auto &DetInfos = detInfo.getAllData(); // Loop on the apvgain in input and fill the newApvGain with the // values/factor. @@ -51,7 +51,7 @@ void SiStripGain::fillNewGain(const SiStripApvGain *apvgain, apvgain->getDetIds(detIds); std::vector::const_iterator it = detIds.begin(); for (; it != detIds.end(); ++it) { - std::map::const_iterator detInfoIt = DetInfos.find(*it); + auto detInfoIt = DetInfos.find(*it); if (detInfoIt != DetInfos.end()) { std::vector theSiStripVector; diff --git a/CalibFormats/SiStripObjects/src/SiStripQuality.cc b/CalibFormats/SiStripObjects/src/SiStripQuality.cc index 548e881421bc3..8e51ce03e1c3d 100644 --- a/CalibFormats/SiStripObjects/src/SiStripQuality.cc +++ b/CalibFormats/SiStripObjects/src/SiStripQuality.cc @@ -4,7 +4,7 @@ // #include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h" #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h" -#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" +#include "CalibFormats/SiStripObjects/interface/SiStripDetInfo.h" #include "DataFormats/FEDRawData/interface/FEDNumbering.h" #include "DataFormats/SiStripDetId/interface/StripSubdetector.h" #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" @@ -14,60 +14,30 @@ // Needed only for output #include "DataFormats/DetId/interface/DetId.h" -SiStripQuality::SiStripQuality() - : toCleanUp(false), - FileInPath_("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"), +SiStripQuality::SiStripQuality(SiStripDetInfo iInfo) + : info_(std::move(iInfo)), + toCleanUp(false), SiStripDetCabling_(nullptr), printDebug_(false), - useEmptyRunInfo_(false) { - reader = new SiStripDetInfoFileReader(FileInPath_.fullPath()); -} - -SiStripQuality::SiStripQuality(edm::FileInPath &file) - : toCleanUp(false), FileInPath_(file), SiStripDetCabling_(nullptr), printDebug_(false), useEmptyRunInfo_(false) { - reader = new SiStripDetInfoFileReader(FileInPath_.fullPath()); -} - -SiStripQuality::SiStripQuality(const SiStripQuality &other) : SiStripBadStrip::SiStripBadStrip(other) { - FileInPath_ = other.FileInPath_; - reader = new SiStripDetInfoFileReader(*(other.reader)); - toCleanUp = other.toCleanUp; - indexes = other.indexes; - v_badstrips = other.v_badstrips; - BadComponentVect = other.BadComponentVect; - SiStripDetCabling_ = other.SiStripDetCabling_; - printDebug_ = other.printDebug_; - useEmptyRunInfo_ = other.useEmptyRunInfo_; -} - -SiStripQuality::~SiStripQuality() { - LogTrace("SiStripQuality") << "SiStripQuality destructor" << std::endl; - delete reader; -} + useEmptyRunInfo_(false) {} -SiStripQuality &SiStripQuality::operator+=(const SiStripQuality &other) { - this->add(&other); - this->cleanUp(); - this->fillBadComponents(); - return *this; -} - -SiStripQuality &SiStripQuality::operator-=(const SiStripQuality &other) { +SiStripQuality SiStripQuality::difference(const SiStripQuality &other) const { SiStripBadStrip::RegistryIterator rbegin = other.getRegistryVectorBegin(); SiStripBadStrip::RegistryIterator rend = other.getRegistryVectorEnd(); std::vector ovect, vect; uint32_t detid; unsigned short Nstrips; + SiStripQuality retValue(*this); for (SiStripBadStrip::RegistryIterator rp = rbegin; rp != rend; ++rp) { detid = rp->detid; - Nstrips = reader->getNumberOfApvsAndStripLength(detid).first * 128; + Nstrips = info_.getNumberOfApvsAndStripLength(detid).first * 128; SiStripBadStrip::Range orange = SiStripBadStrip::Range(other.getDataVectorBegin() + rp->ibegin, other.getDataVectorBegin() + rp->iend); // Is this detid already in the collections owned by this class? - SiStripBadStrip::Range range = getRange(detid); + SiStripBadStrip::Range range = retValue.getRange(detid); if (range.first != range.second) { // yes, it is vect.clear(); @@ -78,29 +48,18 @@ SiStripQuality &SiStripQuality::operator-=(const SiStripQuality &other) { if (orange.second - orange.first != 1 || data_.firstStrip != 0 || data_.range < Nstrips) { ovect.insert(ovect.end(), orange.first, orange.second); vect.insert(vect.end(), range.first, range.second); - subtract(vect, ovect); + retValue.subtract(vect, ovect); } SiStripBadStrip::Range newrange(vect.begin(), vect.end()); - if (!put_replace(detid, newrange)) + if (!retValue.put_replace(detid, newrange)) edm::LogError("SiStripQuality") << "[" << __PRETTY_FUNCTION__ << "] " << std::endl; } } - cleanUp(); - fillBadComponents(); - return *this; -} - -const SiStripQuality SiStripQuality::operator-(const SiStripQuality &other) const { - return SiStripQuality(*this) -= other; + retValue.cleanUp(); + retValue.fillBadComponents(); + return retValue; } -bool SiStripQuality::operator==(const SiStripQuality &other) const { - SiStripQuality a = (*this) - other; - return a.getRegistryVectorBegin() == a.getRegistryVectorEnd(); -} - -bool SiStripQuality::operator!=(const SiStripQuality &other) const { return !(*this == other); } - void SiStripQuality::add(const SiStripDetVOff *Voff) { std::vector vect; short firstStrip = 0; @@ -114,7 +73,7 @@ void SiStripQuality::add(const SiStripDetVOff *Voff) { for (; iter != iterEnd; ++iter) { vect.clear(); - range = (short)(reader->getNumberOfApvsAndStripLength(*iter).first * 128.); + range = (short)(info_.getNumberOfApvsAndStripLength(*iter).first * 128.); LogTrace("SiStripQuality") << "[add Voff] add detid " << *iter << " first strip " << firstStrip << " range " << range << std::endl; vect.push_back(encode(firstStrip, range)); @@ -203,9 +162,9 @@ void SiStripQuality::add(const SiStripDetCabling *cab) { } void SiStripQuality::addNotConnectedConnectionFromCabling() { - std::map allData = reader->getAllData(); - std::map::const_iterator iter = allData.begin(); - std::map::const_iterator iterEnd = allData.end(); + auto allData = info_.getAllData(); + auto iter = allData.begin(); + auto iterEnd = allData.end(); std::vector vect; short firstStrip = 0; short range = 0; @@ -284,7 +243,7 @@ void SiStripQuality::add(const SiStripBadStrip *base) { void SiStripQuality::add(const uint32_t &detid, const SiStripBadStrip::Range &baserange) { std::vector vect, tmp; - unsigned short Nstrips = reader->getNumberOfApvsAndStripLength(detid).first * 128; + unsigned short Nstrips = info_.getNumberOfApvsAndStripLength(detid).first * 128; // Is this detid already in the collections owned by this class? SiStripBadStrip::Range range = getRange(detid); @@ -327,7 +286,7 @@ void SiStripQuality::compact(unsigned int &detid, std::vector &vec std::vector tmp = vect; vect.clear(); std::stable_sort(tmp.begin(), tmp.end()); - unsigned short Nstrips = reader->getNumberOfApvsAndStripLength(detid).first * 128; + unsigned short Nstrips = info_.getNumberOfApvsAndStripLength(detid).first * 128; compact(tmp, vect, Nstrips); } @@ -539,7 +498,7 @@ void SiStripQuality::fillBadComponents() { BadComponent result; SiStripBadStrip::data fs; - unsigned short Nstrips = reader->getNumberOfApvsAndStripLength(basep->detid).first * 128; + unsigned short Nstrips = info_.getNumberOfApvsAndStripLength(basep->detid).first * 128; // BadModules fs = decode(*(range.first)); diff --git a/CalibFormats/SiStripObjects/test/BuildFile.xml b/CalibFormats/SiStripObjects/test/BuildFile.xml index 67f9cf2b56196..679e4140b4a1e 100644 --- a/CalibFormats/SiStripObjects/test/BuildFile.xml +++ b/CalibFormats/SiStripObjects/test/BuildFile.xml @@ -10,6 +10,7 @@ + diff --git a/CalibFormats/SiStripObjects/test/UnitTests/TestSiStripGain.cc b/CalibFormats/SiStripObjects/test/UnitTests/TestSiStripGain.cc index cb0095d206760..4e3ff2d7fc782 100644 --- a/CalibFormats/SiStripObjects/test/UnitTests/TestSiStripGain.cc +++ b/CalibFormats/SiStripObjects/test/UnitTests/TestSiStripGain.cc @@ -12,6 +12,8 @@ #include #include "CalibFormats/SiStripObjects/interface/SiStripGain.h" +#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" #ifndef TestSiStripGain_cc #define TestSiStripGain_cc @@ -69,8 +71,11 @@ class TestSiStripGain : public CppUnit::TestFixture { normVector.push_back(norm1); normVector.push_back(norm2); - SiStripGain gain(*apvGain1, norm1, recordLabelPair1); - gain.multiply(*apvGain2, norm2, recordLabelPair2); + edm::FileInPath fp(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(fp.fullPath()); + + SiStripGain gain(*apvGain1, norm1, recordLabelPair1, reader.info()); + gain.multiply(*apvGain2, norm2, recordLabelPair2, reader.info()); SiStripApvGain::Range range = gain.getRange(detId); // Check multiplication @@ -83,7 +88,10 @@ class TestSiStripGain : public CppUnit::TestFixture { } void apvGainsTest(const float &norm) { - SiStripGain gain(*apvGain1, norm); + edm::FileInPath fp(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(fp.fullPath()); + + SiStripGain gain(*apvGain1, norm, reader.info()); SiStripApvGain::Range range = gain.getRange(detId); CPPUNIT_ASSERT(float(gain.getApvGain(0, range)) == float(1. / norm)); CPPUNIT_ASSERT(float(gain.getApvGain(1, range)) == float(0.8 / norm)); @@ -91,7 +99,7 @@ class TestSiStripGain : public CppUnit::TestFixture { CPPUNIT_ASSERT(float(gain.getApvGain(3, range)) == float(2. / norm)); checkTag(gain, norm, "", ""); - SiStripGain gain2(*apvGain2, norm); + SiStripGain gain2(*apvGain2, norm, reader.info()); SiStripApvGain::Range range2 = gain2.getRange(detId); CPPUNIT_ASSERT(float(gain2.getApvGain(0, range2)) == float(1. / norm)); CPPUNIT_ASSERT(float(gain2.getApvGain(1, range2)) == float(1. / (norm * 0.8))); diff --git a/CalibTracker/SiStripChannelGain/BuildFile.xml b/CalibTracker/SiStripChannelGain/BuildFile.xml index 467d0e3fbf369..22f878a2adcef 100644 --- a/CalibTracker/SiStripChannelGain/BuildFile.xml +++ b/CalibTracker/SiStripChannelGain/BuildFile.xml @@ -4,6 +4,7 @@ + diff --git a/CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h b/CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h index 08f7f0d469deb..eb9074fb25399 100644 --- a/CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h +++ b/CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h @@ -23,24 +23,15 @@ #include #include #include -#include "FWCore/ServiceRegistry/interface/Service.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "CalibFormats/SiStripObjects/interface/SiStripDetInfo.h" #include class SiStripDetInfoFileReader { public: - struct DetInfo { - DetInfo(){}; - DetInfo(unsigned short _nApvs, double _stripLength, float _thickness) - : nApvs(_nApvs), stripLength(_stripLength), thickness(_thickness){}; - - unsigned short nApvs; - double stripLength; - float thickness; - }; + using DetInfo = SiStripDetInfo::DetInfo; + constexpr static char const* const kDefaultFile = "CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"; explicit SiStripDetInfoFileReader(){}; - explicit SiStripDetInfoFileReader(const edm::ParameterSet&, const edm::ActivityRegistry&); explicit SiStripDetInfoFileReader(std::string filePath); explicit SiStripDetInfoFileReader(const SiStripDetInfoFileReader&); @@ -49,23 +40,23 @@ class SiStripDetInfoFileReader { SiStripDetInfoFileReader& operator=(const SiStripDetInfoFileReader& copy); - const std::vector& getAllDetIds() const { return detIds_; } + SiStripDetInfo const& info() const { return info_; } + + const std::vector& getAllDetIds() const { return info_.getAllDetIds(); } - const std::pair getNumberOfApvsAndStripLength(uint32_t detId) const; + const std::pair getNumberOfApvsAndStripLength(uint32_t detId) const { + return info_.getNumberOfApvsAndStripLength(detId); + } - const float& getThickness(uint32_t detId) const; + const float& getThickness(uint32_t detId) const { return info_.getThickness(detId); } - const std::map& getAllData() const { return detData_; } + const std::map& getAllData() const { return info_.getAllData(); } private: void reader(std::string filePath); std::ifstream inputFile_; - // std::string filePath_; - std::map detData_; - // std::map > detData_; - //std::map detThickness_; - std::vector detIds_; + SiStripDetInfo info_; }; #endif diff --git a/CalibTracker/SiStripCommon/src/SiStripDetInfoFileReader.cc b/CalibTracker/SiStripCommon/src/SiStripDetInfoFileReader.cc index fdcf85082ffe5..aa229e718a79e 100644 --- a/CalibTracker/SiStripCommon/src/SiStripDetInfoFileReader.cc +++ b/CalibTracker/SiStripCommon/src/SiStripDetInfoFileReader.cc @@ -13,21 +13,11 @@ using namespace cms; using namespace std; SiStripDetInfoFileReader& SiStripDetInfoFileReader::operator=(const SiStripDetInfoFileReader& copy) { - detData_ = copy.detData_; - detIds_ = copy.detIds_; + info_ = copy.info_; return *this; } -SiStripDetInfoFileReader::SiStripDetInfoFileReader(const edm::ParameterSet& pset, const edm::ActivityRegistry& ar) { - edm::FileInPath fp( - pset.getUntrackedParameter("filePath", "CalibTracker/SiStripCommon/data/SiStripDetInfo.dat")); - reader(fp.fullPath()); -} - -SiStripDetInfoFileReader::SiStripDetInfoFileReader(const SiStripDetInfoFileReader& copy) { - detData_ = copy.detData_; - detIds_ = copy.detIds_; -} +SiStripDetInfoFileReader::SiStripDetInfoFileReader(const SiStripDetInfoFileReader& copy) : info_{copy.info_} {} SiStripDetInfoFileReader::SiStripDetInfoFileReader(std::string filePath) { reader(filePath); } @@ -38,8 +28,8 @@ void SiStripDetInfoFileReader::reader(std::string filePath) { edm::LogInfo("SiStripDetInfoFileReader") << "filePath " << filePath << std::endl; - detData_.clear(); - detIds_.clear(); + std::map detData_; + std::vector detIds_; inputFile_.open(filePath.c_str()); @@ -88,6 +78,7 @@ void SiStripDetInfoFileReader::reader(std::string filePath) { return; } + info_ = SiStripDetInfo(detData_, detIds_); // int i=0; // for(std::map >::iterator it =detData_.begin(); it!=detData_.end(); it++ ) { // std::cout<< it->first << " " << (it->second).first << " " << (it->second).second< SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(uint32_t detId) const { - std::map::const_iterator it = detData_.find(detId); - - if (it != detData_.end()) { - return std::pair(it->second.nApvs, it->second.stripLength); - - } else { - std::pair defaultValue(0, 0.); - edm::LogWarning( - "SiStripDetInfoFileReader::getNumberOfApvsAndStripLength - Unable to find requested detid. Returning invalid " - "data ") - << endl; - return defaultValue; - } -} - -const float& SiStripDetInfoFileReader::getThickness(uint32_t detId) const { - std::map::const_iterator it = detData_.find(detId); - - if (it != detData_.end()) { - return it->second.thickness; - - } else { - static const float defaultValue = 0; - edm::LogWarning("SiStripDetInfoFileReader::getThickness - Unable to find requested detid. Returning invalid data ") - << endl; - return defaultValue; - } -} diff --git a/CalibTracker/SiStripESProducers/BuildFile.xml b/CalibTracker/SiStripESProducers/BuildFile.xml index e0d3ea5b7128c..5fac1ca25d006 100644 --- a/CalibTracker/SiStripESProducers/BuildFile.xml +++ b/CalibTracker/SiStripESProducers/BuildFile.xml @@ -1,4 +1,5 @@ + diff --git a/CalibTracker/SiStripESProducers/plugins/BuildFile.xml b/CalibTracker/SiStripESProducers/plugins/BuildFile.xml index 90e0f65db45ec..a5c4b0f009571 100644 --- a/CalibTracker/SiStripESProducers/plugins/BuildFile.xml +++ b/CalibTracker/SiStripESProducers/plugins/BuildFile.xml @@ -2,6 +2,7 @@ + diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripBadModuleConfigurableFakeESSource.cc b/CalibTracker/SiStripESProducers/plugins/fake/SiStripBadModuleConfigurableFakeESSource.cc index 439d6c8c22e1c..503f0fc40b173 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripBadModuleConfigurableFakeESSource.cc +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripBadModuleConfigurableFakeESSource.cc @@ -81,7 +81,7 @@ SiStripBadModuleConfigurableFakeESSource::ReturnType SiStripBadModuleConfigurabl TrackerTopology const& tTopo = iRecord.get(trackTopoToken_); - auto quality = std::make_unique(); + auto quality = std::make_unique(m_detInfoFileReader.info()); if (!m_doByAPVs) { std::vector selDetIds{selectDetectors(&tTopo, m_detInfoFileReader.getAllDetIds())}; diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.cc b/CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.cc index 8c2b81808bd45..919da97294da5 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.cc +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.cc @@ -17,6 +17,7 @@ // #include "CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.h" +#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" SiStripQualityFakeESSource::SiStripQualityFakeESSource(const edm::ParameterSet& iConfig) { setWhatProduced(this); @@ -24,7 +25,10 @@ SiStripQualityFakeESSource::SiStripQualityFakeESSource(const edm::ParameterSet& } std::unique_ptr SiStripQualityFakeESSource::produce(const SiStripQualityRcd& iRecord) { - return std::make_unique(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + + return std::make_unique(reader.info()); } void SiStripQualityFakeESSource::setIntervalFor(const edm::eventsetup::EventSetupRecordKey&, diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.h b/CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.h index 5daed43138dfa..56bfc2af9c20f 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.h +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripQualityFakeESSource.h @@ -23,6 +23,8 @@ class SiStripQualityFakeESSource : public edm::ESProducer, public edm::EventSetu public: SiStripQualityFakeESSource(const edm::ParameterSet&); ~SiStripQualityFakeESSource() override{}; + SiStripQualityFakeESSource(const SiStripQualityFakeESSource&) = delete; + const SiStripQualityFakeESSource& operator=(const SiStripQualityFakeESSource&) = delete; std::unique_ptr produce(const SiStripQualityRcd&); @@ -30,9 +32,6 @@ class SiStripQualityFakeESSource : public edm::ESProducer, public edm::EventSetu void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity) override; - - SiStripQualityFakeESSource(const SiStripQualityFakeESSource&) = delete; - const SiStripQualityFakeESSource& operator=(const SiStripQualityFakeESSource&) = delete; }; #endif diff --git a/CalibTracker/SiStripESProducers/plugins/real/SiStripGainESProducer.cc b/CalibTracker/SiStripESProducers/plugins/real/SiStripGainESProducer.cc index ee7b01af4a81d..2d6338a9100b5 100644 --- a/CalibTracker/SiStripESProducers/plugins/real/SiStripGainESProducer.cc +++ b/CalibTracker/SiStripESProducers/plugins/real/SiStripGainESProducer.cc @@ -13,6 +13,7 @@ #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h" #include "CondFormats/DataRecord/interface/SiStripCondDataRecords.h" #include "CalibTracker/Records/interface/SiStripDependentRecords.h" +#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" #include "SiStripGainFactor.h" @@ -91,14 +92,18 @@ SiStripGainESProducer::SiStripGainESProducer(const edm::ParameterSet& iConfig) : } std::unique_ptr SiStripGainESProducer::produce(const SiStripGainRcd& iRecord) { + edm::FileInPath fp(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(fp.fullPath()); + const auto& apvGain = gainGetters_[0]->gain(iRecord); // Create a new gain object and insert the ApvGain - auto gain = std::make_unique(apvGain, factor_.get(apvGain, 0), gainGetters_[0]->recordLabel()); + auto gain = + std::make_unique(apvGain, factor_.get(apvGain, 0), gainGetters_[0]->recordLabel(), reader.info()); for (unsigned int i = 1; i < gainGetters_.size(); ++i) { const auto& apvGain = gainGetters_[i]->gain(iRecord); // Add the new ApvGain to the gain object - gain->multiply(apvGain, factor_.get(apvGain, i), gainGetters_[i]->recordLabel()); + gain->multiply(apvGain, factor_.get(apvGain, i), gainGetters_[i]->recordLabel(), reader.info()); } return gain; diff --git a/CalibTracker/SiStripESProducers/plugins/real/SiStripGainSimESProducer.cc b/CalibTracker/SiStripESProducers/plugins/real/SiStripGainSimESProducer.cc index 66c4a70be6e7f..cf82e95037dc5 100644 --- a/CalibTracker/SiStripESProducers/plugins/real/SiStripGainSimESProducer.cc +++ b/CalibTracker/SiStripESProducers/plugins/real/SiStripGainSimESProducer.cc @@ -13,6 +13,7 @@ #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h" #include "CondFormats/DataRecord/interface/SiStripCondDataRecords.h" #include "CalibTracker/Records/interface/SiStripDependentRecords.h" +#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" #include "SiStripGainFactor.h" @@ -56,12 +57,16 @@ SiStripGainSimESProducer::SiStripGainSimESProducer(const edm::ParameterSet& iCon } std::unique_ptr SiStripGainSimESProducer::produce(const SiStripGainSimRcd& iRecord) { + const edm::FileInPath fp(SiStripDetInfoFileReader::kDefaultFile); + const SiStripDetInfoFileReader reader(fp.fullPath()); + const auto& apvGain = iRecord.get(tokenLabels_[0].token_); - auto gain = std::make_unique(apvGain, factor_.get(apvGain, 0), tokenLabels_[0].recordLabel_); + auto gain = + std::make_unique(apvGain, factor_.get(apvGain, 0), tokenLabels_[0].recordLabel_, reader.info()); for (unsigned int i = 1; i < tokenLabels_.size(); ++i) { const auto& apvGain = iRecord.get(tokenLabels_[i].token_); - gain->multiply(apvGain, factor_.get(apvGain, i), tokenLabels_[i].recordLabel_); + gain->multiply(apvGain, factor_.get(apvGain, i), tokenLabels_[i].recordLabel_, reader.info()); } return gain; } diff --git a/CalibTracker/SiStripESProducers/plugins/real/SiStripQualityESProducer.cc b/CalibTracker/SiStripESProducers/plugins/real/SiStripQualityESProducer.cc index c6ce284dc0100..3b14804cbd684 100644 --- a/CalibTracker/SiStripESProducers/plugins/real/SiStripQualityESProducer.cc +++ b/CalibTracker/SiStripESProducers/plugins/real/SiStripQualityESProducer.cc @@ -30,6 +30,7 @@ #include "DataFormats/SiStripCommon/interface/SiStripConstants.h" #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h" #include "CalibTracker/Records/interface/SiStripDependentRecords.h" +#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" #include "CondFormats/RunInfo/interface/RunInfo.h" namespace { @@ -128,7 +129,9 @@ SiStripQualityESProducer::SiStripQualityESProducer(const edm::ParameterSet& iCon } std::unique_ptr SiStripQualityESProducer::produce(const SiStripQualityRcd& iRecord) { - auto quality = std::make_unique(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + auto quality = std::make_unique(reader.info()); edm::LogInfo("SiStripQualityESProducer") << "produce called"; // Set the debug output level diff --git a/CalibTracker/SiStripESProducers/src/SiStripQualityHelpers.cc b/CalibTracker/SiStripESProducers/src/SiStripQualityHelpers.cc index 361dd21a465fb..69953d1ec4121 100644 --- a/CalibTracker/SiStripESProducers/src/SiStripQualityHelpers.cc +++ b/CalibTracker/SiStripESProducers/src/SiStripQualityHelpers.cc @@ -3,6 +3,7 @@ #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h" #include "CondFormats/SiStripObjects/interface/SiStripFedCabling.h" +#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" #include "CalibTracker/SiStripESProducers/interface/SiStripQualityHelpers.h" using dqm::harvesting::DQMStore; @@ -52,7 +53,10 @@ namespace { std::unique_ptr sistrip::badStripFromFedErr(DQMStore::IGetter& dqmStore, const SiStripFedCabling& fedCabling, float cutoff) { - auto quality = std::make_unique(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + + auto quality = std::make_unique(reader.info()); dqmStore.cd(); const std::string dname{"SiStrip/ReadoutView"}; const std::string hpath{dname + "/FedIdVsApvId"}; diff --git a/CalibTracker/SiStripESProducers/test/testSiStripQualityESProducer.cc b/CalibTracker/SiStripESProducers/test/testSiStripQualityESProducer.cc index f286375365899..2eadbb7ccfb7d 100644 --- a/CalibTracker/SiStripESProducers/test/testSiStripQualityESProducer.cc +++ b/CalibTracker/SiStripESProducers/test/testSiStripQualityESProducer.cc @@ -48,12 +48,12 @@ void testSiStripQualityESProducer::analyze(const edm::Event& e, const edm::Event edm::LogInfo("testSiStripQualityESProducer") << canvas << "[testSiStripQualityESProducer::analyze] Print difference (First - Second) SiStripQuality Rcd" << canvas << std::endl; - const SiStripQuality& tmp1 = *SiStripQualityESH_ - *twoSiStripQualityESH_; + const SiStripQuality& tmp1 = SiStripQualityESH_->difference(*twoSiStripQualityESH_); printObject(&tmp1); edm::LogInfo("testSiStripQualityESProducer") << canvas << "[testSiStripQualityESProducer::analyze] Print difference (Second - First) SiStripQuality Rcd" << canvas << std::endl; - const SiStripQuality& tmp2 = *twoSiStripQualityESH_ - *SiStripQualityESH_; + const SiStripQuality& tmp2 = twoSiStripQualityESH_->difference(*SiStripQualityESH_); printObject(&tmp2); } @@ -65,12 +65,12 @@ void testSiStripQualityESProducer::analyze(const edm::Event& e, const edm::Event edm::LogInfo("testSiStripQualityESProducer") << canvas << "[testSiStripQualityESProducer::analyze] Print difference (Current - Previous) SiStripQuality Rcd" << canvas << std::endl; - const SiStripQuality& tmp1 = *SiStripQualityESH_ - *m_Quality_; + const SiStripQuality& tmp1 = SiStripQualityESH_->difference(*m_Quality_); printObject(&tmp1); edm::LogInfo("testSiStripQualityESProducer") << canvas << "[testSiStripQualityESProducer::analyze] Print difference (Previous - Current) SiStripQuality Rcd" << canvas << std::endl; - const SiStripQuality& tmp2 = *m_Quality_ - *SiStripQualityESH_; + const SiStripQuality& tmp2 = m_Quality_->difference(*SiStripQualityESH_); printObject(&tmp2); } diff --git a/CalibTracker/SiStripHitEfficiency/BuildFile.xml b/CalibTracker/SiStripHitEfficiency/BuildFile.xml index b8b465aeb3a06..a979efa1460ed 100644 --- a/CalibTracker/SiStripHitEfficiency/BuildFile.xml +++ b/CalibTracker/SiStripHitEfficiency/BuildFile.xml @@ -1,6 +1,7 @@ + diff --git a/CalibTracker/SiStripHitEfficiency/plugins/BuildFile.xml b/CalibTracker/SiStripHitEfficiency/plugins/BuildFile.xml index a76a0f3acd1be..fa3fc2a89fecd 100644 --- a/CalibTracker/SiStripHitEfficiency/plugins/BuildFile.xml +++ b/CalibTracker/SiStripHitEfficiency/plugins/BuildFile.xml @@ -12,6 +12,7 @@ + diff --git a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEffFromCalibTree.cc b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEffFromCalibTree.cc index 5fd45144ce72c..86128633e82a8 100644 --- a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEffFromCalibTree.cc +++ b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEffFromCalibTree.cc @@ -216,7 +216,7 @@ SiStripHitEffFromCalibTree::SiStripHitEffFromCalibTree(const edm::ParameterSet& if (_showRings) nTEClayers = 7; // number of rings - quality_ = new SiStripQuality; + quality_ = new SiStripQuality(reader->info()); } SiStripHitEffFromCalibTree::~SiStripHitEffFromCalibTree() {} @@ -1104,7 +1104,7 @@ void SiStripHitEffFromCalibTree::makeSQLite() { std::vector BadStripList; unsigned short NStrips; unsigned int id1; - std::unique_ptr pQuality = std::make_unique(); + std::unique_ptr pQuality = std::make_unique(reader->info()); //This is the list of the bad strips, use to mask out entire APVs //Now simply go through the bad hit list and mask out things that //are bad! diff --git a/CalibTracker/SiStripLorentzAngle/src/LA_Results.cc b/CalibTracker/SiStripLorentzAngle/src/LA_Results.cc index e8aa6577098a6..ebdff1c20c389 100644 --- a/CalibTracker/SiStripLorentzAngle/src/LA_Results.cc +++ b/CalibTracker/SiStripLorentzAngle/src/LA_Results.cc @@ -44,11 +44,10 @@ LA_Filler_Fitter::Result LA_Filler_Fitter::result(Method m, const std::string na p.measured = std::make_pair(p.reco.first + f->GetParameter(0), f->GetParameter(1)); p.chi2 = f->GetParameter(2); p.ndof = (unsigned)(f->GetParameter(3)); - p.entries = (m & PROB1) - ? (unsigned)book[base + "_w1"]->GetEntries() - : (m & (AVGV2 | RMSV2)) - ? (unsigned)book[base + method(AVGV2, false)]->GetEntries() - : (m & (AVGV3 | RMSV3)) ? (unsigned)book[base + method(AVGV3, false)]->GetEntries() : 0; + p.entries = (m & PROB1) ? (unsigned)book[base + "_w1"]->GetEntries() + : (m & (AVGV2 | RMSV2)) ? (unsigned)book[base + method(AVGV2, false)]->GetEntries() + : (m & (AVGV3 | RMSV3)) ? (unsigned)book[base + method(AVGV3, false)]->GetEntries() + : 0; break; } default: diff --git a/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc b/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc index e962bd78ef6de..a55ebc933d135 100644 --- a/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc +++ b/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc @@ -15,13 +15,14 @@ //Insert here the include to the algos #include "CalibTracker/SiStripQuality/interface/SiStripHotStripAlgorithmFromClusterOccupancy.h" +#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" SiStripQualityHotStripIdentifier::SiStripQualityHotStripIdentifier(const edm::ParameterSet& iConfig) : ConditionDBWriter(iConfig), dataLabel_(iConfig.getUntrackedParameter("dataLabel", "")), conf_(iConfig), - fp_(iConfig.getUntrackedParameter( - "file", edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))), + fp_(iConfig.getUntrackedParameter("file", + edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile))), Cluster_src_(iConfig.getParameter("Cluster_src")), Track_src_(iConfig.getUntrackedParameter("Track_src")), tracksCollection_in_EventTree(iConfig.getUntrackedParameter("RemoveTrackClusters", false)), @@ -53,7 +54,10 @@ std::unique_ptr SiStripQualityHotStripIdentifier::getNewObject( theIdentifier.setMinNumEntries(parameters.getUntrackedParameter("MinNumEntries", 100)); theIdentifier.setMinNumEntriesPerStrip(parameters.getUntrackedParameter("MinNumEntriesPerStrip", 5)); - SiStripQuality* qobj = new SiStripQuality(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + + SiStripQuality* qobj = new SiStripQuality(reader.info()); theIdentifier.extractBadStrips(qobj, ClusterPositionHistoMap, stripQuality_); edm::LogInfo("SiStripQualityHotStripIdentifier") diff --git a/Calibration/EcalAlCaRecoProducers/plugins/SelectedElectronFEDListProducer.cc b/Calibration/EcalAlCaRecoProducers/plugins/SelectedElectronFEDListProducer.cc index 3c28905dd2c27..c020bc7a498c9 100644 --- a/Calibration/EcalAlCaRecoProducers/plugins/SelectedElectronFEDListProducer.cc +++ b/Calibration/EcalAlCaRecoProducers/plugins/SelectedElectronFEDListProducer.cc @@ -6,6 +6,7 @@ #include "FWCore/Framework/interface/ESTransientHandle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" //#include "DataFormats/Common/interface/Handle.h" diff --git a/Calibration/HcalCalibAlgos/macros/CalibCorr.C b/Calibration/HcalCalibAlgos/macros/CalibCorr.C index 9aaae41d5662d..480cbf853874e 100644 --- a/Calibration/HcalCalibAlgos/macros/CalibCorr.C +++ b/Calibration/HcalCalibAlgos/macros/CalibCorr.C @@ -178,7 +178,7 @@ double puFactor(int type, int ieta, double pmom, double eHcal, double ediff, boo if (debug) std::cout << " d2p " << d2p << ":" << DELTA_CUT << " coeff " << icor << ":" << CONST_COR_COEF[icor] << ":" << LINEAR_COR_COEF[icor] << ":" << SQUARE_COR_COEF[icor] << " Fac " << fac; - } else { // 21pu + } else if (type == 6) { // 21pu (old) const double CONST_COR_COEF[6] = {0.98913, 0.982008, 0.974011, 0.496234, 0.368110, 0.294053}; const double LINEAR_COR_COEF[6] = {-0.0491388, -0.124058, -0.249718, -0.0667390, -0.0770766, -0.0580492}; const double SQUARE_COR_COEF[6] = {0, 0, 0.0368657, 0.00656337, 0.00724508, 0.00568967}; @@ -195,6 +195,40 @@ double puFactor(int type, int ieta, double pmom, double eHcal, double ediff, boo if (debug) std::cout << " d2p " << d2p << ":" << DELTA_CUT << " coeff " << icor << ":" << CONST_COR_COEF[icor] << ":" << LINEAR_COR_COEF[icor] << ":" << SQUARE_COR_COEF[icor] << " Fac " << fac; + } else if (type == 99) { // dlphin + const double CONST_COR_COEF[6] = {0.98312, 0.978532, 0.972211, 0.756004, 0.638075, 0.547192}; + const double LINEAR_COR_COEF[6] = {-0.0472436, -0.186206, -0.247339, -0.166062, -0.159781, -0.118747}; + const double SQUARE_COR_COEF[6] = {0, 0, 0.0356827, 0.0202461, 0.01785078, 0.0123003}; + const int PU_IETA_1 = 7; + const int PU_IETA_2 = 16; + const int PU_IETA_3 = 25; + const int PU_IETA_4 = 26; + const int PU_IETA_5 = 27; + unsigned icor = (unsigned(jeta >= PU_IETA_1) + unsigned(jeta >= PU_IETA_2) + unsigned(jeta >= PU_IETA_3) + + unsigned(jeta >= PU_IETA_4) + unsigned(jeta >= PU_IETA_5)); + double deltaCut = (icor > 2) ? 1.0 : DELTA_CUT; + if (d2p > deltaCut) + fac = (CONST_COR_COEF[icor] + LINEAR_COR_COEF[icor] * d2p + SQUARE_COR_COEF[icor] * d2p * d2p); + if (debug) + std::cout << " d2p " << d2p << ":" << DELTA_CUT << " coeff " << icor << ":" << CONST_COR_COEF[icor] << ":" + << LINEAR_COR_COEF[icor] << ":" << SQUARE_COR_COEF[icor] << " Fac " << fac; + } else { // 21pu (June, 2021) + const double CONST_COR_COEF[6] = {0.989727, 0.981923, 0.97571, 0.562475, 0.467947, 0.411831}; + const double LINEAR_COR_COEF[6] = {-0.0469558, -0.125805, -0.251383, -0.0668994, -0.0964236, -0.0947158}; + const double SQUARE_COR_COEF[6] = {0, 0, 0.0399785, 0.00610104, 0.00952528, 0.0100645}; + const int PU_IETA_1 = 7; + const int PU_IETA_2 = 16; + const int PU_IETA_3 = 25; + const int PU_IETA_4 = 26; + const int PU_IETA_5 = 27; + unsigned icor = (unsigned(jeta >= PU_IETA_1) + unsigned(jeta >= PU_IETA_2) + unsigned(jeta >= PU_IETA_3) + + unsigned(jeta >= PU_IETA_4) + unsigned(jeta >= PU_IETA_5)); + double deltaCut = (icor > 2) ? 1.0 : DELTA_CUT; + if (d2p > deltaCut) + fac = (CONST_COR_COEF[icor] + LINEAR_COR_COEF[icor] * d2p + SQUARE_COR_COEF[icor] * d2p * d2p); + if (debug) + std::cout << " d2p " << d2p << ":" << DELTA_CUT << " coeff " << icor << ":" << CONST_COR_COEF[icor] << ":" + << LINEAR_COR_COEF[icor] << ":" << SQUARE_COR_COEF[icor] << " Fac " << fac; } } if (fac < 0 || fac > 1) @@ -307,9 +341,10 @@ private: const int useScale_; const double scale_; const bool etaMax_, debug_; + static const int depMax_ = 10; bool corrE_; int etamp_, etamn_; - double cfacmp_, cfacmn_; + double cfacmp_[depMax_], cfacmn_[depMax_]; std::map, double> cfactors_; }; @@ -357,7 +392,11 @@ private: }; CalibCorrFactor::CalibCorrFactor(const char* infile, int useScale, double scale, bool etamax, bool debug) - : useScale_(useScale), scale_(scale), etaMax_(etamax), debug_(debug), etamp_(0), etamn_(0), cfacmp_(1), cfacmn_(1) { + : useScale_(useScale), scale_(scale), etaMax_(etamax), debug_(debug), etamp_(0), etamn_(0) { + for (int i = 0; i < depMax_; ++i) { + cfacmp_[i] = 1.0; + cfacmn_[i] = 1.0; + } if (std::string(infile) != "") { corrE_ = readCorrFactor(infile); std::cout << "Reads " << cfactors_.size() << " correction factors from " << infile << " with flag " << corrE_ @@ -382,9 +421,9 @@ double CalibCorrFactor::getCorr(unsigned int id) { cfac = itr->second; } else if (etaMax_) { if (zside > 0 && ieta > etamp_) - cfac = cfacmp_; + cfac = (depth < depMax_) ? cfacmp_[depth] : cfacmp_[depMax_ - 1]; if (zside < 0 && ieta > -etamn_) - cfac = cfacmn_; + cfac = (depth < depMax_) ? cfacmn_[depth] : cfacmn_[depMax_ - 1]; } } else if (useScale_ != 0) { int subdet, zside, ieta, iphi, depth; @@ -417,20 +456,21 @@ bool CalibCorrFactor::readCorrFactor(const char* fname) { float corrf = std::atof(items[3].c_str()); double scale = getFactor(std::abs(ieta)); cfactors_[std::pair(ieta, depth)] = scale * corrf; - if (ieta > etamp_ && depth == 1) { + if (ieta > etamp_ && depth == 1) etamp_ = ieta; - cfacmp_ = scale * corrf; - } - if (ieta < etamn_ && depth == 1) { + if (ieta == etamp_ && depth < depMax_) + cfacmp_[depth] = scale * corrf; + if (ieta < etamn_ && depth == 1) etamn_ = ieta; - cfacmn_ = scale * corrf; - } + if (ieta == etamn_ && depth < depMax_) + cfacmn_[depth] = scale * corrf; } } fInput.close(); std::cout << "Reads total of " << all << " and " << good << " good records" - << " Max eta (z>0) " << etamp_ << ":" << cfacmp_ << " eta (z<0) " << etamn_ << ":" << cfacmn_ - << std::endl; + << " Max eta (z>0) " << etamp_ << " eta (z<0) " << etamn_ << std::endl; + for (int i = 0; i < depMax_; ++i) + std::cout << "[" << i << "] C+ " << cfacmp_[i] << " C- " << cfacmn_[i] << std::endl; if (good > 0) ok = true; } diff --git a/Calibration/HcalCalibAlgos/macros/CalibFitPlots.C b/Calibration/HcalCalibAlgos/macros/CalibFitPlots.C index 7c03062ffcec1..ecfec19afcd6c 100644 --- a/Calibration/HcalCalibAlgos/macros/CalibFitPlots.C +++ b/Calibration/HcalCalibAlgos/macros/CalibFitPlots.C @@ -36,8 +36,8 @@ // // For plotting on the same canvas plots with different // prefixes residing in the same file with approrprate text -// PlotTwoHists(infile, prefix1, text1, prefix2, text2, text0, type, iname, -// lumi, ener, drawStatBox, save); +// PlotTwoHists(infile, prefix1, text1, prefix2, text2, text0, type, iname, +// lumi, ener, drawStatBox, save); // Defaults: type=0; iname=2; lumi=0; ener=13; drawStatBox=true; // save=0; // Note prefixN, textN have the same meaning as prefix and text for set N @@ -46,8 +46,8 @@ // =1 plots MPV of response vs RBX # // // For plotting stored histograms from CalibTree -// PlotFiveHists(infile, text0, prefix0, type, iname, drawStatBox, normalize, -// save, prefix1, text1, prefix2, text2, prefix3, text3, +// PlotFiveHists(infile, text0, prefix0, type, iname, drawStatBox, normalize, +// save, prefix1, text1, prefix2, text2, prefix3, text3, // prefix4, text4, prefix5, text5); // Defaults: type=0; iname=0; drawStatBox=true; normalize=false; // save=0; prefixN=""; textN=""; (for N > 0) @@ -1222,6 +1222,7 @@ void PlotHistEta(const char* infile, int eta = (k > numb2) ? (k - numb2) : (k - numb2 - 1); sprintf(name, "%s%s%d%d", prefix.c_str(), name0.c_str(), iene, k); TH1D* hist1 = (TH1D*)file->FindObjectAny(name); + std::cout << name << " at " << hist1 << std::endl; if (hist1 != nullptr) { TH1D* hist = (TH1D*)(hist1->Clone()); double ymin(0.90); @@ -1928,8 +1929,8 @@ void PlotHistCorrFactor(char* infile, gStyle->SetOptStat(0); gStyle->SetOptFit(0); } - int colors[6] = {1, 6, 4, 7, 2, 9}; - int mtype[6] = {20, 21, 22, 23, 24, 33}; + int colors[7] = {1, 6, 4, 7, 2, 9, 3}; + int mtype[7] = {20, 21, 22, 23, 24, 33, 25}; int nbin = etamax - etamin + 1; std::vector hists; std::vector entries; diff --git a/Calibration/HcalCalibAlgos/macros/CalibMonitor.C b/Calibration/HcalCalibAlgos/macros/CalibMonitor.C index 48fc9f819346b..07b0f3a1473e0 100644 --- a/Calibration/HcalCalibAlgos/macros/CalibMonitor.C +++ b/Calibration/HcalCalibAlgos/macros/CalibMonitor.C @@ -935,7 +935,7 @@ void CalibMonitor::Loop() { break; nb = fChain->GetEntry(jentry); nbytes += nb; - if (jentry % 100000 == 0) + if (jentry % 1000000 == 0) std::cout << "Entry " << jentry << " Run " << t_Run << " Event " << t_Event << std::endl; double pmom = (useGen_ && (t_gentrackP > 0)) ? t_gentrackP : t_p; bool p4060 = ((pmom >= 40.0) && (pmom <= 60.0)); @@ -2623,7 +2623,7 @@ void CalibPlotProperties::Loop() { break; nb = fChain->GetEntry(jentry); nbytes += nb; - if (jentry % 100000 == 0) + if (jentry % 1000000 == 0) std::cout << "Entry " << jentry << " Run " << t_Run << " Event " << t_Event << std::endl; bool select = (std::find(entries_.begin(), entries_.end(), jentry) == entries_.end()); if (!select) { diff --git a/Calibration/HcalCalibAlgos/macros/CalibPlotProperties.C b/Calibration/HcalCalibAlgos/macros/CalibPlotProperties.C index ec16398c0f7ab..67a01be8feb53 100644 --- a/Calibration/HcalCalibAlgos/macros/CalibPlotProperties.C +++ b/Calibration/HcalCalibAlgos/macros/CalibPlotProperties.C @@ -778,7 +778,7 @@ void CalibPlotProperties::Loop(Long64_t nentries) { break; nb = fChain->GetEntry(jentry); nbytes += nb; - if (jentry % 100000 == 0) + if (jentry % 1000000 == 0) std::cout << "Entry " << jentry << " Run " << t_Run << " Event " << t_Event << std::endl; bool select = (std::find(entries_.begin(), entries_.end(), jentry) == entries_.end()); if (!select) { diff --git a/Calibration/HcalCalibAlgos/plugins/RecAnalyzerMinbias.cc b/Calibration/HcalCalibAlgos/plugins/RecAnalyzerMinbias.cc index a2f7df2318c64..ed141e7464677 100644 --- a/Calibration/HcalCalibAlgos/plugins/RecAnalyzerMinbias.cc +++ b/Calibration/HcalCalibAlgos/plugins/RecAnalyzerMinbias.cc @@ -195,12 +195,11 @@ RecAnalyzerMinbias::RecAnalyzerMinbias(const edm::ParameterSet& iConfig) : init_ edm::LogVerbatim("RecAnalyzer") << "Thresholds for HB " << eLowHB_ << ":" << eHighHB_ << " for HE " << eLowHE_ << ":" << eHighHE_ << " for HF " << eLowHF_ << ":" << eHighHF_; for (unsigned int k = 0; k < ieta.size(); ++k) { - HcalSubdetector subd = - ((std::abs(ieta[k]) > 29) ? HcalForward - : (std::abs(ieta[k]) > 16) ? HcalEndcap - : ((std::abs(ieta[k]) == 16) && (depth[k] == 3)) - ? HcalEndcap - : (depth[k] == 4) ? HcalOuter : HcalBarrel); + HcalSubdetector subd = ((std::abs(ieta[k]) > 29) ? HcalForward + : (std::abs(ieta[k]) > 16) ? HcalEndcap + : ((std::abs(ieta[k]) == 16) && (depth[k] == 3)) ? HcalEndcap + : (depth[k] == 4) ? HcalOuter + : HcalBarrel); unsigned int id = (HcalDetId(subd, ieta[k], iphi[k], depth[k])).rawId(); hcalID_.push_back(id); edm::LogVerbatim("RecAnalyzer") << "DetId[" << k << "] " << HcalDetId(id); diff --git a/Calibration/IsolatedParticles/interface/eECALMatrix.icc b/Calibration/IsolatedParticles/interface/eECALMatrix.icc index ef5642e6f5db2..e2009fb9df5a3 100644 --- a/Calibration/IsolatedParticles/interface/eECALMatrix.icc +++ b/Calibration/IsolatedParticles/interface/eECALMatrix.icc @@ -101,7 +101,7 @@ namespace spr { if (thisDet != DetId(0)) { std::vector hit; spr::findHit(hits, thisDet, hit, debug); - if (debug && hit.size() > 0) { + if (debug && !hit.empty()) { if (thisDet.subdetId() == EcalBarrel) { EBDetId id = thisDet; std::cout << "hitECALmatrix::Cell 0x" << std::hex << thisDet() << std::dec << " " << id; @@ -119,7 +119,7 @@ namespace spr { std::cout << " hit " << ihit << " " << hit[ihit]->energy(); } } - if (debug && hit.size() > 0) + if (debug && !hit.empty()) std::cout << std::endl; } diff --git a/CaloOnlineTools/HcalOnlineDb/bin/hcalLUT.cc b/CaloOnlineTools/HcalOnlineDb/bin/hcalLUT.cc index 6c1c9279185f6..4926a5cf4a69f 100644 --- a/CaloOnlineTools/HcalOnlineDb/bin/hcalLUT.cc +++ b/CaloOnlineTools/HcalOnlineDb/bin/hcalLUT.cc @@ -4,6 +4,7 @@ #include "TString.h" #include "PhysicsTools/FWLite/interface/CommandLineParser.h" #include "CaloOnlineTools/HcalOnlineDb/interface/HcalLutManager.h" +#include "FWCore/Utilities/interface/FileInPath.h" using namespace std; diff --git a/CaloOnlineTools/HcalOnlineDb/plugins/HcalLutAnalyzer.cc b/CaloOnlineTools/HcalOnlineDb/plugins/HcalLutAnalyzer.cc index 1605a68e18802..d9512abb8183e 100644 --- a/CaloOnlineTools/HcalOnlineDb/plugins/HcalLutAnalyzer.cc +++ b/CaloOnlineTools/HcalOnlineDb/plugins/HcalLutAnalyzer.cc @@ -230,8 +230,10 @@ void HcalLutAnalyzer::analyze(const edm::Event&, const edm::EventSetup& iSetup) float theval = (val1 + val2 + val3 + val4) / 4.0; - HcalSubdetector subdet = - det == "HB" ? HcalBarrel : det == "HE" ? HcalEndcap : det == "HF" ? HcalForward : HcalOther; + HcalSubdetector subdet = det == "HB" ? HcalBarrel + : det == "HE" ? HcalEndcap + : det == "HF" ? HcalForward + : HcalOther; HcalDetId id(subdet, ieta, iphi, idep); lutgain[ii].insert(LUTINPUT::value_type(id.rawId(), theval)); @@ -254,8 +256,10 @@ void HcalLutAnalyzer::analyze(const edm::Event&, const edm::EventSetup& iSetup) float theval = (val1 + val2 + val3 + val4) / 4.0; - HcalSubdetector subdet = - det == "HB" ? HcalBarrel : det == "HE" ? HcalEndcap : det == "HF" ? HcalForward : HcalOther; + HcalSubdetector subdet = det == "HB" ? HcalBarrel + : det == "HE" ? HcalEndcap + : det == "HF" ? HcalForward + : HcalOther; HcalDetId id(subdet, ieta, iphi, idep); lutpede[ii].insert(LUTINPUT::value_type(id.rawId(), theval)); @@ -277,8 +281,10 @@ void HcalLutAnalyzer::analyze(const edm::Event&, const edm::EventSetup& iSetup) float theval = val1; - HcalSubdetector subdet = - det == "HB" ? HcalBarrel : det == "HE" ? HcalEndcap : det == "HF" ? HcalForward : HcalOther; + HcalSubdetector subdet = det == "HB" ? HcalBarrel + : det == "HE" ? HcalEndcap + : det == "HF" ? HcalForward + : HcalOther; HcalDetId id(subdet, ieta, iphi, idep); lutresp[ii].insert(LUTINPUT::value_type(id.rawId(), theval)); @@ -298,9 +304,11 @@ void HcalLutAnalyzer::analyze(const edm::Event&, const edm::EventSetup& iSetup) float theval = val1; - HcalSubdetector subdet = - det == "HB" ? HcalBarrel - : det == "HE" ? HcalEndcap : det == "HF" ? HcalForward : det == "HO" ? HcalOuter : HcalOther; + HcalSubdetector subdet = det == "HB" ? HcalBarrel + : det == "HE" ? HcalEndcap + : det == "HF" ? HcalForward + : det == "HO" ? HcalOuter + : HcalOther; HcalDetId id(subdet, ieta, iphi, idep); if (theval != 0) diff --git a/CommonTools/CandUtils/interface/makeCompositeCandidate.h b/CommonTools/CandUtils/interface/makeCompositeCandidate.h index 8d86f9a5fb50b..110a1467cd911 100644 --- a/CommonTools/CandUtils/interface/makeCompositeCandidate.h +++ b/CommonTools/CandUtils/interface/makeCompositeCandidate.h @@ -18,7 +18,7 @@ namespace helpers { private: std::unique_ptr cmp_; std::unique_ptr release() { - std::unique_ptr ret(std::move(cmp_.get())); + std::unique_ptr ret(cmp_.get()); cmp_.release(); return ret; } @@ -61,7 +61,7 @@ helpers::CompositeCandidateMaker makeCompositeCandidate(const reco::Candidate& c template helpers::CompositeCandidateMaker makeCompositeCandidate(const typename C::const_iterator& begin, const typename C::const_iterator& end) { - helpers::CompositeCandidateMaker cmp(std::unique_ptr(new reco::CompositeCandidate)); + helpers::CompositeCandidateMaker cmp(std::make_unique()); for (typename C::const_iterator i = begin; i != end; ++i) cmp.addDaughter(*i); return cmp; @@ -82,7 +82,7 @@ helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster(const re template helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster(const typename C::const_iterator& begin, const typename C::const_iterator& end) { - helpers::CompositeCandidateMaker cmp(std::unique_ptr(new reco::CompositeCandidate)); + helpers::CompositeCandidateMaker cmp(std::make_unique()); for (typename C::const_iterator i = begin; i != end; ++i) cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(*i))); return cmp; diff --git a/CommonTools/CandUtils/interface/makeNamedCompositeCandidate.h b/CommonTools/CandUtils/interface/makeNamedCompositeCandidate.h index 33a0349207127..3e11f80995e22 100644 --- a/CommonTools/CandUtils/interface/makeNamedCompositeCandidate.h +++ b/CommonTools/CandUtils/interface/makeNamedCompositeCandidate.h @@ -59,8 +59,7 @@ helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate(const typename const typename C::const_iterator& end, const std::vector::const_iterator sbegin, const std::vector::const_iterator send) { - helpers::NamedCompositeCandidateMaker cmp( - std::unique_ptr(new reco::NamedCompositeCandidate)); + helpers::NamedCompositeCandidateMaker cmp(std::make_unique()); std::vector::const_iterator si = sbegin; for (typename C::const_iterator i = begin; i != end && si != send; ++i, ++si) cmp.addDaughter(*i, *si); @@ -94,8 +93,7 @@ helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaste const typename C::const_iterator& end, const std::vector::const_iterator sbegin, const std::vector::const_iterator send) { - helpers::NamedCompositeCandidateMaker cmp( - std::unique_ptr(new reco::NamedCompositeCandidate)); + helpers::NamedCompositeCandidateMaker cmp(std::make_unique()); std::vector::const_iterator si = sbegin; for (typename C::const_iterator i = begin; i != end && si != send; ++i, ++si) cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(*i)), *si); diff --git a/CommonTools/Clustering1D/interface/Cluster1DCleaner.h b/CommonTools/Clustering1D/interface/Cluster1DCleaner.h index c9a1bffb37c0e..606bc0caf43a6 100644 --- a/CommonTools/Clustering1D/interface/Cluster1DCleaner.h +++ b/CommonTools/Clustering1D/interface/Cluster1DCleaner.h @@ -50,7 +50,7 @@ void Cluster1DCleaner::cleanCluster1Ds(const std::vector >& _clu std::vector > clust = _clust; theCleanedCluster1Ds.clear(); theDiscardedCluster1Ds.clear(); - if (clust.size() == 0) + if (clust.empty()) return; float oldPos = average(clust); for (typename std::vector >::const_iterator ic = clust.begin(); ic != clust.end(); ic++) { diff --git a/CommonTools/Clustering1D/interface/DivisiveClusterizer1D.h b/CommonTools/Clustering1D/interface/DivisiveClusterizer1D.h index 0a563b6c1f12c..05846c7c2603c 100644 --- a/CommonTools/Clustering1D/interface/DivisiveClusterizer1D.h +++ b/CommonTools/Clustering1D/interface/DivisiveClusterizer1D.h @@ -183,7 +183,7 @@ std::vector > DivisiveClusterizer1D::makeCluster1Ds(std::vector< template void DivisiveClusterizer1D::insertTracks(std::vector >& clusou, std::vector >& cludest) const { - if (clusou.size() == 0) + if (clusou.empty()) return; for (typename std::vector >::const_iterator iclu = clusou.begin(); iclu != clusou.end(); iclu++) { cludest.push_back(*iclu); diff --git a/CommonTools/ParticleFlow/plugins/PFCandidateRecalibrator.cc b/CommonTools/ParticleFlow/plugins/PFCandidateRecalibrator.cc index d2515c4788d28..afc9bbf89617b 100644 --- a/CommonTools/ParticleFlow/plugins/PFCandidateRecalibrator.cc +++ b/CommonTools/ParticleFlow/plugins/PFCandidateRecalibrator.cc @@ -11,6 +11,8 @@ #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/ESWatcher.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Event.h" diff --git a/CommonTools/ParticleFlow/plugins/TopProjector.h b/CommonTools/ParticleFlow/plugins/TopProjector.h index 9594d69202efa..7b4015c2b97cc 100644 --- a/CommonTools/ParticleFlow/plugins/TopProjector.h +++ b/CommonTools/ParticleFlow/plugins/TopProjector.h @@ -153,7 +153,7 @@ class TopProjector : public edm::stream::EDProducer<> { TopProjector(const edm::ParameterSet&); - ~TopProjector() = default; + ~TopProjector() override = default; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); diff --git a/CommonTools/RecoAlgos/interface/TrackFullCloneSelectorBase.h b/CommonTools/RecoAlgos/interface/TrackFullCloneSelectorBase.h index 1bf260c7c5032..df57569202403 100644 --- a/CommonTools/RecoAlgos/interface/TrackFullCloneSelectorBase.h +++ b/CommonTools/RecoAlgos/interface/TrackFullCloneSelectorBase.h @@ -12,16 +12,18 @@ * */ -#include -#include #include -#include -#include -#include "FWCore/Framework/interface/stream/EDProducer.h" -#include "FWCore/Framework/interface/Event.h" + #include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/InputTag.h" +#include +#include +#include +#include +#include #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/TrackReco/interface/Track.h" @@ -63,10 +65,10 @@ namespace reco { edm::Handle hSrcTrack; evt.getByToken(hSrcTrackToken_, hSrcTrack); - selTracks_ = std::unique_ptr(new reco::TrackCollection()); + selTracks_ = std::make_unique(); if (copyExtras_) { - selTrackExtras_ = std::unique_ptr(new reco::TrackExtraCollection()); - selHits_ = std::unique_ptr(new TrackingRecHitCollection()); + selTrackExtras_ = std::make_unique(); + selHits_ = std::make_unique(); } TrackRefProd rTracks = evt.template getRefBeforePut(); @@ -125,8 +127,8 @@ namespace reco { evt.getByToken(hTTAssToken_, hTTAss); evt.getByToken(hTrajToken_, hTraj); edm::RefProd > TrajRefProd = evt.template getRefBeforePut >(); - selTrajs_ = std::unique_ptr >(new std::vector()); - selTTAss_ = std::unique_ptr(new TrajTrackAssociationCollection()); + selTrajs_ = std::make_unique >(); + selTTAss_ = std::make_unique(); for (size_t i = 0, n = hTraj->size(); i < n; ++i) { edm::Ref > trajRef(hTraj, i); TrajTrackAssociationCollection::const_iterator match = hTTAss->find(trajRef); diff --git a/CommonTools/TriggerUtils/interface/PrescaleWeightProvider.h b/CommonTools/TriggerUtils/interface/PrescaleWeightProvider.h index cb8d4b3ce0c9e..3b8773ff6057c 100644 --- a/CommonTools/TriggerUtils/interface/PrescaleWeightProvider.h +++ b/CommonTools/TriggerUtils/interface/PrescaleWeightProvider.h @@ -88,6 +88,6 @@ PrescaleWeightProvider::PrescaleWeightProvider(const edm::ParameterSet& config, template PrescaleWeightProvider::PrescaleWeightProvider(const edm::ParameterSet& config, edm::ConsumesCollector& iC, T& module) : PrescaleWeightProvider(config, iC) { - hltPrescaleProvider_.reset(new HLTPrescaleProvider(config, iC, module)); + hltPrescaleProvider_ = std::make_unique(config, iC, module); } #endif diff --git a/CommonTools/UtilAlgos/interface/TFileService.h b/CommonTools/UtilAlgos/interface/TFileService.h index 6b9ea557f5219..06426a2bd4aa3 100644 --- a/CommonTools/UtilAlgos/interface/TFileService.h +++ b/CommonTools/UtilAlgos/interface/TFileService.h @@ -61,7 +61,7 @@ class TFileService { /// make new ROOT object template - T *make(const Args &... args) const { + T *make(const Args &...args) const { return tFileDirectory_.make(args...); } diff --git a/CommonTools/Utils/interface/EtComparator.h b/CommonTools/Utils/interface/EtComparator.h index 5908edc3bec37..d5f3db89eb7b1 100644 --- a/CommonTools/Utils/interface/EtComparator.h +++ b/CommonTools/Utils/interface/EtComparator.h @@ -34,10 +34,9 @@ struct NumericSafeLessByEt { typedef T first_argument_type; typedef T second_argument_type; bool operator()(const T& a1, const T& a2) { - return fabs(a1.et() - a2.et()) > std::numeric_limits::epsilon() - ? a1.et() < a2.et() - : fabs(a1.px() - a2.px()) > std::numeric_limits::epsilon() ? a1.px() < a2.px() - : a1.pz() < a2.pz(); + return fabs(a1.et() - a2.et()) > std::numeric_limits::epsilon() ? a1.et() < a2.et() + : fabs(a1.px() - a2.px()) > std::numeric_limits::epsilon() ? a1.px() < a2.px() + : a1.pz() < a2.pz(); } }; @@ -46,10 +45,9 @@ struct NumericSafeGreaterByEt { typedef T first_argument_type; typedef T second_argument_type; bool operator()(const T& a1, const T& a2) { - return fabs(a1.et() - a2.et()) > std::numeric_limits::epsilon() - ? a1.et() > a2.et() - : fabs(a1.px() - a2.px()) > std::numeric_limits::epsilon() ? a1.px() > a2.px() - : a1.pz() > a2.pz(); + return fabs(a1.et() - a2.et()) > std::numeric_limits::epsilon() ? a1.et() > a2.et() + : fabs(a1.px() - a2.px()) > std::numeric_limits::epsilon() ? a1.px() > a2.px() + : a1.pz() > a2.pz(); } }; diff --git a/CommonTools/Utils/interface/PtComparator.h b/CommonTools/Utils/interface/PtComparator.h index c4a9dbd906380..fa8ece7d56a14 100644 --- a/CommonTools/Utils/interface/PtComparator.h +++ b/CommonTools/Utils/interface/PtComparator.h @@ -35,10 +35,9 @@ struct NumericSafeLessByPt { typedef T first_argument_type; typedef T second_argument_type; bool operator()(const T& a1, const T& a2) { - return fabs(a1.pt() - a2.pt()) > std::numeric_limits::epsilon() - ? a1.pt() < a2.pt() - : fabs(a1.px() - a2.px()) > std::numeric_limits::epsilon() ? a1.px() < a2.px() - : a1.pz() < a2.pz(); + return fabs(a1.pt() - a2.pt()) > std::numeric_limits::epsilon() ? a1.pt() < a2.pt() + : fabs(a1.px() - a2.px()) > std::numeric_limits::epsilon() ? a1.px() < a2.px() + : a1.pz() < a2.pz(); } }; @@ -47,10 +46,9 @@ struct NumericSafeGreaterByPt { typedef T first_argument_type; typedef T second_argument_type; bool operator()(const T& a1, const T& a2) { - return fabs(a1.pt() - a2.pt()) > std::numeric_limits::epsilon() - ? a1.pt() > a2.pt() - : fabs(a1.px() - a2.px()) > std::numeric_limits::epsilon() ? a1.px() > a2.px() - : a1.pz() > a2.pz(); + return fabs(a1.pt() - a2.pt()) > std::numeric_limits::epsilon() ? a1.pt() > a2.pt() + : fabs(a1.px() - a2.px()) > std::numeric_limits::epsilon() ? a1.px() > a2.px() + : a1.pz() > a2.pz(); } }; diff --git a/CommonTools/Utils/interface/TFileDirectory.h b/CommonTools/Utils/interface/TFileDirectory.h index b47bd1d7684e4..4a842be92d9d4 100644 --- a/CommonTools/Utils/interface/TFileDirectory.h +++ b/CommonTools/Utils/interface/TFileDirectory.h @@ -50,7 +50,7 @@ class TFileDirectory { /// make new ROOT object template - T *make(const Args &... args) const { + T *make(const Args &...args) const { TDirectory *d = _cd(); T *t = new T(args...); ROOT::DirAutoAdd_t func = T::Class()->GetDirectoryAutoAdd(); diff --git a/CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h b/CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h index 917a1d03043d6..37cb68ed40ef7 100644 --- a/CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h +++ b/CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h @@ -237,7 +237,7 @@ namespace BeamSpotPI { canvas.cd(1)->Modified(); canvas.cd(1)->SetGrid(); - auto h2_BSParameters = std::unique_ptr(new TH2F("Parameters", "", 2, 0.0, 2.0, 8, 0, 8.)); + auto h2_BSParameters = std::make_unique("Parameters", "", 2, 0.0, 2.0, 8, 0, 8.); h2_BSParameters->SetStats(false); std::function cutFunctor = [this](parameters my_param, bool isError) { diff --git a/CondCore/CondDB/interface/CredentialStore.h b/CondCore/CondDB/interface/CredentialStore.h index fc412b212001e..669d5dcc3498f 100644 --- a/CondCore/CondDB/interface/CredentialStore.h +++ b/CondCore/CondDB/interface/CredentialStore.h @@ -7,6 +7,7 @@ #include #include #include +#include // #include "CoralBase/MessageStream.h" @@ -19,10 +20,9 @@ namespace coral { } // namespace coral -std::string to_lower(const std::string& s) { +inline std::string to_lower(const std::string& s) { std::string str(s); - for (auto& c : str) - c = tolower(c); + std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c) { return std::tolower(c); }); return str; } diff --git a/CondCore/CondDB/plugins/BuildFile.xml b/CondCore/CondDB/plugins/BuildFile.xml index 873b89aacbe36..dbdf4655e78cd 100644 --- a/CondCore/CondDB/plugins/BuildFile.xml +++ b/CondCore/CondDB/plugins/BuildFile.xml @@ -5,7 +5,7 @@ - + diff --git a/CondCore/CondDB/plugins/RelationalAuthenticationService.cc b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc index df072b5bedd4a..e892326549dfb 100644 --- a/CondCore/CondDB/plugins/RelationalAuthenticationService.cc +++ b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc @@ -16,15 +16,17 @@ #include #include -#include +#include #include "CoralBase/MessageStream.h" cond::RelationalAuthenticationService::RelationalAuthenticationService::RelationalAuthenticationService( const std::string& key) : coral::Service(key), m_authenticationPath(""), m_db(), m_cache(), m_callbackID(0) { - boost::function1 cb(boost::bind( - &cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath, this, _1)); + boost::function1 cb( + boost::bind(&cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath, + this, + boost::placeholders::_1)); coral::Property* pm = dynamic_cast( coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY)); diff --git a/CondCore/EcalPlugins/plugins/ESChannelStatus_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/ESChannelStatus_PayloadInspector.cc index 1de368e5e8201..1f02e9b428bd2 100644 --- a/CondCore/EcalPlugins/plugins/ESChannelStatus_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/ESChannelStatus_PayloadInspector.cc @@ -21,9 +21,9 @@ namespace { enum { kESChannels = 137216 }; enum { IX_MIN = 1, IY_MIN = 1, IX_MAX = 40, IY_MAX = 40 }; // endcaps lower and upper bounds on x and y - /********************************************************* - 2d plot of ES channel status of 1 IOV - *********************************************************/ + /******************************************** + 2d plot of ES channel status of 1 IOV + *********************************************/ class ESChannelStatusPlot : public cond::payloadInspector::PlotImage { public: ESChannelStatusPlot() : cond::payloadInspector::PlotImage("ES channel status") { @@ -117,9 +117,9 @@ namespace { } // fill method }; - /************************************************************************ - 2d plot of ES channel status difference between 2 IOVs - ************************************************************************/ + /************************************************************* + 2d plot of ES channel status difference between 2 IOVs + **************************************************************/ template class ESChannelStatusDiffBase : public cond::payloadInspector::PlotImage { public: @@ -200,15 +200,19 @@ namespace { t1.SetNDC(); t1.SetTextAlign(26); int len = l_tagname[0].length() + l_tagname[1].length(); - if (ntags == 2 && len < 60) { - t1.SetTextSize(0.03); - t1.DrawLatex( - 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + if (ntags == 2) { + if (len < 60) { + t1.SetTextSize(0.03); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("ES Channel Status, IOV %i - %i", run[1], run[0])); + } } else { t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("ES Channel Status, IOV %i - %i", run[1], run[0])); + t1.DrawLatex(0.5, 0.96, Form("%s IOV %i - %i", l_tagname[0].c_str(), run[1], run[0])); } - t1.SetTextSize(0.025); float xmi[2] = {0.0, 0.5}; float xma[2] = {0.5, 1.0}; diff --git a/CondCore/EcalPlugins/plugins/ESIntercalibConstants_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/ESIntercalibConstants_PayloadInspector.cc index d4ad8bb8ca03c..d04270dcc2c26 100644 --- a/CondCore/EcalPlugins/plugins/ESIntercalibConstants_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/ESIntercalibConstants_PayloadInspector.cc @@ -112,13 +112,12 @@ namespace { /************************************************************************ 2d plot of ES channel status difference between 2 IOVs ************************************************************************/ - class ESIntercalibConstantsDiff : public cond::payloadInspector::PlotImage { + template + class ESIntercalibConstantsDiffBase : public cond::payloadInspector::PlotImage { public: - ESIntercalibConstantsDiff() - : cond::payloadInspector::PlotImage("ES IntercalibConstants difference") { - setSingleIov(false); - } - bool fill(const std::vector >& iovs) override { + ESIntercalibConstantsDiffBase() + : cond::payloadInspector::PlotImage("ES IntercalibConstants difference") {} + bool fill() override { TH2F*** esmap = new TH2F**[2]; std::string title[2][2] = {{"ES+F", "ES-F"}, {"ES+R", "ES-R"}}; for (int plane = 0; plane < 2; plane++) { @@ -127,12 +126,30 @@ namespace { esmap[plane][side] = new TH2F( Form("esmap%i%i", plane, side), title[plane][side].c_str(), IX_MAX, 0, IX_MAX, IY_MAX, 0, IY_MAX); } - unsigned int run[2], irun = 0; + unsigned int run[2]; + std::string l_tagname[2]; float val[kESChannels], valmin = 999.; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - // std::cout << " irun " << irun << " IOV " << run[irun] << std::endl; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { for (int id = 0; id < kESChannels; id++) // looping over all the ES channels if (ESDetId::validHashIndex(id)) { @@ -165,8 +182,7 @@ namespace { } // 2nd IOV } // validHashIndex } // payload - irun++; - } // loop over IOVs + } // loop over IOVs gStyle->SetOptStat(0); gStyle->SetPalette(1); @@ -174,10 +190,15 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("ES Intercalib Constants, IOV %i - %i", run[1], run[0])); - t1.SetTextSize(0.025); - + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2 && len < 58) { + t1.SetTextSize(0.025); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("ES Intercalib Constants, IOV %i - %i", run[1], run[0])); + } float xmi[2] = {0.0, 0.5}; float xma[2] = {0.5, 1.0}; TPad*** pad = new TPad**[2]; @@ -203,15 +224,19 @@ namespace { } } - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class ESIntercalibConstantsDiffBase + using ESIntercalibConstantsDiffOneTag = ESIntercalibConstantsDiffBase; + using ESIntercalibConstantsDiffTwoTags = ESIntercalibConstantsDiffBase; + } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(ESIntercalibConstants) { PAYLOAD_INSPECTOR_CLASS(ESIntercalibConstantsPlot); - PAYLOAD_INSPECTOR_CLASS(ESIntercalibConstantsDiff); + PAYLOAD_INSPECTOR_CLASS(ESIntercalibConstantsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(ESIntercalibConstantsDiffTwoTags); } diff --git a/CondCore/EcalPlugins/plugins/EcalAlignment_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalAlignment_PayloadInspector.cc index af6db7749f596..58251537869de 100644 --- a/CondCore/EcalPlugins/plugins/EcalAlignment_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalAlignment_PayloadInspector.cc @@ -122,24 +122,44 @@ namespace { }; /********************************************************* - 2d plot of ECAL Alignment difference between 2 IOVs - **********************************************************/ - class EcalAlignmentDiff : public cond::payloadInspector::PlotImage { + 2d plot of ECAL Alignment difference between 2 IOVs + **********************************************************/ + template + class EcalAlignmentDiffBase : public cond::payloadInspector::PlotImage { public: - EcalAlignmentDiff() : cond::payloadInspector::PlotImage("ECAL Alignment difference") { - setSingleIov(false); - } + EcalAlignmentDiffBase() + : cond::payloadInspector::PlotImage("ECAL Alignment difference") {} - bool fill(const std::vector >& iovs) override { - unsigned int run[2], irun = 0; + bool fill() override { + unsigned int run[2]; float val[6][36]; TH2F* align = new TH2F("", "", 1, 0., 1., 1, 0., 1.); // pseudo creation std::string subdet; int NbRows = 0; + std::string l_tagname[2]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { NbRows = (*payload).m_align.size(); @@ -190,7 +210,6 @@ namespace { } // if payload.get() else return false; - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -199,10 +218,16 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); t1.SetTextColor(2); - t1.DrawLatex(0.5, 0.96, Form("Ecal %s Alignment, IOV %i - %i", subdet.c_str(), run[1], run[0])); - + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2 && len < 58) { + t1.SetTextSize(0.025); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal %s Alignment, IOV %i - %i", subdet.c_str(), run[1], run[0])); + } TPad* pad = new TPad("pad", "pad", 0.0, 0.0, 1.0, 0.94); pad->Draw(); pad->cd(); @@ -228,16 +253,19 @@ namespace { align->GetYaxis()->SetTickLength(0.); align->GetYaxis()->SetLabelSize(0.); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalAlignmentDiffBase + using EcalAlignmentDiffOneTag = EcalAlignmentDiffBase; + using EcalAlignmentDiffTwoTags = EcalAlignmentDiffBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalAlignment) { PAYLOAD_INSPECTOR_CLASS(EcalAlignmentPlot); - PAYLOAD_INSPECTOR_CLASS(EcalAlignmentDiff); + PAYLOAD_INSPECTOR_CLASS(EcalAlignmentDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalAlignmentDiffTwoTags); } diff --git a/CondCore/EcalPlugins/plugins/EcalChannelStatus_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalChannelStatus_PayloadInspector.cc index 45691dfd60369..95d96559db105 100644 --- a/CondCore/EcalPlugins/plugins/EcalChannelStatus_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalChannelStatus_PayloadInspector.cc @@ -388,18 +388,17 @@ namespace { ebmap_coarse->Draw("text,same"); int len = l_tagname[0].length() + l_tagname[1].length(); - if (ntags == 2 && len < 60) { - t1.SetTextSize(0.03); - t1.DrawLatex(0.5, - 0.96, - Form("EB Channel Status Masks (Diff), %s IOV %i - %s IOV %i", - l_tagname[1].c_str(), - run[1], - l_tagname[0].c_str(), - run[0])); + if (ntags == 2) { + if (len < 60) { + t1.SetTextSize(0.03); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("EB Channel Status Masks (Diff), IOV %i - IOV %i", run[1], run[0])); } else { t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("EB Channel Status Masks (Diff), IOV: %i vs %i", run[0], run[1])); + t1.DrawLatex(0.5, 0.96, Form("%s IOV: %i - %i", l_tagname[0].c_str(), run[1], run[0])); } char txt[80]; @@ -560,18 +559,18 @@ namespace { t1.SetTextColor(1); int len = l_tagname[0].length() + l_tagname[1].length(); - if (ntags == 2 && len < 60) { - t1.SetTextSize(0.03); - t1.DrawLatex(0.5, - 0.96, - Form("EE Channel Status Masks (Diff), %s IOV %i - %s IOV %i", - l_tagname[1].c_str(), - run[1], - l_tagname[0].c_str(), - run[0])); + if (ntags == 2) { + if (len < 60) { + t1.SetTextSize(0.03); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("EE Channel Status Masks (Diff), IOV %i - IOV %i", run[1], run[0])); + } } else { t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("EE Channel Status Masks (Diff), IOV %i vs %i", run[0], run[1])); + t1.DrawLatex(0.5, 0.96, Form("%s IOV: %i - %i", l_tagname[0].c_str(), run[1], run[0])); } char txt[80]; @@ -592,9 +591,9 @@ namespace { using EcalChannelStatusEEDiffOneTag = EcalChannelStatusEEDiffBase; using EcalChannelStatusEEDiffTwoTags = EcalChannelStatusEEDiffBase; - /***************************************** - 2d plot of EcalChannelStatus Error Summary of 1 IOV - ******************************************/ + /******************************************************** + 2d plot of EcalChannelStatus Error Summary of 1 IOV + ********************************************************/ class EcalChannelStatusSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalChannelStatusSummaryPlot() diff --git a/CondCore/EcalPlugins/plugins/EcalDQMChannelStatus_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalDQMChannelStatus_PayloadInspector.cc index a8b2d977c8661..13f0116bc67c3 100644 --- a/CondCore/EcalPlugins/plugins/EcalDQMChannelStatus_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalDQMChannelStatus_PayloadInspector.cc @@ -22,8 +22,8 @@ namespace { enum { IX_MIN = 1, IY_MIN = 1, IX_MAX = 100, IY_MAX = 100 }; // endcaps lower and upper bounds on x and y /******************************************************* - 2d plot of ECAL barrel DQM channel status of 1 IOV - *******************************************************/ + 2d plot of ECAL barrel DQM channel status of 1 IOV + *******************************************************/ class EcalDQMChannelStatusEBMap : public cond::payloadInspector::PlotImage { public: EcalDQMChannelStatusEBMap() @@ -135,8 +135,8 @@ namespace { }; /******************************************************* - 2d plot of ECAL Endcap DQM channel status of 1 IOV -*******************************************************/ + 2d plot of ECAL Endcap DQM channel status of 1 IOV + *******************************************************/ class EcalDQMChannelStatusEEMap : public cond::payloadInspector::PlotImage { public: EcalDQMChannelStatusEEMap() @@ -281,27 +281,44 @@ namespace { /********************************************************************** 2d plot of ECAL barrel DQM channel status difference between 2 IOVs -***********************************************************************/ - class EcalDQMChannelStatusEBDiff : public cond::payloadInspector::PlotImage { + ***********************************************************************/ + template + class EcalDQMChannelStatusEBDiffBase : public cond::payloadInspector::PlotImage { public: - EcalDQMChannelStatusEBDiff() - : cond::payloadInspector::PlotImage("ECAL Barrel DQM channel status difference") { - setSingleIov(false); - } - bool fill(const std::vector > &iovs) override { + EcalDQMChannelStatusEBDiffBase() + : cond::payloadInspector::PlotImage( + "ECAL Barrel DQM channel status difference") {} + bool fill() override { TH2F *ebmap = new TH2F("ebmap", "", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F *ebmap_coarse = new TH2F("ebmap_coarse", "", MAX_IPHI / 20, 0, MAX_IPHI, 2, -MAX_IETA, MAX_IETA); Int_t ebcount = 0; - unsigned int run[2], irun = 0, status[kEBChannels]; - for (auto const &iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); + unsigned int run[2], status[kEBChannels]; + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { // looping over the EB channels, via the dense-index, mapped into EBDetId's if (payload->barrelItems().empty()) return false; - - run[irun] = std::get<0>(iov); - for (int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) { uint32_t rawid = EBDetId::unhashIndex(cellid); // check the existence of ECAL channel status, for a given ECAL barrel channel @@ -333,8 +350,7 @@ namespace { } } } // loop over cellid - irun++; - } // if payload.get() + } // if payload.get() else return false; } // loop over IOV's @@ -386,40 +402,67 @@ namespace { ebmap_coarse->SetMarkerSize(1.3); ebmap_coarse->Draw("text,same"); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("EB DQM Channel Status (Diff), IOV: %i vs %i", run[0], run[1])); - + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2 && len < 58) { + t1.SetTextSize(0.025); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("EB DQM Channel Status (Diff), IOV: %i vs %i", run[0], run[1])); + } char txt[80]; sprintf(txt, "Net difference: %d channel(s)", ebcount); t1.SetTextColor(2); t1.SetTextSize(0.045); t1.DrawLatex(0.5, 0.91, txt); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); c1.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalDQMChannelStatusEBDiffBase + using EcalDQMChannelStatusEBDiffOneTag = EcalDQMChannelStatusEBDiffBase; + using EcalDQMChannelStatusEBDiffTwoTags = EcalDQMChannelStatusEBDiffBase; /************************************************************************ 2d plot of ECAL endcaps DQM channel status difference between 2 IOVs - ************************************************************************/ - class EcalDQMChannelStatusEEDiff : public cond::payloadInspector::PlotImage { + ************************************************************************/ + template + class EcalDQMChannelStatusEEDiffBase : public cond::payloadInspector::PlotImage { public: - EcalDQMChannelStatusEEDiff() - : cond::payloadInspector::PlotImage("ECAL Endcaps DQM channel status difference") { - setSingleIov(true); - } + EcalDQMChannelStatusEEDiffBase() + : cond::payloadInspector::PlotImage( + "ECAL Endcaps DQM channel status difference") {} - bool fill(const std::vector > &iovs) override { + bool fill() override { TH2F *eemap = new TH2F("eemap", "", 2 * IX_MAX, 0, 2 * IX_MAX, IY_MAX, 0, IY_MAX); TH2F *eemap_coarse = new TH2F("eemap_coarse", "", 2, 0, 2 * IX_MAX, 1, 0, IY_MAX); TH2F *eetemp = new TH2F("eetemp", "", 2 * IX_MAX, 0, 2 * IX_MAX, IY_MAX, 0, IY_MAX); Int_t eecount = 0; - unsigned int run[2], irun = 0, status[kEEChannels]; - for (auto const &iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + unsigned int run[2], status[kEEChannels]; + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { if (payload->endcapItems().empty()) return false; @@ -459,9 +502,8 @@ namespace { } // any difference ? } // 2nd IOV, fill the plots } // validDetId - irun++; - } // get the payload - } // loop over payloads + } // get the payload + } // loop over payloads gStyle->SetOptStat(0); //set the background color to white @@ -528,9 +570,15 @@ namespace { eemap_coarse->Draw("same,text"); t1.SetTextColor(1); - t1.SetTextSize(0.055); - t1.DrawLatex(0.5, 0.96, Form("EE DQM Channel Status (Diff), IOV %i vs %i", run[0], run[1])); - + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2 && len < 58) { + t1.SetTextSize(0.025); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.055); + t1.DrawLatex(0.5, 0.96, Form("EE DQM Channel Status (Diff), IOV %i vs %i", run[0], run[1])); + } char txt[80]; sprintf(txt, "Net difference: %d channel(s)", eecount); t1.SetTextColor(2); @@ -541,11 +589,13 @@ namespace { t1.DrawLatex(0.14, 0.84, "EE-"); t1.DrawLatex(0.86, 0.84, "EE+"); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); c1.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalDQMChannelStatusEEDiffBase + using EcalDQMChannelStatusEEDiffOneTag = EcalDQMChannelStatusEEDiffBase; + using EcalDQMChannelStatusEEDiffTwoTags = EcalDQMChannelStatusEEDiffBase; } // namespace @@ -553,6 +603,8 @@ namespace { PAYLOAD_INSPECTOR_MODULE(EcalDQMChannelStatus) { PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEBMap); PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEEMap); - PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEBDiff); - PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEEDiff); -} \ No newline at end of file + PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEBDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEBDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEEDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEEDiffTwoTags); +} diff --git a/CondCore/EcalPlugins/plugins/EcalDQMTowerStatus_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalDQMTowerStatus_PayloadInspector.cc index 6741a2d02c9db..5eaee06035cc2 100644 --- a/CondCore/EcalPlugins/plugins/EcalDQMTowerStatus_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalDQMTowerStatus_PayloadInspector.cc @@ -126,28 +126,44 @@ namespace { } // fill method }; - /*********************************************** + /*************************************************** 2d plot of EcalDQMTowerStatus Diff between 2 IOV -************************************************/ - class EcalDQMTowerStatusDiffPlot : public cond::payloadInspector::PlotImage { + ****************************************************/ + template + class EcalDQMTowerStatusDiffBase : public cond::payloadInspector::PlotImage { public: - EcalDQMTowerStatusDiffPlot() - : cond::payloadInspector::PlotImage("EcalDQMTowerStatusDiff - map ") { - setSingleIov(false); - } - - bool fill(const std::vector >& iovs) override { + EcalDQMTowerStatusDiffBase() + : cond::payloadInspector::PlotImage("EcalDQMTowerStatusDiff - map ") {} + bool fill() override { TH2F* barrel = new TH2F("EB", "EB DQM Tower Status", 72, 0, 72, 34, -17, 17); TH2F* endc_p = new TH2F("EE+", "EE+ DQM Tower Status", 22, 0, 22, 22, 0, 22); TH2F* endc_m = new TH2F("EE-", "EE- DQM Tower Status", 22, 0, 22, 22, 0, 22); - unsigned int run[2], irun = 0; + unsigned int run[2]; float pEB[kEBTotalTowers], pEE[kEETotalTowers]; - - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { for (uint cellid = 0; cellid < EcalTrigTowerDetId::kEBTotalTowers; ++cellid) { if (payload->barrelItems().empty()) @@ -215,18 +231,22 @@ namespace { } } } - } // payload - irun++; } TCanvas canvas("CC map", "CC map", 800, 800); TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.04); - t1.DrawLatex(0.5, 0.96, Form("Ecal DQM Tower Status (Diff), IOV %i vs %i", run[0], run[1])); - + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2 && len < 58) { + t1.SetTextSize(0.025); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.04); + t1.DrawLatex(0.5, 0.96, Form("Ecal DQM Tower Status (Diff), IOV %i vs %i", run[0], run[1])); + } TPad* padb = new TPad("padb", "padb", 0., 0.45, 1., 0.9); padb->Draw(); TPad* padem = new TPad("padem", "padem", 0., 0., 0.45, 0.45); @@ -257,16 +277,19 @@ namespace { padep->cd(); DrawEE_Tower(endc_p, l, 0, 1.15); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalDQMTowerStatusDiffBase + using EcalDQMTowerStatusDiffOneTag = EcalDQMTowerStatusDiffBase; + using EcalDQMTowerStatusDiffTwoTags = EcalDQMTowerStatusDiffBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalDQMTowerStatus) { PAYLOAD_INSPECTOR_CLASS(EcalDQMTowerStatusPlot); - PAYLOAD_INSPECTOR_CLASS(EcalDQMTowerStatusDiffPlot); -} \ No newline at end of file + PAYLOAD_INSPECTOR_CLASS(EcalDQMTowerStatusDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalDQMTowerStatusDiffTwoTags); +} diff --git a/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h b/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h index 6ac667ddc0148..a1068a5a7bfe8 100644 --- a/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h +++ b/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainerUtils.h @@ -66,8 +66,13 @@ void fillEEMap_SingleIOV(std::shared_ptr payload, TH2F*& endc_m, T } template -void fillEBMap_DiffIOV( - std::shared_ptr payload, TH2F*& barrel, int irun, float pEB[], float& pEBmin, float& pEBmax) { +void fillEBMap_TwoIOVs(std::shared_ptr payload, + TH2F*& barrel, + int irun, + float pEB[], + float& pEBmin, + float& pEBmax, + int method) { for (int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) { uint32_t rawid = EBDetId::unhashIndex(cellid); EcalCondObjectContainer::const_iterator value_ptr = payload->find(rawid); @@ -85,28 +90,38 @@ void fillEBMap_DiffIOV( eta = eta - 0.5; // 0.5 to 84.5 else eta = eta + 0.5; // -84.5 to -0.5 - - double diff = weight - pEB[cellid]; - - if (diff < pEBmin) - pEBmin = diff; - if (diff > pEBmax) - pEBmax = diff; - - barrel->Fill(phi, eta, diff); + double dr; + if (method == 0) { + dr = weight - pEB[cellid]; + } // diff + else { + if (pEB[cellid] != 0.) + dr = weight / pEB[cellid]; + else { + if (weight == 0.) + dr = 1.; + else + dr = 9999.; // use a large value + } + } // ratio + if (dr < pEBmin) + pEBmin = dr; + if (dr > pEBmax) + pEBmax = dr; + barrel->Fill(phi, eta, dr); } - } // loop over cellid } template -void fillEEMap_DiffIOV(std::shared_ptr payload, +void fillEEMap_TwoIOVs(std::shared_ptr payload, TH2F*& endc_m, TH2F*& endc_p, int irun, float pEE[], float& pEEmin, - float& pEEmax) { + float& pEEmax, + int method) { // looping over the EE channels for (int iz = -1; iz < 2; iz = iz + 2) // -1 or +1 for (int iy = IY_MIN; iy < IY_MAX + IY_MIN; iy++) @@ -124,16 +139,28 @@ void fillEEMap_DiffIOV(std::shared_ptr payload, if (irun == 0) pEE[cellid] = weight; else { - double diff = weight - pEE[cellid]; - if (diff < pEEmin) - pEEmin = diff; - - if (diff > pEEmax) - pEEmax = diff; + double dr; + if (method == 0) { + dr = weight - pEE[cellid]; + } // diff + else { + if (pEE[cellid] != 0.) + dr = weight / pEE[cellid]; + else { + if (weight == 0.) + dr = 1.; + else + dr = 9999.; // use a large value + } + } // ratio + if (dr < pEEmin) + pEEmin = dr; + if (dr > pEEmax) + pEEmax = dr; if (iz == 1) - endc_p->Fill(ix, iy, diff); + endc_p->Fill(ix, iy, dr); else - endc_m->Fill(ix, iy, diff); + endc_m->Fill(ix, iy, dr); } } // validDetId @@ -168,4 +195,4 @@ void fillTableWithSummary(TH2F*& align, align->GetXaxis()->SetLabelSize(0.); align->GetYaxis()->SetTickLength(0.); align->GetYaxis()->SetLabelSize(0.); -} \ No newline at end of file +} diff --git a/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc index 2a71898fb9dec..812443274bdf4 100644 --- a/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc @@ -131,26 +131,45 @@ namespace { /************************************************************************ 2d plot of ECAL FloatCondObjectContainer difference between 2 IOVs ************************************************************************/ - class EcalFloatCondObjectContainerDiff : public cond::payloadInspector::PlotImage { + template + class EcalFloatCondObjectContainerDiffBase + : public cond::payloadInspector::PlotImage { public: - EcalFloatCondObjectContainerDiff() - : cond::payloadInspector::PlotImage("ECAL FloatCondObjectContainer difference") { - setSingleIov(false); - } + EcalFloatCondObjectContainerDiffBase() + : cond::payloadInspector::PlotImage( + "ECAL FloatCondObjectContainer difference") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "EB difference", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "EE+ difference", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "EE- difference", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); double EBmean = 0., EBrms = 0., EEmean = 0., EErms = 0.; int EBtot = 0, EEtot = 0; - // unsigned int run[2] = {0, 0}, irun = 0; - unsigned int run[2], irun = 0; + unsigned int run[2]; float vEB[kEBChannels], vEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { for (int ieta = -MAX_IETA; ieta <= MAX_IETA; ieta++) { Double_t eta = (Double_t)ieta; @@ -205,7 +224,6 @@ namespace { } // payload else return false; - irun++; } // loop over IOVs double vt = (double)EBtot; @@ -233,9 +251,15 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal FloatCondObjectContainer, IOV %i - %i", run[1], run[0])); - + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2 && len < 150) { + t1.SetTextSize(0.04); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i - %i", l_tagname[0].c_str(), run[1], run[0])); + } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; TPad** pad = new TPad*; @@ -251,16 +275,20 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; - + }; // class EcalFloatCondObjectContainerDiffBase + using EcalFloatCondObjectContainerDiffOneTag = + EcalFloatCondObjectContainerDiffBase; + using EcalFloatCondObjectContainerDiffTwoTags = + EcalFloatCondObjectContainerDiffBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalFloatCondObjectContainer) { PAYLOAD_INSPECTOR_CLASS(EcalFloatCondObjectContainerPlot); - PAYLOAD_INSPECTOR_CLASS(EcalFloatCondObjectContainerDiff); + PAYLOAD_INSPECTOR_CLASS(EcalFloatCondObjectContainerDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalFloatCondObjectContainerDiffTwoTags); } diff --git a/CondCore/EcalPlugins/plugins/EcalGainRatios_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalGainRatios_PayloadInspector.cc index 01a2a0ad64fbf..b4ba47864b8d6 100644 --- a/CondCore/EcalPlugins/plugins/EcalGainRatios_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalGainRatios_PayloadInspector.cc @@ -167,13 +167,13 @@ namespace { /********************************************************** 2d plot of ECAL GainRatios difference between 2 IOVs **********************************************************/ - class EcalGainRatiosDiff : public cond::payloadInspector::PlotImage { + template + class EcalGainRatiosDiffBase : public cond::payloadInspector::PlotImage { public: - EcalGainRatiosDiff() : cond::payloadInspector::PlotImage("ECAL Gain Ratios difference") { - setSingleIov(false); - } + EcalGainRatiosDiffBase() + : cond::payloadInspector::PlotImage("ECAL Gain Ratios difference") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel_12O6 = new TH2F("EB_12O6", "EB gain 12/6 difference", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p_12O6 = @@ -191,11 +191,30 @@ namespace { TH1F* b_6O1 = new TH1F("b_6O1", "EB gain 6/1 difference", 100, -0.1, 0.1); TH1F* e_6O1 = new TH1F("e_6O1", "EE gain 6/1 difference", 100, -0.1, 0.1); - unsigned int run[2], irun = 0; + unsigned int run[2]; float gEB[3][kEBChannels], gEE[3][kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { // looping over the EB channels, via the dense-index, mapped into EBDetId's for (int cellid = 0; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) { // loop on EB cells @@ -245,7 +264,6 @@ namespace { } // if payload.get() else return false; - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -254,8 +272,15 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal Gain Ratios, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2 && len < 70) { + t1.SetTextSize(0.03); + t1.DrawLatex( + 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i - %i", l_tagname[0].c_str(), run[1], run[0])); + } float xmi[3] = {0.0, 0.22, 0.78}; float xma[3] = {0.22, 0.78, 1.00}; @@ -323,15 +348,19 @@ namespace { st->SetX1NDC(0.6); //new x start position st->SetY1NDC(0.75); //new y start position - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalGainRatiosDiffBase + using EcalGainRatiosDiffOneTag = EcalGainRatiosDiffBase; + using EcalGainRatiosDiffTwoTags = EcalGainRatiosDiffBase; + } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalGainRatios) { PAYLOAD_INSPECTOR_CLASS(EcalGainRatiosPlot); - PAYLOAD_INSPECTOR_CLASS(EcalGainRatiosDiff); + PAYLOAD_INSPECTOR_CLASS(EcalGainRatiosDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalGainRatiosDiffTwoTags); } diff --git a/CondCore/EcalPlugins/plugins/EcalIntercalibConstantsMC_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalIntercalibConstantsMC_PayloadInspector.cc index a45c72415033a..9705da5a95933 100644 --- a/CondCore/EcalPlugins/plugins/EcalIntercalibConstantsMC_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalIntercalibConstantsMC_PayloadInspector.cc @@ -216,17 +216,18 @@ namespace { } // fill method }; - /***************************************************************** + /******************************************************************* 2d plot of ECAL IntercalibConstantsMC difference between 2 IOVs - *****************************************************************/ - class EcalIntercalibConstantsMCDiff : public cond::payloadInspector::PlotImage { + *******************************************************************/ + template + class EcalIntercalibConstantsMCBase + : public cond::payloadInspector::PlotImage { public: - EcalIntercalibConstantsMCDiff() - : cond::payloadInspector::PlotImage("ECAL Intercalib Constants MC difference ") { - setSingleIov(false); - } + EcalIntercalibConstantsMCBase() + : cond::payloadInspector::PlotImage( + "ECAL Intercalib Constants MC comparison") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "mean EB", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "mean EE+", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "mean EE-", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); @@ -236,27 +237,43 @@ namespace { pEBmax = -10.; pEEmax = -10.; - unsigned int run[2], irun = 0; + unsigned int run[2]; float pEB[kEBChannels], pEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { if (payload->barrelItems().empty()) return false; - fillEBMap_DiffIOV(payload, barrel, irun, pEB, pEBmin, pEBmax); + fillEBMap_TwoIOVs(payload, barrel, irun, pEB, pEBmin, pEBmax, method); if (payload->endcapItems().empty()) return false; - fillEEMap_DiffIOV(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax); + fillEEMap_TwoIOVs(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax, method); } // payload - irun++; - - } // loop over IOVs + } // loop over IOVs gStyle->SetPalette(1); gStyle->SetOptStat(0); @@ -264,8 +281,27 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.04); - t1.DrawLatex(0.5, 0.96, Form("Ecal IntercalibConstants MC Diff, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 170) { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, + 0.96, + Form("%s IOV %i %s %s IOV %i", + l_tagname[1].c_str(), + run[1], + dr[method].c_str(), + l_tagname[0].c_str(), + run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal IntercalibConstantsMC, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; @@ -283,15 +319,19 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; - - /******************************************************* - 2d plot of Ecal Intercalib Constants MC Summary of 1 IOV - *******************************************************/ + }; // class EcalIntercalibConstantsMCDiffBase + using EcalIntercalibConstantsMCDiffOneTag = EcalIntercalibConstantsMCBase; + using EcalIntercalibConstantsMCDiffTwoTags = EcalIntercalibConstantsMCBase; + using EcalIntercalibConstantsMCRatioOneTag = EcalIntercalibConstantsMCBase; + using EcalIntercalibConstantsMCRatioTwoTags = EcalIntercalibConstantsMCBase; + + /*********************************************************** + 2d plot of Ecal Intercalib Constants MC Summary of 1 IOV + ***********************************************************/ class EcalIntercalibConstantsMCSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalIntercalibConstantsMCSummaryPlot() @@ -357,6 +397,9 @@ PAYLOAD_INSPECTOR_MODULE(EcalIntercalibConstantsMC) { PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCEBMap); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCEEMap); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCPlot); - PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCDiff); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsMCSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalIntercalibConstants_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalIntercalibConstants_PayloadInspector.cc index 7c84831560186..8f7603f320efa 100644 --- a/CondCore/EcalPlugins/plugins/EcalIntercalibConstants_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalIntercalibConstants_PayloadInspector.cc @@ -34,11 +34,9 @@ namespace { EEhistXMax = 220 }; // endcaps lower and upper bounds on x and y - /******************************************************* - + /************************************************************** 2d histogram of ECAL barrel Intercalib Constants of 1 IOV - - *******************************************************/ + ***************************************************************/ // inherit from one of the predefined plot class: Histogram2D class EcalIntercalibConstantsEBMap : public cond::payloadInspector::Histogram2D { @@ -204,17 +202,17 @@ namespace { } // fill method }; - /***************************************************************** - 2d plot of ECAL IntercalibConstants difference between 2 IOVs - *****************************************************************/ - class EcalIntercalibConstantsDiff : public cond::payloadInspector::PlotImage { + /************************************************************************** + 2d plot of ECAL IntercalibConstants difference or ratio between 2 IOVs + ***************************************************************************/ + template + class EcalIntercalibConstantsBase : public cond::payloadInspector::PlotImage { public: - EcalIntercalibConstantsDiff() - : cond::payloadInspector::PlotImage("ECAL Intercalib Constants difference ") { - setSingleIov(false); - } + EcalIntercalibConstantsBase() + : cond::payloadInspector::PlotImage( + "ECAL Intercalib Constants comparison") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "mean EB", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "mean EE+", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "mean EE-", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); @@ -224,27 +222,40 @@ namespace { pEBmax = -10.; pEEmax = -10.; - unsigned int run[2], irun = 0; + unsigned int run[2]; float pEB[kEBChannels], pEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { if (payload->barrelItems().empty()) return false; - - fillEBMap_DiffIOV(payload, barrel, irun, pEB, pEBmin, pEBmax); + fillEBMap_TwoIOVs(payload, barrel, irun, pEB, pEBmin, pEBmax, method); if (payload->endcapItems().empty()) return false; - - fillEEMap_DiffIOV(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax); - + fillEEMap_TwoIOVs(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax, method); } // payload - irun++; - - } // loop over IOVs + } // loop over IOVs gStyle->SetPalette(1); gStyle->SetOptStat(0); @@ -252,9 +263,27 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal IntercalibConstants, IOV %i - %i", run[1], run[0])); - + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 170) { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, + 0.96, + Form("%s IOV %i %s %s IOV %i", + l_tagname[1].c_str(), + run[1], + dr[method].c_str(), + l_tagname[0].c_str(), + run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal IntercalibConstants, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; TPad** pad = new TPad*; @@ -269,15 +298,19 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; - - /******************************************************* - 2d plot of Ecal Intercalib Constants Summary of 1 IOV - *******************************************************/ + }; // class EcalIntercalibConstantsDiffBase + using EcalIntercalibConstantsDiffOneTag = EcalIntercalibConstantsBase; + using EcalIntercalibConstantsDiffTwoTags = EcalIntercalibConstantsBase; + using EcalIntercalibConstantsRatioOneTag = EcalIntercalibConstantsBase; + using EcalIntercalibConstantsRatioTwoTags = EcalIntercalibConstantsBase; + + /********************************************************* + 2d plot of Ecal Intercalib Constants Summary of 1 IOV + *********************************************************/ class EcalIntercalibConstantsSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalIntercalibConstantsSummaryPlot() @@ -344,6 +377,9 @@ PAYLOAD_INSPECTOR_MODULE(EcalIntercalibConstants) { PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsEBMap); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsEEMap); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsPlot); - PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsDiff); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibConstantsSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalIntercalibErrors_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalIntercalibErrors_PayloadInspector.cc index 32c47623eae6d..612a6e86fb1d5 100644 --- a/CondCore/EcalPlugins/plugins/EcalIntercalibErrors_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalIntercalibErrors_PayloadInspector.cc @@ -91,12 +91,9 @@ namespace { } //fill method }; - /******************************************************* - + /************************************************************* 2d histogram of ECAL EndCaps Intercalib Errors of 1 IOV - - *******************************************************/ - + *************************************************************/ class EcalIntercalibErrorsEEMap : public cond::payloadInspector::Histogram2D { private: int EEhistSplit = 20; @@ -218,14 +215,13 @@ namespace { /***************************************************************** 2d plot of ECAL Intercalib Errors difference between 2 IOVs *****************************************************************/ - class EcalIntercalibErrorsDiff : public cond::payloadInspector::PlotImage { + template + class EcalIntercalibErrorsBase : public cond::payloadInspector::PlotImage { public: - EcalIntercalibErrorsDiff() - : cond::payloadInspector::PlotImage("ECAL Intercalib Error difference ") { - setSingleIov(false); - } + EcalIntercalibErrorsBase() + : cond::payloadInspector::PlotImage("ECAL Intercalib Error comparison") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "Intercalib Error EB", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "Intercalib Error EE+", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "Intercalib Error EE-", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); @@ -235,26 +231,39 @@ namespace { pEBmax = -10.; pEEmax = -10.; - unsigned int run[2], irun = 0; + unsigned int run[2]; float pEB[kEBChannels], pEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { if (payload->barrelItems().empty()) return false; - - fillEBMap_DiffIOV(payload, barrel, irun, pEB, pEBmin, pEBmax); - + fillEBMap_TwoIOVs(payload, barrel, irun, pEB, pEBmin, pEBmax, method); if (payload->endcapItems().empty()) return false; - fillEEMap_DiffIOV(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax); - + fillEEMap_TwoIOVs(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax, method); } // payload - irun++; - - } // loop over IOVs + } // loop over IOVs gStyle->SetPalette(1); gStyle->SetOptStat(0); @@ -262,8 +271,27 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal Intercalib Errors Diff, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 170) { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, + 0.96, + Form("%s IOV %i %s %s IOV %i", + l_tagname[1].c_str(), + run[1], + dr[method].c_str(), + l_tagname[0].c_str(), + run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal IntercalibErrorss, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; @@ -281,15 +309,19 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalIntercalibErrorsDiffBase + using EcalIntercalibErrorsDiffOneTag = EcalIntercalibErrorsBase; + using EcalIntercalibErrorsDiffTwoTags = EcalIntercalibErrorsBase; + using EcalIntercalibErrorsRatioOneTag = EcalIntercalibErrorsBase; + using EcalIntercalibErrorsRatioTwoTags = EcalIntercalibErrorsBase; /******************************************************* - 2d plot of Ecal Intercalib Errors Summary of 1 IOV - *******************************************************/ + 2d plot of Ecal Intercalib Errors Summary of 1 IOV + *******************************************************/ class EcalIntercalibErrorsSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalIntercalibErrorsSummaryPlot() @@ -354,6 +386,9 @@ PAYLOAD_INSPECTOR_MODULE(EcalIntercalibErrors) { PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsEBMap); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsEEMap); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsPlot); - PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsDiff); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalIntercalibErrorsSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatiosRef_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatiosRef_PayloadInspector.cc index cb44f819736d2..9ae8a5cb993d3 100644 --- a/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatiosRef_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatiosRef_PayloadInspector.cc @@ -34,11 +34,9 @@ namespace { EEhistXMax = 220 }; // endcaps lower and upper bounds on x and y - /******************************************************* - + /**************************************************************** 2d histogram of ECAL barrel Laser APDPN Ratios Ref of 1 IOV - - *******************************************************/ + *****************************************************************/ // inherit from one of the predefined plot class: Histogram2D class EcalLaserAPDPNRatiosRefEBMap : public cond::payloadInspector::Histogram2D { @@ -90,12 +88,9 @@ namespace { } //fill method }; - /******************************************************* - + /**************************************************************** 2d histogram of ECAL EndCaps Laser APDPN Ratios Ref of 1 IOV - - *******************************************************/ - + ****************************************************************/ class EcalLaserAPDPNRatiosRefEEMap : public cond::payloadInspector::Histogram2D { private: int EEhistSplit = 20; @@ -149,9 +144,9 @@ namespace { } // fill method }; - /************************************************* + /**************************************************** 2d plot of Ecal Laser APDPN Ratios Ref of 1 IOV - *************************************************/ + ****************************************************/ class EcalLaserAPDPNRatiosRefPlot : public cond::payloadInspector::PlotImage { public: EcalLaserAPDPNRatiosRefPlot() @@ -217,17 +212,17 @@ namespace { } // fill method }; - /***************************************************************** + /******************************************************************** 2d plot of Ecal Laser APDPN Ratios Ref difference between 2 IOVs - *****************************************************************/ - class EcalLaserAPDPNRatiosRefDiff : public cond::payloadInspector::PlotImage { + ********************************************************************/ + template + class EcalLaserAPDPNRatiosRefBase : public cond::payloadInspector::PlotImage { public: - EcalLaserAPDPNRatiosRefDiff() - : cond::payloadInspector::PlotImage("Ecal Laser APDPN Ratios Ref difference ") { - setSingleIov(false); - } + EcalLaserAPDPNRatiosRefBase() + : cond::payloadInspector::PlotImage( + "Ecal Laser APDPN Ratios Ref difference ") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "Laser APDPN Ratios Ref EB", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = @@ -240,27 +235,38 @@ namespace { pEBmax = -10.; pEEmax = -10.; - unsigned int run[2], irun = 0; + unsigned int run[2]; + std::string l_tagname[2]; float pEB[kEBChannels], pEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { - if (payload->barrelItems().empty()) - return false; - - fillEBMap_DiffIOV(payload, barrel, irun, pEB, pEBmin, pEBmax); - - if (payload->endcapItems().empty()) - return false; - - fillEEMap_DiffIOV(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax); - + if (!payload->barrelItems().empty()) + fillEBMap_TwoIOVs(payload, barrel, irun, pEB, pEBmin, pEBmax, method); + if (!payload->endcapItems().empty()) + fillEEMap_TwoIOVs(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax, method); } // payload - irun++; - - } // loop over IOVs + } // loop over IOVs gStyle->SetPalette(1); gStyle->SetOptStat(0); @@ -287,15 +293,19 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method }; - - /******************************************************* - 2d plot of Ecal Laser APDPN Ratios Ref Summary of 1 IOV - *******************************************************/ + using EcalLaserAPDPNRatiosRefDiffOneTag = EcalLaserAPDPNRatiosRefBase; + using EcalLaserAPDPNRatiosRefDiffTwoTags = EcalLaserAPDPNRatiosRefBase; + using EcalLaserAPDPNRatiosRefRatioOneTag = EcalLaserAPDPNRatiosRefBase; + using EcalLaserAPDPNRatiosRefRatioTwoTags = EcalLaserAPDPNRatiosRefBase; + + /********************************************************** + 2d plot of Ecal Laser APDPN Ratios Ref Summary of 1 IOV + **********************************************************/ class EcalLaserAPDPNRatiosRefSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalLaserAPDPNRatiosRefSummaryPlot() @@ -361,6 +371,9 @@ PAYLOAD_INSPECTOR_MODULE(EcalLaserAPDPNRatiosRef) { PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefEBMap); PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefEEMap); PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefPlot); - PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefDiff); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRefSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatios_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatios_PayloadInspector.cc index 1a5643700954b..8a105b9208f0d 100644 --- a/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatios_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatios_PayloadInspector.cc @@ -272,19 +272,17 @@ namespace { /***************************************************************** 2d plot of ECAL IntercalibConstants difference between 2 IOVs ******************************************************************/ - class EcalLaserAPDPNRatiosDiff : public cond::payloadInspector::PlotImage { + template + class EcalLaserAPDPNRatiosBase : public cond::payloadInspector::PlotImage { public: - EcalLaserAPDPNRatiosDiff() - : cond::payloadInspector::PlotImage("ECAL Laser APDPNRatios difference") { - setSingleIov(false); - } + EcalLaserAPDPNRatiosBase() + : cond::payloadInspector::PlotImage("ECAL Laser APDPNRatios difference") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F** barrel = new TH2F*[3]; TH2F** endc_p = new TH2F*[3]; TH2F** endc_m = new TH2F*[3]; float pEBmin[3], pEEmin[3], pEBmax[3], pEEmax[3]; - for (int i = 0; i < 3; i++) { barrel[i] = new TH2F(Form("EBp%i", i), Form("EB p%i", i + 1), MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); @@ -297,16 +295,40 @@ namespace { pEBmax[i] = -10.; pEEmax[i] = -10.; } - unsigned int run[2] = {0, 0}, irun = 0; + unsigned int run[2] = {0, 0}; + std::string l_tagname[2]; unsigned long IOV = 0; float pEB[3][kEBChannels], pEE[3][kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - IOV = std::get<0>(iov); - if (IOV < 4294967296) - run[irun] = std::get<0>(iov); - else // time type IOV - run[irun] = IOV >> 32; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + IOV = std::get<0>(firstiov); + if (IOV < 4294967296) + run[0] = std::get<0>(firstiov); + else // time type IOV + run[0] = IOV >> 32; + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + IOV = std::get<0>(lastiov); + if (IOV < 4294967296) + run[1] = std::get<0>(lastiov); + else // time type IOV + run[1] = IOV >> 32; + + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { // looping over the EB channels, via the dense-index, mapped into EBDetId's for (int cellid = 0; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) { // loop on EB cells @@ -322,24 +344,55 @@ namespace { eta = eta - 0.5; // 0.5 to 84.5 else eta = eta + 0.5; // -84.5 to -0.5 - double diff = (payload->getLaserMap())[rawid].p1 - pEB[0][cellid]; - if (diff < pEBmin[0]) - pEBmin[0] = diff; - if (diff > pEBmax[0]) - pEBmax[0] = diff; - barrel[0]->Fill(phi, eta, diff); - diff = (payload->getLaserMap())[rawid].p2 - pEB[1][cellid]; - if (diff < pEBmin[1]) - pEBmin[1] = diff; - if (diff > pEBmax[1]) - pEBmax[1] = diff; - barrel[1]->Fill(phi, eta, diff); - diff = (payload->getLaserMap())[rawid].p3 - pEB[2][cellid]; - if (diff < pEBmin[2]) - pEBmin[2] = diff; - if (diff > pEBmax[2]) - pEBmax[2] = diff; - barrel[2]->Fill(phi, eta, diff); + double dr; + if (method == 0) // difference + dr = (payload->getLaserMap())[rawid].p1 - pEB[0][cellid]; + else { // ratio + if (pEB[0][cellid] == 0.) { + if ((payload->getLaserMap())[rawid].p1 == 0.) + dr = 1.; + else + dr = 9999.; //use a large value + } else + dr = (payload->getLaserMap())[rawid].p1 / pEB[0][cellid]; + } + if (dr < pEBmin[0]) + pEBmin[0] = dr; + if (dr > pEBmax[0]) + pEBmax[0] = dr; + barrel[0]->Fill(phi, eta, dr); + if (method == 0) // difference + dr = (payload->getLaserMap())[rawid].p2 - pEB[1][cellid]; + else { // ratio + if (pEB[1][cellid] == 0.) { + if ((payload->getLaserMap())[rawid].p2 == 0.) + dr = 1.; + else + dr = 9999.; //use a large value + } else + dr = (payload->getLaserMap())[rawid].p2 / pEB[1][cellid]; + } + if (dr < pEBmin[1]) + pEBmin[1] = dr; + if (dr > pEBmax[1]) + pEBmax[1] = dr; + barrel[1]->Fill(phi, eta, dr); + if (method == 0) // difference + dr = (payload->getLaserMap())[rawid].p3 - pEB[2][cellid]; + else { // ratio + if (pEB[2][cellid] == 0.) { + if ((payload->getLaserMap())[rawid].p3 == 0.) + dr = 1.; + else + dr = 9999.; //use a large value + } else + dr = (payload->getLaserMap())[rawid].p3 / pEB[2][cellid]; + } + if (dr < pEBmin[2]) + pEBmin[2] = dr; + if (dr > pEBmax[2]) + pEBmax[2] = dr; + barrel[2]->Fill(phi, eta, dr); } } // loop over cellid @@ -354,36 +407,66 @@ namespace { pEE[1][cellid] = (payload->getLaserMap())[rawid].p2; pEE[2][cellid] = (payload->getLaserMap())[rawid].p3; } else { - double diff1 = (payload->getLaserMap())[rawid].p1 - pEE[0][cellid]; - if (diff1 < pEEmin[0]) - pEEmin[0] = diff1; - if (diff1 > pEEmax[0]) - pEEmax[0] = diff1; - double diff2 = (payload->getLaserMap())[rawid].p2 - pEE[1][cellid]; - if (diff2 < pEEmin[1]) - pEEmin[1] = diff2; - if (diff2 > pEEmax[1]) - pEEmax[1] = diff2; - double diff3 = (payload->getLaserMap())[rawid].p3 - pEE[2][cellid]; - if (diff3 < pEEmin[2]) - pEEmin[2] = diff3; - if (diff3 > pEEmax[2]) - pEEmax[2] = diff3; + double dr1, dr2, dr3; + if (method == 0) // difference + dr1 = (payload->getLaserMap())[rawid].p1 - pEE[0][cellid]; + else { // ratio + if (pEE[0][cellid] == 0.) { + if ((payload->getLaserMap())[rawid].p1 == 0.) + dr1 = 1.; + else + dr1 = 9999.; //use a large value + } else + dr1 = (payload->getLaserMap())[rawid].p1 / pEE[0][cellid]; + } + if (dr1 < pEEmin[0]) + pEEmin[0] = dr1; + if (dr1 > pEEmax[0]) + pEEmax[0] = dr1; + if (method == 0) // difference + dr2 = (payload->getLaserMap())[rawid].p2 - pEE[1][cellid]; + else { // ratio + if (pEE[1][cellid] == 0.) { + if ((payload->getLaserMap())[rawid].p2 == 0.) + dr2 = 1.; + else + dr2 = 9999.; //use a large value + } else + dr2 = (payload->getLaserMap())[rawid].p2 / pEE[1][cellid]; + } + if (dr2 < pEEmin[1]) + pEEmin[1] = dr2; + if (dr2 > pEEmax[1]) + pEEmax[1] = dr2; + if (method == 0) // difference + dr3 = (payload->getLaserMap())[rawid].p3 - pEE[2][cellid]; + else { // ratio + if (pEE[0][cellid] == 0.) { + if ((payload->getLaserMap())[rawid].p3 == 0.) + dr3 = 1.; + else + dr3 = 9999.; //use a large value + } else + dr3 = (payload->getLaserMap())[rawid].p3 / pEE[2][cellid]; + } + if (dr3 < pEEmin[2]) + pEEmin[2] = dr3; + if (dr3 > pEEmax[2]) + pEEmax[2] = dr3; if (myEEId.zside() == 1) { - endc_p[0]->Fill(myEEId.ix(), myEEId.iy(), diff1); - endc_p[1]->Fill(myEEId.ix(), myEEId.iy(), diff2); - endc_p[2]->Fill(myEEId.ix(), myEEId.iy(), diff3); + endc_p[0]->Fill(myEEId.ix(), myEEId.iy(), dr1); + endc_p[1]->Fill(myEEId.ix(), myEEId.iy(), dr2); + endc_p[2]->Fill(myEEId.ix(), myEEId.iy(), dr3); } else { - endc_m[0]->Fill(myEEId.ix(), myEEId.iy(), diff1); - endc_m[1]->Fill(myEEId.ix(), myEEId.iy(), diff2); - endc_m[2]->Fill(myEEId.ix(), myEEId.iy(), diff3); + endc_m[0]->Fill(myEEId.ix(), myEEId.iy(), dr1); + endc_m[1]->Fill(myEEId.ix(), myEEId.iy(), dr2); + endc_m[2]->Fill(myEEId.ix(), myEEId.iy(), dr3); } } } // loop over cellid } // if payload.get() else return false; - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -392,10 +475,28 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; if (IOV < 4294967296) { - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal Laser APD/PN, IOV %i - %i", run[1], run[0])); + if (ntags == 2) { + if (len < 80) { + t1.SetTextSize(0.02); + t1.DrawLatex(0.5, + 0.96, + Form("%s IOV %i %s %s IOV %i", + l_tagname[1].c_str(), + run[1], + dr[method].c_str(), + l_tagname[0].c_str(), + run[0])); + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("Ecal LaserAPDPNRatios, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } } else { // time type IOV time_t t = run[0]; char buf0[256], buf1[256]; @@ -407,10 +508,26 @@ namespace { localtime_r(&t, <); strftime(buf1, sizeof(buf1), "%F %R:%S", <); buf1[sizeof(buf1) - 1] = 0; - t1.SetTextSize(0.015); - t1.DrawLatex(0.5, 0.96, Form("Ecal Laser APD/PN, IOV %s - %s", buf1, buf0)); + if (ntags == 2) { + if (len < 80) { + t1.SetTextSize(0.02); + t1.DrawLatex(0.5, + 0.96, + Form("%s IOV %i %s %s IOV %i", + l_tagname[1].c_str(), + run[1], + dr[method].c_str(), + l_tagname[0].c_str(), + run[0])); + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("Ecal LaserAPDPNRatios, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } } - float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; TPad*** pad = new TPad**[3]; @@ -451,11 +568,15 @@ namespace { endc_p[i]->GetZaxis()->SetLabelSize(0.02); } - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalLaserAPDPNRatiosDiffBase + using EcalLaserAPDPNRatiosDiffOneTag = EcalLaserAPDPNRatiosBase; + using EcalLaserAPDPNRatiosDiffTwoTags = EcalLaserAPDPNRatiosBase; + using EcalLaserAPDPNRatiosRatioOneTag = EcalLaserAPDPNRatiosBase; + using EcalLaserAPDPNRatiosRatioTwoTags = EcalLaserAPDPNRatiosBase; } // namespace @@ -464,5 +585,8 @@ PAYLOAD_INSPECTOR_MODULE(EcalLaserAPDPNRatios) { PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosEBMap); PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosEEMap); PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosPlot); - PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosDiff); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAPDPNRatiosRatioTwoTags); } diff --git a/CondCore/EcalPlugins/plugins/EcalLaserAlphas_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalLaserAlphas_PayloadInspector.cc index b56d4110b7c2a..a7589dd70fbfa 100644 --- a/CondCore/EcalPlugins/plugins/EcalLaserAlphas_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalLaserAlphas_PayloadInspector.cc @@ -35,11 +35,8 @@ namespace { }; // endcaps lower and upper bounds on x and y /******************************************************* - 2d histogram of ECAL barrel Ecal Laser Alphas of 1 IOV - *******************************************************/ - // inherit from one of the predefined plot class: Histogram2D class EcalLaserAlphasEBMap : public cond::payloadInspector::Histogram2D { public: @@ -91,11 +88,8 @@ namespace { }; /******************************************************* - 2d histogram of ECAL EndCaps Laser Alphas of 1 IOV - *******************************************************/ - class EcalLaserAlphasEEMap : public cond::payloadInspector::Histogram2D { private: int EEhistSplit = 20; @@ -149,9 +143,9 @@ namespace { } // fill method }; - /************************************************* + /****************************************** 2d plot of Ecal Laser Alphas of 1 IOV - *************************************************/ + *******************************************/ class EcalLaserAlphasPlot : public cond::payloadInspector::PlotImage { public: EcalLaserAlphasPlot() : cond::payloadInspector::PlotImage("Ecal Laser Alphas - map ") { @@ -216,13 +210,13 @@ namespace { /***************************************************************** 2d plot of Ecal Laser Alphas difference between 2 IOVs *****************************************************************/ - class EcalLaserAlphasDiff : public cond::payloadInspector::PlotImage { + template + class EcalLaserAlphasBase : public cond::payloadInspector::PlotImage { public: - EcalLaserAlphasDiff() : cond::payloadInspector::PlotImage("Ecal Laser Alphas difference ") { - setSingleIov(false); - } + EcalLaserAlphasBase() + : cond::payloadInspector::PlotImage("Ecal Laser Alphas difference ") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "Laser Alphas EB", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "Laser Alphas EE+", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "Laser Alphas EE-", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); @@ -232,27 +226,43 @@ namespace { pEBmax = -10.; pEEmax = -10.; - unsigned int run[2], irun = 0; + unsigned int run[2]; float pEB[kEBChannels], pEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { if (payload->barrelItems().empty()) return false; - fillEBMap_DiffIOV(payload, barrel, irun, pEB, pEBmin, pEBmax); + fillEBMap_TwoIOVs(payload, barrel, irun, pEB, pEBmin, pEBmax, method); if (payload->endcapItems().empty()) return false; - fillEEMap_DiffIOV(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax); + fillEEMap_TwoIOVs(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax, method); } // payload - irun++; - - } // loop over IOVs + } // loop over IOVs gStyle->SetPalette(1); gStyle->SetOptStat(0); @@ -260,9 +270,27 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal Laser Alphas Diff, IOV %i - %i", run[1], run[0])); - + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 180) { + t1.SetTextSize(0.04); + t1.DrawLatex(0.5, + 0.96, + Form("%s IOV %i %s %s IOV %i", + l_tagname[1].c_str(), + run[1], + dr[method].c_str(), + l_tagname[0].c_str(), + run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal Laser Alphas Diff, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; TPad** pad = new TPad*; @@ -279,15 +307,19 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalLaserAlphasDiffBase + using EcalLaserAlphasDiffOneTag = EcalLaserAlphasBase; + using EcalLaserAlphasDiffTwoTags = EcalLaserAlphasBase; + using EcalLaserAlphasRatioOneTag = EcalLaserAlphasBase; + using EcalLaserAlphasRatioTwoTags = EcalLaserAlphasBase; /******************************************************* - 2d plot of Ecal Laser Alphas Summary of 1 IOV - *******************************************************/ + 2d plot of Ecal Laser Alphas Summary of 1 IOV + *******************************************************/ class EcalLaserAlphasSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalLaserAlphasSummaryPlot() @@ -352,6 +384,9 @@ PAYLOAD_INSPECTOR_MODULE(EcalLaserAlphas) { PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasEBMap); PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasEEMap); PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasPlot); - PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasDiff); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalLaserAlphasSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalLinearCorrections_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalLinearCorrections_PayloadInspector.cc index f25b92a2eef63..83e913719b9f8 100644 --- a/CondCore/EcalPlugins/plugins/EcalLinearCorrections_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalLinearCorrections_PayloadInspector.cc @@ -205,14 +205,13 @@ namespace { /**************************************************************** 2d plot of ECAL LinearCorrections difference between 2 IOVs ****************************************************************/ - class EcalLinearCorrectionsDiff : public cond::payloadInspector::PlotImage { + template + class EcalLinearCorrectionsDiffBase : public cond::payloadInspector::PlotImage { public: - EcalLinearCorrectionsDiff() - : cond::payloadInspector::PlotImage("ECAL LinearCorrections - map ") { - setSingleIov(false); - } + EcalLinearCorrectionsDiffBase() + : cond::payloadInspector::PlotImage("ECAL LinearCorrections - map ") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F** barrel = new TH2F*[kValues]; TH2F** endc_p = new TH2F*[kValues]; TH2F** endc_m = new TH2F*[kValues]; @@ -235,16 +234,39 @@ namespace { } float vEB[kValues][kEBChannels], vEE[kValues][kEEChannels]; - unsigned int run[2] = {0, 0}, irun = 0; + unsigned int run[2] = {0, 0}; unsigned long IOV = 0; - auto iov = iovs.front(); - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - IOV = std::get<0>(iov); - if (IOV < 4294967296) - run[irun] = std::get<0>(iov); - else { // time type IOV - run[irun] = IOV >> 32; + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + IOV = std::get<0>(firstiov); + if (IOV < 4294967296) + run[0] = IOV; + else { // time type IOV + run[0] = IOV >> 32; + } + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + IOV = std::get<0>(lastiov); + if (IOV < 4294967296) + run[1] = IOV; + else { // time type IOV + run[1] = IOV >> 32; + } + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); } if (payload.get()) { for (int ieta = -MAX_IETA; ieta <= MAX_IETA; ieta++) { @@ -345,7 +367,6 @@ namespace { } // if payload.get() else return false; - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -355,6 +376,7 @@ namespace { t1.SetNDC(); t1.SetTextAlign(26); // t1.DrawLatex(0.5, 0.96, Form("Ecal Linear Corrections, IOV %lu", run)); + int len = l_tagname[0].length() + l_tagname[1].length(); if (IOV < 4294967296) { t1.SetTextSize(0.05); t1.DrawLatex(0.5, 0.96, Form("Ecal Linear Corrections, IOV %i - %i", run[1], run[0])); @@ -369,8 +391,18 @@ namespace { localtime_r(&t, <); strftime(buf1, sizeof(buf1), "%F %R:%S", <); buf1[sizeof(buf1) - 1] = 0; - t1.SetTextSize(0.015); - t1.DrawLatex(0.5, 0.96, Form("Ecal Linear Corrections, IOV %s - %s", buf1, buf0)); + if (ntags == 2) { + if (len < 80) { + t1.SetTextSize(0.02); + t1.DrawLatex(0.5, 0.96, Form("%s %s - %s %s", l_tagname[1].c_str(), buf1, l_tagname[0].c_str(), buf0)); + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("Ecal Linear Corrections, IOV %s - %s", buf1, buf0)); + } + } else { + t1.SetTextSize(0.015); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %s - %s", l_tagname[0].c_str(), buf1, buf0)); + } } float xmi[3] = {0.0, 0.26, 0.74}; @@ -418,16 +450,19 @@ namespace { DrawEE(endc_p[valId], pEEmin[valId], pEEmax[valId]); } - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; // class EcalLinearCorrectionsDiff + }; // class EcalLinearCorrectionsDiffBase + using EcalLinearCorrectionsDiffOneTag = EcalLinearCorrectionsDiffBase; + using EcalLinearCorrectionsDiffTwoTags = EcalLinearCorrectionsDiffBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalLinearCorrections) { PAYLOAD_INSPECTOR_CLASS(EcalLinearCorrectionsPlot); - PAYLOAD_INSPECTOR_CLASS(EcalLinearCorrectionsDiff); + PAYLOAD_INSPECTOR_CLASS(EcalLinearCorrectionsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalLinearCorrectionsDiffTwoTags); } diff --git a/CondCore/EcalPlugins/plugins/EcalPFRecHitThresholds_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalPFRecHitThresholds_PayloadInspector.cc index 45a97198e2f1d..db9cbc4a9881b 100644 --- a/CondCore/EcalPlugins/plugins/EcalPFRecHitThresholds_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalPFRecHitThresholds_PayloadInspector.cc @@ -214,17 +214,17 @@ namespace { } // fill method }; - /***************************************************************** + /******************************************************** 2d plot of Ecal PFRec Hit Thresholds between 2 IOVs - *****************************************************************/ - class EcalPFRecHitThresholdsDiff : public cond::payloadInspector::PlotImage { + *********************************************************/ + template + class EcalPFRecHitThresholdsBase : public cond::payloadInspector::PlotImage { public: - EcalPFRecHitThresholdsDiff() - : cond::payloadInspector::PlotImage("Ecal PFRec Hit Thresholds difference ") { - setSingleIov(false); - } + EcalPFRecHitThresholdsBase() + : cond::payloadInspector::PlotImage( + "Ecal PFRec Hit Thresholds comparison") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "mean EB", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "mean EE+", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "mean EE-", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); @@ -234,27 +234,43 @@ namespace { pEBmax = -10.; pEEmax = -10.; - unsigned int run[2], irun = 0; + unsigned int run[2]; float pEB[kEBChannels], pEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { if (payload->barrelItems().empty()) return false; - fillEBMap_DiffIOV(payload, barrel, irun, pEB, pEBmin, pEBmax); + fillEBMap_TwoIOVs(payload, barrel, irun, pEB, pEBmin, pEBmax, method); if (payload->endcapItems().empty()) return false; - fillEEMap_DiffIOV(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax); + fillEEMap_TwoIOVs(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax, method); } // payload - irun++; - - } // loop over IOVs + } // loop over IOVs gStyle->SetPalette(1); gStyle->SetOptStat(0); @@ -262,8 +278,23 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal PFRec Hit Thresholds Diff, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 180) { + t1.SetTextSize(0.05); + t1.DrawLatex( + 0.5, + 0.96, + Form("%s %i %s %s %i", l_tagname[1].c_str(), run[1], dr[method].c_str(), l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal PFRec Hit Thresholds, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; @@ -281,15 +312,19 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; - - /******************************************************* - 2d plot of Ecal PFRec Hit Thresholds Summary of 1 IOV - *******************************************************/ + }; // class EcalPFRecHitThresholdsDiffBase + using EcalPFRecHitThresholdsDiffOneTag = EcalPFRecHitThresholdsBase; + using EcalPFRecHitThresholdsDiffTwoTags = EcalPFRecHitThresholdsBase; + using EcalPFRecHitThresholdsRatioOneTag = EcalPFRecHitThresholdsBase; + using EcalPFRecHitThresholdsRatioTwoTags = EcalPFRecHitThresholdsBase; + + /********************************************************** + 2d plot of Ecal PFRec Hit Thresholds Summary of 1 IOV + **********************************************************/ class EcalPFRecHitThresholdsSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalPFRecHitThresholdsSummaryPlot() @@ -354,6 +389,9 @@ PAYLOAD_INSPECTOR_MODULE(EcalPFRecHitThresholds) { PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsEBMap); PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsEEMap); PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsPlot); - PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsDiff); + PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalPFRecHitThresholdsSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalPedestals_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalPedestals_PayloadInspector.cc index 432f949d50337..fb7726f768bca 100644 --- a/CondCore/EcalPlugins/plugins/EcalPedestals_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalPedestals_PayloadInspector.cc @@ -22,9 +22,9 @@ namespace { enum { MIN_IETA = 1, MIN_IPHI = 1, MAX_IETA = 85, MAX_IPHI = 360 }; // barrel lower and upper bounds on eta and phi enum { IX_MIN = 1, IY_MIN = 1, IX_MAX = 100, IY_MAX = 100 }; // endcaps lower and upper bounds on x and y - /************************************************* + /************************************** 1d plot of ECAL pedestal of 1 IOV - *************************************************/ + ***************************************/ class EcalPedestalsHist : public cond::payloadInspector::PlotImage { public: EcalPedestalsHist() : cond::payloadInspector::PlotImage("ECAL pedestal map") { setSingleIov(true); } @@ -127,9 +127,9 @@ namespace { } // fill method }; // class EcalPedestalsHist - /************************************************* + /************************************** 2d plot of ECAL pedestal of 1 IOV - *************************************************/ + ***************************************/ class EcalPedestalsPlot : public cond::payloadInspector::PlotImage { public: @@ -392,14 +392,13 @@ namespace { }; // class EcalPedestalsPlot - /************************************************************ - 2d plot of ECAL pedestals difference between 2 IOVs - *************************************************************/ - template - class EcalPedestalsDiffBase : public cond::payloadInspector::PlotImage { + /***************************************************************** + 2d plot of ECAL pedestals difference or ratio between 2 IOVs + ******************************************************************/ + template + class EcalPedestalsBase : public cond::payloadInspector::PlotImage { public: - EcalPedestalsDiffBase() - : cond::payloadInspector::PlotImage("ECAL pedestals difference") {} + EcalPedestalsBase() : cond::payloadInspector::PlotImage("ECAL pedestals comparison") {} bool fill() override { uint32_t gainValues[kGains] = {12, 6, 1}; TH2F** barrel_m = new TH2F*[kGains]; @@ -496,141 +495,246 @@ namespace { } // std::cout << " irun " << irun << " tag " << l_tagname[irun] << " IOV " << run[irun] << std ::endl; if (payload.get()) { - if (payload->barrelItems().empty()) - return false; - for (int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) { - uint32_t rawid = EBDetId::unhashIndex(cellid); - if (payload->find(rawid) == payload->end()) - continue; - - if (irun == 0) { - meanEB[0][cellid] = (*payload)[rawid].mean_x12; - rmsEB[0][cellid] = (*payload)[rawid].rms_x12; - meanEB[1][cellid] = (*payload)[rawid].mean_x6; - rmsEB[1][cellid] = (*payload)[rawid].rms_x6; - meanEB[2][cellid] = (*payload)[rawid].mean_x1; - rmsEB[2][cellid] = (*payload)[rawid].rms_x1; - } else { - Double_t phi = (Double_t)(EBDetId(rawid)).iphi() - 0.5; - Double_t eta = (Double_t)(EBDetId(rawid)).ieta(); - if (eta > 0.) - eta = eta - 0.5; // 0.5 to 84.5 - else - eta = eta + 0.5; // -84.5 to -0.5 - barrel_m[0]->Fill(phi, eta, (*payload)[rawid].mean_x12 - meanEB[0][cellid]); - double diff = (*payload)[rawid].rms_x12 - rmsEB[0][cellid]; - barrel_r[0]->Fill(phi, eta, diff); - if (std::abs(diff) < 1.) { - EBmean[0] = EBmean[0] + diff; - EBrms[0] = EBrms[0] + diff * diff; - EBtot[0]++; - } - // else std::cout << " gain 12 chan " << cellid << " diff " << diff << std::endl; - barrel_m[1]->Fill(phi, eta, (*payload)[rawid].mean_x6 - meanEB[1][cellid]); - diff = (*payload)[rawid].rms_x6 - rmsEB[1][cellid]; - barrel_r[1]->Fill(phi, eta, diff); - if (std::abs(diff) < 1.) { - EBmean[1] = EBmean[1] + diff; - EBrms[1] = EBrms[1] + diff * diff; - EBtot[1]++; - } - // else std::cout << " gain 6 chan " << cellid << " diff " << diff << std::endl; - barrel_m[2]->Fill(phi, eta, (*payload)[rawid].mean_x1 - meanEB[2][cellid]); - diff = (*payload)[rawid].rms_x1 - rmsEB[2][cellid]; - barrel_r[2]->Fill(phi, eta, diff); - if (std::abs(diff) < 1.) { - EBmean[2] = EBmean[2] + diff; - EBrms[2] = EBrms[2] + diff * diff; - EBtot[2]++; + if (!payload->barrelItems().empty()) { + for (int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) { + uint32_t rawid = EBDetId::unhashIndex(cellid); + if (payload->find(rawid) == payload->end()) + continue; + + if (irun == 0) { + meanEB[0][cellid] = (*payload)[rawid].mean_x12; + rmsEB[0][cellid] = (*payload)[rawid].rms_x12; + meanEB[1][cellid] = (*payload)[rawid].mean_x6; + rmsEB[1][cellid] = (*payload)[rawid].rms_x6; + meanEB[2][cellid] = (*payload)[rawid].mean_x1; + rmsEB[2][cellid] = (*payload)[rawid].rms_x1; + } else { + Double_t phi = (Double_t)(EBDetId(rawid)).iphi() - 0.5; + Double_t eta = (Double_t)(EBDetId(rawid)).ieta(); + if (eta > 0.) + eta = eta - 0.5; // 0.5 to 84.5 + else + eta = eta + 0.5; // -84.5 to -0.5 + double dr, drms; + // gain 12 + float val = (*payload)[rawid].mean_x12; + float valr = (*payload)[rawid].rms_x12; + if (method == 0) { + dr = val - meanEB[0][cellid]; + drms = valr - rmsEB[0][cellid]; + } else { // ratio + if (meanEB[0][cellid] == 0) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; // use a large value + } else + dr = val / meanEB[0][cellid]; + if (rmsEB[0][cellid] == 0) { + if (valr == 0.) + drms = 1.; + else + drms = 9999.; // use a large value + } else + drms = valr / rmsEB[0][cellid]; + } + barrel_m[0]->Fill(phi, eta, dr); + barrel_r[0]->Fill(phi, eta, drms); + if (std::abs(drms) < 1.) { + EBmean[0] = EBmean[0] + drms; + EBrms[0] = EBrms[0] + drms * drms; + EBtot[0]++; + } + // gain 6 + val = (*payload)[rawid].mean_x6; + valr = (*payload)[rawid].rms_x6; + if (method == 0) { + dr = val - meanEB[1][cellid]; + drms = valr - rmsEB[1][cellid]; + } else { // ratio + if (meanEB[1][cellid] == 0) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; // use a large value + } else + dr = val / meanEB[1][cellid]; + if (rmsEB[1][cellid] == 0) { + if (valr == 0.) + drms = 1.; + else + drms = 9999.; // use a large value + } else + drms = valr / rmsEB[1][cellid]; + } + barrel_m[1]->Fill(phi, eta, dr); + barrel_r[1]->Fill(phi, eta, drms); + if (std::abs(drms) < 1.) { + EBmean[1] = EBmean[1] + drms; + EBrms[1] = EBrms[1] + drms * drms; + EBtot[1]++; + } + // gain 1 + val = (*payload)[rawid].mean_x1; + valr = (*payload)[rawid].rms_x1; + if (method == 0) { + dr = val - meanEB[2][cellid]; + drms = valr - rmsEB[2][cellid]; + } else { // ratio + if (meanEB[2][cellid] == 0) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; // use a large value + } else + dr = val / meanEB[2][cellid]; + if (rmsEB[2][cellid] == 0) { + if (valr == 0.) + drms = 1.; + else + drms = 9999.; // use a large value + } else + drms = valr / rmsEB[2][cellid]; + } + barrel_m[2]->Fill(phi, eta, dr); + barrel_r[2]->Fill(phi, eta, drms); + if (std::abs(drms) < 1.) { + EBmean[2] = EBmean[2] + drms; + EBrms[2] = EBrms[2] + drms * drms; + EBtot[2]++; + } } - // else std::cout << " gain 1 chan " << cellid << " diff " << diff << std::endl; - } - } // loop over cellid - - if (payload->endcapItems().empty()) - return false; - // looping over the EE channels - for (int iz = -1; iz < 2; iz = iz + 2) { // -1 or +1 - for (int iy = IY_MIN; iy < IY_MAX + IY_MIN; iy++) { - for (int ix = IX_MIN; ix < IX_MAX + IX_MIN; ix++) { - if (EEDetId::validDetId(ix, iy, iz)) { - EEDetId myEEId = EEDetId(ix, iy, iz, EEDetId::XYMODE); - uint32_t rawid = myEEId.rawId(); - uint32_t index = myEEId.hashedIndex(); - if (payload->find(rawid) == payload->end()) - continue; - if (irun == 0) { - meanEE[0][index] = (*payload)[rawid].mean_x12; - rmsEE[0][index] = (*payload)[rawid].rms_x12; - meanEE[1][index] = (*payload)[rawid].mean_x6; - rmsEE[1][index] = (*payload)[rawid].rms_x6; - meanEE[2][index] = (*payload)[rawid].mean_x1; - rmsEE[2][index] = (*payload)[rawid].rms_x1; - } // fist run - else { - if (iz == 1) { - endc_p_m[0]->Fill(ix, iy, (*payload)[rawid].mean_x12 - meanEE[0][index]); - double diff = (*payload)[rawid].rms_x12 - rmsEE[0][index]; - endc_p_r[0]->Fill(ix, iy, rmsEE[0][index] - (*payload)[rawid].rms_x12); - if (std::abs(diff) < 1.) { - EEmean[0] = EEmean[0] + diff; - EErms[0] = EErms[0] + diff * diff; - EEtot[0]++; - } - //else std::cout << " gain 12 chan " << index << " diff " << diff << std::endl; - endc_p_m[1]->Fill(ix, iy, (*payload)[rawid].mean_x6 - meanEE[1][index]); - diff = (*payload)[rawid].rms_x6 - rmsEE[1][index]; - endc_p_r[1]->Fill(ix, iy, diff); - if (std::abs(diff) < 1.) { - EEmean[1] = EEmean[1] + diff; - EErms[1] = EErms[1] + diff * diff; - EEtot[1]++; + } // loop over cellid + } // barrel data present + if (payload->endcapItems().empty()) { + // looping over the EE channels + for (int iz = -1; iz < 2; iz = iz + 2) { // -1 or +1 + for (int iy = IY_MIN; iy < IY_MAX + IY_MIN; iy++) { + for (int ix = IX_MIN; ix < IX_MAX + IX_MIN; ix++) { + if (EEDetId::validDetId(ix, iy, iz)) { + EEDetId myEEId = EEDetId(ix, iy, iz, EEDetId::XYMODE); + uint32_t rawid = myEEId.rawId(); + uint32_t index = myEEId.hashedIndex(); + if (payload->find(rawid) == payload->end()) + continue; + if (irun == 0) { + meanEE[0][index] = (*payload)[rawid].mean_x12; + rmsEE[0][index] = (*payload)[rawid].rms_x12; + meanEE[1][index] = (*payload)[rawid].mean_x6; + rmsEE[1][index] = (*payload)[rawid].rms_x6; + meanEE[2][index] = (*payload)[rawid].mean_x1; + rmsEE[2][index] = (*payload)[rawid].rms_x1; + } // fist run + else { + double dr, drms; + // gain 12 + float val = (*payload)[rawid].mean_x12; + float valr = (*payload)[rawid].rms_x12; + if (method == 0) { + dr = val - meanEE[0][index]; + drms = valr - rmsEE[0][index]; + } else { // ratio + if (meanEE[0][index] == 0) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; // use a large value + } else + dr = val / meanEE[0][index]; + if (rmsEE[0][index] == 0) { + if (valr == 0.) + drms = 1.; + else + drms = 9999.; // use a large value + } else + drms = valr / rmsEE[0][index]; } - //else std::cout << " gain 6 chan " << index << " diff " << diff << std::endl; - endc_p_m[2]->Fill(ix, iy, (*payload)[rawid].mean_x1 - meanEE[2][index]); - diff = (*payload)[rawid].rms_x1 - rmsEE[2][index]; - endc_p_r[2]->Fill(ix, iy, diff); - if (std::abs(diff) < 1.) { - EEmean[2] = EEmean[2] + diff; - EErms[2] = EErms[2] + diff * diff; - EEtot[2]++; + if (iz == 1) { // EE+ + endc_p_m[0]->Fill(ix, iy, dr); + endc_p_r[0]->Fill(ix, iy, drms); + } else { // EE- + endc_m_m[0]->Fill(ix, iy, dr); + endc_m_r[0]->Fill(ix, iy, drms); } - //else std::cout << " gain 1 chan " << index << " diff " << diff << std::endl; - } // EE+ - else { - endc_m_m[0]->Fill(ix, iy, (*payload)[rawid].mean_x12 - meanEE[0][index]); - double diff = (*payload)[rawid].rms_x12 - rmsEE[0][index]; - endc_m_r[0]->Fill(ix, iy, rmsEE[0][index] - (*payload)[rawid].rms_x12); - if (std::abs(diff) < 1.) { - EEmean[0] = EEmean[0] + diff; - EErms[0] = EErms[0] + diff * diff; + if (std::abs(drms) < 1.) { + EEmean[0] = EEmean[0] + drms; + EErms[0] = EErms[0] + drms * drms; EEtot[0]++; } - //else std::cout << " gain 12 chan " << index << " diff " << diff << std::endl; - endc_m_m[1]->Fill(ix, iy, (*payload)[rawid].mean_x6 - meanEE[1][index]); - diff = (*payload)[rawid].rms_x6 - rmsEE[1][index]; - endc_m_r[1]->Fill(ix, iy, diff); - if (std::abs(diff) < 1.) { - EEmean[1] = EEmean[1] + diff; - EErms[1] = EErms[1] + diff * diff; + // gain 6 + val = (*payload)[rawid].mean_x6; + valr = (*payload)[rawid].rms_x6; + if (method == 0) { + dr = val - meanEE[1][index]; + drms = valr - rmsEE[1][index]; + } else { // ratio + if (meanEE[1][index] == 0) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; // use a large value + } else + dr = val / meanEE[1][index]; + if (rmsEE[1][index] == 0) { + if (valr == 0.) + drms = 1.; + else + drms = 9999.; // use a large value + } else + drms = valr / rmsEE[1][index]; + } + if (iz == 1) { // EE+ + endc_p_m[1]->Fill(ix, iy, dr); + endc_p_r[1]->Fill(ix, iy, drms); + } else { // EE- + endc_m_m[1]->Fill(ix, iy, dr); + endc_m_r[1]->Fill(ix, iy, drms); + } + if (std::abs(drms) < 1.) { + EEmean[1] = EEmean[1] + drms; + EErms[1] = EErms[1] + drms * drms; EEtot[1]++; } - //else std::cout << " gain 6 chan " << index << " diff " << diff << std::endl; - endc_m_m[2]->Fill(ix, iy, (*payload)[rawid].mean_x1 - meanEE[2][index]); - diff = (*payload)[rawid].rms_x1 - rmsEE[2][index]; - endc_m_r[2]->Fill(ix, iy, diff); - if (std::abs(diff) < 1.) { - EEmean[2] = EEmean[2] + diff; - EErms[2] = EErms[2] + diff * diff; + // gain 1 + val = (*payload)[rawid].mean_x1; + valr = (*payload)[rawid].rms_x1; + if (method == 0) { + dr = val - meanEE[2][index]; + drms = valr - rmsEE[2][index]; + } else { // ratio + if (meanEE[2][index] == 0) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; // use a large value + } else + dr = val / meanEE[2][index]; + if (rmsEE[2][index] == 0) { + if (valr == 0.) + drms = 1.; + else + drms = 9999.; // use a large value + } else + drms = valr / rmsEE[2][index]; + } + if (iz == 1) { // EE+ + endc_p_m[2]->Fill(ix, iy, dr); + endc_p_r[2]->Fill(ix, iy, drms); + } else { // EE- + endc_m_m[2]->Fill(ix, iy, dr); + endc_m_r[2]->Fill(ix, iy, drms); + } + if (std::abs(drms) < 1.) { + EEmean[2] = EEmean[2] + drms; + EErms[2] = EErms[2] + drms * drms; EEtot[2]++; } - //else std::cout << " gain 1 chan " << index << " diff " << diff << std::endl; - } // EE- - } // second run - } // validDetId - } // loop over ix - } // loop over iy - } // loop over iz + } // second run + } // validDetId + } // loop over ix + } // loop over iy + } // loop over iz + } // endcap data present } // if payload.get() else return false; @@ -643,13 +747,25 @@ namespace { t1.SetNDC(); t1.SetTextAlign(26); int len = l_tagname[0].length() + l_tagname[1].length(); - if (ntags == 2 && len < 58) { - t1.SetTextSize(0.025); - t1.DrawLatex( - 0.5, 0.96, Form("%s IOV %i - %s IOV %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 58) { + t1.SetTextSize(0.025); + t1.DrawLatex(0.5, + 0.96, + Form("%s IOV %i %s %s IOV %i", + l_tagname[1].c_str(), + run[1], + dr[method].c_str(), + l_tagname[0].c_str(), + run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal Pedestals, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } } else { t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal Pedestals, IOV %i - %i", run[1], run[0])); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; @@ -707,9 +823,11 @@ namespace { canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; // class EcalPedestalsDiffBase - using EcalPedestalsDiffOneTag = EcalPedestalsDiffBase; - using EcalPedestalsDiffTwoTags = EcalPedestalsDiffBase; + }; // class EcalPedestalsBase + using EcalPedestalsDiffOneTag = EcalPedestalsBase; + using EcalPedestalsDiffTwoTags = EcalPedestalsBase; + using EcalPedestalsRatioOneTag = EcalPedestalsBase; + using EcalPedestalsRatioTwoTags = EcalPedestalsBase; /************************************************* 2d histogram of ECAL barrel pedestal of 1 IOV @@ -1456,6 +1574,8 @@ PAYLOAD_INSPECTOR_MODULE(EcalPedestals) { PAYLOAD_INSPECTOR_CLASS(EcalPedestalsPlot); PAYLOAD_INSPECTOR_CLASS(EcalPedestalsDiffOneTag); PAYLOAD_INSPECTOR_CLASS(EcalPedestalsDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalPedestalsRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalPedestalsRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalPedestalsEBMean12Map); PAYLOAD_INSPECTOR_CLASS(EcalPedestalsEBMean6Map); PAYLOAD_INSPECTOR_CLASS(EcalPedestalsEBMean1Map); diff --git a/CondCore/EcalPlugins/plugins/EcalSamplesCorrelation_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalSamplesCorrelation_PayloadInspector.cc index a4ce143ed6f63..091ab2d5f00aa 100644 --- a/CondCore/EcalPlugins/plugins/EcalSamplesCorrelation_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalSamplesCorrelation_PayloadInspector.cc @@ -106,25 +106,41 @@ namespace { /******************************************************* 2d plot of Ecal Samples Correlation difference between 2 IOVs *******************************************************/ - - class EcalSamplesCorrelationDiff : public cond::payloadInspector::PlotImage { + template + class EcalSamplesCorrelationDiffBase + : public cond::payloadInspector::PlotImage { public: - //void fill_align(const std::vector& vect,TH2F* align,float val[],const int column, int row,unsigned irun); - - EcalSamplesCorrelationDiff() - : cond::payloadInspector::PlotImage("Ecal Samples Correlation difference") { - setSingleIov(false); - } - - bool fill(const std::vector >& iovs) override { - unsigned int run[2], irun = 0; + EcalSamplesCorrelationDiffBase() + : cond::payloadInspector::PlotImage( + "Ecal Samples Correlation difference") {} + bool fill() override { + unsigned int run[2]; float val[6][36]; TH2F* align = new TH2F("", "", 1, 0., 1., 1, 0., 1.); // pseudo creation int NbRows = 0; - - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + std::string l_tagname[2]; + + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { EcalSamplesCorrelation it = (*payload); @@ -154,7 +170,6 @@ namespace { } // if payload.get() else return false; - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -181,7 +196,7 @@ namespace { align->GetYaxis()->SetTickLength(0.); align->GetYaxis()->SetLabelSize(0.); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; @@ -201,12 +216,15 @@ namespace { irow++; } } - }; + }; // class EcalSamplesCorrelationDiffBase + using EcalSamplesCorrelationDiffOneTag = EcalSamplesCorrelationDiffBase; + using EcalSamplesCorrelationDiffTwoTags = EcalSamplesCorrelationDiffBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalSamplesCorrelation) { PAYLOAD_INSPECTOR_CLASS(EcalSamplesCorrelationPlot); - PAYLOAD_INSPECTOR_CLASS(EcalSamplesCorrelationDiff); -} \ No newline at end of file + PAYLOAD_INSPECTOR_CLASS(EcalSamplesCorrelationDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalSamplesCorrelationDiffTwoTags); +} diff --git a/CondCore/EcalPlugins/plugins/EcalTPGCrystalStatus_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTPGCrystalStatus_PayloadInspector.cc index 3c8b5cda3deba..73a04734c8c01 100644 --- a/CondCore/EcalPlugins/plugins/EcalTPGCrystalStatus_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTPGCrystalStatus_PayloadInspector.cc @@ -125,24 +125,42 @@ namespace { /************************************************************************ 2d plot of ECAL TPGCrystalStatus difference between 2 IOVs ************************************************************************/ - class EcalTPGCrystalStatusDiff : public cond::payloadInspector::PlotImage { + template + class EcalTPGCrystalStatusDiffBase : public cond::payloadInspector::PlotImage { public: - EcalTPGCrystalStatusDiff() - : cond::payloadInspector::PlotImage("ECAL TPGCrystalStatus difference") { - setSingleIov(false); - } + EcalTPGCrystalStatusDiffBase() + : cond::payloadInspector::PlotImage("ECAL TPGCrystalStatus difference") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "EB difference", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "EE+ difference", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "EE- difference", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); int EBstat = 0, EEstat[2] = {0, 0}; - unsigned int run[2] = {0, 0}, irun = 0; + unsigned int run[2] = {0, 0}; float vEB[kEBChannels], vEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { for (int ieta = -MAX_IETA; ieta <= MAX_IETA; ieta++) { Double_t eta = (Double_t)ieta; @@ -198,7 +216,6 @@ namespace { } // payload else return false; - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -211,8 +228,19 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal TPGCrystalStatus, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2) { + if (len < 80) { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s %i - %s %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal TPGCrystalStatus, IOV %i - %i", run[1], run[0])); + } + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i - %i", l_tagname[0].c_str(), run[1], run[0])); + } // float xmi[3] = {0.0 , 0.24, 0.76}; // float xma[3] = {0.24, 0.76, 1.00}; @@ -236,15 +264,17 @@ namespace { DrawEE(endc_p, -1., 1.); t1.DrawLatex(0.15, 0.92, Form("%i differences", EEstat[1])); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalTPGCrystalStatusDiffBase + using EcalTPGCrystalStatusDiffOneTag = EcalTPGCrystalStatusDiffBase; + using EcalTPGCrystalStatusDiffTwoTags = EcalTPGCrystalStatusDiffBase; - /***************************************** - 2d plot of EcalTPGCrystalStatus Error Summary of 1 IOV - ******************************************/ + /********************************************************* + 2d plot of EcalTPGCrystalStatus Error Summary of 1 IOV + *********************************************************/ class EcalTPGCrystalStatusSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalTPGCrystalStatusSummaryPlot() @@ -342,6 +372,7 @@ namespace { // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalTPGCrystalStatus) { PAYLOAD_INSPECTOR_CLASS(EcalTPGCrystalStatusPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTPGCrystalStatusDiff); + PAYLOAD_INSPECTOR_CLASS(EcalTPGCrystalStatusDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTPGCrystalStatusDiffTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalTPGCrystalStatusSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalTPGLinearizationConst_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTPGLinearizationConst_PayloadInspector.cc index 51f812e851241..75cdfcb4a91f5 100644 --- a/CondCore/EcalPlugins/plugins/EcalTPGLinearizationConst_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTPGLinearizationConst_PayloadInspector.cc @@ -271,14 +271,14 @@ namespace { /****************************************************************** 2d plot of ECAL TPGLinearizationConst difference between 2 IOVs ******************************************************************/ - class EcalTPGLinearizationConstDiff : public cond::payloadInspector::PlotImage { + template + class EcalTPGLinearizationConstBase + : public cond::payloadInspector::PlotImage { public: - EcalTPGLinearizationConstDiff() - : cond::payloadInspector::PlotImage("ECAL Gain Ratios difference") { - setSingleIov(false); - } + EcalTPGLinearizationConstBase() + : cond::payloadInspector::PlotImage("ECAL Gain Ratios comparison") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F** barrel_m = new TH2F*[kGains]; TH2F** endc_p_m = new TH2F*[kGains]; TH2F** endc_m_m = new TH2F*[kGains]; @@ -347,12 +347,32 @@ namespace { rEEmax[gainId] = -10.; } - unsigned int run[2], irun = 0; + unsigned int run[2]; //float gEB[3][kEBChannels], gEE[3][kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { + float dr; for (int sign = 0; sign < kSides; sign++) { int thesign = sign == 1 ? 1 : -1; @@ -367,67 +387,127 @@ namespace { if (irun == 0) { mEB[0][hashindex] = val; } else { - float diff = val - mEB[0][hashindex]; - barrel_m[0]->Fill(iphi, y, diff); - if (diff < mEBmin[0]) - mEBmin[0] = diff; - if (diff > mEBmax[0]) - mEBmax[0] = diff; + if (method == 0) + dr = val - mEB[0][hashindex]; + else { // ratio + if (mEB[0][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEB[0][hashindex]; + } + barrel_m[0]->Fill(iphi, y, dr); + if (dr < mEBmin[0]) + mEBmin[0] = dr; + if (dr > mEBmax[0]) + mEBmax[0] = dr; } val = (*payload)[id.rawId()].shift_x12; if (irun == 0) { rEB[0][hashindex] = val; } else { - float diff = val - rEB[0][hashindex]; - barrel_r[0]->Fill(iphi, y, diff); - if (diff < rEBmin[0]) - rEBmin[0] = diff; - if (diff > rEBmax[0]) - rEBmax[0] = diff; + if (method == 0) + dr = val - rEB[0][hashindex]; + else { // ratio + if (rEB[0][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / rEB[0][hashindex]; + } + barrel_r[0]->Fill(iphi, y, dr); + if (dr < rEBmin[0]) + rEBmin[0] = dr; + if (dr > rEBmax[0]) + rEBmax[0] = dr; } val = (*payload)[id.rawId()].mult_x6; if (irun == 0) { mEB[1][hashindex] = val; } else { - float diff = val - mEB[1][hashindex]; - barrel_m[1]->Fill(iphi, y, diff); - if (diff < mEBmin[1]) - mEBmin[1] = diff; - if (diff > mEBmax[1]) - mEBmax[1] = diff; + if (method == 0) + dr = val - mEB[1][hashindex]; + else { // ratio + if (mEB[1][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEB[1][hashindex]; + } + barrel_m[1]->Fill(iphi, y, dr); + if (dr < mEBmin[1]) + mEBmin[1] = dr; + if (dr > mEBmax[1]) + mEBmax[1] = dr; } val = (*payload)[id.rawId()].shift_x6; if (irun == 0) { rEB[1][hashindex] = val; } else { - float diff = val - rEB[1][hashindex]; - barrel_r[1]->Fill(iphi, y, diff); - if (diff < rEBmin[1]) - rEBmin[1] = diff; - if (diff > rEBmax[1]) - rEBmax[1] = diff; + if (method == 0) + dr = val - rEB[1][hashindex]; + else { // ratio + if (rEB[1][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / rEB[1][hashindex]; + } + barrel_r[1]->Fill(iphi, y, dr); + if (dr < rEBmin[1]) + rEBmin[1] = dr; + if (dr > rEBmax[1]) + rEBmax[1] = dr; } val = (*payload)[id.rawId()].mult_x1; if (irun == 0) { mEB[2][hashindex] = val; } else { - float diff = val - mEB[2][hashindex]; - barrel_m[2]->Fill(iphi, y, diff); - if (diff < mEBmin[2]) - mEBmin[2] = diff; - if (diff > mEBmax[2]) - mEBmax[2] = diff; + if (method == 0) + dr = val - mEB[2][hashindex]; + else { // ratio + if (mEB[2][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEB[2][hashindex]; + } + barrel_m[2]->Fill(iphi, y, dr); + if (dr < mEBmin[2]) + mEBmin[2] = dr; + if (dr > mEBmax[2]) + mEBmax[2] = dr; } val = (*payload)[id.rawId()].shift_x1; if (irun == 0) { rEB[2][hashindex] = val; } else { - float diff = val - rEB[2][hashindex]; - barrel_r[2]->Fill(iphi, y, diff); - if (diff < rEBmin[2]) - rEBmin[2] = diff; - if (diff > rEBmax[2]) - rEBmax[2] = diff; + if (method == 0) + dr = val - rEB[2][hashindex]; + else { // ratio + if (rEB[2][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / rEB[2][hashindex]; + } + barrel_r[2]->Fill(iphi, y, dr); + if (dr < rEBmin[2]) + rEBmin[2] = dr; + if (dr > rEBmax[2]) + rEBmax[2] = dr; } } // iphi } // ieta @@ -442,94 +522,153 @@ namespace { if (irun == 0) { mEE[0][hashindex] = val; } else { - float diff = val - mEE[0][hashindex]; + if (method == 0) + dr = val - mEE[0][hashindex]; + else { // ratio + if (mEE[0][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEE[0][hashindex]; + } if (thesign == 1) - endc_p_m[0]->Fill(ix + 1, iy + 1, diff); + endc_p_m[0]->Fill(ix + 1, iy + 1, dr); else - endc_m_m[0]->Fill(ix + 1, iy + 1, diff); - if (diff < mEEmin[0]) - mEEmin[0] = diff; - if (diff > mEEmax[0]) - mEEmax[0] = diff; + endc_m_m[0]->Fill(ix + 1, iy + 1, dr); + if (dr < mEEmin[0]) + mEEmin[0] = dr; + if (dr > mEEmax[0]) + mEEmax[0] = dr; } val = (*payload)[id.rawId()].shift_x12; if (irun == 0) { rEE[0][hashindex] = val; } else { - float diff = val - rEE[0][hashindex]; + if (method == 0) + dr = val - rEE[0][hashindex]; + else { // ratio + if (rEE[0][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / rEE[0][hashindex]; + } if (thesign == 1) - endc_p_r[0]->Fill(ix + 1, iy + 1, diff); + endc_p_r[0]->Fill(ix + 1, iy + 1, dr); else - endc_m_r[0]->Fill(ix + 1, iy + 1, diff); - if (diff < rEEmin[0]) - rEEmin[0] = diff; - if (diff > rEEmax[0]) - rEEmax[0] = diff; + endc_m_r[0]->Fill(ix + 1, iy + 1, dr); + if (dr < rEEmin[0]) + rEEmin[0] = dr; + if (dr > rEEmax[0]) + rEEmax[0] = dr; } val = (*payload)[id.rawId()].mult_x6; if (irun == 0) { mEE[1][hashindex] = val; } else { - float diff = val - mEE[1][hashindex]; + if (method == 0) + dr = val - mEE[1][hashindex]; + else { // ratio + if (mEE[1][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEE[1][hashindex]; + } if (thesign == 1) - endc_p_m[1]->Fill(ix + 1, iy + 1, diff); + endc_p_m[1]->Fill(ix + 1, iy + 1, dr); else - endc_m_m[1]->Fill(ix + 1, iy + 1, diff); - if (diff < mEEmin[1]) - mEEmin[1] = diff; - if (diff > mEEmax[1]) - mEEmax[1] = diff; + endc_m_m[1]->Fill(ix + 1, iy + 1, dr); + if (dr < mEEmin[1]) + mEEmin[1] = dr; + if (dr > mEEmax[1]) + mEEmax[1] = dr; } val = (*payload)[id.rawId()].shift_x6; if (irun == 0) { rEE[1][hashindex] = val; } else { - float diff = val - rEE[1][hashindex]; + if (method == 0) + dr = val - rEE[1][hashindex]; + else { // ratio + if (rEE[1][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / rEE[1][hashindex]; + } if (thesign == 1) - endc_p_r[1]->Fill(ix + 1, iy + 1, diff); + endc_p_r[1]->Fill(ix + 1, iy + 1, dr); else - endc_m_r[1]->Fill(ix + 1, iy + 1, diff); - if (diff < rEEmin[1]) - rEEmin[1] = diff; - if (diff > rEEmax[1]) - rEEmax[1] = diff; + endc_m_r[1]->Fill(ix + 1, iy + 1, dr); + if (dr < rEEmin[1]) + rEEmin[1] = dr; + if (dr > rEEmax[1]) + rEEmax[1] = dr; } val = (*payload)[id.rawId()].mult_x1; if (irun == 0) { mEE[2][hashindex] = val; } else { - float diff = val - mEE[2][hashindex]; + if (method == 0) + dr = val - mEE[2][hashindex]; + else { // ratio + if (mEE[2][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEE[2][hashindex]; + } if (thesign == 1) - endc_p_m[2]->Fill(ix + 1, iy + 1, diff); + endc_p_m[2]->Fill(ix + 1, iy + 1, dr); else - endc_m_m[2]->Fill(ix + 1, iy + 1, diff); - if (diff < mEEmin[2]) - mEEmin[2] = diff; - if (diff > mEEmax[2]) - mEEmax[2] = diff; + endc_m_m[2]->Fill(ix + 1, iy + 1, dr); + if (dr < mEEmin[2]) + mEEmin[2] = dr; + if (dr > mEEmax[2]) + mEEmax[2] = dr; } val = (*payload)[id.rawId()].shift_x1; if (irun == 0) { rEE[2][hashindex] = val; } else { - float diff = val - rEE[2][hashindex]; + if (method == 0) + dr = val - rEE[2][hashindex]; + else { // ratio + if (rEE[2][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / rEE[2][hashindex]; + } if (thesign == 1) - endc_p_r[2]->Fill(ix + 1, iy + 1, diff); + endc_p_r[2]->Fill(ix + 1, iy + 1, dr); else - endc_m_r[2]->Fill(ix + 1, iy + 1, diff); - if (diff < rEEmin[2]) - rEEmin[2] = diff; - if (diff > rEEmax[2]) - rEEmax[2] = diff; + endc_m_r[2]->Fill(ix + 1, iy + 1, dr); + if (dr < rEEmin[2]) + rEEmin[2] = dr; + if (dr > rEEmax[2]) + rEEmax[2] = dr; } - // fout << " x " << ix << " y " << " diff " << diff << std::endl; + // fout << " x " << ix << " y " << " dr " << dr << std::endl; } // iy } // ix } // side } // if payload.get() else return false; - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -538,8 +677,23 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal TPGLinearizationConst, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 70) { + t1.SetTextSize(0.03); + t1.DrawLatex( + 0.5, + 0.96, + Form("%s %i %s %s %i", l_tagname[1].c_str(), run[1], dr[method].c_str(), l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("Ecal TPGLinearizationConst, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.22, 0.78}; float xma[3] = {0.22, 0.78, 1.00}; @@ -569,16 +723,23 @@ namespace { DrawEE(endc_p_r[gId], rEEmin[gId], rEEmax[gId]); } - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalPedestalsDiffBase + using EcalTPGLinearizationConstDiffOneTag = EcalTPGLinearizationConstBase; + using EcalTPGLinearizationConstDiffTwoTags = EcalTPGLinearizationConstBase; + using EcalTPGLinearizationConstRatioOneTag = EcalTPGLinearizationConstBase; + using EcalTPGLinearizationConstRatioTwoTags = EcalTPGLinearizationConstBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalTPGLinearizationConst) { PAYLOAD_INSPECTOR_CLASS(EcalTPGLinearizationConstPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTPGLinearizationConstDiff); + PAYLOAD_INSPECTOR_CLASS(EcalTPGLinearizationConstDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTPGLinearizationConstDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalTPGLinearizationConstRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTPGLinearizationConstRatioTwoTags); } diff --git a/CondCore/EcalPlugins/plugins/EcalTPGPedestals_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTPGPedestals_PayloadInspector.cc index 31af8100e6b80..f918fe1df145e 100644 --- a/CondCore/EcalPlugins/plugins/EcalTPGPedestals_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTPGPedestals_PayloadInspector.cc @@ -187,13 +187,12 @@ namespace { /****************************************************************** 2d plot of ECAL TPGPedestals difference between 2 IOVs ******************************************************************/ - class EcalTPGPedestalsDiff : public cond::payloadInspector::PlotImage { + template + class EcalTPGPedestalsBase : public cond::payloadInspector::PlotImage { public: - EcalTPGPedestalsDiff() : cond::payloadInspector::PlotImage("ECAL Gain Ratios difference") { - setSingleIov(false); - } - - bool fill(const std::vector >& iovs) override { + EcalTPGPedestalsBase() + : cond::payloadInspector::PlotImage("ECAL Gain Ratios comparison") {} + bool fill() override { TH2F** barrel_m = new TH2F*[kGains]; TH2F** endc_p_m = new TH2F*[kGains]; TH2F** endc_m_m = new TH2F*[kGains]; @@ -230,12 +229,31 @@ namespace { mEEmax[gainId] = -10.; } - unsigned int run[2], irun = 0; - //float gEB[3][kEBChannels], gEE[3][kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + unsigned int run[2]; + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { + float dr; for (int sign = 0; sign < kSides; sign++) { int thesign = sign == 1 ? 1 : -1; @@ -250,34 +268,64 @@ namespace { if (irun == 0) { mEB[0][hashindex] = val; } else { - float diff = val - mEB[0][hashindex]; - barrel_m[0]->Fill(iphi, y, diff); - if (diff < mEBmin[0]) - mEBmin[0] = diff; - if (diff > mEBmax[0]) - mEBmax[0] = diff; + if (method == 0) + dr = val - mEB[0][hashindex]; + else { + if (mEB[0][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEB[0][hashindex]; + } + barrel_m[0]->Fill(iphi, y, dr); + if (dr < mEBmin[0]) + mEBmin[0] = dr; + if (dr > mEBmax[0]) + mEBmax[0] = dr; } val = (*payload)[id.rawId()].mean_x6; if (irun == 0) { mEB[1][hashindex] = val; } else { - float diff = val - mEB[1][hashindex]; - barrel_m[1]->Fill(iphi, y, diff); - if (diff < mEBmin[1]) - mEBmin[1] = diff; - if (diff > mEBmax[1]) - mEBmax[1] = diff; + if (method == 0) + dr = val - mEB[1][hashindex]; + else { + if (mEB[1][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEB[1][hashindex]; + } + barrel_m[1]->Fill(iphi, y, dr); + if (dr < mEBmin[1]) + mEBmin[1] = dr; + if (dr > mEBmax[1]) + mEBmax[1] = dr; } val = (*payload)[id.rawId()].mean_x1; if (irun == 0) { mEB[2][hashindex] = val; } else { - float diff = val - mEB[2][hashindex]; - barrel_m[2]->Fill(iphi, y, diff); - if (diff < mEBmin[2]) - mEBmin[2] = diff; - if (diff > mEBmax[2]) - mEBmax[2] = diff; + if (method == 0) + dr = val - mEB[2][hashindex]; + else { + if (mEB[2][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEB[2][hashindex]; + } + barrel_m[2]->Fill(iphi, y, dr); + if (dr < mEBmin[2]) + mEBmin[2] = dr; + if (dr > mEBmax[2]) + mEBmax[2] = dr; } } // iphi } // ieta @@ -292,52 +340,81 @@ namespace { if (irun == 0) { mEE[0][hashindex] = val; } else { - float diff = val - mEE[0][hashindex]; + if (method == 0) + dr = val - mEE[0][hashindex]; + else { + if (mEE[0][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEE[0][hashindex]; + } if (thesign == 1) - endc_p_m[0]->Fill(ix + 1, iy + 1, diff); + endc_p_m[0]->Fill(ix + 1, iy + 1, dr); else - endc_m_m[0]->Fill(ix + 1, iy + 1, diff); - if (diff < mEEmin[0]) - mEEmin[0] = diff; - if (diff > mEEmax[0]) - mEEmax[0] = diff; + endc_m_m[0]->Fill(ix + 1, iy + 1, dr); + if (dr < mEEmin[0]) + mEEmin[0] = dr; + if (dr > mEEmax[0]) + mEEmax[0] = dr; } val = (*payload)[id.rawId()].mean_x6; if (irun == 0) { mEE[1][hashindex] = val; } else { - float diff = val - mEE[1][hashindex]; + if (method == 0) + dr = val - mEE[1][hashindex]; + else { + if (mEE[1][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEE[1][hashindex]; + } if (thesign == 1) - endc_p_m[1]->Fill(ix + 1, iy + 1, diff); + endc_p_m[1]->Fill(ix + 1, iy + 1, dr); else - endc_m_m[1]->Fill(ix + 1, iy + 1, diff); - if (diff < mEEmin[1]) - mEEmin[1] = diff; - if (diff > mEEmax[1]) - mEEmax[1] = diff; + endc_m_m[1]->Fill(ix + 1, iy + 1, dr); + if (dr < mEEmin[1]) + mEEmin[1] = dr; + if (dr > mEEmax[1]) + mEEmax[1] = dr; } val = (*payload)[id.rawId()].mean_x1; if (irun == 0) { mEE[2][hashindex] = val; } else { - float diff = val - mEE[2][hashindex]; + if (method == 0) + dr = val - mEE[2][hashindex]; + else { + if (mEE[2][hashindex] == 0.) { + if (val == 0.) + dr = 1.; + else + dr = 9999.; + } else + dr = val / mEE[2][hashindex]; + } if (thesign == 1) - endc_p_m[2]->Fill(ix + 1, iy + 1, diff); + endc_p_m[2]->Fill(ix + 1, iy + 1, dr); else - endc_m_m[2]->Fill(ix + 1, iy + 1, diff); - if (diff < mEEmin[2]) - mEEmin[2] = diff; - if (diff > mEEmax[2]) - mEEmax[2] = diff; + endc_m_m[2]->Fill(ix + 1, iy + 1, dr); + if (dr < mEEmin[2]) + mEEmin[2] = dr; + if (dr > mEEmax[2]) + mEEmax[2] = dr; } - // fout << " x " << ix << " y " << " diff " << diff << std::endl; + // fout << " x " << ix << " y " << " dr " << dr << std::endl; } // iy } // ix } // side } // if payload.get() else return false; - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -346,8 +423,23 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal TPGPedestals, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 150) { + t1.SetTextSize(0.03); + t1.DrawLatex( + 0.5, + 0.96, + Form("%s %i %s %s %i", l_tagname[1].c_str(), run[1], dr[method].c_str(), l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("Ecal TPGPedestals, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.22, 0.78}; float xma[3] = {0.22, 0.78, 1.00}; @@ -371,16 +463,23 @@ namespace { DrawEE(endc_p_m[gId], mEEmin[gId], mEEmax[gId]); } - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalTPGPedestalsDiffBase + using EcalTPGPedestalsDiffOneTag = EcalTPGPedestalsBase; + using EcalTPGPedestalsDiffTwoTags = EcalTPGPedestalsBase; + using EcalTPGPedestalsRatioOneTag = EcalTPGPedestalsBase; + using EcalTPGPedestalsRatioTwoTags = EcalTPGPedestalsBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalTPGPedestals) { PAYLOAD_INSPECTOR_CLASS(EcalTPGPedestalsPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTPGPedestalsDiff); + PAYLOAD_INSPECTOR_CLASS(EcalTPGPedestalsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTPGPedestalsDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalTPGPedestalsRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTPGPedestalsRatioTwoTags); } diff --git a/CondCore/EcalPlugins/plugins/EcalTPGStripStatus_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTPGStripStatus_PayloadInspector.cc index aa2a866cf6fb3..ca67b4b597e55 100644 --- a/CondCore/EcalPlugins/plugins/EcalTPGStripStatus_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTPGStripStatus_PayloadInspector.cc @@ -161,13 +161,13 @@ namespace { /*************************************************************** 2d plot of ECAL TPGStripStatus difference between 2 IOVs ****************************************************************/ - class EcalTPGStripStatusDiff : public cond::payloadInspector::PlotImage { + template + class EcalTPGStripStatusDiffBase : public cond::payloadInspector::PlotImage { public: - EcalTPGStripStatusDiff() : cond::payloadInspector::PlotImage("ECAL TPGStripStatus difference") { - setSingleIov(false); - } + EcalTPGStripStatusDiffBase() + : cond::payloadInspector::PlotImage("ECAL TPGStripStatus difference") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* endc_p = new TH2F("EE+", "EE+ TPG Strip Status", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "EE- TPG Strip Status", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); int EEstat[2][2] = {{0, 0}, {0, 0}}; @@ -203,12 +203,31 @@ namespace { } // read EEMap file f.close(); - unsigned int run[2] = {0, 0}, irun = 0; + unsigned int run[2] = {0, 0}; int vEE[100]; int istat = 0; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { const EcalTPGStripStatusMap& stripMap = (*payload).getMap(); // std::cout << " tower map size " << stripMap.size() << std::endl; @@ -271,7 +290,6 @@ namespace { } // payload else return false; - irun++; // std::cout << " nb of strips " << istat << std::endl; } // loop over IOVs @@ -331,8 +349,19 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal TPGStripStatus, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2) { + if (len < 180) { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s %i - %s %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal TPGStripStatus, IOV %i - %i", run[1], run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i - %i", l_tagname[0].c_str(), run[1], run[0])); + } float xmi[2] = {0.0, 0.5}; float xma[2] = {0.5, 1.0}; @@ -350,11 +379,13 @@ namespace { DrawEE(endc_p, -1.0, 1.0); t1.DrawLatex(0.15, 0.92, Form("new %i old %i", EEstat[1][0], EEstat[1][1])); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalTPGStripStatusDiffBase + using EcalTPGStripStatusDiffOneTag = EcalTPGStripStatusDiffBase; + using EcalTPGStripStatusDiffTwoTags = EcalTPGStripStatusDiffBase; /***************************************** 2d plot of EcalTPGStripStatus Error Summary of 1 IOV @@ -434,6 +465,7 @@ namespace { // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalTPGStripStatus) { PAYLOAD_INSPECTOR_CLASS(EcalTPGStripStatusPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTPGStripStatusDiff); + PAYLOAD_INSPECTOR_CLASS(EcalTPGStripStatusDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTPGStripStatusDiffTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalTPGStripStatusSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalTPGTowerStatus_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTPGTowerStatus_PayloadInspector.cc index f6ce344533e53..24734b898d9d1 100644 --- a/CondCore/EcalPlugins/plugins/EcalTPGTowerStatus_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTPGTowerStatus_PayloadInspector.cc @@ -18,7 +18,7 @@ #include namespace { - enum { kEBTotalTowers = 2448, kEETotalTowers = 1584 }; + enum { kEBTotalTowers = 2448 }; enum { MIN_IETA = 1, MIN_IPHI = 1, MAX_IETA = 17, MAX_IPHI = 72 }; // barrel lower and upper bounds on eta and phi /*********************************************** @@ -32,7 +32,7 @@ namespace { bool fill(const std::vector >& iovs) override { TH2F* barrel = new TH2F("EB", "EB TPG Tower Status", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); - int EBstat = 0, EEstat = 0; + int EBstat = 0; auto iov = iovs.front(); std::shared_ptr payload = fetchPayload(std::get<1>(iov)); @@ -53,8 +53,7 @@ namespace { if (ttId.subDet() == 1) { // barrel barrel->Fill(iphi, ieta, (*it).second); EBstat++; - } else - EEstat++; + } } } } // payload @@ -80,7 +79,6 @@ namespace { } t1.SetTextSize(0.03); t1.DrawLatex(0.2, 0.88, Form("%i towers", EBstat)); - t1.DrawLatex(0.5, 0.02, Form("EE : %i tower(s)", EEstat)); // canvas.cd(); pad[0]->cd(); // barrel->SetStats(false); @@ -104,22 +102,40 @@ namespace { /************************************************************************ 2d plot of ECAL TPGTowerStatus difference between 2 IOVs ************************************************************************/ - class EcalTPGTowerStatusDiff : public cond::payloadInspector::PlotImage { + template + class EcalTPGTowerStatusDiffBase : public cond::payloadInspector::PlotImage { public: - EcalTPGTowerStatusDiff() : cond::payloadInspector::PlotImage("ECAL TPGTowerStatus difference") { - setSingleIov(false); - } + EcalTPGTowerStatusDiffBase() + : cond::payloadInspector::PlotImage("ECAL TPGTowerStatus difference") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "EB difference", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); // int EBstat[2] = {0, 0}; - int EBstat = 0, EEstat = 0; - - unsigned int run[2] = {0, 0}, irun = 0, vEB[kEBTotalTowers]; - // EcalTrigTowerDetId EBId[kEBTotalTowers]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); + int EBstat = 0; + + unsigned int run[2] = {0, 0}, vEB[kEBTotalTowers]; + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { const EcalTPGTowerStatusMap& towerMap = (*payload).getMap(); // std::cout << " tower map size " << towerMap.size() << std::endl; @@ -138,16 +154,8 @@ namespace { if (stat > 0) { // bad tower if (towerId >= kEBTotalTowers) std::cout << " strange tower Id " << towerId << std::endl; - else { - // std::cout << " phi " << iphi << " eta " << ieta << std::endl; - // EBId[towerId] = ttId; - } } - } // barrel - else if (stat > 0) { - // std::cout << " EE phi " << iphi << " eta " << ieta << std::endl; - EEstat--; - } + } // barrel } // 1st run else { // 2nd run if (ttId.subDet() == 1) { // barrel @@ -164,16 +172,11 @@ namespace { // vEB[towerId] = 0; EBstat += diff; } // barrel - else if (stat > 0) { - // std::cout << " EE phi " << iphi << " eta " << ieta << std::endl; - EEstat++; - } - } // 2nd run - } // loop over towers - } // payload + } // 2nd run + } // loop over towers + } // payload else return false; - irun++; } // loop over IOVs /* // now check if towers have disappered @@ -199,8 +202,20 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2) { + if (len < 80) { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s %i - %s %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal TPGTowerStatus, IOV %i - %i", run[1], run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i - %i", l_tagname[0].c_str(), run[1], run[0])); + } t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal TPGTowerStatus, IOV %i - %i", run[1], run[0])); TPad** pad = new TPad*; for (int obj = 0; obj < 1; obj++) { @@ -209,11 +224,10 @@ namespace { } t1.SetTextSize(0.03); t1.DrawLatex(0.2, 0.88, Form("%i tower(s)", EBstat)); - t1.DrawLatex(0.5, 0.02, Form("EE : %i tower(s)", EEstat)); pad[0]->cd(); // barrel->SetStats(false); - barrel->Draw("col"); + barrel->Draw("colz"); TLine* l = new TLine(0., 0., 0., 0.); l->SetLineWidth(1); for (int i = 0; i < MAX_IETA; i++) { @@ -224,15 +238,17 @@ namespace { l = new TLine(0., 0., 72., 0.); l->Draw(); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalTPGTowerStatusDiffBase + using EcalTPGTowerStatusDiffOneTag = EcalTPGTowerStatusDiffBase; + using EcalTPGTowerStatusDiffTwoTags = EcalTPGTowerStatusDiffBase; - /***************************************** - 2d plot of EcalTPGTowerStatus Error Summary of 1 IOV - ******************************************/ + /******************************************************* + 2d plot of EcalTPGTowerStatus Error Summary of 1 IOV + ********************************************************/ class EcalTPGTowerStatusSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalTPGTowerStatusSummaryPlot() @@ -308,6 +324,7 @@ namespace { // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalTPGTowerStatus) { PAYLOAD_INSPECTOR_CLASS(EcalTPGTowerStatusPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTPGTowerStatusDiff); + PAYLOAD_INSPECTOR_CLASS(EcalTPGTowerStatusDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTPGTowerStatusDiffTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalTPGTowerStatusSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalTimeBiasCorrections_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTimeBiasCorrections_PayloadInspector.cc index b1aa3294fdd5e..4f59eb779482e 100644 --- a/CondCore/EcalPlugins/plugins/EcalTimeBiasCorrections_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTimeBiasCorrections_PayloadInspector.cc @@ -20,9 +20,9 @@ namespace { - /******************************************************* - 2d plot of Ecal TimeBias Corrections of 1 IOV - *******************************************************/ + /**************************************************** + 2d plot of Ecal TimeBias Corrections of 1 IOV + ****************************************************/ class EcalTimeBiasCorrectionsPlot : public cond::payloadInspector::PlotImage { public: //void fillPlot_align(std::vector& vect,TH2F* align, float column, double row); @@ -114,33 +114,46 @@ std::cout< { + /******************************************************************** + 2d plot of Ecal Time Bias Corrections difference between 2 IOVs + ********************************************************************/ + template + class EcalTimeBiasCorrectionsDiffBase + : public cond::payloadInspector::PlotImage { public: - //void fillDiff_align(const std::vector& vect,TH2F* align,float val[],const float column, double row,unsigned irun); - - EcalTimeBiasCorrectionsDiff() - : cond::payloadInspector::PlotImage("Ecal Time Bias Corrections difference") { - setSingleIov(false); - } - - bool fill(const std::vector >& iovs) override { - unsigned int run[2], irun = 0; + EcalTimeBiasCorrectionsDiffBase() + : cond::payloadInspector::PlotImage( + "Ecal Time Bias Corrections difference") {} + bool fill() override { + unsigned int run[2], NbRows = 0; float val[4][36]; TH2F* align = new TH2F("", "", 1, 0., 1., 1, 0., 1.); // pseudo creation - int NbRows = 0; - - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { EcalTimeBiasCorrections it = (*payload); - NbRows = it.EBTimeCorrAmplitudeBins.size(); + NbRows = it.EBTimeCorrAmplitudeBins.size(); if (irun == 1) { align = new TH2F("Ecal Time Bias Corrections", @@ -164,7 +177,6 @@ std::cout<SetPalette(1); @@ -189,7 +201,7 @@ std::cout<GetYaxis()->SetTickLength(0.); align->GetYaxis()->SetLabelSize(0.); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; @@ -209,12 +221,15 @@ std::cout<; + using EcalTimeBiasCorrectionsDiffTwoTags = EcalTimeBiasCorrectionsDiffBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalTimeBiasCorrections) { PAYLOAD_INSPECTOR_CLASS(EcalTimeBiasCorrectionsPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTimeBiasCorrectionsDiff); -} \ No newline at end of file + PAYLOAD_INSPECTOR_CLASS(EcalTimeBiasCorrectionsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTimeBiasCorrectionsDiffTwoTags); +} diff --git a/CondCore/EcalPlugins/plugins/EcalTimeCalibConstants_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTimeCalibConstants_PayloadInspector.cc index 6f1132b27e679..4674dcb2dd5a6 100644 --- a/CondCore/EcalPlugins/plugins/EcalTimeCalibConstants_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTimeCalibConstants_PayloadInspector.cc @@ -91,11 +91,9 @@ namespace { } //fill method }; - /******************************************************* - + /*************************************************************** 2d histogram of ECAL EndCaps Time Calib Constants of 1 IOV - - *******************************************************/ + ***************************************************************/ class EcalTimeCalibConstantsEEMap : public cond::payloadInspector::Histogram2D { private: @@ -216,16 +214,16 @@ namespace { }; /***************************************************************** - 2d plot of Ecal Time Calib Constants difference between 2 IOVs + 2d plot of Ecal Time Calib Constants difference between 2 IOVs *****************************************************************/ - class EcalTimeCalibConstantsDiff : public cond::payloadInspector::PlotImage { + template + class EcalTimeCalibConstantsBase : public cond::payloadInspector::PlotImage { public: - EcalTimeCalibConstantsDiff() - : cond::payloadInspector::PlotImage("Ecal Time Calib Constants difference ") { - setSingleIov(false); - } + EcalTimeCalibConstantsBase() + : cond::payloadInspector::PlotImage( + "Ecal Time Calib Constants comparison") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "mean EB", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "mean EE+", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "mean EE-", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); @@ -235,27 +233,43 @@ namespace { pEBmax = -10.; pEEmax = -10.; - unsigned int run[2], irun = 0; + unsigned int run[2]; float pEB[kEBChannels], pEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { if (payload->barrelItems().empty()) return false; - fillEBMap_DiffIOV(payload, barrel, irun, pEB, pEBmin, pEBmax); + fillEBMap_TwoIOVs(payload, barrel, irun, pEB, pEBmin, pEBmax, method); if (payload->endcapItems().empty()) return false; - fillEEMap_DiffIOV(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax); + fillEEMap_TwoIOVs(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax, method); } // payload - irun++; - - } // loop over IOVs + } // loop over IOVs gStyle->SetPalette(1); gStyle->SetOptStat(0); @@ -263,8 +277,23 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal Time Calib Constants Diff, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 180) { + t1.SetTextSize(0.05); + t1.DrawLatex( + 0.5, + 0.96, + Form("%s %i %s %s %i", l_tagname[1].c_str(), run[1], dr[method].c_str(), l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal Time Calib Constants, IOV %i %s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; @@ -282,15 +311,19 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalTimeCalibConstantsDiffBase + using EcalTimeCalibConstantsDiffOneTag = EcalTimeCalibConstantsBase; + using EcalTimeCalibConstantsDiffTwoTags = EcalTimeCalibConstantsBase; + using EcalTimeCalibConstantsRatioOneTag = EcalTimeCalibConstantsBase; + using EcalTimeCalibConstantsRatioTwoTags = EcalTimeCalibConstantsBase; /******************************************************* - 2d plot of Ecal Time Calib Constants Summary of 1 IOV - *******************************************************/ + 2d plot of Ecal Time Calib Constants Summary of 1 IOV + *******************************************************/ class EcalTimeCalibConstantsSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalTimeCalibConstantsSummaryPlot() @@ -355,6 +388,9 @@ PAYLOAD_INSPECTOR_MODULE(EcalTimeCalibConstants) { PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsEBMap); PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsEEMap); PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsDiff); + PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibConstantsSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalTimeCalibErrors_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTimeCalibErrors_PayloadInspector.cc index 63105360713e9..6b227b7997577 100644 --- a/CondCore/EcalPlugins/plugins/EcalTimeCalibErrors_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTimeCalibErrors_PayloadInspector.cc @@ -218,14 +218,13 @@ namespace { /***************************************************************** 2d plot of Ecal Time Calib Errors difference between 2 IOVs *****************************************************************/ - class EcalTimeCalibErrorsDiff : public cond::payloadInspector::PlotImage { + template + class EcalTimeCalibErrorsBase : public cond::payloadInspector::PlotImage { public: - EcalTimeCalibErrorsDiff() - : cond::payloadInspector::PlotImage("Ecal Time Calib Errors difference ") { - setSingleIov(false); - } + EcalTimeCalibErrorsBase() + : cond::payloadInspector::PlotImage("Ecal Time Calib Errors comparison") {} - bool fill(const std::vector >& iovs) override { + bool fill() override { TH2F* barrel = new TH2F("EB", "mean EB", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); TH2F* endc_p = new TH2F("EE+", "mean EE+", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); TH2F* endc_m = new TH2F("EE-", "mean EE-", IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1); @@ -235,27 +234,43 @@ namespace { pEBmax = -10.; pEEmax = -10.; - unsigned int run[2], irun = 0; + unsigned int run[2]; float pEB[kEBChannels], pEE[kEEChannels]; - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { if (payload->barrelItems().empty()) return false; - fillEBMap_DiffIOV(payload, barrel, irun, pEB, pEBmin, pEBmax); + fillEBMap_TwoIOVs(payload, barrel, irun, pEB, pEBmin, pEBmax, method); if (payload->endcapItems().empty()) return false; - fillEEMap_DiffIOV(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax); + fillEEMap_TwoIOVs(payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax, method); } // payload - irun++; - - } // loop over IOVs + } // loop over IOVs gStyle->SetPalette(1); gStyle->SetOptStat(0); @@ -263,9 +278,27 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); - t1.DrawLatex(0.5, 0.96, Form("Ecal Time Calib Errors Diff, IOV %i - %i", run[1], run[0])); - + int len = l_tagname[0].length() + l_tagname[1].length(); + std::string dr[2] = {"-", "/"}; + if (ntags == 2) { + if (len < 170) { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, + 0.96, + Form("%s IOV %i %s %s IOV %i", + l_tagname[1].c_str(), + run[1], + dr[method].c_str(), + l_tagname[0].c_str(), + run[0])); + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("Ecal Time Calib Errors, IOV %i%s %i", run[1], dr[method].c_str(), run[0])); + } + } else { + t1.SetTextSize(0.05); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i %s %i", l_tagname[0].c_str(), run[1], dr[method].c_str(), run[0])); + } float xmi[3] = {0.0, 0.24, 0.76}; float xma[3] = {0.24, 0.76, 1.00}; TPad** pad = new TPad*; @@ -282,15 +315,19 @@ namespace { pad[2]->cd(); DrawEE(endc_p, pEEmin, pEEmax); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); return true; } // fill method - }; + }; // class EcalTimeCalibErrorsDiffBase + using EcalTimeCalibErrorsDiffOneTag = EcalTimeCalibErrorsBase; + using EcalTimeCalibErrorsDiffTwoTags = EcalTimeCalibErrorsBase; + using EcalTimeCalibErrorsRatioOneTag = EcalTimeCalibErrorsBase; + using EcalTimeCalibErrorsRatioTwoTags = EcalTimeCalibErrorsBase; /******************************************************* - 2d plot of Ecal Time Calib Errors Summary of 1 IOV - *******************************************************/ + 2d plot of Ecal Time Calib Errors Summary of 1 IOV + *******************************************************/ class EcalTimeCalibErrorsSummaryPlot : public cond::payloadInspector::PlotImage { public: EcalTimeCalibErrorsSummaryPlot() @@ -355,6 +392,9 @@ PAYLOAD_INSPECTOR_MODULE(EcalTimeCalibErrors) { PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsEBMap); PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsEEMap); PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsDiff); + PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsDiffTwoTags); + PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsRatioOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsRatioTwoTags); PAYLOAD_INSPECTOR_CLASS(EcalTimeCalibErrorsSummaryPlot); } diff --git a/CondCore/EcalPlugins/plugins/EcalTimeOffsetConstant_PayloadInspector.cc b/CondCore/EcalPlugins/plugins/EcalTimeOffsetConstant_PayloadInspector.cc index 4310077535983..c353096ae6fc3 100644 --- a/CondCore/EcalPlugins/plugins/EcalTimeOffsetConstant_PayloadInspector.cc +++ b/CondCore/EcalPlugins/plugins/EcalTimeOffsetConstant_PayloadInspector.cc @@ -78,27 +78,43 @@ namespace { } }; - /******************************************************* - 2d plot of Ecal Time Offset Constant difference between 2 IOVs -*******************************************************/ - - class EcalTimeOffsetConstantDiff : public cond::payloadInspector::PlotImage { + /***************************************************************** + 2d plot of Ecal Time Offset Constant difference between 2 IOVs + *****************************************************************/ + template + class EcalTimeOffsetConstantDiffBase + : public cond::payloadInspector::PlotImage { public: - EcalTimeOffsetConstantDiff() - : cond::payloadInspector::PlotImage("Ecal Time Offset Constant difference") { - setSingleIov(false); - } + EcalTimeOffsetConstantDiffBase() + : cond::payloadInspector::PlotImage( + "Ecal Time Offset Constant difference") {} - bool fill(const std::vector >& iovs) override { - unsigned int run[2], irun = 0; + bool fill() override { + unsigned int run[2], NbRows = 0; float val[2] = {}; TH2F* align = new TH2F("", "", 1, 0., 1., 1, 0., 1.); // pseudo creation - int NbRows = 0; - - for (auto const& iov : iovs) { - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - run[irun] = std::get<0>(iov); - + std::string l_tagname[2]; + auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().name; + auto firstiov = iovs.front(); + run[0] = std::get<0>(firstiov); + std::tuple lastiov; + if (ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = iovs.back(); + l_tagname[1] = l_tagname[0]; + } + run[1] = std::get<0>(lastiov); + for (int irun = 0; irun < nIOVs; irun++) { + std::shared_ptr payload; + if (irun == 0) { + payload = this->fetchPayload(std::get<1>(firstiov)); + } else { + payload = this->fetchPayload(std::get<1>(lastiov)); + } if (payload.get()) { NbRows = 1; @@ -120,8 +136,6 @@ namespace { } // if payload.get() else return false; - - irun++; } // loop over IOVs gStyle->SetPalette(1); @@ -130,9 +144,20 @@ namespace { TLatex t1; t1.SetNDC(); t1.SetTextAlign(26); - t1.SetTextSize(0.05); t1.SetTextColor(2); - t1.DrawLatex(0.5, 0.96, Form("Ecal Time Offset Constant, IOV %i - %i", run[1], run[0])); + int len = l_tagname[0].length() + l_tagname[1].length(); + if (ntags == 2) { + if (len < 80) { + t1.SetTextSize(0.02); + t1.DrawLatex(0.5, 0.96, Form("%s %i - %s %i", l_tagname[1].c_str(), run[1], l_tagname[0].c_str(), run[0])); + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("Ecal Time Offset Constant, IOV %i - %i", run[1], run[0])); + } + } else { + t1.SetTextSize(0.03); + t1.DrawLatex(0.5, 0.96, Form("%s, IOV %i - %i", l_tagname[0].c_str(), run[1], run[0])); + } TPad* pad = new TPad("pad", "pad", 0.0, 0.0, 1.0, 0.94); pad->Draw(); @@ -146,17 +171,19 @@ namespace { align->GetYaxis()->SetTickLength(0.); align->GetYaxis()->SetLabelSize(0.); - std::string ImageName(m_imageFileName); + std::string ImageName(this->m_imageFileName); canvas.SaveAs(ImageName.c_str()); - return true; } - }; + }; // class EcalTimeOffsetConstantDiffBase + using EcalTimeOffsetConstantDiffOneTag = EcalTimeOffsetConstantDiffBase; + using EcalTimeOffsetConstantDiffTwoTags = EcalTimeOffsetConstantDiffBase; } // namespace // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(EcalTimeOffsetConstant) { PAYLOAD_INSPECTOR_CLASS(EcalTimeOffsetConstantPlot); - PAYLOAD_INSPECTOR_CLASS(EcalTimeOffsetConstantDiff); + PAYLOAD_INSPECTOR_CLASS(EcalTimeOffsetConstantDiffOneTag); + PAYLOAD_INSPECTOR_CLASS(EcalTimeOffsetConstantDiffTwoTags); } diff --git a/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h b/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h index b1444f88055f3..e6aa1225d15f6 100644 --- a/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h +++ b/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h @@ -38,6 +38,7 @@ namespace gainCalibHelper { namespace gainCalibPI { enum type { t_gain = 0, t_pedestal = 1, t_correlation = 2 }; + std::array t_titles = {{"gain", "pedestal", "correlation"}}; //=========================================================================== // helper method to fill the ratio and diff distributions @@ -1351,11 +1352,11 @@ namespace gainCalibHelper { /************************************************ occupancy style map BPix *************************************************/ - template - class SiPixelGainCalibrationBPIXMap + template + class SiPixelGainCalibrationMap : public cond::payloadInspector::PlotImage { public: - SiPixelGainCalibrationBPIXMap() + SiPixelGainCalibrationMap() : cond::payloadInspector::PlotImage( Form("SiPixelGainCalibration %s Barrel Pixel Map", TypeName[myType])), m_trackerTopo{StandaloneTrackerTopology::fromTrackerParametersXMLFile( @@ -1370,13 +1371,17 @@ namespace gainCalibHelper { }; bool fill() override { + TGaxis::SetMaxDigits(2); + auto tag = cond::payloadInspector::PlotBase::getTag<0>(); + auto tagname = tag.name; auto iov = tag.iovs.front(); std::shared_ptr payload = this->fetchPayload(std::get<1>(iov)); - Phase1PixelROCMaps theBPixGainsMap(""); - static constexpr int n_layers = 4; + std::string ztitle = + fmt::sprintf("average per %s %s", isForHLT_ ? "column" : "pixel", gainCalibPI::t_titles[myType]); + Phase1PixelROCMaps theGainsMap("", ztitle); std::map GainCalibMap_; gainCalibPI::fillThePerModuleMap(payload, GainCalibMap_, myType); @@ -1390,163 +1395,93 @@ namespace gainCalibHelper { } // hard-coded phase-I - std::array minima = {{999., 999., 999., 999.}}; + std::array b_minima = {{999., 999., 999., 999.}}; + std::array f_minima = {{999., 999.}}; for (const auto& element : GainCalibMap_) { int subid = DetId(element.first).subdetId(); if (subid == PixelSubdetector::PixelBarrel) { auto layer = m_trackerTopo.pxbLayer(DetId(element.first)); - - if (element.second < minima.at(layer - 1)) - minima.at(layer - 1) = element.second; - - theBPixGainsMap.fillWholeModule(element.first, element.second); + if (element.second < b_minima.at(layer - 1)) { + b_minima.at(layer - 1) = element.second; + } + theGainsMap.fillWholeModule(element.first, element.second); + } else if (subid == PixelSubdetector::PixelEndcap) { + auto ring = SiPixelPI::ring(DetId(element.first), m_trackerTopo, true); + if (element.second < f_minima.at(ring - 1)) { + f_minima.at(ring - 1) = element.second; + } + theGainsMap.fillWholeModule(element.first, element.second); } } gStyle->SetOptStat(0); //========================= - TCanvas canvas("Summary", "Summary", 1200, 1200); - theBPixGainsMap.drawBarrelMaps(canvas); - - for (unsigned int lay = 1; lay <= n_layers; lay++) { - SiPixelPI::adjustCanvasMargins(canvas.cd(lay), -1, 0.08, 0.1, 0.13); - - auto h_bpix_Gains = theBPixGainsMap.getLayerMaps(); - - COUT << " layer:" << lay << " max:" << h_bpix_Gains[lay - 1]->GetMaximum() << " min: " << minima.at(lay - 1) - << std::endl; - - h_bpix_Gains[lay - 1]->GetZaxis()->SetRangeUser(minima.at(lay - 1) - 0.001, - h_bpix_Gains[lay - 1]->GetMaximum() + 0.001); - } + TCanvas canvas("Summary", "Summary", 1200, k_height[myDetType]); + canvas.cd(); auto unpacked = SiPixelPI::unpack(std::get<0>(iov)); - for (unsigned int lay = 1; lay <= n_layers; lay++) { - canvas.cd(lay); - auto ltx = TLatex(); - ltx.SetTextFont(62); - ltx.SetTextColor(kBlue); - ltx.SetTextSize(0.055); - ltx.SetTextAlign(11); - ltx.DrawLatexNDC(gPad->GetLeftMargin(), - 1 - gPad->GetTopMargin() + 0.01, - unpacked.first == 0 - ? ("IOV:" + std::to_string(unpacked.second)).c_str() - : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str()); - } - - std::string fileName(this->m_imageFileName); - canvas.SaveAs(fileName.c_str()); - - return true; - } - - private: - TrackerTopology m_trackerTopo; - - protected: - bool isForHLT_; - std::string label_; - }; - - /************************************************ - occupancy style map FPix - *************************************************/ - - template - class SiPixelGainCalibrationFPIXMap - : public cond::payloadInspector::PlotImage { - public: - SiPixelGainCalibrationFPIXMap() - : cond::payloadInspector::PlotImage( - Form("SiPixelGainCalibration %s Forward Pixel Map", TypeName[myType])), - m_trackerTopo{StandaloneTrackerTopology::fromTrackerParametersXMLFile( - edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} { - if constexpr (std::is_same_v) { - isForHLT_ = false; - label_ = "SiPixelGainCalibrationOffline_PayloadInspector"; - } else { - isForHLT_ = true; - label_ = "SiPixelGainCalibrationForHLT_PayloadInspector"; - } - } - - bool fill() override { - auto tag = cond::payloadInspector::PlotBase::getTag<0>(); - auto iov = tag.iovs.front(); - std::shared_ptr payload = this->fetchPayload(std::get<1>(iov)); + std::string IOVstring = (unpacked.first == 0) + ? std::to_string(unpacked.second) + : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)); - Phase1PixelROCMaps theFPixGainsMap(""); - static constexpr int n_rings = 2; + const auto headerText = fmt::sprintf("#color[4]{%s}, IOV: #color[4]{%s}", tagname, IOVstring); - std::map GainCalibMap_; - gainCalibPI::fillThePerModuleMap(payload, GainCalibMap_, myType); - if (GainCalibMap_.size() != SiPixelPI::phase1size) { - edm::LogError(label_) << "SiPixelGainCalibration maps are not supported for non-Phase1 Pixel geometries !"; - TCanvas canvas("Canv", "Canv", 1200, 1000); - SiPixelPI::displayNotSupported(canvas, GainCalibMap_.size()); - std::string fileName(this->m_imageFileName); - canvas.SaveAs(fileName.c_str()); - return false; + switch (myDetType) { + case SiPixelPI::t_barrel: + theGainsMap.drawBarrelMaps(canvas, headerText); + break; + case SiPixelPI::t_forward: + theGainsMap.drawForwardMaps(canvas, headerText); + break; + case SiPixelPI::t_all: + theGainsMap.drawMaps(canvas, headerText); + break; + default: + throw cms::Exception("SiPixelGainCalibrationMap") + << "\nERROR: unrecognized Pixel Detector part " << std::endl; } - // hardcoded phase-I - std::array minima = {{999., 999.}}; + if (myDetType == SiPixelPI::t_barrel || myDetType == SiPixelPI::t_all) { + for (unsigned int lay = 1; lay <= n_layers; lay++) { + //SiPixelPI::adjustCanvasMargins(canvas.cd(lay), -1, 0.08, 0.1, 0.13); - for (const auto& element : GainCalibMap_) { - int subid = DetId(element.first).subdetId(); - if (subid == PixelSubdetector::PixelEndcap) { - auto ring = SiPixelPI::ring(DetId(element.first), m_trackerTopo, true); + auto h_bpix_Gains = theGainsMap.getLayerMaps(); - if (element.second < minima.at(ring - 1)) - minima.at(ring - 1) = element.second; + COUT << " layer:" << lay << " max:" << h_bpix_Gains[lay - 1]->GetMaximum() << " min: " << b_minima.at(lay - 1) + << std::endl; - theFPixGainsMap.fillWholeModule(element.first, element.second); + h_bpix_Gains[lay - 1]->GetZaxis()->SetRangeUser(b_minima.at(lay - 1) - 0.001, + h_bpix_Gains[lay - 1]->GetMaximum() + 0.001); } } - gStyle->SetOptStat(0); - //========================= - TCanvas canvas("Summary", "Summary", 1200, 600); - theFPixGainsMap.drawForwardMaps(canvas); + if (myDetType == SiPixelPI::t_forward || myDetType == SiPixelPI::t_all) { + for (unsigned int ring = 1; ring <= n_rings; ring++) { + //SiPixelPI::adjustCanvasMargins(canvas.cd(ring), -1, 0.08, 0.1, 0.13); - for (unsigned int ring = 1; ring <= n_rings; ring++) { - SiPixelPI::adjustCanvasMargins(canvas.cd(ring), -1, 0.08, 0.1, 0.13); + auto h_fpix_Gains = theGainsMap.getRingMaps(); - auto h_fpix_Gains = theFPixGainsMap.getRingMaps(); + COUT << " ring:" << ring << " max:" << h_fpix_Gains[ring - 1]->GetMaximum() + << " min: " << f_minima.at(ring - 1) << std::endl; - COUT << " ring:" << ring << " max:" << h_fpix_Gains[ring - 1]->GetMaximum() << " min: " << minima.at(ring - 1) - << std::endl; - - h_fpix_Gains[ring - 1]->GetZaxis()->SetRangeUser(minima.at(ring - 1) - 0.001, - h_fpix_Gains[ring - 1]->GetMaximum() + 0.001); - } - - auto unpacked = SiPixelPI::unpack(std::get<0>(iov)); - - for (unsigned int ring = 1; ring <= n_rings; ring++) { - canvas.cd(ring); - auto ltx = TLatex(); - ltx.SetTextFont(62); - ltx.SetTextColor(kBlue); - ltx.SetTextSize(0.05); - ltx.SetTextAlign(11); - ltx.DrawLatexNDC(gPad->GetLeftMargin(), - 1 - gPad->GetTopMargin() + 0.01, - unpacked.first == 0 - ? ("IOV:" + std::to_string(unpacked.second)).c_str() - : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str()); + h_fpix_Gains[ring - 1]->GetZaxis()->SetRangeUser(f_minima.at(ring - 1) - 0.001, + h_fpix_Gains[ring - 1]->GetMaximum() + 0.001); + } } std::string fileName(this->m_imageFileName); canvas.SaveAs(fileName.c_str()); + return true; } private: TrackerTopology m_trackerTopo; + static constexpr std::array k_height = {{1200, 600, 1600}}; + static constexpr int n_layers = 4; + static constexpr int n_rings = 2; protected: bool isForHLT_; diff --git a/CondCore/SiPixelPlugins/interface/SiPixelPayloadInspectorHelper.h b/CondCore/SiPixelPlugins/interface/SiPixelPayloadInspectorHelper.h index 26449903518cb..e37d5a04c96b2 100644 --- a/CondCore/SiPixelPlugins/interface/SiPixelPayloadInspectorHelper.h +++ b/CondCore/SiPixelPlugins/interface/SiPixelPayloadInspectorHelper.h @@ -572,6 +572,7 @@ namespace SiPixelPI { } enum DetType { t_barrel = 0, t_forward = 1, t_all = 2 }; + const std::array DetNames = {{"Barrel", "End Caps", "Whole"}}; enum regions { BPixL1o, //0 Barrel Pixel Layer 1 outer diff --git a/CondCore/SiPixelPlugins/plugins/SiPixelFEDChannelContainer_PayloadInspector.cc b/CondCore/SiPixelPlugins/plugins/SiPixelFEDChannelContainer_PayloadInspector.cc index c1cccb1a411b7..fd440af137345 100644 --- a/CondCore/SiPixelPlugins/plugins/SiPixelFEDChannelContainer_PayloadInspector.cc +++ b/CondCore/SiPixelPlugins/plugins/SiPixelFEDChannelContainer_PayloadInspector.cc @@ -58,9 +58,10 @@ namespace { 1d histogram of SiPixelFEDChannelContainer of 1 IOV *************************************************/ - class SiPixelFEDChannelContainerTest : public PlotImage { + template + class SiPixelFEDChannelContainerMap : public PlotImage { public: - SiPixelFEDChannelContainerTest() + SiPixelFEDChannelContainerMap() : PlotImage("SiPixelFEDChannelContainer scenarios count"), m_trackerTopo{StandaloneTrackerTopology::fromTrackerParametersXMLFile( edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} { @@ -99,6 +100,7 @@ namespace { Phase1PixelROCMaps theROCMap(""); auto tag = PlotBase::getTag<0>(); + auto tagname = tag.name; auto iov = tag.iovs.front(); // open db session for the cabling map @@ -217,37 +219,29 @@ namespace { gStyle->SetOptStat(0); //========================= - TCanvas canvas("Summary", "Summary", 1200, 1600); - theROCMap.drawMaps(canvas); + TCanvas canvas("Summary", "Summary", 1200, k_height[myType]); + canvas.cd(); auto unpacked = SiPixelPI::unpack(std::get<0>(iov)); - for (unsigned int lay = 1; lay <= n_layers; lay++) { - canvas.cd(lay); - auto ltx = TLatex(); - ltx.SetTextFont(62); - ltx.SetTextColor(kBlue); - ltx.SetTextSize(0.055); - ltx.SetTextAlign(11); - ltx.DrawLatexNDC(gPad->GetLeftMargin(), - 1 - gPad->GetTopMargin() + 0.01, - unpacked.first == 0 - ? ("IOV:" + std::to_string(unpacked.second)).c_str() - : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str()); - } - - for (unsigned int ring = 1; ring <= n_rings; ring++) { - canvas.cd(n_layers + ring); - auto ltx = TLatex(); - ltx.SetTextFont(62); - ltx.SetTextColor(kBlue); - ltx.SetTextSize(0.050); - ltx.SetTextAlign(11); - ltx.DrawLatexNDC(gPad->GetLeftMargin(), - 1 - gPad->GetTopMargin() + 0.01, - unpacked.first == 0 - ? ("IOV:" + std::to_string(unpacked.second)).c_str() - : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str()); + std::string IOVstring = (unpacked.first == 0) + ? std::to_string(unpacked.second) + : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)); + + const auto headerText = fmt::sprintf("#color[4]{%s}, IOV: #color[4]{%s}", tagname, IOVstring); + + switch (myType) { + case SiPixelPI::t_barrel: + theROCMap.drawBarrelMaps(canvas, headerText); + break; + case SiPixelPI::t_forward: + theROCMap.drawForwardMaps(canvas, headerText); + break; + case SiPixelPI::t_all: + theROCMap.drawMaps(canvas, headerText); + break; + default: + throw cms::Exception("SiPixelQualityMap") << "\nERROR: unrecognized Pixel Detector part " << std::endl; } std::string fileName(m_imageFileName); @@ -285,6 +279,9 @@ namespace { static constexpr int n_rings = 2; static constexpr int n_layers = 4; + // graphics + static constexpr std::array k_height = {{1200, 600, 1600}}; + TrackerTopology m_trackerTopo; edm::ParameterSet m_connectionPset; cond::persistency::ConnectionPool m_connectionPool; @@ -292,6 +289,10 @@ namespace { std::string m_condDbCabling; }; + using SiPixelBPixFEDChannelContainerMap = SiPixelFEDChannelContainerMap; + using SiPixelFPixFEDChannelContainerMap = SiPixelFEDChannelContainerMap; + using SiPixelFullFEDChannelContainerMap = SiPixelFEDChannelContainerMap; + /************************************************ 1d histogram of SiPixelFEDChannelContainer of 1 IOV *************************************************/ @@ -387,6 +388,8 @@ namespace { // Register the classes as boost python plugin PAYLOAD_INSPECTOR_MODULE(SiPixelFEDChannelContainer) { - PAYLOAD_INSPECTOR_CLASS(SiPixelFEDChannelContainerTest); + PAYLOAD_INSPECTOR_CLASS(SiPixelBPixFEDChannelContainerMap); + PAYLOAD_INSPECTOR_CLASS(SiPixelFPixFEDChannelContainerMap); + PAYLOAD_INSPECTOR_CLASS(SiPixelFullFEDChannelContainerMap); PAYLOAD_INSPECTOR_CLASS(SiPixelFEDChannelContainerScenarios); } diff --git a/CondCore/SiPixelPlugins/plugins/SiPixelGainCalibrationForHLT_PayloadInspector.cc b/CondCore/SiPixelPlugins/plugins/SiPixelGainCalibrationForHLT_PayloadInspector.cc index 8fdbc690da376..4b2a470cfae3d 100644 --- a/CondCore/SiPixelPlugins/plugins/SiPixelGainCalibrationForHLT_PayloadInspector.cc +++ b/CondCore/SiPixelPlugins/plugins/SiPixelGainCalibrationForHLT_PayloadInspector.cc @@ -101,14 +101,14 @@ namespace { SiPixelGainCalibrationForHLT>; using SiPixelGainCalibForHLTGainsBPIXMap = - SiPixelGainCalibrationBPIXMap; + SiPixelGainCalibrationMap; using SiPixelGainCalibForHLTPedestalsBPIXMap = - SiPixelGainCalibrationBPIXMap; + SiPixelGainCalibrationMap; using SiPixelGainCalibForHLTGainsFPIXMap = - SiPixelGainCalibrationFPIXMap; + SiPixelGainCalibrationMap; using SiPixelGainCalibForHLTPedestalsFPIXMap = - SiPixelGainCalibrationFPIXMap; + SiPixelGainCalibrationMap; using SiPixelGainCalibForHLTGainByRegionComparisonSingleTag = SiPixelGainCalibrationByRegionComparisonBase; using SiPixelGainCalibOfflineGainsBPIXMap = - SiPixelGainCalibrationBPIXMap; + SiPixelGainCalibrationMap; using SiPixelGainCalibOfflinePedestalsBPIXMap = - SiPixelGainCalibrationBPIXMap; + SiPixelGainCalibrationMap; using SiPixelGainCalibOfflineGainsFPIXMap = - SiPixelGainCalibrationFPIXMap; + SiPixelGainCalibrationMap; using SiPixelGainCalibOfflinePedestalsFPIXMap = - SiPixelGainCalibrationFPIXMap; + SiPixelGainCalibrationMap; using SiPixelGainCalibOfflineGainByRegionComparisonSingleTag = SiPixelGainCalibrationByRegionComparisonBase; /************************************************ - occupancy style map BPix + occupancy style map Pixel LA *************************************************/ - class SiPixelBPixLorentzAngleMap : public PlotImage { + template + class SiPixelLorentzAngleMap : public PlotImage { public: - SiPixelBPixLorentzAngleMap() - : PlotImage("SiPixelLorentzAngle Barrel Pixel Map"), + SiPixelLorentzAngleMap() + : PlotImage("SiPixelLorentzAngle Pixel Map"), m_trackerTopo{StandaloneTrackerTopology::fromTrackerParametersXMLFile( edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} {} bool fill() override { auto tag = PlotBase::getTag<0>(); auto iov = tag.iovs.front(); + auto tagname = tag.name; std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - Phase1PixelROCMaps theBPixLAMap(""); - static constexpr int n_layers = 4; + Phase1PixelROCMaps thePixLAMap(""); std::map LAMap_ = payload->getLorentzAngles(); if (LAMap_.size() != SiPixelPI::phase1size) { @@ -770,152 +771,82 @@ namespace { } // hard-coded phase-I - std::array minima = {{999., 999., 999., 999.}}; + std::array b_minima = {{999., 999., 999., 999.}}; + std::array f_minima = {{999., 999.}}; for (const auto &element : LAMap_) { int subid = DetId(element.first).subdetId(); if (subid == PixelSubdetector::PixelBarrel) { auto layer = m_trackerTopo.pxbLayer(DetId(element.first)); - - if (element.second < minima.at(layer - 1)) - minima.at(layer - 1) = element.second; - - theBPixLAMap.fillWholeModule(element.first, element.second); + if (element.second < b_minima.at(layer - 1)) { + b_minima.at(layer - 1) = element.second; + } + } else if (subid == PixelSubdetector::PixelEndcap) { + auto ring = SiPixelPI::ring(DetId(element.first), m_trackerTopo, true); + if (element.second < f_minima.at(ring - 1)) { + f_minima.at(ring - 1) = element.second; + } } + thePixLAMap.fillWholeModule(element.first, element.second); } gStyle->SetOptStat(0); //========================= - TCanvas canvas("Summary", "Summary", 1200, 1200); - theBPixLAMap.drawBarrelMaps(canvas); - - for (unsigned int lay = 1; lay <= n_layers; lay++) { - canvas.cd(lay)->SetBottomMargin(0.08); - canvas.cd(lay)->SetLeftMargin(0.1); - canvas.cd(lay)->SetRightMargin(0.13); - - auto h_bpix_LA = theBPixLAMap.getLayerMaps(); - - COUT << " layer:" << lay << " max:" << h_bpix_LA[lay - 1]->GetMaximum() << " min: " << minima.at(lay - 1) - << std::endl; - - h_bpix_LA[lay - 1]->GetZaxis()->SetRangeUser(minima.at(lay - 1) - 0.001, - h_bpix_LA[lay - 1]->GetMaximum() + 0.001); - } + TCanvas canvas("Summary", "Summary", 1200, k_height[myType]); + canvas.cd(); auto unpacked = SiPixelPI::unpack(std::get<0>(iov)); - for (unsigned int lay = 1; lay <= n_layers; lay++) { - canvas.cd(lay); - auto ltx = TLatex(); - ltx.SetTextFont(62); - ltx.SetTextColor(kBlue); - ltx.SetTextSize(0.055); - ltx.SetTextAlign(11); - ltx.DrawLatexNDC(gPad->GetLeftMargin(), - 1 - gPad->GetTopMargin() + 0.01, - unpacked.first == 0 - ? ("IOV:" + std::to_string(unpacked.second)).c_str() - : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str()); + std::string IOVstring = (unpacked.first == 0) + ? std::to_string(unpacked.second) + : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)); + + const auto headerText = fmt::sprintf("#color[4]{%s}, IOV: #color[4]{%s}", tagname, IOVstring); + + switch (myType) { + case SiPixelPI::t_barrel: + thePixLAMap.drawBarrelMaps(canvas, headerText); + break; + case SiPixelPI::t_forward: + thePixLAMap.drawForwardMaps(canvas, headerText); + break; + case SiPixelPI::t_all: + thePixLAMap.drawMaps(canvas, headerText); + break; + default: + throw cms::Exception("SiPixelLorentzAngleMap") << "\nERROR: unrecognized Pixel Detector part " << std::endl; } - std::string fileName(m_imageFileName); - canvas.SaveAs(fileName.c_str()); -#ifdef MMDEBUG - canvas.SaveAs("outBPix.root"); -#endif - - return true; - } - - private: - TrackerTopology m_trackerTopo; - }; - - /************************************************ - occupancy style map FPix - *************************************************/ + if (myType == SiPixelPI::t_barrel || myType == SiPixelPI::t_all) { + // set the minima and maxima of the barrel + for (unsigned int lay = 1; lay <= n_layers; lay++) { + auto h_bpix_LA = thePixLAMap.getLayerMaps(); - class SiPixelFPixLorentzAngleMap : public PlotImage { - public: - SiPixelFPixLorentzAngleMap() - : PlotImage("SiPixelLorentzAngle Forward Pixel Map"), - m_trackerTopo{StandaloneTrackerTopology::fromTrackerParametersXMLFile( - edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} {} + COUT << " layer:" << lay << " max:" << h_bpix_LA[lay - 1]->GetMaximum() << " min: " << b_minima.at(lay - 1) + << std::endl; - bool fill() override { - auto tag = PlotBase::getTag<0>(); - auto iov = tag.iovs.front(); - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - - Phase1PixelROCMaps theFPixLAMap(""); - static constexpr int n_rings = 2; - - std::map LAMap_ = payload->getLorentzAngles(); - if (LAMap_.size() != SiPixelPI::phase1size) { - edm::LogError("SiPixelLorentzAngle_PayloadInspector") - << "SiPixelLorentzAngle maps are not supported for non-Phase1 Pixel geometries !"; - TCanvas canvas("Canv", "Canv", 1200, 1000); - SiPixelPI::displayNotSupported(canvas, LAMap_.size()); - std::string fileName(m_imageFileName); - canvas.SaveAs(fileName.c_str()); - return false; - } - - // hardcoded phase-I - std::array minima = {{999., 999.}}; - - for (const auto &element : LAMap_) { - int subid = DetId(element.first).subdetId(); - if (subid == PixelSubdetector::PixelEndcap) { - auto ring = SiPixelPI::ring(DetId(element.first), m_trackerTopo, true); - - if (element.second < minima.at(ring - 1)) - minima.at(ring - 1) = element.second; - - theFPixLAMap.fillWholeModule(element.first, element.second); + h_bpix_LA[lay - 1]->GetZaxis()->SetRangeUser(b_minima.at(lay - 1) - 0.001, + h_bpix_LA[lay - 1]->GetMaximum() + 0.001); } } - gStyle->SetOptStat(0); - //========================= - TCanvas canvas("Summary", "Summary", 1200, 600); - theFPixLAMap.drawForwardMaps(canvas); - - for (unsigned int ring = 1; ring <= n_rings; ring++) { - canvas.cd(ring)->SetBottomMargin(0.08); - canvas.cd(ring)->SetLeftMargin(0.1); - canvas.cd(ring)->SetRightMargin(0.13); + if (myType == SiPixelPI::t_forward || myType == SiPixelPI::t_all) { + // set the minima and maxima of the endcaps + for (unsigned int ring = 1; ring <= n_rings; ring++) { + auto h_fpix_LA = thePixLAMap.getRingMaps(); - auto h_fpix_LA = theFPixLAMap.getRingMaps(); + COUT << " ringer:" << ring << " max:" << h_fpix_LA[ring - 1]->GetMaximum() + << " min: " << f_minima.at(ring - 1) << std::endl; - COUT << " ringer:" << ring << " max:" << h_fpix_LA[ring - 1]->GetMaximum() << " min: " << minima.at(ring - 1) - << std::endl; - - h_fpix_LA[ring - 1]->GetZaxis()->SetRangeUser(minima.at(ring - 1) - 0.001, - h_fpix_LA[ring - 1]->GetMaximum() + 0.001); - } - - auto unpacked = SiPixelPI::unpack(std::get<0>(iov)); - - for (unsigned int ring = 1; ring <= n_rings; ring++) { - canvas.cd(ring); - auto ltx = TLatex(); - ltx.SetTextFont(62); - ltx.SetTextColor(kBlue); - ltx.SetTextSize(0.05); - ltx.SetTextAlign(11); - ltx.DrawLatexNDC(gPad->GetLeftMargin(), - 1 - gPad->GetTopMargin() + 0.01, - unpacked.first == 0 - ? ("IOV:" + std::to_string(unpacked.second)).c_str() - : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str()); + h_fpix_LA[ring - 1]->GetZaxis()->SetRangeUser(f_minima.at(ring - 1) - 0.001, + h_fpix_LA[ring - 1]->GetMaximum() + 0.001); + } } std::string fileName(m_imageFileName); canvas.SaveAs(fileName.c_str()); #ifdef MMDEBUG - canvas.SaveAs("outFPix.root"); + canvas.SaveAs("outPixLA.root"); #endif return true; @@ -923,8 +854,15 @@ namespace { private: TrackerTopology m_trackerTopo; + static constexpr std::array k_height = {{1200, 600, 1600}}; + static constexpr int n_layers = 4; + static constexpr int n_rings = 2; }; + using SiPixelBPixLorentzAngleMap = SiPixelLorentzAngleMap; + using SiPixelFPixLorentzAngleMap = SiPixelLorentzAngleMap; + using SiPixelFullLorentzAngleMapByROC = SiPixelLorentzAngleMap; + /************************************************ Full Pixel Tracker Map class *************************************************/ @@ -1009,5 +947,6 @@ PAYLOAD_INSPECTOR_MODULE(SiPixelLorentzAngle) { PAYLOAD_INSPECTOR_CLASS(SiPixelLorentzAngleByRegionComparisonTwoTags); PAYLOAD_INSPECTOR_CLASS(SiPixelBPixLorentzAngleMap); PAYLOAD_INSPECTOR_CLASS(SiPixelFPixLorentzAngleMap); + PAYLOAD_INSPECTOR_CLASS(SiPixelFullLorentzAngleMapByROC); PAYLOAD_INSPECTOR_CLASS(SiPixelLorentzAngleFullPixelMap); } diff --git a/CondCore/SiPixelPlugins/plugins/SiPixelQuality_PayloadInspector.cc b/CondCore/SiPixelPlugins/plugins/SiPixelQuality_PayloadInspector.cc index 2dfed132eb296..8962db87e1d30 100644 --- a/CondCore/SiPixelPlugins/plugins/SiPixelQuality_PayloadInspector.cc +++ b/CondCore/SiPixelPlugins/plugins/SiPixelQuality_PayloadInspector.cc @@ -39,6 +39,8 @@ namespace { + //using namespace cond::payloadInspector; + /************************************************ test class *************************************************/ @@ -144,138 +146,217 @@ namespace { }; /************************************************ - occupancy style map BPix + occupancy style map whole Pixel *************************************************/ - - class SiPixelBPixQualityMap + template + class SiPixelQualityMap : public cond::payloadInspector::PlotImage { public: - SiPixelBPixQualityMap() + SiPixelQualityMap() : cond::payloadInspector::PlotImage( - "SiPixelQuality Barrel Pixel Map"), + "SiPixelQuality Pixel Map"), m_trackerTopo{StandaloneTrackerTopology::fromTrackerParametersXMLFile( edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} {} bool fill() override { auto tag = PlotBase::getTag<0>(); auto iov = tag.iovs.front(); + auto tagname = tag.name; std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - Phase1PixelROCMaps theBPixMap(""); + Phase1PixelROCMaps theMap(""); auto theDisabledModules = payload->getBadComponentList(); for (const auto& mod : theDisabledModules) { int subid = DetId(mod.DetID).subdetId(); - std::bitset<16> bad_rocs(mod.BadRocs); - if (subid == PixelSubdetector::PixelBarrel) { + + if ((subid == PixelSubdetector::PixelBarrel && myType == SiPixelPI::t_barrel) || + (subid == PixelSubdetector::PixelEndcap && myType == SiPixelPI::t_forward) || + (myType == SiPixelPI::t_all)) { + std::bitset<16> bad_rocs(mod.BadRocs); if (payload->IsModuleBad(mod.DetID)) { - theBPixMap.fillWholeModule(mod.DetID, 1.); + theMap.fillWholeModule(mod.DetID, 1.); } else { - theBPixMap.fillSelectedRocs(mod.DetID, bad_rocs, 1.); + theMap.fillSelectedRocs(mod.DetID, bad_rocs, 1.); } } } gStyle->SetOptStat(0); //========================= - TCanvas canvas("Summary", "Summary", 1200, 1200); - theBPixMap.drawBarrelMaps(canvas); + TCanvas canvas("Summary", "Summary", 1200, k_height[myType]); + canvas.cd(); auto unpacked = SiPixelPI::unpack(std::get<0>(iov)); - for (unsigned int lay = 1; lay <= 4; lay++) { - canvas.cd(lay); - auto ltx = TLatex(); - ltx.SetTextFont(62); - ltx.SetTextColor(kBlue); - ltx.SetTextSize(0.055); - ltx.SetTextAlign(11); - ltx.DrawLatexNDC(gPad->GetLeftMargin(), - 1 - gPad->GetTopMargin() + 0.01, - unpacked.first == 0 - ? ("IOV:" + std::to_string(unpacked.second)).c_str() - : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str()); + std::string IOVstring = (unpacked.first == 0) + ? std::to_string(unpacked.second) + : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)); + + const auto headerText = fmt::sprintf("#color[4]{%s}, IOV: #color[4]{%s}", tagname, IOVstring); + + switch (myType) { + case SiPixelPI::t_barrel: + theMap.drawBarrelMaps(canvas, headerText); + break; + case SiPixelPI::t_forward: + theMap.drawForwardMaps(canvas, headerText); + break; + case SiPixelPI::t_all: + theMap.drawMaps(canvas, headerText); + break; + default: + throw cms::Exception("SiPixelQualityMap") << "\nERROR: unrecognized Pixel Detector part " << std::endl; } std::string fileName(m_imageFileName); canvas.SaveAs(fileName.c_str()); #ifdef MMDEBUG - canvas.SaveAs("outBPix.root"); + canvas.SaveAs("outAll.root"); #endif return true; } private: + static constexpr std::array k_height = {{1200, 600, 1600}}; TrackerTopology m_trackerTopo; }; + using SiPixelBPixQualityMap = SiPixelQualityMap; + using SiPixelFPixQualityMap = SiPixelQualityMap; + using SiPixelFullQualityMap = SiPixelQualityMap; + /************************************************ - occupancy style map FPix + occupancy style map whole Pixel, difference of payloads *************************************************/ - - class SiPixelFPixQualityMap - : public cond::payloadInspector::PlotImage { + template + class SiPixelQualityMapComparisonBase : public cond::payloadInspector::PlotImage { public: - SiPixelFPixQualityMap() - : cond::payloadInspector::PlotImage( - "SiPixelQuality Forward Pixel Map"), + SiPixelQualityMapComparisonBase() + : cond::payloadInspector::PlotImage( + Form("SiPixelQuality %s Pixel Map", SiPixelPI::DetNames[myType].c_str())), m_trackerTopo{StandaloneTrackerTopology::fromTrackerParametersXMLFile( edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} {} bool fill() override { - auto tag = PlotBase::getTag<0>(); - auto iov = tag.iovs.front(); - std::shared_ptr payload = fetchPayload(std::get<1>(iov)); + // trick to deal with the multi-ioved tag and two tag case at the same time + auto theIOVs = cond::payloadInspector::PlotBase::getTag<0>().iovs; + auto f_tagname = cond::payloadInspector::PlotBase::getTag<0>().name; + std::string l_tagname = ""; + auto firstiov = theIOVs.front(); + std::tuple lastiov; + + // we don't support (yet) comparison with more than 2 tags + assert(this->m_plotAnnotations.ntags < 3); + + if (this->m_plotAnnotations.ntags == 2) { + auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs; + l_tagname = cond::payloadInspector::PlotBase::getTag<1>().name; + lastiov = tag2iovs.front(); + } else { + lastiov = theIOVs.back(); + } - Phase1PixelROCMaps theFPixMap(""); + std::shared_ptr last_payload = this->fetchPayload(std::get<1>(lastiov)); + std::shared_ptr first_payload = this->fetchPayload(std::get<1>(firstiov)); - auto theDisabledModules = payload->getBadComponentList(); - for (const auto& mod : theDisabledModules) { - int subid = DetId(mod.DetID).subdetId(); - std::bitset<16> bad_rocs(mod.BadRocs); - if (subid == PixelSubdetector::PixelEndcap) { - if (payload->IsModuleBad(mod.DetID)) { - theFPixMap.fillWholeModule(mod.DetID, 1.); - } else { - theFPixMap.fillSelectedRocs(mod.DetID, bad_rocs, 1.); - } - } // if it's endcap - } // loop on disable moduels + Phase1PixelROCMaps theMap("", "#Delta payload A - payload B"); + + // first loop on the first payload (newest) + fillTheMapFromPayload(theMap, first_payload, false); + + // then loop on the second payload (oldest) + fillTheMapFromPayload(theMap, last_payload, true); // true will subtract gStyle->SetOptStat(0); //========================= - TCanvas canvas("Summary", "Summary", 1200, 600); - theFPixMap.drawForwardMaps(canvas); + TCanvas canvas("Summary", "Summary", 1200, k_height[myType]); + canvas.cd(); - auto unpacked = SiPixelPI::unpack(std::get<0>(iov)); + auto f_unpacked = SiPixelPI::unpack(std::get<0>(firstiov)); + auto l_unpacked = SiPixelPI::unpack(std::get<0>(lastiov)); + + std::string f_IOVstring = (f_unpacked.first == 0) + ? std::to_string(f_unpacked.second) + : (std::to_string(f_unpacked.first) + "," + std::to_string(f_unpacked.second)); + + std::string l_IOVstring = (l_unpacked.first == 0) + ? std::to_string(l_unpacked.second) + : (std::to_string(l_unpacked.first) + "," + std::to_string(l_unpacked.second)); + + std::string headerText; - for (unsigned int ring = 1; ring <= 2; ring++) { - canvas.cd(ring); - auto ltx = TLatex(); - ltx.SetTextFont(62); - ltx.SetTextColor(kBlue); - ltx.SetTextSize(0.050); - ltx.SetTextAlign(11); - ltx.DrawLatexNDC(gPad->GetLeftMargin(), - 1 - gPad->GetTopMargin() + 0.01, - unpacked.first == 0 - ? ("IOV:" + std::to_string(unpacked.second)).c_str() - : (std::to_string(unpacked.first) + "," + std::to_string(unpacked.second)).c_str()); + if (this->m_plotAnnotations.ntags == 2) { + headerText = fmt::sprintf( + "#Delta #color[2]{A: %s, %s} - #color[4]{B: %s, %s}", f_tagname, f_IOVstring, l_tagname, l_IOVstring); + } else { + headerText = + fmt::sprintf("%s, #Delta IOV #color[2]{A: %s} - #color[4]{B: %s} ", f_tagname, f_IOVstring, l_IOVstring); } - std::string fileName(m_imageFileName); + switch (myType) { + case SiPixelPI::t_barrel: + theMap.drawBarrelMaps(canvas, headerText); + break; + case SiPixelPI::t_forward: + theMap.drawForwardMaps(canvas, headerText); + break; + case SiPixelPI::t_all: + theMap.drawMaps(canvas, headerText); + break; + default: + throw cms::Exception("SiPixelQualityMapComparison") + << "\nERROR: unrecognized Pixel Detector part " << std::endl; + } + + std::string fileName(this->m_imageFileName); canvas.SaveAs(fileName.c_str()); #ifdef MMDEBUG - canvas.SaveAs("outFPix.root"); + canvas.SaveAs("outAll.root"); #endif + return true; } private: + static constexpr std::array k_height = {{1200, 600, 1600}}; TrackerTopology m_trackerTopo; + + //____________________________________________________________________________________________ + void fillTheMapFromPayload(Phase1PixelROCMaps& theMap, + const std::shared_ptr& payload, + bool subtract) { + const auto theDisabledModules = payload->getBadComponentList(); + for (const auto& mod : theDisabledModules) { + int subid = DetId(mod.DetID).subdetId(); + if ((subid == PixelSubdetector::PixelBarrel && myType == SiPixelPI::t_barrel) || + (subid == PixelSubdetector::PixelEndcap && myType == SiPixelPI::t_forward) || + (myType == SiPixelPI::t_all)) { + std::bitset<16> bad_rocs(mod.BadRocs); + if (payload->IsModuleBad(mod.DetID)) { + theMap.fillWholeModule(mod.DetID, (subtract ? -1. : 1.)); + } else { + theMap.fillSelectedRocs(mod.DetID, bad_rocs, (subtract ? -1. : 1.)); + } + } + } + } }; + using SiPixelBPixQualityMapCompareSingleTag = + SiPixelQualityMapComparisonBase; + using SiPixelFPixQualityMapCompareSingleTag = + SiPixelQualityMapComparisonBase; + using SiPixelFullQualityMapCompareSingleTag = + SiPixelQualityMapComparisonBase; + using SiPixelBPixQualityMapCompareTwoTags = + SiPixelQualityMapComparisonBase; + using SiPixelFPixQualityMapCompareTwoTags = + SiPixelQualityMapComparisonBase; + using SiPixelFullQualityMapCompareTwoTags = + SiPixelQualityMapComparisonBase; + } // namespace // Register the classes as boost python plugin @@ -285,4 +366,11 @@ PAYLOAD_INSPECTOR_MODULE(SiPixelQuality) { PAYLOAD_INSPECTOR_CLASS(SiPixelQualityBadRocsTimeHistory); PAYLOAD_INSPECTOR_CLASS(SiPixelBPixQualityMap); PAYLOAD_INSPECTOR_CLASS(SiPixelFPixQualityMap); + PAYLOAD_INSPECTOR_CLASS(SiPixelFullQualityMap); + PAYLOAD_INSPECTOR_CLASS(SiPixelBPixQualityMapCompareSingleTag); + PAYLOAD_INSPECTOR_CLASS(SiPixelFPixQualityMapCompareSingleTag); + PAYLOAD_INSPECTOR_CLASS(SiPixelFullQualityMapCompareSingleTag); + PAYLOAD_INSPECTOR_CLASS(SiPixelBPixQualityMapCompareTwoTags); + PAYLOAD_INSPECTOR_CLASS(SiPixelFPixQualityMapCompareTwoTags); + PAYLOAD_INSPECTOR_CLASS(SiPixelFullQualityMapCompareTwoTags); } diff --git a/CondCore/SiPixelPlugins/test/SiPixelGainCalibrationComparator_DB.sh b/CondCore/SiPixelPlugins/test/SiPixelGainCalibrationComparator_DB.sh index ba4c38f79a80a..feb7fe8195f41 100755 --- a/CondCore/SiPixelPlugins/test/SiPixelGainCalibrationComparator_DB.sh +++ b/CondCore/SiPixelPlugins/test/SiPixelGainCalibrationComparator_DB.sh @@ -1,14 +1,14 @@ -#!/bin/bash -# Save current working dir so img can be outputted there later +#!/bin/bash +# Save current working dir so img can be outputted there later W_DIR=$(pwd); -# Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +# Set SCRAM architecture var +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; -# Go back to original working directory +# Go back to original working directory cd $W_DIR; -# Run get payload data script +# Run get payload data script if [ -f *.png ]; then rm *.png fi diff --git a/CondCore/SiPixelPlugins/test/test.sh b/CondCore/SiPixelPlugins/test/test.sh old mode 100644 new mode 100755 index 4aac8a63c5a3a..3541c17917347 --- a/CondCore/SiPixelPlugins/test/test.sh +++ b/CondCore/SiPixelPlugins/test/test.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; diff --git a/CondCore/SiPixelPlugins/test/testLorentzAngleMap.sh b/CondCore/SiPixelPlugins/test/testLorentzAngleMap.sh index 74020cb2c0dd0..0a8dff1b88006 100755 --- a/CondCore/SiPixelPlugins/test/testLorentzAngleMap.sh +++ b/CondCore/SiPixelPlugins/test/testLorentzAngleMap.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; @@ -37,6 +37,17 @@ getPayloadData.py \ mv *.png $W_DIR/plots_LAMap/FPixPixelLAMap.png +getPayloadData.py \ + --plugin pluginSiPixelLorentzAngle_PayloadInspector \ + --plot plot_SiPixelFullLorentzAngleMapByROC \ + --tag SiPixelLorentzAngle_v11_offline \ + --time_type Run \ + --iovs '{"start_iov": "324245", "end_iov": "324245"}' \ + --db Prod \ + --test ; + +mv *.png $W_DIR/plots_LAMap/PixelLAMap.png + getPayloadData.py \ --plugin pluginSiPixelLorentzAngle_PayloadInspector \ --plot plot_SiPixelLorentzAngleFullPixelMap \ diff --git a/CondCore/SiPixelPlugins/test/testMiscellanea.sh b/CondCore/SiPixelPlugins/test/testMiscellanea.sh index 27a2971b8bf91..2ae5130a845e6 100755 --- a/CondCore/SiPixelPlugins/test/testMiscellanea.sh +++ b/CondCore/SiPixelPlugins/test/testMiscellanea.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; diff --git a/CondCore/SiPixelPlugins/test/testSiPixelGainCalibrationForHLT.sh b/CondCore/SiPixelPlugins/test/testSiPixelGainCalibrationForHLT.sh index 9add35686d19b..4375a45c7f673 100755 --- a/CondCore/SiPixelPlugins/test/testSiPixelGainCalibrationForHLT.sh +++ b/CondCore/SiPixelPlugins/test/testSiPixelGainCalibrationForHLT.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; diff --git a/CondCore/SiPixelPlugins/test/testSiPixelGainCalibrationOffline.sh b/CondCore/SiPixelPlugins/test/testSiPixelGainCalibrationOffline.sh index 7f63b1110dcb9..b3a6bb0750bfa 100755 --- a/CondCore/SiPixelPlugins/test/testSiPixelGainCalibrationOffline.sh +++ b/CondCore/SiPixelPlugins/test/testSiPixelGainCalibrationOffline.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; diff --git a/CondCore/SiPixelPlugins/test/testSiPixelLorentzAngle.sh b/CondCore/SiPixelPlugins/test/testSiPixelLorentzAngle.sh index bf42ab32b7fc5..0d23aaad8c61d 100755 --- a/CondCore/SiPixelPlugins/test/testSiPixelLorentzAngle.sh +++ b/CondCore/SiPixelPlugins/test/testSiPixelLorentzAngle.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; diff --git a/CondCore/SiPixelPlugins/test/testSiPixelQuality.sh b/CondCore/SiPixelPlugins/test/testSiPixelQuality.sh index 1d65b45f7fecf..29af0675f28bc 100755 --- a/CondCore/SiPixelPlugins/test/testSiPixelQuality.sh +++ b/CondCore/SiPixelPlugins/test/testSiPixelQuality.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; diff --git a/CondCore/SiPixelPlugins/test/testSiPixelQualityMap.sh b/CondCore/SiPixelPlugins/test/testSiPixelQualityMap.sh index a3920b12ab000..66bd22fb5f34e 100755 --- a/CondCore/SiPixelPlugins/test/testSiPixelQualityMap.sh +++ b/CondCore/SiPixelPlugins/test/testSiPixelQualityMap.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; diff --git a/CondCore/SiPixelPlugins/test/testSiPixelTemplateDBObject.sh b/CondCore/SiPixelPlugins/test/testSiPixelTemplateDBObject.sh index 24c9454c293c8..e87dea0971781 100755 --- a/CondCore/SiPixelPlugins/test/testSiPixelTemplateDBObject.sh +++ b/CondCore/SiPixelPlugins/test/testSiPixelTemplateDBObject.sh @@ -2,7 +2,7 @@ # Save current working dir so img can be outputted there later W_DIR=$(pwd); # Set SCRAM architecture var -SCRAM_ARCH=slc6_amd64_gcc630; +SCRAM_ARCH=slc7_amd64_gcc900; export SCRAM_ARCH; source /afs/cern.ch/cms/cmsset_default.sh; eval `scram run -sh`; diff --git a/CondCore/SiStripPlugins/plugins/BuildFile.xml b/CondCore/SiStripPlugins/plugins/BuildFile.xml index f4dd06768a787..a42803db8b408 100644 --- a/CondCore/SiStripPlugins/plugins/BuildFile.xml +++ b/CondCore/SiStripPlugins/plugins/BuildFile.xml @@ -2,6 +2,7 @@ + @@ -9,6 +10,7 @@ + @@ -19,6 +21,7 @@ + @@ -28,6 +31,7 @@ + @@ -38,6 +42,7 @@ + @@ -45,6 +50,7 @@ + @@ -55,6 +61,7 @@ + @@ -72,6 +79,7 @@ + @@ -79,6 +87,7 @@ + @@ -87,6 +96,7 @@ + diff --git a/CondCore/SiStripPlugins/plugins/SiStripBadStrip_PayloadInspector.cc b/CondCore/SiStripPlugins/plugins/SiStripBadStrip_PayloadInspector.cc index 030ac02522bf7..acd7374ff9f13 100644 --- a/CondCore/SiStripPlugins/plugins/SiStripBadStrip_PayloadInspector.cc +++ b/CondCore/SiStripPlugins/plugins/SiStripBadStrip_PayloadInspector.cc @@ -143,7 +143,7 @@ namespace { auto tagname = PlotBase::getTag<0>().name; std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); + edm::FileInPath fp_ = edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile); SiStripDetInfoFileReader* reader = new SiStripDetInfoFileReader(fp_.fullPath()); auto theIOVsince = std::to_string(std::get<0>(iov)); @@ -204,7 +204,7 @@ namespace { auto tagname = PlotBase::getTag<0>().name; std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); + edm::FileInPath fp_ = edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile); SiStripDetInfoFileReader* reader = new SiStripDetInfoFileReader(fp_.fullPath()); auto theIOVsince = std::to_string(std::get<0>(iov)); @@ -258,7 +258,7 @@ namespace { ~SiStripBadStripFractionByRun() override = default; float getFromPayload(SiStripBadStrip& payload) override { - edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); + edm::FileInPath fp_ = edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile); SiStripDetInfoFileReader* reader = new SiStripDetInfoFileReader(fp_.fullPath()); std::vector detid; @@ -301,7 +301,7 @@ namespace { ~SiStripBadStripTIBFractionByRun() override = default; float getFromPayload(SiStripBadStrip& payload) override { - edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); + edm::FileInPath fp_ = edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile); SiStripDetInfoFileReader* reader = new SiStripDetInfoFileReader(fp_.fullPath()); std::vector detid; @@ -347,7 +347,7 @@ namespace { ~SiStripBadStripTOBFractionByRun() override = default; float getFromPayload(SiStripBadStrip& payload) override { - edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); + edm::FileInPath fp_ = edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile); SiStripDetInfoFileReader* reader = new SiStripDetInfoFileReader(fp_.fullPath()); std::vector detid; @@ -393,7 +393,7 @@ namespace { ~SiStripBadStripTIDFractionByRun() override = default; float getFromPayload(SiStripBadStrip& payload) override { - edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); + edm::FileInPath fp_ = edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile); SiStripDetInfoFileReader* reader = new SiStripDetInfoFileReader(fp_.fullPath()); std::vector detid; @@ -439,7 +439,7 @@ namespace { ~SiStripBadStripTECFractionByRun() override = default; float getFromPayload(SiStripBadStrip& payload) override { - edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); + edm::FileInPath fp_ = edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile); SiStripDetInfoFileReader* reader = new SiStripDetInfoFileReader(fp_.fullPath()); std::vector detid; @@ -865,7 +865,7 @@ namespace { std::string lastIOVsince = std::to_string(std::get<0>(lastiov)); std::string firstIOVsince = std::to_string(std::get<0>(firstiov)); - edm::FileInPath fp_ = edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); + edm::FileInPath fp_ = edm::FileInPath(SiStripDetInfoFileReader::kDefaultFile); SiStripDetInfoFileReader* reader = new SiStripDetInfoFileReader(fp_.fullPath()); std::string titleMap = @@ -966,7 +966,10 @@ namespace { auto iov = tag.iovs.front(); std::shared_ptr payload = fetchPayload(std::get<1>(iov)); - SiStripQuality* siStripQuality_ = new SiStripQuality(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + + SiStripQuality* siStripQuality_ = new SiStripQuality(reader.info()); siStripQuality_->add(payload.get()); siStripQuality_->cleanUp(); siStripQuality_->fillBadComponents(); @@ -1187,7 +1190,9 @@ namespace { // for the total int totNComponents[4][19][4] = {{{0}}}; - SiStripQuality* f_siStripQuality_ = new SiStripQuality(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + SiStripQuality* f_siStripQuality_ = new SiStripQuality(reader.info()); f_siStripQuality_->add(first_payload.get()); f_siStripQuality_->cleanUp(); f_siStripQuality_->fillBadComponents(); @@ -1195,7 +1200,7 @@ namespace { // call the filler SiStripPI::fillBCArrays(f_siStripQuality_, f_NTkBadComponent, f_NBadComponent, m_trackerTopo); - SiStripQuality* l_siStripQuality_ = new SiStripQuality(); + SiStripQuality* l_siStripQuality_ = new SiStripQuality(reader.info()); l_siStripQuality_->add(last_payload.get()); l_siStripQuality_->cleanUp(); l_siStripQuality_->fillBadComponents(); diff --git a/CondCore/SiStripPlugins/test/BuildFile.xml b/CondCore/SiStripPlugins/test/BuildFile.xml index 91856acb355dc..8a15b2b89857f 100644 --- a/CondCore/SiStripPlugins/test/BuildFile.xml +++ b/CondCore/SiStripPlugins/test/BuildFile.xml @@ -4,5 +4,6 @@ + diff --git a/CondCore/Utilities/interface/PayloadInspectorModule.h b/CondCore/Utilities/interface/PayloadInspectorModule.h index 5bbf22fdc33fd..2dfa41c534671 100644 --- a/CondCore/Utilities/interface/PayloadInspectorModule.h +++ b/CondCore/Utilities/interface/PayloadInspectorModule.h @@ -10,9 +10,9 @@ #define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME) \ boost::python::class_ >( \ STRINGIZE(PPCAT(plot_, CLASS_NAME)), boost::python::init<>()) \ - .def("process", &cond::payloadInspector::PlotBase::process) \ - .def("payloadType", &cond::payloadInspector::PlotBase::payloadType) \ - .def("title", &cond::payloadInspector::PlotBase::title) \ - .def("isSingleIov", &cond::payloadInspector::PlotBase::isSingleIov) \ - .def("isTwoTags", &cond::payloadInspector::PlotBase::isTwoTags) \ - .def("data", &cond::payloadInspector::PlotBase::data); + .def("process", &cond::payloadInspector::PlotBase::process) \ + .def("payloadType", &cond::payloadInspector::PlotBase::payloadType) \ + .def("title", &cond::payloadInspector::PlotBase::title) \ + .def("isSingleIov", &cond::payloadInspector::PlotBase::isSingleIov) \ + .def("isTwoTags", &cond::payloadInspector::PlotBase::isTwoTags) \ + .def("data", &cond::payloadInspector::PlotBase::data); diff --git a/CondCore/Utilities/python/conddblib.py b/CondCore/Utilities/python/conddblib.py index 6fc790973ea2b..292b0d9ef491a 100644 --- a/CondCore/Utilities/python/conddblib.py +++ b/CondCore/Utilities/python/conddblib.py @@ -337,7 +337,7 @@ def __init__(self, url): self.engine.execute('pragma foreign_keys = on') else: - self.engine = sqlalchemy.create_engine(url) + self.engine = sqlalchemy.create_engine(url, max_identifier_length=30) self._session = sqlalchemy.orm.scoped_session(sqlalchemy.orm.sessionmaker(bind=self.engine)) diff --git a/CondCore/Utilities/python/o2olib.py b/CondCore/Utilities/python/o2olib.py index 126fdaf839beb..dbf813d1d3168 100644 --- a/CondCore/Utilities/python/o2olib.py +++ b/CondCore/Utilities/python/o2olib.py @@ -127,7 +127,7 @@ def getSession( self, db_service, role, authPath ): url = sqlalchemy_tpl %(username,pwd,db_service) session = None try: - self.eng = sqlalchemy.create_engine( url ) + self.eng = sqlalchemy.create_engine( url, max_identifier_length=30) session = sqlalchemy.orm.scoped_session( sqlalchemy.orm.sessionmaker(bind=self.eng)) except sqlalchemy.exc.SQLAlchemyError as dberror: self.logger.error( str(dberror) ) diff --git a/CondCore/Utilities/scripts/conddb b/CondCore/Utilities/scripts/conddb index ce5294b68a8d4..b007e262f680e 100755 --- a/CondCore/Utilities/scripts/conddb +++ b/CondCore/Utilities/scripts/conddb @@ -1355,6 +1355,11 @@ def listRuns_(args): logging.info('Found %s Run entries.'%len(table)) for i in range(len(table)): table[i] = table[i] + ( (calendar.timegm( table[i][1].utctimetuple() ) << 32), (calendar.timegm( table[i][2].utctimetuple() ) << 32) ) + # check if last run is ongoing + last_start = table[len(table)-1][1] + last_end = table[len(table)-1][2] + if last_start==last_end: + table[len(table)-1]=(table[len(table)-1][0],table[len(table)-1][1],'on going...',table[len(table)-1][3],'-') output_table(args, table, ['Run_number','Start_time','End_time','Start_IOV','End_IOV'], ) return 0 diff --git a/CondFormats/GBRForest/BuildFile.xml b/CondFormats/GBRForest/BuildFile.xml index 06d9b6fbc34cd..698b4de95fd43 100644 --- a/CondFormats/GBRForest/BuildFile.xml +++ b/CondFormats/GBRForest/BuildFile.xml @@ -1,7 +1,5 @@ - - diff --git a/CondFormats/GBRForest/interface/GBRForest.h b/CondFormats/GBRForest/interface/GBRForest.h index 72e5a230423dd..8423c0ab5e788 100644 --- a/CondFormats/GBRForest/interface/GBRForest.h +++ b/CondFormats/GBRForest/interface/GBRForest.h @@ -1,4 +1,3 @@ - #ifndef EGAMMAOBJECTS_GBRForest #define EGAMMAOBJECTS_GBRForest @@ -19,12 +18,12 @@ #include "CondFormats/Serialization/interface/Serializable.h" #include "CondFormats/GBRForest/interface/GBRTree.h" -#include #include +#include class GBRForest { public: - GBRForest(); + GBRForest() {} double GetResponse(const float* vector) const; double GetGradBoostClassifier(const float* vector) const; @@ -39,7 +38,7 @@ class GBRForest { const std::vector& Trees() const { return fTrees; } protected: - double fInitialResponse; + double fInitialResponse = 0.0; std::vector fTrees; COND_SERIALIZABLE; @@ -48,8 +47,8 @@ class GBRForest { //_______________________________________________________________________ inline double GBRForest::GetResponse(const float* vector) const { double response = fInitialResponse; - for (std::vector::const_iterator it = fTrees.begin(); it != fTrees.end(); ++it) { - response += it->GetResponse(vector); + for (auto const& tree : fTrees) { + response += tree.GetResponse(vector); } return response; } @@ -57,7 +56,7 @@ inline double GBRForest::GetResponse(const float* vector) const { //_______________________________________________________________________ inline double GBRForest::GetGradBoostClassifier(const float* vector) const { double response = GetResponse(vector); - return 2.0 / (1.0 + exp(-2.0 * response)) - 1; //MVA output between -1 and 1 + return 2.0 / (1.0 + std::exp(-2.0 * response)) - 1; //MVA output between -1 and 1 } #endif diff --git a/CondFormats/GBRForest/interface/GBRForest2D.h b/CondFormats/GBRForest/interface/GBRForest2D.h index a04fadebb4cf8..58c2b52c72120 100644 --- a/CondFormats/GBRForest/interface/GBRForest2D.h +++ b/CondFormats/GBRForest/interface/GBRForest2D.h @@ -19,13 +19,12 @@ #include "CondFormats/Serialization/interface/Serializable.h" #include "GBRTree2D.h" -#include + #include class GBRForest2D { public: - GBRForest2D(); - ~GBRForest2D() {} + GBRForest2D() {} void GetResponse(const float *vector, double &x, double &y) const; @@ -38,8 +37,8 @@ class GBRForest2D { const std::vector &Trees() const { return fTrees; } protected: - double fInitialResponseX; - double fInitialResponseY; + double fInitialResponseX = 0.0; + double fInitialResponseY = 0.0; std::vector fTrees; COND_SERIALIZABLE; diff --git a/CondFormats/GBRForest/interface/GBRForestD.h b/CondFormats/GBRForest/interface/GBRForestD.h index c33cec8738f79..c00f6a6be6f2c 100644 --- a/CondFormats/GBRForest/interface/GBRForestD.h +++ b/CondFormats/GBRForest/interface/GBRForestD.h @@ -18,20 +18,17 @@ #include "CondFormats/Serialization/interface/Serializable.h" -#include #include "GBRTreeD.h" -#include -#include -#include "Rtypes.h" + +#include class GBRForestD { public: typedef GBRTreeD TreeT; - GBRForestD(); + GBRForestD() {} template GBRForestD(const InputForestT &forest); - virtual ~GBRForestD(); double GetResponse(const float *vector) const; @@ -42,7 +39,7 @@ class GBRForestD { const std::vector &Trees() const { return fTrees; } protected: - double fInitialResponse; + double fInitialResponse = 0.0; std::vector fTrees; COND_SERIALIZABLE; diff --git a/CondFormats/GBRForest/interface/GBRTree.h b/CondFormats/GBRForest/interface/GBRTree.h index 9841022b28625..95e72b96f8977 100644 --- a/CondFormats/GBRForest/interface/GBRTree.h +++ b/CondFormats/GBRForest/interface/GBRTree.h @@ -28,7 +28,7 @@ class GBRTree { public: - GBRTree(); + GBRTree() {} explicit GBRTree(int nIntermediate, int nTerminal); double GetResponse(const float *vector) const; diff --git a/CondFormats/GBRForest/interface/GBRTree2D.h b/CondFormats/GBRForest/interface/GBRTree2D.h index a9318e8c828d8..5f2dbd153820f 100644 --- a/CondFormats/GBRForest/interface/GBRTree2D.h +++ b/CondFormats/GBRForest/interface/GBRTree2D.h @@ -25,12 +25,10 @@ #include "CondFormats/Serialization/interface/Serializable.h" #include -#include class GBRTree2D { public: GBRTree2D() {} - ~GBRTree2D() {} void GetResponse(const float *vector, double &x, double &y) const; int TerminalIndex(const float *vector) const; diff --git a/CondFormats/GBRForest/interface/GBRTreeD.h b/CondFormats/GBRForest/interface/GBRTreeD.h index 520222975f5d4..7964db20c622c 100644 --- a/CondFormats/GBRForest/interface/GBRTreeD.h +++ b/CondFormats/GBRForest/interface/GBRTreeD.h @@ -25,17 +25,12 @@ #include "CondFormats/Serialization/interface/Serializable.h" #include -#include -#include -#include -#include "Rtypes.h" class GBRTreeD { public: GBRTreeD() {} template GBRTreeD(const InputTreeT &tree); - virtual ~GBRTreeD(); //double GetResponse(const float* vector) const; double GetResponse(int termidx) const { return fResponses[termidx]; } diff --git a/CondFormats/GBRForest/src/GBRForest.cxx b/CondFormats/GBRForest/src/GBRForest.cxx deleted file mode 100644 index 566cc6c1e8c9a..0000000000000 --- a/CondFormats/GBRForest/src/GBRForest.cxx +++ /dev/null @@ -1,4 +0,0 @@ -#include "CondFormats/GBRForest/interface/GBRForest.h" - -//_______________________________________________________________________ -GBRForest::GBRForest() : fInitialResponse(0.) {} diff --git a/CondFormats/GBRForest/src/GBRForest2D.cxx b/CondFormats/GBRForest/src/GBRForest2D.cxx deleted file mode 100644 index 4589dff932697..0000000000000 --- a/CondFormats/GBRForest/src/GBRForest2D.cxx +++ /dev/null @@ -1,7 +0,0 @@ -#include "CondFormats/GBRForest/interface/GBRForest2D.h" -//#include -#include "TMVA/DecisionTree.h" -#include "TMVA/MethodBDT.h" - -//_______________________________________________________________________ -GBRForest2D::GBRForest2D() : fInitialResponseX(0.), fInitialResponseY(0.) {} diff --git a/CondFormats/GBRForest/src/GBRForestD.cc b/CondFormats/GBRForest/src/GBRForestD.cc deleted file mode 100644 index 009a3a6e5cee2..0000000000000 --- a/CondFormats/GBRForest/src/GBRForestD.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include "CondFormats/GBRForest/interface/GBRForestD.h" - -//_______________________________________________________________________ -GBRForestD::GBRForestD() : fInitialResponse(0.) {} - -//_______________________________________________________________________ -GBRForestD::~GBRForestD() {} diff --git a/CondFormats/GBRForest/src/GBRTree.cxx b/CondFormats/GBRForest/src/GBRTree.cc similarity index 82% rename from CondFormats/GBRForest/src/GBRTree.cxx rename to CondFormats/GBRForest/src/GBRTree.cc index 3512c7e2e0751..06dd9b858aacc 100644 --- a/CondFormats/GBRForest/src/GBRTree.cxx +++ b/CondFormats/GBRForest/src/GBRTree.cc @@ -1,8 +1,5 @@ #include "CondFormats/GBRForest/interface/GBRTree.h" -//_______________________________________________________________________ -GBRTree::GBRTree() {} - //_______________________________________________________________________ GBRTree::GBRTree(int nIntermediate, int nTerminal) { //special case, root node is terminal diff --git a/CondFormats/GBRForest/src/GBRTree2D.cxx b/CondFormats/GBRForest/src/GBRTree2D.cxx deleted file mode 100644 index a19739e4124c0..0000000000000 --- a/CondFormats/GBRForest/src/GBRTree2D.cxx +++ /dev/null @@ -1 +0,0 @@ -#include "CondFormats/GBRForest/interface/GBRTree2D.h" diff --git a/CondFormats/GBRForest/src/GBRTreeD.cc b/CondFormats/GBRForest/src/GBRTreeD.cc deleted file mode 100644 index f938dbd0dd87a..0000000000000 --- a/CondFormats/GBRForest/src/GBRTreeD.cc +++ /dev/null @@ -1,4 +0,0 @@ -#include "CondFormats/GBRForest/interface/GBRTreeD.h" - -//_______________________________________________________________________ -GBRTreeD::~GBRTreeD() {} diff --git a/CondFormats/JetMETObjects/src/JetResolution.cc b/CondFormats/JetMETObjects/src/JetResolution.cc index e80dd3b745e01..cd508279841c2 100644 --- a/CondFormats/JetMETObjects/src/JetResolution.cc +++ b/CondFormats/JetMETObjects/src/JetResolution.cc @@ -251,7 +251,7 @@ double fnc_gaussalpha1alpha2(double* v, double* par) { double alpha2 = par[4]; double t = TMath::Abs((v[0] - mean) / sigma); double cut = 1.0; - return (t <= cut) ? N * TMath::Exp(-0.5 * t * t) - : ((v[0] - mean) >= 0) ? N * TMath::Exp(-0.5 * (alpha1 * (t - cut) + cut * cut)) - : N * TMath::Exp(-0.5 * (alpha2 * (t - cut) + cut * cut)); + return (t <= cut) ? N * TMath::Exp(-0.5 * t * t) + : ((v[0] - mean) >= 0) ? N * TMath::Exp(-0.5 * (alpha1 * (t - cut) + cut * cut)) + : N * TMath::Exp(-0.5 * (alpha2 * (t - cut) + cut * cut)); } diff --git a/CondFormats/L1TObjects/src/L1GtDefinitions.cc b/CondFormats/L1TObjects/src/L1GtDefinitions.cc index 97d5b67e2dee3..e4cf0539aee56 100644 --- a/CondFormats/L1TObjects/src/L1GtDefinitions.cc +++ b/CondFormats/L1TObjects/src/L1GtDefinitions.cc @@ -32,14 +32,16 @@ namespace { template constexpr T keyToValue(char const* label, entry const* entries) { - return !entries->label ? entries->value - : same(entries->label, label) ? entries->value : /*default*/ keyToValue(label, entries + 1); + return !entries->label ? entries->value + : same(entries->label, label) ? entries->value + : /*default*/ keyToValue(label, entries + 1); } template constexpr char const* valueToKey(T value, entry const* entries) { - return !entries->label ? entries->label - : entries->value == value ? entries->label : /*default*/ valueToKey(value, entries + 1); + return !entries->label ? entries->label + : entries->value == value ? entries->label + : /*default*/ valueToKey(value, entries + 1); } constexpr entry l1GtBoardTypeStringToEnumMap[] = {{"GTFE", GTFE}, {"FDL", FDL}, diff --git a/CondFormats/SiPixelObjects/src/SiPixelFrameConverter.cc b/CondFormats/SiPixelObjects/src/SiPixelFrameConverter.cc index dd48d8848f735..0c7aacd7fc7b8 100644 --- a/CondFormats/SiPixelObjects/src/SiPixelFrameConverter.cc +++ b/CondFormats/SiPixelObjects/src/SiPixelFrameConverter.cc @@ -25,12 +25,11 @@ PixelROC const* SiPixelFrameConverter::toRoc(int link, int roc) const { CablingPathToDetUnit path = { static_cast(theFedId), static_cast(link), static_cast(roc)}; const PixelROC* rocp = (theFed) ? theTree->findItemInFed(path, theFed) : theMap->findItem(path); - if - UNLIKELY(!rocp) { - stringstream stm; - stm << "Map shows no fed=" << theFedId << ", link=" << link << ", roc=" << roc; - edm::LogWarning("SiPixelFrameConverter") << stm.str(); - } + if UNLIKELY (!rocp) { + stringstream stm; + stm << "Map shows no fed=" << theFedId << ", link=" << link << ", roc=" << roc; + edm::LogWarning("SiPixelFrameConverter") << stm.str(); + } return rocp; } diff --git a/Configuration/AlCa/python/autoCond.py b/Configuration/AlCa/python/autoCond.py index ef581671d3281..84cdc275dccbf 100644 --- a/Configuration/AlCa/python/autoCond.py +++ b/Configuration/AlCa/python/autoCond.py @@ -16,9 +16,9 @@ # GlobalTag for MC production with perfectly aligned and calibrated detector for Run2 'run2_design' : '113X_mcRun2_design_v4', #GlobalTag for MC production with optimistic alignment and calibrations for 2016, prior to VFP change - 'run2_mc_pre_vfp' : '113X_mcRun2_asymptotic_preVFP_v4', + 'run2_mc_pre_vfp' : '120X_mcRun2_asymptotic_preVFP_v1', #GlobalTag for MC production with optimistic alignment and calibrations for 2016, after VFP change - 'run2_mc' : '113X_mcRun2_asymptotic_v4', + 'run2_mc' : '120X_mcRun2_asymptotic_v1', # GlobalTag for MC production (cosmics) with starup-like alignment and calibrations for Run2, Strip tracker in peak mode 'run2_mc_cosmics' : '113X_mcRun2cosmics_asymptotic_deco_v4', # GlobalTag for MC production (Heavy Ions collisions) with optimistic alignment and calibrations for Run2 @@ -26,11 +26,11 @@ # GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run2 'run2_mc_pa' : '113X_mcRun2_pA_v4', # GlobalTag for Run2 data reprocessing - 'run2_data' : '113X_dataRun2_v6', + 'run2_data' : '120X_dataRun2_v1', # GlobalTag for Run2 data 2018B relvals only: HEM-15-16 fail 'run2_data_HEfail' : '113X_dataRun2_HEfail_v6', # GlobalTag for Run2 data relvals: allows customization to run with fixed L1 menu - 'run2_data_relval' : '113X_dataRun2_relval_v6', + 'run2_data_relval' : '120X_dataRun2_relval_v1', # GlobalTag for Run2 HI data 'run2_data_promptlike_hi' : '113X_dataRun2_PromptLike_HI_v6', # GlobalTag for Run3 HLT: it points to the online GT diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index 15c2f93f807fb..76d7a539f24f9 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -332,6 +332,15 @@ def SwapKeepAndDrop(l): RAWSIMEventContent.outputCommands.extend(IOMCRAW.outputCommands) RAWSIMEventContent.outputCommands.extend(CommonEventContent.outputCommands) # +# Temporary collections needed for Phase-2 RECO using RAWSIM as input in Prod-like workflow +# They are until packer/unpackers are done. +# +from Configuration.Eras.Modifier_phase2_common_cff import phase2_common +phase2_common.toModify(RAWSIMEventContent, + outputCommands = RAWSIMEventContent.outputCommands+[ + 'keep *_sim*Digis_*_*', + 'keep *Phase2TrackerDigi*_*_*_*']) +# # # RAWSIMHLT Data Tier definition # @@ -713,6 +722,22 @@ def SwapKeepAndDrop(l): PREMIXRAWEventContent.outputCommands.append('keep *_*_MuonCSCWireDigiSimLinks_*') PREMIXRAWEventContent.outputCommands.append('keep *_*_RPCDigiSimLink_*') PREMIXRAWEventContent.outputCommands.append('keep DTLayerIdDTDigiSimLinkMuonDigiCollection_*_*_*') +# +# Temporary eventcontent for Prod-Like Phase2 PREMIXRAW. +# They are until packer/unpackers are done. +# +(premix_stage2 & phase2_common).toModify(PREMIXRAWEventContent, + outputCommands = PREMIXRAWEventContent.outputCommands + [ + 'drop *_simSiPixelDigis_*_*', + 'keep *_mixData_Pixel_*', + 'keep *_mixData_Tracker_*', + 'keep *_*_Phase2OTDigiSimLink_*', + 'keep *_*_GEMDigiSimLink_*', + 'keep *_*_GEMStripDigiSimLink_*', + 'keep *_*_ME0DigiSimLink_*', + 'keep *_*_ME0StripDigiSimLink_*' + ]) + # # ## RAW repacked event content definition diff --git a/Configuration/Generator/python/BuToJPsiPrimePhiToJPsiPiKK_14TeV_TuneCP5_pythia8_cfi.py b/Configuration/Generator/python/BuToJPsiPrimePhiToJPsiPiKK_14TeV_TuneCP5_pythia8_cfi.py new file mode 100644 index 0000000000000..d55a9cb4f7503 --- /dev/null +++ b/Configuration/Generator/python/BuToJPsiPrimePhiToJPsiPiKK_14TeV_TuneCP5_pythia8_cfi.py @@ -0,0 +1,119 @@ +import FWCore.ParameterSet.Config as cms +from Configuration.Generator.Pythia8CommonSettings_cfi import * +from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import * +from GeneratorInterface.EvtGenInterface.EvtGenSetting_cff import * + +generator = cms.EDFilter("Pythia8GeneratorFilter", + comEnergy = cms.double(14000.0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + maxEventsToPrint = cms.untracked.int32(0), + pythiaPylistVerbosity = cms.untracked.int32(0), + ExternalDecays = cms.PSet( + EvtGen130 = cms.untracked.PSet( + decay_table = cms.string('GeneratorInterface/EvtGenInterface/data/DECAY_2014_NOLONGLIFE.DEC'), + particle_property_file = cms.FileInPath('GeneratorInterface/EvtGenInterface/data/evt_2014.pdl'), + user_decay_embedded= cms.vstring( +"""## my decay +Alias MyB+ B+ +Alias MyB- B- +ChargeConj MyB- MyB+ +# +Alias MyJpsi J/psi +ChargeConj MyJpsi MyJpsi +# +# Alias Myrho0 rho0 +# ChargeConj Myrho0 Myrho0 +# +# +Alias Mypsi(2S) psi(2S) +ChargeConj Mypsi(2S) Mypsi(2S) +# +Decay MyJpsi +1.000 mu+ mu- PHOTOS VLL; +Enddecay +# +Decay MyB+ +1.000 Mypsi(2S) K+ PHSP; +Enddecay +# +Decay MyB- +1.000 Mypsi(2S) K- PHSP; +Enddecay +# +Decay Mypsi(2S) +1.000 MyJpsi pi+ pi- VVPIPI; +Enddecay +# +# Decay Myrho0 +# 1.000 pi+ pi- PHSP; +# Enddecay +# +End""" + ), + list_forced_decays = cms.vstring('MyB+','MyB-'), + operates_on_particles = cms.vint32(), + convertPythiaCodes = cms.untracked.bool(False) + ), + parameterSets = cms.vstring('EvtGen130') + ), + PythiaParameters = cms.PSet( + pythia8CommonSettingsBlock, + pythia8CP5SettingsBlock, + processParameters = cms.vstring( + "SoftQCD:nonDiffractive = on", + 'PTFilter:filter = on', # this turn on the filter + 'PTFilter:quarkToFilter = 5', # PDG id of q quark + 'PTFilter:scaleToFilter = 1.0'), + parameterSets = cms.vstring( + 'pythia8CommonSettings', + 'pythia8CP5Settings', + 'processParameters', + ) + ) +) + + + +########### +# Filters # +########### +bfilter = cms.EDFilter("PythiaFilter", + MaxEta = cms.untracked.double(9999.), + MinEta = cms.untracked.double(-9999.), + ParticleID = cms.untracked.int32(521) +) + +jpsifilter = cms.EDFilter("PythiaDauVFilter", + verbose = cms.untracked.int32(0), + NumberDaughters = cms.untracked.int32(2), + MotherID = cms.untracked.int32(100443), + ParticleID = cms.untracked.int32(443), + DaughterIDs = cms.untracked.vint32(13, -13), + MinPt = cms.untracked.vdouble(1.5, 1.5), + MinEta = cms.untracked.vdouble(-2.5, -2.5), + MaxEta = cms.untracked.vdouble( 2.5, 2.5) +) + +xxxfilter = cms.EDFilter("PythiaDauVFilter", + verbose = cms.untracked.int32(0), + NumberDaughters = cms.untracked.int32(3), + MotherID = cms.untracked.int32(521), + ParticleID = cms.untracked.int32(100443), + DaughterIDs = cms.untracked.vint32(443, 211, -211), + MinPt = cms.untracked.vdouble(5, 0.0, 0.0), + MinEta = cms.untracked.vdouble(-9999, -9999, -9999), + MaxEta = cms.untracked.vdouble( 9999, 9999, 9999) +) + +decayfilter = cms.EDFilter("PythiaDauVFilter", + verbose = cms.untracked.int32(0), + NumberDaughters = cms.untracked.int32(2), + MotherID = cms.untracked.int32(0), + ParticleID = cms.untracked.int32(521), + DaughterIDs = cms.untracked.vint32(100443, 321), + MinPt = cms.untracked.vdouble(5., 0.0), + MinEta = cms.untracked.vdouble(-9999., -9999.), + MaxEta = cms.untracked.vdouble( 9999., 9999.) +) + +ProductionFilterSequence = cms.Sequence(generator*bfilter*jpsifilter*xxxfilter*decayfilter) diff --git a/Configuration/Generator/python/Psi2SToJPsiPiPi_14TeV_TuneCP5_pythia8_cfi.py b/Configuration/Generator/python/Psi2SToJPsiPiPi_14TeV_TuneCP5_pythia8_cfi.py new file mode 100644 index 0000000000000..03b89fe9f385e --- /dev/null +++ b/Configuration/Generator/python/Psi2SToJPsiPiPi_14TeV_TuneCP5_pythia8_cfi.py @@ -0,0 +1,108 @@ +import FWCore.ParameterSet.Config as cms +from Configuration.Generator.Pythia8CommonSettings_cfi import * +from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import * + +generator = cms.EDFilter("Pythia8GeneratorFilter", + pythiaPylistVerbosity = cms.untracked.int32(0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + maxEventsToPrint = cms.untracked.int32(0), + comEnergy = cms.double(14000.0), + PythiaParameters = cms.PSet( + pythia8CommonSettingsBlock, + pythia8CP5SettingsBlock, + processParameters = cms.vstring( + 'Charmonium:states(3S1) = 100443', + 'Charmonium:O(3S1)[3S1(1)] = 0.76', + 'Charmonium:O(3S1)[3S1(8)] = 0.0050', + 'Charmonium:O(3S1)[1S0(8)] = 0.004', + 'Charmonium:O(3S1)[3P0(8)] = 0.004', + 'Charmonium:gg2ccbar(3S1)[3S1(1)]g = on', + 'Charmonium:gg2ccbar(3S1)[3S1(1)]gm = on', + 'Charmonium:gg2ccbar(3S1)[3S1(8)]g = on', + 'Charmonium:qg2ccbar(3S1)[3S1(8)]q = on', + 'Charmonium:qqbar2ccbar(3S1)[3S1(8)]g = on', + 'Charmonium:gg2ccbar(3S1)[1S0(8)]g = on', + 'Charmonium:qg2ccbar(3S1)[1S0(8)]q = on', + 'Charmonium:qqbar2ccbar(3S1)[1S0(8)]g = on', + 'Charmonium:gg2ccbar(3S1)[3PJ(8)]g = on', + 'Charmonium:qg2ccbar(3S1)[3PJ(8)]q = on', + 'Charmonium:qqbar2ccbar(3S1)[3PJ(8)]g = on', + '100443:onMode = off', + '100443:onIfMatch = 443 211 -211', + '443:onMode = off', + '443:onIfMatch = 13 -13', + 'PhaseSpace:pTHatMin = 10.' + ), + parameterSets = cms.vstring('pythia8CommonSettings', + 'pythia8CP5Settings', + 'processParameters', + ) + ) +) + +# Filter with high pT cut on dimuon, trying to accomodate trigger requirements. + +psi2SIDfilter = cms.EDFilter("PythiaFilter", + ParticleID = cms.untracked.int32(100443), + MinPt = cms.untracked.double(0.0), + MinEta = cms.untracked.double(-2.4), + MaxEta = cms.untracked.double(2.4), + Status = cms.untracked.int32(2) +) + +jpsifilter = cms.EDFilter("PythiaFilter", + ParticleID = cms.untracked.int32(443), + MinPt = cms.untracked.double(0.0), + MinEta = cms.untracked.double(-2.4), + MaxEta = cms.untracked.double(2.4), + Status = cms.untracked.int32(2) +) + +# Next two muon filter are derived from muon reconstruction + +muminusfilter = cms.EDFilter("PythiaDauVFilter", + MotherID = cms.untracked.int32(0), + MinPt = cms.untracked.vdouble(2.), + ParticleID = cms.untracked.int32(443), + ChargeConjugation = cms.untracked.bool(False), + MinEta = cms.untracked.vdouble(-2.4), + MaxEta = cms.untracked.vdouble(2.4), + NumberDaughters = cms.untracked.int32(1), + DaughterIDs = cms.untracked.vint32(-13) +) + +muplusfilter = cms.EDFilter("PythiaDauVFilter", + MotherID = cms.untracked.int32(0), + MinPt = cms.untracked.vdouble(2.), + ParticleID = cms.untracked.int32(443), + ChargeConjugation = cms.untracked.bool(False), + MinEta = cms.untracked.vdouble(-2.4), + MaxEta = cms.untracked.vdouble(2.4), + NumberDaughters = cms.untracked.int32(1), + DaughterIDs = cms.untracked.vint32(13) +) + +# two pion filter +piminusfilter = cms.EDFilter("PythiaDauVFilter", + MotherID = cms.untracked.int32(0), + MinPt = cms.untracked.vdouble(0.0), + ParticleID = cms.untracked.int32(100443), + ChargeConjugation = cms.untracked.bool(False), + MinEta = cms.untracked.vdouble(-2.4), # or 3.0 ? + MaxEta = cms.untracked.vdouble(2.4), # or 3.0 ? + NumberDaughters = cms.untracked.int32(1), + DaughterIDs = cms.untracked.vint32(-211) +) + +piplusfilter = cms.EDFilter("PythiaDauVFilter", + MotherID = cms.untracked.int32(0), + MinPt = cms.untracked.vdouble(0.0), + ParticleID = cms.untracked.int32(100443), + ChargeConjugation = cms.untracked.bool(False), + MinEta = cms.untracked.vdouble(-2.4), # or 3.0 ? + MaxEta = cms.untracked.vdouble(2.4), # or 3.0 ? + NumberDaughters = cms.untracked.int32(1), + DaughterIDs = cms.untracked.vint32(211) +) + +ProductionFilterSequence = cms.Sequence(generator*psi2SIDfilter*jpsifilter*muminusfilter*muplusfilter*piminusfilter*piplusfilter) diff --git a/Configuration/Generator/python/TT_13TeV_Pow_Herwig7_cff.py b/Configuration/Generator/python/TT_13TeV_Pow_Herwig7_cff.py index 46db99fa77df4..c2ff018b3a23b 100644 --- a/Configuration/Generator/python/TT_13TeV_Pow_Herwig7_cff.py +++ b/Configuration/Generator/python/TT_13TeV_Pow_Herwig7_cff.py @@ -6,7 +6,6 @@ from Configuration.Generator.Herwig7Settings.Herwig7LHECommonSettings_cfi import * from Configuration.Generator.Herwig7Settings.Herwig7LHEPowhegSettings_cfi import * -externalLHEProducer.generateConcurrently = cms.untracked.bool(False) generator = cms.EDFilter("Herwig7GeneratorFilter", herwig7CH3SettingsBlock, diff --git a/Configuration/Generator/python/TTbar_Pow_LHE_13TeV_cff.py b/Configuration/Generator/python/TTbar_Pow_LHE_13TeV_cff.py index 300e52435a0f1..eaf5b7b625730 100644 --- a/Configuration/Generator/python/TTbar_Pow_LHE_13TeV_cff.py +++ b/Configuration/Generator/python/TTbar_Pow_LHE_13TeV_cff.py @@ -7,6 +7,7 @@ outputFile = cms.string('cmsgrid_final.lhe'), scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'), generateConcurrently = cms.untracked.bool(True), + postGenerationCommand = cms.untracked.vstring('mergeLHE.py', '-i', 'thread*/cmsgrid_final.lhe', '-o', 'cmsgrid_final.lhe'), ) #Link to datacards: diff --git a/Configuration/Geometry/python/dict2021Geometry.py b/Configuration/Geometry/python/dict2021Geometry.py index 431732a9e9c6f..4735e7763f312 100644 --- a/Configuration/Geometry/python/dict2021Geometry.py +++ b/Configuration/Geometry/python/dict2021Geometry.py @@ -2035,7 +2035,7 @@ 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_123.xml', 'Geometry/VeryForwardData/data/CTPPS_Pixel_Sens.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/RP_Dist_Beam_Cent.xml', - ], + ], "sim" : [ ], @@ -2138,7 +2138,7 @@ 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_123.xml', 'Geometry/VeryForwardData/data/CTPPS_Pixel_Sens.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/RP_Dist_Beam_Cent.xml', - ], + ], "sim" : [ ], @@ -2241,7 +2241,109 @@ 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_123.xml', 'Geometry/VeryForwardData/data/CTPPS_Pixel_Sens.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/RP_Dist_Beam_Cent.xml', - ], + ], + "sim" : [ + + ], + "reco" :[ + + ], + }, + "P4" : { + 2 : [ + 'Geometry/ForwardCommonData/data/Run2/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/VeryForwardData/data/RP_Box.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_000.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_001.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_002.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_003.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_004.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_005.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_020.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_021.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_022.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_023.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_024.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_025.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_100.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_101.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_102.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_103.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_104.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_105.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_120.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_121.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_122.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_123.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_124.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_125.xml', + 'Geometry/VeryForwardData/data/RP_Hybrid/v1/RP_Hybrid.xml', + 'Geometry/VeryForwardData/data/RP_Materials/v3/RP_Materials.xml', + 'Geometry/VeryForwardData/data/RP_Transformations.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_000.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_001.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_002.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_004.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_005.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_020.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_021.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_022.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_024.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_025.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_100.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_101.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_102.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_104.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_105.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_120.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_121.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_122.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_124.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_125.xml', + 'Geometry/VeryForwardData/data/RP_Device.xml', + 'Geometry/VeryForwardData/data/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v2/CTPPS_220_Right_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v2/CTPPS_220_Left_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v2/CTPPS_210_Right_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Left_Station/v2/CTPPS_210_Left_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_Stations_Assembly.xml', + 'Geometry/VeryForwardData/data/CTPPS_Cuts_Per_Region.xml', + 'Geometry/VeryForwardData/data/RP_Sensitive_Dets.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Transformations.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Parameters.xml', + 'Geometry/VeryForwardData/data/CTPPS_Timing_Station_Parameters.xml', + 'Geometry/VeryForwardData/data/CTPPS_Timing_Horizontal_Pot/v1/CTPPS_Timing_Horizontal_Pot.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern1_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern2_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern2_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment5.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Detector_Assembly/2021/v1/CTPPS_Diamond_Detector_Assembly.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Sensitive_Dets_TimingHits.xml', + 'Geometry/VeryForwardData/data/ppstrackerMaterials/v2/ppstrackerMaterials.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Module/v3/CTPPS_Pixel_Module.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Module_2x2/v3/CTPPS_Pixel_Module_2x2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_003.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_023.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_103.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_123.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Sens.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/RP_Dist_Beam_Cent.xml', + ], "sim" : [ ], diff --git a/Configuration/ProcessModifiers/python/trackingMkFitCommon_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitCommon_cff.py new file mode 100644 index 0000000000000..d6ddd4f9ba133 --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitCommon_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier does iteration-independent changes for enabling mkFit +trackingMkFitCommon = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitDetachedQuadStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitDetachedQuadStep_cff.py new file mode 100644 index 0000000000000..18bd2a903f982 --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitDetachedQuadStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for detachedQuadStep +trackingMkFitDetachedQuadStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitDetachedTripletStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitDetachedTripletStep_cff.py new file mode 100644 index 0000000000000..9cb5bcf705357 --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitDetachedTripletStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for detachedTripletStep +trackingMkFitDetachedTripletStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitHighPtTripletStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitHighPtTripletStep_cff.py new file mode 100644 index 0000000000000..4db29d1d80275 --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitHighPtTripletStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for highPtTripletStep +trackingMkFitHighPtTripletStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitInitialStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitInitialStep_cff.py new file mode 100644 index 0000000000000..3c4445795d201 --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitInitialStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for initialStep +trackingMkFitInitialStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitLowPtQuadStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitLowPtQuadStep_cff.py new file mode 100644 index 0000000000000..5b0c4a622e86a --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitLowPtQuadStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for lowPtQuadStep +trackingMkFitLowPtQuadStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitLowPtTripletStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitLowPtTripletStep_cff.py new file mode 100644 index 0000000000000..d4ecaf8cb950d --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitLowPtTripletStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for lowPtTripletStep +trackingMkFitLowPtTripletStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitMixedTripletStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitMixedTripletStep_cff.py new file mode 100644 index 0000000000000..104fc5aeb5029 --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitMixedTripletStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for mixedTripletStep +trackingMkFitMixedTripletStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitPixelLessStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitPixelLessStep_cff.py new file mode 100644 index 0000000000000..396d80eb7bf2e --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitPixelLessStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for pixelLessStep +trackingMkFitPixelLessStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFitTobTecStep_cff.py b/Configuration/ProcessModifiers/python/trackingMkFitTobTecStep_cff.py new file mode 100644 index 0000000000000..b8317e86fff68 --- /dev/null +++ b/Configuration/ProcessModifiers/python/trackingMkFitTobTecStep_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier sets replaces the default pattern recognition with mkFit for tobTecStep +trackingMkFitTobTecStep = cms.Modifier() diff --git a/Configuration/ProcessModifiers/python/trackingMkFit_cff.py b/Configuration/ProcessModifiers/python/trackingMkFit_cff.py index 08903e6a84258..b62a8d8376937 100644 --- a/Configuration/ProcessModifiers/python/trackingMkFit_cff.py +++ b/Configuration/ProcessModifiers/python/trackingMkFit_cff.py @@ -1,4 +1,26 @@ import FWCore.ParameterSet.Config as cms -# This modifier sets replaces the default pattern recognition with mkFit (possibly in selected iterations only) -trackingMkFit = cms.Modifier() +from Configuration.ProcessModifiers.trackingMkFitCommon_cff import * +from Configuration.ProcessModifiers.trackingMkFitInitialStep_cff import * +from Configuration.ProcessModifiers.trackingMkFitLowPtQuadStep_cff import * +from Configuration.ProcessModifiers.trackingMkFitHighPtTripletStep_cff import * +from Configuration.ProcessModifiers.trackingMkFitLowPtTripletStep_cff import * +from Configuration.ProcessModifiers.trackingMkFitDetachedQuadStep_cff import * +from Configuration.ProcessModifiers.trackingMkFitDetachedTripletStep_cff import * +from Configuration.ProcessModifiers.trackingMkFitMixedTripletStep_cff import * +from Configuration.ProcessModifiers.trackingMkFitPixelLessStep_cff import * +from Configuration.ProcessModifiers.trackingMkFitTobTecStep_cff import * + +# Use mkFit in selected iterations +trackingMkFit = cms.ModifierChain( + trackingMkFitCommon, + trackingMkFitInitialStep, + trackingMkFitLowPtQuadStep, + trackingMkFitHighPtTripletStep, + trackingMkFitLowPtTripletStep, + trackingMkFitDetachedQuadStep, +# trackingMkFitDetachedTripletStep, # to be enabled later +# trackingMkFitMixedTripletStep, # to be enabled later + trackingMkFitPixelLessStep, + trackingMkFitTobTecStep, +) diff --git a/Configuration/PyReleaseValidation/python/relval_standard.py b/Configuration/PyReleaseValidation/python/relval_standard.py index 431062551de54..504df3652f460 100644 --- a/Configuration/PyReleaseValidation/python/relval_standard.py +++ b/Configuration/PyReleaseValidation/python/relval_standard.py @@ -35,7 +35,7 @@ workflows[1302.18] = ['', ['ProdTTbar_13UP18','DIGIUP18PROD1','RECOPRODUP18','MINIAODMCUP18','NANOPRODUP18']] #workflows[1303.18] = ['', ['ProdQCD_Pt_3000_3500_13UP18','DIGIUP18PROD1','RECOPRODUP18']] workflows[1304.18] = ['', ['ProdZEE_13UP18','DIGIUP18PROD1','RECOPRODUP18','MINIAODMCUP18','NANOPRODUP18']] -workflows[1304.182] = ['', ['ProdZEE_13UP18','DIGIUP18PROD1','RECOPRODUP18bParking','MINIAODMCUP18bParking']] +workflows[1304.182] = ['', ['ProdZEE_13UP18','DIGIUP18PROD1bParking','RECOPRODUP18bParking','MINIAODMCUP18bParking']] #workflows.addOverride(1303.17,overridesEv5) #####Prod2018 with concurrentlumi diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 26eb87ed412ef..d997e6467d93f 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1667,6 +1667,7 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIUP18']=merge([step2Upg2018Defaults]) steps['DIGIUP17PROD1']=merge([{'-s':'DIGI,L1,DIGI2RAW,HLT:@relval2017','--eventcontent':'RAWSIM','--datatier':'GEN-SIM-RAW'},step2Upg2017Defaults]) steps['DIGIUP18PROD1']=merge([{'-s':'DIGI,L1,DIGI2RAW,HLT:@relval2018','--eventcontent':'RAWSIM','--datatier':'GEN-SIM-RAW'},step2Upg2018Defaults]) +steps['DIGIUP18PROD1bParking']=merge([{'-s':'DIGI,L1,DIGI2RAW,HLT:@relval2018','--eventcontent':'RAWSIM','--datatier':'GEN-SIM-RAW','--era' :'Run2_2018,bParking'},step2Upg2018Defaults]) steps['DIGIUP17_PU25']=merge([PU25UP17,step2Upg2017Defaults]) steps['DIGIUP18_PU25']=merge([PU25UP18,step2Upg2018Defaults]) diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index b78263303a661..2e340a3c28217 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -295,11 +295,14 @@ def condition_(self, fragment, stepList, key, hasHarvest): class UpgradeWorkflow_trackingMkFit(UpgradeWorkflowTracking): def setup_(self, step, stepName, stepDict, k, properties): + if 'Digi' in step: stepDict[stepName][k] = merge([self.step2, stepDict[step][k]]) if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) def condition_(self, fragment, stepList, key, hasHarvest): return '2017' in key or '2021' in key upgradeWFs['trackingMkFit'] = UpgradeWorkflow_trackingMkFit( steps = [ + 'Digi', + 'DigiTrigger', 'Reco', 'RecoGlobal', ], @@ -307,6 +310,9 @@ def condition_(self, fragment, stepList, key, hasHarvest): suffix = '_trackingMkFit', offset = 0.7, ) +upgradeWFs['trackingMkFit'].step2 = { + '--customise': 'RecoTracker/MkFit/customizeHLTIter0ToMkFit.customizeHLTIter0ToMkFit' +} upgradeWFs['trackingMkFit'].step3 = { '--procModifiers': 'trackingMkFit' } @@ -545,10 +551,12 @@ def setup_(self, step, stepName, stepDict, k, properties): class UpgradeWorkflow_ProdLike(UpgradeWorkflow): def setup_(self, step, stepName, stepDict, k, properties): - if 'Digi' in step and 'Trigger' not in step: - stepDict[stepName][k] = merge([{'-s': 'DIGI,L1,DIGI2RAW,HLT:@relval2021', '--datatier':'GEN-SIM-DIGI-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]]) + if 'GenSimHLBeamSpot14' in step: + stepDict[stepName][k] = merge([{'--eventcontent': 'RAWSIM', '--datatier': 'GEN-SIM'},stepDict[step][k]]) + elif 'Digi' in step and 'Trigger' not in step: + stepDict[stepName][k] = merge([{'-s': 'DIGI,L1,DIGI2RAW,HLT:@relval2021', '--datatier':'GEN-SIM-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]]) elif 'DigiTrigger' in step: # for Phase-2 - stepDict[stepName][k] = merge([{'-s': 'DIGI,L1TrackTrigger,L1,DIGI2RAW,HLT:@fake2'}, stepDict[step][k]]) + stepDict[stepName][k] = merge([{'-s': 'DIGI,L1TrackTrigger,L1,DIGI2RAW,HLT:@fake2', '--datatier':'GEN-SIM-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]]) elif 'Reco' in step: stepDict[stepName][k] = merge([{'-s': 'RAW2DIGI,L1Reco,RECO,RECOSIM', '--datatier':'AODSIM', '--eventcontent':'AODSIM'}, stepDict[step][k]]) elif 'MiniAOD' in step: @@ -563,6 +571,7 @@ def condition(self, fragment, stepList, key, hasHarvest): return fragment=="TTbar_14TeV" and ('2026' in key or '2021' in key) upgradeWFs['ProdLike'] = UpgradeWorkflow_ProdLike( steps = [ + 'GenSimHLBeamSpot14', 'Digi', 'DigiTrigger', 'Reco', @@ -574,6 +583,7 @@ def condition(self, fragment, stepList, key, hasHarvest): 'Nano', ], PU = [ + 'GenSimHLBeamSpot14', 'Digi', 'DigiTrigger', 'Reco', @@ -783,6 +793,8 @@ def setupPU_(self, step, stepName, stepDict, k, properties): }, stepDict[stepName][k] ]) + if "ProdLike" in self.suffix: + stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]]) # setup for stage 2 elif "Digi" in step or "Reco" in step: # go back to non-PU step version @@ -919,7 +931,9 @@ def setup_(self, step, stepName, stepDict, k, properties): tmpsteps.append("DIGI") else: tmpsteps.append(s) - d = merge([{"-s" : ",".join(tmpsteps)},d]) + d = merge([{"-s" : ",".join(tmpsteps), + "--eventcontent": "PREMIXRAW"}, + d]) stepDict[stepName][k] = d def condition(self, fragment, stepList, key, hasHarvest): # use both conditions diff --git a/Configuration/StandardSequences/python/Digi_cff.py b/Configuration/StandardSequences/python/Digi_cff.py index d36d10f4fba66..b8809714ebbd1 100644 --- a/Configuration/StandardSequences/python/Digi_cff.py +++ b/Configuration/StandardSequences/python/Digi_cff.py @@ -29,6 +29,8 @@ # from SimGeneral.Configuration.SimGeneral_cff import * +from SimTracker.Configuration.SimTrackerLinks_cff import * + # add updating the GEN information by default from Configuration.StandardSequences.Generator_cff import * from GeneratorInterface.Core.generatorSmeared_cfi import * @@ -42,7 +44,7 @@ # premixing stage2 runs addPileupInfo after PreMixingModule (configured in DataMixerPreMix_cff) premix_stage2.toReplaceWith(pdigiTask_nogen, pdigiTask_nogen.copyAndExclude([addPileupInfo])) -pdigiTask = cms.Task(pdigiTask_nogen, fixGenInfoTask) +pdigiTask = cms.Task(pdigiTask_nogen, fixGenInfoTask, tpPruningTask) doAllDigi = cms.Sequence(doAllDigiTask) pdigi = cms.Sequence(pdigiTask) diff --git a/Configuration/StandardSequences/python/RecoSim_cff.py b/Configuration/StandardSequences/python/RecoSim_cff.py index fb4877a7174a9..d107af5c892ca 100644 --- a/Configuration/StandardSequences/python/RecoSim_cff.py +++ b/Configuration/StandardSequences/python/RecoSim_cff.py @@ -1,5 +1,6 @@ import FWCore.ParameterSet.Config as cms from SimMuon.MCTruth.muonSimClassificationByHits_cff import * +from SimTracker.TrackAssociation.trackPrunedMCMatchTask_cff import * -recosim = cms.Task( muonSimClassificationByHitsTask ) +recosim = cms.Task( muonSimClassificationByHitsTask, trackPrunedMCMatchTask ) diff --git a/DPGAnalysis/SiStripTools/interface/DigiCollectionProfiler.h b/DPGAnalysis/SiStripTools/interface/DigiCollectionProfiler.h index 1fb4178cf20b4..bac4482c1a961 100644 --- a/DPGAnalysis/SiStripTools/interface/DigiCollectionProfiler.h +++ b/DPGAnalysis/SiStripTools/interface/DigiCollectionProfiler.h @@ -64,10 +64,11 @@ void DigiCollectionProfiler::fill(edm::Handle digis, const std::vector& hist2d) const {} template <> -void DigiCollectionProfiler >::fill(edm::Handle > digis, - const std::vector& hist, - const std::vector& hprof, - const std::vector& hist2d) const { +inline void DigiCollectionProfiler >::fill( + edm::Handle > digis, + const std::vector& hist, + const std::vector& hprof, + const std::vector& hist2d) const { for (edm::DetSetVector::const_iterator mod = digis->begin(); mod != digis->end(); mod++) { for (unsigned int isel = 0; isel < m_selections.size(); ++isel) { if (m_selections[isel].isSelected(mod->detId())) { @@ -101,7 +102,7 @@ void DigiCollectionProfiler >::fill(edm::Handle -void DigiCollectionProfiler >::fill( +inline void DigiCollectionProfiler >::fill( edm::Handle > digis, const std::vector& hist, const std::vector& hprof, @@ -140,7 +141,7 @@ void DigiCollectionProfiler >::fill( } template <> -void DigiCollectionProfiler >::fill( +inline void DigiCollectionProfiler >::fill( edm::Handle > digis, const std::vector& hist, const std::vector& hprof, diff --git a/DQM/CSCMonitorModule/plugins/CSCDQM_Configuration.h b/DQM/CSCMonitorModule/plugins/CSCDQM_Configuration.h index 3ca1e90af382c..032af1c2d92b9 100644 --- a/DQM/CSCMonitorModule/plugins/CSCDQM_Configuration.h +++ b/DQM/CSCMonitorModule/plugins/CSCDQM_Configuration.h @@ -66,57 +66,63 @@ * Sequence of Global Parameters. Add new line or edit existing in form: * (( type (C++), name (upper case), default value, "description" )) \ */ -#define CONFIG_PARAMETERS_SEQ \ - \ - ((bool, PROCESS_DDU, true, "enter DDU (and latter Chamber) sections (EventProcessor flag)"))( \ - (bool, PROCESS_CSC, true, "enter Chamber section (EventProcessor flag)"))( \ - (bool, PROCESS_EFF_HISTOS, true, "calculate efficiency histograms (Dispatcher flag)"))( \ - (bool, PROCESS_EFF_PARAMETERS, true, "calculate efficiency parameters (EventProcessor flag)"))( \ - (bool, BINCHECKER_CRC_ALCT, false, "check ALCT CRC (CSCDCCExaminer flag)"))( \ - (bool, BINCHECKER_CRC_CLCT, false, "check CLCT CRC (CSCDCCExaminer flag)"))( \ - (bool, BINCHECKER_CRC_CFEB, false, "check CFEB CRC (CSCDCCExaminer flag)"))( \ - (bool, BINCHECKER_MODE_DDU, true, "set DDU mode (CSCDCCExaminer flag)"))( \ - (bool, BINCHECKER_OUTPUT, false, "print 1 and 2 output (CSCDCCExaminer flag)"))( \ - (bool, \ - FRAEFF_AUTO_UPDATE, \ - false, \ - "start fractional and efficiency histogram update automatically (Dispatcher flag)"))( \ - (bool, \ - FRAEFF_SEPARATE_THREAD, \ - false, \ - "start fractional and efficiency histogram update on separate thread (EventProcessor flag)"))( \ - (bool, PRINT_STATS_ON_EXIT, true, "print statistics on exit (destruction)"))( \ - (bool, IN_FULL_STANDBY, true, "full detector is in standby mode from the beginning of the run"))( \ - (std::string, BOOKING_XML_FILE, "", "histogram description (booking) file in XML format (Collection)"))( \ - (std::string, FOLDER_EMU, "", "root file folder name to be used for EMU histograms (EventProcessor)"))( \ - (std::string, FOLDER_DDU, "", "root file folder name to be used for DDU histograms (EventProcessor)"))( \ - (std::string, FOLDER_CSC, "", "root file folder name to be used for CSC histograms (EventProcessor)"))( \ - (std::string, FOLDER_PAR, "", "root file folder name to be used for parameters (EventProcessor)"))(( \ - unsigned int, DDU_CHECK_MASK, 0xFFFFFFFF, "mask for cumulative EmuFileReader DDU error flags (EventProcessor)"))( \ - (unsigned int, DDU_BINCHECK_MASK, 0x02080016, "mask for DDU level examiner errors (CSCDCCExaminer)"))( \ - (unsigned int, BINCHECK_MASK, 0xFFFFFFFF, "mask for chamber level examiner errors (CSCDCCExaminer)"))( \ - (unsigned int, \ - FRAEFF_AUTO_UPDATE_START, \ - 5, \ - "event number to start automatic fractional and efficiency histogram updates from (Dispatcer)"))( \ - (unsigned int, \ - FRAEFF_AUTO_UPDATE_FREQ, \ - 1, \ - "frequency in events to perform automatic fractional and efficiency histogram updates (Dispatcher)"))(( \ - double, EFF_COLD_THRESHOLD, 0.1, "threshold in fraction to check for cold (not reporting) HW (EventProcessor)"))( \ - (double, EFF_COLD_SIGFAIL, 5.0, "statistical significance for cold (not reporting) HW (EventProcessor)"))( \ - (double, EFF_HOT_THRESHOLD, 0.1, "threshold in fraction to check for hot HW (EventProcessor)"))( \ - (double, EFF_HOT_SIGFAIL, 5.0, "statistical significance for hot HW (EventProcessor)"))( \ - (double, EFF_ERR_THRESHOLD, 0.1, "threshold in fraction to check for errors in HW (EventProcessor)"))( \ - (double, EFF_ERR_SIGFAIL, 5.0, "statistical significance for errors in HW (EventProcessor)"))( \ - (double, \ - EFF_NODATA_THRESHOLD, \ - 0.1, \ - "threshold in fraction to check for not reporting elements in HW (EventProcessor)"))( \ - (double, EFF_NODATA_SIGFAIL, 5.0, "statistical significance for not reportingelements in HW (EventProcessor)"))( \ - (unsigned int, EVENTS_ECHO, 1000, "frequency in events to print echo message (EventProcessor)"))( \ - (std::string, FOLDER_FED, "", "root file folder name to be used for FED histograms (EventProcessor)"))( \ - (bool, PREBOOK_ALL_HISTOS, true, "pre-book all FED, DDU, CSC histogragrams before run begins")) +#define CONFIG_PARAMETERS_SEQ \ + \ + ((bool, PROCESS_DDU, true, "enter DDU (and latter Chamber) sections (EventProcessor flag)"))( \ + (bool, PROCESS_CSC, true, "enter Chamber section (EventProcessor flag)"))( \ + (bool, PROCESS_EFF_HISTOS, true, "calculate efficiency histograms (Dispatcher flag)"))(( \ + bool, PROCESS_EFF_PARAMETERS, true, "calculate efficiency parameters (EventProcessor flag)"))(( \ + bool, BINCHECKER_CRC_ALCT, false, "check ALCT CRC (CSCDCCExaminer flag)"))(( \ + bool, BINCHECKER_CRC_CLCT, false, "check CLCT CRC (CSCDCCExaminer flag)"))(( \ + bool, BINCHECKER_CRC_CFEB, false, "check CFEB CRC (CSCDCCExaminer flag)"))(( \ + bool, BINCHECKER_MODE_DDU, true, "set DDU mode (CSCDCCExaminer flag)"))(( \ + bool, BINCHECKER_OUTPUT, false, "print 1 and 2 output (CSCDCCExaminer flag)"))(( \ + bool, \ + FRAEFF_AUTO_UPDATE, \ + false, \ + "start fractional and efficiency histogram update automatically (Dispatcher flag)"))(( \ + bool, \ + FRAEFF_SEPARATE_THREAD, \ + false, \ + "start fractional and efficiency histogram update on separate thread (EventProcessor flag)"))(( \ + bool, PRINT_STATS_ON_EXIT, true, "print statistics on exit (destruction)"))(( \ + bool, IN_FULL_STANDBY, true, "full detector is in standby mode from the beginning of the run"))(( \ + std::string, BOOKING_XML_FILE, "", "histogram description (booking) file in XML format (Collection)"))(( \ + std::string, FOLDER_EMU, "", "root file folder name to be used for EMU histograms (EventProcessor)"))(( \ + std::string, FOLDER_DDU, "", "root file folder name to be used for DDU histograms (EventProcessor)"))(( \ + std::string, FOLDER_CSC, "", "root file folder name to be used for CSC histograms (EventProcessor)"))(( \ + std::string, FOLDER_PAR, "", "root file folder name to be used for parameters (EventProcessor)"))(( \ + unsigned int, \ + DDU_CHECK_MASK, \ + 0xFFFFFFFF, \ + "mask for cumulative EmuFileReader DDU error flags (EventProcessor)"))(( \ + unsigned int, DDU_BINCHECK_MASK, 0x02080016, "mask for DDU level examiner errors (CSCDCCExaminer)"))(( \ + unsigned int, BINCHECK_MASK, 0xFFFFFFFF, "mask for chamber level examiner errors (CSCDCCExaminer)"))(( \ + unsigned int, \ + FRAEFF_AUTO_UPDATE_START, \ + 5, \ + "event number to start automatic fractional and efficiency histogram updates from (Dispatcer)"))(( \ + unsigned int, \ + FRAEFF_AUTO_UPDATE_FREQ, \ + 1, \ + "frequency in events to perform automatic fractional and efficiency histogram updates (Dispatcher)"))(( \ + double, \ + EFF_COLD_THRESHOLD, \ + 0.1, \ + "threshold in fraction to check for cold (not reporting) HW (EventProcessor)"))(( \ + double, EFF_COLD_SIGFAIL, 5.0, "statistical significance for cold (not reporting) HW (EventProcessor)"))(( \ + double, EFF_HOT_THRESHOLD, 0.1, "threshold in fraction to check for hot HW (EventProcessor)"))(( \ + double, EFF_HOT_SIGFAIL, 5.0, "statistical significance for hot HW (EventProcessor)"))(( \ + double, EFF_ERR_THRESHOLD, 0.1, "threshold in fraction to check for errors in HW (EventProcessor)"))(( \ + double, EFF_ERR_SIGFAIL, 5.0, "statistical significance for errors in HW (EventProcessor)"))(( \ + double, \ + EFF_NODATA_THRESHOLD, \ + 0.1, \ + "threshold in fraction to check for not reporting elements in HW (EventProcessor)"))(( \ + double, EFF_NODATA_SIGFAIL, 5.0, "statistical significance for not reportingelements in HW (EventProcessor)"))(( \ + unsigned int, EVENTS_ECHO, 1000, "frequency in events to print echo message (EventProcessor)"))(( \ + std::string, FOLDER_FED, "", "root file folder name to be used for FED histograms (EventProcessor)"))(( \ + bool, PREBOOK_ALL_HISTOS, true, "pre-book all FED, DDU, CSC histogragrams before run begins")) /** * Global Parameter Manipulation macros. @@ -151,7 +157,7 @@ BOOST_PP_CAT(set, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem)) \ (ps.getUntrackedParameter( \ BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem)), \ - BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 2, elem))); + BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 2, elem))); #endif diff --git a/DQM/DTMonitorClient/python/ALCARECODTCalibSynchCosmicsDQMClient_cff.py b/DQM/DTMonitorClient/python/ALCARECODTCalibSynchCosmicsDQMClient_cff.py index afbfdffb8402c..84747d84406b1 100644 --- a/DQM/DTMonitorClient/python/ALCARECODTCalibSynchCosmicsDQMClient_cff.py +++ b/DQM/DTMonitorClient/python/ALCARECODTCalibSynchCosmicsDQMClient_cff.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms from DQM.DTMonitorClient.dtResolutionAnalysisTest_cfi import * -dtResolutionAnalysisTestAlcaCosmics = dtResolutionAnalysisTest.clone() -dtResolutionAnalysisTestAlcaCosmics.topHistoFolder = 'AlCaReco/DtCalibSynchCosmics/01-Calibration' - +dtResolutionAnalysisTestAlcaCosmics = dtResolutionAnalysisTest.clone( + topHistoFolder = 'AlCaReco/DtCalibSynchCosmics/01-Calibration' +) ALCARECODTCalibSynchCosmicsDQMClient = cms.Sequence(dtResolutionAnalysisTestAlcaCosmics) diff --git a/DQM/DTMonitorClient/python/ALCARECODTCalibSynchDQMClient_cff.py b/DQM/DTMonitorClient/python/ALCARECODTCalibSynchDQMClient_cff.py index 9312c14abf986..fe8270c3dc8f9 100644 --- a/DQM/DTMonitorClient/python/ALCARECODTCalibSynchDQMClient_cff.py +++ b/DQM/DTMonitorClient/python/ALCARECODTCalibSynchDQMClient_cff.py @@ -1,8 +1,9 @@ import FWCore.ParameterSet.Config as cms from DQM.DTMonitorClient.dtResolutionAnalysisTest_cfi import * -dtResolutionAnalysisTestAlca = dtResolutionAnalysisTest.clone() -dtResolutionAnalysisTestAlca.topHistoFolder = 'AlCaReco/DtCalibSynch/01-Calibration' +dtResolutionAnalysisTestAlca = dtResolutionAnalysisTest.clone( + topHistoFolder = 'AlCaReco/DtCalibSynch/01-Calibration' +) ALCARECODTCalibSynchDQMClient = cms.Sequence(dtResolutionAnalysisTestAlca) diff --git a/DQM/DTMonitorClient/python/dtBlockedROChannelsTest_cfi.py b/DQM/DTMonitorClient/python/dtBlockedROChannelsTest_cfi.py index a17e5bb5f6c89..0ea14045d748f 100644 --- a/DQM/DTMonitorClient/python/dtBlockedROChannelsTest_cfi.py +++ b/DQM/DTMonitorClient/python/dtBlockedROChannelsTest_cfi.py @@ -1,12 +1,12 @@ import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester -blockedROChannelTest = DQMEDHarvester("DTBlockedROChannelsTest", +blockedROChannelTest = DQMEDHarvester('DTBlockedROChannelsTest', offlineMode = cms.untracked.bool(False), diagnosticPrescale = cms.untracked.int32(1), checkUros = cms.untracked.bool(False) ) from Configuration.Eras.Modifier_run2_DT_2018_cff import run2_DT_2018 -run2_DT_2018.toModify( blockedROChannelTest, checkUros= cms.untracked.bool(True)) +run2_DT_2018.toModify( blockedROChannelTest, checkUros= True) diff --git a/DQM/DTMonitorClient/python/dtCertificationSummary_cfi.py b/DQM/DTMonitorClient/python/dtCertificationSummary_cfi.py index 5c63639ab3695..a1b18cda00be0 100644 --- a/DQM/DTMonitorClient/python/dtCertificationSummary_cfi.py +++ b/DQM/DTMonitorClient/python/dtCertificationSummary_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester -dtCertificationSummary = DQMEDHarvester("DTCertificationSummary") +dtCertificationSummary = DQMEDHarvester('DTCertificationSummary') diff --git a/DQM/DTMonitorClient/python/dtDAQInfo_cfi.py b/DQM/DTMonitorClient/python/dtDAQInfo_cfi.py index f8f64e3b733a6..adde38a0b13a9 100644 --- a/DQM/DTMonitorClient/python/dtDAQInfo_cfi.py +++ b/DQM/DTMonitorClient/python/dtDAQInfo_cfi.py @@ -6,6 +6,6 @@ ) from Configuration.Eras.Modifier_run2_DT_2018_cff import run2_DT_2018 -run2_DT_2018.toModify(dtDAQInfo,checkUros = cms.untracked.bool(True)) +run2_DT_2018.toModify(dtDAQInfo,checkUros = True) diff --git a/DQM/DTMonitorClient/python/dtFineDelayCorr_cfi.py b/DQM/DTMonitorClient/python/dtFineDelayCorr_cfi.py index 45baf2b25b16f..f470a1ddc3489 100644 --- a/DQM/DTMonitorClient/python/dtFineDelayCorr_cfi.py +++ b/DQM/DTMonitorClient/python/dtFineDelayCorr_cfi.py @@ -15,15 +15,15 @@ # Read old delays from file or from Db readOldFromDb = cms.bool(False), # Input file name for old delays - oldDelaysInputFile = cms.string("dtOldFineDelays.txt"), + oldDelaysInputFile = cms.string('dtOldFineDelays.txt'), # Write new delays to file or to Db writeDB = cms.bool(False), # output file name - outputFile = cms.string("dtFineDelaysNew.txt"), + outputFile = cms.string('dtFineDelaysNew.txt'), # Tag for the t0Mean Histograms - t0MeanHistoTag = cms.string("TrackCrossingTimeAll"), + t0MeanHistoTag = cms.string('TrackCrossingTimeAll'), # Hardware Source (TM) - hwSource = cms.string("TM"), + hwSource = cms.string('TM'), # Choose to use Hist Mean or Gaussian Fit Mean gaussMean = cms.bool(False), # Require Minimum Number Of Entries in the t0Mean Histogram diff --git a/DQM/DTMonitorClient/python/dtLocalTriggerSynchTest_cfi.py b/DQM/DTMonitorClient/python/dtLocalTriggerSynchTest_cfi.py index f7545c4926f2b..b1644966ba662 100644 --- a/DQM/DTMonitorClient/python/dtLocalTriggerSynchTest_cfi.py +++ b/DQM/DTMonitorClient/python/dtLocalTriggerSynchTest_cfi.py @@ -22,9 +22,9 @@ dbFromTM = cms.bool(False), fineParamDiff = cms.bool(False), coarseParamDiff = cms.bool(False), - numHistoTag = cms.string("TrackCrossingTimeAllInBX"), - denHistoTag = cms.string("TrackCrossingTimeHHInBX"), - ratioHistoTag = cms.string("TrackCrossingTimeAllOverHHInBX") + numHistoTag = cms.string('TrackCrossingTimeAllInBX'), + denHistoTag = cms.string('TrackCrossingTimeHHInBX'), + ratioHistoTag = cms.string('TrackCrossingTimeAllOverHHInBX') ) diff --git a/DQM/DTMonitorClient/python/dtResolutionAnalysisTest_cfi.py b/DQM/DTMonitorClient/python/dtResolutionAnalysisTest_cfi.py index 2c6f9f804fd6d..60581f31c5b25 100644 --- a/DQM/DTMonitorClient/python/dtResolutionAnalysisTest_cfi.py +++ b/DQM/DTMonitorClient/python/dtResolutionAnalysisTest_cfi.py @@ -8,7 +8,7 @@ maxGoodSigmaValue = cms.untracked.double(0.05), minBadSigmaValue = cms.untracked.double(0.08), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("DT/02-Segments") + topHistoFolder = cms.untracked.string('DT/02-Segments') ) diff --git a/DQM/DTMonitorClient/python/dtResolutionAnalysisTest_hlt_cfi.py b/DQM/DTMonitorClient/python/dtResolutionAnalysisTest_hlt_cfi.py index 266c6b723e657..7ac743e53efc4 100644 --- a/DQM/DTMonitorClient/python/dtResolutionAnalysisTest_hlt_cfi.py +++ b/DQM/DTMonitorClient/python/dtResolutionAnalysisTest_hlt_cfi.py @@ -6,7 +6,7 @@ permittedMeanRange = cms.untracked.double(0.01), permittedSigmaRange = cms.untracked.double(0.08), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("HLT/HLTMonMuon/DT-Segments") + topHistoFolder = cms.untracked.string('HLT/HLTMonMuon/DT-Segments') ) diff --git a/DQM/DTMonitorClient/python/dtResolutionTestFinalCalib_cfi.py b/DQM/DTMonitorClient/python/dtResolutionTestFinalCalib_cfi.py index db8ac4c82015c..d5ac2360d7cf9 100644 --- a/DQM/DTMonitorClient/python/dtResolutionTestFinalCalib_cfi.py +++ b/DQM/DTMonitorClient/python/dtResolutionTestFinalCalib_cfi.py @@ -6,6 +6,6 @@ permittedMeanRange = cms.untracked.double(0.02), permittedSigmaRange = cms.untracked.double(0.12), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("DT/CalibrationSummary"), + topHistoFolder = cms.untracked.string('DT/CalibrationSummary'), doCalibAnalysis = cms.untracked.bool(True) ) diff --git a/DQM/DTMonitorClient/python/dtSegmentAnalysisTest_cfi.py b/DQM/DTMonitorClient/python/dtSegmentAnalysisTest_cfi.py index 0d9630c0890c2..4fce21752a843 100644 --- a/DQM/DTMonitorClient/python/dtSegmentAnalysisTest_cfi.py +++ b/DQM/DTMonitorClient/python/dtSegmentAnalysisTest_cfi.py @@ -12,7 +12,7 @@ chi2Threshold = cms.untracked.double(5.0), normalizeHistoPlots = cms.untracked.bool(False), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("DT/02-Segments"), + topHistoFolder = cms.untracked.string('DT/02-Segments'), # hlt DQM mode hltDQMMode = cms.untracked.bool(False), nEventsCert = cms.untracked.int32(1000), diff --git a/DQM/DTMonitorClient/python/dtSegmentAnalysisTest_hlt_cfi.py b/DQM/DTMonitorClient/python/dtSegmentAnalysisTest_hlt_cfi.py index f3fce77b0fc46..44e9bcc03d72a 100644 --- a/DQM/DTMonitorClient/python/dtSegmentAnalysisTest_hlt_cfi.py +++ b/DQM/DTMonitorClient/python/dtSegmentAnalysisTest_hlt_cfi.py @@ -12,7 +12,7 @@ chi2Threshold = cms.untracked.double(5.0), normalizeHistoPlots = cms.untracked.bool(False), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("HLT/HLTMonMuon/DT-Segments"), + topHistoFolder = cms.untracked.string('HLT/HLTMonMuon/DT-Segments'), # hlt DQM mode hltDQMMode = cms.untracked.bool(True), nEventsCert = cms.untracked.int32(1000) diff --git a/DQM/DTMonitorModule/BuildFile.xml b/DQM/DTMonitorModule/BuildFile.xml index b5690a72e6a47..04f2ff820b0f9 100644 --- a/DQM/DTMonitorModule/BuildFile.xml +++ b/DQM/DTMonitorModule/BuildFile.xml @@ -4,6 +4,7 @@ + diff --git a/DQM/DTMonitorModule/python/ALCARECODTCalibSynchCosmicsDQM_cff.py b/DQM/DTMonitorModule/python/ALCARECODTCalibSynchCosmicsDQM_cff.py index 9dd1cc7513b0b..b99417cd1ab09 100644 --- a/DQM/DTMonitorModule/python/ALCARECODTCalibSynchCosmicsDQM_cff.py +++ b/DQM/DTMonitorModule/python/ALCARECODTCalibSynchCosmicsDQM_cff.py @@ -4,19 +4,22 @@ from DQM.DTMonitorModule.dtResolutionTask_cfi import * from DQM.DTMonitorModule.dtTriggerSynchTask_cfi import * -dtPreCalibrationTaskAlcaCosmics = dtPreCalibTask.clone() -dtPreCalibrationTaskAlcaCosmics.SaveFile = False -dtPreCalibrationTaskAlcaCosmics.folderName = 'AlCaReco/DtCalibSynchCosmics/01-Calibration' - -dtAlcaResolutionMonitorCosmics = dtResolutionAnalysisMonitor.clone() -dtAlcaResolutionMonitorCosmics.topHistoFolder = "AlCaReco/DtCalibSynchCosmics/01-Calibration" - -#dtTriggerSynchMonitorCosmics = dtTriggerSynchMonitor.clone() -#dtTriggerSynchMonitorCosmics.baseDir = 'AlCaReco/DtCalibSynchCosmics/02-Synchronization' -#dtTriggerSynchMonitorCosmics.SEGInputTag = 'dt4DSegments' -#dtTriggerSynchMonitorCosmics.rangeWithinBX = False -#dtTriggerSynchMonitorCosmics.nBXHigh = 3 -#dtTriggerSynchMonitorCosmics.nBXLow = -2 +dtPreCalibrationTaskAlcaCosmics = dtPreCalibTask.clone( + SaveFile = False, + folderName = 'AlCaReco/DtCalibSynchCosmics/01-Calibration' +) + +dtAlcaResolutionMonitorCosmics = dtResolutionAnalysisMonitor.clone( + topHistoFolder = 'AlCaReco/DtCalibSynchCosmics/01-Calibration' +) + +#dtTriggerSynchMonitorCosmics = dtTriggerSynchMonitor.clone( +# baseDir = 'AlCaReco/DtCalibSynchCosmics/02-Synchronization', +# SEGInputTag = 'dt4DSegments', +# rangeWithinBX = False, +# nBXHigh = 3, +# nBXLow = -2 +# ) #from DQM.HLTEvF.HLTMonBitSummary_cfi import hltMonBitSummary from CalibMuon.DTCalibration.ALCARECODtCalibCosmics_cff import ALCARECODtCalibCosmicsHLTFilter diff --git a/DQM/DTMonitorModule/python/ALCARECODTCalibSynchDQM_cff.py b/DQM/DTMonitorModule/python/ALCARECODTCalibSynchDQM_cff.py index 407fc3b689127..8c4a4ab15ce48 100644 --- a/DQM/DTMonitorModule/python/ALCARECODTCalibSynchDQM_cff.py +++ b/DQM/DTMonitorModule/python/ALCARECODTCalibSynchDQM_cff.py @@ -4,12 +4,14 @@ from DQM.DTMonitorModule.dtResolutionTask_cfi import * from DQM.DTMonitorModule.dtTriggerSynchTask_cfi import * -dtPreCalibrationTaskAlca = dtPreCalibTask.clone() -dtPreCalibrationTaskAlca.SaveFile = False -dtPreCalibrationTaskAlca.folderName = 'AlCaReco/DtCalibSynch/01-Calibration' +dtPreCalibrationTaskAlca = dtPreCalibTask.clone( + SaveFile = False, + folderName = 'AlCaReco/DtCalibSynch/01-Calibration' +) -dtAlcaResolutionMonitor = dtResolutionAnalysisMonitor.clone() -dtAlcaResolutionMonitor.topHistoFolder = "AlCaReco/DtCalibSynch/01-Calibration" +dtAlcaResolutionMonitor = dtResolutionAnalysisMonitor.clone( + topHistoFolder = 'AlCaReco/DtCalibSynch/01-Calibration' +) dtTriggerSynchMonitor.baseDir = 'AlCaReco/DtCalibSynch/02-Synchronization' dtTriggerSynchMonitor.SEGInputTag = 'dt4DSegmentsNoWire' diff --git a/DQM/DTMonitorModule/python/ALCARECODTCalibSynchHIDQM_cff.py b/DQM/DTMonitorModule/python/ALCARECODTCalibSynchHIDQM_cff.py index cbd54745ab870..c28112e734ee3 100644 --- a/DQM/DTMonitorModule/python/ALCARECODTCalibSynchHIDQM_cff.py +++ b/DQM/DTMonitorModule/python/ALCARECODTCalibSynchHIDQM_cff.py @@ -4,19 +4,22 @@ from DQM.DTMonitorModule.dtResolutionTask_cfi import * from DQM.DTMonitorModule.dtTriggerSynchTask_cfi import * -dtPreCalibrationTaskAlcaHI = dtPreCalibTask.clone() -dtPreCalibrationTaskAlcaHI.SaveFile = False -dtPreCalibrationTaskAlcaHI.folderName = 'AlCaReco/DtCalibSynchHI/01-Calibration' +dtPreCalibrationTaskAlcaHI = dtPreCalibTask.clone( + SaveFile = False, + folderName = 'AlCaReco/DtCalibSynchHI/01-Calibration' +) -dtAlcaResolutionMonitorHI = dtResolutionAnalysisMonitor.clone() -dtAlcaResolutionMonitorHI.topHistoFolder = "AlCaReco/DtCalibSynchHI/01-Calibration" +dtAlcaResolutionMonitorHI = dtResolutionAnalysisMonitor.clone( + topHistoFolder = 'AlCaReco/DtCalibSynchHI/01-Calibration' +) -dtTriggerSynchMonitorHI = dtTriggerSynchMonitor.clone() -dtTriggerSynchMonitorHI.baseDir = 'AlCaReco/DtCalibSynchHI/02-Synchronization' -dtTriggerSynchMonitorHI.SEGInputTag = 'dt4DSegmentsNoWire' -dtTriggerSynchMonitorHI.rangeWithinBX = False -dtTriggerSynchMonitorHI.nBXHigh = 3 -dtTriggerSynchMonitorHI.nBXLow = -2 +dtTriggerSynchMonitorHI = dtTriggerSynchMonitor.clone( + baseDir = 'AlCaReco/DtCalibSynchHI/02-Synchronization', + SEGInputTag = 'dt4DSegmentsNoWire', + rangeWithinBX = False, + nBXHigh = 3, + nBXLow = -2 +) #from DQM.HLTEvF.HLTMonBitSummary_cfi import hltMonBitSummary from CalibMuon.DTCalibration.ALCARECODtCalibHI_cff import ALCARECODtCalibHIHLTFilter diff --git a/DQM/DTMonitorModule/python/dtChamberEfficiencyHI_cfi.py b/DQM/DTMonitorModule/python/dtChamberEfficiencyHI_cfi.py index b14dd1a05919b..bd59112785127 100644 --- a/DQM/DTMonitorModule/python/dtChamberEfficiencyHI_cfi.py +++ b/DQM/DTMonitorModule/python/dtChamberEfficiencyHI_cfi.py @@ -6,15 +6,15 @@ dtEfficiencyMonitor = DQMEDAnalyzer('DTChamberEfficiency', MuonServiceProxy, debug = cms.untracked.bool(True), - TrackCollection = cms.InputTag("standAloneMuons"), + TrackCollection = cms.InputTag('standAloneMuons'), theMaxChi2 = cms.double(1000.), theNSigma = cms.double(3.), theMinNrec = cms.double(5.), - dt4DSegments = cms.InputTag("dt4DSegments"), - theRPCRecHits = cms.InputTag("dummy"), - thegemRecHits = cms.InputTag("dummy"), - cscSegments = cms.InputTag("dummy"), + dt4DSegments = cms.InputTag('dt4DSegments'), + theRPCRecHits = cms.InputTag('dummy'), + thegemRecHits = cms.InputTag('dummy'), + cscSegments = cms.InputTag('dummy'), RPCLayers = cms.bool(False), - NavigationType = cms.string("Standard") + NavigationType = cms.string('Standard') ) diff --git a/DQM/DTMonitorModule/python/dtChamberEfficiency_Cosmics_cfi.py b/DQM/DTMonitorModule/python/dtChamberEfficiency_Cosmics_cfi.py index 6a7ab519b64b5..1b9cfe9a9da36 100644 --- a/DQM/DTMonitorModule/python/dtChamberEfficiency_Cosmics_cfi.py +++ b/DQM/DTMonitorModule/python/dtChamberEfficiency_Cosmics_cfi.py @@ -6,14 +6,14 @@ dtEfficiencyMonitor = DQMEDAnalyzer('DTChamberEfficiency', MuonServiceProxy, debug = cms.untracked.bool(True), - TrackCollection = cms.InputTag("cosmicMuons"), + TrackCollection = cms.InputTag('cosmicMuons'), theMaxChi2 = cms.double(100.), theNSigma = cms.double(3.), theMinNrec = cms.double(20.), - dt4DSegments = cms.InputTag("dt4DSegments"), - theRPCRecHits = cms.InputTag("dummy"), - cscSegments = cms.InputTag("dummy"), + dt4DSegments = cms.InputTag('dt4DSegments'), + theRPCRecHits = cms.InputTag('dummy'), + cscSegments = cms.InputTag('dummy'), RPCLayers = cms.bool(False), - NavigationType = cms.string("Direct") + NavigationType = cms.string('Direct') ) diff --git a/DQM/DTMonitorModule/python/dtChamberEfficiency_cfi.py b/DQM/DTMonitorModule/python/dtChamberEfficiency_cfi.py index 124189ff6ad6f..29ad350c421f9 100644 --- a/DQM/DTMonitorModule/python/dtChamberEfficiency_cfi.py +++ b/DQM/DTMonitorModule/python/dtChamberEfficiency_cfi.py @@ -10,10 +10,10 @@ theMaxChi2 = cms.double(1000.), theNSigma = cms.double(3.), theMinNrec = cms.double(3.), - dt4DSegments = cms.InputTag("dt4DSegments"), - theRPCRecHits = cms.InputTag("dummy"), - cscSegments = cms.InputTag("dummy"), + dt4DSegments = cms.InputTag('dt4DSegments'), + theRPCRecHits = cms.InputTag('dummy'), + cscSegments = cms.InputTag('dummy'), RPCLayers = cms.bool(False), - NavigationType = cms.string("Standard") + NavigationType = cms.string('Standard') ) diff --git a/DQM/DTMonitorModule/python/dtDataIntegrityTask_EvF_cfi.py b/DQM/DTMonitorModule/python/dtDataIntegrityTask_EvF_cfi.py index eda144c21e8ba..fae5cd5bd173b 100644 --- a/DQM/DTMonitorModule/python/dtDataIntegrityTask_EvF_cfi.py +++ b/DQM/DTMonitorModule/python/dtDataIntegrityTask_EvF_cfi.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms from DQM.DTMonitorModule.dtDataIntegrityTask_cfi import * -dtDataIntegrityTask.processingMode = "HLT" -dtDataIntegrityTask.fedIntegrityFolder = "DT/FEDIntegrity_EvF" +dtDataIntegrityTask.processingMode = 'HLT' +dtDataIntegrityTask.fedIntegrityFolder = 'DT/FEDIntegrity_EvF' diff --git a/DQM/DTMonitorModule/python/dtDataIntegrityTask_cfi.py b/DQM/DTMonitorModule/python/dtDataIntegrityTask_cfi.py index b7ba85d71e2db..a116da4e8c77b 100644 --- a/DQM/DTMonitorModule/python/dtDataIntegrityTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtDataIntegrityTask_cfi.py @@ -2,21 +2,21 @@ from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer dtDataIntegrityTask = DQMEDAnalyzer('DTDataIntegrityTask', - fedIntegrityFolder = cms.untracked.string("DT/FEDIntegrity"), - processingMode = cms.untracked.string("Online"), - dtFEDlabel = cms.InputTag("dtDataIntegrityUnpacker") + fedIntegrityFolder = cms.untracked.string('DT/FEDIntegrity'), + processingMode = cms.untracked.string('Online'), + dtFEDlabel = cms.InputTag('dtDataIntegrityUnpacker') ) dtDataIntegrityTaskOffline = DQMEDAnalyzer('DTDataIntegrityROSOffline', getSCInfo = cms.untracked.bool(True), - fedIntegrityFolder = cms.untracked.string("DT/FEDIntegrity"), - dtDDULabel = cms.InputTag("dtDataIntegrityUnpacker"), - dtROS25Label = cms.InputTag("dtDataIntegrityUnpacker"), + fedIntegrityFolder = cms.untracked.string('DT/FEDIntegrity'), + dtDDULabel = cms.InputTag('dtDataIntegrityUnpacker'), + dtROS25Label = cms.InputTag('dtDataIntegrityUnpacker'), ) dtDataIntegrityUrosOffline = DQMEDAnalyzer('DTDataIntegrityUrosOffline', - fedIntegrityFolder = cms.untracked.string("DT/FEDIntegrity"), - dtFEDlabel = cms.InputTag("dtDataIntegrityUnpacker") + fedIntegrityFolder = cms.untracked.string('DT/FEDIntegrity'), + dtFEDlabel = cms.InputTag('dtDataIntegrityUnpacker') ) from Configuration.Eras.Modifier_run2_DT_2018_cff import run2_DT_2018 diff --git a/DQM/DTMonitorModule/python/dtDigiTask_TP_cfi.py b/DQM/DTMonitorModule/python/dtDigiTask_TP_cfi.py index c0b5db3d08fe3..5fd19458de6d7 100644 --- a/DQM/DTMonitorModule/python/dtDigiTask_TP_cfi.py +++ b/DQM/DTMonitorModule/python/dtDigiTask_TP_cfi.py @@ -11,7 +11,7 @@ # Value of the ttrig pedestal used when not reading from DB defaultTtrig = cms.int32(3450), # the label to retrieve the DT digis - dtDigiLabel = cms.InputTag("dtunpacker"), + dtDigiLabel = cms.InputTag('dtunpacker'), # check the noisy flag in the DB and use it checkNoisyChannels = cms.untracked.bool(True), # set static booking (all the detector) diff --git a/DQM/DTMonitorModule/python/dtDigiTask_cfi.py b/DQM/DTMonitorModule/python/dtDigiTask_cfi.py index cd4f098a34a45..0bc0f551070c1 100644 --- a/DQM/DTMonitorModule/python/dtDigiTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtDigiTask_cfi.py @@ -11,7 +11,7 @@ # Value of the ttrig pedestal used when not reading from DB defaultTtrig = cms.int32(2700), # the label to retrieve the DT digis - dtDigiLabel = cms.InputTag("dtunpacker"), + dtDigiLabel = cms.InputTag('dtunpacker'), # check the noisy flag in the DB and use it checkNoisyChannels = cms.untracked.bool(True), # set static booking (all the detector) diff --git a/DQM/DTMonitorModule/python/dtNoiseTask_cfi.py b/DQM/DTMonitorModule/python/dtNoiseTask_cfi.py index cd6d7d0c0ea90..f51f2b0bc3409 100644 --- a/DQM/DTMonitorModule/python/dtNoiseTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtNoiseTask_cfi.py @@ -4,11 +4,11 @@ from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer dtNoiseMonitor = DQMEDAnalyzer('DTNoiseTask', # the label to retrieve the DT digis - dtDigiLabel = cms.InputTag("dtunpacker"), + dtDigiLabel = cms.InputTag('dtunpacker'), # switch for time box booking doTbHistos = cms.untracked.bool(False), # the name of the 4D rec hits collection - recHits4DLabel = cms.string("dt4DSegments"), + recHits4DLabel = cms.string('dt4DSegments'), # switch for segment veto doSegmentVeto = cms.untracked.bool(False), # safe margin (ns) between ttrig and beginning of counting area diff --git a/DQM/DTMonitorModule/python/dtResolutionTask_cfi.py b/DQM/DTMonitorModule/python/dtResolutionTask_cfi.py index fc6774840cd37..fb2bba585b40b 100644 --- a/DQM/DTMonitorModule/python/dtResolutionTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtResolutionTask_cfi.py @@ -10,7 +10,7 @@ phiHitsCut = cms.untracked.uint32(6), zHitsCut = cms.untracked.uint32(3), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("DT/02-Segments") + topHistoFolder = cms.untracked.string('DT/02-Segments') ) diff --git a/DQM/DTMonitorModule/python/dtResolutionTask_hlt_cfi.py b/DQM/DTMonitorModule/python/dtResolutionTask_hlt_cfi.py index 9192dc5fe8400..8eb689a398302 100644 --- a/DQM/DTMonitorModule/python/dtResolutionTask_hlt_cfi.py +++ b/DQM/DTMonitorModule/python/dtResolutionTask_hlt_cfi.py @@ -7,7 +7,7 @@ # interval of lumi block after which we reset the histos ResetCycle = cms.untracked.int32(10000), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("HLT/HLTMonMuon/DT-Segments") + topHistoFolder = cms.untracked.string('HLT/HLTMonMuon/DT-Segments') ) diff --git a/DQM/DTMonitorModule/python/dtRunConditionVar_cfi.py b/DQM/DTMonitorModule/python/dtRunConditionVar_cfi.py index 0659831078ea9..4f32437642974 100644 --- a/DQM/DTMonitorModule/python/dtRunConditionVar_cfi.py +++ b/DQM/DTMonitorModule/python/dtRunConditionVar_cfi.py @@ -5,6 +5,6 @@ debug = cms.untracked.bool(False), nMinHitsPhi = cms.untracked.int32(5), maxAnglePhiSegm = cms.untracked.double(30.), - recoSegments = cms.InputTag("dt4DSegments"), + recoSegments = cms.InputTag('dt4DSegments'), ) diff --git a/DQM/DTMonitorModule/python/dtSegmentTask_cfi.py b/DQM/DTMonitorModule/python/dtSegmentTask_cfi.py index 072e95d94e1d6..79a3cbdd533fa 100644 --- a/DQM/DTMonitorModule/python/dtSegmentTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtSegmentTask_cfi.py @@ -11,7 +11,7 @@ # switch off uneeded histograms detailedAnalysis = cms.untracked.bool(False), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("DT/02-Segments"), + topHistoFolder = cms.untracked.string('DT/02-Segments'), # hlt DQM mode hltDQMMode = cms.untracked.bool(False), # max phi angle of reconstructed segments diff --git a/DQM/DTMonitorModule/python/dtSegmentTask_hlt_cfi.py b/DQM/DTMonitorModule/python/dtSegmentTask_hlt_cfi.py index 89b5ca6dae4ef..a1317a2b8357c 100644 --- a/DQM/DTMonitorModule/python/dtSegmentTask_hlt_cfi.py +++ b/DQM/DTMonitorModule/python/dtSegmentTask_hlt_cfi.py @@ -17,7 +17,7 @@ # switch on/off sliding bins in time histos slideTimeBins = cms.untracked.bool(True), # top folder for the histograms in DQMStore - topHistoFolder = cms.untracked.string("HLT/HLTMonMuon/DT-Segments"), + topHistoFolder = cms.untracked.string('HLT/HLTMonMuon/DT-Segments'), # hlt DQM mode hltDQMMode = cms.untracked.bool(True) ) diff --git a/DQM/DTMonitorModule/python/dtTriggerEfficiencyTask_cfi.py b/DQM/DTMonitorModule/python/dtTriggerEfficiencyTask_cfi.py index ced67f1d6cbe5..7d2405343d740 100644 --- a/DQM/DTMonitorModule/python/dtTriggerEfficiencyTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtTriggerEfficiencyTask_cfi.py @@ -25,5 +25,5 @@ # Modify for running in run 2 2016 data # from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger -stage2L1Trigger.toModify( dtTriggerEfficiencyMonitor, inputTagTM = cms.untracked.InputTag('twinMuxStage2Digis:PhIn')) +stage2L1Trigger.toModify( dtTriggerEfficiencyMonitor, inputTagTM = 'twinMuxStage2Digis:PhIn') diff --git a/DQM/DTMonitorModule/python/dtTriggerLutTask_cfi.py b/DQM/DTMonitorModule/python/dtTriggerLutTask_cfi.py index b76b3ff857340..d17d6e637358d 100644 --- a/DQM/DTMonitorModule/python/dtTriggerLutTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtTriggerLutTask_cfi.py @@ -3,9 +3,9 @@ from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer dtTriggerLutMonitor = DQMEDAnalyzer('DTLocalTriggerLutTask', # labels of TM data and 4D segments - inputTagTMin = cms.untracked.InputTag("twinMuxStage2Digis:PhIn"), - inputTagTMout = cms.untracked.InputTag("twinMuxStage2Digis:PhOut"), - inputTagSEG = cms.untracked.InputTag("dt4DSegments"), + inputTagTMin = cms.untracked.InputTag('twinMuxStage2Digis:PhIn'), + inputTagTMout = cms.untracked.InputTag('twinMuxStage2Digis:PhOut'), + inputTagSEG = cms.untracked.InputTag('dt4DSegments'), # set static booking (all the detector) staticBooking = cms.untracked.bool(True), # set outflows to boudaries @@ -13,7 +13,7 @@ # enable more detailed studies detailedAnalysis = cms.untracked.bool(False), # label of the geometry used to feed DTTrigGeomUtils - geomLabel = cms.untracked.string("idealForDigi"), + geomLabel = cms.untracked.string('idealForDigi'), # number of luminosity blocks to reset the histos ResetCycle = cms.untracked.int32(9999) ) diff --git a/DQM/DTMonitorModule/python/dtTriggerSynchTask_cfi.py b/DQM/DTMonitorModule/python/dtTriggerSynchTask_cfi.py index 383c8ae2a8375..31732f999d129 100644 --- a/DQM/DTMonitorModule/python/dtTriggerSynchTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtTriggerSynchTask_cfi.py @@ -12,7 +12,7 @@ nBXLow = cms.int32(1), angleRange = cms.double(30.), minHitsPhi = cms.int32(7), - baseDir = cms.string("DT/90-LocalTriggerSynch/"), + baseDir = cms.string('DT/90-LocalTriggerSynch/'), tTrigModeConfig = cms.PSet( vPropWire = cms.double(24.4), doTOFCorrection = cms.bool(False), diff --git a/DQM/DTMonitorModule/python/dtTriggerTask_cfi.py b/DQM/DTMonitorModule/python/dtTriggerTask_cfi.py index 721128cfd0a73..b967b14ec744c 100644 --- a/DQM/DTMonitorModule/python/dtTriggerTask_cfi.py +++ b/DQM/DTMonitorModule/python/dtTriggerTask_cfi.py @@ -6,7 +6,7 @@ staticBooking = cms.untracked.bool(True), # labels of TM data and 4D segments tm_label = cms.untracked.InputTag('twinMuxStage2Digis:PhIn'), - tmTh_label = cms.untracked.InputTag("twinMuxStage2Digis","ThIn"), + tmTh_label = cms.untracked.InputTag('twinMuxStage2Digis','ThIn'), ros_label = cms.untracked.InputTag('dtunpacker'), seg_label = cms.untracked.InputTag('dt4DSegments'), maxBXTM = cms.untracked.int32(2), # max BX for TM plots diff --git a/DQM/DTMonitorModule/python/dt_dqm_sourceclient_common_cff.py b/DQM/DTMonitorModule/python/dt_dqm_sourceclient_common_cff.py index 3f668580e9853..f7bd300f301be 100644 --- a/DQM/DTMonitorModule/python/dt_dqm_sourceclient_common_cff.py +++ b/DQM/DTMonitorModule/python/dt_dqm_sourceclient_common_cff.py @@ -16,8 +16,9 @@ # GT unpacker import EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi -gtDigis = EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi.l1GtUnpack.clone() -gtDigis.DaqGtInputTag = 'rawDataCollector' +gtDigis = EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi.l1GtUnpack.clone( + DaqGtInputTag = 'rawDataCollector' +) # Scalers info from EventFilter.ScalersRawToDigi.ScalersRawToDigi_cfi import * @@ -63,7 +64,7 @@ from DQM.DTMonitorModule.dtTriggerLutTask_cfi import * from DQM.DTMonitorClient.dtLocalTriggerTest_cfi import * from DQM.DTMonitorClient.dtTriggerLutTest_cfi import * -triggerTest.hwSources = cms.untracked.vstring('TM') +triggerTest.hwSources = ['TM'] # scaler task from DQM.DTMonitorModule.dtScalerInfoTask_cfi import * @@ -103,7 +104,7 @@ # Local Trigger task for test pulses from DQM.DTMonitorModule.dtTriggerTask_TP_cfi import * from DQM.DTMonitorClient.dtLocalTriggerTest_TP_cfi import * -dtTPTriggerTest.hwSources = cms.untracked.vstring('TM') +dtTPTriggerTest.hwSources = ['TM'] unpackers = cms.Sequence(dtunpacker + twinMuxStage2Digis + scalersRawToDigi) diff --git a/DQM/DTMonitorModule/python/slice_test_customizations_cff.py b/DQM/DTMonitorModule/python/slice_test_customizations_cff.py index 61152d2d71d69..2c2825a265f30 100644 --- a/DQM/DTMonitorModule/python/slice_test_customizations_cff.py +++ b/DQM/DTMonitorModule/python/slice_test_customizations_cff.py @@ -30,11 +30,11 @@ def customise_for_slice_test(process, enableDigis, enableTPs): if enableDigis: from DQM.DTMonitorModule.dtDigiTask_cfi import dtDigiMonitor - process.dtAB7DigiMonitor = dtDigiMonitor.clone() - - process.dtAB7DigiMonitor.dtDigiLabel = cms.InputTag("dtAB7Unpacker") - process.dtAB7DigiMonitor.sliceTestMode = True - process.dtAB7DigiMonitor.maxTDCHitsPerChamber = 5000 + process.dtAB7DigiMonitor = dtDigiMonitor.clone( + dtDigiLabel = "dtAB7Unpacker", + sliceTestMode = True, + maxTDCHitsPerChamber = 5000 + ) process.dtAB7DigiMonitor.performPerWireT0Calibration = False diff --git a/DQM/DTMonitorModule/test/DTkFactValidation_2_ResidCorr_TEMPL_cfg.py b/DQM/DTMonitorModule/test/DTkFactValidation_2_ResidCorr_TEMPL_cfg.py index 59ca1cbabaf7b..a78c36fddbb28 100644 --- a/DQM/DTMonitorModule/test/DTkFactValidation_2_ResidCorr_TEMPL_cfg.py +++ b/DQM/DTMonitorModule/test/DTkFactValidation_2_ResidCorr_TEMPL_cfg.py @@ -50,32 +50,35 @@ ) #process.load("DQM.DTMonitorClient.dtResolutionTest_cfi") -#process.modulo1=process.resolutionTest.clone() -#process.modulo1.histoTag2D = 'hResDistVsDist_STEP1' -#process.modulo1.histoTag = 'hResDist_STEP1' -#process.modulo1.STEP = 'STEP1' -#process.modulo1.OutputMEsInRootFile = cms.bool(False) -#process.modulo1.readFile = cms.untracked.bool(True) -#process.modulo1.inputFile = cms.untracked.string('/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_ResidCorr_RUNNUMBERTEMPLATE.root') +#process.modulo1=process.resolutionTest.clone( +# histoTag2D = 'hResDistVsDist_STEP1', +# histoTag = 'hResDist_STEP1', +# STEP = 'STEP1', +# OutputMEsInRootFile = False, +# readFile = True, +# inputFile = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_ResidCorr_RUNNUMBERTEMPLATE.root' +# ) #process.load("DQM.DTMonitorClient.dtResolutionTest_cfi") -#process.modulo2=process.resolutionTest.clone() -#process.modulo2.histoTag2D = 'hResDistVsDist_STEP2' -#process.modulo2.histoTag = 'hResDist_STEP2' -#process.modulo2.STEP = 'STEP2' -#process.modulo2.OutputMEsInRootFile = cms.bool(False) -#process.modulo2.readFile = cms.untracked.bool(True) -#process.modulo2.inputFile = cms.untracked.string('/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_ResidCorr_RUNNUMBERTEMPLATE.root') +#process.modulo2=process.resolutionTest.clone( +# histoTag2D = 'hResDistVsDist_STEP2', +# histoTag = 'hResDist_STEP2', +# STEP = 'STEP2', +# OutputMEsInRootFile = False, +# readFile = True, +# inputFile = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_ResidCorr_RUNNUMBERTEMPLATE.root' +# ) process.load("DQM.DTMonitorClient.dtResolutionTest_cfi") -process.modulo=process.resolutionTest.clone() -process.modulo.histoTag2D = 'hResDistVsDist_STEP3' -process.modulo.histoTag = 'hResDist_STEP3' -process.modulo.STEP = 'STEP3' -process.modulo.OutputMEsInRootFile = cms.bool(True) -process.modulo.readFile = cms.untracked.bool(True) -process.modulo.inputFile = cms.untracked.string('/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_ResidCorr_RUNNUMBERTEMPLATE.root') -process.modulo.OutputFileName = cms.string('/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/SummaryResiduals_ResidCorr_RUNNUMBERTEMPLATE.root') +process.modulo=process.resolutionTest.clone( + histoTag2D = 'hResDistVsDist_STEP3', + histoTag = 'hResDist_STEP3', + STEP = 'STEP3', + OutputMEsInRootFile = True, + readFile = True, + inputFile = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_ResidCorr_RUNNUMBERTEMPLATE.root', + OutputFileName = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/SummaryResiduals_ResidCorr_RUNNUMBERTEMPLATE.root' +) process.secondStep = cms.Sequence(process.modulo*process.qTester) process.p = cms.Path(process.secondStep) diff --git a/DQM/DTMonitorModule/test/DTkFactValidation_2_TEMPL_cfg.py b/DQM/DTMonitorModule/test/DTkFactValidation_2_TEMPL_cfg.py index cfba552b6915b..04c672fdf5336 100644 --- a/DQM/DTMonitorModule/test/DTkFactValidation_2_TEMPL_cfg.py +++ b/DQM/DTMonitorModule/test/DTkFactValidation_2_TEMPL_cfg.py @@ -50,32 +50,35 @@ ) #process.load("DQM.DTMonitorClient.dtResolutionTest_cfi") -#process.modulo1=process.resolutionTest.clone() -#process.modulo1.histoTag2D = 'hResDistVsDist_STEP1' -# process.modulo1.histoTag = 'hResDist_STEP1' -# process.modulo1.STEP = 'STEP1' -# process.modulo1.OutputMEsInRootFile = cms.bool(False) -# process.modulo1.readFile = cms.untracked.bool(True) -# process.modulo1.inputFile = cms.untracked.string('/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_RUNNUMBERTEMPLATE.root') +#process.modulo1=process.resolutionTest.clone( +# histoTag2D = 'hResDistVsDist_STEP1', +# histoTag = 'hResDist_STEP1', +# STEP = 'STEP1', +# OutputMEsInRootFile = False, +# readFile = True, +# inputFile = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_RUNNUMBERTEMPLATE.root' +# ) # process.load("DQM.DTMonitorClient.dtResolutionTest_cfi") -# process.modulo2=process.resolutionTest.clone() -# process.modulo2.histoTag2D = 'hResDistVsDist_STEP2' -# process.modulo2.histoTag = 'hResDist_STEP2' -# process.modulo2.STEP = 'STEP2' -# process.modulo2.OutputMEsInRootFile = cms.bool(False) -# process.modulo2.readFile = cms.untracked.bool(True) -# process.modulo2.inputFile = cms.untracked.string('/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_RUNNUMBERTEMPLATE.root') +# process.modulo2=process.resolutionTest.clone( +# histoTag2D = 'hResDistVsDist_STEP2', +# histoTag = 'hResDist_STEP2', +# STEP = 'STEP2', +# OutputMEsInRootFile = False, +# readFile = True, +# inputFile = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_RUNNUMBERTEMPLATE.root' +# ) process.load("DQM.DTMonitorClient.dtResolutionTest_cfi") -process.modulo=process.resolutionTest.clone() -process.modulo.histoTag2D = 'hResDistVsDist_STEP3' -process.modulo.histoTag = 'hResDist_STEP3' -process.modulo.STEP = 'STEP3' -process.modulo.OutputMEsInRootFile = cms.bool(True) -process.modulo.readFile = cms.untracked.bool(True) -process.modulo.inputFile = cms.untracked.string('/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_RUNNUMBERTEMPLATE.root') -process.modulo.OutputFileName = cms.string('/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/SummaryResiduals_RUNNUMBERTEMPLATE.root') +process.modulo=process.resolutionTest.clone( + histoTag2D = 'hResDistVsDist_STEP3', + histoTag = 'hResDist_STEP3', + STEP = 'STEP3', + OutputMEsInRootFile = True, + readFile = True, + inputFile = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/DTkFactValidation_RUNNUMBERTEMPLATE.root', + OutputFileName = '/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONCALIB/DTCALIB/RUNPERIODTEMPLATE/ttrig/SummaryResiduals_RUNNUMBERTEMPLATE.root' +) process.secondStep = cms.Sequence(process.modulo*process.qTester) process.p = cms.Path(process.secondStep) diff --git a/DQM/DTMonitorModule/test/dt_fedtest_sourceclient-file_cfg.py b/DQM/DTMonitorModule/test/dt_fedtest_sourceclient-file_cfg.py index f9734341b238b..7242d88ee5bb1 100644 --- a/DQM/DTMonitorModule/test/dt_fedtest_sourceclient-file_cfg.py +++ b/DQM/DTMonitorModule/test/dt_fedtest_sourceclient-file_cfg.py @@ -46,11 +46,11 @@ process.load("DQM.DTMonitorModule.dtDataIntegrityTask_EvF_cfi") process.load("EventFilter.DTRawToDigi.dtunpacker_cfi") -process.dtunpacker = process.muonDTDigis.clone() # enable DQM monitoring in unpacker -process.dtunpacker.performDataIntegrityMonitor = cms.untracked.bool(True) -process.dtunpacker.readOutParameters.performDataIntegrityMonitor = cms.untracked.bool(True) - +process.dtunpacker = process.muonDTDigis.clone( + performDataIntegrityMonitor = True, + readOutParameters.performDataIntegrityMonitor = True +) # DQM Modules process.dqmmodules = cms.Sequence(process.dqmEnv + process.dqmSaver) diff --git a/DQM/L1TMonitor/interface/L1TdeCSCTPG.h b/DQM/L1TMonitor/interface/L1TdeCSCTPG.h index 739b4c251ff95..c2aa69e51c593 100644 --- a/DQM/L1TMonitor/interface/L1TdeCSCTPG.h +++ b/DQM/L1TMonitor/interface/L1TdeCSCTPG.h @@ -22,6 +22,14 @@ class L1TdeCSCTPG : public DQMEDAnalyzer { void analyze(const edm::Event&, const edm::EventSetup&) override; private: + // CLCTs and LCTs are considered duplicates if there is an earlier copy + bool isDuplicateCLCT(const CSCCLCTDigi& clct, const std::vector& container) const; + bool isDuplicateLCT(const CSCCorrelatedLCTDigi& lct, const std::vector& container) const; + + // all properties are the same, except for the BX which is off by +1 + bool isCLCTOffByOneBX(const CSCCLCTDigi& lhs, const CSCCLCTDigi& rhs) const; + bool isLCTOffByOneBX(const CSCCorrelatedLCTDigi& lhs, const CSCCorrelatedLCTDigi& rhs) const; + edm::EDGetTokenT dataALCT_token_; edm::EDGetTokenT emulALCT_token_; edm::EDGetTokenT dataCLCT_token_; diff --git a/DQM/L1TMonitor/src/L1TdeCSCTPG.cc b/DQM/L1TMonitor/src/L1TdeCSCTPG.cc index 918e2aba1082a..ebdf6e688cdba 100644 --- a/DQM/L1TMonitor/src/L1TdeCSCTPG.cc +++ b/DQM/L1TMonitor/src/L1TdeCSCTPG.cc @@ -169,21 +169,31 @@ void L1TdeCSCTPG::analyze(const edm::Event& e, const edm::EventSetup& c) { // ignore non-ME1/1 chambers when using B904 test-stand data if (B904Setup_ and !((*it).first).isME11()) continue; + + // remove the duplicate CLCTs + // these are CLCTs that have the same properties as CLCTs found + // before by the emulator, except for the BX, which is off by +1 + std::vector cleanedemul; for (auto clct = range.first; clct != range.second; clct++) { - if (clct->isValid()) { - chamberHistos[type]["clct_pattern_emul"]->Fill(clct->getPattern()); - chamberHistos[type]["clct_quality_emul"]->Fill(clct->getQuality()); - chamberHistos[type]["clct_halfstrip_emul"]->Fill(clct->getKeyStrip()); - chamberHistos[type]["clct_bend_emul"]->Fill(clct->getBend()); + if (not isDuplicateCLCT(*clct, cleanedemul)) + cleanedemul.push_back(*clct); + } + + for (const auto& clct : cleanedemul) { + if (clct.isValid()) { + chamberHistos[type]["clct_pattern_emul"]->Fill(clct.getPattern()); + chamberHistos[type]["clct_quality_emul"]->Fill(clct.getQuality()); + chamberHistos[type]["clct_halfstrip_emul"]->Fill(clct.getKeyStrip()); + chamberHistos[type]["clct_bend_emul"]->Fill(clct.getBend()); if (isRun3_) { - chamberHistos[type]["clct_run3pattern_emul"]->Fill(clct->getRun3Pattern()); - chamberHistos[type]["clct_quartstrip_emul"]->Fill(clct->getKeyStrip(4)); - chamberHistos[type]["clct_eighthstrip_emul"]->Fill(clct->getKeyStrip(8)); - chamberHistos[type]["clct_slope_emul"]->Fill(clct->getSlope()); - chamberHistos[type]["clct_compcode_emul"]->Fill(clct->getCompCode()); + chamberHistos[type]["clct_run3pattern_emul"]->Fill(clct.getRun3Pattern()); + chamberHistos[type]["clct_quartstrip_emul"]->Fill(clct.getKeyStrip(4)); + chamberHistos[type]["clct_eighthstrip_emul"]->Fill(clct.getKeyStrip(8)); + chamberHistos[type]["clct_slope_emul"]->Fill(clct.getSlope()); + chamberHistos[type]["clct_compcode_emul"]->Fill(clct.getCompCode()); if (B904Setup_) { - chamberHistos[type]["clct_quartstripbit_emul"]->Fill(clct->getQuartStripBit()); - chamberHistos[type]["clct_eighthstripbit_emul"]->Fill(clct->getEighthStripBit()); + chamberHistos[type]["clct_quartstripbit_emul"]->Fill(clct.getQuartStripBit()); + chamberHistos[type]["clct_eighthstripbit_emul"]->Fill(clct.getEighthStripBit()); } } } @@ -223,24 +233,86 @@ void L1TdeCSCTPG::analyze(const edm::Event& e, const edm::EventSetup& c) { // ignore non-ME1/1 chambers when using B904 test-stand data if (B904Setup_ and !((*it).first).isME11()) continue; + + // remove the duplicate LCTs + // these are LCTs that have the same properties as LCTs found + // before by the emulator, except for the BX, which is off by +1 + std::vector cleanedemul; for (auto lct = range.first; lct != range.second; lct++) { - if (lct->isValid()) { - chamberHistos[type]["lct_pattern_emul"]->Fill(lct->getPattern()); - chamberHistos[type]["lct_quality_emul"]->Fill(lct->getQuality()); - chamberHistos[type]["lct_wiregroup_emul"]->Fill(lct->getKeyWG()); - chamberHistos[type]["lct_halfstrip_emul"]->Fill(lct->getStrip()); - chamberHistos[type]["lct_bend_emul"]->Fill(lct->getBend()); + if (not isDuplicateLCT(*lct, cleanedemul)) + cleanedemul.push_back(*lct); + } + + for (const auto& lct : cleanedemul) { + if (lct.isValid()) { + chamberHistos[type]["lct_pattern_emul"]->Fill(lct.getPattern()); + chamberHistos[type]["lct_quality_emul"]->Fill(lct.getQuality()); + chamberHistos[type]["lct_wiregroup_emul"]->Fill(lct.getKeyWG()); + chamberHistos[type]["lct_halfstrip_emul"]->Fill(lct.getStrip()); + chamberHistos[type]["lct_bend_emul"]->Fill(lct.getBend()); if (isRun3_) { - chamberHistos[type]["lct_run3pattern_emul"]->Fill(lct->getRun3Pattern()); - chamberHistos[type]["lct_slope_emul"]->Fill(lct->getSlope()); - chamberHistos[type]["lct_quartstrip_emul"]->Fill(lct->getStrip(4)); - chamberHistos[type]["lct_eighthstrip_emul"]->Fill(lct->getStrip(8)); + chamberHistos[type]["lct_run3pattern_emul"]->Fill(lct.getRun3Pattern()); + chamberHistos[type]["lct_slope_emul"]->Fill(lct.getSlope()); + chamberHistos[type]["lct_quartstrip_emul"]->Fill(lct.getStrip(4)); + chamberHistos[type]["lct_eighthstrip_emul"]->Fill(lct.getStrip(8)); if (B904Setup_) { - chamberHistos[type]["lct_quartstripbit_emul"]->Fill(lct->getQuartStripBit()); - chamberHistos[type]["lct_eighthstripbit_emul"]->Fill(lct->getEighthStripBit()); + chamberHistos[type]["lct_quartstripbit_emul"]->Fill(lct.getQuartStripBit()); + chamberHistos[type]["lct_eighthstripbit_emul"]->Fill(lct.getEighthStripBit()); } } } } } } + +bool L1TdeCSCTPG::isDuplicateCLCT(const CSCCLCTDigi& clct, const std::vector& container) const { + // if the temporary container is empty, the TP cannot be a duplicate + if (container.empty()) + return false; + else { + for (const auto& rhs : container) { + if (isCLCTOffByOneBX(clct, rhs)) + return true; + } + return false; + } +} + +bool L1TdeCSCTPG::isDuplicateLCT(const CSCCorrelatedLCTDigi& lct, + const std::vector& container) const { + // if the temporary container is empty, the TP cannot be a duplicate + if (container.empty()) + return false; + else { + for (const auto& rhs : container) { + if (isLCTOffByOneBX(lct, rhs)) + return true; + } + return false; + } +} + +bool L1TdeCSCTPG::isCLCTOffByOneBX(const CSCCLCTDigi& lhs, const CSCCLCTDigi& rhs) const { + // because the comparator code is degenerate (several comparator codes can produce the + // same slope and position), we leave it out of the comparison + bool returnValue = false; + if (lhs.isValid() == rhs.isValid() && lhs.getQuality() == rhs.getQuality() && lhs.getPattern() == rhs.getPattern() && + lhs.getRun3Pattern() == rhs.getRun3Pattern() && lhs.getKeyStrip() == rhs.getKeyStrip() && + lhs.getStripType() == rhs.getStripType() && lhs.getBend() == rhs.getBend() && lhs.getBX() == rhs.getBX() + 1 && + lhs.getQuartStripBit() == rhs.getQuartStripBit() && lhs.getEighthStripBit() == rhs.getEighthStripBit()) { + returnValue = true; + } + return returnValue; +} + +bool L1TdeCSCTPG::isLCTOffByOneBX(const CSCCorrelatedLCTDigi& lhs, const CSCCorrelatedLCTDigi& rhs) const { + bool returnValue = false; + if (lhs.isValid() == rhs.isValid() && lhs.getQuality() == rhs.getQuality() && lhs.getPattern() == rhs.getPattern() && + lhs.getRun3Pattern() == rhs.getRun3Pattern() && lhs.getStrip() == rhs.getStrip() && + lhs.getStripType() == rhs.getStripType() && lhs.getBend() == rhs.getBend() && lhs.getBX() == rhs.getBX() + 1 && + lhs.getQuartStripBit() == rhs.getQuartStripBit() && lhs.getEighthStripBit() == rhs.getEighthStripBit() && + lhs.getKeyWG() == rhs.getKeyWG()) { + returnValue = true; + } + return returnValue; +} diff --git a/DQM/SiPixelPhase1Common/interface/SiPixelPhase1Base.h b/DQM/SiPixelPhase1Common/interface/SiPixelPhase1Base.h index a0af481260e81..085d3dcd40235 100644 --- a/DQM/SiPixelPhase1Common/interface/SiPixelPhase1Base.h +++ b/DQM/SiPixelPhase1Common/interface/SiPixelPhase1Base.h @@ -31,7 +31,7 @@ class HistogramManagerHolder { edm::Transition transition = edm::Transition::BeginRun) : geometryInterface(iConfig.getParameter("geometry"), std::move(iC), transition) { auto histograms = iConfig.getParameter("histograms"); - for (auto histoconf : histograms) { + for (const auto& histoconf : histograms) { histo.emplace_back(HistogramManager(histoconf, geometryInterface)); } }; diff --git a/DQM/SiStripMonitorClient/plugins/SiStripOfflineDQM.cc b/DQM/SiStripMonitorClient/plugins/SiStripOfflineDQM.cc index 325ecbf97a6e7..e3b51fcba6dfa 100644 --- a/DQM/SiStripMonitorClient/plugins/SiStripOfflineDQM.cc +++ b/DQM/SiStripMonitorClient/plugins/SiStripOfflineDQM.cc @@ -82,9 +82,7 @@ SiStripOfflineDQM::SiStripOfflineDQM(edm::ParameterSet const& pSet) } if (createTkInfoFile_) { - tkinfoTree_ = edm::Service {} - ->make("TkDetIdInfo", ""); - } + tkinfoTree_ = edm::Service { } -> make("TkDetIdInfo", ""); } // explicit dependency to make sure the QTest reults needed here are present // already in endRun. diff --git a/DQM/SiStripMonitorClient/scripts/InefficientDoubleROC.py b/DQM/SiStripMonitorClient/scripts/InefficientDoubleROC.py index c416e066cabc9..ec3d3a8470a08 100755 --- a/DQM/SiStripMonitorClient/scripts/InefficientDoubleROC.py +++ b/DQM/SiStripMonitorClient/scripts/InefficientDoubleROC.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys diff --git a/DQM/SiStripMonitorSummary/plugins/SiStripCorrelateBadStripAndNoise.h b/DQM/SiStripMonitorSummary/plugins/SiStripCorrelateBadStripAndNoise.h index 6fc5b41045035..01276eca321c0 100644 --- a/DQM/SiStripMonitorSummary/plugins/SiStripCorrelateBadStripAndNoise.h +++ b/DQM/SiStripMonitorSummary/plugins/SiStripCorrelateBadStripAndNoise.h @@ -45,6 +45,7 @@ // class TrackerTopology; class TrackerGeometry; +class SiStripDetInfoFileReader; class SiStripCorrelateBadStripAndNoise : public edm::EDAnalyzer { public: explicit SiStripCorrelateBadStripAndNoise(const edm::ParameterSet &); diff --git a/DQM/SiTrackerPhase2/interface/TrackerPhase2HarvestingUtil.h b/DQM/SiTrackerPhase2/interface/TrackerPhase2HarvestingUtil.h new file mode 100644 index 0000000000000..41f7fee23d634 --- /dev/null +++ b/DQM/SiTrackerPhase2/interface/TrackerPhase2HarvestingUtil.h @@ -0,0 +1,20 @@ +#ifndef _DQM_SiTrackerPhase2_Phase2TrackerHarvestingUtil_h +#define _DQM_SiTrackerPhase2_Phase2TrackerHarvestingUtil_h +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "DQMServices/Core/interface/MonitorElement.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include + +namespace phase2tkharvestutil { + + typedef dqm::harvesting::MonitorElement MonitorElement; + typedef dqm::harvesting::DQMStore DQMStore; + + MonitorElement* book1DFromPSet(const edm::ParameterSet& hpars, DQMStore::IBooker& ibooker); + + MonitorElement* book2DFromPSet(const edm::ParameterSet& hpars, DQMStore::IBooker& ibooker); + + MonitorElement* bookProfile1DFromPSet(const edm::ParameterSet& hpars, DQMStore::IBooker& ibooker); +} // namespace phase2tkharvestutil +#endif diff --git a/DQM/SiTrackerPhase2/src/TrackerPhase2HarvestingUtil.cc b/DQM/SiTrackerPhase2/src/TrackerPhase2HarvestingUtil.cc new file mode 100644 index 0000000000000..0b4324bbae899 --- /dev/null +++ b/DQM/SiTrackerPhase2/src/TrackerPhase2HarvestingUtil.cc @@ -0,0 +1,43 @@ +#include "DQM/SiTrackerPhase2/interface/TrackerPhase2HarvestingUtil.h" +typedef dqm::harvesting::MonitorElement MonitorElement; +typedef dqm::harvesting::DQMStore DQMStore; +MonitorElement* phase2tkharvestutil::book1DFromPSet(const edm::ParameterSet& hpars, DQMStore::IBooker& ibooker) { + MonitorElement* temp = nullptr; + if (hpars.getParameter("switch")) { + temp = ibooker.book1D(hpars.getParameter("name"), + hpars.getParameter("title"), + hpars.getParameter("NxBins"), + hpars.getParameter("xmin"), + hpars.getParameter("xmax")); + } + return temp; +} + +MonitorElement* phase2tkharvestutil::book2DFromPSet(const edm::ParameterSet& hpars, DQMStore::IBooker& ibooker) { + MonitorElement* temp = nullptr; + if (hpars.getParameter("switch")) { + temp = ibooker.book2D(hpars.getParameter("name"), + hpars.getParameter("title"), + hpars.getParameter("NxBins"), + hpars.getParameter("xmin"), + hpars.getParameter("xmax"), + hpars.getParameter("NyBins"), + hpars.getParameter("ymin"), + hpars.getParameter("ymax")); + } + return temp; +} + +MonitorElement* phase2tkharvestutil::bookProfile1DFromPSet(const edm::ParameterSet& hpars, DQMStore::IBooker& ibooker) { + MonitorElement* temp = nullptr; + if (hpars.getParameter("switch")) { + temp = ibooker.bookProfile(hpars.getParameter("name"), + hpars.getParameter("title"), + hpars.getParameter("NxBins"), + hpars.getParameter("xmin"), + hpars.getParameter("xmax"), + hpars.getParameter("ymin"), + hpars.getParameter("ymax")); + } + return temp; +} diff --git a/DQM/SiTrackerPhase2/test/harvestingstep_phase2tk_cfg.py b/DQM/SiTrackerPhase2/test/harvestingstep_phase2tk_cfg.py index a37c1a480cd0b..9b088c9e395c6 100644 --- a/DQM/SiTrackerPhase2/test/harvestingstep_phase2tk_cfg.py +++ b/DQM/SiTrackerPhase2/test/harvestingstep_phase2tk_cfg.py @@ -76,7 +76,9 @@ process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '') # Path and EndPath definitions -process.trackerphase2ValidationHarvesting_step = cms.Path(process.trackerphase2ValidationHarvesting) +process.trackerphase2ValidationHarvesting_step = cms.Path(process.trackerphase2ValidationHarvesting_standalone +##default path in production +#process.trackerphase2ValidationHarvesting_step = cms.Path(process.trackerphase2ValidationHarvesting) process.dqmsave_step = cms.Path(process.DQMSaver) # Schedule definition diff --git a/DQM/TrackerRemapper/BuildFile.xml b/DQM/TrackerRemapper/BuildFile.xml index 113b1ffd7e07a..d071a57809cd2 100644 --- a/DQM/TrackerRemapper/BuildFile.xml +++ b/DQM/TrackerRemapper/BuildFile.xml @@ -5,7 +5,7 @@ - + diff --git a/DQM/TrackerRemapper/interface/Phase1PixelROCMaps.h b/DQM/TrackerRemapper/interface/Phase1PixelROCMaps.h index e4b97c1f73a33..c985b3f20aa73 100644 --- a/DQM/TrackerRemapper/interface/Phase1PixelROCMaps.h +++ b/DQM/TrackerRemapper/interface/Phase1PixelROCMaps.h @@ -32,7 +32,7 @@ namespace PixelROCMapHelper { void draw_line(double x1, double x2, double y1, double y2, int width, int style, int color); void dress_plot( - TCanvas& canv, TH2* h, int lay, int ring, int phase, bool half_shift, bool mark_zero, bool standard_palette); + TPad*& canv, TH2* h, int lay, int ring, int phase, bool half_shift, bool mark_zero, bool standard_palette); } // namespace PixelROCMapHelper /*-------------------------------------------------------------------- @@ -79,8 +79,9 @@ struct DetCoordinates { /--------------------------------------------------------------------*/ class Phase1PixelROCMaps { public: - Phase1PixelROCMaps(const char* option) + Phase1PixelROCMaps(const char* option, const std::string& zAxisTitle = "") : m_option{option}, + m_zAxisTitle{zAxisTitle}, m_trackerTopo{StandaloneTrackerTopology::fromTrackerParametersXMLFile( edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} { // --------------------- BOOK HISTOGRAMS @@ -90,6 +91,11 @@ class Phase1PixelROCMaps { std::string name = "occ_Layer_" + std::to_string(lay); std::string title = "; Module # ; Ladder #"; + // if a z-axis title is specified, add the z-axis title + if (!m_zAxisTitle.empty()) { + title += fmt::sprintf(" ;%s", m_zAxisTitle.c_str()); + } + h_bpix_maps[lay - 1] = std::make_shared( name.c_str(), title.c_str(), 72, -n_layers - 0.5, n_layers + 0.5, (nlad * 4 + 2), -nlad - 0.5, nlad + 0.5); } @@ -101,6 +107,11 @@ class Phase1PixelROCMaps { std::string name = "occ_ring_" + std::to_string(ring); std::string title = "; Disk # ; Blade/Panel #"; + // if a z-axis title is specified, add the z-axis title + if (!m_zAxisTitle.empty()) { + title += fmt::sprintf(" ;%s", m_zAxisTitle.c_str()); + } + h_fpix_maps[ring - 1] = std::make_shared(name.c_str(), title.c_str(), 56, -n_rings - 1.5, n_rings + 1.5, n, -y, y); } @@ -111,15 +122,16 @@ class Phase1PixelROCMaps { // Forward declarations void fillWholeModule(const uint32_t& detid, double value); void fillSelectedRocs(const uint32_t& detid, const std::bitset<16>& theROCs, double value); - void drawBarrelMaps(TCanvas& canvas); - void drawForwardMaps(TCanvas& canvas); - void drawMaps(TCanvas& canvas); + void drawBarrelMaps(TCanvas& canvas, const std::string& text = ""); + void drawForwardMaps(TCanvas& canvas, const std::string& text = ""); + void drawMaps(TCanvas& canvas, const std::string& text = ""); inline std::array, 4> getLayerMaps() { return h_bpix_maps; } inline std::array, 2> getRingMaps() { return h_fpix_maps; } private: Option_t* m_option; + std::string m_zAxisTitle; TrackerTopology m_trackerTopo; // tough luck, we can only do phase-1... @@ -151,7 +163,7 @@ class Phase1PixelROCMaps { //============================================================================ // Taken from pixel naming classes // BmO (-z-x) = 1, BmI (-z+x) = 2 , BpO (+z-x) = 3 , BpI (+z+x) = 4 - int quadrant(const DetId& detid, bool phase_) { + inline int quadrant(const DetId& detid, bool phase_) { if (detid.subdetId() == PixelSubdetector::PixelBarrel) { return PixelBarrelName(detid, &m_trackerTopo, phase_).shell(); } else { @@ -162,7 +174,7 @@ class Phase1PixelROCMaps { //============================================================================ // Online ladder convention taken from pixel naming class for barrel // Apply sign convention (- sign for BmO and BpO) - int signed_ladder(const DetId& detid, bool phase_) { + inline int signed_ladder(const DetId& detid, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelBarrel) return -9999; int signed_ladder = PixelBarrelName(detid, &m_trackerTopo, phase_).ladderName(); @@ -174,7 +186,7 @@ class Phase1PixelROCMaps { //============================================================================ // Online mdoule convention taken from pixel naming class for barrel // Apply sign convention (- sign for BmO and BmI) - int signed_module(const DetId& detid, bool phase_) { + inline int signed_module(const DetId& detid, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelBarrel) return -9999; int signed_module = PixelBarrelName(detid, &m_trackerTopo, phase_).moduleName(); @@ -190,7 +202,7 @@ class Phase1PixelROCMaps { // Panel 1 plq 1-2, Panel 2, plq 1 = Ring 1 // Panel 1 plq 3-4, Panel 2, plq 2-3 = Ring 2 // Phase 1: Using pixel naming class for endcap - int ring(const DetId& detid, bool phase_) { + inline int ring(const DetId& detid, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelEndcap) return -9999; int ring = -9999; @@ -205,7 +217,7 @@ class Phase1PixelROCMaps { //============================================================================ // Online blade convention taken from pixel naming class for endcap // Apply sign convention (- sign for BmO and BpO) - int signed_blade(const DetId& detid, bool phase_) { + inline int signed_blade(const DetId& detid, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelEndcap) return -9999; int signed_blade = PixelEndcapName(detid, &m_trackerTopo, phase_).bladeName(); @@ -215,7 +227,7 @@ class Phase1PixelROCMaps { } //============================================================================ - int signed_blade_panel(const DetId& detid, bool phase_) { + inline int signed_blade_panel(const DetId& detid, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelEndcap) return -9999; int signed_blade_panel = signed_blade(detid, phase_) + (m_trackerTopo.pxfPanel(detid) - 1); @@ -225,7 +237,7 @@ class Phase1PixelROCMaps { //============================================================================ // Online disk convention // Apply sign convention (- sign for BmO and BmI) - int signed_disk(const DetId& detid, bool phase_) { + inline int signed_disk(const DetId& detid, bool phase_) { if (detid.subdetId() != PixelSubdetector::PixelEndcap) return -9999; int signed_disk = m_trackerTopo.pxfDisk(DetId(detid)); @@ -236,7 +248,7 @@ class Phase1PixelROCMaps { //============================================================================ // Determines if the BPix ldder is inner or outer - bool isBPixOuterLadder(const DetId& detid, bool isPhase0) { + inline bool isBPixOuterLadder(const DetId& detid, bool isPhase0) { bool isOuter = false; int layer = m_trackerTopo.pxbLayer(detid.rawId()); bool odd_ladder = m_trackerTopo.pxbLadder(detid.rawId()) % 2; diff --git a/DQM/TrackerRemapper/interface/Phase1PixelSummaryMap.h b/DQM/TrackerRemapper/interface/Phase1PixelSummaryMap.h index c75162718f124..91a5029f48fc6 100644 --- a/DQM/TrackerRemapper/interface/Phase1PixelSummaryMap.h +++ b/DQM/TrackerRemapper/interface/Phase1PixelSummaryMap.h @@ -36,7 +36,7 @@ namespace Ph1PMapSummaryHelper { //============================================================================ // utility to tokenize std::string //============================================================================ - std::vector tokenize(std::string line, char delimiter) { + inline std::vector tokenize(std::string line, char delimiter) { // Vector of string to save tokens std::vector tokens; std::stringstream check1(line); diff --git a/DQM/TrackerRemapper/src/Phase1PixelROCMaps.cc b/DQM/TrackerRemapper/src/Phase1PixelROCMaps.cc index 8692e1cbb01ff..f1354b62de69f 100644 --- a/DQM/TrackerRemapper/src/Phase1PixelROCMaps.cc +++ b/DQM/TrackerRemapper/src/Phase1PixelROCMaps.cc @@ -88,10 +88,10 @@ rocBins Phase1PixelROCMaps::maskedBarrelRocsToBins(DetCoordinates coord, std::bi if (myRocs.test(idx)) { ////////////////////////////////////////////////////////////////////////////////////// // | // - // In BPix Layer1 and module>0 in L2,3,4 | In BPix Layer 2,3,4 module > 0 // + // In BPix Layer1 & module > 0 in L2,3,4 | In BPix Layer 2,3,4 module < 0 // // | // // ROCs are ordered in the following | ROCs are ordered in the following // - // fashion for unplipped modules | fashion for unplipped modules // + // fashion for unflipped modules | fashion for unflipped modules // // | // // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ // // | 8 |9 |10 |11 |12 |13 |14 |15 | | |15 |14 |13 |12 |11 |10 | 9 | 8 | // @@ -185,7 +185,7 @@ rocBins Phase1PixelROCMaps::maskedForwardRocsToBins(DetCoordinates coord, std::b // In FPix + (Disk 1,2,3) | In FPix - (Disk -1,-2,-3) // // | // // ROCs are ordered in the following | ROCs are ordered in the following // - // fashion for unplipped modules | fashion for unplipped modules // + // fashion for unflipped modules | fashion for unflipped modules // // | // // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ // // | 8 |9 |10 |11 |12 |13 |14 |15 | | |15 |14 |13 |12 |11 |10 | 9 | 8 | // @@ -290,35 +290,54 @@ void PixelROCMapHelper::draw_line( } /*--------------------------------------------------------------------*/ -void PixelROCMapHelper::dress_plot(TCanvas& canv, +void PixelROCMapHelper::dress_plot(TPad*& canv, TH2* h, int lay, int ring = 0, int phase = 0, + bool standard_palette = true, bool half_shift = true, - bool mark_zero = true, - bool standard_palette = true) + bool mark_zero = true) /*--------------------------------------------------------------------*/ { std::string s_title; + const auto zAxisTitle = fmt::sprintf("%s", h->GetZaxis()->GetTitle()); if (lay > 0) { - canv.cd(lay); + canv->cd(lay); + canv->cd(lay)->SetTopMargin(0.05); + canv->cd(lay)->SetBottomMargin(0.07); + canv->cd(lay)->SetLeftMargin(0.1); + if (!zAxisTitle.empty()) { + h->GetZaxis()->SetTitleOffset(1.3); + h->GetZaxis()->CenterTitle(true); + canv->cd(lay)->SetRightMargin(0.14); + } else { + canv->cd(lay)->SetRightMargin(0.11); + } s_title = "Barrel Pixel Layer " + std::to_string(lay); } else { - canv.cd(ring); + canv->cd(ring); + canv->cd(ring)->SetTopMargin(0.05); + canv->cd(ring)->SetBottomMargin(0.07); + canv->cd(ring)->SetLeftMargin(0.1); + if (!zAxisTitle.empty()) { + h->GetZaxis()->SetTitleOffset(1.3); + h->GetZaxis()->CenterTitle(true); + canv->cd(ring)->SetRightMargin(0.14); + } else { + canv->cd(ring)->SetRightMargin(0.11); + } if (ring > 4) { ring = ring - 4; } s_title = "Forward Pixel Ring " + std::to_string(ring); } - gStyle->SetPadRightMargin(0.125); - if (standard_palette) { gStyle->SetPalette(1); } else { - // this is the fine gradient palette + /* const Int_t NRGBs = 5; const Int_t NCont = 255; @@ -328,6 +347,22 @@ void PixelROCMapHelper::dress_plot(TCanvas& canv, Double_t blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00}; TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); gStyle->SetNumberContours(NCont); + */ + + // this is the fine gradient palette (blue to red) + double max = h->GetMaximum(); + double min = h->GetMinimum(); + double val_white = 0.; + double per_white = (val_white - min) / (max - min); + + const int Number = 3; + double Red[Number] = {0., 1., 1.}; + double Green[Number] = {0., 1., 0.}; + double Blue[Number] = {1., 1., 0.}; + double Stops[Number] = {0., per_white, 1.}; + int nb = 256; + h->SetContour(nb); + TColor::CreateGradientColorTable(Number, Stops, Red, Green, Blue, nb); } h->SetMarkerSize(0.7); @@ -581,53 +616,105 @@ void PixelROCMapHelper::dress_plot(TCanvas& canv, } /*--------------------------------------------------------------------*/ -void Phase1PixelROCMaps::drawBarrelMaps(TCanvas& canvas) +void Phase1PixelROCMaps::drawBarrelMaps(TCanvas& canvas, const std::string& text) /*--------------------------------------------------------------------*/ { - canvas.Divide(2, 2); - canvas.SetBottomMargin(0.11); - canvas.SetLeftMargin(0.13); - canvas.SetRightMargin(0.05); + canvas.cd(); canvas.Modified(); + + auto topPad = new TPad("pad1", "upper pad", 0.005, 0.96, 0.995, 0.995); + topPad->Draw(); + topPad->cd(); + auto ltx = TLatex(); + ltx.SetTextFont(62); + + std::size_t found = text.find("Delta"); + if (found != std::string::npos) { + ltx.SetTextSize(0.7); + } else { + ltx.SetTextSize(1.); + } + ltx.DrawLatexNDC(0.02, 0.3, text.c_str()); + + canvas.cd(); + auto bottomPad = new TPad("pad2", "lower pad", 0.005, 0.005, 0.995, 0.955); + bottomPad->Draw(); + bottomPad->cd(); + bottomPad->Divide(2, 2); for (unsigned int lay = 1; lay <= n_layers; lay++) { - PixelROCMapHelper::dress_plot(canvas, h_bpix_maps[lay - 1].get(), lay, 0, 1); + PixelROCMapHelper::dress_plot(bottomPad, h_bpix_maps[lay - 1].get(), lay, 0, 1, found == std::string::npos); } } /*--------------------------------------------------------------------*/ -void Phase1PixelROCMaps::drawForwardMaps(TCanvas& canvas) +void Phase1PixelROCMaps::drawForwardMaps(TCanvas& canvas, const std::string& text) /*--------------------------------------------------------------------*/ { - canvas.Divide(2, 1); - canvas.SetBottomMargin(0.11); - canvas.SetLeftMargin(0.13); - canvas.SetRightMargin(0.05); + canvas.cd(); canvas.Modified(); + + auto topPad = new TPad("pad1", "upper pad", 0.005, 0.94, 0.995, 0.995); + topPad->Draw(); + topPad->cd(); + auto ltx = TLatex(); + ltx.SetTextFont(62); + + std::size_t found = text.find("Delta"); + if (found != std::string::npos) { + ltx.SetTextSize(0.7); + } else { + ltx.SetTextSize(1.); + } + ltx.DrawLatexNDC(0.02, 0.3, text.c_str()); + + canvas.cd(); + auto bottomPad = new TPad("pad2", "lower pad", 0.005, 0.005, 0.995, 0.935); + bottomPad->Draw(); + bottomPad->cd(); + bottomPad->Divide(2, 1); for (unsigned int ring = 1; ring <= n_rings; ring++) { - PixelROCMapHelper::dress_plot(canvas, h_fpix_maps[ring - 1].get(), 0, ring, 1); + PixelROCMapHelper::dress_plot(bottomPad, h_fpix_maps[ring - 1].get(), 0, ring, 1, found == std::string::npos); } } /*--------------------------------------------------------------------*/ -void Phase1PixelROCMaps::drawMaps(TCanvas& canvas) +void Phase1PixelROCMaps::drawMaps(TCanvas& canvas, const std::string& text) /*--------------------------------------------------------------------*/ { - canvas.Divide(2, 3); - canvas.SetBottomMargin(0.11); - canvas.SetLeftMargin(0.13); - canvas.SetRightMargin(0.05); + canvas.cd(); canvas.Modified(); + auto topPad = new TPad("pad1", "upper pad", 0.005, 0.97, 0.995, 0.995); + topPad->Draw(); + topPad->cd(); + auto ltx = TLatex(); + ltx.SetTextFont(62); + + std::size_t found = text.find("Delta"); + if (found != std::string::npos) { + ltx.SetTextSize(0.7); + } else { + ltx.SetTextSize(1.); + } + ltx.DrawLatexNDC(0.02, 0.2, text.c_str()); + + canvas.cd(); + auto bottomPad = new TPad("pad2", "lower pad", 0.005, 0.005, 0.995, 0.97); + bottomPad->Draw(); + bottomPad->cd(); + bottomPad->Divide(2, 3); + // dress the plots for (unsigned int lay = 1; lay <= n_layers; lay++) { - PixelROCMapHelper::dress_plot(canvas, h_bpix_maps[lay - 1].get(), lay, 0, 1); + PixelROCMapHelper::dress_plot(bottomPad, h_bpix_maps[lay - 1].get(), lay, 0, 1, found == std::string::npos); } - canvas.Update(); - canvas.Modified(); - canvas.cd(); + bottomPad->Update(); + bottomPad->Modified(); + bottomPad->cd(); for (unsigned int ring = 1; ring <= n_rings; ring++) { - PixelROCMapHelper::dress_plot(canvas, h_fpix_maps[ring - 1].get(), 0, n_layers + ring, 1); + PixelROCMapHelper::dress_plot( + bottomPad, h_fpix_maps[ring - 1].get(), 0, n_layers + ring, 1, found == std::string::npos); } } diff --git a/DQM/TrackingMonitorSource/plugins/BuildFile.xml b/DQM/TrackingMonitorSource/plugins/BuildFile.xml index de9e10beeb345..c78b6f7697096 100644 --- a/DQM/TrackingMonitorSource/plugins/BuildFile.xml +++ b/DQM/TrackingMonitorSource/plugins/BuildFile.xml @@ -7,6 +7,7 @@ + diff --git a/DQMOffline/CalibCalo/src/DQMSourcePi0.h b/DQMOffline/CalibCalo/src/DQMSourcePi0.h index 2ac2496a50136..b32b3d0bfa182 100644 --- a/DQMOffline/CalibCalo/src/DQMSourcePi0.h +++ b/DQMOffline/CalibCalo/src/DQMSourcePi0.h @@ -24,7 +24,7 @@ #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h" // Less than operator for sorting EcalRecHits according to energy. -bool ecalRecHitGreater(EcalRecHit x, EcalRecHit y) { return (x.energy() > y.energy()); } +inline bool ecalRecHitGreater(EcalRecHit x, EcalRecHit y) { return (x.energy() > y.energy()); } class DQMSourcePi0 : public DQMEDAnalyzer { public: diff --git a/DQMOffline/CalibTracker/plugins/BuildFile.xml b/DQMOffline/CalibTracker/plugins/BuildFile.xml index 5778f3bb779d2..4d9d1e2b1f993 100644 --- a/DQMOffline/CalibTracker/plugins/BuildFile.xml +++ b/DQMOffline/CalibTracker/plugins/BuildFile.xml @@ -11,6 +11,7 @@ + diff --git a/DQMOffline/CalibTracker/plugins/SiStripQualityHotStripIdentifierRoot.cc b/DQMOffline/CalibTracker/plugins/SiStripQualityHotStripIdentifierRoot.cc index 95906487c10de..300351ecf4fbc 100644 --- a/DQMOffline/CalibTracker/plugins/SiStripQualityHotStripIdentifierRoot.cc +++ b/DQMOffline/CalibTracker/plugins/SiStripQualityHotStripIdentifierRoot.cc @@ -20,6 +20,7 @@ #include "CalibTracker/SiStripQuality/interface/SiStripHotStripAlgorithmFromClusterOccupancy.h" #include "CalibTracker/SiStripQuality/interface/SiStripBadAPVAlgorithmFromClusterOccupancy.h" #include "CalibTracker/SiStripQuality/interface/SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy.h" +#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" SiStripQualityHotStripIdentifierRoot::SiStripQualityHotStripIdentifierRoot(const edm::ParameterSet& iConfig) : ConditionDBWriter(iConfig), @@ -85,7 +86,9 @@ std::unique_ptr SiStripQualityHotStripIdentifierRoot::getNewObj conf_.getUntrackedParameter("WriteOccupancyRootFile", false)); theIdentifier->setTrackerGeometry(tracker_); - SiStripQuality* qobj = new SiStripQuality(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + SiStripQuality* qobj = new SiStripQuality(reader.info()); theIdentifier->extractBadStrips( qobj, ClusterPositionHistoMap, @@ -130,7 +133,9 @@ std::unique_ptr SiStripQualityHotStripIdentifierRoot::getNewObj conf_.getUntrackedParameter("WriteOccupancyRootFile", false)); theIdentifier2->setTrackerGeometry(tracker_); - SiStripQuality* qobj = new SiStripQuality(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + SiStripQuality* qobj = new SiStripQuality(reader.info()); theIdentifier2->extractBadAPVs(qobj, ClusterPositionHistoMap, SiStripQuality_); //---------- @@ -181,7 +186,9 @@ std::unique_ptr SiStripQualityHotStripIdentifierRoot::getNewObj parameters.getUntrackedParameter("OccupancyThreshold", 1.E-5)); theIdentifier3->setMinNumOfEvents(); - SiStripQuality* qobj = new SiStripQuality(); + edm::FileInPath path(SiStripDetInfoFileReader::kDefaultFile); + SiStripDetInfoFileReader reader(path.fullPath()); + SiStripQuality* qobj = new SiStripQuality(reader.info()); theIdentifier3->extractBadAPVSandStrips( qobj, ClusterPositionHistoMap, diff --git a/DQMOffline/EGamma/plugins/PiZeroAnalyzer.cc b/DQMOffline/EGamma/plugins/PiZeroAnalyzer.cc index d69560eadfa76..a556542b2c754 100644 --- a/DQMOffline/EGamma/plugins/PiZeroAnalyzer.cc +++ b/DQMOffline/EGamma/plugins/PiZeroAnalyzer.cc @@ -17,7 +17,8 @@ using namespace std; -PiZeroAnalyzer::PiZeroAnalyzer(const edm::ParameterSet& pset) { +PiZeroAnalyzer::PiZeroAnalyzer(const edm::ParameterSet& pset) + : caloGeometryToken_{esConsumes()}, caloTopologyToken_{esConsumes()} { fName_ = pset.getUntrackedParameter("Name"); prescaleFactor_ = pset.getUntrackedParameter("prescaleFactor", 1); @@ -113,11 +114,13 @@ void PiZeroAnalyzer::makePizero(const edm::EventSetup& es, const edm::Handle rhEE) { const EcalRecHitCollection* hitCollection_p = rhEB.product(); - edm::ESHandle geoHandle; - es.get().get(geoHandle); + //edm::ESHandle geoHandle; + //es.get().get(geoHandle); + auto geoHandle = es.getHandle(caloGeometryToken_); - edm::ESHandle theCaloTopology; - es.get().get(theCaloTopology); + //edm::ESHandle theCaloTopology; + //es.get().get(theCaloTopology); + auto theCaloTopology = es.getHandle(caloTopologyToken_); const CaloSubdetectorTopology* topology_p; const CaloSubdetectorGeometry* geometry_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalBarrel); diff --git a/DQMOffline/EGamma/plugins/PiZeroAnalyzer.h b/DQMOffline/EGamma/plugins/PiZeroAnalyzer.h index 09945bb067589..491e449bd63ee 100644 --- a/DQMOffline/EGamma/plugins/PiZeroAnalyzer.h +++ b/DQMOffline/EGamma/plugins/PiZeroAnalyzer.h @@ -93,6 +93,10 @@ class PiZeroAnalyzer : public DQMEDAnalyzer { edm::EDGetTokenT > > barrelEcalHits_token_; edm::EDGetTokenT > > endcapEcalHits_token_; + + const edm::ESGetToken caloGeometryToken_; + const edm::ESGetToken caloTopologyToken_; + double minPhoEtCut_; double cutStep_; diff --git a/DQMOffline/L1Trigger/src/L1TDiffHarvesting.cc b/DQMOffline/L1Trigger/src/L1TDiffHarvesting.cc index 7b47345913cb2..d07de86002f87 100644 --- a/DQMOffline/L1Trigger/src/L1TDiffHarvesting.cc +++ b/DQMOffline/L1Trigger/src/L1TDiffHarvesting.cc @@ -75,8 +75,10 @@ namespace dqmoffline { if (!h1_ || !h2_) { edm::LogWarning("L1TDiffHarvesting::L1TDiffPlotHandler::loadHistograms") - << (!h1_ && !h2_ ? h1Name + " && " + h2Name : !h1_ ? h1Name : h2Name) << " not gettable. Quitting booking" - << std::endl; + << (!h1_ && !h2_ ? h1Name + " && " + h2Name + : !h1_ ? h1Name + : h2Name) + << " not gettable. Quitting booking" << std::endl; return; } diff --git a/DQMOffline/L1Trigger/src/L1TEfficiencyHarvesting.cc b/DQMOffline/L1Trigger/src/L1TEfficiencyHarvesting.cc index 2deafc184e661..121411ad0f789 100644 --- a/DQMOffline/L1Trigger/src/L1TEfficiencyHarvesting.cc +++ b/DQMOffline/L1Trigger/src/L1TEfficiencyHarvesting.cc @@ -42,9 +42,10 @@ namespace dqmoffline { MonitorElement *den = igetter.get(denominatorName); if (!num || !den) { - edm::LogWarning("L1TEfficiencyPlotHandler") - << (!num && !den ? numeratorName + " && " + denominatorName : !num ? numeratorName : denominatorName) - << " not gettable. Quitting booking" << endl; + edm::LogWarning("L1TEfficiencyPlotHandler") << (!num && !den ? numeratorName + " && " + denominatorName + : !num ? numeratorName + : denominatorName) + << " not gettable. Quitting booking" << endl; return; } @@ -52,9 +53,10 @@ namespace dqmoffline { TH1 *denH = den->getTH1(); if (!numH || !denH) { - edm::LogWarning("L1TEfficiencyPlotHandler") - << (!numH && !denH ? numeratorName + " && " + denominatorName : !num ? numeratorName : denominatorName) - << " is not TH1F. Quitting booking" << endl; + edm::LogWarning("L1TEfficiencyPlotHandler") << (!numH && !denH ? numeratorName + " && " + denominatorName + : !num ? numeratorName + : denominatorName) + << " is not TH1F. Quitting booking" << endl; return; } diff --git a/DQMOffline/RecoB/interface/FlavourHistorgrams.h b/DQMOffline/RecoB/interface/FlavourHistorgrams.h index d270b5702390c..4ad9cf42d7f77 100644 --- a/DQMOffline/RecoB/interface/FlavourHistorgrams.h +++ b/DQMOffline/RecoB/interface/FlavourHistorgrams.h @@ -362,7 +362,7 @@ void FlavourHistograms::fill(const int& flavour, const T& variable, const T& template void FlavourHistograms::fill(const int& flavour, const T* variable) const { - if (theArrayDimension == 0) { + if (theArrayDimension == nullptr) { // single variable fillVariable(flavour, *variable, 1.); } else { diff --git a/DQMOffline/RecoB/interface/FlavourHistorgrams2D.h b/DQMOffline/RecoB/interface/FlavourHistorgrams2D.h index 3a855580c8f0e..3b5ba9b27995a 100644 --- a/DQMOffline/RecoB/interface/FlavourHistorgrams2D.h +++ b/DQMOffline/RecoB/interface/FlavourHistorgrams2D.h @@ -633,7 +633,7 @@ void FlavourHistograms2D::fill(const int &flavour, const T &variableX, con template void FlavourHistograms2D::fill(const int &flavour, const T *variableX, const G *variableY, const float &w) const { - if (theArrayDimension == 0) { + if (theArrayDimension == nullptr) { // single variable fillVariable(flavour, *variableX, *variableY, w); } else { diff --git a/DQMOffline/Trigger/interface/HLTDQMFilterEffHists.h b/DQMOffline/Trigger/interface/HLTDQMFilterEffHists.h index 14835e6c33944..34547fe3e711f 100644 --- a/DQMOffline/Trigger/interface/HLTDQMFilterEffHists.h +++ b/DQMOffline/Trigger/interface/HLTDQMFilterEffHists.h @@ -123,6 +123,7 @@ template void HLTDQMFilterEffHists::book1D(DQMStore::IBooker& iBooker, const edm::ParameterSet& histConfig) { auto binLowEdgesDouble = histConfig.getParameter >("binLowEdges"); std::vector binLowEdges; + binLowEdges.reserve(binLowEdgesDouble.size()); for (double lowEdge : binLowEdgesDouble) binLowEdges.push_back(lowEdge); auto nameSuffex = histConfig.getParameter("nameSuffex"); @@ -154,8 +155,10 @@ void HLTDQMFilterEffHists::book2D(DQMStore::IBooker& iBooker, const edm auto yBinLowEdgesDouble = histConfig.getParameter >("yBinLowEdges"); std::vector xBinLowEdges; std::vector yBinLowEdges; + xBinLowEdges.reserve(xBinLowEdgesDouble.size()); for (double lowEdge : xBinLowEdgesDouble) xBinLowEdges.push_back(lowEdge); + yBinLowEdges.reserve(yBinLowEdgesDouble.size()); for (double lowEdge : yBinLowEdgesDouble) yBinLowEdges.push_back(lowEdge); auto nameSuffex = histConfig.getParameter("nameSuffex"); diff --git a/DQMOffline/Trigger/interface/HLTTauRefProducer.h b/DQMOffline/Trigger/interface/HLTTauRefProducer.h index f6ac4c9c8d736..1e58a9f608656 100644 --- a/DQMOffline/Trigger/interface/HLTTauRefProducer.h +++ b/DQMOffline/Trigger/interface/HLTTauRefProducer.h @@ -47,8 +47,10 @@ #include "DataFormats/METReco/interface/CaloMET.h" #include "DataFormats/METReco/interface/CaloMETCollection.h" -#include +#include + #include +#include typedef std::pair> TauIDConfigCache; @@ -59,7 +61,7 @@ class HLTTauRefProducer : public edm::global::EDProducer beginStream(edm::StreamID) const override { - return std::unique_ptr(new TauIDConfigCache()); + return std::make_unique(); } private: diff --git a/DQMOffline/Trigger/interface/HistoWrapper.h b/DQMOffline/Trigger/interface/HistoWrapper.h index f7a9321183c9c..de37624b88a2b 100644 --- a/DQMOffline/Trigger/interface/HistoWrapper.h +++ b/DQMOffline/Trigger/interface/HistoWrapper.h @@ -8,17 +8,32 @@ typedef dqm::legacy::DQMStore DQMStore; #include "DQMServices/Core/interface/MonitorElement.h" typedef dqm::legacy::MonitorElement MonitorElement; -enum PL {kEverything, kVital}; +enum PL { kEverything, kVital }; class HistoWrapper { - public: +public: HistoWrapper(const edm::ParameterSet&); ~HistoWrapper(); - MonitorElement* book1D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int const nchX, double const lowX, double const highX, int level = kEverything); - MonitorElement* book2D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int level = kEverything); + MonitorElement* book1D(DQMStore::IBooker& iBooker, + TString const& name, + TString const& title, + int const nchX, + double const lowX, + double const highX, + int level = kEverything); + MonitorElement* book2D(DQMStore::IBooker& iBooker, + TString const& name, + TString const& title, + int nchX, + double lowX, + double highX, + int nchY, + double lowY, + double highY, + int level = kEverything); - private: +private: PL plotlevel; int cAllHistograms; int cPlottedHistograms; diff --git a/DQMOffline/Trigger/interface/UtilFuncs.h b/DQMOffline/Trigger/interface/UtilFuncs.h index de6c91d51af69..da57948502459 100644 --- a/DQMOffline/Trigger/interface/UtilFuncs.h +++ b/DQMOffline/Trigger/interface/UtilFuncs.h @@ -11,11 +11,11 @@ #include "DataFormats/Math/interface/deltaR.h" namespace hltdqm { - bool passTrig(const float objEta, - float objPhi, - const trigger::TriggerEvent& trigEvt, - const std::string& filterName, - const std::string& processName) { + inline bool passTrig(const float objEta, + float objPhi, + const trigger::TriggerEvent& trigEvt, + const std::string& filterName, + const std::string& processName) { constexpr float kMaxDR2 = 0.1 * 0.1; edm::InputTag filterTag(filterName, "", processName); @@ -33,12 +33,12 @@ namespace hltdqm { } //empty filters is auto pass - bool passTrig(const float objEta, - float objPhi, - const trigger::TriggerEvent& trigEvt, - const std::vector& filterNames, - bool orFilters, - const std::string& processName) { + inline bool passTrig(const float objEta, + float objPhi, + const trigger::TriggerEvent& trigEvt, + const std::vector& filterNames, + bool orFilters, + const std::string& processName) { if (orFilters) { if (filterNames.empty()) return true; //auto pass if empty filters @@ -59,9 +59,9 @@ namespace hltdqm { //inspired by https://github.com/cms-sw/cmssw/blob/fc4f8bbe1258790e46e2d554aacea15c3e5d9afa/HLTrigger/HLTfilters/src/HLTHighLevel.cc#L124-L165 //triggers are ORed together //empty pattern is auto pass - bool passTrig(const std::string& trigPattern, - const edm::TriggerNames& trigNames, - const edm::TriggerResults& trigResults) { + inline bool passTrig(const std::string& trigPattern, + const edm::TriggerNames& trigNames, + const edm::TriggerResults& trigResults) { if (trigPattern.empty()) return true; diff --git a/DQMOffline/Trigger/src/HistoWrapper.cc b/DQMOffline/Trigger/src/HistoWrapper.cc index 1bce45e0a6d8a..9df79f130a3d2 100644 --- a/DQMOffline/Trigger/src/HistoWrapper.cc +++ b/DQMOffline/Trigger/src/HistoWrapper.cc @@ -1,35 +1,50 @@ #include "DQMOffline/Trigger/interface/HistoWrapper.h" -HistoWrapper::HistoWrapper(const edm::ParameterSet& pset){ +HistoWrapper::HistoWrapper(const edm::ParameterSet& pset) { plotlevel = (PL)pset.getUntrackedParameter("PlotLevel", int(kEverything)); cAllHistograms = 0; cPlottedHistograms = 0; } -HistoWrapper::~HistoWrapper(){ +HistoWrapper::~HistoWrapper() { std::string s_pl = "kEverything"; - if(plotlevel == 1) s_pl = "kVital"; + if (plotlevel == 1) + s_pl = "kVital"; std::cout << "Plot level " << plotlevel << " " << s_pl << std::endl; std::cout << "Plotting " << cPlottedHistograms << " out of " << cAllHistograms << std::endl; } -MonitorElement* HistoWrapper::book1D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int const nchX, double const lowX, double const highX, int level){ +MonitorElement* HistoWrapper::book1D(DQMStore::IBooker& iBooker, + TString const& name, + TString const& title, + int const nchX, + double const lowX, + double const highX, + int level) { cAllHistograms++; - if(level >= plotlevel){ + if (level >= plotlevel) { cPlottedHistograms++; MonitorElement* me = iBooker.book1D(name, title, nchX, lowX, highX); return me; } - return 0; + return nullptr; } -MonitorElement* HistoWrapper::book2D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int level){ +MonitorElement* HistoWrapper::book2D(DQMStore::IBooker& iBooker, + TString const& name, + TString const& title, + int nchX, + double lowX, + double highX, + int nchY, + double lowY, + double highY, + int level) { cAllHistograms++; - if(level >= plotlevel){ + if (level >= plotlevel) { cPlottedHistograms++; MonitorElement* me = iBooker.book2D(name, title, nchX, lowX, highX, nchY, lowY, highY); return me; } - return 0; + return nullptr; } - diff --git a/DQMServices/Components/plugins/EDMtoMEConverter.cc b/DQMServices/Components/plugins/EDMtoMEConverter.cc index 5f19932705730..d1d5c21913b34 100644 --- a/DQMServices/Components/plugins/EDMtoMEConverter.cc +++ b/DQMServices/Components/plugins/EDMtoMEConverter.cc @@ -66,7 +66,7 @@ namespace { struct HistoTraits { static TH1F *get(MonitorElement *me) { return me->getTH1F(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.book1D(std::forward(args)...); } }; @@ -74,7 +74,7 @@ namespace { struct HistoTraits { static TH1S *get(MonitorElement *me) { return me->getTH1S(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.book1S(std::forward(args)...); } }; @@ -82,7 +82,7 @@ namespace { struct HistoTraits { static TH1D *get(MonitorElement *me) { return me->getTH1D(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.book1DD(std::forward(args)...); } }; @@ -90,7 +90,7 @@ namespace { struct HistoTraits { static TH2F *get(MonitorElement *me) { return me->getTH2F(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.book2D(std::forward(args)...); } }; @@ -98,7 +98,7 @@ namespace { struct HistoTraits { static TH2S *get(MonitorElement *me) { return me->getTH2S(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.book2S(std::forward(args)...); } }; @@ -106,7 +106,7 @@ namespace { struct HistoTraits { static TH2D *get(MonitorElement *me) { return me->getTH2D(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.book2DD(std::forward(args)...); } }; @@ -114,7 +114,7 @@ namespace { struct HistoTraits { static TH3F *get(MonitorElement *me) { return me->getTH3F(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.book3D(std::forward(args)...); } }; @@ -122,7 +122,7 @@ namespace { struct HistoTraits { static TProfile *get(MonitorElement *me) { return me->getTProfile(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.bookProfile(std::forward(args)...); } }; @@ -130,7 +130,7 @@ namespace { struct HistoTraits { static TProfile2D *get(MonitorElement *me) { return me->getTProfile2D(); } template - static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&... args) { + static MonitorElement *book(DQMStore::IBooker &iBooker, Args &&...args) { return iBooker.bookProfile2D(std::forward(args)...); } }; @@ -219,14 +219,14 @@ namespace { template <> struct AddMonitorElement { template - static MonitorElement *call(Args &&... args) { + static MonitorElement *call(Args &&...args) { return AddMonitorElementForIntegers::call(std::forward(args)...); } }; template <> struct AddMonitorElement { template - static MonitorElement *call(Args &&... args) { + static MonitorElement *call(Args &&...args) { return AddMonitorElementForIntegers::call(std::forward(args)...); } }; diff --git a/DataFormats/CSCDigi/src/CSCCLCTDigi.cc b/DataFormats/CSCDigi/src/CSCCLCTDigi.cc index 737dade1b56b2..1004f8f6da3a2 100644 --- a/DataFormats/CSCDigi/src/CSCCLCTDigi.cc +++ b/DataFormats/CSCDigi/src/CSCCLCTDigi.cc @@ -206,8 +206,17 @@ void CSCCLCTDigi::print() const { } std::ostream& operator<<(std::ostream& o, const CSCCLCTDigi& digi) { - return o << "CSC CLCT #" << digi.getTrknmb() << ": Valid = " << digi.isValid() << " Quality = " << digi.getQuality() - << " Pattern = " << digi.getPattern() << " StripType = " << digi.getStripType() - << " Bend = " << digi.getBend() << " Strip = " << digi.getStrip() << " KeyStrip = " << digi.getKeyStrip() - << " CFEB = " << digi.getCFEB() << " BX = " << digi.getBX() << " Comp Code " << digi.getCompCode(); + if (digi.isRun3()) + return o << "CSC CLCT #" << digi.getTrknmb() << ": Valid = " << digi.isValid() << " BX = " << digi.getBX() + << " Run-2 Pattern = " << digi.getPattern() << " Run-3 Pattern = " << digi.getRun3Pattern() + << " Quality = " << digi.getQuality() << " Comp Code " << digi.getCompCode() + << " Bend = " << digi.getBend() << "\n" + << " Slope = " << digi.getSlope() << " CFEB = " << digi.getCFEB() << " Strip = " << digi.getStrip() + << " KeyHalfStrip = " << digi.getKeyStrip() << " KeyQuartStrip = " << digi.getKeyStrip(4) + << " KeyEighthStrip = " << digi.getKeyStrip(8); + else + return o << "CSC CLCT #" << digi.getTrknmb() << ": Valid = " << digi.isValid() << " BX = " << digi.getBX() + << " Pattern = " << digi.getPattern() << " Quality = " << digi.getQuality() << " Bend = " << digi.getBend() + << " CFEB = " << digi.getCFEB() << " HalfStrip = " << digi.getStrip() + << " KeyHalfStrip = " << digi.getKeyStrip(); } diff --git a/DataFormats/CSCDigi/src/CSCCorrelatedLCTDigi.cc b/DataFormats/CSCDigi/src/CSCCorrelatedLCTDigi.cc index 218d883e2c490..12ee4c0a95ee6 100644 --- a/DataFormats/CSCDigi/src/CSCCorrelatedLCTDigi.cc +++ b/DataFormats/CSCDigi/src/CSCCorrelatedLCTDigi.cc @@ -153,11 +153,19 @@ void CSCCorrelatedLCTDigi::print() const { } std::ostream& operator<<(std::ostream& o, const CSCCorrelatedLCTDigi& digi) { - return o << "CSC LCT #" << digi.getTrknmb() << ": Valid = " << digi.isValid() << " Quality = " << digi.getQuality() - << " MPC Link = " << digi.getMPCLink() << " cscID = " << digi.getCSCID() - << " syncErr = " << digi.getSyncErr() << " Type (SIM) = " << digi.getType() << "\n" - << " cathode info: Strip = " << digi.getStrip() << " Pattern = " << digi.getPattern() - << " Bend = " << ((digi.getBend() == 0) ? 'L' : 'R') << "\n" - << " anode info: Key wire = " << digi.getKeyWG() << " BX = " << digi.getBX() - << " bx0 = " << digi.getBX0(); + // do not print out CSCID and sync error. They are not used anyway in the firmware, or the emulation + if (digi.isRun3()) + return o << "CSC LCT #" << digi.getTrknmb() << ": Valid = " << digi.isValid() << " BX = " << digi.getBX() + << " Run-2 Pattern = " << digi.getPattern() << " Run-3 Pattern = " << digi.getRun3Pattern() + << " Quality = " << digi.getQuality() << " Bend = " << digi.getBend() << " Slope = " << digi.getSlope() + << "\n" + << " KeyHalfStrip = " << digi.getStrip() << " KeyQuartStrip = " << digi.getStrip(4) + << " KeyEighthStrip = " << digi.getStrip(8) << " KeyWireGroup = " << digi.getKeyWG() + << " Type (SIM) = " << digi.getType() << " MPC Link = " << digi.getMPCLink(); + else + return o << "CSC LCT #" << digi.getTrknmb() << ": Valid = " << digi.isValid() << " BX = " << digi.getBX() + << " Pattern = " << digi.getPattern() << " Quality = " << digi.getQuality() << " Bend = " << digi.getBend() + << "\n" + << " KeyHalfStrip = " << digi.getStrip() << " KeyWireGroup = " << digi.getKeyWG() + << " Type (SIM) = " << digi.getType() << " MPC Link = " << digi.getMPCLink(); } diff --git a/DataFormats/Common/interface/AssociationVector.h b/DataFormats/Common/interface/AssociationVector.h index 6bb74e470be8b..6930a434d4eff 100644 --- a/DataFormats/Common/interface/AssociationVector.h +++ b/DataFormats/Common/interface/AssociationVector.h @@ -157,13 +157,13 @@ namespace edm { template inline typename AssociationVector::const_reference - AssociationVector::operator[](size_type n) const { + AssociationVector::operator[](size_type n) const { return transientVector()[n]; } template inline typename CVal::const_reference - AssociationVector::operator[](KeyRef const& k) const { + AssociationVector::operator[](KeyRef const& k) const { KeyRef keyRef = KeyReferenceHelper::get(k, ref_.id()); checkForWrongProduct(keyRef.id(), ref_.id()); return data_[keyRef.key()]; @@ -172,7 +172,7 @@ namespace edm { template template inline typename CVal::const_reference - AssociationVector::operator[](edm::Ptr const& k) const { + AssociationVector::operator[](edm::Ptr const& k) const { static_assert(std::is_base_of::value, "edm::Ptr's key type is not a base class of AssociationVector's item type"); checkForWrongProduct(k.id(), ref_.id()); diff --git a/DataFormats/Common/interface/ConvertHandle.h b/DataFormats/Common/interface/ConvertHandle.h index 861db88bc7afa..eb7cf09c14c4e 100644 --- a/DataFormats/Common/interface/ConvertHandle.h +++ b/DataFormats/Common/interface/ConvertHandle.h @@ -20,11 +20,13 @@ namespace edm { // Convert from handle-to-void to handle-to-T template Handle convert_handle(BasicHandle&& bh) noexcept(true) { - if - UNLIKELY(bh.failedToGet()) { return Handle(std::move(bh.whyFailedFactory())); } + if UNLIKELY (bh.failedToGet()) { + return Handle(std::move(bh.whyFailedFactory())); + } void const* basicWrapper = bh.wrapper(); - if - UNLIKELY(nullptr == basicWrapper) { return Handle{handleimpl::makeInvalidReferenceException()}; } + if UNLIKELY (nullptr == basicWrapper) { + return Handle{handleimpl::makeInvalidReferenceException()}; + } auto wrapper = static_cast const*>(basicWrapper); return Handle(wrapper->product(), bh.provenance()); @@ -32,15 +34,16 @@ namespace edm { template Handle convert_handle_check_type(BasicHandle&& bh) { - if - UNLIKELY(bh.failedToGet()) { return Handle(std::move(bh.whyFailedFactory())); } + if UNLIKELY (bh.failedToGet()) { + return Handle(std::move(bh.whyFailedFactory())); + } void const* basicWrapper = bh.wrapper(); - if - UNLIKELY(basicWrapper == nullptr) { return Handle{handleimpl::makeInvalidReferenceException()}; } - if - UNLIKELY(!(bh.wrapper()->dynamicTypeInfo() == typeid(T))) { - handleimpl::throwConvertTypeError(typeid(T), bh.wrapper()->dynamicTypeInfo()); - } + if UNLIKELY (basicWrapper == nullptr) { + return Handle{handleimpl::makeInvalidReferenceException()}; + } + if UNLIKELY (!(bh.wrapper()->dynamicTypeInfo() == typeid(T))) { + handleimpl::throwConvertTypeError(typeid(T), bh.wrapper()->dynamicTypeInfo()); + } Wrapper const* wrapper = static_cast const*>(basicWrapper); return Handle(wrapper->product(), bh.provenance()); diff --git a/DataFormats/Common/interface/DetSetVectorNew.h b/DataFormats/Common/interface/DetSetVectorNew.h index f9b95cb45f5d7..c0885492ca9ff 100644 --- a/DataFormats/Common/interface/DetSetVectorNew.h +++ b/DataFormats/Common/interface/DetSetVectorNew.h @@ -107,11 +107,11 @@ namespace edmNew { size = rh.size; return *this; } - Item(Item&& rh) noexcept : id(std::move(rh.id)), offset(int(rh.offset)), size(std::move(rh.size)) {} + Item(Item&& rh) noexcept : id(rh.id), offset(int(rh.offset)), size(rh.size) {} Item& operator=(Item&& rh) noexcept { - id = std::move(rh.id); + id = rh.id; offset = int(rh.offset); - size = std::move(rh.size); + size = rh.size; return *this; } diff --git a/DataFormats/Common/interface/Ref.h b/DataFormats/Common/interface/Ref.h index 587d5addab22f..c5fbfcc4a10eb 100644 --- a/DataFormats/Common/interface/Ref.h +++ b/DataFormats/Common/interface/Ref.h @@ -253,7 +253,7 @@ namespace edm { key_type index() const { return index_; } /// Returns true if container referenced by the Ref has been cached - bool hasProductCache() const { return product_.productPtr() != 0; } + bool hasProductCache() const { return product_.productPtr() != nullptr; } /// Checks if collection is in memory or available /// in the Event. No type checking is done. diff --git a/DataFormats/Common/interface/RefProd.h b/DataFormats/Common/interface/RefProd.h index 63716d2ecdc79..b5f40fd293bcf 100644 --- a/DataFormats/Common/interface/RefProd.h +++ b/DataFormats/Common/interface/RefProd.h @@ -127,7 +127,7 @@ namespace edm { EDProductGetter const* productGetter() const { return product_.productGetter(); } /// Checks if product is in memory. - bool hasCache() const { return product_.productPtr() != 0; } + bool hasCache() const { return product_.productPtr() != nullptr; } /// Checks if product is in memory. bool hasProductCache() const { return hasCache(); } diff --git a/DataFormats/Common/interface/ValidHandle.h b/DataFormats/Common/interface/ValidHandle.h index cdd373980df2d..5756de8108fda 100644 --- a/DataFormats/Common/interface/ValidHandle.h +++ b/DataFormats/Common/interface/ValidHandle.h @@ -22,12 +22,12 @@ namespace edm { using element_type = T; ValidHandle() = delete; - ValidHandle(T const* prod, ProductID id) noexcept(false) : product_(prod), id_(std::move(id)) { + ValidHandle(T const* prod, ProductID id) noexcept(false) : product_(prod), id_(id) { vhhelper::throwIfNotValid(prod); } //NOTE: C++ disallows references to null - ValidHandle(T const& prod, ProductID id) noexcept(true) : product_(&prod), id_(std::move(id)) {} + ValidHandle(T const& prod, ProductID id) noexcept(true) : product_(&prod), id_(id) {} ValidHandle(const ValidHandle&) = default; ValidHandle& operator=(ValidHandle const& rhs) = default; ~ValidHandle() = default; diff --git a/DataFormats/Common/interface/getThinned_implementation.h b/DataFormats/Common/interface/getThinned_implementation.h index fe944b439f579..7bb45fe925a7b 100644 --- a/DataFormats/Common/interface/getThinned_implementation.h +++ b/DataFormats/Common/interface/getThinned_implementation.h @@ -139,9 +139,9 @@ namespace edm { return ThinnedOrSlimmedProduct(); } - auto makeThinnedIndexes(std::vector const& keys, - std::vector const& foundContainers, - ThinnedAssociation const* thinnedAssociation) { + inline auto makeThinnedIndexes(std::vector const& keys, + std::vector const& foundContainers, + ThinnedAssociation const* thinnedAssociation) { unsigned const nKeys = keys.size(); std::vector thinnedIndexes(nKeys, kThinningDoNotLookForThisIndex); bool hasAny = false; diff --git a/DataFormats/DetId/src/classes_def.xml b/DataFormats/DetId/src/classes_def.xml index 7db1607301a92..f40627c9d7962 100644 --- a/DataFormats/DetId/src/classes_def.xml +++ b/DataFormats/DetId/src/classes_def.xml @@ -4,6 +4,7 @@ + diff --git a/DataFormats/GeometryVector/src/TrackingJacobians.cc b/DataFormats/GeometryVector/src/TrackingJacobians.cc index 9f3c1ba311219..8d93991c95d65 100644 --- a/DataFormats/GeometryVector/src/TrackingJacobians.cc +++ b/DataFormats/GeometryVector/src/TrackingJacobians.cc @@ -36,10 +36,8 @@ AlgebraicMatrix65 jacobianCurvilinearToCartesian(const GlobalVector& momentum, i R(5, 5) = 1.; double p = pvec.mag(), p2 = p * p; - double lambda = 0.5 * M_PI - pvec.theta(); - double phi = pvec.phi(); - double sinlambda = sin(lambda), coslambda = cos(lambda); - double sinphi = sin(phi), cosphi = cos(phi); + double sinlambda = pvec.z() / p, coslambda = pt / p; + double sinphi = pvec.y() / pt, cosphi = pvec.x() / pt; theJacobian(1, 3) = 1.; theJacobian(2, 4) = 1.; diff --git a/DataFormats/GeometryVector/test/PhiTest.cc b/DataFormats/GeometryVector/test/PhiTest.cc index a5245089b8913..e8e6eccf9fe4b 100644 --- a/DataFormats/GeometryVector/test/PhiTest.cc +++ b/DataFormats/GeometryVector/test/PhiTest.cc @@ -57,7 +57,7 @@ static int testSmall() { // Test with long double template static int iterationTest(valType increm) { Phi ang1 = 0.; - const int iters = 123456789; + const int iters = 1000 * 1000; steady_clock::time_point startTime = steady_clock::now(); for (int cnt = 0; cnt < iters; ++cnt) { ang1 += increm; @@ -88,7 +88,7 @@ static int iterationTest(valType increm) { template static int iter3Test(valType increm) { // const int iters = 1234567899; - const int iters = 1234567980; + const int iters = 1000 * 1000; valType ang1 = 0.; steady_clock::time_point startTime = steady_clock::now(); for (int cnt = 0; cnt < iters; ++cnt) { diff --git a/DataFormats/L1Trigger/interface/Vertex.h b/DataFormats/L1Trigger/interface/Vertex.h index 78661e7b73893..dee272c48c7fd 100644 --- a/DataFormats/L1Trigger/interface/Vertex.h +++ b/DataFormats/L1Trigger/interface/Vertex.h @@ -17,14 +17,16 @@ namespace l1t { typedef TTTrack Track_t; Vertex(); - Vertex(float z0, const std::vector>& tracks); + Vertex(float pt, float z0, const std::vector>& tracks); ~Vertex(); + float pt() const; float z0() const; const std::vector>& tracks() const; private: + float pt_; float z0_; std::vector> tracks_; }; diff --git a/DataFormats/L1Trigger/src/Vertex.cc b/DataFormats/L1Trigger/src/Vertex.cc index 87e58a64a2c78..8ec64092a8742 100644 --- a/DataFormats/L1Trigger/src/Vertex.cc +++ b/DataFormats/L1Trigger/src/Vertex.cc @@ -2,12 +2,15 @@ namespace l1t { - Vertex::Vertex() : z0_(0.0) {} + Vertex::Vertex() : pt_(0.0), z0_(0.0) {} - Vertex::Vertex(float z0, const std::vector>& tracks) : z0_(z0), tracks_(tracks) {} + Vertex::Vertex(float pt, float z0, const std::vector>& tracks) + : pt_(pt), z0_(z0), tracks_(tracks) {} Vertex::~Vertex() {} + float Vertex::pt() const { return pt_; } + float Vertex::z0() const { return z0_; } const std::vector>& Vertex::tracks() const { return tracks_; } diff --git a/DataFormats/L1Trigger/src/classes_def.xml b/DataFormats/L1Trigger/src/classes_def.xml index a2e7a39a30193..0bd493b85b81b 100644 --- a/DataFormats/L1Trigger/src/classes_def.xml +++ b/DataFormats/L1Trigger/src/classes_def.xml @@ -280,7 +280,8 @@ - + + diff --git a/DataFormats/MuonData/interface/MuonDigiCollection.h b/DataFormats/MuonData/interface/MuonDigiCollection.h index e0800d7bf461c..fffc020285d82 100644 --- a/DataFormats/MuonData/interface/MuonDigiCollection.h +++ b/DataFormats/MuonData/interface/MuonDigiCollection.h @@ -56,7 +56,7 @@ class DigiContainerIterator { bool operator!=(const DigiContainerIterator& x) const { return x.base_ != base_; } - value_type operator*(void)const { + value_type operator*(void) const { return std::make_pair(base_->first, std::make_pair(base_->second.begin(), base_->second.end())); } diff --git a/DataFormats/PatCandidates/interface/PackedCandidate.h b/DataFormats/PatCandidates/interface/PackedCandidate.h index c882b3d80cf77..6bca9f611d4d0 100644 --- a/DataFormats/PatCandidates/interface/PackedCandidate.h +++ b/DataFormats/PatCandidates/interface/PackedCandidate.h @@ -254,7 +254,7 @@ namespace pat { track_(iOther.track_.exchange(nullptr)), pdgId_(iOther.pdgId_), qualityFlags_(iOther.qualityFlags_), - pvRefProd_(std::move(iOther.pvRefProd_)), + pvRefProd_(iOther.pvRefProd_), pvRefKey_(iOther.pvRefKey_), m_(iOther.m_.exchange(nullptr)), packedHits_(iOther.packedHits_), diff --git a/DataFormats/PatCandidates/interface/PackedGenParticle.h b/DataFormats/PatCandidates/interface/PackedGenParticle.h index 207aa58657ca0..897ecf2135cf0 100644 --- a/DataFormats/PatCandidates/interface/PackedGenParticle.h +++ b/DataFormats/PatCandidates/interface/PackedGenParticle.h @@ -99,7 +99,7 @@ namespace pat { dphi_(iOther.dphi_), pdgId_(iOther.pdgId_), charge_(iOther.charge_), - mother_(std::move(iOther.mother_)), + mother_(iOther.mother_), statusFlags_(iOther.statusFlags_) { if (iOther.p4c_) { p4_.store(p4_.exchange(nullptr)); @@ -126,7 +126,7 @@ namespace pat { dphi_ = iOther.dphi_; pdgId_ = iOther.pdgId_; charge_ = iOther.charge_; - mother_ = std::move(iOther.mother_); + mother_ = iOther.mother_; statusFlags_ = iOther.statusFlags_; } return *this; diff --git a/DataFormats/PatCandidates/src/Muon.cc b/DataFormats/PatCandidates/src/Muon.cc index 51bd0c0bd3488..5cd864cfa4c5f 100644 --- a/DataFormats/PatCandidates/src/Muon.cc +++ b/DataFormats/PatCandidates/src/Muon.cc @@ -164,11 +164,13 @@ void Muon::initSimInfo() { simPdgId_ = 0; simMotherPdgId_ = 0; simBX_ = 999; + simTpEvent_ = 0; simProdRho_ = 0.0; simProdZ_ = 0.0; simPt_ = 0.0; simEta_ = 0.0; simPhi_ = 0.0; + simMatchQuality_ = 0.0; } /// reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) diff --git a/DataFormats/Provenance/interface/BranchKey.h b/DataFormats/Provenance/interface/BranchKey.h index 3e7a2b1d5e04b..3da152d5b496d 100644 --- a/DataFormats/Provenance/interface/BranchKey.h +++ b/DataFormats/Provenance/interface/BranchKey.h @@ -36,19 +36,14 @@ namespace edm { }; inline bool operator<(BranchKey const& a, BranchKey const& b) { - return a.friendlyClassName() < b.friendlyClassName() - ? true - : a.friendlyClassName() > b.friendlyClassName() - ? false - : a.moduleLabel() < b.moduleLabel() - ? true - : a.moduleLabel() > b.moduleLabel() - ? false - : a.productInstanceName() < b.productInstanceName() - ? true - : a.productInstanceName() > b.productInstanceName() - ? false - : a.processName() < b.processName() ? true : false; + return a.friendlyClassName() < b.friendlyClassName() ? true + : a.friendlyClassName() > b.friendlyClassName() ? false + : a.moduleLabel() < b.moduleLabel() ? true + : a.moduleLabel() > b.moduleLabel() ? false + : a.productInstanceName() < b.productInstanceName() ? true + : a.productInstanceName() > b.productInstanceName() ? false + : a.processName() < b.processName() ? true + : false; } inline bool operator==(BranchKey const& a, BranchKey const& b) { return !(a < b || b < a); } diff --git a/DataFormats/TrackReco/interface/HitPattern.h b/DataFormats/TrackReco/interface/HitPattern.h index db12c742742fa..6b5b8d1e1506e 100644 --- a/DataFormats/TrackReco/interface/HitPattern.h +++ b/DataFormats/TrackReco/interface/HitPattern.h @@ -521,16 +521,18 @@ namespace reco { template bool HitPattern::appendHits(const I &begin, const I &end, const TrackerTopology &ttopo) { for (I hit = begin; hit != end; hit++) { - if - UNLIKELY((!appendHit(*hit, ttopo))) { return false; } + if UNLIKELY ((!appendHit(*hit, ttopo))) { + return false; + } } return true; } inline uint16_t HitPattern::getHitPattern(HitCategory category, int position) const { std::pair range = getCategoryIndexRange(category); - if - UNLIKELY((position < 0 || (position + range.first) >= range.second)) { return HitPattern::EMPTY_PATTERN; } + if UNLIKELY ((position < 0 || (position + range.first) >= range.second)) { + return HitPattern::EMPTY_PATTERN; + } return getHitPatternByAbsoluteIndex(range.first + position); } @@ -571,24 +573,27 @@ namespace reco { } inline bool HitPattern::pixelHitFilter(uint16_t pattern) { - if - UNLIKELY(!trackerHitFilter(pattern)) { return false; } + if UNLIKELY (!trackerHitFilter(pattern)) { + return false; + } uint32_t substructure = getSubStructure(pattern); return (substructure == PixelSubdetector::PixelBarrel || substructure == PixelSubdetector::PixelEndcap); } inline bool HitPattern::pixelBarrelHitFilter(uint16_t pattern) { - if - UNLIKELY(!trackerHitFilter(pattern)) { return false; } + if UNLIKELY (!trackerHitFilter(pattern)) { + return false; + } uint32_t substructure = getSubStructure(pattern); return (substructure == PixelSubdetector::PixelBarrel); } inline bool HitPattern::pixelEndcapHitFilter(uint16_t pattern) { - if - UNLIKELY(!trackerHitFilter(pattern)) { return false; } + if UNLIKELY (!trackerHitFilter(pattern)) { + return false; + } uint32_t substructure = getSubStructure(pattern); return (substructure == PixelSubdetector::PixelEndcap); @@ -599,8 +604,9 @@ namespace reco { } inline bool HitPattern::stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure) { - if - UNLIKELY(!trackerHitFilter(pattern)) { return false; } + if UNLIKELY (!trackerHitFilter(pattern)) { + return false; + } return substructure == getSubStructure(pattern); } @@ -622,40 +628,44 @@ namespace reco { } inline bool HitPattern::muonDTHitFilter(uint16_t pattern) { - if - UNLIKELY(!muonHitFilter(pattern)) { return false; } + if UNLIKELY (!muonHitFilter(pattern)) { + return false; + } uint32_t substructure = getSubStructure(pattern); return (substructure == (uint32_t)MuonSubdetId::DT); } inline bool HitPattern::muonCSCHitFilter(uint16_t pattern) { - if - UNLIKELY(!muonHitFilter(pattern)) { return false; } + if UNLIKELY (!muonHitFilter(pattern)) { + return false; + } uint32_t substructure = getSubStructure(pattern); return (substructure == (uint32_t)MuonSubdetId::CSC); } inline bool HitPattern::muonRPCHitFilter(uint16_t pattern) { - if - UNLIKELY(!muonHitFilter(pattern)) { return false; } + if UNLIKELY (!muonHitFilter(pattern)) { + return false; + } uint32_t substructure = getSubStructure(pattern); return (substructure == (uint32_t)MuonSubdetId::RPC); } inline bool HitPattern::muonGEMHitFilter(uint16_t pattern) { - if - UNLIKELY(!muonHitFilter(pattern)) { return false; } + if UNLIKELY (!muonHitFilter(pattern)) { + return false; + } uint32_t substructure = getSubStructure(pattern); return (substructure == (uint32_t)MuonSubdetId::GEM); } inline bool HitPattern::muonME0HitFilter(uint16_t pattern) { - if - UNLIKELY(!muonHitFilter(pattern)) return false; + if UNLIKELY (!muonHitFilter(pattern)) + return false; uint16_t substructure = getSubStructure(pattern); return (substructure == (uint16_t)MuonSubdetId::ME0); } @@ -665,36 +675,39 @@ namespace reco { } inline bool HitPattern::muonHitFilter(uint16_t pattern) { - if - UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) { return false; } + if UNLIKELY (pattern == HitPattern::EMPTY_PATTERN) { + return false; + } return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 0); } inline bool HitPattern::timingBTLHitFilter(uint16_t pattern) { - if - UNLIKELY(!timingHitFilter(pattern)) return false; + if UNLIKELY (!timingHitFilter(pattern)) + return false; uint16_t substructure = getSubStructure(pattern); return (substructure == (uint16_t)MTDDetId::BTL); } inline bool HitPattern::timingETLHitFilter(uint16_t pattern) { - if - UNLIKELY(!timingHitFilter(pattern)) return false; + if UNLIKELY (!timingHitFilter(pattern)) + return false; uint16_t substructure = getSubStructure(pattern); return (substructure == (uint16_t)MTDDetId::ETL); } inline bool HitPattern::timingHitFilter(uint16_t pattern) { - if - UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) { return false; } + if UNLIKELY (pattern == HitPattern::EMPTY_PATTERN) { + return false; + } return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 2); } inline uint32_t HitPattern::getSubStructure(uint16_t pattern) { - if - UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) { return NULL_RETURN; } + if UNLIKELY (pattern == HitPattern::EMPTY_PATTERN) { + return NULL_RETURN; + } return ((pattern >> SubstrOffset) & SubstrMask); } @@ -702,29 +715,33 @@ namespace reco { inline uint32_t HitPattern::getLayer(uint16_t pattern) { return HitPattern::getSubSubStructure(pattern); } inline uint32_t HitPattern::getSubSubStructure(uint16_t pattern) { - if - UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) { return NULL_RETURN; } + if UNLIKELY (pattern == HitPattern::EMPTY_PATTERN) { + return NULL_RETURN; + } return ((pattern >> LayerOffset) & LayerMask); } inline uint32_t HitPattern::getSubDetector(uint16_t pattern) { - if - UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) { return NULL_RETURN; } + if UNLIKELY (pattern == HitPattern::EMPTY_PATTERN) { + return NULL_RETURN; + } return ((pattern >> SubDetectorOffset) & SubDetectorMask); } inline uint32_t HitPattern::getSide(uint16_t pattern) { - if - UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) { return NULL_RETURN; } + if UNLIKELY (pattern == HitPattern::EMPTY_PATTERN) { + return NULL_RETURN; + } return (pattern >> SideOffset) & SideMask; } inline uint32_t HitPattern::getHitType(uint16_t pattern) { - if - UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) { return NULL_RETURN; } + if UNLIKELY (pattern == HitPattern::EMPTY_PATTERN) { + return NULL_RETURN; + } return ((pattern >> HitTypeOffset) & HitTypeMask); } @@ -739,8 +756,9 @@ namespace reco { uint16_t subSubStructure = getSubSubStructure(pattern); uint16_t stat = subSubStructure >> 2; - if - LIKELY(stat <= 1) { return ((subSubStructure >> 1) & 1) + 1; } + if LIKELY (stat <= 1) { + return ((subSubStructure >> 1) & 1) + 1; + } return 0; } diff --git a/DataFormats/TrackReco/src/HitPattern.cc b/DataFormats/TrackReco/src/HitPattern.cc index 6c878bd8d81e7..8f13a068125e0 100644 --- a/DataFormats/TrackReco/src/HitPattern.cc +++ b/DataFormats/TrackReco/src/HitPattern.cc @@ -204,8 +204,9 @@ bool HitPattern::appendHit(const TrackingRecHit& hit, const TrackerTopology& tto bool HitPattern::appendHit(const DetId& id, TrackingRecHit::Type hitType, const TrackerTopology& ttopo) { //if HitPattern is full, journey ends no matter what. - if - UNLIKELY((hitCount == HitPattern::MaxHits)) { return false; } + if UNLIKELY ((hitCount == HitPattern::MaxHits)) { + return false; + } uint16_t pattern = HitPattern::encode(id, hitType, ttopo); @@ -214,8 +215,9 @@ bool HitPattern::appendHit(const DetId& id, TrackingRecHit::Type hitType, const bool HitPattern::appendHit(const uint16_t pattern, TrackingRecHit::Type hitType) { //if HitPattern is full, journey ends no matter what. - if - UNLIKELY((hitCount == HitPattern::MaxHits)) { return false; } + if UNLIKELY ((hitCount == HitPattern::MaxHits)) { + return false; + } switch (hitType) { case TrackingRecHit::valid: @@ -226,47 +228,41 @@ bool HitPattern::appendHit(const uint16_t pattern, TrackingRecHit::Type hitType) // 0 != beginT || 0 != endT => we already have hits of T type // so we already have hits of T in the vector and we don't want to // mess them with T' hits. - if - UNLIKELY(((hitCount != endTrackHits) && (0 != beginTrackHits || 0 != endTrackHits))) { - cms::Exception("HitPattern") - << "TRACK_HITS" - << " were stored on this object before hits of some other category were inserted " - << "but hits of the same category should be inserted in a row. " - << "Please rework the code so it inserts all " - << "TRACK_HITS" - << " in a row."; - return false; - } + if UNLIKELY (((hitCount != endTrackHits) && (0 != beginTrackHits || 0 != endTrackHits))) { + cms::Exception("HitPattern") << "TRACK_HITS" + << " were stored on this object before hits of some other category were inserted " + << "but hits of the same category should be inserted in a row. " + << "Please rework the code so it inserts all " + << "TRACK_HITS" + << " in a row."; + return false; + } return insertTrackHit(pattern); break; case TrackingRecHit::inactive_inner: case TrackingRecHit::missing_inner: - if - UNLIKELY(((hitCount != endInner) && (0 != beginInner || 0 != endInner))) { - cms::Exception("HitPattern") - << "MISSING_INNER_HITS" - << " were stored on this object before hits of some other category were inserted " - << "but hits of the same category should be inserted in a row. " - << "Please rework the code so it inserts all " - << "MISSING_INNER_HITS" - << " in a row."; - return false; - } + if UNLIKELY (((hitCount != endInner) && (0 != beginInner || 0 != endInner))) { + cms::Exception("HitPattern") << "MISSING_INNER_HITS" + << " were stored on this object before hits of some other category were inserted " + << "but hits of the same category should be inserted in a row. " + << "Please rework the code so it inserts all " + << "MISSING_INNER_HITS" + << " in a row."; + return false; + } return insertExpectedInnerHit(pattern); break; case TrackingRecHit::inactive_outer: case TrackingRecHit::missing_outer: - if - UNLIKELY(((hitCount != endOuter) && (0 != beginOuter || 0 != endOuter))) { - cms::Exception("HitPattern") - << "MISSING_OUTER_HITS" - << " were stored on this object before hits of some other category were inserted " - << "but hits of the same category should be inserted in a row. " - << "Please rework the code so it inserts all " - << "MISSING_OUTER_HITS" - << " in a row."; - return false; - } + if UNLIKELY (((hitCount != endOuter) && (0 != beginOuter || 0 != endOuter))) { + cms::Exception("HitPattern") << "MISSING_OUTER_HITS" + << " were stored on this object before hits of some other category were inserted " + << "but hits of the same category should be inserted in a row. " + << "Please rework the code so it inserts all " + << "MISSING_OUTER_HITS" + << " in a row."; + return false; + } return insertExpectedOuterHit(pattern); break; } @@ -280,23 +276,24 @@ bool HitPattern::appendTrackerHit(uint16_t subdet, uint16_t layer, uint16_t ster bool HitPattern::appendMuonHit(const DetId& id, TrackingRecHit::Type hitType) { //if HitPattern is full, journey ends no matter what. - if - UNLIKELY((hitCount == HitPattern::MaxHits)) { return false; } + if UNLIKELY ((hitCount == HitPattern::MaxHits)) { + return false; + } - if - UNLIKELY(id.det() != DetId::Muon) { - throw cms::Exception("HitPattern") - << "Got DetId from det " << id.det() - << " that is not Muon in appendMuonHit(), which should only be used for muon hits in the HitPattern IO rule"; - } + if UNLIKELY (id.det() != DetId::Muon) { + throw cms::Exception("HitPattern") + << "Got DetId from det " << id.det() + << " that is not Muon in appendMuonHit(), which should only be used for muon hits in the HitPattern IO rule"; + } uint16_t subdet = id.subdetId(); return appendHit(encode(MUON_HIT, subdet, encodeMuonLayer(id), 0, hitType), hitType); } uint16_t HitPattern::getHitPatternByAbsoluteIndex(int position) const { - if - UNLIKELY((position < 0 || position >= hitCount)) { return HitPattern::EMPTY_PATTERN; } + if UNLIKELY ((position < 0 || position >= hitCount)) { + return HitPattern::EMPTY_PATTERN; + } /* Note: you are not taking a consecutive sequence of HIT_LENGTH bits starting from position * HIT_LENGTH as the bit order in the words are reversed. @@ -495,8 +492,8 @@ int HitPattern::pixelLayersWithMeasurement() const { std::pair range = getCategoryIndexRange(category); for (int i = range.first; i < range.second; ++i) { auto pattern = getHitPatternByAbsoluteIndex(i); - if - UNLIKELY(!trackerHitFilter(pattern)) continue; + if UNLIKELY (!trackerHitFilter(pattern)) + continue; if (pattern > minStripWord) continue; uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask; @@ -516,8 +513,8 @@ int HitPattern::trackerLayersWithMeasurement() const { std::pair range = getCategoryIndexRange(category); for (int i = range.first; i < range.second; ++i) { auto pattern = getHitPatternByAbsoluteIndex(i); - if - UNLIKELY(!trackerHitFilter(pattern)) continue; + if UNLIKELY (!trackerHitFilter(pattern)) + continue; uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask; if (hitType != HIT_TYPE::VALID) continue; @@ -535,8 +532,8 @@ int HitPattern::trackerLayersWithoutMeasurement(HitCategory category) const { std::pair range = getCategoryIndexRange(category); for (int i = range.first; i < range.second; ++i) { auto pattern = getHitPatternByAbsoluteIndex(i); - if - UNLIKELY(!trackerHitFilter(pattern)) continue; + if UNLIKELY (!trackerHitFilter(pattern)) + continue; uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask; pattern = (pattern - minTrackerWord) >> LayerOffset; // assert(pattern<128); @@ -969,12 +966,11 @@ bool HitPattern::insertTrackHit(const uint16_t pattern) { // empty index. // unlikely, because it will happen only when inserting // the first hit of this type - if - UNLIKELY((0 == beginTrackHits && 0 == endTrackHits)) { - beginTrackHits = hitCount; - // before the first hit of this type is inserted, there are no hits - endTrackHits = beginTrackHits; - } + if UNLIKELY ((0 == beginTrackHits && 0 == endTrackHits)) { + beginTrackHits = hitCount; + // before the first hit of this type is inserted, there are no hits + endTrackHits = beginTrackHits; + } insertHit(pattern); endTrackHits++; @@ -983,11 +979,10 @@ bool HitPattern::insertTrackHit(const uint16_t pattern) { } bool HitPattern::insertExpectedInnerHit(const uint16_t pattern) { - if - UNLIKELY((0 == beginInner && 0 == endInner)) { - beginInner = hitCount; - endInner = beginInner; - } + if UNLIKELY ((0 == beginInner && 0 == endInner)) { + beginInner = hitCount; + endInner = beginInner; + } insertHit(pattern); endInner++; @@ -996,11 +991,10 @@ bool HitPattern::insertExpectedInnerHit(const uint16_t pattern) { } bool HitPattern::insertExpectedOuterHit(const uint16_t pattern) { - if - UNLIKELY((0 == beginOuter && 0 == endOuter)) { - beginOuter = hitCount; - endOuter = beginOuter; - } + if UNLIKELY ((0 == beginOuter && 0 == endOuter)) { + beginOuter = hitCount; + endOuter = beginOuter; + } insertHit(pattern); endOuter++; diff --git a/DetectorDescription/Core/interface/DDValuePair.h b/DetectorDescription/Core/interface/DDValuePair.h index 89ee55e409869..6d988b9aaf605 100644 --- a/DetectorDescription/Core/interface/DDValuePair.h +++ b/DetectorDescription/Core/interface/DDValuePair.h @@ -11,8 +11,8 @@ struct DDValuePair : public std::pair { DDValuePair(const std::string& s) : std::pair(s, 0) {} DDValuePair(double d) : std::pair("", d) {} - operator const std::string &() const { return first; } - operator std::string &() { return first; } + operator const std::string&() const { return first; } + operator std::string&() { return first; } operator const double&() const { return second; } operator double&() { return second; } }; diff --git a/DetectorDescription/RegressionTest/bin/DDErrorReport.cpp b/DetectorDescription/RegressionTest/bin/DDErrorReport.cpp index 34567a36ff608..a4f74cd91f394 100644 --- a/DetectorDescription/RegressionTest/bin/DDErrorReport.cpp +++ b/DetectorDescription/RegressionTest/bin/DDErrorReport.cpp @@ -31,10 +31,11 @@ int main(int argc, char* argv[]) { "file,f", boost::program_options::value(), "XML configuration file name. " - "Default is DetectorDescription/RegressionTest/test/configuration.xml")( - "path,p", - "Specifies filename is a full path and not to use FileInPath to find file. " - " This option is ignored if a filename is not specified"); + "Default is DetectorDescription/RegressionTest/test/configuration.xml")("path,p", + "Specifies filename is a full path and " + "not to use FileInPath to find file. " + " This option is ignored if a filename " + "is not specified"); boost::program_options::positional_options_description p; p.add("file", -1); diff --git a/DetectorDescription/Schema/CDLSchema.xsd b/DetectorDescription/Schema/CDLSchema.xsd deleted file mode 100644 index 368a2641a190b..0000000000000 --- a/DetectorDescription/Schema/CDLSchema.xsd +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - This schema describes which files should be selected for a particular detector description (a configuration). - It consists of an Include and Exclude part. - Files and Sections can be included or excluded. - Within files and sections there can be references to other sections and/or file. - With "propagate=true" you specify that these files and sections should also be included. - The level attribute determines the level. - e.g level=3 means "a specified file", files that are referenced by this file, files that are referenced by files that are referenced by this file, and files that are referenced by files that are referenced by files that are referenced by this file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DetectorDescription/Schema/DDLSchema.xsd b/DetectorDescription/Schema/DDLSchema.xsd deleted file mode 100644 index f6459a7eb3b3b..0000000000000 --- a/DetectorDescription/Schema/DDLSchema.xsd +++ /dev/null @@ -1,1434 +0,0 @@ - - - - - - This schema defines the Detector Description Language (DDL) for specifying the parts, materials and positioning of component parts of a physical detector being built. It is intended for use in simulating the detector in software, visualizing the detector, and reconstructing events off line. High Energy Physics experiments require the building of extremely complex detectors which need to have some common source for the geometry. The DDL is is part of the Detector Description Database (DDD) prototype which allows for any source to be used. This XML is one such example. - - - The names of each object which is needed by the DDD allow the specification of a namespace followed by colon, then the local name. It is important to note if you are authoring one of these XML documents that this and other rules are implied and documented below. - - - This schema document is structured as follows. Each group of types, elements, groups (attribute or otherwise) corresponds to a major section of the schema. Each section should be ordered in that order (types, elements, groups). - - - - - - - - - - - - - - - - - This is the main or root element of any DDL document. Inside it, you can place any of the sections described below. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This type describes references between data. Six (6) reference type elements have been identified. These point respectively to: Solids, Materials, Rotations, ReflectionRotationCMSIMs and LogicalParts. It would have been possible to use Xlink/xpointer or key/keyrefs. But xlink is a very verbose way of describing links, and key/keyrefs are only defined on one file. The name being referred to conforms to the syntax namespace:name. In the DDL, the namespace is the XML filename that contains the named object. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This type describes a selection mechanism for parts. It allows, for example, for association between a set of parameters and a set of parts. The syntax is defined as follows: - - Path := "//" LogicalPartName (Element)* - Element := LogicalPartNavigator | PositionedPartNavigator - LogicalPartNavigator := Nav TName - TName := NameSpace ":" Name | Name - PositionedPartNavigator := LogicalPartNavigator "[" CopyNumber "]" - CopyNumber := PositiveCopyNumber | NegativeCopyNumber - NegativeCopyNumber := "-" PositiveCopyNumber - Nav := "//" | "/" - PositiveCopyNumber := ["+"] (0..9)+ - NameSpace := StringName - Name := StringName - - I'm not sure about the following description. Basically, I want alpha-numeric names, and allow "_" (underscore) - StringName := Alpha (AlphaNumeric)* - Alpha := (a..z) | (A..Z) - AlphaNumeric := Alpha | (0..9) | "_" - - // indicates "every". For example //Ring would refer to all Parts named Ring. - / indicates "immediate child of". For example //Ring[1]/CSCType1 would indicate all CSCType1 elements that are immediate children of Ring with CopyNumber 1. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Rotations are defined in four ways (five if you count Reflections). They are Rotation, RotationByAxis, RotationSequence and the old way of rotating which I now call RotationCMSIM. The 5th would be ReflectionRotationCMSIM - - - - - - - - - - - - - - - - - - - - - - - - This new rotation type allow users to specify rotations around an axis. - - - - - - - - - - - - - This new rotation type allow users to specify a sequence of rotations around an axis - - - - - - - - - - - - - - - - This type is simply used to define translations for the positioning instructions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Certain primitive types are overloaded within the DDL. The reason is maintainability. When reading data it will be easier to see how certain pieces need to interpreted. For example, instead of reading a float, it is possible to see that this is a length type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Definition of units. Attached to a type, users can specify the unit related to the type. For example for length this is m. cm. or mm. If this is not specified the default DDL unit is used. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The unit type describes the units that can be used if users define their own parameters attached to certain parts. This is not an exhaustive list, but tries to be as complete as possible. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ParameterType elements are used to specify named values for algorithmic positioning. They are also used by client applications of the DDD to specify parameters they need for their special use of the DDD. It allows such associated information to be attached within the DDD model so that the client application will not need to parse some other input file and synchronize that information with the parts in the detector. - - Parameter for part specific values, used in SpecPar. The eval attribute determines whether to evaluate the value or leave it as a string. TO BE DEPRECATED - String for part specific values in SpecPar. Never evaluated for expressions and/or constants. - Numeric for part specific values in SpecPar. Evaluated always by the evaluator. - Constant for specifying constants that can be used in expressions (for shapes and positioning) - are always evaluated. Should we just use Numeric and String in constant and again use existence of name attribute - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Describes the different types of solids that can be used in the definition of the detector description. Most of these descriptions are based on the GEANT (version 3 or 4) syntax. - - - - - - - - - By moving the rSolids into attributes we allow BooleanSolidType to be more compact and to allow Rotation or Translation to be defined inside the BooleanSolidtype. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - There are 2 types of material that inherit from the general material element: elementary materials and composite materials. Elementary materials describe materials such as oxygen, iron, etc.. composite are mixtures of material (which can themselves also be composites) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - It describes the definition of a logical part. A logicalpart definition is based on a solid and a type of material. These can either be defined "inline" or be referenced. - - - The category attribute is used to indicate which category the LogicalPart falls into, whether it is a sensitive volume, part of the cooling system, a support structure, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This element type is used to position LogicalParts within one another. - If rChild is called C, rParent is called P, Translation is called T and - the Rotation Options are called R then the possible combinations are: - CPTR PTRC RTCP TRCP CPT TCP - CPRT PTCR RTPC TRPC CPR TPC - CTPR PRTC RCTP TCRP CTP PCT CP - CTRP PRCT RCPT TCPR CRP PTC PC - CRTP PCRT RPCT TPRC RCP PCR - CRPT PCTR RPTC TPCR RPC PRC - - Because of ambiguity problems the options are limited to: - - CPRT = CPT CPR CP PCR PCT PC - RTCP = RCP and RTPC = RPC - TPRC = TPC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h index d3da09eb6eb64..a429280825839 100644 --- a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h +++ b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h @@ -94,7 +94,7 @@ namespace evf { if (streamLabel_.find(testPrefix) == 0) streamLabel_ = std::string("stream") + streamLabel_.substr(testPrefix.size()); - if (streamLabel_.find("_") != std::string::npos) { + if (streamLabel_.find('_') != std::string::npos) { throw cms::Exception("RecoEventOutputModuleForFU") << "Underscore character is reserved can not be used for " "stream names in FFF, but was detected in stream name -: " << streamLabel_; diff --git a/FWCore/Concurrency/scripts/edmStreamStallGrapher.py b/FWCore/Concurrency/scripts/edmStreamStallGrapher.py index d245335bb9d1c..24321411c6e65 100755 --- a/FWCore/Concurrency/scripts/edmStreamStallGrapher.py +++ b/FWCore/Concurrency/scripts/edmStreamStallGrapher.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function from builtins import range from itertools import groupby diff --git a/FWCore/FWLite/bin/storageSizeForBranch.cc b/FWCore/FWLite/bin/storageSizeForBranch.cc index 62258a6fd5885..c2c96b1183e8e 100644 --- a/FWCore/FWLite/bin/storageSizeForBranch.cc +++ b/FWCore/FWLite/bin/storageSizeForBranch.cc @@ -45,10 +45,11 @@ int main(int argc, char* argv[]) try { "file" "\nAllowed options"; boost::program_options::options_description desc(descString); - desc.add_options()(kHelpCommandOpt, "show this help message")(kEntryNumberCommandOpt, - boost::program_options::value(), - "read branch from the given entry value (default 0)")( - kBranchNameOpt, "name of branch")(kFileNameOpt, "name of file"); + desc.add_options()(kHelpCommandOpt, "show this help message")( + kEntryNumberCommandOpt, + boost::program_options::value(), + "read branch from the given entry value (default 0)")(kBranchNameOpt, "name of branch")(kFileNameOpt, + "name of file"); boost::program_options::positional_options_description p; p.add(kBranchNameOpt, 1); diff --git a/FWCore/Framework/bin/cmsRun.cpp b/FWCore/Framework/bin/cmsRun.cpp index 42bcf76b1b044..8b8f7a91f884f 100644 --- a/FWCore/Framework/bin/cmsRun.cpp +++ b/FWCore/Framework/bin/cmsRun.cpp @@ -151,6 +151,7 @@ int main(int argc, char* argv[]) { descString += "] config_file \nAllowed options"; boost::program_options::options_description desc(descString); + // clang-format off desc.add_options()(kHelpCommandOpt, "produce help message")( kParameterSetCommandOpt, boost::program_options::value(), "configuration file")( kJobreportCommandOpt, @@ -166,6 +167,7 @@ int main(int argc, char* argv[]) { kSizeOfStackForThreadCommandOpt, boost::program_options::value(), "Size of stack in KB to use for extra threads (0 is use system default size)")(kStrictOpt, "strict parsing"); + // clang-format on // anything at the end will be ignored, and sent to python boost::program_options::positional_options_description p; diff --git a/FWCore/Framework/bin/cmsRunPython3.cpp b/FWCore/Framework/bin/cmsRunPython3.cpp index fdfc2d37d2b9c..11fb2f1e41094 100644 --- a/FWCore/Framework/bin/cmsRunPython3.cpp +++ b/FWCore/Framework/bin/cmsRunPython3.cpp @@ -150,6 +150,7 @@ int main(int argc, char* argv[]) { descString += "] config_file \nAllowed options"; boost::program_options::options_description desc(descString); + // clang-format off desc.add_options()(kHelpCommandOpt, "produce help message")( kParameterSetCommandOpt, boost::program_options::value(), "configuration file")( kJobreportCommandOpt, @@ -165,6 +166,7 @@ int main(int argc, char* argv[]) { kSizeOfStackForThreadCommandOpt, boost::program_options::value(), "Size of stack in KB to use for extra threads (0 is use system default size)")(kStrictOpt, "strict parsing"); + // clang-format on // anything at the end will be ignored, and sent to python boost::program_options::positional_options_description p; diff --git a/FWCore/Framework/src/EDConsumerBase.cc b/FWCore/Framework/src/EDConsumerBase.cc index ec670f3ff0e94..6e0ba68161203 100644 --- a/FWCore/Framework/src/EDConsumerBase.cc +++ b/FWCore/Framework/src/EDConsumerBase.cc @@ -450,6 +450,10 @@ namespace { modules.push_back(it->second); } foundInLabelsToDesc = true; + } else { + if (label == "source") { + foundInLabelsToDesc = true; + } } } if (foundInLabelsToDesc) { diff --git a/FWCore/Framework/test/eventsetup_t.cppunit.cc b/FWCore/Framework/test/eventsetup_t.cppunit.cc index b8c4cabe2c3bc..5ccc7d1727419 100644 --- a/FWCore/Framework/test/eventsetup_t.cppunit.cc +++ b/FWCore/Framework/test/eventsetup_t.cppunit.cc @@ -614,132 +614,132 @@ namespace { }; //This just tests that the constructs will properly compile - class [[maybe_unused]] EDConsumesCollectorConsumer - : public edm::EDConsumerBase{EDConsumesCollectorConsumer(){using edm::eventsetup::test::DummyData; - { - [[maybe_unused]] edm::ESGetToken token1( - consumesCollector().esConsumes()); - [[maybe_unused]] edm::ESGetToken token2( - consumesCollector().esConsumes(edm::ESInputTag("Blah"))); - [[maybe_unused]] edm::ESGetToken token3( - consumesCollector().esConsumes()); - [[maybe_unused]] edm::ESGetToken token4( - consumesCollector().esConsumes( - edm::ESInputTag("Blah"))); - } - { - [[maybe_unused]] edm::ESGetToken token1(consumesCollector().esConsumes()); - [[maybe_unused]] edm::ESGetToken token2( - consumesCollector().esConsumes(edm::ESInputTag("Blah"))); - [[maybe_unused]] edm::ESGetToken token3( - consumesCollector().esConsumes()); - [[maybe_unused]] edm::ESGetToken token4( - consumesCollector().esConsumes(edm::ESInputTag("Blah"))); - } - { - [[maybe_unused]] edm::ESGetToken token1; - token1 = consumesCollector().esConsumes(); - [[maybe_unused]] edm::ESGetToken token2; - token2 = consumesCollector().esConsumes(edm::ESInputTag("Blah")); - [[maybe_unused]] edm::ESGetToken token3; - token3 = consumesCollector().esConsumes(); - [[maybe_unused]] edm::ESGetToken token4; - token4 = consumesCollector().esConsumes(edm::ESInputTag("Blah")); - } - -} // namespace -} -; - -class ConsumesProducer : public ESProducer { -public: - ConsumesProducer() : token_{setWhatProduced(this, "consumes").consumes()} {} - std::unique_ptr produce(const DummyRecord& iRecord) { - auto const& data = iRecord.get(token_); - return std::make_unique(data); - } - -private: - edm::ESGetToken token_; -}; - -class ConsumesFromProducer : public ESProducer { -public: - ConsumesFromProducer() - : token_{setWhatProduced(this, "consumesFrom").consumesFrom()} {} - std::unique_ptr produce(const DummyRecord& iRecord) { - auto const& data = iRecord.get(token_); - return std::make_unique(data); - } - -private: - edm::ESGetToken token_; -}; - -//This is used only to test compilation -class [[maybe_unused]] ESConsumesCollectorProducer : public ESProducer { -public: - struct Helper { - Helper(ESConsumesCollector iCollector) { + class [[maybe_unused]] EDConsumesCollectorConsumer : public edm::EDConsumerBase { + EDConsumesCollectorConsumer() { using edm::eventsetup::test::DummyData; { [[maybe_unused]] edm::ESGetToken token1( - iCollector.consumesFrom()); + consumesCollector().esConsumes()); [[maybe_unused]] edm::ESGetToken token2( - iCollector.consumesFrom(edm::ESInputTag("Blah"))); + consumesCollector().esConsumes(edm::ESInputTag("Blah"))); + [[maybe_unused]] edm::ESGetToken token3( + consumesCollector().esConsumes()); + [[maybe_unused]] edm::ESGetToken token4( + consumesCollector().esConsumes( + edm::ESInputTag("Blah"))); } { - [[maybe_unused]] edm::ESGetToken token1(iCollector.consumes()); + [[maybe_unused]] edm::ESGetToken token1(consumesCollector().esConsumes()); [[maybe_unused]] edm::ESGetToken token2( - iCollector.consumes(edm::ESInputTag("Blah"))); + consumesCollector().esConsumes(edm::ESInputTag("Blah"))); + [[maybe_unused]] edm::ESGetToken token3( + consumesCollector().esConsumes()); + [[maybe_unused]] edm::ESGetToken token4( + consumesCollector().esConsumes(edm::ESInputTag("Blah"))); } + { + [[maybe_unused]] edm::ESGetToken token1; + token1 = consumesCollector().esConsumes(); + [[maybe_unused]] edm::ESGetToken token2; + token2 = consumesCollector().esConsumes(edm::ESInputTag("Blah")); + [[maybe_unused]] edm::ESGetToken token3; + token3 = consumesCollector().esConsumes(); + [[maybe_unused]] edm::ESGetToken token4; + token4 = consumesCollector().esConsumes(edm::ESInputTag("Blah")); + } + + } // namespace + }; + + class ConsumesProducer : public ESProducer { + public: + ConsumesProducer() : token_{setWhatProduced(this, "consumes").consumes()} {} + std::unique_ptr produce(const DummyRecord& iRecord) { + auto const& data = iRecord.get(token_); + return std::make_unique(data); } + + private: + edm::ESGetToken token_; }; - ESConsumesCollectorProducer() : helper_(setWhatProduced(this, "consumesCollector")) {} + class ConsumesFromProducer : public ESProducer { + public: + ConsumesFromProducer() + : token_{setWhatProduced(this, "consumesFrom").consumesFrom()} {} + std::unique_ptr produce(const DummyRecord& iRecord) { + auto const& data = iRecord.get(token_); + return std::make_unique(data); + } - std::unique_ptr produce(const DummyRecord& iRecord) { - return std::unique_ptr(); - } + private: + edm::ESGetToken token_; + }; -private: - Helper helper_; -}; + //This is used only to test compilation + class [[maybe_unused]] ESConsumesCollectorProducer : public ESProducer { + public: + struct Helper { + Helper(ESConsumesCollector iCollector) { + using edm::eventsetup::test::DummyData; + { + [[maybe_unused]] edm::ESGetToken token1( + iCollector.consumesFrom()); + [[maybe_unused]] edm::ESGetToken token2( + iCollector.consumesFrom(edm::ESInputTag("Blah"))); + } + { + [[maybe_unused]] edm::ESGetToken token1(iCollector.consumes()); + [[maybe_unused]] edm::ESGetToken token2( + iCollector.consumes(edm::ESInputTag("Blah"))); + } + } + }; -class SetMayConsumeProducer : public ESProducer { -public: - SetMayConsumeProducer(bool iSucceed) : succeed_(iSucceed) { - setWhatProduced(this, label(iSucceed)) - .setMayConsume( - token_, - [iSucceed](auto& get, edm::ESTransientHandle const& handle) { - if (iSucceed) { - return get("", ""); - } - return get.nothing(); - }, - edm::ESProductTag("", "")); - } - std::unique_ptr produce(const DummyRecord& iRecord) { - auto const& data = iRecord.getHandle(token_); - CPPUNIT_ASSERT(data.isValid() == succeed_); - if (data.isValid()) { - return std::make_unique(*data); + ESConsumesCollectorProducer() : helper_(setWhatProduced(this, "consumesCollector")) {} + + std::unique_ptr produce(const DummyRecord& iRecord) { + return std::unique_ptr(); } - return std::unique_ptr(); - } -private: - static const char* label(bool iSucceed) noexcept { - if (iSucceed) { - return "setMayConsumeSucceed"; + private: + Helper helper_; + }; + + class SetMayConsumeProducer : public ESProducer { + public: + SetMayConsumeProducer(bool iSucceed) : succeed_(iSucceed) { + setWhatProduced(this, label(iSucceed)) + .setMayConsume( + token_, + [iSucceed](auto& get, edm::ESTransientHandle const& handle) { + if (iSucceed) { + return get("", ""); + } + return get.nothing(); + }, + edm::ESProductTag("", "")); + } + std::unique_ptr produce(const DummyRecord& iRecord) { + auto const& data = iRecord.getHandle(token_); + CPPUNIT_ASSERT(data.isValid() == succeed_); + if (data.isValid()) { + return std::make_unique(*data); + } + return std::unique_ptr(); } - return "setMayConsumeFail"; - } - edm::ESGetToken token_; - bool succeed_; -}; + private: + static const char* label(bool iSucceed) noexcept { + if (iSucceed) { + return "setMayConsumeSucceed"; + } + return "setMayConsumeFail"; + } + + edm::ESGetToken token_; + bool succeed_; + }; } // namespace diff --git a/FWCore/Framework/test/statemachine_t.cc b/FWCore/Framework/test/statemachine_t.cc index b663541ac4a17..4746f7b2a7234 100644 --- a/FWCore/Framework/test/statemachine_t.cc +++ b/FWCore/Framework/test/statemachine_t.cc @@ -20,9 +20,11 @@ int main(int argc, char* argv[]) try { std::string outputFile; boost::program_options::options_description desc("Allowed options"); desc.add_options()("help,h", "produce help message")( - "inputFile,i", boost::program_options::value(&inputFile)->default_value(""))( - "outputFile,o", - boost::program_options::value(&outputFile)->default_value("statemachine_test_output.txt")); + "inputFile,i", + boost::program_options::value(&inputFile) + ->default_value(""))("outputFile,o", + boost::program_options::value(&outputFile) + ->default_value("statemachine_test_output.txt")); boost::program_options::variables_map vm; boost::program_options::store(boost::program_options::parse_command_line(argc, argv, desc), vm); boost::program_options::notify(vm); diff --git a/FWCore/Integration/bin/interprocess.cc b/FWCore/Integration/bin/interprocess.cc index 09c469d608073..d8120b8910799 100644 --- a/FWCore/Integration/bin/interprocess.cc +++ b/FWCore/Integration/bin/interprocess.cc @@ -66,8 +66,9 @@ int main(int argc, char* argv[]) { boost::program_options::options_description desc(descString); desc.add_options()(kHelpCommandOpt, "produce help message")( - kMemoryNameCommandOpt, boost::program_options::value(), "memory name")( - kUniqueIDCommandOpt, boost::program_options::value(), "unique id"); + kMemoryNameCommandOpt, + boost::program_options::value(), + "memory name")(kUniqueIDCommandOpt, boost::program_options::value(), "unique id"); boost::program_options::positional_options_description p; p.add(kMemoryNameOpt, 1); diff --git a/FWCore/Integration/bin/interprocess_random.cc b/FWCore/Integration/bin/interprocess_random.cc index 82a3f2e5e4b04..c962c7657667b 100644 --- a/FWCore/Integration/bin/interprocess_random.cc +++ b/FWCore/Integration/bin/interprocess_random.cc @@ -58,8 +58,9 @@ int main(int argc, char* argv[]) { boost::program_options::options_description desc(descString); desc.add_options()(kHelpCommandOpt, "produce help message")( - kMemoryNameCommandOpt, boost::program_options::value(), "memory name")( - kUniqueIDCommandOpt, boost::program_options::value(), "unique id"); + kMemoryNameCommandOpt, + boost::program_options::value(), + "memory name")(kUniqueIDCommandOpt, boost::program_options::value(), "unique id"); boost::program_options::positional_options_description p; p.add(kMemoryNameOpt, 1); diff --git a/FWCore/Integration/test/AcquireIntStreamFilter.cc b/FWCore/Integration/test/AcquireIntStreamFilter.cc index 064c20e6afbcc..d435144ef426e 100644 --- a/FWCore/Integration/test/AcquireIntStreamFilter.cc +++ b/FWCore/Integration/test/AcquireIntStreamFilter.cc @@ -33,7 +33,7 @@ namespace edmtest { }; AcquireIntStreamFilter::AcquireIntStreamFilter(edm::ParameterSet const& pset) - : m_token{edm::Service{}->getToken()} { + : m_token{edm::Service()->getToken()} { for (auto const& tag : pset.getParameter>("tags")) { m_getTokens.emplace_back(consumes(tag)); } diff --git a/FWCore/Integration/test/AcquireIntStreamProducer.cc b/FWCore/Integration/test/AcquireIntStreamProducer.cc index 1aea30aaed69b..2e7e57e6e94ed 100644 --- a/FWCore/Integration/test/AcquireIntStreamProducer.cc +++ b/FWCore/Integration/test/AcquireIntStreamProducer.cc @@ -33,7 +33,7 @@ namespace edmtest { }; AcquireIntStreamProducer::AcquireIntStreamProducer(edm::ParameterSet const& pset) - : m_token{edm::Service{}->getToken()} { + : m_token{edm::Service()->getToken()} { for (auto const& tag : pset.getParameter>("tags")) { m_getTokens.emplace_back(consumes(tag)); } diff --git a/FWCore/Integration/test/BuildFile.xml b/FWCore/Integration/test/BuildFile.xml index d0b88cd5df008..b4653eef8091a 100644 --- a/FWCore/Integration/test/BuildFile.xml +++ b/FWCore/Integration/test/BuildFile.xml @@ -427,7 +427,15 @@ - + + + + + + + + + @@ -439,4 +447,6 @@ + + diff --git a/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc b/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc new file mode 100644 index 0000000000000..1084cea88ffcf --- /dev/null +++ b/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc @@ -0,0 +1,119 @@ +#include "FWCore/Framework/interface/stream/EDAnalyzer.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/ModuleContextSentry.h" +#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h" +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "FWCore/Utilities/interface/RandomNumberGenerator.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/MessageLogger/interface/edm_MessageLogger.h" +#include +#include +#include +#include +#include +#include + +#include "CLHEP/Random/RandFlat.h" + +namespace edmtest { + class TestServicesOnNonFrameworkThreadsAnalyzer : public edm::stream::EDAnalyzer<> { + public: + TestServicesOnNonFrameworkThreadsAnalyzer(edm::ParameterSet const&); + ~TestServicesOnNonFrameworkThreadsAnalyzer() override; + + void analyze(edm::Event const&, edm::EventSetup const&) final; + + private: + void runOnOtherThread(); + void shutdownThread(); + std::unique_ptr m_thread; + std::mutex m_mutex; + std::condition_variable m_condVar; + + bool m_managerThreadReady = false; + bool m_continueProcessing = false; + bool m_eventWorkDone = false; + + //context info + edm::ModuleCallingContext const* m_moduleCallingContext = nullptr; + edm::ServiceToken* m_serviceToken = nullptr; + edm::StreamID m_streamID; + std::exception_ptr m_except; + }; + + TestServicesOnNonFrameworkThreadsAnalyzer::TestServicesOnNonFrameworkThreadsAnalyzer(edm::ParameterSet const&) + : m_streamID(edm::StreamID::invalidStreamID()) { + m_thread = std::make_unique([this]() { this->runOnOtherThread(); }); + + m_mutex.lock(); + m_managerThreadReady = true; + m_continueProcessing = true; + } + + TestServicesOnNonFrameworkThreadsAnalyzer::~TestServicesOnNonFrameworkThreadsAnalyzer() { + if (m_thread) { + shutdownThread(); + } + } + + void TestServicesOnNonFrameworkThreadsAnalyzer::analyze(edm::Event const& iEvent, edm::EventSetup const&) { + m_eventWorkDone = false; + m_moduleCallingContext = iEvent.moduleCallingContext(); + edm::ServiceToken token = edm::ServiceRegistry::instance().presentToken(); + m_serviceToken = &token; + m_streamID = iEvent.streamID(); + { edm::LogSystem("FrameworkThread") << "new Event"; } + m_mutex.unlock(); + { + std::unique_lock lk(m_mutex); + m_condVar.notify_one(); + m_condVar.wait(lk, [this] { return this->m_eventWorkDone; }); + lk.release(); + } + edm::LogSystem("FrameworkThread") << " done"; + m_managerThreadReady = true; + if (m_except) { + std::rethrow_exception(m_except); + } + } + + void TestServicesOnNonFrameworkThreadsAnalyzer::runOnOtherThread() { + std::unique_lock lk(m_mutex); + + do { + m_condVar.wait(lk, [this] { return m_managerThreadReady; }); + if (m_continueProcessing) { + edm::ModuleCallingContext newContext(*m_moduleCallingContext); + edm::ModuleContextSentry sentry(&newContext, m_moduleCallingContext->parent()); + + edm::ServiceRegistry::Operate srSentry(*m_serviceToken); + try { + edm::Service rng; + edm::Service ml; + ml->setThreadContext(*m_moduleCallingContext); + edm::LogSystem("ModuleThread") << " ++running with rng " + << CLHEP::RandFlat::shootInt(&rng->getEngine(m_streamID), 10); + } catch (...) { + m_except = std::current_exception(); + } + } + m_eventWorkDone = true; + m_managerThreadReady = false; + lk.unlock(); + m_condVar.notify_one(); + lk.lock(); + } while (m_continueProcessing); + } + + void TestServicesOnNonFrameworkThreadsAnalyzer::shutdownThread() { + m_continueProcessing = false; + m_mutex.unlock(); + m_condVar.notify_one(); + m_thread->join(); + } + +} // namespace edmtest + +DEFINE_FWK_MODULE(edmtest::TestServicesOnNonFrameworkThreadsAnalyzer); diff --git a/FWCore/Integration/test/inputSource_alias_Test_cfg.py b/FWCore/Integration/test/inputSource_alias_Test_cfg.py new file mode 100644 index 0000000000000..bd2d11a878a78 --- /dev/null +++ b/FWCore/Integration/test/inputSource_alias_Test_cfg.py @@ -0,0 +1,23 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("TEST") + +process.load("FWCore.Framework.test.cmsExceptionsFatal_cff") + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(2) +) + +process.source = cms.Source("ThingSource" +) + +process.thing = cms.EDAlias(source = cms.VPSet( cms.PSet( type = cms.string("edmtestThings")) ) ) + + +process.OtherThing = cms.EDProducer("OtherThingProducer", + thingTag = cms.InputTag('thing') +) + +process.Analysis = cms.EDAnalyzer("OtherThingAnalyzer") + +process.p = cms.Path(process.OtherThing * process.Analysis) diff --git a/FWCore/Integration/test/moduleThread_test_cfg.py b/FWCore/Integration/test/moduleThread_test_cfg.py new file mode 100644 index 0000000000000..7404c8d2f9dfe --- /dev/null +++ b/FWCore/Integration/test/moduleThread_test_cfg.py @@ -0,0 +1,15 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("Test") + +process.source = cms.Source("EmptySource") + +process.maxEvents.input = 10 + +process.test = cms.EDAnalyzer("edmtest::TestServicesOnNonFrameworkThreadsAnalyzer") + +process.p = cms.EndPath(process.test) + +process.add_(cms.Service("RandomNumberGeneratorService", + test = cms.PSet(initialSeed = cms.untracked.uint32(12345)) +)) diff --git a/FWCore/MessageLogger/interface/MessageLoggerQ.h b/FWCore/MessageLogger/interface/MessageLoggerQ.h index cc1fbb3976fe8..c43f1af218cfc 100644 --- a/FWCore/MessageLogger/interface/MessageLoggerQ.h +++ b/FWCore/MessageLogger/interface/MessageLoggerQ.h @@ -26,8 +26,9 @@ namespace edm { void operator=(MessageLoggerQ const&) = delete; // --- enumerate types of messages that can be enqueued: - enum OpCode // abbrev's used hereinafter - { END_THREAD // END + enum OpCode // abbrev's used hereinafter + { + END_THREAD // END , LOG_A_MESSAGE // LOG , diff --git a/FWCore/MessageLogger/interface/edm_MessageLogger.h b/FWCore/MessageLogger/interface/edm_MessageLogger.h new file mode 100644 index 0000000000000..225dafd2cb4d4 --- /dev/null +++ b/FWCore/MessageLogger/interface/edm_MessageLogger.h @@ -0,0 +1,41 @@ +#ifndef FWCore_MessageService_MessageLogger_h +#define FWCore_MessageService_MessageLogger_h + +// -*- C++ -*- +// +// Package: MessageService +// Class : MessageLogger +// +/**\class edm::MessageLogger MessageLogger.h FWCore/MessageService/plugins/MessageLogger.h + + Description: Abstract interface for MessageLogger Service + + Usage: + + +*/ +// + +// system include files + +// user include files + +// forward declarations + +namespace edm { + class ModuleCallingContext; + + class MessageLogger { + public: + virtual ~MessageLogger(); + + virtual void setThreadContext(ModuleCallingContext const&) = 0; + + protected: + MessageLogger() = default; + + }; // MessageLogger + +} // namespace edm + +#endif // FWCore_MessageService_MessageLogger_h diff --git a/FWCore/MessageLogger/scripts/edmFjrDump b/FWCore/MessageLogger/scripts/edmFjrDump index 7ba788686f5e6..8825e623cf368 100755 --- a/FWCore/MessageLogger/scripts/edmFjrDump +++ b/FWCore/MessageLogger/scripts/edmFjrDump @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import xml.etree.ElementTree as ET diff --git a/FWCore/MessageLogger/scripts/edmMLParser b/FWCore/MessageLogger/scripts/edmMLParser index 7900d4fcaf062..d8d719376fb79 100755 --- a/FWCore/MessageLogger/scripts/edmMLParser +++ b/FWCore/MessageLogger/scripts/edmMLParser @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function diff --git a/FWCore/MessageLogger/src/ELextendedID.cc b/FWCore/MessageLogger/src/ELextendedID.cc index e292cebc28149..92483772e3188 100644 --- a/FWCore/MessageLogger/src/ELextendedID.cc +++ b/FWCore/MessageLogger/src/ELextendedID.cc @@ -18,24 +18,19 @@ namespace edm { // ---------------------------------------------------------------------- bool ELextendedID::operator<(const ELextendedID& xid) const { - return (severity < xid.severity) - ? true - : (severity > xid.severity) - ? false + return (severity < xid.severity) ? true + : (severity > xid.severity) ? false - : (id < xid.id) - ? true - : (id > xid.id) ? false + : (id < xid.id) ? true + : (id > xid.id) ? false - : (module < xid.module) - ? true - : (module > xid.module) ? false + : (module < xid.module) ? true + : (module > xid.module) ? false - : (subroutine < xid.subroutine) - ? true - : (subroutine > xid.subroutine) ? false + : (subroutine < xid.subroutine) ? true + : (subroutine > xid.subroutine) ? false - : false; + : false; } // ELextendedID::operator<() diff --git a/FWCore/MessageLogger/src/ErrorObj.cc b/FWCore/MessageLogger/src/ErrorObj.cc index c9bf6ffc4789a..294f423cca2d2 100644 --- a/FWCore/MessageLogger/src/ErrorObj.cc +++ b/FWCore/MessageLogger/src/ErrorObj.cc @@ -161,8 +161,9 @@ namespace edm { void ErrorObj::setSeverity(const messagelogger::ELseverityLevel& sev) { using namespace edm::messagelogger; - myXid.severity = (sev <= ELzeroSeverity) ? (ELseverityLevel)ELdebug - : (sev >= ELhighestSeverity) ? (ELseverityLevel)ELsevere : sev; + myXid.severity = (sev <= ELzeroSeverity) ? (ELseverityLevel)ELdebug + : (sev >= ELhighestSeverity) ? (ELseverityLevel)ELsevere + : sev; } void ErrorObj::setID(std::string_view id) { diff --git a/FWCore/MessageLogger/src/edm_MessageLogger.cc b/FWCore/MessageLogger/src/edm_MessageLogger.cc new file mode 100644 index 0000000000000..544216a0a477b --- /dev/null +++ b/FWCore/MessageLogger/src/edm_MessageLogger.cc @@ -0,0 +1,10 @@ +// +// MessageLogger.cc +// CMSSW +// +// Created by Chris Jones on 6/10/21. +// + +#include "FWCore/MessageLogger/interface/edm_MessageLogger.h" + +edm::MessageLogger::~MessageLogger() = default; diff --git a/FWCore/MessageService/BuildFile.xml b/FWCore/MessageService/BuildFile.xml index 775661fe8762f..d8c57c11ec52d 100644 --- a/FWCore/MessageService/BuildFile.xml +++ b/FWCore/MessageService/BuildFile.xml @@ -1,7 +1,5 @@ - - diff --git a/FWCore/MessageService/plugins/BuildFile.xml b/FWCore/MessageService/plugins/BuildFile.xml index 098d7cf5372f8..9d460cd3bbb41 100644 --- a/FWCore/MessageService/plugins/BuildFile.xml +++ b/FWCore/MessageService/plugins/BuildFile.xml @@ -1,4 +1,6 @@ + + diff --git a/FWCore/MessageService/src/MessageLogger.cc b/FWCore/MessageService/plugins/MessageLogger.cc similarity index 96% rename from FWCore/MessageService/src/MessageLogger.cc rename to FWCore/MessageService/plugins/MessageLogger.cc index 72148b8e3438f..b6057ac5665cf 100644 --- a/FWCore/MessageService/src/MessageLogger.cc +++ b/FWCore/MessageService/plugins/MessageLogger.cc @@ -15,8 +15,8 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageService/interface/MessageLogger.h" -#include "FWCore/MessageService/src/MessageServicePSetValidation.h" +#include "MessageLogger.h" +#include "MessageServicePSetValidation.h" #include "FWCore/MessageLogger/interface/MessageLoggerQ.h" #include "FWCore/MessageLogger/interface/MessageDrop.h" @@ -325,6 +325,29 @@ namespace edm { nonModule_errorEnabled = messageDrop->errorEnabled; } // ctor + void MessageLogger::setThreadContext(ModuleCallingContext const& iModContext) { + //need to know if we are in a global or stream context + auto top = iModContext.getTopModuleCallingContext(); + assert(nullptr != top); + if (ParentContext::Type::kGlobal == top->type()) { + auto globalContext = iModContext.getGlobalContext(); + auto tran = globalContext->transition(); + if (tran == GlobalContext::Transition::kBeginLuminosityBlock or + tran == GlobalContext::Transition::kEndLuminosityBlock) { + establishModule(lumiInfoBegin_ + globalContext->luminosityBlockIndex(), + iModContext, + s_globalTransitionNames[static_cast(tran)]); + } else { + establishModule( + runInfoBegin_ + globalContext->runIndex(), iModContext, s_globalTransitionNames[static_cast(tran)]); + } + } else { + auto stream = iModContext.getStreamContext(); + establishModule( + stream->streamID().value(), iModContext, s_streamTransitionNames[static_cast(stream->transition())]); + } + } + // // Shared helper routines for establishing module name and enabling behavior // @@ -867,14 +890,14 @@ namespace edm { } void MessageLogger::postEndJob() { - SummarizeInJobReport(); // Put summary info into Job Rep // change log 10 + summarizeInJobReport(); // Put summary info into Job Rep // change log 10 MessageLoggerQ::MLqSUM(); // trigger summary info. // change log 9 } void MessageLogger::jobFailure() { MessageDrop* messageDrop = MessageDrop::instance(); messageDrop->setSinglet("jobFailure"); - SummarizeInJobReport(); // Put summary info into Job Rep // change log 10 + summarizeInJobReport(); // Put summary info into Job Rep // change log 10 MessageLoggerQ::MLqSUM(); // trigger summary info. // change log 9 } @@ -882,7 +905,7 @@ namespace edm { // Other methods // - void MessageLogger::SummarizeInJobReport() { + void MessageLogger::summarizeInJobReport() { if (fjrSummaryRequested_) { std::map* smp = new std::map(); MessageLoggerQ::MLqJRS(smp); diff --git a/FWCore/MessageService/interface/MessageLogger.h b/FWCore/MessageService/plugins/MessageLogger.h similarity index 93% rename from FWCore/MessageService/interface/MessageLogger.h rename to FWCore/MessageService/plugins/MessageLogger.h index d90822251a937..f4cc573f66b28 100644 --- a/FWCore/MessageService/interface/MessageLogger.h +++ b/FWCore/MessageService/plugins/MessageLogger.h @@ -1,12 +1,12 @@ -#ifndef FWCore_MessageService_MessageLogger_h -#define FWCore_MessageService_MessageLogger_h +#ifndef FWCore_MessageService_plugins_MessageLogger_h +#define FWCore_MessageService_plugins_MessageLogger_h // -*- C++ -*- // -// Package: Services +// Package: MessageService // Class : MessageLogger // -/**\class MessageLogger MessageLogger.h FWCore/MessageService/interface/MessageLogger.h +/**\class edm::service::MessageLogger MessageLogger.h FWCore/MessageService/plugins/MessageLogger.h Description: @@ -33,7 +33,7 @@ #include "DataFormats/Provenance/interface/EventID.h" #include "FWCore/MessageLogger/interface/ELseverityLevel.h" -#include "FWCore/MessageLogger/interface/ErrorObj.h" +#include "FWCore/MessageLogger/interface/edm_MessageLogger.h" #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" #include "FWCore/Utilities/interface/thread_safety_macros.h" @@ -44,18 +44,15 @@ namespace edm { class ParameterSet; namespace service { - class MessageLogger { + class MessageLogger : public edm::MessageLogger { public: MessageLogger(ParameterSet const&, ActivityRegistry&); - void fillErrorObj(edm::ErrorObj& obj) const; - bool debugEnabled() const { return debugEnabled_; } - - static bool anyDebugEnabled() { return anyDebugEnabled_; } - - static void SummarizeInJobReport(); + void setThreadContext(ModuleCallingContext const&) final; private: + static void summarizeInJobReport(); + void postBeginJob(); void preEndJob(); void postEndJob(); @@ -193,4 +190,4 @@ namespace edm { } // namespace edm -#endif // FWCore_MessageService_MessageLogger_h +#endif // FWCore_MessageService_plugins_MessageLogger_h diff --git a/FWCore/MessageService/src/MessageServicePSetValidation.cc b/FWCore/MessageService/plugins/MessageServicePSetValidation.cc similarity index 99% rename from FWCore/MessageService/src/MessageServicePSetValidation.cc rename to FWCore/MessageService/plugins/MessageServicePSetValidation.cc index 823aa76330833..9e6e3b229ea78 100644 --- a/FWCore/MessageService/src/MessageServicePSetValidation.cc +++ b/FWCore/MessageService/plugins/MessageServicePSetValidation.cc @@ -17,7 +17,7 @@ // user include files -#include "FWCore/MessageService/src/MessageServicePSetValidation.h" +#include "MessageServicePSetValidation.h" using namespace edm; using namespace edm::service; diff --git a/FWCore/MessageService/src/MessageServicePSetValidation.h b/FWCore/MessageService/plugins/MessageServicePSetValidation.h similarity index 100% rename from FWCore/MessageService/src/MessageServicePSetValidation.h rename to FWCore/MessageService/plugins/MessageServicePSetValidation.h diff --git a/FWCore/MessageService/plugins/Module.cc b/FWCore/MessageService/plugins/Module.cc index b87b8de1184ec..122c677679be4 100644 --- a/FWCore/MessageService/plugins/Module.cc +++ b/FWCore/MessageService/plugins/Module.cc @@ -1,11 +1,14 @@ #include "FWCore/PluginManager/interface/PresenceMacros.h" -#include "FWCore/MessageService/interface/MessageLogger.h" +#include "MessageLogger.h" #include "FWCore/MessageService/interface/SingleThreadMSPresence.h" #include "FWCore/ServiceRegistry/interface/ServiceMaker.h" #pragma GCC visibility push(hidden) using edm::service::MessageLogger; using edm::service::SingleThreadMSPresence; -DEFINE_FWK_SERVICE(MessageLogger); + +using MessageLoggerMaker = edm::serviceregistry::AllArgsMaker; +DEFINE_FWK_SERVICE_MAKER(MessageLogger, MessageLoggerMaker); + DEFINE_FWK_PRESENCE(SingleThreadMSPresence); #pragma GCC visibility pop diff --git a/FWCore/ParameterSet/bin/edmPluginHelp.cpp b/FWCore/ParameterSet/bin/edmPluginHelp.cpp index 1521b6c0a7188..12725bd1e6616 100644 --- a/FWCore/ParameterSet/bin/edmPluginHelp.cpp +++ b/FWCore/ParameterSet/bin/edmPluginHelp.cpp @@ -229,6 +229,8 @@ int main(int argc, char** argv) try { descString += "At least one of the following options must be used: -p, -l, -a, -q, or -t\n\n"; descString += "Allowed options:"; boost::program_options::options_description desc(descString); + + // clang-format off desc.add_options()(kHelpCommandOpt, "produce help message")( kPluginCommandOpt, boost::program_options::value(), "only print descriptions for this plugin")( kLibraryCommandOpt, @@ -254,6 +256,7 @@ int main(int argc, char** argv) try { boost::program_options::value(), "print only the description for the top level parameter set with this name. Allowed names are 'options', " "'maxEvents', 'maxLuminosityBlocks', and 'maxSecondsUntilRampdown'."); + // clang-format on boost::program_options::variables_map vm; try { diff --git a/FWCore/ParameterSet/bin/edmWriteConfigs.cpp b/FWCore/ParameterSet/bin/edmWriteConfigs.cpp index 051096ff07dbc..af3b08c778923 100644 --- a/FWCore/ParameterSet/bin/edmWriteConfigs.cpp +++ b/FWCore/ParameterSet/bin/edmWriteConfigs.cpp @@ -154,6 +154,8 @@ int main(int argc, char** argv) try { descString += "Instead of specifying a library, there is also an option to specify a plugin.\n\n"; descString += "Allowed options"; boost::program_options::options_description desc(descString); + + // clang-format off desc.add_options()(kHelpCommandOpt, "produce help message")( kLibraryCommandOpt, boost::program_options::value(), "library filename")( kPathCommandOpt, @@ -170,6 +172,7 @@ int main(int argc, char** argv) try { kPluginCommandOpt, boost::program_options::value(), "plugin name. You must specify either a library or plugin, but not both."); + // clang-format on boost::program_options::positional_options_description p; p.add(kLibraryOpt, -1); diff --git a/FWCore/ParameterSet/examples/varParsingExample.py b/FWCore/ParameterSet/examples/varParsingExample.py index 74d5b4192a0e7..e0e129149991a 100755 --- a/FWCore/ParameterSet/examples/varParsingExample.py +++ b/FWCore/ParameterSet/examples/varParsingExample.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function from FWCore.ParameterSet.VarParsing import VarParsing diff --git a/FWCore/ParameterSet/python/Config.py b/FWCore/ParameterSet/python/Config.py index 70a7f5b4ba349..13f78bbab98f2 100644 --- a/FWCore/ParameterSet/python/Config.py +++ b/FWCore/ParameterSet/python/Config.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ### command line options helper from __future__ import print_function diff --git a/FWCore/ParameterSet/scripts/edmConfigDump b/FWCore/ParameterSet/scripts/edmConfigDump index b35fa10fad33a..e3d2124c0151e 100755 --- a/FWCore/ParameterSet/scripts/edmConfigDump +++ b/FWCore/ParameterSet/scripts/edmConfigDump @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function import sys diff --git a/FWCore/ParameterSet/scripts/edmConfigIncludeChecker b/FWCore/ParameterSet/scripts/edmConfigIncludeChecker index 7ee13c4735b21..3f38cd7a33aff 100755 --- a/FWCore/ParameterSet/scripts/edmConfigIncludeChecker +++ b/FWCore/ParameterSet/scripts/edmConfigIncludeChecker @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Check needed by Martin Gruenewald for HLT studies # This isn't intended to be an example for nice coding... ;-) diff --git a/FWCore/ParameterSet/scripts/edmConfigSplit b/FWCore/ParameterSet/scripts/edmConfigSplit index df14ca9c04b76..01495f6d6b9cb 100755 --- a/FWCore/ParameterSet/scripts/edmConfigSplit +++ b/FWCore/ParameterSet/scripts/edmConfigSplit @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import sys import os diff --git a/FWCore/ParameterSet/scripts/edmPythonConfigToCppValidation b/FWCore/ParameterSet/scripts/edmPythonConfigToCppValidation index 1b4e3ba5d48c1..3e3e338196d53 100755 --- a/FWCore/ParameterSet/scripts/edmPythonConfigToCppValidation +++ b/FWCore/ParameterSet/scripts/edmPythonConfigToCppValidation @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function from builtins import str diff --git a/FWCore/ParameterSet/scripts/edmPythonSearch b/FWCore/ParameterSet/scripts/edmPythonSearch index cba8c02324517..505c507bbeb26 100755 --- a/FWCore/ParameterSet/scripts/edmPythonSearch +++ b/FWCore/ParameterSet/scripts/edmPythonSearch @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function from FWCore.ParameterSet.TreeCrawler import getImportTree, Color diff --git a/FWCore/ParameterSet/scripts/edmPythonTree b/FWCore/ParameterSet/scripts/edmPythonTree index e71af33706763..bad33eec3089b 100755 --- a/FWCore/ParameterSet/scripts/edmPythonTree +++ b/FWCore/ParameterSet/scripts/edmPythonTree @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from FWCore.ParameterSet.TreeCrawler import getImportTree import sys, os diff --git a/FWCore/ParameterSet/test/comparePythonOutput.py b/FWCore/ParameterSet/test/comparePythonOutput.py index becf2f2c227f0..be0c5637e6e38 100755 --- a/FWCore/ParameterSet/test/comparePythonOutput.py +++ b/FWCore/ParameterSet/test/comparePythonOutput.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # This compares the content of two Python files, # ignoring trivial differences like order within # dictionaries or escape characters diff --git a/FWCore/ParameterSetReader/BuildFile.xml b/FWCore/ParameterSetReader/BuildFile.xml index 965c615c3c426..2a2f29844f080 100644 --- a/FWCore/ParameterSetReader/BuildFile.xml +++ b/FWCore/ParameterSetReader/BuildFile.xml @@ -2,5 +2,4 @@ - diff --git a/FWCore/PluginManager/bin/dump.cc b/FWCore/PluginManager/bin/dump.cc index 9079f4a0dcab7..d3089f2abf4df 100644 --- a/FWCore/PluginManager/bin/dump.cc +++ b/FWCore/PluginManager/bin/dump.cc @@ -26,9 +26,10 @@ int main(int argc, char** argv) { descString += " [options]"; descString += "\nAllowed options"; options_description desc(descString); - desc.add_options()(kHelpCommandOpt, "produce help message")(kFilesCommandOpt, - "list the file from which a plugin will come")( - kAllFilesCommandOpt, "list all the files to which a plugin is registered") + desc.add_options()(kHelpCommandOpt, "produce help message")( + kFilesCommandOpt, + "list the file from which a plugin will come")(kAllFilesCommandOpt, + "list all the files to which a plugin is registered") //(kAllCommandOpt,"when no paths given, try to update caches for all known directories [default is to only scan the first directory]") ; diff --git a/FWCore/PyDevParameterSet/BuildFile.xml b/FWCore/PyDevParameterSet/BuildFile.xml index 3caee8aedb0c6..f50c823ff41ce 100644 --- a/FWCore/PyDevParameterSet/BuildFile.xml +++ b/FWCore/PyDevParameterSet/BuildFile.xml @@ -1,9 +1,8 @@ - + - diff --git a/FWCore/PyDevParameterSet/test/BuildFile.xml b/FWCore/PyDevParameterSet/test/BuildFile.xml index 6d2248d4e6fce..019b1b5973fba 100644 --- a/FWCore/PyDevParameterSet/test/BuildFile.xml +++ b/FWCore/PyDevParameterSet/test/BuildFile.xml @@ -1,5 +1,5 @@ - + diff --git a/FWCore/PythonFramework/BuildFile.xml b/FWCore/PythonFramework/BuildFile.xml index 13223f824ab5c..494ae853b4491 100644 --- a/FWCore/PythonFramework/BuildFile.xml +++ b/FWCore/PythonFramework/BuildFile.xml @@ -7,7 +7,7 @@ - + diff --git a/FWCore/PythonParameterSet/BuildFile.xml b/FWCore/PythonParameterSet/BuildFile.xml index 34d6a8ae8859a..b66516139eba3 100644 --- a/FWCore/PythonParameterSet/BuildFile.xml +++ b/FWCore/PythonParameterSet/BuildFile.xml @@ -1,9 +1,8 @@ - + - diff --git a/FWCore/PythonParameterSet/test/BuildFile.xml b/FWCore/PythonParameterSet/test/BuildFile.xml index 6831316786cd0..0b5265d51cfa2 100644 --- a/FWCore/PythonParameterSet/test/BuildFile.xml +++ b/FWCore/PythonParameterSet/test/BuildFile.xml @@ -1,5 +1,5 @@ - + diff --git a/FWCore/PythonUtilities/python/LumiList.py b/FWCore/PythonUtilities/python/LumiList.py index 772368f01d1bf..987765aaa3371 100644 --- a/FWCore/PythonUtilities/python/LumiList.py +++ b/FWCore/PythonUtilities/python/LumiList.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Handle lists of lumi sections. Constuct in several different formats and filter diff --git a/FWCore/PythonUtilities/scripts/compareJSON.py b/FWCore/PythonUtilities/scripts/compareJSON.py index 792c3d1e523fd..eccec5aae98be 100755 --- a/FWCore/PythonUtilities/scripts/compareJSON.py +++ b/FWCore/PythonUtilities/scripts/compareJSON.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys diff --git a/FWCore/PythonUtilities/scripts/csv2json.py b/FWCore/PythonUtilities/scripts/csv2json.py index 3fef3a3facc0d..755b6079fe21b 100755 --- a/FWCore/PythonUtilities/scripts/csv2json.py +++ b/FWCore/PythonUtilities/scripts/csv2json.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys diff --git a/FWCore/PythonUtilities/scripts/edmDumpEventContent b/FWCore/PythonUtilities/scripts/edmDumpEventContent index e5b80f74a1c69..3474ab998b509 100755 --- a/FWCore/PythonUtilities/scripts/edmDumpEventContent +++ b/FWCore/PythonUtilities/scripts/edmDumpEventContent @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function from builtins import object diff --git a/FWCore/PythonUtilities/scripts/filterCSVwithJSON.py b/FWCore/PythonUtilities/scripts/filterCSVwithJSON.py index fbc361430f74f..d3d67c9a1b475 100755 --- a/FWCore/PythonUtilities/scripts/filterCSVwithJSON.py +++ b/FWCore/PythonUtilities/scripts/filterCSVwithJSON.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys diff --git a/FWCore/PythonUtilities/scripts/filterJSON.py b/FWCore/PythonUtilities/scripts/filterJSON.py index 7e1b2d303ea3a..237fdf256bd76 100755 --- a/FWCore/PythonUtilities/scripts/filterJSON.py +++ b/FWCore/PythonUtilities/scripts/filterJSON.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys diff --git a/FWCore/PythonUtilities/scripts/fjr2json.py b/FWCore/PythonUtilities/scripts/fjr2json.py index 703f4db4f6b04..2bb0cf9a77cf1 100755 --- a/FWCore/PythonUtilities/scripts/fjr2json.py +++ b/FWCore/PythonUtilities/scripts/fjr2json.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function from FWCore.PythonUtilities.XML2Python import xml2obj diff --git a/FWCore/PythonUtilities/scripts/generateEDF.py b/FWCore/PythonUtilities/scripts/generateEDF.py index d71ee2a317783..5ce86535854ea 100755 --- a/FWCore/PythonUtilities/scripts/generateEDF.py +++ b/FWCore/PythonUtilities/scripts/generateEDF.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function from __future__ import division diff --git a/FWCore/PythonUtilities/scripts/interactivePythonTest.py b/FWCore/PythonUtilities/scripts/interactivePythonTest.py index 6d377c1d4201c..e4a092cb89020 100755 --- a/FWCore/PythonUtilities/scripts/interactivePythonTest.py +++ b/FWCore/PythonUtilities/scripts/interactivePythonTest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys import os diff --git a/FWCore/PythonUtilities/scripts/mergeJSON.py b/FWCore/PythonUtilities/scripts/mergeJSON.py index 04434547b02c4..49028d8872ff4 100755 --- a/FWCore/PythonUtilities/scripts/mergeJSON.py +++ b/FWCore/PythonUtilities/scripts/mergeJSON.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys diff --git a/FWCore/PythonUtilities/scripts/printJSON.py b/FWCore/PythonUtilities/scripts/printJSON.py index 0b36201b563be..07333a3db31f8 100755 --- a/FWCore/PythonUtilities/scripts/printJSON.py +++ b/FWCore/PythonUtilities/scripts/printJSON.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys diff --git a/FWCore/Utilities/bin/edmConvertToStreamModule.py b/FWCore/Utilities/bin/edmConvertToStreamModule.py index 281ae72b24169..424d24d0f4bad 100755 --- a/FWCore/Utilities/bin/edmConvertToStreamModule.py +++ b/FWCore/Utilities/bin/edmConvertToStreamModule.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function import subprocess diff --git a/FWCore/Utilities/interface/StdPairHasher.h b/FWCore/Utilities/interface/StdPairHasher.h index b61cc5ce57346..c5781e855c12b 100644 --- a/FWCore/Utilities/interface/StdPairHasher.h +++ b/FWCore/Utilities/interface/StdPairHasher.h @@ -3,6 +3,8 @@ /* tbb::hash was changed to used std::hash which does not have an implementation for std::pair. */ + +#include #include "FWCore/Utilities/interface/hash_combine.h" namespace edm { diff --git a/FWCore/Utilities/interface/VecArray.h b/FWCore/Utilities/interface/VecArray.h index 282c9dda880f1..a7e055e3ef4d0 100644 --- a/FWCore/Utilities/interface/VecArray.h +++ b/FWCore/Utilities/interface/VecArray.h @@ -113,8 +113,8 @@ namespace edm { size_ = size; } - void swap(VecArray& other) noexcept(noexcept(std::swap(data_, other.data_)) && - noexcept(std::swap(size_, other.size_))) { + void swap(VecArray& other) noexcept(noexcept(std::swap(data_, other.data_)) && noexcept(std::swap(size_, + other.size_))) { std::swap(data_, other.data_); std::swap(size_, other.size_); } diff --git a/FWCore/Utilities/python/Enumerate.py b/FWCore/Utilities/python/Enumerate.py index 396e07b1778d1..3e6b3178228dd 100644 --- a/FWCore/Utilities/python/Enumerate.py +++ b/FWCore/Utilities/python/Enumerate.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 ## Note: Please do not use or modify any data or functions with a ## leading underscore. If you "mess" with the internal structure, diff --git a/FWCore/Utilities/src/MallocOpts.cc b/FWCore/Utilities/src/MallocOpts.cc index a3309c14c8d8c..beb8f6212833a 100644 --- a/FWCore/Utilities/src/MallocOpts.cc +++ b/FWCore/Utilities/src/MallocOpts.cc @@ -96,8 +96,9 @@ namespace edm { char* str = (char*)&ans[0]; ans[3] = 0; - return strncmp(str, amd_str, amd_sz) == 0 ? AMD_CPU - : strncmp(str, intel_str, intel_sz) == 0 ? INTEL_CPU : UNKNOWN_CPU; + return strncmp(str, amd_str, amd_sz) == 0 ? AMD_CPU + : strncmp(str, intel_str, intel_sz) == 0 ? INTEL_CPU + : UNKNOWN_CPU; } // values determined experimentally for each architecture diff --git a/FWCore/Utilities/src/stemFromPath.cc b/FWCore/Utilities/src/stemFromPath.cc index b5a2c4f0e15ca..0a6a3a92dacde 100644 --- a/FWCore/Utilities/src/stemFromPath.cc +++ b/FWCore/Utilities/src/stemFromPath.cc @@ -2,9 +2,9 @@ namespace edm { std::string_view stemFromPath(std::string_view path) { - auto begin = path.rfind("/"); + auto begin = path.rfind('/'); if (begin == std::string_view::npos) { - begin = path.rfind(":"); + begin = path.rfind(':'); if (begin == std::string_view::npos) { // shouldn't really happen? begin = 0; @@ -14,7 +14,7 @@ namespace edm { } else { begin += 1; } - auto end = path.find(".", begin); + auto end = path.find('.', begin); return path.substr(begin, end - begin); } } // namespace edm diff --git a/FastSimulation/Tracking/interface/SeedFinder.h b/FastSimulation/Tracking/interface/SeedFinder.h index 0e76c0606704b..b6e1df324574d 100644 --- a/FastSimulation/Tracking/interface/SeedFinder.h +++ b/FastSimulation/Tracking/interface/SeedFinder.h @@ -51,7 +51,7 @@ class SeedFinder { std::vector seedHitCandidates; for (const FastTrackerRecHit* trackerRecHit : trackerRecHits) { TrajectorySeedHitCandidate seedHitCandidate(trackerRecHit, _trackerTopology); - seedHitCandidates.push_back(std::move(seedHitCandidate)); + seedHitCandidates.push_back(seedHitCandidate); } return iterateHits(0, seedHitCandidates, hitIndicesInTree, true); diff --git a/FastSimulation/TrackingRecHitProducer/interface/TrackerDetIdSelector.h b/FastSimulation/TrackingRecHitProducer/interface/TrackerDetIdSelector.h index 2492192e4a580..d7dccb00540c8 100644 --- a/FastSimulation/TrackingRecHitProducer/interface/TrackerDetIdSelector.h +++ b/FastSimulation/TrackingRecHitProducer/interface/TrackerDetIdSelector.h @@ -208,7 +208,7 @@ struct WalkAST { } }; -int ExpressionAST::evaluate(const DetId& detId, const TrackerTopology& trackerTopology) const { +inline int ExpressionAST::evaluate(const DetId& detId, const TrackerTopology& trackerTopology) const { return boost::apply_visitor(Accessor(detId, trackerTopology), this->expr); } diff --git a/Fireworks/Core/src/CmsShowMain.cc b/Fireworks/Core/src/CmsShowMain.cc index c31a11fcb78ed..916bbc3a9653f 100644 --- a/Fireworks/Core/src/CmsShowMain.cc +++ b/Fireworks/Core/src/CmsShowMain.cc @@ -159,6 +159,7 @@ CmsShowMain::CmsShowMain(int argc, char* argv[]) namespace po = boost::program_options; po::options_description desc(descString); + // clang-format off desc.add_options()(kInputFilesCommandOpt, po::value >(), "Input root files")( kConfigFileCommandOpt, po::value(), "Include configuration file")( kNoConfigFileCommandOpt, "Empty configuration")(kNoVersionCheck, "No file version check")( @@ -187,6 +188,7 @@ CmsShowMain::CmsShowMain(int argc, char* argv[]) kAutoSaveType, po::value(), "Image type of auto-saved views, png or jpg (png is default)")( kAutoSaveHeight, po::value(), "Screenshots height when auto-save-all-views is enabled")( kSyncAllViews, "Synchronize all views on new event"); + // clang-format on po::options_description debugdesc("Debug"); debugdesc.add_options()(kLogLevelCommandOpt, @@ -197,8 +199,9 @@ CmsShowMain::CmsShowMain(int argc, char* argv[]) po::options_description tcachedesc("TreeCache"); tcachedesc.add_options()(kLogTreeCacheOpt, "Log tree cache operations and status")( - kSizeTreeCacheOpt, po::value(), "Set size of TTreeCache for data access in MB (default is 50)")( - kPrefetchTreeCacheOpt, "Enable prefetching"); + kSizeTreeCacheOpt, + po::value(), + "Set size of TTreeCache for data access in MB (default is 50)")(kPrefetchTreeCacheOpt, "Enable prefetching"); po::options_description rnrdesc("Appearance"); rnrdesc.add_options()(kFreePaletteCommandOpt, "Allow free color selection (requires special configuration!)")( diff --git a/GeneratorInterface/Core/bin/externalGenerator.cc b/GeneratorInterface/Core/bin/externalGenerator.cc index 60a519e00c094..c48f60eb2cc96 100644 --- a/GeneratorInterface/Core/bin/externalGenerator.cc +++ b/GeneratorInterface/Core/bin/externalGenerator.cc @@ -83,9 +83,10 @@ int main(int argc, char* argv[]) { boost::program_options::options_description desc(descString); desc.add_options()(kHelpCommandOpt, "produce help message")( - kMemoryNameCommandOpt, boost::program_options::value(), "memory name")( - kUniqueIDCommandOpt, boost::program_options::value(), "unique id")(kVerboseCommandOpt, - "verbose output"); + kMemoryNameCommandOpt, + boost::program_options::value(), + "memory name")(kUniqueIDCommandOpt, boost::program_options::value(), "unique id")(kVerboseCommandOpt, + "verbose output"); boost::program_options::positional_options_description p; p.add(kMemoryNameOpt, 1); diff --git a/GeneratorInterface/Core/interface/ConcurrentGeneratorFilter.h b/GeneratorInterface/Core/interface/ConcurrentGeneratorFilter.h new file mode 100644 index 0000000000000..6c30e37c5ebdc --- /dev/null +++ b/GeneratorInterface/Core/interface/ConcurrentGeneratorFilter.h @@ -0,0 +1,416 @@ +// -*- C++ -*- +// +// + +// class template ConcurrentGeneratorFilter provides an EDFilter which uses +// the hadronizer type HAD to generate partons, hadronize them, +// and decay the resulting particles, in the CMS framework. + +#ifndef GeneratorInterface_Core_ConcurrentGeneratorFilter_h +#define GeneratorInterface_Core_ConcurrentGeneratorFilter_h + +#include +#include +#include +#include + +#include "FWCore/Framework/interface/global/EDFilter.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/FileBlock.h" +#include "FWCore/Framework/interface/LuminosityBlock.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ServiceRegistry/interface/RandomEngineSentry.h" +#include "FWCore/Utilities/interface/BranchType.h" +#include "FWCore/Utilities/interface/EDMException.h" +#include "FWCore/Utilities/interface/EDGetToken.h" +#include "FWCore/Utilities/interface/TypeID.h" +#include "DataFormats/Provenance/interface/BranchDescription.h" +#include "CLHEP/Random/RandomEngine.h" + +// LHE Run +#include "SimDataFormats/GeneratorProducts/interface/LHERunInfoProduct.h" +#include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h" + +// LHE Event +#include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h" +#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" + +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenLumiInfoHeader.h" +#include "SimDataFormats/GeneratorProducts/interface/GenLumiInfoProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" + +namespace edm { + namespace gen { + struct GenRunCache { + mutable std::atomic product_{nullptr}; + ~GenRunCache() { delete product_.load(); } + + // This is called from globalEndRunProduce which is known to + // be safe as the framework would not be calling any other + // methods of this module using this run at that time + std::unique_ptr release() const noexcept { + auto retValue = product_.load(); + product_.store(nullptr); + return std::unique_ptr(retValue); + } + }; + struct GenLumiSummary { + mutable std::unique_ptr lumiInfo_; + }; + template + struct GenStreamCache { + GenStreamCache(ParameterSet const& iPSet) : hadronizer_{iPSet}, nEventsInLumiBlock_{0} {} + HAD hadronizer_; + std::unique_ptr decayer_; + unsigned int nEventsInLumiBlock_; + bool initialized_ = false; + }; + } // namespace gen + + template + class ConcurrentGeneratorFilter : public global::EDFilter, + LuminosityBlockSummaryCache, + StreamCache>> { + public: + typedef HAD Hadronizer; + typedef DEC Decayer; + + // The given ParameterSet will be passed to the contained Hadronizer object. + explicit ConcurrentGeneratorFilter(ParameterSet const& ps); + + bool filter(StreamID id, Event& e, EventSetup const& es) const override; + std::unique_ptr> beginStream(StreamID) const override; + std::shared_ptr globalBeginRun(Run const&, EventSetup const&) const override; + std::shared_ptr globalBeginLuminosityBlockSummary(LuminosityBlock const&, + EventSetup const&) const override; + void globalBeginLuminosityBlockProduce(LuminosityBlock&, EventSetup const&) const override; + void streamBeginLuminosityBlock(StreamID, LuminosityBlock const&, EventSetup const&) const override; + void streamEndLuminosityBlock(StreamID, LuminosityBlock const&, EventSetup const&) const override; + void streamEndLuminosityBlockSummary(StreamID, + LuminosityBlock const&, + EventSetup const&, + gen::GenLumiSummary*) const override; + void globalEndLuminosityBlockSummary(LuminosityBlock const&, + EventSetup const&, + gen::GenLumiSummary*) const override; + void globalEndLuminosityBlockProduce(LuminosityBlock&, + EventSetup const&, + gen::GenLumiSummary const*) const override; + void streamEndRun(StreamID, Run const&, EventSetup const&) const override; + void globalEndRun(Run const&, EventSetup const&) const override; + void globalEndRunProduce(Run&, EventSetup const&) const override; + + private: + void initLumi(gen::GenStreamCache* cache, LuminosityBlock const& index, EventSetup const& es) const; + ParameterSet config_; + mutable std::atomic*> useInLumi_{nullptr}; + }; + + //------------------------------------------------------------------------ + // + // Implementation + + template + ConcurrentGeneratorFilter::ConcurrentGeneratorFilter(ParameterSet const& ps) : config_(ps) { + // TODO: + // Put the list of types produced by the filters here. + // The current design calls for: + // * LHEGeneratorInfo + // * LHEEvent + // * HepMCProduct + // But I can not find the LHEGeneratorInfo class; it might need to + // be invented. + + this->template produces("unsmeared"); + this->template produces(); + this->template produces(); + this->template produces(); + this->template produces(); + } + + template + std::unique_ptr> ConcurrentGeneratorFilter::beginStream(StreamID) const { + auto cache = std::make_unique>(config_); + + if (config_.exists("ExternalDecays")) { + ParameterSet ps1 = config_.getParameter("ExternalDecays"); + cache->decayer_.reset(new Decayer(ps1)); + } + + // We need a hadronizer during globalBeginLumiProduce, doesn't matter which one + gen::GenStreamCache* expected = nullptr; + useInLumi_.compare_exchange_strong(expected, cache.get()); + + return cache; + } + + template + std::shared_ptr ConcurrentGeneratorFilter::globalBeginRun(Run const&, + EventSetup const&) const { + return std::make_shared(); + } + + template + std::shared_ptr ConcurrentGeneratorFilter::globalBeginLuminosityBlockSummary( + LuminosityBlock const&, EventSetup const&) const { + return std::make_shared(); + } + + template + void ConcurrentGeneratorFilter::initLumi(gen::GenStreamCache* cache, + LuminosityBlock const& lumi, + EventSetup const& es) const { + cache->nEventsInLumiBlock_ = 0; + + // We need all copies to see same random # for begin lumi + Service rng; + auto enginePtr = rng->cloneEngine(lumi.index()); + cache->hadronizer_.setRandomEngine(enginePtr.get()); + cache->decayer_->setRandomEngine(enginePtr.get()); + + auto unsetH = [](HAD* h) { h->setRandomEngine(nullptr); }; + auto unsetD = [](DEC* d) { d->setRandomEngine(nullptr); }; + + std::unique_ptr randomEngineSentry(&cache->hadronizer_, unsetH); + std::unique_ptr randomEngineSentryDecay(cache->decayer_.get(), unsetD); + + cache->hadronizer_.randomizeIndex(lumi, enginePtr.get()); + + if (!cache->hadronizer_.readSettings(0)) + throw edm::Exception(errors::Configuration) + << "Failed to read settings for the hadronizer " << cache->hadronizer_.classname() << " \n"; + + if (cache->decayer_) { + cache->decayer_->init(es); + if (!cache->hadronizer_.declareStableParticles(cache->decayer_->operatesOnParticles())) + throw edm::Exception(errors::Configuration) + << "Failed to declare stable particles in hadronizer " << cache->hadronizer_.classname() + << " for internal parton generation\n"; + if (!cache->hadronizer_.declareSpecialSettings(cache->decayer_->specialSettings())) + throw edm::Exception(errors::Configuration) + << "Failed to declare special settings in hadronizer " << cache->hadronizer_.classname() << "\n"; + } + + if (!cache->hadronizer_.initializeForInternalPartons()) + throw edm::Exception(errors::Configuration) + << "Failed to initialize hadronizer " << cache->hadronizer_.classname() + << " for internal parton generation\n"; + + cache->initialized_ = true; + } + + template + bool ConcurrentGeneratorFilter::filter(StreamID id, Event& ev, EventSetup const& /* es */) const { + auto cache = this->streamCache(id); + RandomEngineSentry randomEngineSentry(&cache->hadronizer_, ev.streamID()); + RandomEngineSentry randomEngineSentryDecay(cache->decayer_.get(), ev.streamID()); + + cache->hadronizer_.setEDMEvent(ev); + + bool passEvtGenSelector = false; + std::unique_ptr event(nullptr); + + while (!passEvtGenSelector) { + event.reset(); + cache->hadronizer_.setEDMEvent(ev); + + if (!cache->hadronizer_.generatePartonsAndHadronize()) + return false; + + // this is "fake" stuff + // in principle, decays are done as part of full event generation, + // except for particles that are marked as to be kept stable + // but we currently keep in it the design, because we might want + // to use such feature for other applications + // + if (!cache->hadronizer_.decay()) + return false; + + event = cache->hadronizer_.getGenEvent(); + if (!event.get()) + return false; + + // + // The external decay driver is being added to the system, it should be called here + // + if (cache->decayer_) { + auto t = cache->decayer_->decay(event.get()); + if (t != event.get()) { + event.reset(t); + } + } + if (!event.get()) + return false; + + passEvtGenSelector = cache->hadronizer_.select(event.get()); + } + + // check and perform if there're any unstable particles after + // running external decay packages + // + // fisrt of all, put back modified event tree (after external decay) + // + cache->hadronizer_.resetEvent(std::move(event)); + + // + // now run residual decays + // + if (!cache->hadronizer_.residualDecay()) + return false; + + cache->hadronizer_.finalizeEvent(); + + event = cache->hadronizer_.getGenEvent(); + if (!event.get()) + return false; + + event->set_event_number(ev.id().event()); + + // + // finally, form up EDM products ! + // + std::unique_ptr genEventInfo(cache->hadronizer_.getGenEventInfo()); + if (!genEventInfo.get()) { + // create GenEventInfoProduct from HepMC event in case hadronizer didn't provide one + genEventInfo = std::make_unique(event.get()); + } + + ev.put(std::move(genEventInfo)); + + std::unique_ptr bare_product(new HepMCProduct()); + bare_product->addHepMCData(event.release()); + ev.put(std::move(bare_product), "unsmeared"); + cache->nEventsInLumiBlock_++; + return true; + } + + template + void ConcurrentGeneratorFilter::globalBeginLuminosityBlockProduce(LuminosityBlock& lumi, + EventSetup const& es) const { + // need one of the streams to finish + while (useInLumi_.load() == nullptr) { + } + initLumi(useInLumi_, lumi, es); + std::unique_ptr genLumiInfoHeader(useInLumi_.load()->hadronizer_.getGenLumiInfoHeader()); + lumi.put(std::move(genLumiInfoHeader)); + } + + template + void ConcurrentGeneratorFilter::streamBeginLuminosityBlock(StreamID id, + LuminosityBlock const& lumi, + EventSetup const& es) const { + if (useInLumi_ != this->streamCache(id)) { + initLumi(this->streamCache(id), lumi, es); + } else { + useInLumi_.store(nullptr); + } + } + + template + void ConcurrentGeneratorFilter::streamEndLuminosityBlock(StreamID id, + LuminosityBlock const&, + EventSetup const&) const { + this->streamCache(id)->hadronizer_.cleanLHE(); + } + + template + void ConcurrentGeneratorFilter::streamEndLuminosityBlockSummary(StreamID id, + LuminosityBlock const&, + EventSetup const&, + gen::GenLumiSummary* iSummary) const { + auto cache = this->streamCache(id); + cache->hadronizer_.statistics(); + if (cache->decayer_) + cache->decayer_->statistics(); + + GenRunInfoProduct genRunInfo = GenRunInfoProduct(cache->hadronizer_.getGenRunInfo()); + std::vector GenLumiProcess; + const GenRunInfoProduct::XSec& xsec = genRunInfo.internalXSec(); + GenLumiInfoProduct::ProcessInfo temp; + unsigned int nEvtInLumiBlock_ = cache->nEventsInLumiBlock_; + temp.setProcess(0); + temp.setLheXSec(xsec.value(), xsec.error()); // Pythia gives error of -1 + temp.setNPassPos(nEvtInLumiBlock_); + temp.setNPassNeg(0); + temp.setNTotalPos(nEvtInLumiBlock_); + temp.setNTotalNeg(0); + temp.setTried(nEvtInLumiBlock_, nEvtInLumiBlock_, nEvtInLumiBlock_); + temp.setSelected(nEvtInLumiBlock_, nEvtInLumiBlock_, nEvtInLumiBlock_); + temp.setKilled(nEvtInLumiBlock_, nEvtInLumiBlock_, nEvtInLumiBlock_); + temp.setAccepted(0, -1, -1); + temp.setAcceptedBr(0, -1, -1); + GenLumiProcess.push_back(temp); + + GenLumiInfoProduct genLumiInfo; + genLumiInfo.setHEPIDWTUP(-1); + genLumiInfo.setProcessInfo(GenLumiProcess); + + if (iSummary->lumiInfo_) { + iSummary->lumiInfo_->mergeProduct(genLumiInfo); + } else { + iSummary->lumiInfo_ = std::make_unique(std::move(genLumiInfo)); + } + + cache->nEventsInLumiBlock_ = 0; + + gen::GenStreamCache* expected = nullptr; + //make it available for beginLuminosityBlockProduce + useInLumi_.compare_exchange_strong(expected, this->streamCache(id)); + } + + template + void ConcurrentGeneratorFilter::globalEndLuminosityBlockSummary(LuminosityBlock const&, + EventSetup const&, + gen::GenLumiSummary*) const {} + + template + void ConcurrentGeneratorFilter::globalEndLuminosityBlockProduce(LuminosityBlock& lumi, + EventSetup const&, + gen::GenLumiSummary const* iSummary) const { + lumi.put(std::move(iSummary->lumiInfo_)); + } + + template + void ConcurrentGeneratorFilter::streamEndRun(StreamID id, Run const& run, EventSetup const&) const { + auto rCache = this->runCache(run.index()); + auto cache = this->streamCache(id); + + // If relevant, record the integrated luminosity for this run + // here. To do so, we would need a standard function to invoke on + // the contained hadronizer that would report the integrated + // luminosity. + + if (cache->initialized_) { + cache->hadronizer_.statistics(); + if (cache->decayer_) + cache->decayer_->statistics(); + } + GenRunInfoProduct& genRunInfo = cache->hadronizer_.getGenRunInfo(); + GenRunInfoProduct* expect = nullptr; + + std::unique_ptr griproduct(new GenRunInfoProduct(genRunInfo)); + // All the GenRunInfoProducts for all streams shoule be identical, therefore we only need one + if (rCache->product_.compare_exchange_strong(expect, griproduct.get())) { + griproduct.release(); + } + } + + template + void ConcurrentGeneratorFilter::globalEndRun(Run const&, EventSetup const&) const {} + + template + void ConcurrentGeneratorFilter::globalEndRunProduce(Run& run, EventSetup const&) const { + run.put(this->runCache(run.index())->release()); + } + +} // namespace edm + +#endif // GeneratorInterface_Core_ConcurrentGeneratorFilter_h diff --git a/GeneratorInterface/Core/interface/ConcurrentHadronizerFilter.h b/GeneratorInterface/Core/interface/ConcurrentHadronizerFilter.h index 775d85c0f70fd..45c51c57e3766 100644 --- a/GeneratorInterface/Core/interface/ConcurrentHadronizerFilter.h +++ b/GeneratorInterface/Core/interface/ConcurrentHadronizerFilter.h @@ -266,7 +266,7 @@ namespace edm { std::unique_ptr genEventInfo(cache->hadronizer_.getGenEventInfo()); if (!genEventInfo.get()) { // create GenEventInfoProduct from HepMC event in case hadronizer didn't provide one - genEventInfo.reset(new GenEventInfoProduct(event.get())); + genEventInfo = std::make_unique(event.get()); } //if HepMCFilter was specified, test event diff --git a/GeneratorInterface/Core/interface/FortranCallback.h b/GeneratorInterface/Core/interface/FortranCallback.h index d6779cf150945..71766609f1a2e 100644 --- a/GeneratorInterface/Core/interface/FortranCallback.h +++ b/GeneratorInterface/Core/interface/FortranCallback.h @@ -45,17 +45,17 @@ namespace gen { FortranCallback* FortranCallback::fInstance = nullptr; - FortranCallback::FortranCallback() + inline FortranCallback::FortranCallback() // : fPartonLevel(0) : fRunBlock(nullptr), fEventBlock(nullptr), fIterationsPerEvent(0) {} - FortranCallback* FortranCallback::getInstance() { + inline FortranCallback* FortranCallback::getInstance() { if (fInstance == nullptr) fInstance = new FortranCallback; return fInstance; } - void FortranCallback::fillHeader() { + inline void FortranCallback::fillHeader() { if (fRunBlock == nullptr) return; @@ -67,7 +67,7 @@ namespace gen { return; } - void FortranCallback::fillEvent() { + inline void FortranCallback::fillEvent() { //if ( fPartonLevel == 0 ) return; //const lhef::HEPEUP* hepeup = fPartonLevel->getHEPEUP(); diff --git a/GeneratorInterface/Core/interface/HadronizerFilter.h b/GeneratorInterface/Core/interface/HadronizerFilter.h index 9e13acbd97f32..ff94e0cb079e4 100644 --- a/GeneratorInterface/Core/interface/HadronizerFilter.h +++ b/GeneratorInterface/Core/interface/HadronizerFilter.h @@ -245,7 +245,7 @@ namespace edm { std::unique_ptr genEventInfo(hadronizer_.getGenEventInfo()); if (!genEventInfo.get()) { // create GenEventInfoProduct from HepMC event in case hadronizer didn't provide one - genEventInfo.reset(new GenEventInfoProduct(event.get())); + genEventInfo = std::make_unique(event.get()); } //if HepMCFilter was specified, test event diff --git a/GeneratorInterface/Core/test/Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8_cfg.py b/GeneratorInterface/Core/test/Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8_cfg.py new file mode 100644 index 0000000000000..be6cfde9b7630 --- /dev/null +++ b/GeneratorInterface/Core/test/Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8_cfg.py @@ -0,0 +1,193 @@ +# Auto generated configuration file +# using: +# Revision: 1.19 +# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v +# with command line options: Configuration/GenProduction/python/BTV-RunIISummer20UL17GEN-00002-fragment.py --python_filename BTV-RunIISummer20UL17GEN-00002_1_cfg.py --eventcontent RAWSIM --customise Configuration/DataProcessing/Utils.addMonitoring --datatier GEN --fileout file:BTV-RunIISummer20UL17GEN-00002.root --conditions auto:run2_mc --beamspot Realistic25ns13TeVEarly2017Collision --customise_commands process.source.numberEventsInLuminosityBlock=cms.untracked.uint32(100) --step GEN --geometry DB:Extended --era Run2_2017 --no_exec --mc -n 100 --nThreads 4 --nConcurrentLumis 1 +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Run2_2017_cff import Run2_2017 + +process = cms.Process('GEN',Run2_2017) + +# import of standard configurations +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('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeVEarly2017Collision_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(100), + output = cms.optional.untracked.allowed(cms.int32,cms.PSet) +) + +# Input source +process.source = cms.Source("EmptySource") + +process.options = cms.untracked.PSet( + FailPath = cms.untracked.vstring(), + IgnoreCompletely = cms.untracked.vstring(), + Rethrow = cms.untracked.vstring(), + SkipEvent = cms.untracked.vstring(), + allowUnscheduled = cms.obsolete.untracked.bool, + canDeleteEarly = cms.untracked.vstring(), + deleteNonConsumedUnscheduledModules = cms.untracked.bool(True), + emptyRunLumiMode = cms.obsolete.untracked.string, + eventSetup = cms.untracked.PSet( + forceNumberOfConcurrentIOVs = cms.untracked.PSet( + allowAnyLabel_=cms.required.untracked.uint32 + ), + numberOfConcurrentIOVs = cms.untracked.uint32(1) + ), + fileMode = cms.untracked.string('FULLMERGE'), + forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False), + makeTriggerResults = cms.obsolete.untracked.bool, + numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1), + numberOfConcurrentRuns = cms.untracked.uint32(1), + numberOfStreams = cms.untracked.uint32(0), + numberOfThreads = cms.untracked.uint32(1), + printDependencies = cms.untracked.bool(False), + sizeOfStackForThreadsInKB = cms.optional.untracked.uint32, + throwIfIllegalParameter = cms.untracked.bool(True), + wantSummary = cms.untracked.bool(False) +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + annotation = cms.untracked.string('WZ, 13 TeV, TuneCP5'), + name = cms.untracked.string('\\$Source$'), + version = cms.untracked.string('\\$Revision$') +) + +# Output definition + +process.RAWSIMoutput = cms.OutputModule("PoolOutputModule", + SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('generation_step') + ), + compressionAlgorithm = cms.untracked.string('LZMA'), + compressionLevel = cms.untracked.int32(1), + dataset = cms.untracked.PSet( + dataTier = cms.untracked.string('GEN'), + filterName = cms.untracked.string('') + ), + eventAutoFlushCompressedSize = cms.untracked.int32(20971520), + fileName = cms.untracked.string('file:BTV-RunIISummer20UL17GEN-00002.root'), + outputCommands = process.RAWSIMEventContent.outputCommands, + splitLevel = cms.untracked.int32(0) +) + +# Additional output definition + +# Other statements +process.genstepfilter.triggerConditions=cms.vstring("generation_step") +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '') + +process.generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter", + PythiaParameters = cms.PSet( + parameterSets = cms.vstring( + 'pythia8CommonSettings', + 'pythia8CP5Settings', + 'pythia8PSweightsSettings', + 'processParameters' + ), + processParameters = cms.vstring('WeakDoubleBoson:ffbar2ZW = on'), + pythia8CP5Settings = cms.vstring( + 'Tune:pp 14', + 'Tune:ee 7', + 'MultipartonInteractions:ecmPow=0.03344', + 'MultipartonInteractions:bProfile=2', + 'MultipartonInteractions:pT0Ref=1.41', + 'MultipartonInteractions:coreRadius=0.7634', + 'MultipartonInteractions:coreFraction=0.63', + 'ColourReconnection:range=5.176', + 'SigmaTotal:zeroAXB=off', + 'SpaceShower:alphaSorder=2', + 'SpaceShower:alphaSvalue=0.118', + 'SigmaProcess:alphaSvalue=0.118', + 'SigmaProcess:alphaSorder=2', + 'MultipartonInteractions:alphaSvalue=0.118', + 'MultipartonInteractions:alphaSorder=2', + 'TimeShower:alphaSorder=2', + 'TimeShower:alphaSvalue=0.118', + 'SigmaTotal:mode = 0', + 'SigmaTotal:sigmaEl = 21.89', + 'SigmaTotal:sigmaTot = 100.309', + 'PDF:pSet=LHAPDF6:NNPDF31_nnlo_as_0118' + ), + pythia8CommonSettings = cms.vstring( + 'Tune:preferLHAPDF = 2', + 'Main:timesAllowErrors = 10000', + 'Check:epTolErr = 0.01', + 'Beams:setProductionScalesFromLHEF = off', + 'SLHA:minMassSM = 1000.', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tau0Max = 10', + 'ParticleDecays:allowPhotonRadiation = on' + ), + pythia8PSweightsSettings = cms.vstring( + 'UncertaintyBands:doVariations = on', + 'UncertaintyBands:List = {isrRedHi isr:muRfac=0.707,fsrRedHi fsr:muRfac=0.707,isrRedLo isr:muRfac=1.414,fsrRedLo fsr:muRfac=1.414,isrDefHi isr:muRfac=0.5,fsrDefHi fsr:muRfac=0.5,isrDefLo isr:muRfac=2.0,fsrDefLo fsr:muRfac=2.0,isrConHi isr:muRfac=0.25,fsrConHi fsr:muRfac=0.25,isrConLo isr:muRfac=4.0,fsrConLo fsr:muRfac=4.0,fsr_G2GG_muR_dn fsr:G2GG:muRfac=0.5,fsr_G2GG_muR_up fsr:G2GG:muRfac=2.0,fsr_G2QQ_muR_dn fsr:G2QQ:muRfac=0.5,fsr_G2QQ_muR_up fsr:G2QQ:muRfac=2.0,fsr_Q2QG_muR_dn fsr:Q2QG:muRfac=0.5,fsr_Q2QG_muR_up fsr:Q2QG:muRfac=2.0,fsr_X2XG_muR_dn fsr:X2XG:muRfac=0.5,fsr_X2XG_muR_up fsr:X2XG:muRfac=2.0,fsr_G2GG_cNS_dn fsr:G2GG:cNS=-2.0,fsr_G2GG_cNS_up fsr:G2GG:cNS=2.0,fsr_G2QQ_cNS_dn fsr:G2QQ:cNS=-2.0,fsr_G2QQ_cNS_up fsr:G2QQ:cNS=2.0,fsr_Q2QG_cNS_dn fsr:Q2QG:cNS=-2.0,fsr_Q2QG_cNS_up fsr:Q2QG:cNS=2.0,fsr_X2XG_cNS_dn fsr:X2XG:cNS=-2.0,fsr_X2XG_cNS_up fsr:X2XG:cNS=2.0,isr_G2GG_muR_dn isr:G2GG:muRfac=0.5,isr_G2GG_muR_up isr:G2GG:muRfac=2.0,isr_G2QQ_muR_dn isr:G2QQ:muRfac=0.5,isr_G2QQ_muR_up isr:G2QQ:muRfac=2.0,isr_Q2QG_muR_dn isr:Q2QG:muRfac=0.5,isr_Q2QG_muR_up isr:Q2QG:muRfac=2.0,isr_X2XG_muR_dn isr:X2XG:muRfac=0.5,isr_X2XG_muR_up isr:X2XG:muRfac=2.0,isr_G2GG_cNS_dn isr:G2GG:cNS=-2.0,isr_G2GG_cNS_up isr:G2GG:cNS=2.0,isr_G2QQ_cNS_dn isr:G2QQ:cNS=-2.0,isr_G2QQ_cNS_up isr:G2QQ:cNS=2.0,isr_Q2QG_cNS_dn isr:Q2QG:cNS=-2.0,isr_Q2QG_cNS_up isr:Q2QG:cNS=2.0,isr_X2XG_cNS_dn isr:X2XG:cNS=-2.0,isr_X2XG_cNS_up isr:X2XG:cNS=2.0}', + 'UncertaintyBands:nFlavQ = 4', + 'UncertaintyBands:MPIshowers = on', + 'UncertaintyBands:overSampleFSR = 10.0', + 'UncertaintyBands:overSampleISR = 10.0', + 'UncertaintyBands:FSRpTmin2Fac = 20', + 'UncertaintyBands:ISRpTmin2Fac = 1' + ) + ), + comEnergy = cms.double(13000.0), + crossSection = cms.untracked.double(27.6), + filterEfficiency = cms.untracked.double(1.0), + maxEventsToPrint = cms.untracked.int32(1), + pythiaHepMCVerbosity = cms.untracked.bool(False), + pythiaPylistVerbosity = cms.untracked.int32(1) +) + + +# Path and EndPath definitions +process.generation_step = cms.Path(process.pgen) +process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) +process.endjob_step = cms.EndPath(process.endOfProcess) +process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput) + +# Schedule definition +process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.endjob_step,process.RAWSIMoutput_step) +from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask +associatePatAlgosToolsTask(process) + +#Setup FWK for multithreaded +process.options.numberOfThreads = cms.untracked.uint32(4) +process.options.numberOfStreams = cms.untracked.uint32(0) +process.options.numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1) +process.options.eventSetup.numberOfConcurrentIOVs = cms.untracked.uint32(1) +# filter all path with the production filter sequence +for path in process.paths: + getattr(process,path).insert(0, process.generator) + +# customisation of the process. + +# Automatic addition of the customisation function from Configuration.DataProcessing.Utils +from Configuration.DataProcessing.Utils import addMonitoring + +#call to customisation function addMonitoring imported from Configuration.DataProcessing.Utils +process = addMonitoring(process) + +# End of customisation functions + + +# Customisation from command line + +process.source.numberEventsInLuminosityBlock=cms.untracked.uint32(100) +# Add early deletion of temporary data products to reduce peak memory need +from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete +process = customiseEarlyDelete(process) +# End adding early deletion diff --git a/GeneratorInterface/CosmicMuonGenerator/interface/sim.h b/GeneratorInterface/CosmicMuonGenerator/interface/sim.h index 0ee34eaff334f..1733e9dbb24ef 100644 --- a/GeneratorInterface/CosmicMuonGenerator/interface/sim.h +++ b/GeneratorInterface/CosmicMuonGenerator/interface/sim.h @@ -172,7 +172,7 @@ class sim { #endif #ifdef sim_cxx -sim::sim(TTree *tree) { +inline sim::sim(TTree *tree) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. if (tree == nullptr) { @@ -187,19 +187,19 @@ sim::sim(TTree *tree) { Init(tree); } -sim::~sim() { +inline sim::~sim() { if (!fChain) return; delete fChain->GetCurrentFile(); } -Int_t sim::GetEntry(Long64_t entry) { +inline Int_t sim::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } -Long64_t sim::LoadTree(Long64_t entry) { +inline Long64_t sim::LoadTree(Long64_t entry) { // Set the environment to read one entry std::cout << "sim::LoadTree: " << std::endl; if (fChain) @@ -221,7 +221,7 @@ Long64_t sim::LoadTree(Long64_t entry) { return centry; } -void sim::Init(TTree *tree) { +inline void sim::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch // pointers of the tree will be set. @@ -307,7 +307,7 @@ void sim::Init(TTree *tree) { Notify(); } -Bool_t sim::Notify() { +inline Bool_t sim::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. It is normaly not necessary to make changes @@ -317,14 +317,14 @@ Bool_t sim::Notify() { return kTRUE; } -void sim::Show(Long64_t entry) { +inline void sim::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } -Int_t sim::Cut(Long64_t entry) { +inline Int_t sim::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. diff --git a/GeneratorInterface/GenFilters/plugins/PythiaFilterIsolatedTrack.h b/GeneratorInterface/GenFilters/plugins/PythiaFilterIsolatedTrack.h index f8b430e6e9122..c983ee2adba58 100644 --- a/GeneratorInterface/GenFilters/plugins/PythiaFilterIsolatedTrack.h +++ b/GeneratorInterface/GenFilters/plugins/PythiaFilterIsolatedTrack.h @@ -46,7 +46,7 @@ class PythiaFilterIsolatedTrack : public edm::stream::EDFilter initializeGlobalCache(edm::ParameterSet const&) { - return std::unique_ptr(new PythiaFilterIsoTracks::Counters()); + return std::make_unique(); } bool filter(edm::Event&, edm::EventSetup const&) override; diff --git a/GeneratorInterface/HijingInterface/interface/HijingPythiaWrapper.h b/GeneratorInterface/HijingInterface/interface/HijingPythiaWrapper.h index 9e2768e770d1a..b22d66afd48cd 100644 --- a/GeneratorInterface/HijingInterface/interface/HijingPythiaWrapper.h +++ b/GeneratorInterface/HijingInterface/interface/HijingPythiaWrapper.h @@ -50,7 +50,7 @@ extern "C" { } */ -float ranff_(unsigned int* iseed) { +inline float ranff_(unsigned int* iseed) { (*iseed) = (69069 * (*iseed) + 1) & 0xffffffffUL; return (*iseed) / 4294967296.0; } diff --git a/GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h b/GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h index f09eea7889dfc..0d33d7c575e04 100644 --- a/GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h +++ b/GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h @@ -7,7 +7,7 @@ namespace edm { template <> - GeneratorFilter::GeneratorFilter(ParameterSet const& ps) + inline GeneratorFilter::GeneratorFilter(ParameterSet const& ps) : hadronizer_(ps, consumesCollector()) { init(ps); } diff --git a/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc b/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc index 6bb55e9b7cbd2..bfe675e6558ae 100644 --- a/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc +++ b/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc @@ -81,7 +81,7 @@ class ExternalLHEProducer : public edm::one::EDProducer makeArgs(uint32_t nEvents, unsigned int nThreads, std::uint32_t seed) const; int closeDescriptors(int preserve) const; - void executeScript(std::vector const& args, int id) const; + void executeScript(std::vector const& args, int id, bool isPost) const; void nextEvent(); std::unique_ptr generateRunInfo(std::vector const& files) const; @@ -96,6 +96,7 @@ class ExternalLHEProducer : public edm::one::EDProducer postGenerationCommand_; // Used only if nPartonMapping is in the configuration std::map> nPartonMapping_{}; @@ -132,7 +133,8 @@ ExternalLHEProducer::ExternalLHEProducer(const edm::ParameterSet& iConfig) npars_(iConfig.getParameter("numberOfParameters")), nEvents_(iConfig.getUntrackedParameter("nEvents")), storeXML_(iConfig.getUntrackedParameter("storeXML")), - generateConcurrently_(iConfig.getUntrackedParameter("generateConcurrently")) { + generateConcurrently_(iConfig.getUntrackedParameter("generateConcurrently")), + postGenerationCommand_(iConfig.getUntrackedParameter>("postGenerationCommand")) { if (npars_ != args_.size()) throw cms::Exception("ExternalLHEProducer") << "Problem with configuration: " << args_.size() << " script arguments given, expected " << npars_; @@ -268,7 +270,7 @@ void ExternalLHEProducer::beginRunProduce(edm::Run& run, edm::EventSetup const& using namespace std::string_literals; auto out = path("thread"s + std::to_string(t)) / path(outputFile_); infiles[t] = out.native(); - executeScript(makeArgs(nEvents, 1, seed + t), t); + executeScript(makeArgs(nEvents, 1, seed + t), t, false); } catch (...) { char expected = 0; if (exceptSet.compare_exchange_strong(expected, 1)) { @@ -285,7 +287,18 @@ void ExternalLHEProducer::beginRunProduce(edm::Run& run, edm::EventSetup const& } } else { infiles = std::vector(1, outputFile_); - executeScript(makeArgs(nEvents_, nThreads_, seed), 0); + executeScript(makeArgs(nEvents_, nThreads_, seed), 0, false); + } + + //run post-generation command if specified + if (!postGenerationCommand_.empty()) { + std::vector postcmd = postGenerationCommand_; + try { + postcmd[0] = edm::FileInPath(postcmd[0]).fullPath(); + } catch (const edm::Exception& e) { + edm::LogWarning("ExternalLHEProducer") << postcmd[0] << " is not a relative path. Run it as a shell command."; + } + executeScript(postcmd, 0, true); } //fill LHEXMLProduct (streaming read directly into compressed buffer to save memory) @@ -421,7 +434,7 @@ int ExternalLHEProducer::closeDescriptors(int preserve) const { } // ------------ Execute the script associated with this producer ------------ -void ExternalLHEProducer::executeScript(std::vector const& args, int id) const { +void ExternalLHEProducer::executeScript(std::vector const& args, int id, bool isPost) const { // Fork a script, wait until it finishes. int rc = 0, rc2 = 0; @@ -441,12 +454,19 @@ void ExternalLHEProducer::executeScript(std::vector const& args, in << "Failed to set pipe file descriptor flags (errno=" << rc << ", " << strerror(rc) << ")"; } - unsigned int argc = 1 + args.size(); + unsigned int argc_pre = 0; + // For generation command the first argument gives to the scriptName + if (!isPost) { + argc_pre = 1; + } + unsigned int argc = argc_pre + args.size(); // TODO: assert that we have a reasonable number of arguments char** argv = new char*[argc + 1]; - argv[0] = strdup(scriptName_.c_str()); - for (unsigned int i = 1; i < argc; i++) { - argv[i] = strdup(args[i - 1].c_str()); + if (!isPost) { + argv[0] = strdup(scriptName_.c_str()); + } + for (unsigned int i = 0; i < args.size(); i++) { + argv[argc_pre + i] = strdup(args[i].c_str()); } argv[argc] = nullptr; @@ -454,7 +474,7 @@ void ExternalLHEProducer::executeScript(std::vector const& args, in if (pid == 0) { // The child process if (!(rc = closeDescriptors(filedes[1]))) { - if (generateConcurrently_) { + if (!isPost && generateConcurrently_) { using namespace std::filesystem; using namespace std::string_literals; std::error_code ec; @@ -532,6 +552,9 @@ void ExternalLHEProducer::fillDescriptions(edm::ConfigurationDescriptions& descr desc.addUntracked("storeXML", false); desc.addUntracked("generateConcurrently", false) ->setComment("If true, run the script concurrently in separate processes."); + desc.addUntracked>("postGenerationCommand", std::vector()) + ->setComment( + "Command to run after the generation script has completed. The first argument can be a relative path."); edm::ParameterSetDescription nPartonMappingDesc; nPartonMappingDesc.add("idprup"); diff --git a/GeneratorInterface/LHEInterface/scripts/mergeLHE.py b/GeneratorInterface/LHEInterface/scripts/mergeLHE.py new file mode 100755 index 0000000000000..89ad68233755c --- /dev/null +++ b/GeneratorInterface/LHEInterface/scripts/mergeLHE.py @@ -0,0 +1,418 @@ +#!/usr/bin/env python + +from __future__ import print_function +import logging +import argparse +import math +import glob +import sys +import os +import re + +class BaseLHEMerger(object): + """Base class of the LHE merge schemes""" + + def __init__(self, input_files, output_file): + self.input_files = input_files + self.output_file = output_file + + def merge(self): + """Output the merged LHE""" + pass + +class DefaultLHEMerger(BaseLHEMerger): + """Default LHE merge scheme that copies the header of the first LHE file, + merges and outputs the init block, then concatenates all event blocks.""" + + def __init__(self, input_files, output_file, **kwargs): + super(DefaultLHEMerger, self).__init__(input_files, output_file) + + self.bypass_check = kwargs.get('bypass_check', False) + # line-by-line iterator for each input file + self._f = [self.file_iterator(name) for name in self.input_files] + self._header_str = [] + self._is_mglo = False + self._xsec_combined = 0. + self._uwgt = 0. + self._init_str = [] # initiated blocks for each input file + self._nevent = [] # number of events for each input file + + def file_iterator(self, path): + """Line-by-line iterator of a txt file""" + with open(path, 'r') as f: + for line in f: + yield line + + def check_header_compatibility(self): + """Check if all headers for input files are consistent.""" + + if self.bypass_check: + return + + inconsistent_error_info = ("Incompatibility found in LHE headers: %s. " + "Use -b/--bypass-check to bypass the check.") + allow_diff_keys = [ + 'nevent', 'numevts', 'iseed', 'Seed', 'Random', '.log', '.dat', '.lhe', + 'Number of Events', 'Integrated weight' + ] + self._header_lines = [header.split('\n') for header in self._header_str] + + # Iterate over header lines for all input files and check consistency + logging.debug('header line number: %s' \ + % ', '.join([str(len(lines)) for lines in self._header_lines])) + assert all([ + len(self._header_lines[0]) == len(lines) for lines in self._header_lines] + ), inconsistent_error_info % "line number not matches" + inconsistent_lines_set = [set() for _ in self._header_lines] + for line_zip in zip(*self._header_lines): + if any([k in line_zip[0] for k in allow_diff_keys]): + logging.debug('Captured \'%s\', we allow difference in this line' % line_zip[0]) + continue + if not all([line_zip[0] == line for line in line_zip]): + # Ok so meet inconsistency in some lines, then temporarily store them + for i, line in enumerate(line_zip): + inconsistent_lines_set[i].add(line) + # Those inconsistent lines still match, meaning that it is only a change of order + assert all([inconsistent_lines_set[0] == lset for lset in inconsistent_lines_set]), \ + inconsistent_error_info % ('{' + ', '.join(inconsistent_lines_set[0]) + '}') + + def merge_headers(self): + """Merge the headers of input LHEs. Need special handle for the MG5 LO case.""" + + self._is_mglo = all(['MGGenerationInfo' in header for header in self._header_str]) + if self._is_mglo and not self.bypass_check: + # Special handling of MadGraph5 LO LHEs + match_geninfo = [ + re.search( + (r"\\s+#\s*Number of Events\s*\:\s*(\S+)\s+" + r"#\s*Integrated weight \(pb\)\s*\:\s*(\S+)\s+\<\/MGGenerationInfo\>"), + header + ) for header in self._header_str + ] + self._xsec_combined = sum( + [float(info.group(2)) * nevt for info, nevt in zip(match_geninfo, self._nevent)] + ) / sum(self._nevent) + geninfo_combined = ("\n" + "# Number of Events : %d\n" + "# Integrated weight (pb) : %.10f\n") \ + % (sum(self._nevent), self._xsec_combined) + logging.info('Detected: MG5 LO LHEs. Input :\n\tnevt\txsec') + for info, nevt in zip(match_geninfo, self._nevent): + logging.info('\t%d\t%.10f' % (nevt, float(info.group(2)))) + logging.info('Combined :\n\t%d\t%.10f' \ + % (sum(self._nevent), self._xsec_combined)) + + header_combined = self._header_str[0].replace(match_geninfo[0].group(), geninfo_combined) + return header_combined + + else: + # No need to merge the headers + return self._header_str[0] + + def merge_init_blocks(self): + """If all blocks are identical, return the same block + (in the case of Powheg LHEs); otherwise, calculate the output + blocks by merging the input blocks info using formula (same with the + MG5LOLHEMerger scheme): + XSECUP = sum(xsecup * no.events) / tot.events + XERRUP = sqrt( sum(sigma^2 * no.events^2) ) / tot.events + XMAXUP = max(xmaxup) + """ + + if self.bypass_check: + # If bypass the consistency check, simply use the first LHE + # block as the output + return self._init_str[0] + + # Initiate collected init block info. Will be in format of + # {iprocess: [xsecup, xerrup, xmaxup]} + new_init_block = {} + old_init_block = [{} for _ in self._init_str] + + # Read the xsecup, xerrup, and xmaxup info from the block for + # all input LHEs + for i, bl in enumerate(self._init_str): # loop over files + nline = int(bl.split('\n')[0].strip().split()[-1]) + + # loop over lines in block + for bl_line in bl.split('\n')[1:nline + 1]: + bl_line_sp = bl_line.split() + old_init_block[i][int(bl_line_sp[3])] = [ + float(bl_line_sp[0]), float(bl_line_sp[1]), float(bl_line_sp[2])] + + # After reading all subprocesses info, store the rest content in + # block for the first file + if i == 0: + info_after_subprocess = bl.strip().split('\n')[nline + 1:] + + logging.info('Input file: %s' % self.input_files[i]) + for ipr in sorted(list(old_init_block[i].keys()), reverse=True): + # reverse order: follow the MG5 custom + logging.info(' xsecup, xerrup, xmaxup, lprup: %.6E, %.6E, %.6E, %d' \ + % tuple(old_init_block[i][ipr] + [ipr])) + + # Adopt smarter block merging method + # If all blocks from input files are identical, return the same block; + # otherwise combine them based on MG5LOLHEMerger scheme + if all([old_init_block[i] == old_init_block[0] for i in range(len(self._f))]): + # All blocks are identical + logging.info( + 'All input blocks are identical. Output the same " block.') + return self._init_str[0] + + # Otherwise, calculate merged init block + for i in range(len(self._f)): + for ipr in old_init_block[i]: + # Initiate the subprocess for the new block if it is found for the + # first time in one input file + if ipr not in new_init_block: + new_init_block[ipr] = [0., 0., 0.] + new_init_block[ipr][0] += old_init_block[i][ipr][0] * self._nevent[i] # xsecup + new_init_block[ipr][1] += old_init_block[i][ipr][1]**2 * self._nevent[i]**2 # xerrup + new_init_block[ipr][2] = max(new_init_block[ipr][2], old_init_block[i][ipr][2]) # xmaxup + tot_nevent = sum([self._nevent[i] for i in range(len(self._f))]) + + # Write first line of the block (modify the nprocess at the last) + self._merged_init_str = self._init_str[0].split('\n')[0].strip().rsplit(' ', 1)[0] \ + + ' ' + str(len(new_init_block)) + '\n' + # Form the merged init block + logging.info('Output file: %s' % self.output_file) + for ipr in sorted(list(new_init_block.keys()), reverse=True): + # reverse order: follow the MG5 custom + new_init_block[ipr][0] /= tot_nevent + new_init_block[ipr][1] = math.sqrt(new_init_block[ipr][1]) / tot_nevent + logging.info(' xsecup, xerrup, xmaxup, lprup: %.6E, %.6E, %.6E, %d' \ + % tuple(new_init_block[ipr] + [ipr])) + self._merged_init_str += '%.6E %.6E %.6E %d\n' % tuple(new_init_block[ipr] + [ipr]) + self._merged_init_str += '\n'.join(info_after_subprocess) + if len(info_after_subprocess): + self._merged_init_str += '\n' + + return self._merged_init_str + + def merge(self): + with open(self.output_file, 'w') as fw: + # Read the header for the all input files + for i in range(len(self._f)): + header = [] + line = next(self._f[i]) + while not line.startswith('') and not line.startswith(' + self._header_str.append(''.join(header)) + self.check_header_compatibility() + + # Read blocks for all input_files + for i in range(len(self._f)): + init = [] + line = next(self._f[i]) + while not line.startswith(''): + init.append(line) + line = next(self._f[i]) + # 'init_str' includes all contents inside ... + self._init_str.append(''.join(init)) + + # Iterate over all events file-by-file and write events temporarily + # to .tmp.lhe + with open('.tmp.lhe', 'w') as _fwtmp: + for i in range(len(self._f)): + nevent = 0 + while True: + line = next(self._f[i]) + if line.startswith(''): + nevent += 1 + if line.startswith(''): + break + _fwtmp.write(line) + self._nevent.append(nevent) + self._f[i].close() + + # Merge the header and init blocks and write to the output + fw.write(self.merge_headers()) + fw.write('\n' + self.merge_init_blocks() + '\n') + + # Write event blocks in .tmp.lhe back to the output + # If is MG5 LO LHE, will recalculate the weights based on combined xsec + # and nevent read from , and the 'event_norm' mode + if self._is_mglo and not self.bypass_check: + event_norm = re.search( + r'\s(\w+)\s*=\s*event_norm\s', + self._header_str[0]).group(1) + if event_norm == 'sum': + self._uwgt = self._xsec_combined / sum(self._nevent) + elif event_norm == 'average': + self._uwgt = self._xsec_combined + logging.info(("MG5 LO LHE with event_norm = %s detected. Will " + "recalculate weights in each event block.\n" + "Unit weight: %+.7E") % (event_norm, self._uwgt)) + + # Modify event wgt when transfering .tmp.lhe to the output file + event_line = -999 + with open('.tmp.lhe', 'r') as ftmp: + sign = lambda x: -1 if x < 0 else 1 + for line in ftmp: + event_line += 1 + if line.startswith(' block + orig_wgt = float(line.split()[2]) + fw.write(re.sub(r'(^\s*\S+\s+\S+\s+)\S+(.+)', r'\g<1>%+.7E\g<2>' \ + % (sign(orig_wgt) * self._uwgt), line)) + elif line.startswith('\s*(\S+)\s*\<\/wgt\>', line).group(1) + fw.write(line.replace( + addi_wgt_str, '%+.7E' % (float(addi_wgt_str) / orig_wgt * self._uwgt))) + else: + fw.write(line) + else: + # Simply transfer all lines + with open('.tmp.lhe', 'r') as ftmp: + for line in ftmp: + fw.write(line) + fw.write('\n') + os.remove('.tmp.lhe') + + +class MG5LOLHEMerger(BaseLHEMerger): + """Use the merger script dedicated for MG5 LO LHEs, as introduced in + https://github.com/cms-sw/genproductions/blob/master/bin/MadGraph5_aMCatNLO/Utilities/merge.pl + """ + + def __init__(self, input_files, output_file, **kwargs): + super(MG5LOLHEMerger, self).__init__(input_files, output_file) + self._merger_script_url = \ + 'https://raw.githubusercontent.com/cms-sw/genproductions/5c1e865a6fbe3a762a28363835d9a804c9cf0dbe/bin/MadGraph5_aMCatNLO/Utilities/merge.pl' + + def merge(self): + logging.info( + ('Use the merger script in genproductions dedicated for ' + 'MadGraph5-produced LHEs')) + os.system('curl -s -L %s | perl - %s %s.gz banner.txt' \ + % (self._merger_script_url, ' '.join(self.input_files), self.output_file)) + os.system('gzip -df %s.gz' % self.output_file) + os.system('rm banner.txt') + + +class ExternalCppLHEMerger(BaseLHEMerger): + """Use the external mergeLheFiles.cpp file to merge LHE files, as introduced in + https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideSubgroupMC#1_2_Using_pLHE_campaigns + """ + + def __init__(self, input_files, output_file, **kwargs): + super(ExternalCppLHEMerger, self).__init__(input_files, output_file) + self._merger_script_url = \ + 'https://twiki.cern.ch/twiki/bin/viewfile/CMSPublic/SWGuideSubgroupMC?filename=mergeLheFiles.cpp;rev=2' + + def merge(self): + logging.info( + ('Use the external mergeLheFiles.cpp file to merge LHE files.')) + os.system('curl -s -o mergeLheFiles.cpp %s' % self._merger_script_url) + with open('mergeLheFiles.cpp') as f: + script_str = f.read() + with open('mergeLheFiles.cpp', 'w') as fw: + fw.write(script_str.replace('/tmp/covarell/out.lhe', self.output_file)) + with open('input_files.txt', 'w') as fw: + fw.write('\n'.join(self.input_files) + '\n') + + os.system('g++ -Wall -o mergeLheFiles mergeLheFiles.cpp') + os.system('./mergeLheFiles input_files.txt') + os.system('rm mergeLheFiles* input_files.txt') + + +def main(argv = None): + """Main routine of the script. + + Arguments: + - `argv`: arguments passed to the main routine + """ + + if argv == None: + argv = sys.argv[1:] + + parser = argparse.ArgumentParser( + description=("A universal script that merges multiple LHE files for all possible conditions and in the most " + "natural way.\n" + "A detailed description of the merging step (in the default mode):\n" + " 1. Header:\n" + " a. assert consistency of the headers (allow difference for the info of e.g. #event, seed);\n" + " b. if not MG LO LHEs, will simply use the header from the first LHE; otherwise, reset the " + " from the headers by merging the #event & xsec info;\n" + " 2. Init block: if all blocks are the same, use the same as output; otherwise (the MG LO " + "case), merge them by recalculating the # of subprocess (LRPUP) and XSECUP, XERRUP, XMAXUP per " + "each subprocess.\n" + " 3. Event block: concatenate all event blocks. If for MG LO LHEs, recalculate the per-event " + "XWGTUP and all tags based on the new XSECUP, #event, and 'event_norm' read from the MG " + "run card.\n" + "For further development of this script please always validate the merging result on the test " + "routines: https://github.com/colizz/mergelhe_validate\n" + "Example usage:\n" + " mergeLHE.py -i 'thread*/*.lhe,another_file/another.lhe' -o output.lhe"), + formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument("-i", "--input-files", type=str, + help="Input LHE file paths separated by commas. Shell-type wildcards are supported.") + parser.add_argument("-o", "--output-file", + default='output.lhe', type=str, + help="Output LHE file path.") + parser.add_argument("--force-mglo-merger", action='store_true', + help=("Force to use the merger script dedicated for MG5 LO LHEs, as introduced in " + "https://github.com/cms-sw/genproductions/blob/master/bin/MadGraph5_aMCatNLO/Utilities/merge.pl")) + parser.add_argument("--force-cpp-merger", action='store_true', + help=("Force to use the external mergeLheFiles.cpp file to merge LHE files, as introduced in " + "https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideSubgroupMC#1_2_Using_pLHE_campaigns")) + parser.add_argument("-b", "--bypass-check", action='store_true', + help=("Bypass the compatibility check for the headers. If true, the header and init block " + "will be just a duplicate from the first input file, and events are concatenated without " + "modification.")) + parser.add_argument("--debug", action='store_true', + help="Use the debug mode.") + args = parser.parse_args(argv) + + logging.basicConfig( + format='[%(levelname)s] %(message)s', + level=logging.INFO if not args.debug else DEBUG) + logging.info('>>> launch mergeLHE.py in %s' % os.path.abspath(os.getcwd())) + + # Extract input LHE files from the path + assert len(args.input_files), \ + ('Please specify your input LHE files by -i/--input-files. ' + 'Run \'mergeLHE.py -h\' for details.') + input_files = [] # each individual input file + for path in args.input_files.split(','): + find_files = glob.glob(path) + if len(find_files) == 0: + logging.info('Warning: cannot find files in %s' % path) + input_files += find_files + input_files.sort() + logging.info('>>> Merge %d files: [%s]' % (len(input_files), ', '.join(input_files))) + logging.info('>>> Write to output: %s ' % args.output_file) + + if not os.path.exists(os.path.dirname(os.path.realpath(args.output_file))): + os.makedirs(os.path.dirname(os.path.realpath(args.output_file))) + + # Check arguments + assert len(input_files) > 0, 'Input LHE files should be more than 0.' + if len(input_files) == 1: + logging.warning('Input LHE only has 1 file. Will copy this file to the destination.') + import shutil + shutil.copy(input_files[0], args.output_file) + return + assert [args.force_mglo_merger, args.force_cpp_merger].count(True) <= 1, \ + "Can only specify at most one from --force-mglo-merger or --force-cpp-merger." + + # Determine the merging scheme + if args.force_mglo_merger: + lhe_merger = MG5LOLHEMerger(input_files, args.output_file) + elif args.force_cpp_merger: + lhe_merger = ExternalCppLHEMerger(input_files, args.output_file) + else: + lhe_merger = DefaultLHEMerger(input_files, args.output_file, bypass_check=args.bypass_check) + + # Do merging + lhe_merger.merge() + + +if __name__=="__main__": + main() diff --git a/GeneratorInterface/LHEInterface/src/LH5Reader.cc b/GeneratorInterface/LHEInterface/src/LH5Reader.cc index 35dc435b16cff..dc64a6968ef14 100644 --- a/GeneratorInterface/LHEInterface/src/LH5Reader.cc +++ b/GeneratorInterface/LHEInterface/src/LH5Reader.cc @@ -1,12 +1,14 @@ #include #include #include -#include -#include +#include + +#include #include +#include +#include #include #include -#include #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -179,13 +181,13 @@ namespace lhef { if (!curDoc) { if (!fileURLs.empty()) { logFileAction(" Initiating request to open LHE file ", fileURLs[curIndex]); - curSource.reset(new FileSource(fileURLs[curIndex])); + curSource = std::make_unique(fileURLs[curIndex]); logFileAction(" Successfully opened LHE file ", fileURLs[curIndex]); if (newFileOpened != nullptr) *newFileOpened = true; ++curIndex; } else if (!strName.empty()) { - curSource.reset(new StringSource(strName)); + curSource = std::make_unique(strName); } // New "doc" has been opened. This is the same as a new source. curDoc = true; diff --git a/GeneratorInterface/LHEInterface/src/lheh5.cc b/GeneratorInterface/LHEInterface/src/lheh5.cc index 1734dd26cd704..0e257d1228f06 100644 --- a/GeneratorInterface/LHEInterface/src/lheh5.cc +++ b/GeneratorInterface/LHEInterface/src/lheh5.cc @@ -17,19 +17,19 @@ namespace lheh5 { } Particle Events::mkParticle(size_t idx) const { - return {std::move(_vid[idx]), - std::move(_vstatus[idx]), - std::move(_vmother1[idx]), - std::move(_vmother2[idx]), - std::move(_vcolor1[idx]), - std::move(_vcolor2[idx]), - std::move(_vpx[idx]), - std::move(_vpy[idx]), - std::move(_vpz[idx]), - std::move(_ve[idx]), - std::move(_vm[idx]), - std::move(_vlifetime[idx]), - std::move(_vspin[idx])}; + return {_vid[idx], + _vstatus[idx], + _vmother1[idx], + _vmother2[idx], + _vcolor1[idx], + _vcolor2[idx], + _vpx[idx], + _vpy[idx], + _vpz[idx], + _ve[idx], + _vm[idx], + _vlifetime[idx], + _vspin[idx]}; } std::vector Events::mkEvent(size_t ievent) const { @@ -50,17 +50,17 @@ namespace lheh5 { EventHeader Events::mkEventHeader(int iev) const { return { - std::move(_vnparticles[iev]), - std::move(_vpid[iev]), - std::move(_vweight[iev]), - std::move(_vtrials[iev]), - std::move(_vscale[iev]), - std::move(_vrscale[iev]), - std::move(_vfscale[iev]), - std::move(_vaqed[iev]), - std::move(_vaqcd[iev]), - std::move(_vnpLO[iev]), - std::move(_vnpNLO[iev]), + _vnparticles[iev], + _vpid[iev], + _vweight[iev], + _vtrials[iev], + _vscale[iev], + _vrscale[iev], + _vfscale[iev], + _vaqed[iev], + _vaqcd[iev], + _vnpLO[iev], + _vnpNLO[iev], }; } @@ -195,19 +195,19 @@ namespace lheh5 { } Particle Events2::mkParticle(size_t idx) const { - return {std::move(_vid[idx]), - std::move(_vstatus[idx]), - std::move(_vmother1[idx]), - std::move(_vmother2[idx]), - std::move(_vcolor1[idx]), - std::move(_vcolor2[idx]), - std::move(_vpx[idx]), - std::move(_vpy[idx]), - std::move(_vpz[idx]), - std::move(_ve[idx]), - std::move(_vm[idx]), - std::move(_vlifetime[idx]), - std::move(_vspin[idx])}; + return {_vid[idx], + _vstatus[idx], + _vmother1[idx], + _vmother2[idx], + _vcolor1[idx], + _vcolor2[idx], + _vpx[idx], + _vpy[idx], + _vpz[idx], + _ve[idx], + _vm[idx], + _vlifetime[idx], + _vspin[idx]}; } std::vector Events2::mkEvent(size_t ievent) const { @@ -230,15 +230,15 @@ namespace lheh5 { EventHeader Events2::mkEventHeader(int iev) const { return { - std::move(_vnparticles[iev]), - std::move(_vpid[iev]), - std::move(_vweight[iev]), - std::move(_vtrials[iev]), - std::move(_vscale[iev]), - std::move(_vrscale[iev]), - std::move(_vfscale[iev]), - std::move(_vaqed[iev]), - std::move(_vaqcd[iev]), + _vnparticles[iev], + _vpid[iev], + _vweight[iev], + _vtrials[iev], + _vscale[iev], + _vrscale[iev], + _vfscale[iev], + _vaqed[iev], + _vaqcd[iev], npLO, npNLO, }; diff --git a/GeneratorInterface/PyquenInterface/interface/PyquenGeneratorFilter.h b/GeneratorInterface/PyquenInterface/interface/PyquenGeneratorFilter.h index 45ecb1b859ea5..0e0ad78187026 100644 --- a/GeneratorInterface/PyquenInterface/interface/PyquenGeneratorFilter.h +++ b/GeneratorInterface/PyquenInterface/interface/PyquenGeneratorFilter.h @@ -7,7 +7,7 @@ namespace edm { template <> - GeneratorFilter::GeneratorFilter(ParameterSet const& ps) + inline GeneratorFilter::GeneratorFilter(ParameterSet const& ps) : hadronizer_(ps, consumesCollector()) { init(ps); } diff --git a/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.cc b/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.cc index 1df9eee48a530..51e1a4887319e 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.cc @@ -27,11 +27,11 @@ JetMatchingHook::JetMatchingHook(const edm::ParameterSet& ps, const Info* info) fRunBlock(nullptr), fEventBlock(nullptr), fEventNumber(0), -// fInfoPtr(info), + // fInfoPtr(info), fJetMatching(nullptr), fJetInputFill(nullptr), fIsInitialized(false) { -// assert(fInfoPtr); + // assert(fInfoPtr); std::string scheme = ps.getParameter("scheme"); diff --git a/GeneratorInterface/Pythia8Interface/plugins/Py8MassGun.cc b/GeneratorInterface/Pythia8Interface/plugins/Py8MassGun.cc index 9c03f3a00263a..58e2a76802fed 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/Py8MassGun.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/Py8MassGun.cc @@ -1,4 +1,6 @@ +#include + #include "GeneratorInterface/Core/interface/GeneratorFilter.h" #include "GeneratorInterface/ExternalDecays/interface/ExternalDecayDriver.h" @@ -106,7 +108,7 @@ namespace gen { if (!fMasterGen->next()) return false; - event().reset(new HepMC::GenEvent); + event() = std::make_unique(); return toHepMC.fill_next_event(fMasterGen->event, event().get()); } diff --git a/GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc b/GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc index a06f5c0402cb1..419992e3a2e50 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc @@ -58,6 +58,7 @@ using namespace Pythia8; #include "GeneratorInterface/Core/interface/GeneratorFilter.h" #include "GeneratorInterface/Core/interface/HadronizerFilter.h" +#include "GeneratorInterface/Core/interface/ConcurrentGeneratorFilter.h" #include "GeneratorInterface/Core/interface/ConcurrentHadronizerFilter.h" #include "GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.h" @@ -446,7 +447,9 @@ bool Pythia8Hadronizer::initializeForInternalPartons() { } if (!(fUserHooksVector->hooks).empty() && !UserHooksSet) { - fMasterGen->setUserHooksPtr(fUserHooksVector); + for (auto &fUserHook : fUserHooksVector->hooks) { + fMasterGen->addUserHooksPtr(fUserHook); + } UserHooksSet = true; } @@ -589,7 +592,9 @@ bool Pythia8Hadronizer::initializeForExternalPartons() { } if (!(fUserHooksVector->hooks).empty() && !UserHooksSet) { - fMasterGen->setUserHooksPtr(fUserHooksVector); + for (auto &fUserHook : fUserHooksVector->hooks) { + fMasterGen->addUserHooksPtr(fUserHook); + } UserHooksSet = true; } @@ -1017,6 +1022,10 @@ DEFINE_FWK_MODULE(Pythia8GeneratorFilter); typedef edm::HadronizerFilter Pythia8HadronizerFilter; DEFINE_FWK_MODULE(Pythia8HadronizerFilter); +typedef edm::ConcurrentGeneratorFilter + Pythia8ConcurrentGeneratorFilter; +DEFINE_FWK_MODULE(Pythia8ConcurrentGeneratorFilter); + typedef edm::ConcurrentHadronizerFilter Pythia8ConcurrentHadronizerFilter; DEFINE_FWK_MODULE(Pythia8ConcurrentHadronizerFilter); diff --git a/GeneratorInterface/Pythia8Interface/test/BuildFile.xml b/GeneratorInterface/Pythia8Interface/test/BuildFile.xml index d91857e914d2d..c3c278bb6eba7 100755 --- a/GeneratorInterface/Pythia8Interface/test/BuildFile.xml +++ b/GeneratorInterface/Pythia8Interface/test/BuildFile.xml @@ -16,3 +16,4 @@ + diff --git a/GeneratorInterface/Pythia8Interface/test/test_Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8.sh b/GeneratorInterface/Pythia8Interface/test/test_Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8.sh new file mode 100644 index 0000000000000..36c0c9d4bcf3b --- /dev/null +++ b/GeneratorInterface/Pythia8Interface/test/test_Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8.sh @@ -0,0 +1,13 @@ +#!/bin/bash +curl -s -k https://cms-pdmv.cern.ch/mcm/public/restapi/requests/get_fragment/BTV-RunIISummer20UL17GEN-00002 --retry 3 --create-dirs -o ${LOCALTOP}/src/Configuration/GenProduction/python/BTV-RunIISummer20UL17GEN-00002-fragment.py + +cd ${LOCALTOP}/src +scram b +cd ../.. + +cmsDriver.py Configuration/GenProduction/python/BTV-RunIISummer20UL17GEN-00002-fragment.py --python_filename test_BTV-RunIISummer20UL17GEN-00002_1_cfg.py --eventcontent RAWSIM --customise Configuration/DataProcessing/Utils.addMonitoring --datatier GEN --fileout file:test_BTV-RunIISummer20UL17GEN-00002.root --conditions auto:run2_mc --beamspot Realistic25ns13TeVEarly2017Collision --customise_commands process.source.numberEventsInLuminosityBlock="cms.untracked.uint32(10)" --step GEN --geometry DB:Extended --era Run2_2017 --no_exec --mc -n 50 --nThreads 4 --nConcurrentLumis 0 + +sed -i "s/Pythia8GeneratorFilter/Pythia8ConcurrentGeneratorFilter/g" test_BTV-RunIISummer20UL17GEN-00002_1_cfg.py + +cmsRun test_BTV-RunIISummer20UL17GEN-00002_1_cfg.py +rm ${LOCALTOP}/src/Configuration/GenProduction/python/BTV-RunIISummer20UL17GEN-00002-fragment.py diff --git a/Geometry/CMSCommonData/test/run_DOMCount.py b/Geometry/CMSCommonData/test/run_DOMCount.py index 0401e7a5f3276..37ed150284b33 100755 --- a/Geometry/CMSCommonData/test/run_DOMCount.py +++ b/Geometry/CMSCommonData/test/run_DOMCount.py @@ -1,6 +1,7 @@ #! /usr/bin/env python from __future__ import print_function +from FWCore.ParameterSet.pfnInPath import pfnInPath import FWCore.ParameterSet.Config as cms import sys import os @@ -49,27 +50,7 @@ def callDOMCount(schemaPath, xmlPath): os.system ("rm %s" % (xmlFilename)) # Find the schema file -schema = os.environ['LOCAL_TOP_DIR'] + '/src/DetectorDescription/Schema/DDLSchema.xsd' -if os.path.isfile(schema): - pass -else: - # It is an error if the file is not there but the package is - packageDirectory = os.environ['LOCAL_TOP_DIR'] + '/src/DetectorDescription/Schema' - if os.path.isdir(packageDirectory): - print('Error, schema file not found') - print('DDLSchema.xsd not found in ' + packageDirectory) - print('Quitting, cannot test XML files without a schema') - sys.exit(0) - - # if there is a base release then try to find the file there - schema = os.getenv('CMSSW_RELEASE_BASE') + '/src/DetectorDescription/Schema/DDLSchema.xsd' - if os.path.isfile(schema): - pass - else: - print('Error, schema file not found') - print('DetectorDescription/Schema/DDLSchema.xsd') - print('Quitting, cannot test XML files without a schema') - sys.exit(0) +schema = pfnInPath("DetectorDescription/Schema/DDLSchema.xsd").replace('file:','') print("schema file is:") print(schema) sys.stdout.flush() diff --git a/Geometry/EcalCommonData/plugins/dd4hep/DDEcalBarrelNewAlgo.cc b/Geometry/EcalCommonData/plugins/dd4hep/DDEcalBarrelNewAlgo.cc index 321673184ae79..3c32b0115fca2 100644 --- a/Geometry/EcalCommonData/plugins/dd4hep/DDEcalBarrelNewAlgo.cc +++ b/Geometry/EcalCommonData/plugins/dd4hep/DDEcalBarrelNewAlgo.cc @@ -1559,7 +1559,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext ); const string cryDDName(cry.name + sType); - Solid crySolid = mytrap(cry.name, trapCry); + Solid crySolid = mytrap(cryDDName, trapCry); Volume cryLog = Volume(cryDDName, crySolid, ns.material(cry.mat)); //++++++++++++++++++++++++++++++++++ APD ++++++++++++++++++++++++++++++++++ diff --git a/Geometry/ForwardCommonData/data/zdcmaterials/2021/v1/zdcmaterials.xml b/Geometry/ForwardCommonData/data/zdcmaterials/2021/v1/zdcmaterials.xml index ce5b6b18c3118..1f79392d89735 100644 --- a/Geometry/ForwardCommonData/data/zdcmaterials/2021/v1/zdcmaterials.xml +++ b/Geometry/ForwardCommonData/data/zdcmaterials/2021/v1/zdcmaterials.xml @@ -1,7 +1,6 @@ - diff --git a/Geometry/HGCalCommonData/data/TB181/Oct181/hgcProdCuts.xml b/Geometry/HGCalCommonData/data/TB181/Oct181/hgcProdCuts.xml new file mode 100644 index 0000000000000..0ffd0886482c8 --- /dev/null +++ b/Geometry/HGCalCommonData/data/TB181/Oct181/hgcProdCuts.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Geometry/HGCalCommonData/data/TB181/hgcProdCuts.xml b/Geometry/HGCalCommonData/data/TB181/hgcProdCuts.xml index 2187231eaa45b..f47dad76b3243 100644 --- a/Geometry/HGCalCommonData/data/TB181/hgcProdCuts.xml +++ b/Geometry/HGCalCommonData/data/TB181/hgcProdCuts.xml @@ -1,5 +1,5 @@ - + @@ -7,7 +7,7 @@ - + diff --git a/Geometry/HGCalCommonData/data/dd4hep/cms-test-ddhgcalwaferP-algorithm.xml b/Geometry/HGCalCommonData/data/dd4hep/cms-test-ddhgcalwaferP-algorithm.xml index 05fdb74233d19..180dcd122cdde 100644 --- a/Geometry/HGCalCommonData/data/dd4hep/cms-test-ddhgcalwaferP-algorithm.xml +++ b/Geometry/HGCalCommonData/data/dd4hep/cms-test-ddhgcalwaferP-algorithm.xml @@ -24,10 +24,10 @@ - - - - + + + + diff --git a/Geometry/HGCalCommonData/data/hgcal/v10/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v10/hgcal.xml index 79b9d96ac18f7..ffd274878bd05 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v10/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v10/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcal/v11/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v11/hgcal.xml index 55ce69779d7ad..a8fcc53c4bed6 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v11/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v11/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcal/v11m20/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v11m20/hgcal.xml index a651b2321fa0b..c091f1c57aa7b 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v11m20/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v11m20/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcal/v11p20/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v11p20/hgcal.xml index 0bd42bb8e97f7..1ca1c631aefb2 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v11p20/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v11p20/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcal/v12/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v12/hgcal.xml index d0c99f67fc772..c45e66c2f1307 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v12/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v12/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcal/v13/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v13/hgcal.xml index 0ae42dde2a74a..a1686a99427f5 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v13/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v13/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcal/v14/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v14/hgcal.xml index 4e5e50302b334..4f2dc1e9e2f32 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v14/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v14/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcal/v15/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v15/hgcal.xml index a8399d59fe3fd..e6346a2236dc2 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v15/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v15/hgcal.xml @@ -123,6 +123,12 @@ + + + + diff --git a/Geometry/HGCalCommonData/data/hgcal/v16/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v16/hgcal.xml index e212e55a939d5..075f9bef9ea8e 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v16/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v16/hgcal.xml @@ -3,6 +3,7 @@ + @@ -18,6 +19,7 @@ + @@ -127,6 +129,12 @@ + + + + diff --git a/Geometry/HGCalCommonData/data/hgcal/v9/hgcal.xml b/Geometry/HGCalCommonData/data/hgcal/v9/hgcal.xml index 6bdf1c1a27f68..bc24cfee8cdba 100644 --- a/Geometry/HGCalCommonData/data/hgcal/v9/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcal/v9/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalEE/v14/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalEE/v14/hgcal.xml index 5ba2f5ab82018..bf211c6fa361d 100644 --- a/Geometry/HGCalCommonData/data/hgcalEE/v14/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalEE/v14/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalEE/v15/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalEE/v15/hgcal.xml index a9a560370b4ac..7dd83148f8455 100644 --- a/Geometry/HGCalCommonData/data/hgcalEE/v15/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalEE/v15/hgcal.xml @@ -111,6 +111,12 @@ + + + + diff --git a/Geometry/HGCalCommonData/data/hgcalEE/v15/hgcalEE.xml b/Geometry/HGCalCommonData/data/hgcalEE/v15/hgcalEE.xml index 49e47e2d19f9f..b9303afff99fa 100644 --- a/Geometry/HGCalCommonData/data/hgcalEE/v15/hgcalEE.xml +++ b/Geometry/HGCalCommonData/data/hgcalEE/v15/hgcalEE.xml @@ -15,6 +15,7 @@ + hgcalwafer:HGCalEEWafer0Fine, hgcalwafer:HGCalEEWafer0Coarse1, hgcalwafer:HGCalEEWafer0Coarse2, hgcalwafer:HGCalEEWafer1Fine, diff --git a/Geometry/HGCalCommonData/data/hgcalEE/v9/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalEE/v9/hgcal.xml index 4cf6f8ec97d51..50fabdd735fd6 100644 --- a/Geometry/HGCalCommonData/data/hgcalEE/v9/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalEE/v9/hgcal.xml @@ -12,6 +12,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalHEmix/v14/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalHEmix/v14/hgcal.xml index 9943d15e5d56c..c1bbab3abbea4 100644 --- a/Geometry/HGCalCommonData/data/hgcalHEmix/v14/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalHEmix/v14/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcal.xml index 9399fd128c973..f1fcf11b40703 100644 --- a/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcal.xml @@ -94,6 +94,12 @@ + + + + diff --git a/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmix.xml b/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmix.xml index b0926e7d24a86..13a51411132e5 100644 --- a/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmix.xml +++ b/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmix.xml @@ -16,6 +16,7 @@ + 0, 0, 0, 0 diff --git a/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmixTest.xml b/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmixTest.xml index 478b63c862a75..57ad4ff03ed5c 100644 --- a/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmixTest.xml +++ b/Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmixTest.xml @@ -16,6 +16,7 @@ + 0, 0, 0, 0 diff --git a/Geometry/HGCalCommonData/data/hgcalHEmix/v9/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalHEmix/v9/hgcal.xml index 1e8eb95593645..e5335fb0ecf88 100644 --- a/Geometry/HGCalCommonData/data/hgcalHEmix/v9/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalHEmix/v9/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcal.xml index 9a4023865c526..e1f9e7fa6ec51 100644 --- a/Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcal.xml @@ -111,6 +111,12 @@ + + + + diff --git a/Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcalHEsil.xml b/Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcalHEsil.xml index ab9dbbd602f71..da35dd0c9bc9d 100644 --- a/Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcalHEsil.xml +++ b/Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcalHEsil.xml @@ -15,6 +15,7 @@ + hgcalwafer:HGCalHEWafer0Fine, hgcalwafer:HGCalHEWafer0Coarse1, hgcalwafer:HGCalHEWafer0Coarse2 diff --git a/Geometry/HGCalCommonData/data/hgcalHEsil/v9/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalHEsil/v9/hgcal.xml index 6c14de978de56..d393442f503c7 100644 --- a/Geometry/HGCalCommonData/data/hgcalHEsil/v9/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalHEsil/v9/hgcal.xml @@ -13,6 +13,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalcell/v16/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalcell/v16/hgcal.xml index c2916546fcc9f..25906bbf8207d 100644 --- a/Geometry/HGCalCommonData/data/hgcalcell/v16/hgcal.xml +++ b/Geometry/HGCalCommonData/data/hgcalcell/v16/hgcal.xml @@ -3,6 +3,7 @@ + diff --git a/Geometry/HGCalCommonData/data/hgcalwafer/v15/hgcalwafer.xml b/Geometry/HGCalCommonData/data/hgcalwafer/v15/hgcalwafer.xml index c743f7aeba51d..743fc9f173cf3 100644 --- a/Geometry/HGCalCommonData/data/hgcalwafer/v15/hgcalwafer.xml +++ b/Geometry/HGCalCommonData/data/hgcalwafer/v15/hgcalwafer.xml @@ -21,6 +21,7 @@ + HGCalEEMotherBoard0Fine, HGCalEEConnector0Fine, HGCalEEPCB0Fine, HGCalEEEpoxy0Fine, HGCalEEKapton0Fine, HGCalEESensitive0Fine, @@ -53,6 +54,7 @@ + HGCalEEMotherBoard1Fine, HGCalEEConnector1Fine, HGCalEEPCB1Fine, HGCalEEEpoxy1Fine, HGCalEEKapton1Fine, HGCalEESensitive1Fine, @@ -85,6 +87,7 @@ + HGCalEEMotherBoard0Coarse1, HGCalEEConnector0Coarse1, HGCalEEPCB0Coarse1, HGCalEEEpoxy0Coarse1, HGCalEEKapton0Coarse1, HGCalEESensitive0Coarse1, @@ -117,6 +120,7 @@ + HGCalEEMotherBoard1Coarse1, HGCalEEConnector1Coarse1, HGCalEEPCB1Coarse1, HGCalEEEpoxy1Coarse1, HGCalEEKapton1Coarse1, HGCalEESensitive1Coarse1, @@ -149,6 +153,7 @@ + HGCalEEMotherBoard0Coarse2, HGCalEEConnector0Coarse2, HGCalEEPCB0Coarse2, HGCalEEEpoxy0Coarse2, HGCalEEKapton0Coarse2, HGCalEESensitive0Coarse2, @@ -181,6 +186,7 @@ + HGCalEEMotherBoard1Coarse2, HGCalEEConnector1Coarse2, HGCalEEPCB1Coarse2, HGCalEEEpoxy1Coarse2, HGCalEEKapton1Coarse2, HGCalEESensitive1Coarse2, @@ -213,6 +219,7 @@ + HGCalHEMotherBoard0Fine, HGCalHEConnector0Fine, HGCalHEPCB0Fine, HGCalHEEpoxy0Fine, HGCalHEKapton0Fine, HGCalHESiliconSensitive0Fine, @@ -245,6 +252,7 @@ + HGCalHEMotherBoard0Coarse1, HGCalHEConnector0Coarse1, HGCalHEPCB0Coarse1, HGCalHEEpoxy0Coarse1, HGCalHEKapton0Coarse1, HGCalHESiliconSensitive0Coarse1, @@ -277,6 +285,7 @@ + HGCalHEMotherBoard0Coarse2, HGCalHEConnector0Coarse2, HGCalHEPCB0Coarse2, HGCalHEEpoxy0Coarse2, HGCalHEKapton0Coarse2, HGCalHESiliconSensitive0Coarse2, @@ -309,6 +318,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -345,6 +355,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -381,6 +392,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -417,6 +429,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -453,6 +466,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -489,6 +503,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -525,6 +540,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -561,6 +577,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -597,6 +614,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, diff --git a/Geometry/HGCalCommonData/data/hgcalwafer/v15f/hgcalwafer.xml b/Geometry/HGCalCommonData/data/hgcalwafer/v15f/hgcalwafer.xml index f2c7eb02d6e59..10686728b2cb8 100644 --- a/Geometry/HGCalCommonData/data/hgcalwafer/v15f/hgcalwafer.xml +++ b/Geometry/HGCalCommonData/data/hgcalwafer/v15f/hgcalwafer.xml @@ -18,6 +18,7 @@ + HGCalEEMotherBoard0Fine, HGCalEEConnector0Fine, HGCalEEPCB0Fine, HGCalEEEpoxy0Fine, HGCalEEKapton0Fine, HGCalEESensitive0Fine, @@ -50,6 +51,7 @@ + HGCalEEMotherBoard1Fine, HGCalEEConnector1Fine, HGCalEEPCB1Fine, HGCalEEEpoxy1Fine, HGCalEEKapton1Fine, HGCalEESensitive1Fine, @@ -82,6 +84,7 @@ + HGCalEEMotherBoard0Coarse1, HGCalEEConnector0Coarse1, HGCalEEPCB0Coarse1, HGCalEEEpoxy0Coarse1, HGCalEEKapton0Coarse1, HGCalEESensitive0Coarse1, @@ -114,6 +117,7 @@ + HGCalEEMotherBoard1Coarse1, HGCalEEConnector1Coarse1, HGCalEEPCB1Coarse1, HGCalEEEpoxy1Coarse1, HGCalEEKapton1Coarse1, HGCalEESensitive1Coarse1, @@ -146,6 +150,7 @@ + HGCalEEMotherBoard0Coarse2, HGCalEEConnector0Coarse2, HGCalEEPCB0Coarse2, HGCalEEEpoxy0Coarse2, HGCalEEKapton0Coarse2, HGCalEESensitive0Coarse2, @@ -178,6 +183,7 @@ + HGCalEEMotherBoard1Coarse2, HGCalEEConnector1Coarse2, HGCalEEPCB1Coarse2, HGCalEEEpoxy1Coarse2, HGCalEEKapton1Coarse2, HGCalEESensitive1Coarse2, @@ -210,6 +216,7 @@ + HGCalHEMotherBoard0Fine, HGCalHEConnector0Fine, HGCalHEPCB0Fine, HGCalHEEpoxy0Fine, HGCalHEKapton0Fine, HGCalHESiliconSensitive0Fine, @@ -242,6 +249,7 @@ + HGCalHEMotherBoard0Coarse1, HGCalHEConnector0Coarse1, HGCalHEPCB0Coarse1, HGCalHEEpoxy0Coarse1, HGCalHEKapton0Coarse1, HGCalHESiliconSensitive0Coarse1, @@ -274,6 +282,7 @@ + HGCalHEMotherBoard0Coarse2, HGCalHEConnector0Coarse2, HGCalHEPCB0Coarse2, HGCalHEEpoxy0Coarse2, HGCalHEKapton0Coarse2, HGCalHESiliconSensitive0Coarse2, diff --git a/Geometry/HGCalCommonData/data/hgcalwafer/v15p/hgcalwafer.xml b/Geometry/HGCalCommonData/data/hgcalwafer/v15p/hgcalwafer.xml index 29a967d041e8d..6c52ff397665f 100644 --- a/Geometry/HGCalCommonData/data/hgcalwafer/v15p/hgcalwafer.xml +++ b/Geometry/HGCalCommonData/data/hgcalwafer/v15p/hgcalwafer.xml @@ -19,6 +19,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -55,6 +56,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -91,6 +93,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -127,6 +130,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -163,6 +167,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -199,6 +204,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -235,6 +241,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -271,6 +278,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, @@ -307,6 +315,7 @@ + b0, b1, b2, b3, b4, b5, g0, g1, g2, g3, g4, g5, gm0, gm1, gm2, gm3, gm4, gm5, a0, a1, a2, a3, a4, a5, d0, d1, d2, d3, d4, d5, diff --git a/Geometry/HGCalCommonData/data/hgcalwafer/v16/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalwafer/v16/hgcal.xml new file mode 100644 index 0000000000000..7258a20de9536 --- /dev/null +++ b/Geometry/HGCalCommonData/data/hgcalwafer/v16/hgcal.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/HGCalCommonData/data/hgcalwafer/v16/hgcalwafer.xml b/Geometry/HGCalCommonData/data/hgcalwafer/v16/hgcalwafer.xml new file mode 100644 index 0000000000000..8aa10502308c0 --- /dev/null +++ b/Geometry/HGCalCommonData/data/hgcalwafer/v16/hgcalwafer.xml @@ -0,0 +1,641 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + HGCalEEMotherBoard0Fine, HGCalEEConnector0Fine, HGCalEEPCB0Fine, + HGCalEEEpoxy0Fine, HGCalEEKapton0Fine, HGCalEESensitive0Fine, + HGCalEEBasePlate0Fine + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 4, 3, 6 + + + + hgcalcell:HGCalEECellFull0Fine, hgcalcell:HGCalEECellTrunc01Fine, + hgcalcell:HGCalEECellTrunc02Fine, hgcalcell:HGCalEECellTrunc03Fine, + hgcalcell:HGCalEECellExten01Fine, hgcalcell:HGCalEECellExten02Fine, + hgcalcell:HGCalEECellExten03Fine, hgcalcell:HGCalEECellCorner01Fine, + hgcalcell:HGCalEECellCorner02Fine,hgcalcell:HGCalEECellCorner03Fine, + hgcalcell:HGCalEECellCorner04Fine,hgcalcell:HGCalEECellCorner05Fine, + hgcalcell:HGCalEECellCorner06Fine + + + + + + + + + + HGCalEEMotherBoard1Fine, HGCalEEConnector1Fine, HGCalEEPCB1Fine, + HGCalEEEpoxy1Fine, HGCalEEKapton1Fine, HGCalEESensitive1Fine, + HGCalEEBasePlate1Fine + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 6, 3, 4, 3, 4, 3, 5, 3, 2, 1, 0 + + + + hgcalcell:HGCalEECellFull1Fine, hgcalcell:HGCalEECellTrunc11Fine, + hgcalcell:HGCalEECellTrunc12Fine, hgcalcell:HGCalEECellTrunc13Fine, + hgcalcell:HGCalEECellExten11Fine, hgcalcell:HGCalEECellExten12Fine, + hgcalcell:HGCalEECellExten13Fine, hgcalcell:HGCalEECellCorner11Fine, + hgcalcell:HGCalEECellCorner12Fine,hgcalcell:HGCalEECellCorner13Fine, + hgcalcell:HGCalEECellCorner14Fine,hgcalcell:HGCalEECellCorner15Fine, + hgcalcell:HGCalEECellCorner16Fine + + + + + + + + + + HGCalEEMotherBoard0Coarse1, HGCalEEConnector0Coarse1, HGCalEEPCB0Coarse1, + HGCalEEEpoxy0Coarse1, HGCalEEKapton0Coarse1, HGCalEESensitive0Coarse1, + HGCalEEBasePlate0Coarse1 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 4, 3, 6 + + + + hgcalcell:HGCalEECellFull0Coarse1, hgcalcell:HGCalEECellTrunc01Coarse1, + hgcalcell:HGCalEECellTrunc02Coarse1, hgcalcell:HGCalEECellTrunc03Coarse1, + hgcalcell:HGCalEECellExten01Coarse1, hgcalcell:HGCalEECellExten02Coarse1, + hgcalcell:HGCalEECellExten03Coarse1, hgcalcell:HGCalEECellCorner01Coarse1, + hgcalcell:HGCalEECellCorner02Coarse1,hgcalcell:HGCalEECellCorner03Coarse1, + hgcalcell:HGCalEECellCorner04Coarse1,hgcalcell:HGCalEECellCorner05Coarse1, + hgcalcell:HGCalEECellCorner06Coarse1 + + + + + + + + + + HGCalEEMotherBoard1Coarse1, HGCalEEConnector1Coarse1, HGCalEEPCB1Coarse1, + HGCalEEEpoxy1Coarse1, HGCalEEKapton1Coarse1, HGCalEESensitive1Coarse1, + HGCalEEBasePlate1Coarse1 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 6, 3, 4, 3, 4, 3, 5, 3, 2, 1, 0 + + + + hgcalcell:HGCalEECellFull1Coarse1, hgcalcell:HGCalEECellTrunc11Coarse1, + hgcalcell:HGCalEECellTrunc12Coarse1, hgcalcell:HGCalEECellTrunc13Coarse1, + hgcalcell:HGCalEECellExten11Coarse1, hgcalcell:HGCalEECellExten12Coarse1, + hgcalcell:HGCalEECellExten13Coarse1, hgcalcell:HGCalEECellCorner11Coarse1, + hgcalcell:HGCalEECellCorner12Coarse1,hgcalcell:HGCalEECellCorner13Coarse1, + hgcalcell:HGCalEECellCorner14Coarse1,hgcalcell:HGCalEECellCorner15Coarse1, + hgcalcell:HGCalEECellCorner16Coarse1 + + + + + + + + + + HGCalEEMotherBoard0Coarse2, HGCalEEConnector0Coarse2, HGCalEEPCB0Coarse2, + HGCalEEEpoxy0Coarse2, HGCalEEKapton0Coarse2, HGCalEESensitive0Coarse2, + HGCalEEBasePlate0Coarse2 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 4, 3, 6 + + + + hgcalcell:HGCalEECellFull0Coarse2, hgcalcell:HGCalEECellTrunc01Coarse2, + hgcalcell:HGCalEECellTrunc02Coarse2, hgcalcell:HGCalEECellTrunc03Coarse2, + hgcalcell:HGCalEECellExten01Coarse2, hgcalcell:HGCalEECellExten02Coarse2, + hgcalcell:HGCalEECellExten03Coarse2, hgcalcell:HGCalEECellCorner01Coarse2, + hgcalcell:HGCalEECellCorner02Coarse2,hgcalcell:HGCalEECellCorner03Coarse2, + hgcalcell:HGCalEECellCorner04Coarse2,hgcalcell:HGCalEECellCorner05Coarse2, + hgcalcell:HGCalEECellCorner06Coarse2 + + + + + + + + + + HGCalEEMotherBoard1Coarse2, HGCalEEConnector1Coarse2, HGCalEEPCB1Coarse2, + HGCalEEEpoxy1Coarse2, HGCalEEKapton1Coarse2, HGCalEESensitive1Coarse2, + HGCalEEBasePlate1Coarse2 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 6, 3, 4, 3, 4, 3, 5, 3, 2, 1, 0 + + + + hgcalcell:HGCalEECellFull1Coarse2, hgcalcell:HGCalEECellTrunc11Coarse2, + hgcalcell:HGCalEECellTrunc12Coarse2, hgcalcell:HGCalEECellTrunc13Coarse2, + hgcalcell:HGCalEECellExten11Coarse2, hgcalcell:HGCalEECellExten12Coarse2, + hgcalcell:HGCalEECellExten13Coarse2, hgcalcell:HGCalEECellCorner11Coarse2, + hgcalcell:HGCalEECellCorner12Coarse2,hgcalcell:HGCalEECellCorner13Coarse2, + hgcalcell:HGCalEECellCorner14Coarse2,hgcalcell:HGCalEECellCorner15Coarse2, + hgcalcell:HGCalEECellCorner16Coarse2 + + + + + + + + + + HGCalHEMotherBoard0Fine, HGCalHEConnector0Fine, HGCalHEPCB0Fine, + HGCalHEEpoxy0Fine, HGCalHEKapton0Fine, HGCalHESiliconSensitive0Fine, + HGCalHEBasePlate0Fine + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:HGC_G10-FR4 + + 1.85*mm, 3.25*mm, 1.76*mm, 0.075*mm, 0.105*mm, [WaferThickness], + 1.1*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 6 + + + + hgcalcell:HGCalHECellFull0Fine, hgcalcell:HGCalHECellTrunc01Fine, + hgcalcell:HGCalHECellTrunc02Fine, hgcalcell:HGCalHECellTrunc03Fine, + hgcalcell:HGCalHECellExten01Fine, hgcalcell:HGCalHECellExten02Fine, + hgcalcell:HGCalHECellExten03Fine, hgcalcell:HGCalHECellCorner01Fine, + hgcalcell:HGCalHECellCorner02Fine,hgcalcell:HGCalHECellCorner03Fine, + hgcalcell:HGCalHECellCorner04Fine,hgcalcell:HGCalHECellCorner05Fine, + hgcalcell:HGCalHECellCorner06Fine + + + + + + + + + + HGCalHEMotherBoard0Coarse1, HGCalHEConnector0Coarse1, HGCalHEPCB0Coarse1, + HGCalHEEpoxy0Coarse1, HGCalHEKapton0Coarse1, HGCalHESiliconSensitive0Coarse1, + HGCalHEBasePlate0Coarse1 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:HGC_G10-FR4 + + 1.85*mm, 3.25*mm, 1.76*mm, 0.075*mm, 0.105*mm, [WaferThickness], + 1.1*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 6 + + + + hgcalcell:HGCalHECellFull0Coarse1, hgcalcell:HGCalHECellTrunc01Coarse1, + hgcalcell:HGCalHECellTrunc02Coarse1, hgcalcell:HGCalHECellTrunc03Coarse1, + hgcalcell:HGCalHECellExten01Coarse1, hgcalcell:HGCalHECellExten02Coarse1, + hgcalcell:HGCalHECellExten03Coarse1, hgcalcell:HGCalHECellCorner01Coarse1, + hgcalcell:HGCalHECellCorner02Coarse1,hgcalcell:HGCalHECellCorner03Coarse1, + hgcalcell:HGCalHECellCorner04Coarse1,hgcalcell:HGCalHECellCorner05Coarse1, + hgcalcell:HGCalHECellCorner06Coarse1 + + + + + + + + + + HGCalHEMotherBoard0Coarse2, HGCalHEConnector0Coarse2, HGCalHEPCB0Coarse2, + HGCalHEEpoxy0Coarse2, HGCalHEKapton0Coarse2, HGCalHESiliconSensitive0Coarse2, + HGCalHEBasePlate0Coarse2 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:HGC_G10-FR4 + + 1.85*mm, 3.25*mm, 1.76*mm, 0.075*mm, 0.105*mm, [WaferThickness], + 1.1*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 6 + + + + hgcalcell:HGCalHECellFull0Coarse2, hgcalcell:HGCalHECellTrunc01Coarse2, + hgcalcell:HGCalHECellTrunc02Coarse2, hgcalcell:HGCalHECellTrunc03Coarse2, + hgcalcell:HGCalHECellExten01Coarse2, hgcalcell:HGCalHECellExten02Coarse2, + hgcalcell:HGCalHECellExten03Coarse2, hgcalcell:HGCalHECellCorner01Coarse2, + hgcalcell:HGCalHECellCorner02Coarse2,hgcalcell:HGCalHECellCorner03Coarse2, + hgcalcell:HGCalHECellCorner04Coarse2,hgcalcell:HGCalHECellCorner05Coarse2, + hgcalcell:HGCalHECellCorner06Coarse2 + + + + + + + + + + gm0, gm1, gm2, gm3, gm4, gm5, dm0, dm1, dm2, dm3, dm4, dm5, + am0, am1, am2, am3, am4, am5, bm0, bm1, bm2, bm3, bm4, bm5 + + 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalEEMotherBoard0Fine, HGCalEEConnector0Fine, HGCalEEPCB0Fine, + HGCalEEEpoxy0Fine, HGCalEEKapton0Fine, HGCalEESensitive0Fine, + HGCalEEBasePlate0Fine + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 4, 3, 6 + + + + + + + + + + + + + + gm0, gm1, gm2, gm3, gm4, gm5, dm0, dm1, dm2, dm3, dm4, dm5, + am0, am1, am2, am3, am4, am5, bm0, bm1, bm2, bm3, bm4, bm5 + + 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalEEMotherBoard1Fine, HGCalEEConnector1Fine, HGCalEEPCB1Fine, + HGCalEEEpoxy1Fine, HGCalEEKapton1Fine, HGCalEESensitive1Fine, + HGCalEEBasePlate1Fine + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 6, 3, 4, 3, 4, 3, 5, 3, 2, 1, 0 + + + + + + + + + + + + + + b0, b1, b2, b3, b4, b5, a0, a1, a2, a3, a4, a5, d0, d1, d2, + d3, d4, d5, c0, c1, c2, c3, c4, c5 + + 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, + 7, 7, 7 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalEEMotherBoard0Coarse1, HGCalEEConnector0Coarse1, HGCalEEPCB0Coarse1, + HGCalEEEpoxy0Coarse1, HGCalEEKapton0Coarse1, HGCalEESensitive0Coarse1, + HGCalEEBasePlate0Coarse1 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 4, 3, 6 + + + + + + + + + + + + + + b0, b1, b2, b3, b4, b5, a0, a1, a2, a3, a4, a5, d0, d1, d2, + d3, d4, d5, c0, c1, c2, c3, c4, c5 + + 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, + 7, 7, 7 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalEEMotherBoard1Coarse1, HGCalEEConnector1Coarse1, HGCalEEPCB1Coarse1, + HGCalEEEpoxy1Coarse1, HGCalEEKapton1Coarse1, HGCalEESensitive1Coarse1, + HGCalEEBasePlate1Coarse1 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 6, 3, 4, 3, 4, 3, 5, 3, 2, 1, 0 + + + + + + + + + + + + + + b0, b1, b2, b3, b4, b5, a0, a1, a2, a3, a4, a5, d0, d1, d2, + d3, d4, d5, c0, c1, c2, c3, c4, c5 + + 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, + 7, 7, 7 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalEEMotherBoard0Coarse2, HGCalEEConnector0Coarse2, HGCalEEPCB0Coarse2, + HGCalEEEpoxy0Coarse2, HGCalEEKapton0Coarse2, HGCalEESensitive0Coarse2, + HGCalEEBasePlate0Coarse2 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 4, 3, 6 + + + + + + + + + + + + + + b0, b1, b2, b3, b4, b5, a0, a1, a2, a3, a4, a5, d0, d1, d2, + d3, d4, d5, c0, c1, c2, c3, c4, c5 + + 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, + 7, 7, 7 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalEEMotherBoard1Coarse2, HGCalEEConnector1Coarse2, HGCalEEPCB1Coarse2, + HGCalEEEpoxy1Coarse2, HGCalEEKapton1Coarse2, HGCalEESensitive1Coarse2, + HGCalEEBasePlate1Coarse2 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 6, 3, 4, 3, 4, 3, 5, 3, 2, 1, 0 + + + + + + + + + + + + + + gm0, gm1, gm2, gm3, gm4, gm5, dm0, dm1, dm2, dm3, dm4, dm5, + am0, am1, am2, am3, am4, am5, bm0, bm1, bm2, bm3, bm4, bm5 + + 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalHEMotherBoard0Fine, HGCalHEConnector0Fine, HGCalHEPCB0Fine, + HGCalHEEpoxy0Fine, HGCalHEKapton0Fine, HGCalHESiliconSensitive0Fine, + HGCalHEBasePlate0Fine + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:HGC_G10-FR4 + + 1.85*mm, 3.25*mm, 1.76*mm, 0.075*mm, 0.105*mm, [WaferThickness], + 1.1*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 6 + + + + + + + + + + + + + + b0, b1, b2, b3, b4, b5, a0, a1, a2, a3, a4, a5, d0, d1, d2, + d3, d4, d5, c0, c1, c2, c3, c4, c5 + + 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, + 7, 7, 7 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalHEMotherBoard0Coarse1, HGCalHEConnector0Coarse1, HGCalHEPCB0Coarse1, + HGCalHEEpoxy0Coarse1, HGCalHEKapton0Coarse1, HGCalHESiliconSensitive0Coarse1, + HGCalHEBasePlate0Coarse1 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:HGC_G10-FR4 + + 1.85*mm, 3.25*mm, 1.76*mm, 0.075*mm, 0.105*mm, [WaferThickness], + 1.1*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 6 + + + + + + + + + + + + + + b0, b1, b2, b3, b4, b5, a0, a1, a2, a3, a4, a5, d0, d1, d2, + d3, d4, d5, c0, c1, c2, c3, c4, c5 + + 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, + 7, 7, 7 + + 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, + 3, 4, 5 + + HGCalHEMotherBoard0Coarse2, HGCalHEConnector0Coarse2, HGCalHEPCB0Coarse2, + HGCalHEEpoxy0Coarse2, HGCalHEKapton0Coarse2, HGCalHESiliconSensitive0Coarse2, + HGCalHEBasePlate0Coarse2 + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:HGC_G10-FR4 + + 1.85*mm, 3.25*mm, 1.76*mm, 0.075*mm, 0.105*mm, [WaferThickness], + 1.1*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 6 + + + + + + + + diff --git a/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcal.xml b/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcal.xml new file mode 100644 index 0000000000000..7258a20de9536 --- /dev/null +++ b/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcal.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcalpos.xml b/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcalpos.xml new file mode 100644 index 0000000000000..553df331244bf --- /dev/null +++ b/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcalpos.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcalwafer.xml b/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcalwafer.xml new file mode 100644 index 0000000000000..b0ac4b6583814 --- /dev/null +++ b/Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcalwafer.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + b0, g0, gm0, a0, d0, dm0, c0, am0, bm0 + + 1, 2, 3, 4, 5, 6, 7, 8, 9 + + 0, 0, 0, 0, 0, 0, 0, 0, 0 + + HGCalEEMotherBoard0Fine, HGCalEEConnector0Fine, HGCalEEPCB0Fine, + HGCalEEEpoxy0Fine, HGCalEEKapton0Fine, HGCalEESensitive0Fine, + HGCalEEBasePlate0Fine + + hgcalMaterial:HGC_G10-FR4, materials:Air, hgcalMaterial:HGC_G10-FR4, + materials:Epoxy, materials:Kapton, materials:Silicon, + hgcalMaterial:WCu + + 1.85*mm, 3.25*mm, 1.76*mm, 0.0675*mm, 0.105*mm, [WaferThickness], + 1.45*mm + + 0, 0, 0, 0, 0, 1, 0 + + 0, 1, 2, 3, 5, 3, 4, 3, 4, 3, 6 + + + + + + + + diff --git a/Geometry/HGCalCommonData/interface/HGCalGeomTools.h b/Geometry/HGCalCommonData/interface/HGCalGeomTools.h index c6aa1dde5f765..a8c520dc7c2b6 100644 --- a/Geometry/HGCalCommonData/interface/HGCalGeomTools.h +++ b/Geometry/HGCalCommonData/interface/HGCalGeomTools.h @@ -14,6 +14,7 @@ class HGCalGeomTools { static constexpr int k_fiveCorners = 5; static constexpr int k_fourCorners = 4; static constexpr int k_threeCorners = 3; + static constexpr int k_twoCorners = 2; static void radius(double zf, double zb, diff --git a/Geometry/HGCalCommonData/interface/HGCalTypes.h b/Geometry/HGCalCommonData/interface/HGCalTypes.h index f7e5428eaeca5..154aa65170588 100644 --- a/Geometry/HGCalCommonData/interface/HGCalTypes.h +++ b/Geometry/HGCalCommonData/interface/HGCalTypes.h @@ -55,6 +55,8 @@ class HGCalTypes { WaferSemi = 5, WaferSemi2 = 6, WaferThree = 7, + WaferHalf2 = 8, + WaferFive2 = 9, WaferLDTop = 11, WaferLDBottom = 12, WaferLDLeft = 13, diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalWaferF.cc b/Geometry/HGCalCommonData/plugins/DDHGCalWaferF.cc index 476781c405725..aa7215c4e2dc0 100644 --- a/Geometry/HGCalCommonData/plugins/DDHGCalWaferF.cc +++ b/Geometry/HGCalCommonData/plugins/DDHGCalWaferF.cc @@ -35,6 +35,7 @@ class DDHGCalWaferF : public DDAlgorithm { double thick_; // Module thickness double waferSize_; // Wafer size double waferSepar_; // Sensor separation + double waferThick_; // Wafer thickness std::vector layerNames_; // Names of the layers std::vector materials_; // Materials of the layers std::vector layerThick_; // Thickness of layers @@ -64,9 +65,11 @@ void DDHGCalWaferF::initialize(const DDNumericArguments& nArgs, thick_ = nArgs["ModuleThickness"]; waferSize_ = nArgs["WaferSize"]; waferSepar_ = nArgs["SensorSeparation"]; + waferThick_ = nArgs["WaferThickness"]; #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCalGeom") << "DDHGCalWaferF: Module " << parent().name() << " made of " << material_ << " T " - << thick_ << " Wafer 2r " << waferSize_ << " Half Separation " << waferSepar_; + << thick_ << " Wafer 2r " << waferSize_ << " Half Separation " << waferSepar_ << " T " + << waferThick_; #endif layerNames_ = vsArgs["LayerNames"]; materials_ = vsArgs["LayerMaterials"]; @@ -131,7 +134,7 @@ void DDHGCalWaferF::execute(DDCompactView& cpv) { edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << xM[k] << ":" << yM[k]; #endif - // Then the types + // Then the layers std::vector xL = {r2, 0, -r2, -r2, 0, r2}; std::vector yL = {R2, 2 * R2, R2, -R2, -2 * R2, -R2}; std::vector glogs(materials_.size()); @@ -139,8 +142,13 @@ void DDHGCalWaferF::execute(DDCompactView& cpv) { for (unsigned int l = 0; l < layers_.size(); l++) { unsigned int i = layers_[l]; if (copyNumber_[i] == 1) { - zw[0] = -0.5 * layerThick_[i]; - zw[1] = 0.5 * layerThick_[i]; + if (layerType_[i] > 0) { + zw[0] = -0.5 * waferThick_; + zw[1] = 0.5 * waferThick_; + } else { + zw[0] = -0.5 * layerThick_[i]; + zw[1] = 0.5 * layerThick_[i]; + } solid = DDSolidFactory::extrudedpolygon(layerNames_[i], xL, yL, zw, zx, zy, scale); DDName matN(DDSplit(materials_[i]).first, DDSplit(materials_[i]).second); DDMaterial matter(matN); diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc b/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc index 669a144a41cc5..5336253abefdb 100644 --- a/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc +++ b/Geometry/HGCalCommonData/plugins/DDHGCalWaferP.cc @@ -36,6 +36,7 @@ class DDHGCalWaferP : public DDAlgorithm { double thick_; // Module thickness double waferSize_; // Wafer size double waferSepar_; // Sensor separation + double waferThick_; // Wafer thickness std::vector tags_; // Tags to be added to each name std::vector partialTypes_; // Type of partial wafer std::vector orientations_; // Orientations of the wafers @@ -67,10 +68,12 @@ void DDHGCalWaferP::initialize(const DDNumericArguments& nArgs, material_ = sArgs["ModuleMaterial"]; thick_ = nArgs["ModuleThickness"]; waferSize_ = nArgs["WaferSize"]; - waferSepar_ = nArgs["SensorSeparation"]; + waferThick_ = nArgs["WaferThickness"]; #ifdef EDM_ML_DEBUG + waferSepar_ = nArgs["SensorSeparation"]; edm::LogVerbatim("HGCalGeom") << "DDHGCalWaferP: Module " << parent().name() << " made of " << material_ << " T " - << thick_ << " Wafer 2r " << waferSize_ << " Half Separation " << waferSepar_; + << thick_ << " Wafer 2r " << waferSize_ << " Half Separation " << waferSepar_ << " T " + << waferThick_; #endif tags_ = vsArgs["Tags"]; partialTypes_ = dbl_to_int(vArgs["PartialTypes"]); @@ -165,8 +168,13 @@ void DDHGCalWaferP::execute(DDCompactView& cpv) { #endif DDRotation rot; if (copyNumber[i] == 1) { - zw[0] = -0.5 * layerThick_[i]; - zw[1] = 0.5 * layerThick_[i]; + if (layerType_[i] > 0) { + zw[0] = -0.5 * waferThick_; + zw[1] = 0.5 * waferThick_; + } else { + zw[0] = -0.5 * layerThick_[i]; + zw[1] = 0.5 * layerThick_[i]; + } std::string lname = layerNames_[i] + tags_[k]; solid = DDSolidFactory::extrudedpolygon(lname, xL, yL, zw, zx, zy, scale); DDName matN(DDSplit(materials_[i]).first, DDSplit(materials_[i]).second); @@ -196,7 +204,7 @@ void DDHGCalWaferP::execute(DDCompactView& cpv) { for (unsigned int j = 0; j < xL.size(); ++j) edm::LogVerbatim("HGCalGeom") << "[" << j << "] " << xL[j] << ":" << yL[j]; #endif - double zpos = (posSense_ == 0) ? -0.5 * (layerThick_[i] - senseT_) : 0.5 * (layerThick_[i] - senseT_); + double zpos = (posSense_ == 0) ? -0.5 * (waferThick_ - senseT_) : 0.5 * (waferThick_ - senseT_); DDTranslation tran(0, 0, zpos); int copy = 10 + senseType_; cpv.position(glog, glogs[i], copy, tran, rot); diff --git a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferF.cc b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferF.cc index 67eff7773090a..3b28de551c8ca 100644 --- a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferF.cc +++ b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferF.cc @@ -25,10 +25,12 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const auto& thick = args.value("ModuleThickness"); const auto& waferSize = args.value("WaferSize"); const auto& waferSepar = args.value("SensorSeparation"); + const auto& waferThick = args.value("WaferThickness"); #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCalGeom") << "DDHGCalWaferF: Module " << motherName << " made of " << material << " T " << cms::convert2mm(thick) << " Wafer 2r " << cms::convert2mm(waferSize) - << " Half Separation " << cms::convert2mm(waferSepar); + << " Half Separation " << cms::convert2mm(waferSepar) << " T " + << cms::convert2mm(waferThick); #endif const auto& layerNames = args.value>("LayerNames"); const auto& materials = args.value>("LayerMaterials"); @@ -99,8 +101,13 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext for (unsigned int l = 0; l < layers.size(); l++) { unsigned int i = layers[l]; if (copyNumber[i] == 1) { - zw[0] = -0.5 * layerThick[i]; - zw[1] = 0.5 * layerThick[i]; + if (layerType[i] > 0) { + zw[0] = -0.5 * waferThick; + zw[1] = 0.5 * waferThick; + } else { + zw[0] = -0.5 * layerThick[i]; + zw[1] = 0.5 * layerThick[i]; + } solid = dd4hep::ExtrudedPolygon(xL, yL, zw, zx, zy, scale); ns.addSolidNS(ns.prepend(layerNames[i]), solid); matter = ns.material(materials[i]); diff --git a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc index 5ec648d2be8f1..015c8e672a70b 100644 --- a/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc +++ b/Geometry/HGCalCommonData/plugins/dd4hep/DDHGCalWaferP.cc @@ -25,11 +25,13 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const auto& material = args.value("ModuleMaterial"); const auto& thick = args.value("ModuleThickness"); const auto& waferSize = args.value("WaferSize"); + const auto& waferThick = args.value("WaferThickness"); #ifdef EDM_ML_DEBUG const auto& waferSepar = args.value("SensorSeparation"); edm::LogVerbatim("HGCalGeom") << "DDHGCalWaferP: Module " << parentName << " made of " << material << " T " << cms::convert2mm(thick) << " Wafer 2r " << cms::convert2mm(waferSize) - << " Half Separation " << cms::convert2mm(waferSepar); + << " Half Separation " << cms::convert2mm(waferSepar) << " T " + << cms::convert2mm(waferThick); #endif const auto& tags = args.value>("Tags"); const auto& partialTypes = args.value>("PartialTypes"); @@ -116,8 +118,13 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext for (unsigned int l = 0; l < layers.size(); l++) { unsigned int i = layers[l]; if (copyNumber[i] == 1) { - zw[0] = -0.5 * layerThick[i]; - zw[1] = 0.5 * layerThick[i]; + if (layerType[i] > 0) { + zw[0] = -0.5 * waferThick; + zw[1] = 0.5 * waferThick; + } else { + zw[0] = -0.5 * layerThick[i]; + zw[1] = 0.5 * layerThick[i]; + } solid = dd4hep::ExtrudedPolygon(xL, yL, zw, zx, zy, scale); std::string lname = layerNames[i] + tags[k]; ns.addSolidNS(ns.prepend(lname), solid); @@ -154,7 +161,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext for (unsigned int j = 0; j < xL.size(); ++j) edm::LogVerbatim("HGCalGeom") << "[" << j << "] " << cms::convert2mm(xL[j]) << ":" << cms::convert2mm(yL[j]); #endif - double zpos = (posSense == 0) ? -0.5 * (layerThick[i] - senseT) : 0.5 * (layerThick[i] - senseT); + double zpos = (posSense == 0) ? -0.5 * (waferThick - senseT) : 0.5 * (waferThick - senseT); dd4hep::Position tran(0, 0, zpos); int copy = 10 + senseType; glogs[i].placeVolume(glog, copy, tran); diff --git a/Geometry/HGCalCommonData/python/testHGCV16XML_cfi.py b/Geometry/HGCalCommonData/python/testHGCV16XML_cfi.py index 01bfd3ceb9490..69a7258ec31ca 100644 --- a/Geometry/HGCalCommonData/python/testHGCV16XML_cfi.py +++ b/Geometry/HGCalCommonData/python/testHGCV16XML_cfi.py @@ -34,7 +34,7 @@ 'Geometry/HcalCommonData/data/hcalRecNumbering/NoHE/hcalRecNumbering.xml', 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', 'Geometry/HGCalCommonData/data/hgcalMaterial/v1/hgcalMaterial.xml', - 'Geometry/HGCalCommonData/data/hgcal/v15/hgcal.xml', + 'Geometry/HGCalCommonData/data/hgcal/v16/hgcal.xml', 'Geometry/ForwardCommonData/data/forwardshield/2026/v4/forwardshield.xml', 'Geometry/ForwardCommonData/data/brmrotations.xml', 'Geometry/ForwardCommonData/data/brm/2026/v1/brm.xml', diff --git a/Geometry/HGCalCommonData/python/testHGCalWaferPXML_cfi.py b/Geometry/HGCalCommonData/python/testHGCalWaferPXML_cfi.py index 175ead253eb09..cd0409ef01230 100644 --- a/Geometry/HGCalCommonData/python/testHGCalWaferPXML_cfi.py +++ b/Geometry/HGCalCommonData/python/testHGCalWaferPXML_cfi.py @@ -5,10 +5,10 @@ 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/HGCalCommonData/data/hgcalwafer/v1/cms.xml', 'Geometry/HGCalCommonData/data/hgcalMaterial/v1/hgcalMaterial.xml', - 'Geometry/HGCalCommonData/data/hgcalwafer/v15p/hgcal.xml', - 'Geometry/HGCalCommonData/data/hgcalcell/v15/hgcalcell.xml', - 'Geometry/HGCalCommonData/data/hgcalwafer/v15p/hgcalpos.xml', - 'Geometry/HGCalCommonData/data/hgcalwafer/v15p/hgcalwafer.xml'), + 'Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcal.xml', + 'Geometry/HGCalCommonData/data/hgcalcell/v16/hgcalcell.xml', + 'Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcalwafer.xml', + 'Geometry/HGCalCommonData/data/hgcalwafer/v16p/hgcalpos.xml'), rootNodeName = cms.string('cms:OCMS') ) diff --git a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc index 6d03a2b436af4..9b4f420bc62a4 100644 --- a/Geometry/HGCalCommonData/src/HGCalWaferMask.cc +++ b/Geometry/HGCalCommonData/src/HGCalWaferMask.cc @@ -109,6 +109,7 @@ bool HGCalWaferMask::goodCell(int u, int v, int n, int type, int rotn) { bool good(false); int n2 = n / 2; int n4 = n / 4; + int n3 = (n + 1) / 3; switch (type) { case (HGCalTypes::WaferFull): { //WaferFull good = true; @@ -299,7 +300,6 @@ bool HGCalWaferMask::goodCell(int u, int v, int n, int type, int rotn) { case (HGCalTypes::WaferSemi2): { //WaferSemi2 switch (rotn) { case (HGCalTypes::WaferCorner0): { - int n3 = (n + 1) / 3; good = ((u + v) < (4 * n3)); break; } @@ -328,6 +328,64 @@ bool HGCalWaferMask::goodCell(int u, int v, int n, int type, int rotn) { } break; } + case (HGCalTypes::WaferFive2): { //WaferFive2 + switch (rotn) { + case (HGCalTypes::WaferCorner0): { + good = ((2 * v - u) <= (3 * n2)); + break; + } + case (HGCalTypes::WaferCorner1): { + good = ((u + v) < (5 * n2)); + break; + } + case (HGCalTypes::WaferCorner2): { + good = ((2 * u - v) >= (3 * n2)); + break; + } + case (HGCalTypes::WaferCorner3): { + good = ((2 * v - u) >= n3); + break; + } + case (HGCalTypes::WaferCorner4): { + good = ((u + v) > (4 * n3)); + break; + } + default: { + good = ((2 * u - v) >= n2); + break; + } + } + break; + } + case (HGCalTypes::WaferHalf2): { //WaferHalf2 + switch (rotn) { + case (HGCalTypes::WaferCorner0): { + good = (v <= (3 * n4)); + break; + } + case (HGCalTypes::WaferCorner1): { + good = (u < (3 * n4)); + break; + } + case (HGCalTypes::WaferCorner2): { + good = ((v - u) >= n4); + break; + } + case (HGCalTypes::WaferCorner3): { + good = (v >= (5 * n4)); + break; + } + case (HGCalTypes::WaferCorner4): { + good = (u >= (5 * n4)); + break; + } + default: { + good = ((u - v) >= n4); + break; + } + } + break; + } } #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCalGeom") << "u|v " << u << ":" << v << " N " << n << " type " << type << " rot " << rotn @@ -390,8 +448,12 @@ std::pair HGCalWaferMask::getTypeMode(const double& xpos, static constexpr int base = 10; double rin2 = rin * rin; double rout2 = rout * rout; - double dx0[corners] = { - 0.0, HGCalTypes::c10 * delX, HGCalTypes::c10 * delX, 0.0, -HGCalTypes::c10 * delX, -HGCalTypes::c10 * delX}; + double dx0[corners] = {HGCalTypes::c00 * delX, + HGCalTypes::c10 * delX, + HGCalTypes::c10 * delX, + HGCalTypes::c00 * delX, + -HGCalTypes::c10 * delX, + -HGCalTypes::c10 * delX}; double dy0[corners] = {-HGCalTypes::c10 * delY, -HGCalTypes::c50 * delY, HGCalTypes::c50 * delY, @@ -417,24 +479,37 @@ std::pair HGCalWaferMask::getTypeMode(const double& xpos, static constexpr int ipat5[corners] = {101111, 110111, 111011, 111101, 111110, 11111}; static constexpr int ipat4[corners] = {100111, 110011, 111001, 111100, 11110, 1111}; static constexpr int ipat3[corners] = {100011, 110001, 111000, 11100, 1110, 111}; + static constexpr int ipat2[corners] = {11, 100001, 110000, 11000, 1100, 110}; double dx1[corners] = {HGCalTypes::c50 * delX, HGCalTypes::c10 * delX, HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX}; - double dy1[corners] = { - -HGCalTypes::c75 * delY, 0.0, HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, 0.0, -HGCalTypes::c75 * delY}; + double dy1[corners] = {-HGCalTypes::c75 * delY, + HGCalTypes::c00 * delY, + HGCalTypes::c75 * delY, + HGCalTypes::c75 * delY, + HGCalTypes::c00 * delY, + -HGCalTypes::c75 * delY}; double dx2[corners] = {HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX, HGCalTypes::c50 * delX, HGCalTypes::c10 * delX}; - double dy2[corners] = { - HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, 0.0, -HGCalTypes::c75 * delY, -HGCalTypes::c75 * delY, 0.0}; - double dx3[corners] = { - HGCalTypes::c22 * delX, delX, HGCalTypes::c77 * delX, -HGCalTypes::c22 * delX, -delX, -HGCalTypes::c77 * delX}; + double dy2[corners] = {HGCalTypes::c75 * delY, + HGCalTypes::c75 * delY, + HGCalTypes::c00 * delY, + -HGCalTypes::c75 * delY, + -HGCalTypes::c75 * delY, + HGCalTypes::c00 * delY}; + double dx3[corners] = {HGCalTypes::c22 * delX, + HGCalTypes::c10 * delX, + HGCalTypes::c77 * delX, + -HGCalTypes::c22 * delX, + -HGCalTypes::c10 * delX, + -HGCalTypes::c77 * delX}; double dy3[corners] = {-HGCalTypes::c88 * delY, -HGCalTypes::c27 * delY, HGCalTypes::c61 * delY, @@ -443,7 +518,7 @@ std::pair HGCalWaferMask::getTypeMode(const double& xpos, -HGCalTypes::c61 * delY}; double dx4[corners] = {HGCalTypes::c22 * delX, -HGCalTypes::c77 * delX, - -delX, + -HGCalTypes::c10 * delX, -HGCalTypes::c22 * delX, HGCalTypes::c77 * delX, HGCalTypes::c10 * delX}; @@ -459,8 +534,12 @@ std::pair HGCalWaferMask::getTypeMode(const double& xpos, HGCalTypes::c50 * delX, HGCalTypes::c10 * delX, HGCalTypes::c50 * delX}; - double dy5[corners] = { - HGCalTypes::c75 * delY, 0.0, -HGCalTypes::c75 * delY, -HGCalTypes::c75 * delY, 0.0, HGCalTypes::c75 * delY}; + double dy5[corners] = {HGCalTypes::c75 * delY, + HGCalTypes::c00 * delY, + -HGCalTypes::c75 * delY, + -HGCalTypes::c75 * delY, + HGCalTypes::c00 * delY, + HGCalTypes::c75 * delY}; double dx6[corners] = {-HGCalTypes::c77 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c22 * delX, @@ -473,6 +552,42 @@ std::pair HGCalWaferMask::getTypeMode(const double& xpos, -HGCalTypes::c61 * delY, HGCalTypes::c27 * delY, HGCalTypes::c88 * delY}; + double dx7[corners] = {-HGCalTypes::c22 * delX, + -HGCalTypes::c10 * delX, + -HGCalTypes::c77 * delX, + HGCalTypes::c22 * delX, + HGCalTypes::c10 * delX, + HGCalTypes::c77 * delX}; + double dy7[corners] = {HGCalTypes::c88 * delY, + HGCalTypes::c27 * delY, + -HGCalTypes::c61 * delY, + -HGCalTypes::c88 * delY, + -HGCalTypes::c27 * delY, + HGCalTypes::c61 * delY}; + double dx8[corners] = {HGCalTypes::c77 * delX, + HGCalTypes::c10 * delX, + HGCalTypes::c22 * delX, + -HGCalTypes::c77 * delX, + -HGCalTypes::c10 * delX, + -HGCalTypes::c22 * delX}; + double dy8[corners] = {-HGCalTypes::c61 * delY, + HGCalTypes::c27 * delY, + HGCalTypes::c88 * delY, + HGCalTypes::c61 * delY, + -HGCalTypes::c27 * delY, + -HGCalTypes::c88 * delY}; + double dx9[corners] = {-HGCalTypes::c22 * delX, + HGCalTypes::c77 * delX, + HGCalTypes::c10 * delX, + HGCalTypes::c22 * delX, + -HGCalTypes::c77 * delX, + -HGCalTypes::c10 * delX}; + double dy9[corners] = {-HGCalTypes::c88 * delY, + -HGCalTypes::c61 * delY, + HGCalTypes::c27 * delY, + HGCalTypes::c88 * delY, + HGCalTypes::c61 * delY, + -HGCalTypes::c27 * delY}; if (ncor == HGCalGeomTools::k_allCorners) { } else if (ncor == HGCalGeomTools::k_fiveCorners) { @@ -505,16 +620,27 @@ std::pair HGCalWaferMask::getTypeMode(const double& xpos, } else if (ncor == HGCalGeomTools::k_threeCorners) { rotn = static_cast(std::find(ipat3, ipat3 + 6, iok) - ipat3); type = HGCalTypes::WaferThree; - double rpos12 = ((xpos + dx1[rotn]) * (xpos + dx1[rotn]) + (ypos + dy1[rotn]) * (ypos + dy1[rotn])); + double rpos12 = ((xpos + dx7[rotn]) * (xpos + dx7[rotn]) + (ypos + dy7[rotn]) * (ypos + dy7[rotn])); double rpos22(0); if (rpos12 <= rout2 && rpos12 >= rin2) { - rpos22 = ((xpos + dx5[rotn]) * (xpos + dx5[rotn]) + (ypos + dy5[rotn]) * (ypos + dy5[rotn])); + rpos22 = ((xpos + dx8[rotn]) * (xpos + dx8[rotn]) + (ypos + dy8[rotn]) * (ypos + dy8[rotn])); if (rpos22 <= rout2 && rpos22 >= rin2) - type = HGCalTypes::WaferSemi; + type = HGCalTypes::WaferFive2; } if (debug) - edm::LogVerbatim("HGCalGeom") << "Test for Semi " << std::sqrt(rpos12) << ":" << std::sqrt(rpos22) << " Type " + edm::LogVerbatim("HGCalGeom") << "Test for Five2 " << std::sqrt(rpos12) << ":" << std::sqrt(rpos22) << " Type " << type; + if ((type == HGCalTypes::WaferThree) && (wType == 0)) { + rpos12 = ((xpos + dx1[rotn]) * (xpos + dx1[rotn]) + (ypos + dy1[rotn]) * (ypos + dy1[rotn])); + if (rpos12 <= rout2 && rpos12 >= rin2) { + rpos22 = ((xpos + dx5[rotn]) * (xpos + dx5[rotn]) + (ypos + dy5[rotn]) * (ypos + dy5[rotn])); + if (rpos22 <= rout2 && rpos22 >= rin2) + type = HGCalTypes::WaferSemi; + } + if (debug) + edm::LogVerbatim("HGCalGeom") << "Test for Semi " << std::sqrt(rpos12) << ":" << std::sqrt(rpos22) << " Type " + << type; + } if ((type == HGCalTypes::WaferThree) && (wType == 0)) { rpos12 = ((xpos + dx3[rotn]) * (xpos + dx3[rotn]) + (ypos + dy3[rotn]) * (ypos + dy3[rotn])); if (rpos12 <= rout2 && rpos12 >= rin2) { @@ -526,6 +652,21 @@ std::pair HGCalWaferMask::getTypeMode(const double& xpos, edm::LogVerbatim("HGCalGeom") << "Test for SemiM " << std::sqrt(rpos12) << ":" << std::sqrt(rpos22) << " Type " << type; } + } else if (ncor == HGCalGeomTools::k_twoCorners) { + rotn = static_cast(std::find(ipat2, ipat2 + 6, iok) - ipat2); + type = HGCalTypes::WaferOut; + double rpos12 = ((xpos + dx7[rotn]) * (xpos + dx7[rotn]) + (ypos + dy7[rotn]) * (ypos + dy7[rotn])); + double rpos22(0); + if (rpos12 <= rout2 && rpos12 >= rin2) { + rpos22 = ((xpos + dx9[rotn]) * (xpos + dx9[rotn]) + (ypos + dy9[rotn]) * (ypos + dy9[rotn])); + if (rpos22 <= rout2 && rpos22 >= rin2) + type = HGCalTypes::WaferHalf2; + else + rotn = HGCalTypes::WaferCorner0; + } + if (debug) + edm::LogVerbatim("HGCalGeom") << "Test for Half2 " << std::sqrt(rpos12) << ":" << std::sqrt(rpos22) << " Type " + << type; } else { type = HGCalTypes::WaferOut; } @@ -549,8 +690,12 @@ bool HGCalWaferMask::goodTypeMode( static constexpr int corner2 = 2 * HGCalTypes::WaferCornerMax; static constexpr int base = 10; static constexpr int base2 = 100; - double dx0[corners] = { - 0.0, HGCalTypes::c10 * delX, HGCalTypes::c10 * delX, 0.0, -HGCalTypes::c10 * delX, -HGCalTypes::c10 * delX}; + double dx0[corners] = {HGCalTypes::c00 * delX, + HGCalTypes::c10 * delX, + HGCalTypes::c10 * delX, + HGCalTypes::c00 * delX, + -HGCalTypes::c10 * delX, + -HGCalTypes::c10 * delX}; double dy0[corners] = {-HGCalTypes::c10 * delY, -HGCalTypes::c50 * delY, HGCalTypes::c50 * delY, @@ -563,8 +708,12 @@ bool HGCalWaferMask::goodTypeMode( -HGCalTypes::c50 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX}; - double dy1[corners] = { - -HGCalTypes::c75 * delY, 0.0, HGCalTypes::c75 * delY, HGCalTypes::c75 * delY, 0.0, -HGCalTypes::c75 * delY}; + double dy1[corners] = {-HGCalTypes::c75 * delY, + HGCalTypes::c00 * delY, + HGCalTypes::c75 * delY, + HGCalTypes::c75 * delY, + HGCalTypes::c00 * delY, + -HGCalTypes::c75 * delY}; double dx2[corner2] = {HGCalTypes::c22 * delX, HGCalTypes::c77 * delX, HGCalTypes::c10 * delX, @@ -766,6 +915,68 @@ bool HGCalWaferMask::goodTypeMode( } break; } + case (HGCalTypes::WaferFive2): { + static constexpr int nc60[corners] = {450, 150, 201, 312, 423, 534}; + static constexpr int nc61[corners] = {601, 803, 1005, 7, 209, 411}; + int nc = nc60[rotn]; + for (int k1 = 0; k1 < 3; ++k1) { + int k = nc % base; + double xc1 = xpos + dx0[k]; + double yc1 = ypos + dy0[k]; + double rpos2 = (xc1 * xc1 + yc1 * yc1); + if ((rpos2 > rout2) || (rpos2 < rin2)) { + ok = false; + ncf = k; + break; + } + nc /= base; + } + nc = nc61[rotn]; + for (int k1 = 0; k1 < 2; ++k1) { + int k = nc % base2; + double xc1 = xpos + dx2[k]; + double yc1 = ypos + dy2[k]; + double rpos2 = (xc1 * xc1 + yc1 * yc1); + if ((rpos2 > rout2) || (rpos2 < rin2)) { + ok = false; + ncf = k + base2; + break; + } + nc /= base2; + } + break; + } + case (HGCalTypes::WaferHalf2): { + static constexpr int nc70[corners] = {45, 50, 1, 12, 23, 34}; + static constexpr int nc71[corners] = {611, 801, 1003, 5, 207, 409}; + int nc = nc70[rotn]; + for (int k1 = 0; k1 < 2; ++k1) { + int k = nc % base; + double xc1 = xpos + dx0[k]; + double yc1 = ypos + dy0[k]; + double rpos2 = (xc1 * xc1 + yc1 * yc1); + if ((rpos2 > rout2) || (rpos2 < rin2)) { + ok = false; + ncf = k; + break; + } + nc /= base; + } + nc = nc71[rotn]; + for (int k1 = 0; k1 < 2; ++k1) { + int k = nc % base2; + double xc1 = xpos + dx2[k]; + double yc1 = ypos + dy2[k]; + double rpos2 = (xc1 * xc1 + yc1 * yc1); + if ((rpos2 > rout2) || (rpos2 < rin2)) { + ok = false; + ncf = k + base2; + break; + } + nc /= base2; + } + break; + } default: { for (int k = 0; k < corners; ++k) { double xc1 = xpos + dx0[k]; @@ -897,6 +1108,34 @@ std::vector > HGCalWaferMask::waferXY( #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" << dy[np[orient][k]]; +#endif + } + } else if (part == HGCalTypes::WaferFive2) { + int np[6][6] = {{22, 15, 4, 5, 0, 22}, + {23, 16, 5, 0, 1, 23}, + {18, 17, 0, 1, 2, 18}, + {19, 12, 1, 2, 3, 19}, + {20, 13, 2, 3, 4, 20}, + {21, 14, 3, 4, 5, 21}}; + for (int k = 0; k < 6; ++k) { + xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" + << dy[np[orient][k]]; +#endif + } + } else if (part == HGCalTypes::WaferHalf2) { + int np[6][5] = {{21, 15, 4, 5, 21}, + {22, 16, 5, 0, 22}, + {23, 17, 0, 1, 23}, + {18, 12, 1, 2, 18}, + {19, 13, 2, 3, 19}, + {20, 14, 3, 4, 20}}; + for (int k = 0; k < 5; ++k) { + xy.push_back(std::make_pair((xpos + dx[np[orient][k]]), (ypos + dy[np[orient][k]]))); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << k << ":" << np[orient][k] << ":" << dx[np[orient][k]] << ":" + << dy[np[orient][k]]; #endif } } diff --git a/Geometry/HGCalCommonData/test/HGCalConvert.cpp b/Geometry/HGCalCommonData/test/HGCalConvert.cpp index 0563392288b58..98b706931b9bd 100644 --- a/Geometry/HGCalCommonData/test/HGCalConvert.cpp +++ b/Geometry/HGCalCommonData/test/HGCalConvert.cpp @@ -18,7 +18,7 @@ // debug (int) Three digit integer to set debug for each // of the outputs // -// HGCalConvert 2 infile outfile laymin debug +// HGCalConvert 2 infile outfile1 outfile2 laymin debug // infile (const char*) Input file from Katya (modified by Chris) // containing layer #. ring #, start and end // of ring radius, SiPM size, 4 hexadecimal @@ -173,8 +173,8 @@ int main(int argc, char* argv[]) { } else { const char* outfile1 = argv[3]; const char* outfile2 = argv[4]; - int laymin = atoi(argv[4]); - int debug = atoi(argv[5]); + int laymin = atoi(argv[5]); + int debug = atoi(argv[6]); std::cout << "Calls ConvertScintillator for i/p file " << infile << " o/p files " << outfile1 << ":" << outfile2 << " Laymin " << laymin << " Debug " << debug << std::endl; ConvertScintillator c1(laymin); @@ -349,7 +349,9 @@ void ConvertSiliconV1::convert( //First read in all records char buffer[1024]; std::string thick[4] = {"h120", "l200", "l300", "h200"}; - int addType[4] = {10, 20, 20, 10}; + int addType[4] = {0, 1, 2, 0}; + int partTypeH[6] = {0, 8, 3, 6, 6, 9}; + int partTypeL[7] = {0, 4, 4, 5, 5, 1, 7}; std::map module1, module2, module3; unsigned int all(0), comments(0), others(0), bad(0), good(0); int layers(0); @@ -390,8 +392,12 @@ void ConvertSiliconV1::convert( int waferV = std::atoi(items[7].c_str()); int thck = static_cast(std::find(thick, thick + 4, items[2]) - thick); int part = std::atoi(items[1].c_str()); - if ((thck < 4) && (part > 0)) - part += addType[thck]; + if ((thck < 4) && (part >= 0)) { + if (addType[thck] == 0) + part = partTypeH[part]; + else + part = partTypeL[part]; + } int orient = std::atoi(items[5].c_str()); wafer waf(thck, part, orient); if (layer <= layMax1_) { diff --git a/Geometry/HGCalCommonData/test/python/runHGCalEETestDD4HEP_cfg.py b/Geometry/HGCalCommonData/test/python/runHGCalEETestDD4HEP_cfg.py index 33ac28baaaf7f..e3592f025cccd 100644 --- a/Geometry/HGCalCommonData/test/python/runHGCalEETestDD4HEP_cfg.py +++ b/Geometry/HGCalCommonData/test/python/runHGCalEETestDD4HEP_cfg.py @@ -39,7 +39,7 @@ ) process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(1), + input = cms.untracked.int32(10), output = cms.optional.untracked.allowed(cms.int32,cms.PSet) ) @@ -48,6 +48,7 @@ process.MessageLogger.HGCSim=dict() process.MessageLogger.G4cout=dict() process.MessageLogger.G4cerr=dict() + process.MessageLogger.SimG4CoreApplication=dict() # Input source process.source = cms.Source("EmptySource") @@ -172,6 +173,12 @@ process.endjob_step = cms.EndPath(process.endOfProcess) process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput) +process.g4SimHits.OnlySDs = ['HGCalSensitiveDetector', + 'HGCScintillatorSensitiveDetector', + 'CaloTrkProcessing', + 'HGCSensitiveDetector', + 'HcalSensitiveDetector'] + # Schedule definition process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step) from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask diff --git a/Geometry/HGCalCommonData/test/python/runHGCalEETestDDD_cfg.py b/Geometry/HGCalCommonData/test/python/runHGCalEETestDDD_cfg.py index 762f34d8668bb..fb2e76ff8c888 100644 --- a/Geometry/HGCalCommonData/test/python/runHGCalEETestDDD_cfg.py +++ b/Geometry/HGCalCommonData/test/python/runHGCalEETestDDD_cfg.py @@ -15,8 +15,6 @@ process.load('Geometry.HcalCommonData.hcalDDDSimConstants_cff') process.load('Geometry.HGCalCommonData.hgcalEEParametersInitialization_cfi') process.load('Geometry.HGCalCommonData.hgcalEENumberingInitialization_cfi') -#process.load('Configuration.Geometry.GeometryExtended2026D84Reco_cff') -#process.load('Configuration.Geometry.GeometryExtended2026D84_cff') process.load('Configuration.StandardSequences.MagneticField_cff') process.load('Configuration.StandardSequences.Generator_cff') process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') @@ -26,7 +24,7 @@ process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(1), + input = cms.untracked.int32(10), output = cms.optional.untracked.allowed(cms.int32,cms.PSet) ) @@ -35,6 +33,7 @@ process.MessageLogger.HGCSim=dict() process.MessageLogger.G4cout=dict() process.MessageLogger.G4cerr=dict() + process.MessageLogger.SimG4CoreApplication=dict() # Input source process.source = cms.Source("EmptySource") @@ -158,6 +157,11 @@ process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) process.endjob_step = cms.EndPath(process.endOfProcess) process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput) +process.g4SimHits.OnlySDs = ['HGCalSensitiveDetector', + 'HGCScintillatorSensitiveDetector', + 'CaloTrkProcessing', + 'HGCSensitiveDetector', + 'HcalSensitiveDetector'] # Schedule definition process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step) diff --git a/Geometry/HcalTowerAlgo/src/HcalGeometry.cc b/Geometry/HcalTowerAlgo/src/HcalGeometry.cc index 303af177e043e..ba095dbd4570b 100644 --- a/Geometry/HcalTowerAlgo/src/HcalGeometry.cc +++ b/Geometry/HcalTowerAlgo/src/HcalGeometry.cc @@ -372,10 +372,10 @@ DetId HcalGeometry::detIdFromLocalAlignmentIndex(unsigned int i) { const unsigned int nF(numberOfForwardAlignments()); // const unsigned int nO ( numberOfOuterAlignments() ) ; - return (i < nB ? detIdFromBarrelAlignmentIndex(i) - : i < nB + nE ? detIdFromEndcapAlignmentIndex(i - nB) - : i < nB + nE + nF ? detIdFromForwardAlignmentIndex(i - nB - nE) - : detIdFromOuterAlignmentIndex(i - nB - nE - nF)); + return (i < nB ? detIdFromBarrelAlignmentIndex(i) + : i < nB + nE ? detIdFromEndcapAlignmentIndex(i - nB) + : i < nB + nE + nF ? detIdFromForwardAlignmentIndex(i - nB - nE) + : detIdFromOuterAlignmentIndex(i - nB - nE - nF)); } unsigned int HcalGeometry::alignmentBarEndForIndexLocal(const DetId& id, unsigned int nD) { @@ -424,10 +424,10 @@ unsigned int HcalGeometry::alignmentTransformIndexLocal(const DetId& id) { const unsigned int nF(numberOfForwardAlignments()); // const unsigned int nO ( numberOfOuterAlignments() ) ; - const unsigned int index(isHB ? alignmentBarrelIndexLocal(id) - : isHE ? alignmentEndcapIndexLocal(id) + nB - : isHF ? alignmentForwardIndexLocal(id) + nB + nE - : alignmentOuterIndexLocal(id) + nB + nE + nF); + const unsigned int index(isHB ? alignmentBarrelIndexLocal(id) + : isHE ? alignmentEndcapIndexLocal(id) + nB + : isHF ? alignmentForwardIndexLocal(id) + nB + nE + : alignmentOuterIndexLocal(id) + nB + nE + nF); assert(index < numberOfAlignments()); return index; diff --git a/Geometry/MTDNumberingBuilder/BuildFile.xml b/Geometry/MTDNumberingBuilder/BuildFile.xml index 307cacf5043a8..6e3b0fcd58de6 100644 --- a/Geometry/MTDNumberingBuilder/BuildFile.xml +++ b/Geometry/MTDNumberingBuilder/BuildFile.xml @@ -1,7 +1,7 @@ - + diff --git a/Geometry/MTDSimData/data/v3/mtdProdCuts.xml b/Geometry/MTDSimData/data/v3/mtdProdCuts.xml new file mode 100644 index 0000000000000..afee8aa24918f --- /dev/null +++ b/Geometry/MTDSimData/data/v3/mtdProdCuts.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/MuonSimData/data/muonProdCuts/2026/v1/muonProdCuts.xml b/Geometry/MuonSimData/data/muonProdCuts/2026/v1/muonProdCuts.xml new file mode 100644 index 0000000000000..d0fd30597ed9a --- /dev/null +++ b/Geometry/MuonSimData/data/muonProdCuts/2026/v1/muonProdCuts.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/MuonSimData/data/muonProdCuts/2026/v2/muonProdCuts.xml b/Geometry/MuonSimData/data/muonProdCuts/2026/v2/muonProdCuts.xml new file mode 100644 index 0000000000000..9c2e26a128a03 --- /dev/null +++ b/Geometry/MuonSimData/data/muonProdCuts/2026/v2/muonProdCuts.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/TrackerCommonData/plugins/dd4hep/DDCutTubsFromPoints.cc b/Geometry/TrackerCommonData/plugins/dd4hep/DDCutTubsFromPoints.cc index 9d80c78f67402..65876a8e3188d 100644 --- a/Geometry/TrackerCommonData/plugins/dd4hep/DDCutTubsFromPoints.cc +++ b/Geometry/TrackerCommonData/plugins/dd4hep/DDCutTubsFromPoints.cc @@ -25,7 +25,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext float r_max = args.value("rMax"); float z_pos = args.value("zPos"); - const std::string solidOutput = args.value("SolidName"); + std::string solidOutput = args.value("SolidName"); const std::string material = args.value("Material"); auto phis = ns.vecFloat(args.str("Phi")); @@ -49,6 +49,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext // non-zero phi distance. Sections with zero phi distance can be used to // create sharp jumps. + solidOutput = ns.prepend(solidOutput); edm::LogVerbatim("TrackerGeom") << "DDCutTubsFromPoints debug: Parent " << args.parentName() << "\tSolid " << solidOutput << " NameSpace " << ns.name() << "\tnumber of sections " << sections.size(); @@ -106,8 +107,8 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext float P3_z_l = (P1_z_l + P2_z_l) / 2; float P3_z_t = (P1_z_t + P2_z_t) / 2; + std::string segname(solidOutput + "_seg_" + std::to_string(segment)); edm::LogVerbatim("TrackerGeom").log([&](auto& log) { - std::string segname(solidOutput + "_seg_" + std::to_string(segment)); log << "DDCutTubsFromPoints: P1 l: " << segname << P1_x_l << " , " << P1_y_l << " , " << P1_z_l; log << "DDCutTubsFromPoints: P1 t: " << segname << P1_x_t << " , " << P1_y_t << " , " << P1_z_t; log << "DDCutTubsFromPoints: P2 l: " << segname << P2_x_l << " , " << P2_y_l << " , " << P2_z_l; @@ -159,7 +160,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext n_y_t /= norm; n_z_t /= norm; - auto seg = dd4hep::CutTube(r_min, r_max, dz, phi1, phi2, n_x_l, n_y_l, n_z_l, n_x_t, n_y_t, n_z_t); + auto seg = dd4hep::CutTube(segname, r_min, r_max, dz, phi1, phi2, n_x_l, n_y_l, n_z_l, n_x_t, n_y_t, n_z_t); edm::LogVerbatim("TrackerGeom") << "DDCutTubsFromPoints: CutTube(" << r_min << "," << r_max << "," << dz << "," << phi1 << "," << phi2 << "," << n_x_l << "," << n_y_l << "," << n_z_l << "," @@ -180,8 +181,10 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext float shift = offsets[0]; for (unsigned i = 1; i < segments.size() - 1; i++) { - solid = dd4hep::UnionSolid( - solidOutput + "_uni" + std::to_string(i + 1), solid, segments[i], dd4hep::Position(0., 0., offsets[i] - shift)); + solid = dd4hep::UnionSolid(solidOutput + "_uni_" + std::to_string(i + 1), + solid, + segments[i], + dd4hep::Position(0., 0., offsets[i] - shift)); } solid = dd4hep::UnionSolid(solidOutput, diff --git a/Geometry/TrackerCommonData/plugins/dd4hep/DDTECModuleAlgo.cc b/Geometry/TrackerCommonData/plugins/dd4hep/DDTECModuleAlgo.cc index 2623aae568e80..3d5c3285375be 100644 --- a/Geometry/TrackerCommonData/plugins/dd4hep/DDTECModuleAlgo.cc +++ b/Geometry/TrackerCommonData/plugins/dd4hep/DDTECModuleAlgo.cc @@ -404,6 +404,7 @@ static long algorithm(Detector& /* description */, cms::DDParsingContext& ctxt, } //Pitch Adapter name = idName + "PA"; + name = ns.prepend(name); if (!isStereo) { dx = 0.5 * pitchWidth; dy = 0.5 * pitchThick; diff --git a/Geometry/TrackerCommonData/plugins/dd4hep/DDTIBLayerAlgo.cc b/Geometry/TrackerCommonData/plugins/dd4hep/DDTIBLayerAlgo.cc index 2aa79f129ec9e..77eb4d493534c 100644 --- a/Geometry/TrackerCommonData/plugins/dd4hep/DDTIBLayerAlgo.cc +++ b/Geometry/TrackerCommonData/plugins/dd4hep/DDTIBLayerAlgo.cc @@ -252,7 +252,7 @@ static long algorithm(Detector& /* description */, cms::DDParsingContext& contex double dz = 0.5 * layerL - 2. * fillerDz; double _rmi = std::min(rin + 0.5 * dd4hep::mm, rout - 0.5 * dd4hep::mm); double _rma = std::max(rin + 0.5 * dd4hep::mm, rout - 0.5 * dd4hep::mm); - solid = ns.addSolidNS(name, Tube(_rmi, _rma, dz, -0.5 * width, width)); + solid = ns.addSolidNS(name, Tube(_rmi, _rma, dz, -0.5 * width, 0.5 * width)); LogDebug("TIBGeom") << solid.name() << " Tubs made of " << ribMat << " from " << -0.5 * convertRadToDeg(width) << " to " << 0.5 * convertRadToDeg(width) << " with Rin " << rin + 0.5 * dd4hep::mm << " Rout " << rout - 0.5 * dd4hep::mm << " ZHalf " << dz; @@ -490,7 +490,7 @@ static long algorithm(Detector& /* description */, cms::DDParsingContext& contex break; } - solid = ns.addSolidNS(name, Tube(pillarRin, pillarRout, pillarDz, -pillarDPhi, 2. * pillarDPhi)); + solid = ns.addSolidNS(name, Tube(pillarRin, pillarRout, pillarDz, -pillarDPhi, pillarDPhi)); Volume Pillar = ns.addVolumeNS(Volume(name, solid, ns.material(pillarMaterial))); LogDebug("TIBGeom") << solid.name() << " Tubs made of " << pillarMaterial << " from " << -pillarDPhi << " to " << pillarDPhi << " with Rin " << pillarRin << " Rout " << pillarRout << " ZHalf " << pillarDz; diff --git a/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Left_Station/v2/CTPPS_210_Left_Station.xml b/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Left_Station/v2/CTPPS_210_Left_Station.xml new file mode 100644 index 0000000000000..26dd34887cb3a --- /dev/null +++ b/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Left_Station/v2/CTPPS_210_Left_Station.xml @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v2/CTPPS_210_Right_Station.xml b/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v2/CTPPS_210_Right_Station.xml new file mode 100644 index 0000000000000..53ba29fc71329 --- /dev/null +++ b/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v2/CTPPS_210_Right_Station.xml @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v2/CTPPS_220_Left_Station.xml b/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v2/CTPPS_220_Left_Station.xml new file mode 100644 index 0000000000000..af1afa106f040 --- /dev/null +++ b/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v2/CTPPS_220_Left_Station.xml @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v2/CTPPS_220_Right_Station.xml b/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v2/CTPPS_220_Right_Station.xml new file mode 100644 index 0000000000000..769ba5b242a1d --- /dev/null +++ b/Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v2/CTPPS_220_Right_Station.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/CTPPS_Timing_Horizontal_Pot/v1/CTPPS_Timing_Horizontal_Pot.xml b/Geometry/VeryForwardData/data/CTPPS_Timing_Horizontal_Pot/v1/CTPPS_Timing_Horizontal_Pot.xml new file mode 100644 index 0000000000000..e0b55ee10bbf6 --- /dev/null +++ b/Geometry/VeryForwardData/data/CTPPS_Timing_Horizontal_Pot/v1/CTPPS_Timing_Horizontal_Pot.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_000.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_000.xml new file mode 100644 index 0000000000000..cd21338868661 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_000.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_001.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_001.xml new file mode 100644 index 0000000000000..e27a4ed814ad4 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_001.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_002.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_002.xml new file mode 100644 index 0000000000000..e06325801475a --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_002.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_003.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_003.xml new file mode 100644 index 0000000000000..48b2b6f24985c --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_003.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_004.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_004.xml new file mode 100644 index 0000000000000..8b451c4381d10 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_004.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_005.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_005.xml new file mode 100644 index 0000000000000..85ac7894b516a --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_005.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_020.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_020.xml new file mode 100644 index 0000000000000..958cd1f2d62b4 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_020.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_021.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_021.xml new file mode 100644 index 0000000000000..ce43827121dd6 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_021.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_022.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_022.xml new file mode 100644 index 0000000000000..0b655628d5f01 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_022.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_023.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_023.xml new file mode 100644 index 0000000000000..b6a9ae30e5364 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_023.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_024.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_024.xml new file mode 100644 index 0000000000000..b9d977a750d2a --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_024.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_025.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_025.xml new file mode 100644 index 0000000000000..1d1bee08371f7 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_025.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_100.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_100.xml new file mode 100644 index 0000000000000..53e6bbe6f7c34 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_100.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_101.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_101.xml new file mode 100644 index 0000000000000..b9cb32c35f46e --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_101.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_102.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_102.xml new file mode 100644 index 0000000000000..d59adc6f48772 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_102.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_103.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_103.xml new file mode 100644 index 0000000000000..5ac0343087187 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_103.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_104.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_104.xml new file mode 100644 index 0000000000000..2f7a250c07d46 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_104.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_105.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_105.xml new file mode 100644 index 0000000000000..59a996e610ef4 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_105.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_120.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_120.xml new file mode 100644 index 0000000000000..190b59ca0c0fb --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_120.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_121.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_121.xml new file mode 100644 index 0000000000000..cf8615f78b70c --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_121.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_122.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_122.xml new file mode 100644 index 0000000000000..b8ef71da3f254 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_122.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_123.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_123.xml new file mode 100644 index 0000000000000..3ce3d3e0cebe3 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_123.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_124.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_124.xml new file mode 100644 index 0000000000000..ff8f34c76efbb --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_124.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_125.xml b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_125.xml new file mode 100644 index 0000000000000..03ab5b4f288b8 --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_125.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/RP_Materials/v3/RP_Materials.xml b/Geometry/VeryForwardData/data/RP_Materials/v3/RP_Materials.xml new file mode 100644 index 0000000000000..72b173dbeaa0e --- /dev/null +++ b/Geometry/VeryForwardData/data/RP_Materials/v3/RP_Materials.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/python/testPPS2021XML_cfi.py b/Geometry/VeryForwardData/python/testPPS2021XML_cfi.py new file mode 100644 index 0000000000000..f9b563cc5be65 --- /dev/null +++ b/Geometry/VeryForwardData/python/testPPS2021XML_cfi.py @@ -0,0 +1,384 @@ +import FWCore.ParameterSet.Config as cms + +# This config was generated automatically using generate2021Geometry.py +# If you notice a mistake, please update the generating script, not just this config + +XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = cms.vstring( + 'Geometry/CMSCommonData/data/materials/2021/v2/materials.xml', + 'Geometry/TrackerCommonData/data/trackermaterial/2021/v1/trackermaterial.xml', + 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/extend/v3/cmsextent.xml', + 'Geometry/CMSCommonData/data/cavernData/2021/v1/cavernData.xml', + 'Geometry/CMSCommonData/data/cms/2021/v3/cms.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/eta3/etaMax.xml', + 'Geometry/CMSCommonData/data/cmsTracker.xml', + 'Geometry/CMSCommonData/data/caloBase/2017/v1/caloBase.xml', + 'Geometry/CMSCommonData/data/cmsCalo.xml', + 'Geometry/CMSCommonData/data/muonBase/2018/v1/muonBase.xml', + 'Geometry/CMSCommonData/data/cmsMuon.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/CMSCommonData/data/beampipe/2021/v1/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam/2021/v1/cmsBeam.xml', + 'Geometry/CMSCommonData/data/muonMB.xml', + 'Geometry/CMSCommonData/data/muonMagnet.xml', + 'Geometry/CMSCommonData/data/cavern/2021/v1/cavern.xml', + 'Geometry/CMSCommonData/data/cavernFloor/2017/v1/cavernFloor.xml', + 'Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml', + 'Geometry/TrackerCommonData/data/pixfwdMaterials/2021/v3/pixfwdMaterials.xml', + 'Geometry/TrackerCommonData/data/pixfwdCommon.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdCylinder.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdDisks.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdSupportRingParameters.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdInnerDiskZplus.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdInnerDiskZminus.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdOuterDiskZplus.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdOuterDiskZminus.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdbladeInnerZplus.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdbladeInnerZminus.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdbladeOuterZplus.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixfwdbladeOuterZminus.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarmaterial.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarladder.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarladderfull0.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarladderfull1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarladderfull2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarladderfull3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarlayer.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarlayer0.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarlayer1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarlayer2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbarlayer3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/v2/pixbar.xml', + 'Geometry/TrackerCommonData/data/Run2/trackerpatchpannel.xml', + 'Geometry/TrackerCommonData/data/Run2/trackerpixelnose.xml', + 'Geometry/TrackerCommonData/data/tibtidcommonmaterial/2021/v1/tibtidcommonmaterial.xml', + 'Geometry/TrackerCommonData/data/tibmaterial/2021/v1/tibmaterial.xml', + 'Geometry/TrackerCommonData/data/tibmodpar.xml', + 'Geometry/TrackerCommonData/data/tibmodule0.xml', + 'Geometry/TrackerCommonData/data/tibmodule0a.xml', + 'Geometry/TrackerCommonData/data/tibmodule0b.xml', + 'Geometry/TrackerCommonData/data/tibmodule2.xml', + 'Geometry/TrackerCommonData/data/tibstringpar.xml', + 'Geometry/TrackerCommonData/data/tibstring0ll.xml', + 'Geometry/TrackerCommonData/data/tibstring0lr.xml', + 'Geometry/TrackerCommonData/data/tibstring0ul.xml', + 'Geometry/TrackerCommonData/data/tibstring0ur.xml', + 'Geometry/TrackerCommonData/data/tibstring0.xml', + 'Geometry/TrackerCommonData/data/tibstring1ll.xml', + 'Geometry/TrackerCommonData/data/tibstring1lr.xml', + 'Geometry/TrackerCommonData/data/tibstring1ul.xml', + 'Geometry/TrackerCommonData/data/tibstring1ur.xml', + 'Geometry/TrackerCommonData/data/tibstring1.xml', + 'Geometry/TrackerCommonData/data/tibstring2ll.xml', + 'Geometry/TrackerCommonData/data/tibstring2lr.xml', + 'Geometry/TrackerCommonData/data/tibstring2ul.xml', + 'Geometry/TrackerCommonData/data/tibstring2ur.xml', + 'Geometry/TrackerCommonData/data/tibstring2.xml', + 'Geometry/TrackerCommonData/data/tibstring3ll.xml', + 'Geometry/TrackerCommonData/data/tibstring3lr.xml', + 'Geometry/TrackerCommonData/data/tibstring3ul.xml', + 'Geometry/TrackerCommonData/data/tibstring3ur.xml', + 'Geometry/TrackerCommonData/data/tibstring3.xml', + 'Geometry/TrackerCommonData/data/tiblayerpar.xml', + 'Geometry/TrackerCommonData/data/tiblayer0.xml', + 'Geometry/TrackerCommonData/data/tiblayer1.xml', + 'Geometry/TrackerCommonData/data/tiblayer2.xml', + 'Geometry/TrackerCommonData/data/tiblayer3.xml', + 'Geometry/TrackerCommonData/data/tib.xml', + 'Geometry/TrackerCommonData/data/tidmaterial/2021/v1/tidmaterial.xml', + 'Geometry/TrackerCommonData/data/tidmodpar.xml', + 'Geometry/TrackerCommonData/data/tidmodule0.xml', + 'Geometry/TrackerCommonData/data/tidmodule0r.xml', + 'Geometry/TrackerCommonData/data/tidmodule0l.xml', + 'Geometry/TrackerCommonData/data/tidmodule1.xml', + 'Geometry/TrackerCommonData/data/tidmodule1r.xml', + 'Geometry/TrackerCommonData/data/tidmodule1l.xml', + 'Geometry/TrackerCommonData/data/tidmodule2.xml', + 'Geometry/TrackerCommonData/data/tidringpar.xml', + 'Geometry/TrackerCommonData/data/tidring0.xml', + 'Geometry/TrackerCommonData/data/tidring0f.xml', + 'Geometry/TrackerCommonData/data/tidring0b.xml', + 'Geometry/TrackerCommonData/data/tidring1.xml', + 'Geometry/TrackerCommonData/data/tidring1f.xml', + 'Geometry/TrackerCommonData/data/tidring1b.xml', + 'Geometry/TrackerCommonData/data/tidring2.xml', + 'Geometry/TrackerCommonData/data/tid.xml', + 'Geometry/TrackerCommonData/data/tidf.xml', + 'Geometry/TrackerCommonData/data/tidb.xml', + 'Geometry/TrackerCommonData/data/tibtidservices.xml', + 'Geometry/TrackerCommonData/data/tibtidservicesf.xml', + 'Geometry/TrackerCommonData/data/tibtidservicesb.xml', + 'Geometry/TrackerCommonData/data/tobmaterial/2021/v1/tobmaterial.xml', + 'Geometry/TrackerCommonData/data/tobmodpar.xml', + 'Geometry/TrackerCommonData/data/tobmodule0.xml', + 'Geometry/TrackerCommonData/data/tobmodule2.xml', + 'Geometry/TrackerCommonData/data/tobmodule4.xml', + 'Geometry/TrackerCommonData/data/tobrodpar.xml', + 'Geometry/TrackerCommonData/data/tobrod0c.xml', + 'Geometry/TrackerCommonData/data/tobrod0l.xml', + 'Geometry/TrackerCommonData/data/tobrod0h.xml', + 'Geometry/TrackerCommonData/data/tobrod0.xml', + 'Geometry/TrackerCommonData/data/tobrod1l.xml', + 'Geometry/TrackerCommonData/data/tobrod1h.xml', + 'Geometry/TrackerCommonData/data/tobrod1.xml', + 'Geometry/TrackerCommonData/data/tobrod2c.xml', + 'Geometry/TrackerCommonData/data/tobrod2l.xml', + 'Geometry/TrackerCommonData/data/tobrod2h.xml', + 'Geometry/TrackerCommonData/data/tobrod2.xml', + 'Geometry/TrackerCommonData/data/tobrod3l.xml', + 'Geometry/TrackerCommonData/data/tobrod3h.xml', + 'Geometry/TrackerCommonData/data/tobrod3.xml', + 'Geometry/TrackerCommonData/data/tobrod4c.xml', + 'Geometry/TrackerCommonData/data/tobrod4l.xml', + 'Geometry/TrackerCommonData/data/tobrod4h.xml', + 'Geometry/TrackerCommonData/data/tobrod4.xml', + 'Geometry/TrackerCommonData/data/tobrod5l.xml', + 'Geometry/TrackerCommonData/data/tobrod5h.xml', + 'Geometry/TrackerCommonData/data/tobrod5.xml', + 'Geometry/TrackerCommonData/data/tob/v3/tob.xml', + 'Geometry/TrackerCommonData/data/tecmaterial/2021/v1/tecmaterial.xml', + 'Geometry/TrackerCommonData/data/tecmodpar.xml', + 'Geometry/TrackerCommonData/data/tecmodule0.xml', + 'Geometry/TrackerCommonData/data/tecmodule0r.xml', + 'Geometry/TrackerCommonData/data/tecmodule0s.xml', + 'Geometry/TrackerCommonData/data/tecmodule1.xml', + 'Geometry/TrackerCommonData/data/tecmodule1r.xml', + 'Geometry/TrackerCommonData/data/tecmodule1s.xml', + 'Geometry/TrackerCommonData/data/tecmodule2.xml', + 'Geometry/TrackerCommonData/data/tecmodule3.xml', + 'Geometry/TrackerCommonData/data/tecmodule4.xml', + 'Geometry/TrackerCommonData/data/tecmodule4r.xml', + 'Geometry/TrackerCommonData/data/tecmodule4s.xml', + 'Geometry/TrackerCommonData/data/tecmodule5.xml', + 'Geometry/TrackerCommonData/data/tecmodule6.xml', + 'Geometry/TrackerCommonData/data/tecpetpar.xml', + 'Geometry/TrackerCommonData/data/tecring0.xml', + 'Geometry/TrackerCommonData/data/tecring1.xml', + 'Geometry/TrackerCommonData/data/tecring2.xml', + 'Geometry/TrackerCommonData/data/tecring3.xml', + 'Geometry/TrackerCommonData/data/tecring4.xml', + 'Geometry/TrackerCommonData/data/tecring5.xml', + 'Geometry/TrackerCommonData/data/tecring6.xml', + 'Geometry/TrackerCommonData/data/tecring0f.xml', + 'Geometry/TrackerCommonData/data/tecring1f.xml', + 'Geometry/TrackerCommonData/data/tecring2f.xml', + 'Geometry/TrackerCommonData/data/tecring3f.xml', + 'Geometry/TrackerCommonData/data/tecring4f.xml', + 'Geometry/TrackerCommonData/data/tecring5f.xml', + 'Geometry/TrackerCommonData/data/tecring6f.xml', + 'Geometry/TrackerCommonData/data/tecring0b.xml', + 'Geometry/TrackerCommonData/data/tecring1b.xml', + 'Geometry/TrackerCommonData/data/tecring2b.xml', + 'Geometry/TrackerCommonData/data/tecring3b.xml', + 'Geometry/TrackerCommonData/data/tecring4b.xml', + 'Geometry/TrackerCommonData/data/tecring5b.xml', + 'Geometry/TrackerCommonData/data/tecring6b.xml', + 'Geometry/TrackerCommonData/data/tecpetalf.xml', + 'Geometry/TrackerCommonData/data/tecpetalb.xml', + 'Geometry/TrackerCommonData/data/tecpetal0.xml', + 'Geometry/TrackerCommonData/data/tecpetal0f.xml', + 'Geometry/TrackerCommonData/data/tecpetal0b.xml', + 'Geometry/TrackerCommonData/data/tecpetal3.xml', + 'Geometry/TrackerCommonData/data/tecpetal3f.xml', + 'Geometry/TrackerCommonData/data/tecpetal3b.xml', + 'Geometry/TrackerCommonData/data/tecpetal6f.xml', + 'Geometry/TrackerCommonData/data/tecpetal6b.xml', + 'Geometry/TrackerCommonData/data/tecpetal8f.xml', + 'Geometry/TrackerCommonData/data/tecpetal8b.xml', + 'Geometry/TrackerCommonData/data/tecwheel/2021/v1/tecwheel.xml', + 'Geometry/TrackerCommonData/data/tecwheela.xml', + 'Geometry/TrackerCommonData/data/tecwheelb.xml', + 'Geometry/TrackerCommonData/data/tecwheelc.xml', + 'Geometry/TrackerCommonData/data/tecwheeld.xml', + 'Geometry/TrackerCommonData/data/tecwheel6.xml', + 'Geometry/TrackerCommonData/data/tecservices.xml', + 'Geometry/TrackerCommonData/data/tecbackplate.xml', + 'Geometry/TrackerCommonData/data/tec.xml', + 'Geometry/TrackerCommonData/data/Run2/tracker.xml', + 'Geometry/TrackerCommonData/data/trackerpixbar.xml', + 'Geometry/TrackerCommonData/data/PhaseI/trackerpixfwd.xml', + 'Geometry/TrackerCommonData/data/trackertibtidservices.xml', + 'Geometry/TrackerCommonData/data/trackertib.xml', + 'Geometry/TrackerCommonData/data/trackertid.xml', + 'Geometry/TrackerCommonData/data/trackertob.xml', + 'Geometry/TrackerCommonData/data/trackertec.xml', + 'Geometry/TrackerCommonData/data/v2/trackerbulkhead.xml', + 'Geometry/TrackerCommonData/data/trackerother.xml', + 'Geometry/TrackerCommonData/data/PhaseI/trackerStructureTopology.xml', + 'Geometry/TrackerSimData/data/PhaseI/trackersens.xml', + 'Geometry/TrackerRecoData/data/PhaseI/v1/trackerRecoMaterial.xml', + 'SimTracker/TrackerMaterialAnalysis/data/trackingMaterialGroups_ForPhaseI/v1/trackingMaterialGroups_ForPhaseI.xml', + 'Geometry/TrackerSimData/data/PhaseI/trackerProdCuts.xml', + 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', + 'Geometry/EcalCommonData/data/ebcon/2021/v1/ebcon.xml', + 'Geometry/EcalCommonData/data/eecon.xml', + 'Geometry/EcalCommonData/data/escon.xml', + 'Geometry/EcalCommonData/data/eregalgo/2017/v1/eregalgo.xml', + 'Geometry/EcalCommonData/data/ebalgo.xml', + 'Geometry/EcalCommonData/data/ebrot.xml', + 'Geometry/EcalCommonData/data/eefixed/2021/v1/eefixed.xml', + 'Geometry/EcalCommonData/data/eehier.xml', + 'Geometry/EcalCommonData/data/eealgo.xml', + 'Geometry/EcalCommonData/data/esalgo.xml', + 'Geometry/EcalCommonData/data/eeF.xml', + 'Geometry/EcalCommonData/data/eeB.xml', + 'Geometry/EcalCommonData/data/ectkcable.xml', + 'Geometry/HcalCommonData/data/hcalrotations.xml', + 'Geometry/HcalCommonData/data/hcal/PhaseI/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalcablealgo.xml', + 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', + 'Geometry/HcalCommonData/data/hcalendcap/PhaseI/hcalendcapalgo.xml', + 'Geometry/HcalCommonData/data/hcalouteralgo/v1/hcalouteralgo.xml', + 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', + 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', + 'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml', + 'Geometry/HcalCommonData/data/hcalRecNumbering/2021/hcalRecNumbering.xml', + 'Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml', + 'Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml', + 'Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml', + 'Geometry/MuonCommonData/data/mb3/2021/v1/mb3.xml', + 'Geometry/MuonCommonData/data/mb4/2015/v2/mb4.xml', + 'Geometry/MuonCommonData/data/mb4Shield/2021/v1/mb4Shield.xml', + 'Geometry/MuonCommonData/data/muonYoke/2021/v5/muonYoke.xml', + 'Geometry/MuonCommonData/data/mf/2021/v2/mf.xml', + 'Geometry/MuonCommonData/data/rpcf/2015/v1/rpcf.xml', + 'Geometry/MuonCommonData/data/gemf/TDR_BaseLine/gemf.xml', + 'Geometry/MuonCommonData/data/gem11/TDR_BaseLine/gem11.xml', + 'Geometry/MuonCommonData/data/csc/2021/v3/csc.xml', + 'Geometry/MuonCommonData/data/mfshield/2017/v2/mfshield.xml', + )+ + cms.vstring( + 'Geometry/MuonCommonData/data/muonNumbering/2021/v3/muonNumbering.xml', + 'Geometry/ForwardCommonData/data/forward/2021/v1/forward.xml', + 'Geometry/ForwardCommonData/data/totemt2/2021/v1/totemt2.xml', + 'Geometry/ForwardCommonData/data/forwardshield/2021/v1/forwardshield.xml', + 'Geometry/ForwardCommonData/data/brmrotations.xml', + 'Geometry/ForwardCommonData/data/brm/2021/v1/brm.xml', + 'Geometry/ForwardCommonData/data/zdcmaterials/2021/v1/zdcmaterials.xml', + 'Geometry/ForwardCommonData/data/lumimaterials.xml', + 'Geometry/ForwardCommonData/data/zdcrotations.xml', + 'Geometry/ForwardCommonData/data/lumirotations.xml', + 'Geometry/ForwardCommonData/data/zdc/2021/v1/zdc.xml', + 'Geometry/ForwardCommonData/data/zdclumi/2021/v2/zdclumi.xml', + 'Geometry/ForwardCommonData/data/cmszdc.xml', + 'Geometry/ForwardCommonData/data/Run2/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/VeryForwardData/data/RP_Box.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_000.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_001.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_002.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_003.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_004.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_005.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_020.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_021.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_022.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_023.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_024.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_025.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_100.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_101.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_102.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_103.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_104.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_105.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_120.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_121.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_122.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_123.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_124.xml', + 'Geometry/VeryForwardData/data/RP_Box/v2/RP_Box_125.xml', + 'Geometry/VeryForwardData/data/RP_Hybrid/v1/RP_Hybrid.xml', + 'Geometry/VeryForwardData/data/RP_Materials/v3/RP_Materials.xml', + 'Geometry/VeryForwardData/data/RP_Transformations.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_000.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_001.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_002.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_004.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_005.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_020.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_021.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_022.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_024.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_025.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_100.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_101.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_102.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_104.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_105.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_120.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_121.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_122.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_124.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_125.xml', + 'Geometry/VeryForwardData/data/RP_Device.xml', + 'Geometry/VeryForwardData/data/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v2/CTPPS_220_Right_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v2/CTPPS_220_Left_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v2/CTPPS_210_Right_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Left_Station/v2/CTPPS_210_Left_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_Stations_Assembly.xml', + 'Geometry/VeryForwardData/data/CTPPS_Cuts_Per_Region.xml', + 'Geometry/VeryForwardData/data/RP_Sensitive_Dets.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Transformations.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Parameters.xml', + 'Geometry/VeryForwardData/data/CTPPS_Timing_Station_Parameters.xml', + 'Geometry/VeryForwardData/data/CTPPS_Timing_Horizontal_Pot/v1/CTPPS_Timing_Horizontal_Pot.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern1_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern2_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern2_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment5.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Detector_Assembly/2021/v1/CTPPS_Diamond_Detector_Assembly.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Sensitive_Dets_TimingHits.xml', + 'Geometry/VeryForwardData/data/ppstrackerMaterials/v2/ppstrackerMaterials.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Module/v3/CTPPS_Pixel_Module.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Module_2x2/v3/CTPPS_Pixel_Module_2x2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_003.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_023.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_103.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_123.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Sens.xml', + 'Geometry/VeryForwardData/data/CTPPS_2018/RP_Dist_Beam_Cent.xml', + 'Geometry/EcalSimData/data/ecalsens.xml', + 'Geometry/HcalCommonData/data/hcalsens/2021/v1/hcalsenspmf.xml', + 'Geometry/HcalSimData/data/hf.xml', + 'Geometry/HcalSimData/data/hfpmt.xml', + 'Geometry/HcalSimData/data/hffibrebundle.xml', + 'Geometry/HcalSimData/data/CaloUtil/2021/v1/CaloUtil.xml', + 'Geometry/MuonSimData/data/v2/muonSens.xml', + 'Geometry/DTGeometryBuilder/data/dtSpecsFilter/2021/v1/dtSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', + 'Geometry/RPCGeometryBuilder/data/RPCSpecs.xml', + 'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter17.xml', + 'Geometry/GEMGeometryBuilder/data/v4/GEMSpecs.xml', + 'Geometry/ForwardCommonData/data/brmsens.xml', + 'Geometry/ForwardSimData/data/totemsensT2/2021/totemsensT2.xml', + 'Geometry/ForwardSimData/data/zdcsens.xml', + 'Geometry/HcalSimData/data/HcalProdCuts/2021/v2/HcalProdCuts.xml', + 'Geometry/EcalSimData/data/EcalProdCuts.xml', + 'Geometry/EcalSimData/data/ESProdCuts.xml', + 'Geometry/MuonSimData/data/muonProdCuts/2021/v1/muonProdCuts.xml', + 'Geometry/ForwardSimData/data/zdcProdCuts/2021/v2/zdcProdCuts.xml', + 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', + 'Geometry/CMSCommonData/data/FieldParameters.xml', + ), + rootNodeName = cms.string('cms:OCMS') +) diff --git a/Geometry/VeryForwardData/test/testRun3_cfg.py b/Geometry/VeryForwardData/test/testRun3_cfg.py new file mode 100644 index 0000000000000..8c15217de6b5d --- /dev/null +++ b/Geometry/VeryForwardData/test/testRun3_cfg.py @@ -0,0 +1,183 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Run3_cff import Run3 + +process = cms.Process('SIM',Run3) + +# import of standard configurations +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('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedRun3RoundOptics25ns13TeVLowSigmaZ_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.SimIdeal_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +process.load('Geometry.VeryForwardData.testPPS2021XML_cfi') +process.load('Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff') +process.load('Geometry.EcalCommonData.ecalSimulationParameters_cff') +process.load('Geometry.HcalCommonData.hcalDDDSimConstants_cff') +process.load('Geometry.MuonNumbering.muonGeometryConstants_cff') +process.load('Geometry.MuonNumbering.muonOffsetESProducer_cff') + +if hasattr(process,'MessageLogger'): + process.MessageLogger.Geometry=dict() + process.MessageLogger.SimG4CoreGeometry=dict() + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(10), + output = cms.optional.untracked.allowed(cms.int32,cms.PSet) +) + +# Input source +process.source = cms.Source("EmptySource") + +process.options = cms.untracked.PSet( + FailPath = cms.untracked.vstring(), + IgnoreCompletely = cms.untracked.vstring(), + Rethrow = cms.untracked.vstring(), + SkipEvent = cms.untracked.vstring(), + allowUnscheduled = cms.obsolete.untracked.bool, + canDeleteEarly = cms.untracked.vstring(), + emptyRunLumiMode = cms.obsolete.untracked.string, + eventSetup = cms.untracked.PSet( + forceNumberOfConcurrentIOVs = cms.untracked.PSet( + + ), + numberOfConcurrentIOVs = cms.untracked.uint32(1) + ), + fileMode = cms.untracked.string('FULLMERGE'), + forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False), + makeTriggerResults = cms.obsolete.untracked.bool, + numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1), + numberOfConcurrentRuns = cms.untracked.uint32(1), + numberOfStreams = cms.untracked.uint32(0), + numberOfThreads = cms.untracked.uint32(1), + printDependencies = cms.untracked.bool(False), + sizeOfStackForThreadsInKB = cms.optional.untracked.uint32, + throwIfIllegalParameter = cms.untracked.bool(True), + wantSummary = cms.untracked.bool(False) +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + annotation = cms.untracked.string('ZMM_14TeV_TuneCP5_cfi nevts:10'), + name = cms.untracked.string('Applications'), + version = cms.untracked.string('$Revision: 1.19 $') +) + +# Output definition + +process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule", + SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('generation_step') + ), + dataset = cms.untracked.PSet( + dataTier = cms.untracked.string('GEN-SIM'), + filterName = cms.untracked.string('') + ), + fileName = cms.untracked.string('file:step1_ZMM_ddd.root'), + outputCommands = process.FEVTDEBUGEventContent.outputCommands, + splitLevel = cms.untracked.int32(0) +) + +# Additional output definition + +# Other statements +process.genstepfilter.triggerConditions=cms.vstring("generation_step") +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') + +process.generator = cms.EDFilter("Pythia8GeneratorFilter", + pythiaHepMCVerbosity = cms.untracked.bool(False), + maxEventsToPrint = cms.untracked.int32(0), + pythiaPylistVerbosity = cms.untracked.int32(0), + filterEfficiency = cms.untracked.double(1.0), + comEnergy = cms.double(14000.0), + PythiaParameters = cms.PSet( + pythia8CommonSettings = cms.vstring( + 'Tune:preferLHAPDF = 2', + 'Main:timesAllowErrors = 10000', + 'Check:epTolErr = 0.01', + 'Beams:setProductionScalesFromLHEF = off', + 'SLHA:minMassSM = 1000.', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tau0Max = 10', + 'ParticleDecays:allowPhotonRadiation = on', + ), + pythia8CP5Settings = cms.vstring( + 'Tune:pp 14', + 'Tune:ee 7', + 'MultipartonInteractions:ecmPow=0.03344', + 'MultipartonInteractions:bProfile=2', + 'MultipartonInteractions:pT0Ref=1.41', + 'MultipartonInteractions:coreRadius=0.7634', + 'MultipartonInteractions:coreFraction=0.63', + 'ColourReconnection:range=5.176', + 'SigmaTotal:zeroAXB=off', + 'SpaceShower:alphaSorder=2', + 'SpaceShower:alphaSvalue=0.118', + 'SigmaProcess:alphaSvalue=0.118', + 'SigmaProcess:alphaSorder=2', + 'MultipartonInteractions:alphaSvalue=0.118', + 'MultipartonInteractions:alphaSorder=2', + 'TimeShower:alphaSorder=2', + 'TimeShower:alphaSvalue=0.118', + 'SigmaTotal:mode = 0', + 'SigmaTotal:sigmaEl = 21.89', + 'SigmaTotal:sigmaTot = 100.309', + 'PDF:pSet=LHAPDF6:NNPDF31_nnlo_as_0118', + ), + processParameters = cms.vstring( + 'WeakSingleBoson:ffbar2gmZ = on', + '23:onMode = off', + '23:onIfAny = 13', + 'PhaseSpace:mHatMin = 75.', + ), + parameterSets = cms.vstring('pythia8CommonSettings', + 'pythia8CP5Settings', + 'processParameters', + ) + ) +) + +process.mumugenfilter = cms.EDFilter("MCParticlePairFilter", + MaxEta = cms.untracked.vdouble(4.0, 4.0), + MinEta = cms.untracked.vdouble(-4.0, -4.0), + MinPt = cms.untracked.vdouble(2.5, 2.5), + ParticleCharge = cms.untracked.int32(-1), + ParticleID1 = cms.untracked.vint32(13), + ParticleID2 = cms.untracked.vint32(13), + Status = cms.untracked.vint32(1, 1) +) + + +process.ProductionFilterSequence = cms.Sequence(process.generator+process.mumugenfilter) + +# Path and EndPath definitions +process.generation_step = cms.Path(process.pgen) +process.simulation_step = cms.Path(process.psim) +process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) +process.endjob_step = cms.EndPath(process.endOfProcess) +process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput) + +# Schedule definition +process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step) +from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask +associatePatAlgosToolsTask(process) +# filter all path with the production filter sequence +for path in process.paths: + getattr(process,path).insert(0, process.ProductionFilterSequence) + + +# Customisation from command line + +# Add early deletion of temporary data products to reduce peak memory need +from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete +process = customiseEarlyDelete(process) +# End adding early deletion diff --git a/HLTrigger/Configuration/python/HLT_FULL_cff.py b/HLTrigger/Configuration/python/HLT_FULL_cff.py index 4f024227f9e58..5cc5704e634f8 100644 --- a/HLTrigger/Configuration/python/HLT_FULL_cff.py +++ b/HLTrigger/Configuration/python/HLT_FULL_cff.py @@ -1,13 +1,13 @@ # hltGetConfiguration --cff --data /dev/CMSSW_12_0_0/HLT --type FULL -# /dev/CMSSW_12_0_0/HLT/V2 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/HLT/V3 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/HLT/V2') + tableName = cms.string('/dev/CMSSW_12_0_0/HLT/V3') ) fragment.transferSystem = cms.PSet( @@ -6714,13 +6714,13 @@ useAdaBoost = cms.bool( False ) ) fragment.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -6733,7 +6733,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -6742,12 +6742,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -6760,7 +6760,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -6770,13 +6770,13 @@ trackFlip = cms.bool( False ) ) fragment.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -6802,18 +6802,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -6839,7 +6839,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -7577,26 +7577,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) fragment.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -7604,6 +7615,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) @@ -9216,9 +9228,19 @@ maskSource = cms.string( "File" ) ) fragment.hltL2OfflineMuonSeeds = cms.EDProducer( "MuonSeedGenerator", + beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), + crackWindow = cms.double( 0.04 ), + deltaPhiSearchWindow = cms.double( 0.25 ), + crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), + deltaEtaCrackSearchWindow = cms.double( 0.25 ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + scaleDT = cms.bool( True ), EnableDTMeasurement = cms.bool( True ), - EnableCSCMeasurement = cms.bool( True ), + ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), + deltaEtaSearchWindow = cms.double( 0.2 ), EnableME0Measurement = cms.bool( False ), + DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), + EnableCSCMeasurement = cms.bool( True ), SMB_21 = cms.vdouble( 1.043, -0.124, 0.0, 0.183, 0.0, 0.0 ), SMB_20 = cms.vdouble( 1.011, -0.052, 0.0, 0.188, 0.0, 0.0 ), SMB_22 = cms.vdouble( 1.474, -0.758, 0.0, 0.185, 0.0, 0.0 ), @@ -9253,11 +9275,9 @@ SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), - ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), - crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), DT_13_1_scale = cms.vdouble( -4.520923, 0.0 ), @@ -9266,25 +9286,19 @@ DT_23 = cms.vdouble( 0.13, 0.023, -0.057, 0.028, 0.004, 0.0 ), DT_24 = cms.vdouble( 0.176, 0.014, -0.051, 0.051, 0.003, 0.0 ), SMB_12_0_scale = cms.vdouble( 2.283221, 0.0 ), - deltaPhiSearchWindow = cms.double( 0.25 ), SMB_30_0_scale = cms.vdouble( -3.629838, 0.0 ), SME_42 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), SME_41 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), - deltaEtaSearchWindow = cms.double( 0.2 ), CSC_12_2_scale = cms.vdouble( -1.63622, 0.0 ), DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), - deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), OL_1232 = cms.vdouble( 0.184, 0.0, 0.0, 0.066, 0.0, 0.0 ), - DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), - scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), OL_1222 = cms.vdouble( 0.848, -0.591, 0.0, 0.062, 0.0, 0.0 ), CSC_23_1_scale = cms.vdouble( -19.084285, 0.0 ), @@ -9295,7 +9309,6 @@ DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), - crackWindow = cms.double( 0.04 ), CSC_14_3_scale = cms.vdouble( -1.969563, 0.0 ), SMB_31_0_scale = cms.vdouble( -3.323768, 0.0 ), DT_12_1_scale = cms.vdouble( -3.692398, 0.0 ), @@ -9303,7 +9316,6 @@ DT_23_2_scale = cms.vdouble( -5.117625, 0.0 ), SME_12_0_scale = cms.vdouble( 2.279181, 0.0 ), DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), - beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), @@ -54988,13 +55000,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForBtag" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForBtag" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -86095,6 +86107,7 @@ offset = cms.uint32( 0 ) ) fragment.hltPAJetsForCoreTracking = cms.EDFilter( "CandPtrSelector", + filter = cms.bool( False ), src = cms.InputTag( "hltAK4CaloJetsCorrectedIDPassed" ), cut = cms.string( "pt > 100 && abs(eta) < 2.5" ) ) @@ -98798,13 +98811,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForBtagAK8" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForBtagAK8" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -99021,13 +99034,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForDBtagAK8" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForDBtagAK8" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -104093,6 +104106,7 @@ InputObjects = cms.InputTag( "hltIterL3MuonsPPOnAA" ) ) fragment.hltJetsForCoreTracking = cms.EDFilter( "CandPtrSelector", + filter = cms.bool( False ), src = cms.InputTag( "hltPuAK4CaloJetsCorrectedIDPassed" ), cut = cms.string( "pt > 100 && abs(eta) < 2.5" ) ) diff --git a/HLTrigger/Configuration/python/HLT_Fake1_cff.py b/HLTrigger/Configuration/python/HLT_Fake1_cff.py index b2826068b36e3..0478758433c9b 100644 --- a/HLTrigger/Configuration/python/HLT_Fake1_cff.py +++ b/HLTrigger/Configuration/python/HLT_Fake1_cff.py @@ -1,13 +1,13 @@ # hltGetConfiguration --cff --data /dev/CMSSW_12_0_0/Fake1 --type Fake1 -# /dev/CMSSW_12_0_0/Fake1/V1 (CMSSW_11_3_0) +# /dev/CMSSW_12_0_0/Fake1/V3 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/Fake1/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/Fake1/V3') ) fragment.streams = cms.PSet( A = cms.vstring( 'InitialPD' ) ) diff --git a/HLTrigger/Configuration/python/HLT_Fake2_cff.py b/HLTrigger/Configuration/python/HLT_Fake2_cff.py index e915fdba218fe..975216f1f8fa2 100644 --- a/HLTrigger/Configuration/python/HLT_Fake2_cff.py +++ b/HLTrigger/Configuration/python/HLT_Fake2_cff.py @@ -1,13 +1,13 @@ # hltGetConfiguration --cff --data /dev/CMSSW_12_0_0/Fake2 --type Fake2 -# /dev/CMSSW_12_0_0/Fake2/V1 (CMSSW_11_3_0) +# /dev/CMSSW_12_0_0/Fake2/V3 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/Fake2/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/Fake2/V3') ) fragment.streams = cms.PSet( A = cms.vstring( 'InitialPD' ) ) diff --git a/HLTrigger/Configuration/python/HLT_Fake_cff.py b/HLTrigger/Configuration/python/HLT_Fake_cff.py index d7edf4914f8ad..4105de6878962 100644 --- a/HLTrigger/Configuration/python/HLT_Fake_cff.py +++ b/HLTrigger/Configuration/python/HLT_Fake_cff.py @@ -1,13 +1,13 @@ # hltGetConfiguration --cff --data /dev/CMSSW_12_0_0/Fake --type Fake -# /dev/CMSSW_12_0_0/Fake/V1 (CMSSW_11_3_0) +# /dev/CMSSW_12_0_0/Fake/V3 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/Fake/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/Fake/V3') ) fragment.streams = cms.PSet( A = cms.vstring( 'InitialPD' ) ) diff --git a/HLTrigger/Configuration/python/HLT_GRun_cff.py b/HLTrigger/Configuration/python/HLT_GRun_cff.py index 08cdd08be150b..4497cbb7bea82 100644 --- a/HLTrigger/Configuration/python/HLT_GRun_cff.py +++ b/HLTrigger/Configuration/python/HLT_GRun_cff.py @@ -1,13 +1,13 @@ # hltGetConfiguration --cff --data /dev/CMSSW_12_0_0/GRun --type GRun -# /dev/CMSSW_12_0_0/GRun/V1 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/GRun/V2 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/GRun/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/GRun/V2') ) fragment.transferSystem = cms.PSet( @@ -5354,13 +5354,13 @@ useAdaBoost = cms.bool( False ) ) fragment.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -5373,7 +5373,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -5382,12 +5382,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -5400,7 +5400,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -5410,13 +5410,13 @@ trackFlip = cms.bool( False ) ) fragment.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -5442,18 +5442,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -5479,7 +5479,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -6217,26 +6217,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) fragment.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -6244,6 +6255,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) @@ -7856,9 +7868,19 @@ maskSource = cms.string( "File" ) ) fragment.hltL2OfflineMuonSeeds = cms.EDProducer( "MuonSeedGenerator", + beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), + crackWindow = cms.double( 0.04 ), + deltaPhiSearchWindow = cms.double( 0.25 ), + crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), + deltaEtaCrackSearchWindow = cms.double( 0.25 ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + scaleDT = cms.bool( True ), EnableDTMeasurement = cms.bool( True ), - EnableCSCMeasurement = cms.bool( True ), + ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), + deltaEtaSearchWindow = cms.double( 0.2 ), EnableME0Measurement = cms.bool( False ), + DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), + EnableCSCMeasurement = cms.bool( True ), SMB_21 = cms.vdouble( 1.043, -0.124, 0.0, 0.183, 0.0, 0.0 ), SMB_20 = cms.vdouble( 1.011, -0.052, 0.0, 0.188, 0.0, 0.0 ), SMB_22 = cms.vdouble( 1.474, -0.758, 0.0, 0.185, 0.0, 0.0 ), @@ -7893,11 +7915,9 @@ SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), - ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), - crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), DT_13_1_scale = cms.vdouble( -4.520923, 0.0 ), @@ -7906,25 +7926,19 @@ DT_23 = cms.vdouble( 0.13, 0.023, -0.057, 0.028, 0.004, 0.0 ), DT_24 = cms.vdouble( 0.176, 0.014, -0.051, 0.051, 0.003, 0.0 ), SMB_12_0_scale = cms.vdouble( 2.283221, 0.0 ), - deltaPhiSearchWindow = cms.double( 0.25 ), SMB_30_0_scale = cms.vdouble( -3.629838, 0.0 ), SME_42 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), SME_41 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), - deltaEtaSearchWindow = cms.double( 0.2 ), CSC_12_2_scale = cms.vdouble( -1.63622, 0.0 ), DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), - deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), OL_1232 = cms.vdouble( 0.184, 0.0, 0.0, 0.066, 0.0, 0.0 ), - DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), - scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), OL_1222 = cms.vdouble( 0.848, -0.591, 0.0, 0.062, 0.0, 0.0 ), CSC_23_1_scale = cms.vdouble( -19.084285, 0.0 ), @@ -7935,7 +7949,6 @@ DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), - crackWindow = cms.double( 0.04 ), CSC_14_3_scale = cms.vdouble( -1.969563, 0.0 ), SMB_31_0_scale = cms.vdouble( -3.323768, 0.0 ), DT_12_1_scale = cms.vdouble( -3.692398, 0.0 ), @@ -7943,7 +7956,6 @@ DT_23_2_scale = cms.vdouble( -5.117625, 0.0 ), SME_12_0_scale = cms.vdouble( 2.279181, 0.0 ), DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), - beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), @@ -53172,13 +53184,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForBtag" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForBtag" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -88050,13 +88062,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForBtagAK8" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForBtagAK8" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -88273,13 +88285,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForDBtagAK8" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForDBtagAK8" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), diff --git a/HLTrigger/Configuration/python/HLT_HIon_cff.py b/HLTrigger/Configuration/python/HLT_HIon_cff.py index 99f18df95317d..4e7a482308837 100644 --- a/HLTrigger/Configuration/python/HLT_HIon_cff.py +++ b/HLTrigger/Configuration/python/HLT_HIon_cff.py @@ -1,13 +1,13 @@ # hltGetConfiguration --cff --data /dev/CMSSW_12_0_0/HIon --type HIon -# /dev/CMSSW_12_0_0/HIon/V1 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/HIon/V2 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/HIon/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/HIon/V2') ) fragment.transferSystem = cms.PSet( @@ -4517,13 +4517,13 @@ useAdaBoost = cms.bool( False ) ) fragment.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4536,7 +4536,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4545,12 +4545,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4563,7 +4563,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4573,13 +4573,13 @@ trackFlip = cms.bool( False ) ) fragment.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4605,18 +4605,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4642,7 +4642,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -5380,26 +5380,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) fragment.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -5407,6 +5418,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) @@ -7605,9 +7617,19 @@ etMin = cms.double( 5.0 ) ) fragment.hltL2OfflineMuonSeeds = cms.EDProducer( "MuonSeedGenerator", + beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), + crackWindow = cms.double( 0.04 ), + deltaPhiSearchWindow = cms.double( 0.25 ), + crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), + deltaEtaCrackSearchWindow = cms.double( 0.25 ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + scaleDT = cms.bool( True ), EnableDTMeasurement = cms.bool( True ), - EnableCSCMeasurement = cms.bool( True ), + ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), + deltaEtaSearchWindow = cms.double( 0.2 ), EnableME0Measurement = cms.bool( False ), + DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), + EnableCSCMeasurement = cms.bool( True ), SMB_21 = cms.vdouble( 1.043, -0.124, 0.0, 0.183, 0.0, 0.0 ), SMB_20 = cms.vdouble( 1.011, -0.052, 0.0, 0.188, 0.0, 0.0 ), SMB_22 = cms.vdouble( 1.474, -0.758, 0.0, 0.185, 0.0, 0.0 ), @@ -7642,11 +7664,9 @@ SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), - ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), - crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), DT_13_1_scale = cms.vdouble( -4.520923, 0.0 ), @@ -7655,25 +7675,19 @@ DT_23 = cms.vdouble( 0.13, 0.023, -0.057, 0.028, 0.004, 0.0 ), DT_24 = cms.vdouble( 0.176, 0.014, -0.051, 0.051, 0.003, 0.0 ), SMB_12_0_scale = cms.vdouble( 2.283221, 0.0 ), - deltaPhiSearchWindow = cms.double( 0.25 ), SMB_30_0_scale = cms.vdouble( -3.629838, 0.0 ), SME_42 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), SME_41 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), - deltaEtaSearchWindow = cms.double( 0.2 ), CSC_12_2_scale = cms.vdouble( -1.63622, 0.0 ), DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), - deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), OL_1232 = cms.vdouble( 0.184, 0.0, 0.0, 0.066, 0.0, 0.0 ), - DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), - scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), OL_1222 = cms.vdouble( 0.848, -0.591, 0.0, 0.062, 0.0, 0.0 ), CSC_23_1_scale = cms.vdouble( -19.084285, 0.0 ), @@ -7684,7 +7698,6 @@ DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), - crackWindow = cms.double( 0.04 ), CSC_14_3_scale = cms.vdouble( -1.969563, 0.0 ), SMB_31_0_scale = cms.vdouble( -3.323768, 0.0 ), DT_12_1_scale = cms.vdouble( -3.692398, 0.0 ), @@ -7692,7 +7705,6 @@ DT_23_2_scale = cms.vdouble( -5.117625, 0.0 ), SME_12_0_scale = cms.vdouble( 2.279181, 0.0 ), DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), - beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), @@ -10094,6 +10106,7 @@ InputObjects = cms.InputTag( "hltIterL3MuonsPPOnAA" ) ) fragment.hltJetsForCoreTracking = cms.EDFilter( "CandPtrSelector", + filter = cms.bool( False ), src = cms.InputTag( "hltPuAK4CaloJetsCorrectedIDPassed" ), cut = cms.string( "pt > 100 && abs(eta) < 2.5" ) ) diff --git a/HLTrigger/Configuration/python/HLT_PIon_cff.py b/HLTrigger/Configuration/python/HLT_PIon_cff.py index 9f2f1c519907f..76c2da62c77b6 100644 --- a/HLTrigger/Configuration/python/HLT_PIon_cff.py +++ b/HLTrigger/Configuration/python/HLT_PIon_cff.py @@ -1,13 +1,13 @@ # hltGetConfiguration --cff --data /dev/CMSSW_12_0_0/PIon --type PIon -# /dev/CMSSW_12_0_0/PIon/V1 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/PIon/V2 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/PIon/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/PIon/V2') ) fragment.transferSystem = cms.PSet( @@ -3988,13 +3988,13 @@ useAdaBoost = cms.bool( False ) ) fragment.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4007,7 +4007,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4016,12 +4016,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4034,7 +4034,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4044,13 +4044,13 @@ trackFlip = cms.bool( False ) ) fragment.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4076,18 +4076,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4113,7 +4113,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -4851,26 +4851,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) fragment.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -4878,6 +4889,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) diff --git a/HLTrigger/Configuration/python/HLT_PRef_cff.py b/HLTrigger/Configuration/python/HLT_PRef_cff.py index c172452e633b0..5a3640aaf2607 100644 --- a/HLTrigger/Configuration/python/HLT_PRef_cff.py +++ b/HLTrigger/Configuration/python/HLT_PRef_cff.py @@ -1,13 +1,13 @@ # hltGetConfiguration --cff --data /dev/CMSSW_12_0_0/PRef --type PRef -# /dev/CMSSW_12_0_0/PRef/V1 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/PRef/V2 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/PRef/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/PRef/V2') ) fragment.transferSystem = cms.PSet( @@ -4067,13 +4067,13 @@ useAdaBoost = cms.bool( False ) ) fragment.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4086,7 +4086,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4095,12 +4095,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4113,7 +4113,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4123,13 +4123,13 @@ trackFlip = cms.bool( False ) ) fragment.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4155,18 +4155,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4192,7 +4192,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -4930,26 +4930,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) fragment.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -4957,6 +4968,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) @@ -6334,9 +6346,19 @@ maskSource = cms.string( "File" ) ) fragment.hltL2OfflineMuonSeeds = cms.EDProducer( "MuonSeedGenerator", + beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), + crackWindow = cms.double( 0.04 ), + deltaPhiSearchWindow = cms.double( 0.25 ), + crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), + deltaEtaCrackSearchWindow = cms.double( 0.25 ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + scaleDT = cms.bool( True ), EnableDTMeasurement = cms.bool( True ), - EnableCSCMeasurement = cms.bool( True ), + ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), + deltaEtaSearchWindow = cms.double( 0.2 ), EnableME0Measurement = cms.bool( False ), + DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), + EnableCSCMeasurement = cms.bool( True ), SMB_21 = cms.vdouble( 1.043, -0.124, 0.0, 0.183, 0.0, 0.0 ), SMB_20 = cms.vdouble( 1.011, -0.052, 0.0, 0.188, 0.0, 0.0 ), SMB_22 = cms.vdouble( 1.474, -0.758, 0.0, 0.185, 0.0, 0.0 ), @@ -6371,11 +6393,9 @@ SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), - ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), - crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), DT_13_1_scale = cms.vdouble( -4.520923, 0.0 ), @@ -6384,25 +6404,19 @@ DT_23 = cms.vdouble( 0.13, 0.023, -0.057, 0.028, 0.004, 0.0 ), DT_24 = cms.vdouble( 0.176, 0.014, -0.051, 0.051, 0.003, 0.0 ), SMB_12_0_scale = cms.vdouble( 2.283221, 0.0 ), - deltaPhiSearchWindow = cms.double( 0.25 ), SMB_30_0_scale = cms.vdouble( -3.629838, 0.0 ), SME_42 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), SME_41 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), - deltaEtaSearchWindow = cms.double( 0.2 ), CSC_12_2_scale = cms.vdouble( -1.63622, 0.0 ), DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), - deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), OL_1232 = cms.vdouble( 0.184, 0.0, 0.0, 0.066, 0.0, 0.0 ), - DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), - scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), OL_1222 = cms.vdouble( 0.848, -0.591, 0.0, 0.062, 0.0, 0.0 ), CSC_23_1_scale = cms.vdouble( -19.084285, 0.0 ), @@ -6413,7 +6427,6 @@ DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), - crackWindow = cms.double( 0.04 ), CSC_14_3_scale = cms.vdouble( -1.969563, 0.0 ), SMB_31_0_scale = cms.vdouble( -3.323768, 0.0 ), DT_12_1_scale = cms.vdouble( -3.692398, 0.0 ), @@ -6421,7 +6434,6 @@ DT_23_2_scale = cms.vdouble( -5.117625, 0.0 ), SME_12_0_scale = cms.vdouble( 2.279181, 0.0 ), DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), - beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_FULL.py b/HLTrigger/Configuration/test/OnLine_HLT_FULL.py index c49dd2a4ad824..ab5a282e01eff 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_FULL.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_FULL.py @@ -1,13 +1,13 @@ # hltGetConfiguration --full --data /dev/CMSSW_12_0_0/HLT --type FULL --unprescale --process HLTFULL --globaltag auto:run3_hlt_FULL --input file:RelVal_Raw_FULL_DATA.root -# /dev/CMSSW_12_0_0/HLT/V2 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/HLT/V3 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFULL" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/HLT/V2') + tableName = cms.string('/dev/CMSSW_12_0_0/HLT/V3') ) process.transferSystem = cms.PSet( @@ -6879,13 +6879,13 @@ useAdaBoost = cms.bool( False ) ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -6898,7 +6898,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -6907,12 +6907,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -6925,7 +6925,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -6935,13 +6935,13 @@ trackFlip = cms.bool( False ) ) process.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -6967,18 +6967,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -7004,7 +7004,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -7747,26 +7747,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) process.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -7774,6 +7785,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) @@ -9470,9 +9482,19 @@ maskSource = cms.string( "File" ) ) process.hltL2OfflineMuonSeeds = cms.EDProducer( "MuonSeedGenerator", + beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), + crackWindow = cms.double( 0.04 ), + deltaPhiSearchWindow = cms.double( 0.25 ), + crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), + deltaEtaCrackSearchWindow = cms.double( 0.25 ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + scaleDT = cms.bool( True ), EnableDTMeasurement = cms.bool( True ), - EnableCSCMeasurement = cms.bool( True ), + ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), + deltaEtaSearchWindow = cms.double( 0.2 ), EnableME0Measurement = cms.bool( False ), + DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), + EnableCSCMeasurement = cms.bool( True ), SMB_21 = cms.vdouble( 1.043, -0.124, 0.0, 0.183, 0.0, 0.0 ), SMB_20 = cms.vdouble( 1.011, -0.052, 0.0, 0.188, 0.0, 0.0 ), SMB_22 = cms.vdouble( 1.474, -0.758, 0.0, 0.185, 0.0, 0.0 ), @@ -9507,11 +9529,9 @@ SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), - ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), - crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), DT_13_1_scale = cms.vdouble( -4.520923, 0.0 ), @@ -9520,25 +9540,19 @@ DT_23 = cms.vdouble( 0.13, 0.023, -0.057, 0.028, 0.004, 0.0 ), DT_24 = cms.vdouble( 0.176, 0.014, -0.051, 0.051, 0.003, 0.0 ), SMB_12_0_scale = cms.vdouble( 2.283221, 0.0 ), - deltaPhiSearchWindow = cms.double( 0.25 ), SMB_30_0_scale = cms.vdouble( -3.629838, 0.0 ), SME_42 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), SME_41 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), - deltaEtaSearchWindow = cms.double( 0.2 ), CSC_12_2_scale = cms.vdouble( -1.63622, 0.0 ), DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), - deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), OL_1232 = cms.vdouble( 0.184, 0.0, 0.0, 0.066, 0.0, 0.0 ), - DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), - scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), OL_1222 = cms.vdouble( 0.848, -0.591, 0.0, 0.062, 0.0, 0.0 ), CSC_23_1_scale = cms.vdouble( -19.084285, 0.0 ), @@ -9549,7 +9563,6 @@ DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), - crackWindow = cms.double( 0.04 ), CSC_14_3_scale = cms.vdouble( -1.969563, 0.0 ), SMB_31_0_scale = cms.vdouble( -3.323768, 0.0 ), DT_12_1_scale = cms.vdouble( -3.692398, 0.0 ), @@ -9557,7 +9570,6 @@ DT_23_2_scale = cms.vdouble( -5.117625, 0.0 ), SME_12_0_scale = cms.vdouble( 2.279181, 0.0 ), DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), - beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), @@ -55242,13 +55254,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForBtag" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForBtag" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -86349,6 +86361,7 @@ offset = cms.uint32( 0 ) ) process.hltPAJetsForCoreTracking = cms.EDFilter( "CandPtrSelector", + filter = cms.bool( False ), src = cms.InputTag( "hltAK4CaloJetsCorrectedIDPassed" ), cut = cms.string( "pt > 100 && abs(eta) < 2.5" ) ) @@ -99052,13 +99065,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForBtagAK8" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForBtagAK8" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -99275,13 +99288,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForDBtagAK8" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForDBtagAK8" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -104347,6 +104360,7 @@ InputObjects = cms.InputTag( "hltIterL3MuonsPPOnAA" ) ) process.hltJetsForCoreTracking = cms.EDFilter( "CandPtrSelector", + filter = cms.bool( False ), src = cms.InputTag( "hltPuAK4CaloJetsCorrectedIDPassed" ), cut = cms.string( "pt > 100 && abs(eta) < 2.5" ) ) diff --git a/HLTrigger/Configuration/test/OnLine_HLT_Fake.py b/HLTrigger/Configuration/test/OnLine_HLT_Fake.py index fb3e3becf7c51..c72e9fad98fad 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_Fake.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_Fake.py @@ -1,13 +1,13 @@ # hltGetConfiguration --full --data /dev/CMSSW_12_0_0/Fake --type Fake --unprescale --process HLTFake --globaltag auto:run1_hlt_Fake --input file:RelVal_Raw_Fake_DATA.root -# /dev/CMSSW_12_0_0/Fake/V1 (CMSSW_11_3_0) +# /dev/CMSSW_12_0_0/Fake/V3 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFake" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/Fake/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/Fake/V3') ) process.streams = cms.PSet( A = cms.vstring( 'InitialPD' ) ) diff --git a/HLTrigger/Configuration/test/OnLine_HLT_Fake1.py b/HLTrigger/Configuration/test/OnLine_HLT_Fake1.py index 4e93e97f12323..967a9c4be1399 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_Fake1.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_Fake1.py @@ -1,13 +1,13 @@ # hltGetConfiguration --full --data /dev/CMSSW_12_0_0/Fake1 --type Fake1 --unprescale --process HLTFake1 --globaltag auto:run2_hlt_Fake1 --input file:RelVal_Raw_Fake1_DATA.root -# /dev/CMSSW_12_0_0/Fake1/V1 (CMSSW_11_3_0) +# /dev/CMSSW_12_0_0/Fake1/V3 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFake1" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/Fake1/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/Fake1/V3') ) process.streams = cms.PSet( A = cms.vstring( 'InitialPD' ) ) diff --git a/HLTrigger/Configuration/test/OnLine_HLT_Fake2.py b/HLTrigger/Configuration/test/OnLine_HLT_Fake2.py index f0725a4a41896..6f9f7a9eed666 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_Fake2.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_Fake2.py @@ -1,13 +1,13 @@ # hltGetConfiguration --full --data /dev/CMSSW_12_0_0/Fake2 --type Fake2 --unprescale --process HLTFake2 --globaltag auto:run2_hlt_Fake2 --input file:RelVal_Raw_Fake2_DATA.root -# /dev/CMSSW_12_0_0/Fake2/V1 (CMSSW_11_3_0) +# /dev/CMSSW_12_0_0/Fake2/V3 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFake2" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/Fake2/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/Fake2/V3') ) process.streams = cms.PSet( A = cms.vstring( 'InitialPD' ) ) diff --git a/HLTrigger/Configuration/test/OnLine_HLT_GRun.py b/HLTrigger/Configuration/test/OnLine_HLT_GRun.py index 7b4a9188b6013..8d3b46cb15a3f 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_GRun.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_GRun.py @@ -1,13 +1,13 @@ # hltGetConfiguration --full --data /dev/CMSSW_12_0_0/GRun --type GRun --unprescale --process HLTGRun --globaltag auto:run3_hlt_GRun --input file:RelVal_Raw_GRun_DATA.root -# /dev/CMSSW_12_0_0/GRun/V1 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/GRun/V2 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTGRun" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/GRun/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/GRun/V2') ) process.transferSystem = cms.PSet( @@ -5519,13 +5519,13 @@ useAdaBoost = cms.bool( False ) ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -5538,7 +5538,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -5547,12 +5547,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -5565,7 +5565,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -5575,13 +5575,13 @@ trackFlip = cms.bool( False ) ) process.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -5607,18 +5607,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -5644,7 +5644,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -6387,26 +6387,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) process.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -6414,6 +6425,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) @@ -8110,9 +8122,19 @@ maskSource = cms.string( "File" ) ) process.hltL2OfflineMuonSeeds = cms.EDProducer( "MuonSeedGenerator", + beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), + crackWindow = cms.double( 0.04 ), + deltaPhiSearchWindow = cms.double( 0.25 ), + crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), + deltaEtaCrackSearchWindow = cms.double( 0.25 ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + scaleDT = cms.bool( True ), EnableDTMeasurement = cms.bool( True ), - EnableCSCMeasurement = cms.bool( True ), + ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), + deltaEtaSearchWindow = cms.double( 0.2 ), EnableME0Measurement = cms.bool( False ), + DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), + EnableCSCMeasurement = cms.bool( True ), SMB_21 = cms.vdouble( 1.043, -0.124, 0.0, 0.183, 0.0, 0.0 ), SMB_20 = cms.vdouble( 1.011, -0.052, 0.0, 0.188, 0.0, 0.0 ), SMB_22 = cms.vdouble( 1.474, -0.758, 0.0, 0.185, 0.0, 0.0 ), @@ -8147,11 +8169,9 @@ SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), - ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), - crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), DT_13_1_scale = cms.vdouble( -4.520923, 0.0 ), @@ -8160,25 +8180,19 @@ DT_23 = cms.vdouble( 0.13, 0.023, -0.057, 0.028, 0.004, 0.0 ), DT_24 = cms.vdouble( 0.176, 0.014, -0.051, 0.051, 0.003, 0.0 ), SMB_12_0_scale = cms.vdouble( 2.283221, 0.0 ), - deltaPhiSearchWindow = cms.double( 0.25 ), SMB_30_0_scale = cms.vdouble( -3.629838, 0.0 ), SME_42 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), SME_41 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), - deltaEtaSearchWindow = cms.double( 0.2 ), CSC_12_2_scale = cms.vdouble( -1.63622, 0.0 ), DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), - deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), OL_1232 = cms.vdouble( 0.184, 0.0, 0.0, 0.066, 0.0, 0.0 ), - DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), - scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), OL_1222 = cms.vdouble( 0.848, -0.591, 0.0, 0.062, 0.0, 0.0 ), CSC_23_1_scale = cms.vdouble( -19.084285, 0.0 ), @@ -8189,7 +8203,6 @@ DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), - crackWindow = cms.double( 0.04 ), CSC_14_3_scale = cms.vdouble( -1.969563, 0.0 ), SMB_31_0_scale = cms.vdouble( -3.323768, 0.0 ), DT_12_1_scale = cms.vdouble( -3.692398, 0.0 ), @@ -8197,7 +8210,6 @@ DT_23_2_scale = cms.vdouble( -5.117625, 0.0 ), SME_12_0_scale = cms.vdouble( 2.279181, 0.0 ), DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), - beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), @@ -53426,13 +53438,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForBtag" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForBtag" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -88304,13 +88316,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForBtagAK8" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForBtagAK8" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), @@ -88527,13 +88539,13 @@ minimumTransverseMomentum = cms.double( 1.0 ), primaryVertex = cms.InputTag( "hltVerticesPFFilter" ), maximumLongitudinalImpactParameter = cms.double( 17.0 ), - computeGhostTrack = cms.bool( True ), + jets = cms.InputTag( "hltPFJetForDBtagAK8" ), maxDeltaR = cms.double( 0.4 ), candidates = cms.InputTag( "hltParticleFlow" ), jetDirectionUsingGhostTrack = cms.bool( False ), minimumNumberOfPixelHits = cms.int32( 2 ), jetDirectionUsingTracks = cms.bool( False ), - jets = cms.InputTag( "hltPFJetForDBtagAK8" ), + computeGhostTrack = cms.bool( True ), useTrackQuality = cms.bool( False ), ghostTrackPriorDeltaR = cms.double( 0.03 ), maximumChiSquared = cms.double( 5.0 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_HIon.py b/HLTrigger/Configuration/test/OnLine_HLT_HIon.py index 07e1d4217e0e6..f82cc4677269e 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_HIon.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_HIon.py @@ -1,13 +1,13 @@ # hltGetConfiguration --full --data /dev/CMSSW_12_0_0/HIon --type HIon --unprescale --process HLTHIon --globaltag auto:run3_hlt_HIon --input file:RelVal_Raw_HIon_DATA.root -# /dev/CMSSW_12_0_0/HIon/V1 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/HIon/V2 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTHIon" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/HIon/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/HIon/V2') ) process.transferSystem = cms.PSet( @@ -4682,13 +4682,13 @@ useAdaBoost = cms.bool( False ) ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4701,7 +4701,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4710,12 +4710,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4728,7 +4728,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4738,13 +4738,13 @@ trackFlip = cms.bool( False ) ) process.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4770,18 +4770,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4807,7 +4807,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -5550,26 +5550,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) process.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -5577,6 +5588,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) @@ -7859,9 +7871,19 @@ etMin = cms.double( 5.0 ) ) process.hltL2OfflineMuonSeeds = cms.EDProducer( "MuonSeedGenerator", + beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), + crackWindow = cms.double( 0.04 ), + deltaPhiSearchWindow = cms.double( 0.25 ), + crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), + deltaEtaCrackSearchWindow = cms.double( 0.25 ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + scaleDT = cms.bool( True ), EnableDTMeasurement = cms.bool( True ), - EnableCSCMeasurement = cms.bool( True ), + ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), + deltaEtaSearchWindow = cms.double( 0.2 ), EnableME0Measurement = cms.bool( False ), + DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), + EnableCSCMeasurement = cms.bool( True ), SMB_21 = cms.vdouble( 1.043, -0.124, 0.0, 0.183, 0.0, 0.0 ), SMB_20 = cms.vdouble( 1.011, -0.052, 0.0, 0.188, 0.0, 0.0 ), SMB_22 = cms.vdouble( 1.474, -0.758, 0.0, 0.185, 0.0, 0.0 ), @@ -7896,11 +7918,9 @@ SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), - ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), - crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), DT_13_1_scale = cms.vdouble( -4.520923, 0.0 ), @@ -7909,25 +7929,19 @@ DT_23 = cms.vdouble( 0.13, 0.023, -0.057, 0.028, 0.004, 0.0 ), DT_24 = cms.vdouble( 0.176, 0.014, -0.051, 0.051, 0.003, 0.0 ), SMB_12_0_scale = cms.vdouble( 2.283221, 0.0 ), - deltaPhiSearchWindow = cms.double( 0.25 ), SMB_30_0_scale = cms.vdouble( -3.629838, 0.0 ), SME_42 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), SME_41 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), - deltaEtaSearchWindow = cms.double( 0.2 ), CSC_12_2_scale = cms.vdouble( -1.63622, 0.0 ), DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), - deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), OL_1232 = cms.vdouble( 0.184, 0.0, 0.0, 0.066, 0.0, 0.0 ), - DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), - scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), OL_1222 = cms.vdouble( 0.848, -0.591, 0.0, 0.062, 0.0, 0.0 ), CSC_23_1_scale = cms.vdouble( -19.084285, 0.0 ), @@ -7938,7 +7952,6 @@ DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), - crackWindow = cms.double( 0.04 ), CSC_14_3_scale = cms.vdouble( -1.969563, 0.0 ), SMB_31_0_scale = cms.vdouble( -3.323768, 0.0 ), DT_12_1_scale = cms.vdouble( -3.692398, 0.0 ), @@ -7946,7 +7959,6 @@ DT_23_2_scale = cms.vdouble( -5.117625, 0.0 ), SME_12_0_scale = cms.vdouble( 2.279181, 0.0 ), DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), - beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), @@ -10348,6 +10360,7 @@ InputObjects = cms.InputTag( "hltIterL3MuonsPPOnAA" ) ) process.hltJetsForCoreTracking = cms.EDFilter( "CandPtrSelector", + filter = cms.bool( False ), src = cms.InputTag( "hltPuAK4CaloJetsCorrectedIDPassed" ), cut = cms.string( "pt > 100 && abs(eta) < 2.5" ) ) diff --git a/HLTrigger/Configuration/test/OnLine_HLT_PIon.py b/HLTrigger/Configuration/test/OnLine_HLT_PIon.py index f11e1b5c4d1a3..a36f3ff4318b4 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_PIon.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_PIon.py @@ -1,13 +1,13 @@ # hltGetConfiguration --full --data /dev/CMSSW_12_0_0/PIon --type PIon --unprescale --process HLTPIon --globaltag auto:run3_hlt_PIon --input file:RelVal_Raw_PIon_DATA.root -# /dev/CMSSW_12_0_0/PIon/V1 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/PIon/V2 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTPIon" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/PIon/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/PIon/V2') ) process.transferSystem = cms.PSet( @@ -4153,13 +4153,13 @@ useAdaBoost = cms.bool( False ) ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4172,7 +4172,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4181,12 +4181,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4199,7 +4199,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4209,13 +4209,13 @@ trackFlip = cms.bool( False ) ) process.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4241,18 +4241,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4278,7 +4278,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -5021,26 +5021,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) process.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -5048,6 +5059,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) diff --git a/HLTrigger/Configuration/test/OnLine_HLT_PRef.py b/HLTrigger/Configuration/test/OnLine_HLT_PRef.py index 3a9d3a2e923b8..00a8fc16d0327 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_PRef.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_PRef.py @@ -1,13 +1,13 @@ # hltGetConfiguration --full --data /dev/CMSSW_12_0_0/PRef --type PRef --unprescale --process HLTPRef --globaltag auto:run3_hlt_PRef --input file:RelVal_Raw_PRef_DATA.root -# /dev/CMSSW_12_0_0/PRef/V1 (CMSSW_12_0_0_pre1) +# /dev/CMSSW_12_0_0/PRef/V2 (CMSSW_12_0_0_pre2) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTPRef" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_12_0_0/PRef/V1') + tableName = cms.string('/dev/CMSSW_12_0_0/PRef/V2') ) process.transferSystem = cms.PSet( @@ -4232,13 +4232,13 @@ useAdaBoost = cms.bool( False ) ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4251,7 +4251,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( -99999.9 ), + sip2dSigMin = cms.double( 2.0 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4260,12 +4260,12 @@ 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( maxDistToAxis = cms.double( 0.07 ), totalHitsMin = cms.uint32( 0 ), ptMin = cms.double( 0.0 ), @@ -4278,7 +4278,7 @@ jetDeltaRMax = cms.double( 0.3 ), normChi2Max = cms.double( 99999.9 ), pixelHitsMin = cms.uint32( 0 ), - sip2dSigMin = cms.double( 2.0 ), + sip2dSigMin = cms.double( -99999.9 ), sip2dValMin = cms.double( -99999.9 ), sip3dSigMin = cms.double( -99999.9 ), sip3dValMin = cms.double( -99999.9 ) @@ -4288,13 +4288,13 @@ trackFlip = cms.bool( False ) ) process.hltCombinedSecondaryVertexV2 = cms.ESProducer( "CombinedSecondaryVertexESProducer", + charmCut = cms.double( 1.5 ), recordLabel = cms.string( "HLT" ), - categoryVariableName = cms.string( "vertexCategory" ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), - trackSelection = cms.PSet( + categoryVariableName = cms.string( "vertexCategory" ), + trackPseudoSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4320,18 +4320,18 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( -99999.9 ) + sip2dSigMin = cms.double( 2.0 ) ), calibrationRecords = cms.vstring( 'CombinedSVIVFV2RecoVertex', 'CombinedSVIVFV2PseudoVertex', 'CombinedSVIVFV2NoVertex' ), trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), - charmCut = cms.double( 1.5 ), + correctVertexMass = cms.bool( True ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), pseudoVertexV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.05 ) ), trackMultiplicityMin = cms.uint32( 3 ), - trackPseudoSelection = cms.PSet( + trackSelection = cms.PSet( max_pT_dRcut = cms.double( 0.1 ), b_dR = cms.double( 0.6263 ), min_pT = cms.double( 120.0 ), @@ -4357,7 +4357,7 @@ jetDeltaRMax = cms.double( 0.3 ), pixelHitsMin = cms.uint32( 0 ), sip3dSigMin = cms.double( -99999.9 ), - sip2dSigMin = cms.double( 2.0 ) + sip2dSigMin = cms.double( -99999.9 ) ), trackSort = cms.string( "sip2dSig" ), SoftLeptonFlip = cms.bool( False ), @@ -5100,26 +5100,37 @@ ComponentName = cms.string( "hltESPMuonTransientTrackingRecHitBuilder" ) ) process.hltESPPixelCPEGeneric = cms.ESProducer( "PixelCPEGenericESProducer", + xerr_barrel_l1 = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), DoCosmics = cms.bool( False ), Upgrade = cms.bool( False ), + yerr_barrel_l1 = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), eff_charge_cut_highX = cms.double( 1.0 ), eff_charge_cut_highY = cms.double( 1.0 ), inflate_all_errors_no_trk_angle = cms.bool( False ), + xerr_barrel_ln = cms.vdouble( 0.00115, 0.0012, 8.8E-4 ), eff_charge_cut_lowY = cms.double( 0.0 ), eff_charge_cut_lowX = cms.double( 0.0 ), + yerr_barrel_l1_def = cms.double( 0.0021 ), UseErrorsFromTemplates = cms.bool( True ), TruncatePixelCharge = cms.bool( True ), size_cutY = cms.double( 3.0 ), size_cutX = cms.double( 3.0 ), useLAWidthFromDB = cms.bool( False ), + xerr_barrel_l1_def = cms.double( 0.0103 ), inflate_errors = cms.bool( False ), lAWidthBPix = cms.double( 0.0 ), + xerr_endcap_def = cms.double( 0.002 ), ClusterProbComputationFlag = cms.int32( 0 ), + xerr_barrel_ln_def = cms.double( 0.0103 ), Alpha2Order = cms.bool( True ), + yerr_barrel_ln_def = cms.double( 0.0021 ), appendToDataLabel = cms.string( "" ), useLAFromDB = cms.bool( True ), + xerr_endcap = cms.vdouble( 0.002, 0.002 ), SmallPitch = cms.bool( False ), lAWidthFPix = cms.double( 0.0 ), + yerr_endcap = cms.vdouble( 0.0021 ), + yerr_barrel_ln = cms.vdouble( 0.00375, 0.0023, 0.0025, 0.0025, 0.0023, 0.0023, 0.0021, 0.0021, 0.0024 ), LoadTemplatesFromDB = cms.bool( True ), NoTemplateErrorsWhenNoTrkAngles = cms.bool( False ), EdgeClusterErrorX = cms.double( 50.0 ), @@ -5127,6 +5138,7 @@ lAOffset = cms.double( 0.0 ), doLorentzFromAlignment = cms.bool( False ), ComponentName = cms.string( "hltESPPixelCPEGeneric" ), + yerr_endcap_def = cms.double( 7.5E-4 ), MagneticFieldRecord = cms.ESInputTag( "" ), IrradiationBiasCorrection = cms.bool( True ) ) @@ -6588,9 +6600,19 @@ maskSource = cms.string( "File" ) ) process.hltL2OfflineMuonSeeds = cms.EDProducer( "MuonSeedGenerator", + beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), + crackWindow = cms.double( 0.04 ), + deltaPhiSearchWindow = cms.double( 0.25 ), + crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), + deltaEtaCrackSearchWindow = cms.double( 0.25 ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + scaleDT = cms.bool( True ), EnableDTMeasurement = cms.bool( True ), - EnableCSCMeasurement = cms.bool( True ), + ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), + deltaEtaSearchWindow = cms.double( 0.2 ), EnableME0Measurement = cms.bool( False ), + DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), + EnableCSCMeasurement = cms.bool( True ), SMB_21 = cms.vdouble( 1.043, -0.124, 0.0, 0.183, 0.0, 0.0 ), SMB_20 = cms.vdouble( 1.011, -0.052, 0.0, 0.188, 0.0, 0.0 ), SMB_22 = cms.vdouble( 1.474, -0.758, 0.0, 0.185, 0.0, 0.0 ), @@ -6625,11 +6647,9 @@ SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), - ME0RecSegmentLabel = cms.InputTag( "me0Segments" ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), - crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), DT_13_1_scale = cms.vdouble( -4.520923, 0.0 ), @@ -6638,25 +6658,19 @@ DT_23 = cms.vdouble( 0.13, 0.023, -0.057, 0.028, 0.004, 0.0 ), DT_24 = cms.vdouble( 0.176, 0.014, -0.051, 0.051, 0.003, 0.0 ), SMB_12_0_scale = cms.vdouble( 2.283221, 0.0 ), - deltaPhiSearchWindow = cms.double( 0.25 ), SMB_30_0_scale = cms.vdouble( -3.629838, 0.0 ), SME_42 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), SME_41 = cms.vdouble( -0.003, 0.005, 0.005, 0.608, 0.076, 0.0 ), - deltaEtaSearchWindow = cms.double( 0.2 ), CSC_12_2_scale = cms.vdouble( -1.63622, 0.0 ), DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), - deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), OL_1232 = cms.vdouble( 0.184, 0.0, 0.0, 0.066, 0.0, 0.0 ), - DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), - scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), OL_1222 = cms.vdouble( 0.848, -0.591, 0.0, 0.062, 0.0, 0.0 ), CSC_23_1_scale = cms.vdouble( -19.084285, 0.0 ), @@ -6667,7 +6681,6 @@ DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), - crackWindow = cms.double( 0.04 ), CSC_14_3_scale = cms.vdouble( -1.969563, 0.0 ), SMB_31_0_scale = cms.vdouble( -3.323768, 0.0 ), DT_12_1_scale = cms.vdouble( -3.692398, 0.0 ), @@ -6675,7 +6688,6 @@ DT_23_2_scale = cms.vdouble( -5.117625, 0.0 ), SME_12_0_scale = cms.vdouble( 2.279181, 0.0 ), DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), - beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), diff --git a/HLTrigger/HLTcore/interface/HLTPrescaler.h b/HLTrigger/HLTcore/interface/HLTPrescaler.h index 1330e50b17eb8..0e436b4c75aa4 100644 --- a/HLTrigger/HLTcore/interface/HLTPrescaler.h +++ b/HLTrigger/HLTcore/interface/HLTPrescaler.h @@ -13,8 +13,10 @@ */ #include -#include "FWCore/Framework/interface/Frameworkfwd.h" +#include + #include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/stream/EDFilter.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/PrescaleService/interface/PrescaleService.h" @@ -46,7 +48,7 @@ class HLTPrescaler : public edm::stream::EDFilter initializeGlobalCache(edm::ParameterSet const&) { - return std::unique_ptr(new trigger::Efficiency()); + return std::make_unique(); } // diff --git a/HLTrigger/special/plugins/HLTCountNumberOfObject.h b/HLTrigger/special/plugins/HLTCountNumberOfObject.h index e56ea0b75e94f..535ef62f96968 100644 --- a/HLTrigger/special/plugins/HLTCountNumberOfObject.h +++ b/HLTrigger/special/plugins/HLTCountNumberOfObject.h @@ -17,8 +17,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageService/interface/MessageLogger.h" - #include "HLTrigger/HLTcore/interface/HLTFilter.h" #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h" #include "HLTrigger/HLTcore/interface/defaultModuleLabel.h" diff --git a/HLTrigger/special/plugins/HLTTrackWithHits.h b/HLTrigger/special/plugins/HLTTrackWithHits.h index 8344d0a70f317..4d1edb120d65b 100644 --- a/HLTrigger/special/plugins/HLTTrackWithHits.h +++ b/HLTrigger/special/plugins/HLTTrackWithHits.h @@ -17,8 +17,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageService/interface/MessageLogger.h" - #include "HLTrigger/HLTcore/interface/HLTFilter.h" #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h" #include "DataFormats/TrackReco/interface/Track.h" diff --git a/HLTriggerOffline/B2G/interface/B2GDoubleLeptonHLTValidation.h b/HLTriggerOffline/B2G/interface/B2GDoubleLeptonHLTValidation.h index 264970098b286..4be070c2ac647 100644 --- a/HLTriggerOffline/B2G/interface/B2GDoubleLeptonHLTValidation.h +++ b/HLTriggerOffline/B2G/interface/B2GDoubleLeptonHLTValidation.h @@ -118,7 +118,7 @@ inline void B2GDoubleLeptonHLTValidation::triggerBinLabels(const std::vector("sDir", "HLTValidation/B2G/Efficiencies/")), sElectrons_(iConfig.getUntrackedParameter("sElectrons", "gsfElectrons")), ptElectrons_(iConfig.getUntrackedParameter("ptElectrons", 0.)), @@ -143,7 +143,7 @@ B2GDoubleLeptonHLTValidation::B2GDoubleLeptonHLTValidation(const edm::ParameterS tokTrigger_ = consumes(edm::InputTag(sTrigger_, "", "HLT")); } -B2GDoubleLeptonHLTValidation::~B2GDoubleLeptonHLTValidation() { +inline B2GDoubleLeptonHLTValidation::~B2GDoubleLeptonHLTValidation() { // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) } diff --git a/HLTriggerOffline/B2G/interface/B2GHadronicHLTValidation.h b/HLTriggerOffline/B2G/interface/B2GHadronicHLTValidation.h index 1aa2535bb94e9..2be598961bdb7 100644 --- a/HLTriggerOffline/B2G/interface/B2GHadronicHLTValidation.h +++ b/HLTriggerOffline/B2G/interface/B2GHadronicHLTValidation.h @@ -108,7 +108,7 @@ inline void B2GHadronicHLTValidation::triggerBinLabels(const std::vector("sDir", "HLTValidation/B2G/Efficiencies/")), sJets_(iConfig.getUntrackedParameter("sJets", "ak5PFJets")), ptJets_(iConfig.getUntrackedParameter("ptJets", 0.)), @@ -127,7 +127,7 @@ B2GHadronicHLTValidation::B2GHadronicHLTValidation(const edm::ParameterSet &iCon tokTrigger_ = consumes(edm::InputTag(sTrigger_, "", "HLT")); } -B2GHadronicHLTValidation::~B2GHadronicHLTValidation() { +inline B2GHadronicHLTValidation::~B2GHadronicHLTValidation() { // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) } diff --git a/HLTriggerOffline/B2G/interface/B2GSingleLeptonHLTValidation.h b/HLTriggerOffline/B2G/interface/B2GSingleLeptonHLTValidation.h index 64771e5306c30..5066a8f6a509c 100644 --- a/HLTriggerOffline/B2G/interface/B2GSingleLeptonHLTValidation.h +++ b/HLTriggerOffline/B2G/interface/B2GSingleLeptonHLTValidation.h @@ -127,7 +127,7 @@ inline void B2GSingleLeptonHLTValidation::triggerBinLabels(const std::vector("sDir", "HLTValidation/B2G/Efficiencies/")), sElectrons_(iConfig.getUntrackedParameter("sElectrons", "gsfElectrons")), ptElectrons_(iConfig.getUntrackedParameter("ptElectrons", 0.)), @@ -159,7 +159,7 @@ B2GSingleLeptonHLTValidation::B2GSingleLeptonHLTValidation(const edm::ParameterS tokTrigger_ = consumes(edm::InputTag(sTrigger_, "", "HLT")); } -B2GSingleLeptonHLTValidation::~B2GSingleLeptonHLTValidation() { +inline B2GSingleLeptonHLTValidation::~B2GSingleLeptonHLTValidation() { // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) } diff --git a/HeterogeneousCore/CUDACore/interface/ConvertingESProducerWithDependenciesT.h b/HeterogeneousCore/CUDACore/interface/ConvertingESProducerWithDependenciesT.h index e0279a1d7bb6d..9a57e405ceb5c 100644 --- a/HeterogeneousCore/CUDACore/interface/ConvertingESProducerWithDependenciesT.h +++ b/HeterogeneousCore/CUDACore/interface/ConvertingESProducerWithDependenciesT.h @@ -37,8 +37,8 @@ namespace detail { template