87 std::shared_ptr<PhiSymCache>&
cache)
const;
90 std::shared_ptr<ConfigCache>&
cache)
const;
103 std::vector<double>
A_;
104 std::vector<double>
B_;
126 etCutEB_(pSet.getParameter<double>(
"etCut_barrel")),
127 eThresholdsEB_(pSet.getParameter<
std::
vector<double> >(
"eThresholds_barrel")),
128 etCutEE_(pSet.getParameter<double>(
"etCut_endcap")),
129 A_(pSet.getParameter<
std::
vector<double> >(
"A")),
130 B_(pSet.getParameter<
std::
vector<double> >(
"B")),
131 thrEEmod_(pSet.getParameter<double>(
"thrEEmod")),
132 nMisCalib_(pSet.getParameter<
int>(
"nMisCalib") / 2),
133 nSumEtValues_(nMisCalib_ * 2 + 1),
134 misCalibRangeEB_(pSet.getParameter<
std::
vector<double> >(
"misCalibRangeEB")),
135 misCalibRangeEE_(pSet.getParameter<
std::
vector<double> >(
"misCalibRangeEE")) {}
188 float eta = barrelGeometry->getGeometry(ebHit)->getPosition().eta();
195 etValues[0] =
recHit.energy() / cosh(
eta);
196 for (
int iMis = -
nMisCalib_; iMis < 0; ++iMis) {
204 for (
int iMis = 1; iMis <=
nMisCalib_; ++iMis) {
219 .addHit(etValues,
laser.getLaserCorrection(
recHit.id(), evtTimeStamp));
230 float eta = endcapGeometry->getGeometry(eeHit)->getPosition().eta();
237 etValues[0] =
recHit.energy() / cosh(
eta);
238 for (
int iMis = -
nMisCalib_; iMis < 0; ++iMis) {
246 for (
int iMis = 1; iMis <=
nMisCalib_; ++iMis) {
261 .addHit(etValues,
laser.getLaserCorrection(
recHit.id(), evtTimeStamp));
274 cache->recHitCollEB.resize(
config->barrelDetIds.size());
275 cache->recHitCollEE.resize(
config->endcapDetIds.size());
276 for (
auto& ebDetId :
config->barrelDetIds) {
280 for (
auto& eeDetId :
config->endcapDetIds) {
290 std::shared_ptr<PhiSymCache>&
cache)
const {
294 auto const& chStatus =
setup.getData(chStatusToken);
296 cache->recHitCollEB.resize(
config->barrelDetIds.size());
297 cache->recHitCollEE.resize(
config->endcapDetIds.size());
298 for (
auto& ebDetId :
config->barrelDetIds) {
300 cache->recHitCollEB.at(
id.denseIndex()) =
303 for (
auto& eeDetId :
config->endcapDetIds) {
306 cache->recHitCollEE.at(
id.denseIndex()) =
308 cache->recHitCollEE.at(
id.denseIndex())
316 std::shared_ptr<ConfigCache>&
cache)
const {
326 for (
auto& ebDetId :
cache->barrelDetIds) {
330 if (
id.
iphi() == 1) {
331 auto cellGeometry = barrelGeometry->getGeometry(
id);
332 float eta = cellGeometry->getPosition().eta();
336 for (
auto& eeDetId :
cache->endcapDetIds) {
341 auto cellGeometry = endcapGeometry->getGeometry(
id);
368 edm::LuminosityBlockCache<ConfigCache>,
369 edm::LuminosityBlockSummaryCache<PhiSymCache>,
370 edm::EndLuminosityBlockProducer,
418 produces<EcalPhiSymInfo, edm::Transition::EndLuminosityBlock>();
419 produces<EcalPhiSymRecHitCollection, edm::Transition::EndLuminosityBlock>(
"EB");
420 produces<EcalPhiSymRecHitCollection, edm::Transition::EndLuminosityBlock>(
"EE");
425 auto cache = std::make_shared<ConfigCache>();
435 auto cache = std::make_shared<PhiSymCache>();
439 EcalPhiSymInfo thisLumi(0, 0, 0, 1, lhcinfo.fillNumber(), lhcinfo.delivLumi(), lhcinfo.recLumi());
443 cache->ecalLumiInfo = thisLumi;
452 auto ecalLumiInfo = std::make_unique<EcalPhiSymInfo>(
cache->ecalLumiInfo);
453 ecalLumiInfo->setMiscalibInfo(
456 std::make_unique<EcalPhiSymRecHitCollection>(
cache->recHitCollEB.begin(),
cache->recHitCollEB.end());
458 std::make_unique<EcalPhiSymRecHitCollection>(
cache->recHitCollEE.begin(),
cache->recHitCollEE.end());
467 return std::make_unique<PhiSymCache>();
500 edm::RunCache<ConfigCache>,
501 edm::RunSummaryCache<PhiSymCache>,
544 produces<EcalPhiSymInfo, edm::Transition::EndRun>();
545 produces<EcalPhiSymRecHitCollection, edm::Transition::EndRun>(
"EB");
546 produces<EcalPhiSymRecHitCollection, edm::Transition::EndRun>(
"EE");
551 auto cache = std::make_shared<ConfigCache>();
561 auto cache = std::make_shared<PhiSymCache>();
570 auto ecalLumiInfo = std::make_unique<EcalPhiSymInfo>(
cache->ecalLumiInfo);
571 ecalLumiInfo->setMiscalibInfo(
574 std::make_unique<EcalPhiSymRecHitCollection>(
cache->recHitCollEB.begin(),
cache->recHitCollEB.end());
576 std::make_unique<EcalPhiSymRecHitCollection>(
cache->recHitCollEE.begin(),
cache->recHitCollEE.end());
585 return std::make_unique<PhiSymCache>();
605 if (
stream.value() == 0) {
607 EcalPhiSymInfo thisLumi(0, 0, 0, 1, lhcinfo.fillNumber(), lhcinfo.delivLumi(), lhcinfo.recLumi());
609 streamCache(
stream)->ecalLumiInfo += thisLumi;
void sumCache(PhiSymCache *summaryc, PhiSymCache *streamc) const
std::vector< float > misCalibStepsEB_
void globalEndRun(edm::Run const &run, edm::EventSetup const &setup) const override
void initializePhiSymCache(edm::EventSetup const &setup, edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > const &chStatusToken, ConfigCache const *config, std::shared_ptr< PhiSymCache > &cache) const
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > chStatusTokenRun_
std::shared_ptr< ConfigCache > globalBeginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) const override
float etCutsEB[EcalRingCalibrationTools::N_RING_BARREL]
std::vector< double > misCalibRangeEE_
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > laserDbToken_
std::shared_ptr< ConfigCache > globalBeginRun(edm::Run const &run, edm::EventSetup const &setup) const override
std::shared_ptr< PhiSymCache > globalBeginRunSummary(edm::Run const &run, edm::EventSetup const &setup) const override
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
uint32_t cc[maxCellsPerHit]
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoTokenRun_
float eThresholdsEE_[kNRingsEE]
void processEvent(edm::Event const &event, edm::EventSetup const &setup, ConfigCache const *config, PhiSymCache *cache) const
void globalEndRunSummary(edm::Run const &run, edm::EventSetup const &setup, PhiSymCache *cache) const override
void accumulate(edm::StreamID stream, edm::Event const &event, edm::EventSetup const &setup) const override
EcalPhiSymInfo ecalLumiInfo
void streamEndLuminosityBlockSummary(edm::StreamID stream, edm::LuminosityBlock const &lumi, edm::EventSetup const &setup, PhiSymCache *cache) const override
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoTokenLumi_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoToken_
uint32_t denseIndex() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void streamBeginLuminosityBlock(edm::StreamID stream, edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) const override
EcalPhiSymRecHitProducerRun(const edm::ParameterSet &pSet)
EcalPhiSymRecHitProducerBase(const edm::ParameterSet &pSet, edm::ConsumesCollector &&cc)
void globalEndLuminosityBlockProduce(edm::LuminosityBlock &lumi, edm::EventSetup const &setup, PhiSymCache const *cache) const override
~EcalPhiSymRecHitProducerBase()
std::vector< DetId > endcapDetIds
std::unique_ptr< PhiSymCache > beginStream(edm::StreamID stream) const override
void initializeConfigCache(edm::EventSetup const &setup, edm::ESGetToken< CaloGeometry, CaloGeometryRecord > const &geoToken, std::shared_ptr< ConfigCache > &cache) const
float etCutsEE[EcalRingCalibrationTools::N_RING_ENDCAP]
edm::EDGetTokenT< EBRecHitCollection > eeToken_
void streamBeginLuminosityBlock(edm::StreamID stream, edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) const override
std::unique_ptr< PhiSymCache > beginStream(edm::StreamID stream) const override
void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup, PhiSymCache *cache) const override
EcalPhiSymRecHitProducerLumi(const edm::ParameterSet &pSet)
std::vector< DetId > barrelDetIds
void globalEndRunProduce(edm::Run &run, edm::EventSetup const &setup, PhiSymCache const *cache) const override
std::vector< double > eThresholdsEB_
uint32_t denseIndex() const
Abs< T >::type abs(const T &t)
~EcalPhiSymRecHitProducerLumi() override
edm::ESGetToken< LHCInfo, LHCInfoRcd > lhcInfoTokenLumi_
#define DEFINE_FWK_MODULE(type)
static const short kNRingsEE
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
void accumulate(edm::StreamID stream, edm::Event const &event, edm::EventSetup const &setup) const override
unsigned long long uint64_t
EcalRingCalibrationTools calibRing_
edm::ESGetToken< LHCInfo, LHCInfoRcd > lhcInfoTokenLumi_
static const short kNRingsEB
std::shared_ptr< PhiSymCache > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) const override
void globalEndLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) const override
std::vector< EcalPhiSymRecHit > EcalPhiSymRecHitCollection
edm::EDGetTokenT< EBRecHitCollection > ebToken_
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > chStatusTokenLumi_
static const short ringsInOneEE
std::vector< float > misCalibStepsEE_
void streamBeginRun(edm::StreamID stream, edm::Run const &run, edm::EventSetup const &setup) const override
std::vector< double > misCalibRangeEB_
void streamEndRunSummary(edm::StreamID stream, edm::Run const &run, edm::EventSetup const &setup, PhiSymCache *cache) const override
EcalPhiSymRecHitCollection recHitCollEB
EcalPhiSymRecHitCollection recHitCollEE
~EcalPhiSymRecHitProducerRun() override
void initializeStreamCache(ConfigCache const *config, PhiSymCache *cache) const