From 0b3c7525cae486a6aca4b4a88009c1481ae6bade Mon Sep 17 00:00:00 2001 From: amassiro Date: Fri, 18 Oct 2019 16:00:47 +0200 Subject: [PATCH 01/24] commit without new class needed for apdpnMC --- .../interface/EcalLaserDbRecordMC.h | 26 +++++ .../plugins/EcalLaserCorrectionServiceMC.cc | 104 ++++++++++++++++++ .../src/EcalLaserDbRecordMC.cc | 5 + .../interface/EcalLaserAPDPNRatiosMCRcd.h | 26 +++++ 4 files changed, 161 insertions(+) create mode 100644 CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h create mode 100644 CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionServiceMC.cc create mode 100644 CalibCalorimetry/EcalLaserCorrection/src/EcalLaserDbRecordMC.cc create mode 100644 CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h diff --git a/CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h b/CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h new file mode 100644 index 0000000000000..cc1dddf76054a --- /dev/null +++ b/CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h @@ -0,0 +1,26 @@ +// +// Toyoko Orimoto (Caltech), 10 July 2007 +// + +#ifndef ECALLASERCORRECTION_ECALLASERDBRECORDMC_H +#define ECALLASERCORRECTION_ECALLASERDBRECORDMC_H + +#include "boost/mpl/vector.hpp" +#include "FWCore/Framework/interface/DependentRecordImplementation.h" +// #include "FWCore/Framework/interface/EventSetupRecordImplementation.h" + +#include "CondFormats/DataRecord/interface/EcalLaserAlphasRcd.h" +#include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRefRcd.h" +#include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h" +#include "CondFormats/DataRecord/interface/EcalLinearCorrectionsRcd.h" + +// class EcalLaserDbRecordMC : public edm::eventsetup::EventSetupRecordImplementation {}; + +class EcalLaserDbRecordMC + : public edm::eventsetup::DependentRecordImplementation > {}; + +#endif /* ECALLASERCORRECTION_ECALLASERDBRECORDMC_H */ diff --git a/CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionServiceMC.cc b/CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionServiceMC.cc new file mode 100644 index 0000000000000..909bbe0323131 --- /dev/null +++ b/CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionServiceMC.cc @@ -0,0 +1,104 @@ +// +// Toyoko Orimoto (Caltech), 10 July 2007 +// Andrea Massironi, 3 Aug 2019 +// + +// system include files +#include +#include +#include + +#include "FWCore/Framework/interface/ModuleFactory.h" +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/Framework/interface/ESProductHost.h" +#include "FWCore/Utilities/interface/ReusableObjectHolder.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbService.h" +#include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h" + +#include "CondFormats/DataRecord/interface/EcalLaserAlphasRcd.h" +#include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRefRcd.h" +#include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h" +#include "CondFormats/DataRecord/interface/EcalLinearCorrectionsRcd.h" + +class EcalLaserCorrectionServiceMC : public edm::ESProducer { +public: + EcalLaserCorrectionServiceMC(const edm::ParameterSet&); + ~EcalLaserCorrectionServiceMC() override; + + std::shared_ptr produce(const EcalLaserDbRecordMC&); + +private: + using HostType = edm::ESProductHost; + + // ----------member data --------------------------- + edm::ReusableObjectHolder holder_; + + edm::ESGetToken alphaToken_; + edm::ESGetToken apdpnRefToken_; + edm::ESGetToken apdpnToken_; + edm::ESGetToken linearToken_; + + // std::vector mDumpRequest; + // std::ostream* mDumpStream; +}; + +EcalLaserCorrectionServiceMC::EcalLaserCorrectionServiceMC(const edm::ParameterSet& fConfig) + : ESProducer() +// mDumpRequest (), +// mDumpStream(0) +{ + //the following line is needed to tell the framework what + // data is being produced + // setWhatProduced (this, (dependsOn (&EcalLaserCorrectionServiceMC::apdpnCallback))); + + setWhatProduced(this) + .setConsumes(alphaToken_) + .setConsumes(apdpnRefToken_) + .setConsumes(apdpnToken_) + .setConsumes(linearToken_); + + //now do what ever other initialization is needed + + // mDumpRequest = fConfig.getUntrackedParameter > ("dump", std::vector()); + // if (!mDumpRequest.empty()) { + // std::string otputFile = fConfig.getUntrackedParameter ("file", ""); + // mDumpStream = otputFile.empty () ? &std::cout : new std::ofstream (otputFile.c_str()); + // } +} + +EcalLaserCorrectionServiceMC::~EcalLaserCorrectionServiceMC() { + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + // if (mDumpStream != &std::cout) delete mDumpStream; +} + +// +// member functions +// + +// ------------ method called to produce the data ------------ +std::shared_ptr EcalLaserCorrectionServiceMC::produce(const EcalLaserDbRecordMC& record) { + auto host = holder_.makeOrGet([]() { return new HostType; }); + + host->ifRecordChanges( + record, [this, h = host.get()](auto const& rec) { h->setLinearCorrectionsData(&rec.get(linearToken_)); }); + + host->ifRecordChanges( + record, [this, h = host.get()](auto const& rec) { h->setAPDPNData(&rec.get(apdpnToken_)); }); + + host->ifRecordChanges( + record, [this, h = host.get()](auto const& rec) { h->setAPDPNRefData(&rec.get(apdpnRefToken_)); }); + + host->ifRecordChanges( + record, [this, h = host.get()](auto const& rec) { h->setAlphaData(&rec.get(alphaToken_)); }); + + return host; // automatically converts to std::shared_ptr +} + +DEFINE_FWK_EVENTSETUP_MODULE(EcalLaserCorrectionServiceMC); diff --git a/CalibCalorimetry/EcalLaserCorrection/src/EcalLaserDbRecordMC.cc b/CalibCalorimetry/EcalLaserCorrection/src/EcalLaserDbRecordMC.cc new file mode 100644 index 0000000000000..f127facce686f --- /dev/null +++ b/CalibCalorimetry/EcalLaserCorrection/src/EcalLaserDbRecordMC.cc @@ -0,0 +1,5 @@ + +#include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h" +#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" + +EVENTSETUP_RECORD_REG(EcalLaserDbRecordMC); diff --git a/CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h b/CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h new file mode 100644 index 0000000000000..f6dc56da322ae --- /dev/null +++ b/CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h @@ -0,0 +1,26 @@ +#ifndef DataRecord_EcalLaserAPDPNRatiosMCRcd_h +#define DataRecord_EcalLaserAPDPNRatiosMCRcd_h +// -*- C++ -*- +// +// Package: DataRecord +// Class : EcalLaserAPDPNRatiosMCRcd +// +/**\class EcalLaserAPDPNRatiosMCRcd EcalLaserAPDPNRatiosMCRcd.h CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h + * + * Description: + * + * Usage: + * + * + */ +// +// Author: +// Created: Fri Jun 1 12:30:43 CEST 2007 +// $Id$ +// + +#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" + +class EcalLaserAPDPNRatiosMCRcd : public edm::eventsetup::EventSetupRecordImplementation {}; + +#endif From 9091ebc23d65e8bddd8918662384e8ac82937ad5 Mon Sep 17 00:00:00 2001 From: amassiro Date: Fri, 18 Oct 2019 16:00:54 +0200 Subject: [PATCH 02/24] commit without new class needed for apdpnMC --- CondCore/EcalPlugins/src/plugin.cc | 2 + .../python/relval_premix.py | 1 + .../python/relval_steps.py | 8 ++ .../interface/EcalSignalGenerator.h | 119 ++++++++++++++++++ .../EcalSimAlgos/src/EcalSignalGenerator.cc | 77 ++++++++++-- 5 files changed, 200 insertions(+), 7 deletions(-) diff --git a/CondCore/EcalPlugins/src/plugin.cc b/CondCore/EcalPlugins/src/plugin.cc index 69a0f4425200b..9e545bd02c64c 100644 --- a/CondCore/EcalPlugins/src/plugin.cc +++ b/CondCore/EcalPlugins/src/plugin.cc @@ -58,6 +58,7 @@ #include "CondFormats/EcalObjects/interface/EcalLaserAPDPNRatios.h" #include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRcd.h" +#include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h" #include "CondFormats/EcalObjects/interface/EcalChannelStatus.h" #include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h" @@ -172,6 +173,7 @@ REGISTER_PLUGIN(EcalIntercalibErrorsRcd, EcalCondObjectContainer); REGISTER_PLUGIN(EcalADCToGeVConstantRcd, EcalADCToGeVConstant); REGISTER_PLUGIN(EcalLaserAlphasRcd, EcalCondObjectContainer); REGISTER_PLUGIN(EcalLaserAPDPNRatiosRcd, EcalLaserAPDPNRatios); +REGISTER_PLUGIN(EcalLaserAPDPNRatiosMCRcd,EcalLaserAPDPNRatios); REGISTER_PLUGIN(EcalLaserAPDPNRatiosRefRcd, EcalCondObjectContainer); REGISTER_PLUGIN(EcalChannelStatusRcd, EcalCondObjectContainer); REGISTER_PLUGIN(EcalPFRecHitThresholdsRcd, EcalCondObjectContainer); diff --git a/Configuration/PyReleaseValidation/python/relval_premix.py b/Configuration/PyReleaseValidation/python/relval_premix.py index 66446b172f120..2f35e8bdf4b4f 100644 --- a/Configuration/PyReleaseValidation/python/relval_premix.py +++ b/Configuration/PyReleaseValidation/python/relval_premix.py @@ -30,6 +30,7 @@ workflows[250200.17]=['',['ZEE_13UP17','DIGIPRMXUP17_PU25','RECOPRMXUP17_PU25','HARVESTUP17_PU25']] workflows[250202.17]=['',['TTbar_13UP17','DIGIPRMXUP17_PU25','RECOPRMXUP17_PU25','HARVESTUP17_PU25']] workflows[250202.171]=['',['TTbar_13UP17','PREMIXUP17_PU25','DIGIPRMXLOCALUP17_PU25','RECOPRMXUP17_PU25','HARVESTUP17_PU25']] +workflows[250202.172]=['',['TTbar_13UP17','DIGIPRMXUP17_PU25_RD','RECOPRMXUP17_PU25','HARVESTUP17_PU25']] workflows[250203.17]=['',['H125GGgluonfusion_13UP17','DIGIPRMXUP17_PU25','RECOPRMXUP17_PU25','HARVESTUP17_PU25']] workflows[250204.17]=['',['QQH1352T_13UP17','DIGIPRMXUP17_PU25','RECOPRMXUP17_PU25','HARVESTUP17_PU25']] workflows[250205.17]=['',['ZTT_13UP17','DIGIPRMXUP17_PU25','RECOPRMXUP17_PU25','HARVESTUP17_PU25']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 875c5cfb5c269..72885ff9c2235 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1736,6 +1736,14 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXLOCALUP15_PU25']=merge([digiPremixLocalPileupUp2015Defaults25ns]) steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns]) steps['DIGIPRMXUP17_PU25']=merge([digiPremixUp2017Defaults25ns]) +steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, + { + #'--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC')\"" + + '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) )\"" + } + ]) + steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) steps['DIGIPRMXLOCALUP18_PU25']=merge([digiPremixLocalPileupUp2018Defaults25ns]) diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 6419e8b69c870..e571002b14aff 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -31,6 +31,14 @@ #include "CondFormats/DataRecord/interface/ESGainRcd.h" #include "DataFormats/Common/interface/Handle.h" + +// needed for LC'/LC correction for time dependent MC +#include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbService.h" +#include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecord.h" +#include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h" + + + /** Converts digis back into analog signals, to be used * as noise */ @@ -48,6 +56,8 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { typedef typename ECALDIGITIZERTRAITS::Digi DIGI; typedef typename ECALDIGITIZERTRAITS::DigiCollection COLLECTION; + typedef std::unordered_map CalibCache; + EcalSignalGenerator() : EcalBaseSignalGenerator() {} EcalSignalGenerator(const edm::InputTag& inputTag, @@ -81,6 +91,48 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_maxEneEB = (agc->getEBValue()) * theDefaultGains[1] * MAXADC * m_EBs25notCont; m_maxEneEE = (agc->getEEValue()) * theDefaultGains[1] * MAXADC * m_EEs25notCont; + + //---- + // Ecal LaserCorrection Constants for laser correction ratio + edm::ESHandle laser; + eventSetup->get().get(laser); + + // + // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? + // check with generation experts + // + const edm::TimeValue_t eventTimeValue = theEvent->run(); + //---- NB: this is a trick. Since the time dependent MC + // will be based on "run" (and lumisection) + // to identify the IOV. + // The "time" defined here as "run" + // will have to match in the generation of the tag + // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) + // + m_iTime = eventTimeValue; + + m_lasercals = laser.product(); + + // + // the "prime" is exactly the same as the usual laser service, BUT + // it has only 1 IOV, so that effectively you are dividing IOV_n / IOV_0 + // NB: in the creation of the tag make sure the "prime" (MC) tag is prepared properly! + // NB again: if many IOVs also in "MC" tag, then fancy things could be perfomed ... left for the future + // + edm::ESHandle laser_prime; + eventSetup->get().get(laser_prime); + // const edm::TimeValue_t eventTimeValue = event.time().value(); + m_lasercals_prime = laser_prime.product(); + + //clear the laser cache for each event time + // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? + // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ + // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ + m_valueLCCache_LC.clear(); + m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes + //---- + + //ES eventSetup->get().get(hesgain); eventSetup->get().get(hesMIPToGeV); @@ -112,6 +164,47 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_maxEneEB = (agc->getEBValue()) * theDefaultGains[1] * MAXADC * m_EBs25notCont; m_maxEneEE = (agc->getEEValue()) * theDefaultGains[1] * MAXADC * m_EEs25notCont; + //---- + // Ecal LaserCorrection Constants for laser correction ratio + edm::ESHandle laser; + eventSetup->get().get(laser); + edm::TimeValue_t eventTimeValue = 0; + if (theEventPrincipal) { + // eventTimeValue = theEventPrincipal->time().value(); + // + // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? + // check with generation experts + // + eventTimeValue = theEventPrincipal->run(); + //---- NB: this is a trick. Since the time dependent MC + // will be based on "run" (and lumisection) + // to identify the IOV. + // The "time" defined here as "run" + // will have to match in the generation of the tag + // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) + // + } + else { + std::cout << " theEventPrincipal not defined??? " << std::endl; + } + m_iTime = eventTimeValue; + m_lasercals = laser.product(); + // std::cout << " ---> EcalSignalGenerator() : initializeEvent() :: eventTimeValue = " << eventTimeValue << std::endl; + + edm::ESHandle laser_prime; + eventSetup->get().get(laser_prime); + // const edm::TimeValue_t eventTimeValue = event.time().value(); + m_lasercals_prime = laser_prime.product(); + + //clear the laser cache for each event time + // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? + // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ + // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ + m_valueLCCache_LC.clear(); + m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes + //---- + + //ES eventSetup->get().get(hesgain); eventSetup->get().get(hesMIPToGeV); @@ -187,6 +280,26 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { CaloSamples samplesInPE(const DIGI& digi); // have to define this separately for ES + + //---- LC that depends with time + double findLaserConstant_LC(const DetId& detId) const { + + const edm::Timestamp& evtTimeStamp = edm::Timestamp(m_iTime); + return (m_lasercals->getLaserCorrection(detId, evtTimeStamp)); + + } + + + //---- LC at the beginning of the time (first IOV of the GT == first time) + //---- Using the different "tag", the one with "MC": exactly the same function as findLaserConstant_LC but with a different object + double findLaserConstant_LC_prime(const DetId& detId) const { + + const edm::Timestamp& evtTimeStamp = edm::Timestamp(m_iTime); + return (m_lasercals_prime->getLaserCorrection(detId, evtTimeStamp)); + + } + + const std::vector GetGainRatios(const DetId& detid) { std::vector gainRatios(4); // get gain ratios @@ -240,6 +353,12 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { const EcalADCToGeVConstant* agc; const EcalIntercalibConstantsMC* ical; + edm::TimeValue_t m_iTime; + CalibCache m_valueLCCache_LC; + CalibCache m_valueLCCache_LC_prime; + const EcalLaserDbService* m_lasercals; + const EcalLaserDbService* m_lasercals_prime; + double theDefaultGains[NGAINS]; }; diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc index 66f40e8aba7d4..fe055ee32165b 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc @@ -40,18 +40,50 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi // std::cout << " intercal, LSBs, egains " << icalconst << " " << LSB[0] << " " << LSB[1] << " " << gainRatios[0] << " " << gainRatios[1] << " " << Emax << std::endl; CaloSamples result(detId, digi.size()); - + + // correction factor for premixed sample: ratio of laser corrections + float correction_factor_for_premixed_sample_transparency = 1.0; + double value_LC = 1.; + if (detId.subdetId() != 3) { + auto cache = m_valueLCCache_LC.find(detId); + if (cache != m_valueLCCache_LC.end()) { + value_LC = cache->second; + } else { + value_LC = findLaserConstant_LC(detId); + m_valueLCCache_LC.emplace(detId, value_LC); + } + } + + double value_LC_prime = 1.; + if (detId.subdetId() != 3) { + auto cache = m_valueLCCache_LC_prime.find(detId); + if (cache != m_valueLCCache_LC_prime.end()) { + value_LC_prime = cache->second; + } else { + value_LC_prime = findLaserConstant_LC_prime(detId); + m_valueLCCache_LC_prime.emplace(detId, value_LC_prime); + } + } + + correction_factor_for_premixed_sample_transparency = value_LC_prime / value_LC; + // + // LC' / LC (see formula) + // + +// std::cout << " EcalSignalGenerator::samplesInPE :: correction_factor_for_premixed_sample_transparency = " << correction_factor_for_premixed_sample_transparency << std::endl; + for (int isample = 0; isample < digi.size(); ++isample) { int gainId = digi[isample].gainId(); //int gainId = 1; if (gainId == 1) { - result[isample] = float(digi[isample].adc()) / 1000. / peToA; // special coding + result[isample] = float(digi[isample].adc()) / 1000. / peToA * correction_factor_for_premixed_sample_transparency; // special coding, save low level info } else if (gainId > 1) { - result[isample] = float(digi[isample].adc()) * LSB[gainId - 1] * icalconst / peToA; + result[isample] = float(digi[isample].adc()) * LSB[gainId - 1] * icalconst / peToA * correction_factor_for_premixed_sample_transparency; // bet that no pileup hit has an energy over Emax/2 } // gain = 0 else { - result[isample] = float(digi[isample].adc()) * LSB[gainId] * icalconst / peToA; + result[isample] = float(digi[isample].adc()) * LSB[gainId] * icalconst / peToA * correction_factor_for_premixed_sample_transparency; //not sure we ever get here at gain=0, but hit wil be saturated anyway + // in EcalCoder.cc it is actually "LSB[3]" -> grrr } // old version: @@ -108,17 +140,48 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi CaloSamples result(detId, digi.size()); + // correction facotr for premixed sample: ratio of laser corrections + float correction_factor_for_premixed_sample_transparency = 1.0; + double value_LC = 1.; + if (detId.subdetId() != 3) { + auto cache = m_valueLCCache_LC.find(detId); + if (cache != m_valueLCCache_LC.end()) { + value_LC = cache->second; + } else { + value_LC = findLaserConstant_LC(detId); + m_valueLCCache_LC.emplace(detId, value_LC); + } + } + + double value_LC_prime = 1.; + if (detId.subdetId() != 3) { + auto cache = m_valueLCCache_LC_prime.find(detId); + if (cache != m_valueLCCache_LC_prime.end()) { + value_LC_prime = cache->second; + } else { + value_LC_prime = findLaserConstant_LC_prime(detId); + m_valueLCCache_LC_prime.emplace(detId, value_LC_prime); + } + } + + correction_factor_for_premixed_sample_transparency = value_LC_prime / value_LC; + // + // LC' / LC (see formula) + // + +// std::cout << " EcalSignalGenerator::samplesInPE :: correction_factor_for_premixed_sample_transparency = " << correction_factor_for_premixed_sample_transparency << std::endl; + for (int isample = 0; isample < digi.size(); ++isample) { int gainId = digi[isample].gainId(); //int gainId = 1; if (gainId == 1) { - result[isample] = float(digi[isample].adc()) / 1000. / peToA; // special coding + result[isample] = float(digi[isample].adc()) / 1000. / peToA * correction_factor_for_premixed_sample_transparency; // special coding } else if (gainId > 1) { - result[isample] = float(digi[isample].adc()) * LSB[gainId - 1] * icalconst / peToA; + result[isample] = float(digi[isample].adc()) * LSB[gainId - 1] * icalconst / peToA * correction_factor_for_premixed_sample_transparency; } // gain = 0 else { - result[isample] = float(digi[isample].adc()) * LSB[gainId] * icalconst / peToA; + result[isample] = float(digi[isample].adc()) * LSB[gainId] * icalconst / peToA * correction_factor_for_premixed_sample_transparency; } // old version From a871be0b6b59efaafb0a553371e439250056229a Mon Sep 17 00:00:00 2001 From: amassiro Date: Fri, 18 Oct 2019 18:47:07 +0200 Subject: [PATCH 03/24] fix white spaces --- .../python/relval_premix.py | 5 ++ .../python/relval_steps.py | 67 +++++++++++++------ .../interface/EcalSignalGenerator.h | 2 +- 3 files changed, 52 insertions(+), 22 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_premix.py b/Configuration/PyReleaseValidation/python/relval_premix.py index 2f35e8bdf4b4f..99c501a353849 100644 --- a/Configuration/PyReleaseValidation/python/relval_premix.py +++ b/Configuration/PyReleaseValidation/python/relval_premix.py @@ -20,6 +20,11 @@ workflows[250200]=['',['ZEE_13','DIGIPRMXUP15_PU25','RECOPRMXUP15_PU25','HARVESTUP15_PU25']] workflows[250202]=['',['TTbar_13','DIGIPRMXUP15_PU25','RECOPRMXUP15_PU25','HARVESTUP15_PU25']] workflows[250202.1]=['',['TTbar_13','PREMIXUP15_PU25','DIGIPRMXLOCALUP15_PU25','RECOPRMXUP15_PU25','HARVESTUP15_PU25']] +workflows[250202.2]=['',['TTbar_13','DIGIPRMXUP15APVSimu_PU25','RECOPRMXUP15_PU25','HARVESTUP15_PU25']] +workflows[250202.3]=['',['TTbar_13','PREMIXUP15_PU25','DIGIPRMXLOCALUP15APVSimu_PU25','RECOPRMXUP15_PU25','HARVESTUP15_PU25']] +workflows[250202.4]=['',['TTbar_13','DIGIPRMXUP15APVSimu_PU25','RECOPRMXUP15_HIPM_PU25','HARVESTUP15_PU25']] +workflows[250202.5]=['',['TTbar_13','PREMIXUP15_PU25','DIGIPRMXLOCALUP15APVSimu_PU25','RECOPRMXUP15_HIPM_PU25','HARVESTUP15_PU25']] + workflows[250203]=['',['H125GGgluonfusion_13','DIGIPRMXUP15_PU25','RECOPRMXUP15_PU25','HARVESTUP15_PU25']] workflows[250204]=['',['QQH1352T_13','DIGIPRMXUP15_PU25','RECOPRMXUP15_PU25','HARVESTUP15_PU25']] workflows[250205]=['',['ZTT_13','DIGIPRMXUP15_PU25','RECOPRMXUP15_PU25','HARVESTUP15_PU25']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 72885ff9c2235..644529092237d 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -644,8 +644,8 @@ def identitySim(wf): 'CMSSW_10_6_0-106X_upgrade2018_realistic_v4-v1', # 18 - GENSIM input for 2018 fullSim premix workflows 'CMSSW_10_6_0-106X_upgrade2018_realistic_v4_FastSim-v1', # 19 - fastSim MinBias for mixing UP18 'CMSSW_10_6_0-PU25ns_106X_upgrade2018_realistic_v4_FastSim-v1',# 20 - fastSim premix library UP18 - 'CMSSW_10_6_0-106X_mc2017_realistic_v3-v1', # 21 - GEN-SIM inputs for LHE-GEN-SIM 2017 workflows - 'CMSSW_10_6_0-106X_upgrade2018_realistic_v4-v1', # 22 - GEN-SIM inputs for LHE-GEN-SIM 2018 workflows + 'CMSSW_10_6_0-106X_mc2017_realistic_v3-v1', # 21 - GEN-SIM inputs for LHE-GEN-SIM 2017 workflows + 'CMSSW_10_6_0-106X_upgrade2018_realistic_v4-v1', # 22 - GEN-SIM inputs for LHE-GEN-SIM 2018 workflows ] # note: INPUT commands to be added once GEN-SIM w/ 13TeV+PostLS1Geo will be available @@ -1576,6 +1576,8 @@ def lhegensim2018ml(fragment,howMuch): } step2Upg2015Defaults50ns = merge([{'-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@relval50ns','--conditions':'auto:run2_mc_50ns','--era':'Run2_50ns'},step2Upg2015Defaults]) +step2Upg2015DefaultsAPVSimu = merge([{'--customise': 'SimTracker/SiStripDigitizer/customizeSiStripAPVDynamicGainSimulation.activateSiStripAPVDynamicGain'},step2Upg2015Defaults]) + #for 2017 step2Upg2017Defaults = {'-s' :'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@relval2017', '--conditions' :'auto:phase1_2017_realistic', @@ -1598,8 +1600,12 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIUP15']=merge([step2Upg2015Defaults]) +steps['DIGIUP15APVSimu']=merge([{'--customise': 'SimTracker/SiStripDigitizer/customizeSiStripAPVDynamicGainSimulation.activateSiStripAPVDynamicGain'},step2Upg2015Defaults]) + steps['DIGIUP15PROD1']=merge([{'-s':'DIGI,L1,DIGI2RAW,HLT:@relval2016','--eventcontent':'RAWSIM','--datatier':'GEN-SIM-RAW'},step2Upg2015Defaults]) steps['DIGIUP15_PU25']=merge([PU25,step2Upg2015Defaults]) +steps['DIGIUP15APVSimu_PU25']=merge([PU25,step2Upg2015DefaultsAPVSimu]) + steps['DIGIUP15_PU50']=merge([PU50,step2Upg2015Defaults50ns]) steps['DIGIUP17']=merge([step2Upg2017Defaults]) steps['DIGIUP18']=merge([step2Upg2018Defaults]) @@ -1659,6 +1665,7 @@ def lhegensim2018ml(fragment,howMuch): '--procModifiers':'premix_stage1', '--era' : 'Run2_2016' # temporary replacement for premix; to be brought back to customisePostLS1 *EDIT - This comment possibly no longer relevant with switch to eras } + premixUp2015Defaults50ns = merge([{'--conditions':'auto:run2_mc_50ns'}, {'--era':'Run2_50ns'}, premixUp2015Defaults]) @@ -1731,15 +1738,15 @@ def lhegensim2018ml(fragment,howMuch): digiPremixLocalPileupUp2018Defaults25ns = merge([digiPremixLocalPileup, digiPremixUp2018Defaults25ns]) - steps['DIGIPRMXUP15_PU25']=merge([digiPremixUp2015Defaults25ns]) +steps['DIGIPRMXUP15APVSimu_PU25']=merge([{'--customise': 'SimTracker/SiStripDigitizer/customizeSiStripAPVDynamicGainSimulation.activateSiStripAPVDynamicGain'},digiPremixUp2015Defaults25ns]) steps['DIGIPRMXLOCALUP15_PU25']=merge([digiPremixLocalPileupUp2015Defaults25ns]) +steps['DIGIPRMXLOCALUP15APVSimu_PU25']=merge([{'--customise': 'SimTracker/SiStripDigitizer/customizeSiStripAPVDynamicGainSimulation.activateSiStripAPVDynamicGain'},digiPremixLocalPileupUp2015Defaults25ns]) + steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns]) steps['DIGIPRMXUP17_PU25']=merge([digiPremixUp2017Defaults25ns]) steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { - #'--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC')\"" - '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) )\"" } ]) @@ -1881,7 +1888,7 @@ def lhegensim2018ml(fragment,howMuch): '--datatier':'AOD,DQMIO', '--eventcontent':'AOD,DQM', '--era':'Run2_2018_pp_on_AA', - '--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run2_2018_pp_on_AA', + '--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run2_2018_pp_on_AA', '-n':'10' },steps['RECOHID15']]) @@ -2120,6 +2127,9 @@ def gen2018HiMix(fragment,howMuch): step3_trackingLowPU = { '--era': 'Run2_2016_trackingLowPU' } +step3_trackingMkFit = { + '--customise': 'RecoTracker/MkFit/customizeInitialStepToMkFit.customizeInitialStepToMkFit' +} step3_HIPM = { '--era': 'Run2_2016_HIPM' } @@ -2320,6 +2330,7 @@ def gen2018HiMix(fragment,howMuch): steps['RECOPU1']=merge([PU,steps['RECO']]) steps['RECOPU2']=merge([PU2,steps['RECO']]) steps['RECOUP15_PU25']=merge([PU25,step3Up2015Defaults]) +steps['RECOUP15_PU25_HIPM']=merge([step3_HIPM,steps['RECOUP15_PU25']]) steps['RECOUP15_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TEgamma'},steps['RECOUP15_PU25']]) steps['RECOUP15_PU25_L1TMuDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TMuon'},steps['RECOUP15_PU25']]) steps['RECOUP15_PU50']=merge([PU50,step3Up2015Defaults50ns]) @@ -2339,6 +2350,8 @@ def gen2018HiMix(fragment,howMuch): steps['RECOPRMXUP15_PU25']=merge([ {'--era':'Run2_2016','--procModifiers':'premix_stage2'}, # temporary replacement for premix; to be brought back to customisePostLS1; DataMixer customize for rerouting inputs to mixed data. step3Up2015Defaults]) +steps['RECOPRMXUP15_HIPM_PU25']=merge([step3_HIPM,steps['RECOPRMXUP15_PU25']]) + steps['RECOPRMXUP15_PU50']=merge([ {'--era':'Run2_50ns','--procModifiers':'premix_stage2'}, step3Up2015Defaults50ns]) @@ -2783,6 +2796,7 @@ def gen2018HiMix(fragment,howMuch): steps['HARVESTUP15_PU25_L1TEgDQM']=steps['HARVESTUP15_L1TEgDQM'] steps['HARVESTUP15_PU25_L1TMuDQM']=steps['HARVESTUP15_L1TMuDQM'] + steps['HARVESTUP15_PU50']=merge([{'-s':'HARVESTING:@standardValidationNoHLT+@standardDQMFakeHLT+@miniAODValidation+@miniAODDQM','--era' : 'Run2_50ns'},steps['HARVESTUP15']]) steps['HARVESTUP15_PU50_L1TEgDQM']=merge([{'-s':'HARVESTING:@standardValidationNoHLT+@standardDQMFakeHLT+@miniAODValidation+@miniAODDQM+@L1TEgamma'},steps['HARVESTUP15_PU50']]) steps['HARVESTUP15_PU50_L1TMuDQM']=merge([{'-s':'HARVESTING:@standardValidationNoHLT+@standardDQMFakeHLT+@miniAODValidation+@miniAODDQM+@L1TMuon'},steps['HARVESTUP15_PU50']]) @@ -2979,7 +2993,14 @@ def gen2018HiMix(fragment,howMuch): steps['NANOEDMMC2017_94XMiniAODv2'] = merge([{'--era': 'Run2_2017,run2_nanoAOD_94XMiniAODv2'}, steps['NANOEDMMC2017'] ]) steps['NANOEDMMC2016_80X'] = merge([{'--conditions': 'auto:run2_mc', '--era': 'Run2_2016,run2_miniAOD_80XLegacy'}, steps['NANOEDMMC2017'] ]) steps['NANOEDMMC2018_PROD'] = merge([{'--conditions': 'auto:phase1_2018_realistic', '--era': 'Run2_2018', '--filein':'file:step3_inMINIAODSIM.root'}, stepNanoEDMMCProd ]) - +steps['NANOUP15'] = merge([{ '--conditions':'auto:run2_mc', '--era':'Run2_2016','-n':'10', '--filein':'file:step3_inMINIAODSIM.root','--nThreads':'2'}, stepNanoEDMMCProd ]) +steps['NANOUP15_PU25']=steps['NANOUP15'] +steps['NANOUP17'] = merge([{'--conditions':'auto:phase1_2017_realistic','--era': 'Run2_2017','-n':'10' ,'--filein':'file:step3_inMINIAODSIM.root', '--geometry':'DB:Extended', '--nThreads':'2'}, stepNanoEDMMCProd]) +steps['NANOUP15Had']=merge([{'--filein':'file:step4_inMINIAODSIM.root'},steps['NANOUP15']]) +steps['NANOUP17Had']=merge([{'--filein':'file:step4_inMINIAODSIM.root'},steps['NANOUP17']]) +steps['NANOUP18'] = merge([{'--conditions': 'auto:phase1_2018_realistic', '--era': 'Run2_2018','-n':'10', '--filein':'file:step3_inMINIAODSIM.root', '--nThreads':'2'}, stepNanoEDMMCProd ]) +steps['NANOUP18Had']=merge([{'--filein':'file:step4_inMINIAODSIM.root'},steps['NANOUP18']]) +steps['NANOUP18ml']=merge([concurrentLumis,steps['NANOUP18']]) steps['NANOEDM2017'] = merge([{'--conditions': 'auto:run2_data_relval', '--era': 'Run2_2017'}, stepNanoEDMData ]) steps['NANOEDM2017_94XMiniAODv1'] = merge([{'--era': 'Run2_2017,run2_nanoAOD_94XMiniAODv1'}, steps['NANOEDM2017'] ]) steps['NANOEDM2017_94XMiniAODv2'] = merge([{'--era': 'Run2_2017,run2_nanoAOD_94XMiniAODv2'}, steps['NANOEDM2017'] ]) @@ -3052,9 +3073,9 @@ def gen2018HiMix(fragment,howMuch): defaultDataSets['2026D35']='CMSSW_10_4_0_mtd3-103X_upgrade2023_realistic_v2_2023D35noPU_2-v' defaultDataSets['2026D41']='CMSSW_10_6_0_patch2-106X_upgrade2023_realistic_v3_2023D41noPU-v' -keys=defaultDataSets.keys() -for key in keys: - defaultDataSets[key+'PU']=defaultDataSets[key] +puDataSets = {} +for key, value in defaultDataSets.items(): puDataSets[key+'PU'] = value +defaultDataSets.update(puDataSets) # sometimes v1 won't be used - override it here - the dictionary key is gen fragment + '_' + geometry versionOverrides={'BuMixing_BMuonFilter_forSTEAM_13TeV_TuneCUETP8M1_2017':'2','HSCPstop_M_200_TuneCUETP8M1_13TeV_pythia8_2017':'2','RSGravitonToGammaGamma_kMpl01_M_3000_TuneCUETP8M1_13TeV_pythia8_2017':'2','WprimeToENu_M-2000_TuneCUETP8M1_13TeV-pythia8_2017':'2','DisplacedSUSY_stopToBottom_M_300_1000mm_TuneCUETP8M1_13TeV_pythia8_2017':'2','TenE_E_0_200_pythia8_2017':'2','TenE_E_0_200_pythia8_2017PU':'2', 'TenTau_E_15_500_pythia8_2018':'2','PhotonJet_Pt_10_13TeV_TuneCUETP8M1_2018':'2','Wjet_Pt_80_120_13TeV_TuneCUETP8M1_2018':'2'} @@ -3062,7 +3083,7 @@ def gen2018HiMix(fragment,howMuch): baseDataSetReleaseBetter={} for gen in upgradeFragments: for ds in defaultDataSets: - key=gen[:-4]+'_'+ds + key=gen[:-4]+'_'+ds version='1' if key in versionOverrides: version = versionOverrides[key] @@ -3072,16 +3093,16 @@ def gen2018HiMix(fragment,howMuch): for ds in defaultDataSets: key='MinBias_14TeV_pythia8_TuneCUETP8M1'+'_'+ds name=baseDataSetReleaseBetter[key] - if '2017' in name: - PUDataSets[ds]={'-n':10,'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} - elif '2018' in name: - PUDataSets[ds]={'-n':10,'--pileup':'AVE_50_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} - elif '2021' in name: + if '2017' in ds: + PUDataSets[ds]={'-n':10,'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} + elif '2018' in ds: + PUDataSets[ds]={'-n':10,'--pileup':'AVE_50_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} + elif '2021' in ds: PUDataSets[ds]={'-n':10,'--pileup':'Run3_Flat55To75_PoissonOOTPU','--pileup_input':'das:/RelValMinBias_14TeV/%s/GEN-SIM'%(name,)} - elif 'postLS2' in name: - PUDataSets[ds]={'-n':10,'--pileup':'AVE_50_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} - elif '2026' in name: - PUDataSets[ds]={'-n':10,'--pileup':'AVE_200_BX_25ns','--pileup_input':'das:/RelValMinBias_14TeV/%s/GEN-SIM'%(name,)} + elif 'postLS2' in ds: + PUDataSets[ds]={'-n':10,'--pileup':'AVE_50_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} + elif '2026' in ds: + PUDataSets[ds]={'-n':10,'--pileup':'AVE_200_BX_25ns','--pileup_input':'das:/RelValMinBias_14TeV/%s/GEN-SIM'%(name,)} else: PUDataSets[ds]={'-n':10,'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBias_14TeV/%s/GEN-SIM'%(name,)} @@ -3234,7 +3255,7 @@ def gen2018HiMix(fragment,howMuch): '--datatier':'NANOAODSIM', '-n':'10', '--eventcontent':'NANOEDMAODSIM', - '--filein':'file:step3_inMINIAODSIM.root', + '--filein':'file:step3_inMINIAODSIM.root', '--geometry' : geom } @@ -3272,6 +3293,10 @@ def gen2018HiMix(fragment,howMuch): if 'Reco' in step and upgradeStepDict[step][k]['--era']=='Run2_2017': upgradeStepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingLowPU'}, upgradeStepDict[step][k]]) + for step in upgradeSteps['trackingMkFit']['steps']: + stepName = step + upgradeSteps['trackingMkFit']['suffix'] + if 'Reco' in step: upgradeStepDict[stepName][k] = merge([step3_trackingMkFit, upgradeStepDict[step][k]]) + for step in upgradeSteps['Neutron']['steps']: if 'GenSim' in step: custNew = "SimG4Core/Application/NeutronBGforMuonsXS_cff.customise" diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index e571002b14aff..2e6dd9f0960ab 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -101,7 +101,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? // check with generation experts // - const edm::TimeValue_t eventTimeValue = theEvent->run(); + const edm::TimeValue_t eventTimeValue = theEvent->run(); //---- NB: this is a trick. Since the time dependent MC // will be based on "run" (and lumisection) // to identify the IOV. From a7ea04ff70103b6ac20c6ad74dc2cf8d279085c3 Mon Sep 17 00:00:00 2001 From: amassiro Date: Fri, 18 Oct 2019 19:59:00 +0200 Subject: [PATCH 04/24] code format --- CondCore/EcalPlugins/src/plugin.cc | 2 +- .../interface/EcalLaserAPDPNRatiosMCRcd.h | 4 +- .../interface/EcalSignalGenerator.h | 56 +++++++------------ .../EcalSimAlgos/src/EcalSignalGenerator.cc | 44 +++++++++------ 4 files changed, 50 insertions(+), 56 deletions(-) diff --git a/CondCore/EcalPlugins/src/plugin.cc b/CondCore/EcalPlugins/src/plugin.cc index 9e545bd02c64c..2f373a5c2e126 100644 --- a/CondCore/EcalPlugins/src/plugin.cc +++ b/CondCore/EcalPlugins/src/plugin.cc @@ -173,7 +173,7 @@ REGISTER_PLUGIN(EcalIntercalibErrorsRcd, EcalCondObjectContainer); REGISTER_PLUGIN(EcalADCToGeVConstantRcd, EcalADCToGeVConstant); REGISTER_PLUGIN(EcalLaserAlphasRcd, EcalCondObjectContainer); REGISTER_PLUGIN(EcalLaserAPDPNRatiosRcd, EcalLaserAPDPNRatios); -REGISTER_PLUGIN(EcalLaserAPDPNRatiosMCRcd,EcalLaserAPDPNRatios); +REGISTER_PLUGIN(EcalLaserAPDPNRatiosMCRcd, EcalLaserAPDPNRatios); REGISTER_PLUGIN(EcalLaserAPDPNRatiosRefRcd, EcalCondObjectContainer); REGISTER_PLUGIN(EcalChannelStatusRcd, EcalCondObjectContainer); REGISTER_PLUGIN(EcalPFRecHitThresholdsRcd, EcalCondObjectContainer); diff --git a/CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h b/CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h index f6dc56da322ae..532cebe151124 100644 --- a/CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h +++ b/CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h @@ -4,7 +4,7 @@ // // Package: DataRecord // Class : EcalLaserAPDPNRatiosMCRcd -// +// /**\class EcalLaserAPDPNRatiosMCRcd EcalLaserAPDPNRatiosMCRcd.h CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h * * Description: @@ -14,7 +14,7 @@ * */ // -// Author: +// Author: // Created: Fri Jun 1 12:30:43 CEST 2007 // $Id$ // diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 2e6dd9f0960ab..19a7dd385ce06 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -31,14 +31,11 @@ #include "CondFormats/DataRecord/interface/ESGainRcd.h" #include "DataFormats/Common/interface/Handle.h" - // needed for LC'/LC correction for time dependent MC #include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbService.h" #include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecord.h" #include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h" - - /** Converts digis back into analog signals, to be used * as noise */ @@ -57,7 +54,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { typedef typename ECALDIGITIZERTRAITS::DigiCollection COLLECTION; typedef std::unordered_map CalibCache; - + EcalSignalGenerator() : EcalBaseSignalGenerator() {} EcalSignalGenerator(const edm::InputTag& inputTag, @@ -91,28 +88,27 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_maxEneEB = (agc->getEBValue()) * theDefaultGains[1] * MAXADC * m_EBs25notCont; m_maxEneEE = (agc->getEEValue()) * theDefaultGains[1] * MAXADC * m_EEs25notCont; - //---- // Ecal LaserCorrection Constants for laser correction ratio edm::ESHandle laser; eventSetup->get().get(laser); - + // // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? // check with generation experts // const edm::TimeValue_t eventTimeValue = theEvent->run(); - //---- NB: this is a trick. Since the time dependent MC + //---- NB: this is a trick. Since the time dependent MC // will be based on "run" (and lumisection) // to identify the IOV. - // The "time" defined here as "run" - // will have to match in the generation of the tag + // The "time" defined here as "run" + // will have to match in the generation of the tag // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) // m_iTime = eventTimeValue; - + m_lasercals = laser.product(); - + // // the "prime" is exactly the same as the usual laser service, BUT // it has only 1 IOV, so that effectively you are dividing IOV_n / IOV_0 @@ -123,16 +119,15 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { eventSetup->get().get(laser_prime); // const edm::TimeValue_t eventTimeValue = event.time().value(); m_lasercals_prime = laser_prime.product(); - + //clear the laser cache for each event time // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ m_valueLCCache_LC.clear(); - m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes + m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes //---- - - + //ES eventSetup->get().get(hesgain); eventSetup->get().get(hesMIPToGeV); @@ -176,35 +171,33 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { // check with generation experts // eventTimeValue = theEventPrincipal->run(); - //---- NB: this is a trick. Since the time dependent MC + //---- NB: this is a trick. Since the time dependent MC // will be based on "run" (and lumisection) // to identify the IOV. - // The "time" defined here as "run" - // will have to match in the generation of the tag + // The "time" defined here as "run" + // will have to match in the generation of the tag // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) // - } - else { + } else { std::cout << " theEventPrincipal not defined??? " << std::endl; } m_iTime = eventTimeValue; m_lasercals = laser.product(); // std::cout << " ---> EcalSignalGenerator() : initializeEvent() :: eventTimeValue = " << eventTimeValue << std::endl; - + edm::ESHandle laser_prime; eventSetup->get().get(laser_prime); // const edm::TimeValue_t eventTimeValue = event.time().value(); m_lasercals_prime = laser_prime.product(); - + //clear the laser cache for each event time // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ m_valueLCCache_LC.clear(); - m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes + m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes //---- - - + //ES eventSetup->get().get(hesgain); eventSetup->get().get(hesMIPToGeV); @@ -280,26 +273,19 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { CaloSamples samplesInPE(const DIGI& digi); // have to define this separately for ES - //---- LC that depends with time double findLaserConstant_LC(const DetId& detId) const { - const edm::Timestamp& evtTimeStamp = edm::Timestamp(m_iTime); return (m_lasercals->getLaserCorrection(detId, evtTimeStamp)); - } - - + //---- LC at the beginning of the time (first IOV of the GT == first time) //---- Using the different "tag", the one with "MC": exactly the same function as findLaserConstant_LC but with a different object double findLaserConstant_LC_prime(const DetId& detId) const { - const edm::Timestamp& evtTimeStamp = edm::Timestamp(m_iTime); return (m_lasercals_prime->getLaserCorrection(detId, evtTimeStamp)); - } - - + const std::vector GetGainRatios(const DetId& detid) { std::vector gainRatios(4); // get gain ratios @@ -358,7 +344,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { CalibCache m_valueLCCache_LC_prime; const EcalLaserDbService* m_lasercals; const EcalLaserDbService* m_lasercals_prime; - + double theDefaultGains[NGAINS]; }; diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc index fe055ee32165b..90a722755c08a 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc @@ -40,7 +40,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi // std::cout << " intercal, LSBs, egains " << icalconst << " " << LSB[0] << " " << LSB[1] << " " << gainRatios[0] << " " << gainRatios[1] << " " << Emax << std::endl; CaloSamples result(detId, digi.size()); - + // correction factor for premixed sample: ratio of laser corrections float correction_factor_for_premixed_sample_transparency = 1.0; double value_LC = 1.; @@ -53,7 +53,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi m_valueLCCache_LC.emplace(detId, value_LC); } } - + double value_LC_prime = 1.; if (detId.subdetId() != 3) { auto cache = m_valueLCCache_LC_prime.find(detId); @@ -64,25 +64,30 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi m_valueLCCache_LC_prime.emplace(detId, value_LC_prime); } } - + correction_factor_for_premixed_sample_transparency = value_LC_prime / value_LC; // // LC' / LC (see formula) // - -// std::cout << " EcalSignalGenerator::samplesInPE :: correction_factor_for_premixed_sample_transparency = " << correction_factor_for_premixed_sample_transparency << std::endl; - + + // std::cout << " EcalSignalGenerator::samplesInPE :: correction_factor_for_premixed_sample_transparency = " << correction_factor_for_premixed_sample_transparency << std::endl; + for (int isample = 0; isample < digi.size(); ++isample) { int gainId = digi[isample].gainId(); //int gainId = 1; if (gainId == 1) { - result[isample] = float(digi[isample].adc()) / 1000. / peToA * correction_factor_for_premixed_sample_transparency; // special coding, save low level info + result[isample] = float(digi[isample].adc()) / 1000. / peToA * + correction_factor_for_premixed_sample_transparency; // special coding, save low level info } else if (gainId > 1) { - result[isample] = float(digi[isample].adc()) * LSB[gainId - 1] * icalconst / peToA * correction_factor_for_premixed_sample_transparency; // bet that no pileup hit has an energy over Emax/2 - } // gain = 0 + result[isample] = + float(digi[isample].adc()) * LSB[gainId - 1] * icalconst / peToA * + correction_factor_for_premixed_sample_transparency; // bet that no pileup hit has an energy over Emax/2 + } // gain = 0 else { - result[isample] = float(digi[isample].adc()) * LSB[gainId] * icalconst / peToA * correction_factor_for_premixed_sample_transparency; //not sure we ever get here at gain=0, but hit wil be saturated anyway + result[isample] = + float(digi[isample].adc()) * LSB[gainId] * icalconst / peToA * + correction_factor_for_premixed_sample_transparency; //not sure we ever get here at gain=0, but hit wil be saturated anyway // in EcalCoder.cc it is actually "LSB[3]" -> grrr } @@ -152,7 +157,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi m_valueLCCache_LC.emplace(detId, value_LC); } } - + double value_LC_prime = 1.; if (detId.subdetId() != 3) { auto cache = m_valueLCCache_LC_prime.find(detId); @@ -163,25 +168,28 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi m_valueLCCache_LC_prime.emplace(detId, value_LC_prime); } } - + correction_factor_for_premixed_sample_transparency = value_LC_prime / value_LC; // // LC' / LC (see formula) // - -// std::cout << " EcalSignalGenerator::samplesInPE :: correction_factor_for_premixed_sample_transparency = " << correction_factor_for_premixed_sample_transparency << std::endl; - + + // std::cout << " EcalSignalGenerator::samplesInPE :: correction_factor_for_premixed_sample_transparency = " << correction_factor_for_premixed_sample_transparency << std::endl; + for (int isample = 0; isample < digi.size(); ++isample) { int gainId = digi[isample].gainId(); //int gainId = 1; if (gainId == 1) { - result[isample] = float(digi[isample].adc()) / 1000. / peToA * correction_factor_for_premixed_sample_transparency; // special coding + result[isample] = float(digi[isample].adc()) / 1000. / peToA * + correction_factor_for_premixed_sample_transparency; // special coding } else if (gainId > 1) { - result[isample] = float(digi[isample].adc()) * LSB[gainId - 1] * icalconst / peToA * correction_factor_for_premixed_sample_transparency; + result[isample] = float(digi[isample].adc()) * LSB[gainId - 1] * icalconst / peToA * + correction_factor_for_premixed_sample_transparency; } // gain = 0 else { - result[isample] = float(digi[isample].adc()) * LSB[gainId] * icalconst / peToA * correction_factor_for_premixed_sample_transparency; + result[isample] = float(digi[isample].adc()) * LSB[gainId] * icalconst / peToA * + correction_factor_for_premixed_sample_transparency; } // old version From e0f9f5efb66f01ade636d69136eebb9e5b670302 Mon Sep 17 00:00:00 2001 From: amassiro Date: Mon, 21 Oct 2019 13:09:39 +0200 Subject: [PATCH 05/24] missing file --- .../DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc diff --git a/CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc b/CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc new file mode 100644 index 0000000000000..7a9807925e61f --- /dev/null +++ b/CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc @@ -0,0 +1,16 @@ +// -*- C++ -*- +// +// Package: DataRecord +// Class : EcalLaserAPDPNRatiosMCRcd +// +// Implementation: +// +// +// Author: +// Created: Fri Jun 1 12:30:43 CEST 2019 +// $Id$ + +#include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h" +#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" + +EVENTSETUP_RECORD_REG(EcalLaserAPDPNRatiosMCRcd); From 56ee7ebad476bdfe29d3f10227aa2118f4dcb0d3 Mon Sep 17 00:00:00 2001 From: amassiro Date: Mon, 21 Oct 2019 13:36:26 +0200 Subject: [PATCH 06/24] code check --- CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc b/CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc index 7a9807925e61f..dbc6a354b7983 100644 --- a/CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc +++ b/CondFormats/DataRecord/src/EcalLaserAPDPNRatiosMCRcd.cc @@ -2,11 +2,11 @@ // // Package: DataRecord // Class : EcalLaserAPDPNRatiosMCRcd -// +// // Implementation: // // -// Author: +// Author: // Created: Fri Jun 1 12:30:43 CEST 2019 // $Id$ From 978ae060e34e8bea3469878a0cb00b792507d5e2 Mon Sep 17 00:00:00 2001 From: amassiro Date: Mon, 21 Oct 2019 17:28:43 +0200 Subject: [PATCH 07/24] just configuration cleaning, as per PR comment --- .../PyReleaseValidation/python/relval_steps.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index fbc825fc9486a..671f3dc047ac3 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1745,11 +1745,7 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns]) steps['DIGIPRMXUP17_PU25']=merge([digiPremixUp2017Defaults25ns]) -steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, - { - '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) )\"" - } - ]) +steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) )\"" } ]) steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) @@ -3094,15 +3090,15 @@ def gen2018HiMix(fragment,howMuch): key='MinBias_14TeV_pythia8_TuneCUETP8M1'+'_'+ds name=baseDataSetReleaseBetter[key] if '2017' in ds: - PUDataSets[ds]={'-n':10,'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} + PUDataSets[ds]={'-n':10,'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} elif '2018' in ds: - PUDataSets[ds]={'-n':10,'--pileup':'AVE_50_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} + PUDataSets[ds]={'-n':10,'--pileup':'AVE_50_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} elif '2021' in ds: PUDataSets[ds]={'-n':10,'--pileup':'Run3_Flat55To75_PoissonOOTPU','--pileup_input':'das:/RelValMinBias_14TeV/%s/GEN-SIM'%(name,)} elif 'postLS2' in ds: - PUDataSets[ds]={'-n':10,'--pileup':'AVE_50_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} + PUDataSets[ds]={'-n':10,'--pileup':'AVE_50_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(name,)} elif '2026' in ds: - PUDataSets[ds]={'-n':10,'--pileup':'AVE_200_BX_25ns','--pileup_input':'das:/RelValMinBias_14TeV/%s/GEN-SIM'%(name,)} + PUDataSets[ds]={'-n':10,'--pileup':'AVE_200_BX_25ns','--pileup_input':'das:/RelValMinBias_14TeV/%s/GEN-SIM'%(name,)} else: PUDataSets[ds]={'-n':10,'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBias_14TeV/%s/GEN-SIM'%(name,)} From 1835a55f9c0e8c4c1a2079ce29127c019a532a18 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 22 Oct 2019 09:37:16 +0200 Subject: [PATCH 08/24] fix of forgotten comment cout/edm logger --- SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 19a7dd385ce06..524424d26d039 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -43,6 +43,9 @@ #include #include +#include "FWCore/MessageLogger/interface/MessageLogger.h" + + namespace edm { class ModuleCallingContext; } @@ -179,7 +182,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) // } else { - std::cout << " theEventPrincipal not defined??? " << std::endl; + edm::LogError("EcalSignalGenerator") << " theEventPrincipal not defined??? " << std::endl; } m_iTime = eventTimeValue; m_lasercals = laser.product(); From 5a1eca5a7448c0d7ca7dd1fd4d8702334bf3bf10 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 22 Oct 2019 23:45:25 +0200 Subject: [PATCH 09/24] Addition of flag to trigger time dependent MC on demand --- .../python/relval_steps.py | 2 +- .../interface/EcalSignalGenerator.h | 166 +++++++++--------- .../EcalSimAlgos/src/EcalSignalGenerator.cc | 72 ++++---- .../plugins/PreMixingEcalWorker.cc | 8 +- 4 files changed, 134 insertions(+), 114 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 671f3dc047ac3..1b17bc20202a9 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1745,7 +1745,7 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns]) steps['DIGIPRMXUP17_PU25']=merge([digiPremixUp2017Defaults25ns]) -steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) )\"" } ]) +steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.untracked.bool(True)\"" } ]) steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 524424d26d039..4088562b10480 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -65,7 +65,9 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { const double EBs25notCont, const double EEs25notCont, const double peToABarrel, - const double peToAEndcap) + const double peToAEndcap, + const bool timeDependent = false + ) : EcalBaseSignalGenerator(), theEvent(nullptr), theEventPrincipal(nullptr), theInputTag(inputTag), tok_(t) { EcalMGPAGainRatio* defaultRatios = new EcalMGPAGainRatio(); theDefaultGains[2] = defaultRatios->gain6Over1(); @@ -74,6 +76,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_EEs25notCont = EEs25notCont; m_peToABarrel = peToABarrel; m_peToAEndcap = peToAEndcap; + m_timeDependent = timeDependent; } ~EcalSignalGenerator() override {} @@ -91,46 +94,48 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_maxEneEB = (agc->getEBValue()) * theDefaultGains[1] * MAXADC * m_EBs25notCont; m_maxEneEE = (agc->getEEValue()) * theDefaultGains[1] * MAXADC * m_EEs25notCont; - //---- - // Ecal LaserCorrection Constants for laser correction ratio - edm::ESHandle laser; - eventSetup->get().get(laser); - - // - // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? - // check with generation experts - // - const edm::TimeValue_t eventTimeValue = theEvent->run(); - //---- NB: this is a trick. Since the time dependent MC - // will be based on "run" (and lumisection) - // to identify the IOV. - // The "time" defined here as "run" - // will have to match in the generation of the tag - // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) - // - m_iTime = eventTimeValue; - - m_lasercals = laser.product(); - - // - // the "prime" is exactly the same as the usual laser service, BUT - // it has only 1 IOV, so that effectively you are dividing IOV_n / IOV_0 - // NB: in the creation of the tag make sure the "prime" (MC) tag is prepared properly! - // NB again: if many IOVs also in "MC" tag, then fancy things could be perfomed ... left for the future - // - edm::ESHandle laser_prime; - eventSetup->get().get(laser_prime); - // const edm::TimeValue_t eventTimeValue = event.time().value(); - m_lasercals_prime = laser_prime.product(); - - //clear the laser cache for each event time - // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? - // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ - // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ - m_valueLCCache_LC.clear(); - m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes - //---- - + if (m_timeDependent) { + //---- + // Ecal LaserCorrection Constants for laser correction ratio + edm::ESHandle laser; + eventSetup->get().get(laser); + + // + // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? + // check with generation experts + // + const edm::TimeValue_t eventTimeValue = theEvent->run(); + //---- NB: this is a trick. Since the time dependent MC + // will be based on "run" (and lumisection) + // to identify the IOV. + // The "time" defined here as "run" + // will have to match in the generation of the tag + // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) + // + m_iTime = eventTimeValue; + + m_lasercals = laser.product(); + + // + // the "prime" is exactly the same as the usual laser service, BUT + // it has only 1 IOV, so that effectively you are dividing IOV_n / IOV_0 + // NB: in the creation of the tag make sure the "prime" (MC) tag is prepared properly! + // NB again: if many IOVs also in "MC" tag, then fancy things could be perfomed ... left for the future + // + edm::ESHandle laser_prime; + eventSetup->get().get(laser_prime); + // const edm::TimeValue_t eventTimeValue = event.time().value(); + m_lasercals_prime = laser_prime.product(); + + //clear the laser cache for each event time + // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? + // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ + // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ + m_valueLCCache_LC.clear(); + m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes + //---- + } + //ES eventSetup->get().get(hesgain); eventSetup->get().get(hesMIPToGeV); @@ -162,45 +167,47 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_maxEneEB = (agc->getEBValue()) * theDefaultGains[1] * MAXADC * m_EBs25notCont; m_maxEneEE = (agc->getEEValue()) * theDefaultGains[1] * MAXADC * m_EEs25notCont; - //---- - // Ecal LaserCorrection Constants for laser correction ratio - edm::ESHandle laser; - eventSetup->get().get(laser); - edm::TimeValue_t eventTimeValue = 0; - if (theEventPrincipal) { - // eventTimeValue = theEventPrincipal->time().value(); - // - // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? - // check with generation experts - // - eventTimeValue = theEventPrincipal->run(); - //---- NB: this is a trick. Since the time dependent MC - // will be based on "run" (and lumisection) - // to identify the IOV. - // The "time" defined here as "run" - // will have to match in the generation of the tag - // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) - // - } else { - edm::LogError("EcalSignalGenerator") << " theEventPrincipal not defined??? " << std::endl; + if (m_timeDependent) { + //---- + // Ecal LaserCorrection Constants for laser correction ratio + edm::ESHandle laser; + eventSetup->get().get(laser); + edm::TimeValue_t eventTimeValue = 0; + if (theEventPrincipal) { + // eventTimeValue = theEventPrincipal->time().value(); + // + // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? + // check with generation experts + // + eventTimeValue = theEventPrincipal->run(); + //---- NB: this is a trick. Since the time dependent MC + // will be based on "run" (and lumisection) + // to identify the IOV. + // The "time" defined here as "run" + // will have to match in the generation of the tag + // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) + // + } else { + edm::LogError("EcalSignalGenerator") << " theEventPrincipal not defined??? " << std::endl; + } + m_iTime = eventTimeValue; + m_lasercals = laser.product(); + // std::cout << " ---> EcalSignalGenerator() : initializeEvent() :: eventTimeValue = " << eventTimeValue << std::endl; + + edm::ESHandle laser_prime; + eventSetup->get().get(laser_prime); + // const edm::TimeValue_t eventTimeValue = event.time().value(); + m_lasercals_prime = laser_prime.product(); + + //clear the laser cache for each event time + // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? + // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ + // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ + m_valueLCCache_LC.clear(); + m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes + //---- } - m_iTime = eventTimeValue; - m_lasercals = laser.product(); - // std::cout << " ---> EcalSignalGenerator() : initializeEvent() :: eventTimeValue = " << eventTimeValue << std::endl; - - edm::ESHandle laser_prime; - eventSetup->get().get(laser_prime); - // const edm::TimeValue_t eventTimeValue = event.time().value(); - m_lasercals_prime = laser_prime.product(); - - //clear the laser cache for each event time - // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? - // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ - // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ - m_valueLCCache_LC.clear(); - m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes - //---- - + //ES eventSetup->get().get(hesgain); eventSetup->get().get(hesMIPToGeV); @@ -342,6 +349,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { const EcalADCToGeVConstant* agc; const EcalIntercalibConstantsMC* ical; + bool m_timeDependent; edm::TimeValue_t m_iTime; CalibCache m_valueLCCache_LC; CalibCache m_valueLCCache_LC_prime; diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc index 90a722755c08a..0adbb2d60f104 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc @@ -44,24 +44,29 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi // correction factor for premixed sample: ratio of laser corrections float correction_factor_for_premixed_sample_transparency = 1.0; double value_LC = 1.; - if (detId.subdetId() != 3) { - auto cache = m_valueLCCache_LC.find(detId); - if (cache != m_valueLCCache_LC.end()) { - value_LC = cache->second; - } else { - value_LC = findLaserConstant_LC(detId); - m_valueLCCache_LC.emplace(detId, value_LC); + if (m_timeDependent) { + if (detId.subdetId() != 3) { + auto cache = m_valueLCCache_LC.find(detId); + if (cache != m_valueLCCache_LC.end()) { + value_LC = cache->second; + } else { + value_LC = findLaserConstant_LC(detId); + m_valueLCCache_LC.emplace(detId, value_LC); + } } } - + double value_LC_prime = 1.; - if (detId.subdetId() != 3) { - auto cache = m_valueLCCache_LC_prime.find(detId); - if (cache != m_valueLCCache_LC_prime.end()) { - value_LC_prime = cache->second; - } else { - value_LC_prime = findLaserConstant_LC_prime(detId); - m_valueLCCache_LC_prime.emplace(detId, value_LC_prime); + + if (m_timeDependent) { + if (detId.subdetId() != 3) { + auto cache = m_valueLCCache_LC_prime.find(detId); + if (cache != m_valueLCCache_LC_prime.end()) { + value_LC_prime = cache->second; + } else { + value_LC_prime = findLaserConstant_LC_prime(detId); + m_valueLCCache_LC_prime.emplace(detId, value_LC_prime); + } } } @@ -148,27 +153,32 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi // correction facotr for premixed sample: ratio of laser corrections float correction_factor_for_premixed_sample_transparency = 1.0; double value_LC = 1.; - if (detId.subdetId() != 3) { - auto cache = m_valueLCCache_LC.find(detId); - if (cache != m_valueLCCache_LC.end()) { - value_LC = cache->second; - } else { - value_LC = findLaserConstant_LC(detId); - m_valueLCCache_LC.emplace(detId, value_LC); + + if (m_timeDependent) { + if (detId.subdetId() != 3) { + auto cache = m_valueLCCache_LC.find(detId); + if (cache != m_valueLCCache_LC.end()) { + value_LC = cache->second; + } else { + value_LC = findLaserConstant_LC(detId); + m_valueLCCache_LC.emplace(detId, value_LC); + } } } - + double value_LC_prime = 1.; - if (detId.subdetId() != 3) { - auto cache = m_valueLCCache_LC_prime.find(detId); - if (cache != m_valueLCCache_LC_prime.end()) { - value_LC_prime = cache->second; - } else { - value_LC_prime = findLaserConstant_LC_prime(detId); - m_valueLCCache_LC_prime.emplace(detId, value_LC_prime); + if (m_timeDependent) { + if (detId.subdetId() != 3) { + auto cache = m_valueLCCache_LC_prime.find(detId); + if (cache != m_valueLCCache_LC_prime.end()) { + value_LC_prime = cache->second; + } else { + value_LC_prime = findLaserConstant_LC_prime(detId); + m_valueLCCache_LC_prime.emplace(detId, value_LC_prime); + } } } - + correction_factor_for_premixed_sample_transparency = value_LC_prime / value_LC; // // LC' / LC (see formula) diff --git a/SimCalorimetry/EcalSimProducers/plugins/PreMixingEcalWorker.cc b/SimCalorimetry/EcalSimProducers/plugins/PreMixingEcalWorker.cc index ec0a922d0ecc7..a03f321562e48 100644 --- a/SimCalorimetry/EcalSimProducers/plugins/PreMixingEcalWorker.cc +++ b/SimCalorimetry/EcalSimProducers/plugins/PreMixingEcalWorker.cc @@ -49,7 +49,8 @@ class PreMixingEcalWorker : public PreMixingWorker { const double m_EEs25notCont; const double m_peToABarrel; const double m_peToAEndcap; - + const bool m_timeDependent; + EBSignalGenerator theEBSignalGenerator; EESignalGenerator theEESignalGenerator; ESSignalGenerator theESSignalGenerator; @@ -70,8 +71,9 @@ PreMixingEcalWorker::PreMixingEcalWorker(const edm::ParameterSet &ps, m_EEs25notCont(ps.getParameter("EEs25notContainment")), m_peToABarrel(ps.getParameter("photoelectronsToAnalogBarrel")), m_peToAEndcap(ps.getParameter("photoelectronsToAnalogEndcap")), - theEBSignalGenerator(EBPileInputTag_, tok_eb_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap), - theEESignalGenerator(EEPileInputTag_, tok_ee_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap), + m_timeDependent(ps.getUntrackedParameter("timeDependent", false)), + theEBSignalGenerator(EBPileInputTag_, tok_eb_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap, m_timeDependent), + theEESignalGenerator(EEPileInputTag_, tok_ee_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap, m_timeDependent), theESSignalGenerator(ESPileInputTag_, tok_es_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap), myEcalDigitizer_(ps, iC) { EBDigiCollectionDM_ = ps.getParameter("EBDigiCollectionDM"); From 22c10ca168e5456dfbf31c7bdfde33cabe505479 Mon Sep 17 00:00:00 2001 From: amassiro Date: Wed, 23 Oct 2019 10:45:25 +0200 Subject: [PATCH 10/24] from untracked to tracked and code-check --- .../python/relval_steps.py | 2 +- .../interface/EcalSignalGenerator.h | 20 +++++++++---------- .../EcalSimAlgos/src/EcalSignalGenerator.cc | 10 +++++----- .../plugins/PreMixingEcalWorker.cc | 10 ++++++---- .../python/ecalSimParameterMap_cff.py | 3 ++- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 1b17bc20202a9..5ab8a2dd50e09 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1745,7 +1745,7 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns]) steps['DIGIPRMXUP17_PU25']=merge([digiPremixUp2017Defaults25ns]) -steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.untracked.bool(True)\"" } ]) +steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True)\"" } ]) steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 4088562b10480..9042e0cefd94e 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -45,7 +45,6 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" - namespace edm { class ModuleCallingContext; } @@ -66,8 +65,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { const double EEs25notCont, const double peToABarrel, const double peToAEndcap, - const bool timeDependent = false - ) + const bool timeDependent = false) : EcalBaseSignalGenerator(), theEvent(nullptr), theEventPrincipal(nullptr), theInputTag(inputTag), tok_(t) { EcalMGPAGainRatio* defaultRatios = new EcalMGPAGainRatio(); theDefaultGains[2] = defaultRatios->gain6Over1(); @@ -99,7 +97,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { // Ecal LaserCorrection Constants for laser correction ratio edm::ESHandle laser; eventSetup->get().get(laser); - + // // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? // check with generation experts @@ -113,9 +111,9 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) // m_iTime = eventTimeValue; - + m_lasercals = laser.product(); - + // // the "prime" is exactly the same as the usual laser service, BUT // it has only 1 IOV, so that effectively you are dividing IOV_n / IOV_0 @@ -126,7 +124,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { eventSetup->get().get(laser_prime); // const edm::TimeValue_t eventTimeValue = event.time().value(); m_lasercals_prime = laser_prime.product(); - + //clear the laser cache for each event time // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ @@ -135,7 +133,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes //---- } - + //ES eventSetup->get().get(hesgain); eventSetup->get().get(hesMIPToGeV); @@ -193,12 +191,12 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_iTime = eventTimeValue; m_lasercals = laser.product(); // std::cout << " ---> EcalSignalGenerator() : initializeEvent() :: eventTimeValue = " << eventTimeValue << std::endl; - + edm::ESHandle laser_prime; eventSetup->get().get(laser_prime); // const edm::TimeValue_t eventTimeValue = event.time().value(); m_lasercals_prime = laser_prime.product(); - + //clear the laser cache for each event time // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ @@ -207,7 +205,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes //---- } - + //ES eventSetup->get().get(hesgain); eventSetup->get().get(hesMIPToGeV); diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc index 0adbb2d60f104..8ff99e7b424e2 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc @@ -55,9 +55,9 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi } } } - + double value_LC_prime = 1.; - + if (m_timeDependent) { if (detId.subdetId() != 3) { auto cache = m_valueLCCache_LC_prime.find(detId); @@ -153,7 +153,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi // correction facotr for premixed sample: ratio of laser corrections float correction_factor_for_premixed_sample_transparency = 1.0; double value_LC = 1.; - + if (m_timeDependent) { if (detId.subdetId() != 3) { auto cache = m_valueLCCache_LC.find(detId); @@ -165,7 +165,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi } } } - + double value_LC_prime = 1.; if (m_timeDependent) { if (detId.subdetId() != 3) { @@ -178,7 +178,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi } } } - + correction_factor_for_premixed_sample_transparency = value_LC_prime / value_LC; // // LC' / LC (see formula) diff --git a/SimCalorimetry/EcalSimProducers/plugins/PreMixingEcalWorker.cc b/SimCalorimetry/EcalSimProducers/plugins/PreMixingEcalWorker.cc index a03f321562e48..537bbaa2860a1 100644 --- a/SimCalorimetry/EcalSimProducers/plugins/PreMixingEcalWorker.cc +++ b/SimCalorimetry/EcalSimProducers/plugins/PreMixingEcalWorker.cc @@ -50,7 +50,7 @@ class PreMixingEcalWorker : public PreMixingWorker { const double m_peToABarrel; const double m_peToAEndcap; const bool m_timeDependent; - + EBSignalGenerator theEBSignalGenerator; EESignalGenerator theEESignalGenerator; ESSignalGenerator theESSignalGenerator; @@ -71,9 +71,11 @@ PreMixingEcalWorker::PreMixingEcalWorker(const edm::ParameterSet &ps, m_EEs25notCont(ps.getParameter("EEs25notContainment")), m_peToABarrel(ps.getParameter("photoelectronsToAnalogBarrel")), m_peToAEndcap(ps.getParameter("photoelectronsToAnalogEndcap")), - m_timeDependent(ps.getUntrackedParameter("timeDependent", false)), - theEBSignalGenerator(EBPileInputTag_, tok_eb_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap, m_timeDependent), - theEESignalGenerator(EEPileInputTag_, tok_ee_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap, m_timeDependent), + m_timeDependent(ps.getParameter("timeDependent")), + theEBSignalGenerator( + EBPileInputTag_, tok_eb_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap, m_timeDependent), + theEESignalGenerator( + EEPileInputTag_, tok_ee_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap, m_timeDependent), theESSignalGenerator(ESPileInputTag_, tok_es_, m_EBs25notCont, m_EEs25notCont, m_peToABarrel, m_peToAEndcap), myEcalDigitizer_(ps, iC) { EBDigiCollectionDM_ = ps.getParameter("EBDigiCollectionDM"); diff --git a/SimCalorimetry/EcalSimProducers/python/ecalSimParameterMap_cff.py b/SimCalorimetry/EcalSimProducers/python/ecalSimParameterMap_cff.py index c86714955669d..e265e6ea80c6c 100644 --- a/SimCalorimetry/EcalSimProducers/python/ecalSimParameterMap_cff.py +++ b/SimCalorimetry/EcalSimProducers/python/ecalSimParameterMap_cff.py @@ -10,6 +10,7 @@ simHitToPhotoelectronsBarrel = cms.double(2250.0), syncPhase = cms.bool(True), doPhotostatistics = cms.bool(True), - photoelectronsToAnalogBarrel = cms.double(0.000444444) + photoelectronsToAnalogBarrel = cms.double(0.000444444), + timeDependent = cms.bool(False) ) From 3f00eb498b772a1a1f5936753f25c547711921d6 Mon Sep 17 00:00:00 2001 From: amassiro Date: Wed, 23 Oct 2019 19:38:37 +0200 Subject: [PATCH 11/24] new workflow for 2018 and time dependent MC --- Configuration/PyReleaseValidation/python/relval_premix.py | 1 + Configuration/PyReleaseValidation/python/relval_steps.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/relval_premix.py b/Configuration/PyReleaseValidation/python/relval_premix.py index 99c501a353849..f0c0903915912 100644 --- a/Configuration/PyReleaseValidation/python/relval_premix.py +++ b/Configuration/PyReleaseValidation/python/relval_premix.py @@ -47,6 +47,7 @@ workflows[250200.18]=['',['ZEE_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25_L1TEgDQM','HARVESTUP18_PU25_L1TEgDQM']] workflows[250202.18]=['',['TTbar_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.181]=['',['TTbar_13UP18','PREMIXUP18_PU25','DIGIPRMXLOCALUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] +workflows[250202.182]=['',['TTbar_13UP18','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250203.18]=['',['H125GGgluonfusion_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250204.18]=['',['QQH1352T_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250205.18]=['',['ZTT_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 5ab8a2dd50e09..4dfa048b32673 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1746,9 +1746,9 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns]) steps['DIGIPRMXUP17_PU25']=merge([digiPremixUp2017Defaults25ns]) steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True)\"" } ]) - steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) +steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2018_mc_3sigma_v2'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True)\"" } ]) steps['DIGIPRMXLOCALUP18_PU25']=merge([digiPremixLocalPileupUp2018Defaults25ns]) premixProd25ns = {'-s' : 'DIGI,DATAMIX,L1,DIGI2RAW,HLT:@relval2016', From 47062b0c4301913fb2c5d22973510a8ed5118bd5 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 29 Oct 2019 15:15:31 +0100 Subject: [PATCH 12/24] suggestions during PR implemented. Mainly commented code removed, a swap vs clear change, and use of EcalPreshower enum --- .../interface/EcalLaserDbRecordMC.h | 3 --- .../plugins/EcalLaserCorrectionServiceMC.cc | 16 ++------------- .../interface/EcalSignalGenerator.h | 20 ++++++------------- .../EcalSimAlgos/src/EcalSignalGenerator.cc | 12 ++++------- 4 files changed, 12 insertions(+), 39 deletions(-) diff --git a/CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h b/CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h index cc1dddf76054a..73375c6f2e4ba 100644 --- a/CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h +++ b/CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecordMC.h @@ -7,15 +7,12 @@ #include "boost/mpl/vector.hpp" #include "FWCore/Framework/interface/DependentRecordImplementation.h" -// #include "FWCore/Framework/interface/EventSetupRecordImplementation.h" #include "CondFormats/DataRecord/interface/EcalLaserAlphasRcd.h" #include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRefRcd.h" #include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosMCRcd.h" #include "CondFormats/DataRecord/interface/EcalLinearCorrectionsRcd.h" -// class EcalLaserDbRecordMC : public edm::eventsetup::EventSetupRecordImplementation {}; - class EcalLaserDbRecordMC : public edm::eventsetup::DependentRecordImplementation apdpnToken_; edm::ESGetToken linearToken_; - // std::vector mDumpRequest; - // std::ostream* mDumpStream; }; EcalLaserCorrectionServiceMC::EcalLaserCorrectionServiceMC(const edm::ParameterSet& fConfig) : ESProducer() -// mDumpRequest (), -// mDumpStream(0) { - //the following line is needed to tell the framework what + // the following line is needed to tell the framework what // data is being produced - // setWhatProduced (this, (dependsOn (&EcalLaserCorrectionServiceMC::apdpnCallback))); + // setWhatProduced (this, (dependsOn (&EcalLaserCorrectionServiceMC::apdpnCallback))); setWhatProduced(this) .setConsumes(alphaToken_) @@ -65,17 +61,9 @@ EcalLaserCorrectionServiceMC::EcalLaserCorrectionServiceMC(const edm::ParameterS //now do what ever other initialization is needed - // mDumpRequest = fConfig.getUntrackedParameter > ("dump", std::vector()); - // if (!mDumpRequest.empty()) { - // std::string otputFile = fConfig.getUntrackedParameter ("file", ""); - // mDumpStream = otputFile.empty () ? &std::cout : new std::ofstream (otputFile.c_str()); - // } } EcalLaserCorrectionServiceMC::~EcalLaserCorrectionServiceMC() { - // do anything here that needs to be done at desctruction time - // (e.g. close files, deallocate resources etc.) - // if (mDumpStream != &std::cout) delete mDumpStream; } // diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 9042e0cefd94e..6f2f1cbb44a3c 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -122,15 +122,12 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { // edm::ESHandle laser_prime; eventSetup->get().get(laser_prime); - // const edm::TimeValue_t eventTimeValue = event.time().value(); m_lasercals_prime = laser_prime.product(); - //clear the laser cache for each event time - // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? - // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ - // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ - m_valueLCCache_LC.clear(); - m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes + //clear the laser cache for each event time + CalibCache().swap(m_valueLCCache_LC); + CalibCache().swap(m_valueLCCache_LC_prime); //--- also the "prime" ... yes + //---- } @@ -190,19 +187,14 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { } m_iTime = eventTimeValue; m_lasercals = laser.product(); - // std::cout << " ---> EcalSignalGenerator() : initializeEvent() :: eventTimeValue = " << eventTimeValue << std::endl; edm::ESHandle laser_prime; eventSetup->get().get(laser_prime); - // const edm::TimeValue_t eventTimeValue = event.time().value(); m_lasercals_prime = laser_prime.product(); //clear the laser cache for each event time - // CalibCache().swap(m_valueLCCache_LC); -> strange way to clear a collection ... why was it like this? - // http://www.cplusplus.com/reference/unordered_map/unordered_map/clear/ - // http://www.cplusplus.com/reference/unordered_map/unordered_map/swap/ - m_valueLCCache_LC.clear(); - m_valueLCCache_LC_prime.clear(); //--- also the "prime" ... yes + CalibCache().swap(m_valueLCCache_LC); + CalibCache().swap(m_valueLCCache_LC_prime); //--- also the "prime" ... yes //---- } diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc index 8ff99e7b424e2..67fddb3b41040 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc @@ -45,7 +45,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi float correction_factor_for_premixed_sample_transparency = 1.0; double value_LC = 1.; if (m_timeDependent) { - if (detId.subdetId() != 3) { + if (detId.subdetId() != EcalSubdetector::EcalPreshower) { auto cache = m_valueLCCache_LC.find(detId); if (cache != m_valueLCCache_LC.end()) { value_LC = cache->second; @@ -59,7 +59,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi double value_LC_prime = 1.; if (m_timeDependent) { - if (detId.subdetId() != 3) { + if (detId.subdetId() != EcalSubdetector::EcalPreshower) { auto cache = m_valueLCCache_LC_prime.find(detId); if (cache != m_valueLCCache_LC_prime.end()) { value_LC_prime = cache->second; @@ -75,8 +75,6 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi // LC' / LC (see formula) // - // std::cout << " EcalSignalGenerator::samplesInPE :: correction_factor_for_premixed_sample_transparency = " << correction_factor_for_premixed_sample_transparency << std::endl; - for (int isample = 0; isample < digi.size(); ++isample) { int gainId = digi[isample].gainId(); //int gainId = 1; @@ -155,7 +153,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi double value_LC = 1.; if (m_timeDependent) { - if (detId.subdetId() != 3) { + if (detId.subdetId() != EcalSubdetector::EcalPreshower) { auto cache = m_valueLCCache_LC.find(detId); if (cache != m_valueLCCache_LC.end()) { value_LC = cache->second; @@ -168,7 +166,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi double value_LC_prime = 1.; if (m_timeDependent) { - if (detId.subdetId() != 3) { + if (detId.subdetId() != EcalSubdetector::EcalPreshower) { auto cache = m_valueLCCache_LC_prime.find(detId); if (cache != m_valueLCCache_LC_prime.end()) { value_LC_prime = cache->second; @@ -184,8 +182,6 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi // LC' / LC (see formula) // - // std::cout << " EcalSignalGenerator::samplesInPE :: correction_factor_for_premixed_sample_transparency = " << correction_factor_for_premixed_sample_transparency << std::endl; - for (int isample = 0; isample < digi.size(); ++isample) { int gainId = digi[isample].gainId(); //int gainId = 1; From 658f29daca6ed9826d6eb9d7fc8df7056e68db63 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 29 Oct 2019 16:23:15 +0100 Subject: [PATCH 13/24] code format --- .../plugins/EcalLaserCorrectionServiceMC.cc | 9 ++------- .../EcalSimAlgos/interface/EcalSignalGenerator.h | 8 ++++---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionServiceMC.cc b/CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionServiceMC.cc index cb1a58ec01e97..1308aa9a992c3 100644 --- a/CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionServiceMC.cc +++ b/CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionServiceMC.cc @@ -43,12 +43,9 @@ class EcalLaserCorrectionServiceMC : public edm::ESProducer { edm::ESGetToken apdpnRefToken_; edm::ESGetToken apdpnToken_; edm::ESGetToken linearToken_; - }; -EcalLaserCorrectionServiceMC::EcalLaserCorrectionServiceMC(const edm::ParameterSet& fConfig) - : ESProducer() -{ +EcalLaserCorrectionServiceMC::EcalLaserCorrectionServiceMC(const edm::ParameterSet& fConfig) : ESProducer() { // the following line is needed to tell the framework what // data is being produced // setWhatProduced (this, (dependsOn (&EcalLaserCorrectionServiceMC::apdpnCallback))); @@ -60,11 +57,9 @@ EcalLaserCorrectionServiceMC::EcalLaserCorrectionServiceMC(const edm::ParameterS .setConsumes(linearToken_); //now do what ever other initialization is needed - } -EcalLaserCorrectionServiceMC::~EcalLaserCorrectionServiceMC() { -} +EcalLaserCorrectionServiceMC::~EcalLaserCorrectionServiceMC() {} // // member functions diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 6f2f1cbb44a3c..9500f81f8336d 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -124,10 +124,10 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { eventSetup->get().get(laser_prime); m_lasercals_prime = laser_prime.product(); - //clear the laser cache for each event time + //clear the laser cache for each event time CalibCache().swap(m_valueLCCache_LC); - CalibCache().swap(m_valueLCCache_LC_prime); //--- also the "prime" ... yes - + CalibCache().swap(m_valueLCCache_LC_prime); //--- also the "prime" ... yes + //---- } @@ -194,7 +194,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { //clear the laser cache for each event time CalibCache().swap(m_valueLCCache_LC); - CalibCache().swap(m_valueLCCache_LC_prime); //--- also the "prime" ... yes + CalibCache().swap(m_valueLCCache_LC_prime); //--- also the "prime" ... yes //---- } From c8ab979069631546342fdea265d7df79c8508afc Mon Sep 17 00:00:00 2001 From: amassiro Date: Mon, 4 Nov 2019 14:05:02 +0100 Subject: [PATCH 14/24] double to float, as per PR suggestion --- SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc index 67fddb3b41040..d7a35d910c1e0 100644 --- a/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc +++ b/SimCalorimetry/EcalSimAlgos/src/EcalSignalGenerator.cc @@ -42,7 +42,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi CaloSamples result(detId, digi.size()); // correction factor for premixed sample: ratio of laser corrections - float correction_factor_for_premixed_sample_transparency = 1.0; + double correction_factor_for_premixed_sample_transparency = 1.0; double value_LC = 1.; if (m_timeDependent) { if (detId.subdetId() != EcalSubdetector::EcalPreshower) { @@ -149,7 +149,7 @@ CaloSamples EcalSignalGenerator::samplesInPE(const DIGI &digi CaloSamples result(detId, digi.size()); // correction facotr for premixed sample: ratio of laser corrections - float correction_factor_for_premixed_sample_transparency = 1.0; + double correction_factor_for_premixed_sample_transparency = 1.0; double value_LC = 1.; if (m_timeDependent) { From b68e88b349ef8808b96db4a02e6c731c284069e5 Mon Sep 17 00:00:00 2001 From: amassiro Date: Fri, 8 Nov 2019 22:48:39 +0100 Subject: [PATCH 15/24] fix of usage of time and run number --- .../interface/EcalSignalGenerator.h | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 9500f81f8336d..f749e6b548ee0 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -6,6 +6,8 @@ #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventPrincipal.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/RunPrincipal.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "DataFormats/EcalDetId/interface/EEDetId.h" #include "DataFormats/EcalDetId/interface/ESDetId.h" @@ -99,15 +101,9 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { eventSetup->get().get(laser); // - // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? - // check with generation experts + const edm::TimeValue_t eventTimeValue = theEvent->getRun().runAuxiliary().beginTime().value(); // - const edm::TimeValue_t eventTimeValue = theEvent->run(); - //---- NB: this is a trick. Since the time dependent MC - // will be based on "run" (and lumisection) - // to identify the IOV. - // The "time" defined here as "run" - // will have to match in the generation of the tag + // The "time" will have to match in the generation of the tag // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) // m_iTime = eventTimeValue; @@ -169,17 +165,10 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { eventSetup->get().get(laser); edm::TimeValue_t eventTimeValue = 0; if (theEventPrincipal) { - // eventTimeValue = theEventPrincipal->time().value(); // - // FIXME: is this workaround of using "run" really needed or "time" can be used in MC generation as well? - // check with generation experts + eventTimeValue = theEventPrincipal->runPrincipal().beginTime().value(); // - eventTimeValue = theEventPrincipal->run(); - //---- NB: this is a trick. Since the time dependent MC - // will be based on "run" (and lumisection) - // to identify the IOV. - // The "time" defined here as "run" - // will have to match in the generation of the tag + // The "time" will have to match in the generation of the tag // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) // } else { From 7d89f4d3f0c521ac8337867424cd0089451b9775 Mon Sep 17 00:00:00 2001 From: amassiro Date: Fri, 8 Nov 2019 23:28:31 +0100 Subject: [PATCH 16/24] code format --- SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index f749e6b548ee0..c6ea2e46708a8 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -101,7 +101,7 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { eventSetup->get().get(laser); // - const edm::TimeValue_t eventTimeValue = theEvent->getRun().runAuxiliary().beginTime().value(); + const edm::TimeValue_t eventTimeValue = theEvent->getRun().runAuxiliary().beginTime().value(); // // The "time" will have to match in the generation of the tag // for the MC from ECAL (apd/pn, alpha, whatever time dependent is needed) From 609c4244445c57e99839b5afad12baaecac5b996 Mon Sep 17 00:00:00 2001 From: amassiro Date: Mon, 18 Nov 2019 22:25:04 +0100 Subject: [PATCH 17/24] new workflow for time dependent conditions, 250202.183 --- .../python/relval_premix.py | 1 + .../python/relval_steps.py | 37 ++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/relval_premix.py b/Configuration/PyReleaseValidation/python/relval_premix.py index f0c0903915912..20dd6ea5e67d2 100644 --- a/Configuration/PyReleaseValidation/python/relval_premix.py +++ b/Configuration/PyReleaseValidation/python/relval_premix.py @@ -48,6 +48,7 @@ workflows[250202.18]=['',['TTbar_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.181]=['',['TTbar_13UP18','PREMIXUP18_PU25','DIGIPRMXLOCALUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.182]=['',['TTbar_13UP18','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] +workflows[250202.183]=['',['TTbar_13UP18_RD','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25']] workflows[250203.18]=['',['H125GGgluonfusion_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250204.18]=['',['QQH1352T_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250205.18]=['',['ZTT_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 4dfa048b32673..ecef829ec792a 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -587,6 +587,12 @@ def gen2018hiprod(fragment,howMuch): ### 2017 wf: only the ones for premixing (for the moment) steps['NuGun_UP17']=gen2017('SingleNuE10_cfi.py',Kby(9,50)) steps['TTbar_13UP17']=gen2017('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) + +# +# Add the run dependent +# + + steps['ProdZEE_13UP17']=gen2017('ZEE_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) steps['ZEE_13UP17']=gen2017('ZEE_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) steps['ZMM_13UP17']=gen2017('ZMM_13TeV_TuneCUETP8M1_cfi',Kby(18,100)) @@ -594,6 +600,7 @@ def gen2018hiprod(fragment,howMuch): steps['H125GGgluonfusion_13UP17']=gen2017('H125GGgluonfusion_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) steps['QQH1352T_13UP17']=gen2017('QQH1352T_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) steps['SMS-T1tttt_mGl-1500_mLSP-100_13UP17']=gen2017('SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi',Kby(9,50)) +# ### 2018 wf: only the ones for premixing (for the moment) steps['NuGun_UP18']=gen2018('SingleNuE10_cfi.py',Kby(9,50)) @@ -1412,6 +1419,18 @@ def lhegensim2018(fragment,howMuch): global step1LHEGenSimUp2018Default return merge([{'cfg':fragment},howMuch,step1LHEGenSimUp2018Default]) +def lhegensim2018RD(fragment,howMuch): + global step1Up2018Defaults + return merge([{'cfg':fragment},howMuch,{'--customise_commands': "\"process.source.numberEventsInLuminosityBlock=cms.untracked.uint32(1000) \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \""},step1Up2018Defaults]) +# +#* EcalLaserAPDPNRatios_Run_Dep_MC (9IOVs) run numbers: 1, 316082, 316720, 317527, ... +#* EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV (1 IOV) ---> used in SIM? + +# for run dependent MC (1000 events per LS), 2*1000 total events +steps['TTbar_13UP18_RD']=lhegensim2018RD('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(2,50)) +# + + steps['TTbar012Jets_NLO_Mad_py8_Evt_13']=lhegensim('Configuration/Generator/python/TTbar012Jets_5f_NLO_FXFX_Madgraph_LHE_13TeV_cfi.py',Kby(9,50)) steps['GluGluHToZZTo4L_M125_Pow_py8_Evt_13']=lhegensim('Configuration/Generator/python/GGHZZ4L_JHUGen_Pow_NNPDF30_LHE_13TeV_cfi.py', Kby(9,50)) steps['VBFHToZZTo4Nu_M125_Pow_py8_Evt_13']=lhegensim('Configuration/Generator/python/VBFHZZ4Nu_Pow_NNPDF30_LHE_13TeV_cfi.py',Kby(9,50)) @@ -1509,6 +1528,7 @@ def lhegensim2018ml(fragment,howMuch): steps['GluGluHToZZTo4L_M125_Pow_py8_Evt_13UP18ml']=lhegensim2018ml('Configuration/Generator/python/GGHZZ4L_JHUGen_Pow_NNPDF30_LHE_13TeV_cfi.py',Kby(9,50)) + # sometimes v1 won't be used - override it here - the dictionary key is gen fragment + '_' + geometry overrideFragments={'H125GGgluonfusion_13UP18INPUT':'2'} @@ -1748,7 +1768,19 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True)\"" } ]) steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) -steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2018_mc_3sigma_v2'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True)\"" } ]) +steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(1,316083)\"" } ]) +# +#* EcalPedestals_Run_Dep_MC (9IOVs) run numbers: 1, 316082, 316720, 317527, ... +#* EcalLaserAPDPNRatios_Run_Dep_MC (9IOVs) +#* EcalLaserAlphas_Run_Dep_MC (1IOV) +#* EcalADCToGeVConstant_UL_2018_v1_mc (1IOV) +#* EcalChannelStatus_UL_2018_v2_mc (1IOV) +#* EcalIntercalibConstants_forTimeDep_mc (1IOV) +#* EcalIntercalibConstantsMC_forTimeDep_mc (1IOV) +#* EcalPFRecHitThresholds_UL_2018_2e3sig_v2 (1IOV) +# +#* EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV (1 IOV) ---> used in SIM? +# steps['DIGIPRMXLOCALUP18_PU25']=merge([digiPremixLocalPileupUp2018Defaults25ns]) premixProd25ns = {'-s' : 'DIGI,DATAMIX,L1,DIGI2RAW,HLT:@relval2016', @@ -2358,6 +2390,9 @@ def gen2018HiMix(fragment,howMuch): steps['RECOPRMXUP18_PU25']=merge([ {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2'}, step3Up2015Defaults]) +steps['RECOPRMXUP18_PU25_RD']=merge([ + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(1,316083)\""}, + step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TEgamma'},steps['RECOPRMXUP18_PU25']]) steps['RECOPRMXUP18_PU25_L1TMuDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TMuon'},steps['RECOPRMXUP18_PU25']]) From 2a9f99ccb617fcd7a8239d4007f66000d9fda873 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 19 Nov 2019 17:24:13 +0100 Subject: [PATCH 18/24] update according to discussion on the PR. Workflow 250202.184 has big stat, 250202.183 for 10 events only --- .../python/relval_premix.py | 1 + .../python/relval_steps.py | 33 ++++++------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_premix.py b/Configuration/PyReleaseValidation/python/relval_premix.py index 20dd6ea5e67d2..9cdeabd5eb57e 100644 --- a/Configuration/PyReleaseValidation/python/relval_premix.py +++ b/Configuration/PyReleaseValidation/python/relval_premix.py @@ -49,6 +49,7 @@ workflows[250202.181]=['',['TTbar_13UP18','PREMIXUP18_PU25','DIGIPRMXLOCALUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.182]=['',['TTbar_13UP18','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.183]=['',['TTbar_13UP18_RD','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25']] +workflows[250202.184]=['',['TTbar_13UP18_RD_big','DIGIPRMXUP18_PU25_RD_big','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25']] workflows[250203.18]=['',['H125GGgluonfusion_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250204.18]=['',['QQH1352T_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250205.18]=['',['ZTT_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index ecef829ec792a..f5f67475b7959 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -587,12 +587,6 @@ def gen2018hiprod(fragment,howMuch): ### 2017 wf: only the ones for premixing (for the moment) steps['NuGun_UP17']=gen2017('SingleNuE10_cfi.py',Kby(9,50)) steps['TTbar_13UP17']=gen2017('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) - -# -# Add the run dependent -# - - steps['ProdZEE_13UP17']=gen2017('ZEE_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) steps['ZEE_13UP17']=gen2017('ZEE_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) steps['ZMM_13UP17']=gen2017('ZMM_13TeV_TuneCUETP8M1_cfi',Kby(18,100)) @@ -600,7 +594,7 @@ def gen2018hiprod(fragment,howMuch): steps['H125GGgluonfusion_13UP17']=gen2017('H125GGgluonfusion_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) steps['QQH1352T_13UP17']=gen2017('QQH1352T_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) steps['SMS-T1tttt_mGl-1500_mLSP-100_13UP17']=gen2017('SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi',Kby(9,50)) -# + ### 2018 wf: only the ones for premixing (for the moment) steps['NuGun_UP18']=gen2018('SingleNuE10_cfi.py',Kby(9,50)) @@ -1419,15 +1413,17 @@ def lhegensim2018(fragment,howMuch): global step1LHEGenSimUp2018Default return merge([{'cfg':fragment},howMuch,step1LHEGenSimUp2018Default]) +def lhegensim2018RDbig(fragment,howMuch): + global step1Up2018Defaults + return merge([{'cfg':fragment},howMuch,{'--customise_commands': "\"process.source.numberEventsInLuminosityBlock=cms.untracked.uint32(50) \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \""},step1Up2018Defaults]) + def lhegensim2018RD(fragment,howMuch): global step1Up2018Defaults - return merge([{'cfg':fragment},howMuch,{'--customise_commands': "\"process.source.numberEventsInLuminosityBlock=cms.untracked.uint32(1000) \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \""},step1Up2018Defaults]) -# -#* EcalLaserAPDPNRatios_Run_Dep_MC (9IOVs) run numbers: 1, 316082, 316720, 317527, ... -#* EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV (1 IOV) ---> used in SIM? + return merge([{'cfg':fragment},howMuch,{'--customise_commands': "\"process.source.numberEventsInLuminosityBlock=cms.untracked.uint32(5) \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \""},step1Up2018Defaults]) -# for run dependent MC (1000 events per LS), 2*1000 total events +# for run dependent MC steps['TTbar_13UP18_RD']=lhegensim2018RD('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(2,50)) +steps['TTbar_13UP18_RD_big']=lhegensim2018RDbig('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) # @@ -1768,18 +1764,9 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True)\"" } ]) steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) -steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(1,316083)\"" } ]) -# -#* EcalPedestals_Run_Dep_MC (9IOVs) run numbers: 1, 316082, 316720, 317527, ... -#* EcalLaserAPDPNRatios_Run_Dep_MC (9IOVs) -#* EcalLaserAlphas_Run_Dep_MC (1IOV) -#* EcalADCToGeVConstant_UL_2018_v1_mc (1IOV) -#* EcalChannelStatus_UL_2018_v2_mc (1IOV) -#* EcalIntercalibConstants_forTimeDep_mc (1IOV) -#* EcalIntercalibConstantsMC_forTimeDep_mc (1IOV) -#* EcalPFRecHitThresholds_UL_2018_2e3sig_v2 (1IOV) # -#* EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV (1 IOV) ---> used in SIM? +steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(315257,316083)\"" } ]) +steps['DIGIPRMXUP18_PU25_RD_big']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32((315257,)*20 + (316082,)*20 + (316720,)*20 + (317527,)*20 + (320917,)*20 + (321414,)*20 + (321973,)*20 + (322492,)*20 + (324245,)*20)\"" } ]) # steps['DIGIPRMXLOCALUP18_PU25']=merge([digiPremixLocalPileupUp2018Defaults25ns]) From 3b063f53d265afea5f956ca251d2a3f520b2a7c8 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 19 Nov 2019 17:25:32 +0100 Subject: [PATCH 19/24] update according to discussion on the PR. Workflow 250202.184 has big stat, 250202.183 for 10 events only --- Configuration/PyReleaseValidation/python/relval_premix.py | 2 +- Configuration/PyReleaseValidation/python/relval_steps.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/relval_premix.py b/Configuration/PyReleaseValidation/python/relval_premix.py index 9cdeabd5eb57e..537bbfd7202b0 100644 --- a/Configuration/PyReleaseValidation/python/relval_premix.py +++ b/Configuration/PyReleaseValidation/python/relval_premix.py @@ -49,7 +49,7 @@ workflows[250202.181]=['',['TTbar_13UP18','PREMIXUP18_PU25','DIGIPRMXLOCALUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.182]=['',['TTbar_13UP18','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.183]=['',['TTbar_13UP18_RD','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25']] -workflows[250202.184]=['',['TTbar_13UP18_RD_big','DIGIPRMXUP18_PU25_RD_big','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25']] +workflows[250202.184]=['',['TTbar_13UP18_RD_big','DIGIPRMXUP18_PU25_RD_big','RECOPRMXUP18_PU25_RD_big','HARVESTUP18_PU25']] workflows[250203.18]=['',['H125GGgluonfusion_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250204.18]=['',['QQH1352T_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250205.18]=['',['ZTT_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index f5f67475b7959..29f9f9e6fe038 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -2380,6 +2380,9 @@ def gen2018HiMix(fragment,howMuch): steps['RECOPRMXUP18_PU25_RD']=merge([ {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(1,316083)\""}, step3Up2015Defaults]) +steps['RECOPRMXUP18_PU25_RD_big']=merge([ + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32((315257,)*20 + (316082,)*20 + (316720,)*20 + (317527,)*20 + (320917,)*20 + (321414,)*20 + (321973,)*20 + (322492,)*20 + (324245,)*20)\""}, + step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TEgamma'},steps['RECOPRMXUP18_PU25']]) steps['RECOPRMXUP18_PU25_L1TMuDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TMuon'},steps['RECOPRMXUP18_PU25']]) From 8600d68fa55249f14a6369bc13760f537942e5f0 Mon Sep 17 00:00:00 2001 From: amassiro Date: Thu, 21 Nov 2019 17:48:40 +0100 Subject: [PATCH 20/24] change in naming conventions as suggested in PR --- .../PyReleaseValidation/python/relval_premix.py | 4 ++-- .../PyReleaseValidation/python/relval_steps.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_premix.py b/Configuration/PyReleaseValidation/python/relval_premix.py index 537bbfd7202b0..60855914891ef 100644 --- a/Configuration/PyReleaseValidation/python/relval_premix.py +++ b/Configuration/PyReleaseValidation/python/relval_premix.py @@ -48,8 +48,8 @@ workflows[250202.18]=['',['TTbar_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.181]=['',['TTbar_13UP18','PREMIXUP18_PU25','DIGIPRMXLOCALUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250202.182]=['',['TTbar_13UP18','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] -workflows[250202.183]=['',['TTbar_13UP18_RD','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25']] -workflows[250202.184]=['',['TTbar_13UP18_RD_big','DIGIPRMXUP18_PU25_RD_big','RECOPRMXUP18_PU25_RD_big','HARVESTUP18_PU25']] +workflows[250202.183]=['',['TTbar_13UP18_RD_test','DIGIPRMXUP18_PU25_RD_test','RECOPRMXUP18_PU25_RD_test','HARVESTUP18_PU25']] +workflows[250202.184]=['',['TTbar_13UP18_RD','DIGIPRMXUP18_PU25_RD','RECOPRMXUP18_PU25_RD','HARVESTUP18_PU25']] workflows[250203.18]=['',['H125GGgluonfusion_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250204.18]=['',['QQH1352T_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] workflows[250205.18]=['',['ZTT_13UP18','DIGIPRMXUP18_PU25','RECOPRMXUP18_PU25','HARVESTUP18_PU25']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 29f9f9e6fe038..29ee532b3f8b8 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1413,17 +1413,17 @@ def lhegensim2018(fragment,howMuch): global step1LHEGenSimUp2018Default return merge([{'cfg':fragment},howMuch,step1LHEGenSimUp2018Default]) -def lhegensim2018RDbig(fragment,howMuch): +def lhegensim2018RD(fragment,howMuch): global step1Up2018Defaults return merge([{'cfg':fragment},howMuch,{'--customise_commands': "\"process.source.numberEventsInLuminosityBlock=cms.untracked.uint32(50) \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \""},step1Up2018Defaults]) -def lhegensim2018RD(fragment,howMuch): +def lhegensim2018RDtest(fragment,howMuch): global step1Up2018Defaults return merge([{'cfg':fragment},howMuch,{'--customise_commands': "\"process.source.numberEventsInLuminosityBlock=cms.untracked.uint32(5) \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \""},step1Up2018Defaults]) # for run dependent MC -steps['TTbar_13UP18_RD']=lhegensim2018RD('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(2,50)) -steps['TTbar_13UP18_RD_big']=lhegensim2018RDbig('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) +steps['TTbar_13UP18_RD_test']=lhegensim2018RDtest('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(2,50)) +steps['TTbar_13UP18_RD']=lhegensim2018RD('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(9,50)) # @@ -1765,8 +1765,8 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) # -steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(315257,316083)\"" } ]) -steps['DIGIPRMXUP18_PU25_RD_big']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32((315257,)*20 + (316082,)*20 + (316720,)*20 + (317527,)*20 + (320917,)*20 + (321414,)*20 + (321973,)*20 + (322492,)*20 + (324245,)*20)\"" } ]) +steps['DIGIPRMXUP18_PU25_RD_test']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(315257,316083)\"" } ]) +steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32((315257,)*20 + (316082,)*20 + (316720,)*20 + (317527,)*20 + (320917,)*20 + (321414,)*20 + (321973,)*20 + (322492,)*20 + (324245,)*20)\"" } ]) # steps['DIGIPRMXLOCALUP18_PU25']=merge([digiPremixLocalPileupUp2018Defaults25ns]) @@ -2377,10 +2377,10 @@ def gen2018HiMix(fragment,howMuch): steps['RECOPRMXUP18_PU25']=merge([ {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2'}, step3Up2015Defaults]) -steps['RECOPRMXUP18_PU25_RD']=merge([ +steps['RECOPRMXUP18_PU25_RD_test']=merge([ {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(1,316083)\""}, step3Up2015Defaults]) -steps['RECOPRMXUP18_PU25_RD_big']=merge([ +steps['RECOPRMXUP18_PU25_RD']=merge([ {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32((315257,)*20 + (316082,)*20 + (316720,)*20 + (317527,)*20 + (320917,)*20 + (321414,)*20 + (321973,)*20 + (322492,)*20 + (324245,)*20)\""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TEgamma'},steps['RECOPRMXUP18_PU25']]) From 6027981a5c10a3f8986ce4b989628923125b5d34 Mon Sep 17 00:00:00 2001 From: amassiro Date: Thu, 21 Nov 2019 18:02:20 +0100 Subject: [PATCH 21/24] fix run and ls --- Configuration/PyReleaseValidation/python/relval_steps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 29ee532b3f8b8..44e959bd329ad 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -2378,10 +2378,10 @@ def gen2018HiMix(fragment,howMuch): {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2'}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_RD_test']=merge([ - {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(1,316083)\""}, + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_RD']=merge([ - {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32((315257,)*20 + (316082,)*20 + (316720,)*20 + (317527,)*20 + (320917,)*20 + (321414,)*20 + (321973,)*20 + (322492,)*20 + (324245,)*20)\""}, + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TEgamma'},steps['RECOPRMXUP18_PU25']]) steps['RECOPRMXUP18_PU25_L1TMuDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TMuon'},steps['RECOPRMXUP18_PU25']]) From f1c74bcfe6e12f8903a89a7614501b9a3fea6df5 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 17 Dec 2019 22:42:55 +0100 Subject: [PATCH 22/24] fix for timeDependent flag setting to true --- .../PyReleaseValidation/python/relval_steps.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 44e959bd329ad..73fb8fee0ea7b 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1761,12 +1761,12 @@ def lhegensim2018ml(fragment,howMuch): steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns]) steps['DIGIPRMXUP17_PU25']=merge([digiPremixUp2017Defaults25ns]) -steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True)\"" } ]) +steps['DIGIPRMXUP17_PU25_RD']=merge([digiPremixUp2017Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_UL_2017_mc'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.mixData.workers.ecal.timeDependent=True\"" } ]) steps['DIGIPRMXLOCALUP17_PU25']=merge([digiPremixLocalPileupUp2017Defaults25ns]) steps['DIGIPRMXUP18_PU25']=merge([digiPremixUp2018Defaults25ns]) # -steps['DIGIPRMXUP18_PU25_RD_test']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(315257,316083)\"" } ]) -steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32((315257,)*20 + (316082,)*20 + (316720,)*20 + (317527,)*20 + (320917,)*20 + (321414,)*20 + (321973,)*20 + (322492,)*20 + (324245,)*20)\"" } ]) +steps['DIGIPRMXUP18_PU25_RD_test']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.mixData.workers.ecal.timeDependent=True \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32(315257,316083)\"" } ]) +steps['DIGIPRMXUP18_PU25_RD']=merge([digiPremixUp2018Defaults25ns, { '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.mixData.workers.ecal.timeDependent=True \\n process.source.setRunNumberForEachLumi = cms.untracked.vuint32((315257,)*20 + (316082,)*20 + (316720,)*20 + (317527,)*20 + (320917,)*20 + (321414,)*20 + (321973,)*20 + (322492,)*20 + (324245,)*20)\"" } ]) # steps['DIGIPRMXLOCALUP18_PU25']=merge([digiPremixLocalPileupUp2018Defaults25ns]) @@ -2378,10 +2378,10 @@ def gen2018HiMix(fragment,howMuch): {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2'}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_RD_test']=merge([ - {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \""}, + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.mixData.workers.ecal.timeDependent=True \""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_RD']=merge([ - {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \""}, + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.mixData.workers.ecal.timeDependent=True \""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TEgamma'},steps['RECOPRMXUP18_PU25']]) steps['RECOPRMXUP18_PU25_L1TMuDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TMuon'},steps['RECOPRMXUP18_PU25']]) From c42081540be9ff1af0ccb6c168483bc27ba146bc Mon Sep 17 00:00:00 2001 From: amassiro Date: Wed, 18 Dec 2019 14:15:51 +0100 Subject: [PATCH 23/24] tiny fix for step3 --- Configuration/PyReleaseValidation/python/relval_steps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 73fb8fee0ea7b..b93fd3b8a93a9 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -2378,10 +2378,10 @@ def gen2018HiMix(fragment,howMuch): {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2'}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_RD_test']=merge([ - {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.mixData.workers.ecal.timeDependent=True \""}, + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_RD']=merge([ - {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.mixData.workers.ecal.timeDependent=True \""}, + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TEgamma'},steps['RECOPRMXUP18_PU25']]) steps['RECOPRMXUP18_PU25_L1TMuDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TMuon'},steps['RECOPRMXUP18_PU25']]) From e4810f5fb7250ff2cce4eda4a653757e30a32b0e Mon Sep 17 00:00:00 2001 From: amassiro Date: Wed, 18 Dec 2019 16:00:56 +0100 Subject: [PATCH 24/24] remove of sim configuration in reco step --- Configuration/PyReleaseValidation/python/relval_steps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index b93fd3b8a93a9..b213b34dd5625 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -2378,10 +2378,10 @@ def gen2018HiMix(fragment,howMuch): {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2'}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_RD_test']=merge([ - {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \""}, + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n \""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_RD']=merge([ - {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n process.ecal_sim_parameter_map.timeDependent=cms.bool(True) \""}, + {'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2', '--customise_commands':"\"process.EcalLaserCorrectionServiceMC = cms.ESProducer('EcalLaserCorrectionServiceMC') \\n process.GlobalTag.toGet = cms.VPSet( cms.PSet( record = cms.string('EcalLaserAPDPNRatiosMCRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC_first_IOV'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ), cms.PSet( record = cms.string('EcalLaserAPDPNRatiosRcd'), tag = cms.string('EcalLaserAPDPNRatios_Run_Dep_MC'), connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) ) \\n \""}, step3Up2015Defaults]) steps['RECOPRMXUP18_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TEgamma'},steps['RECOPRMXUP18_PU25']]) steps['RECOPRMXUP18_PU25_L1TMuDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM+@L1TMuon'},steps['RECOPRMXUP18_PU25']])