CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer Class Reference
Inheritance diagram for ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer:
edm::ESProducer edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Member Functions

 HcalMahiConditionsESProducer (edm::ParameterSet const &iConfig)
 
std::unique_ptr< hcal::HcalMahiConditionsPortableHostproduce (HcalMahiConditionsRcd const &iRecord)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcdchannelQualityToken_
 
edm::ESGetToken< HcalPedestals, HcalPedestalsRcdeffectivePedestalsToken_
 
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcdeffectivePedestalWidthsToken_
 
edm::ESGetToken< HcalGains, HcalGainsRcdgainsToken_
 
edm::ESGetToken< HcalGainWidths, HcalGainWidthsRcdgainWidthsToken_
 
edm::ESGetToken< HcalLUTCorrs, HcalLUTCorrsRcdlutCorrsToken_
 
edm::ESGetToken< HcalPedestals, HcalPedestalsRcdpedestalsToken_
 
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcdpedestalWidthsToken_
 
edm::ESGetToken< HcalQIEData, HcalQIEDataRcdqieDataToken_
 
edm::ESGetToken< HcalQIETypes, HcalQIETypesRcdqieTypesToken_
 
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecordrecConstantsToken_
 
edm::ESGetToken< HcalRecoParams, HcalRecoParamsRcdrecoParamsToken_
 
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcdrespCorrsToken_
 
edm::ESGetToken< HcalSiPMParameters, HcalSiPMParametersRcdsipmParametersToken_
 
edm::ESGetToken< HcalTimeCorrs, HcalTimeCorrsRcdtimeCorrsToken_
 
edm::ESGetToken< HcalTopology, HcalRecNumberingRecordtopologyToken_
 

Additional Inherited Members

- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 64 of file HcalMahiConditionsESProducer.cc.

Constructor & Destructor Documentation

◆ HcalMahiConditionsESProducer()

ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::HcalMahiConditionsESProducer ( edm::ParameterSet const &  iConfig)
inline

Definition at line 66 of file HcalMahiConditionsESProducer.cc.

References gpuPixelDoublets::cc, channelQualityToken_, effectivePedestalsToken_, effectivePedestalWidthsToken_, gainsToken_, gainWidthsToken_, lutCorrsToken_, pedestalsToken_, pedestalWidthsToken_, qieDataToken_, qieTypesToken_, recConstantsToken_, recoParamsToken_, respCorrsToken_, edm::ESProducer::setWhatProduced(), sipmParametersToken_, timeCorrsToken_, and topologyToken_.

66  : ESProducer(iConfig) {
67  auto cc = setWhatProduced(this);
68  recoParamsToken_ = cc.consumes();
69  pedestalsToken_ = cc.consumes();
70  effectivePedestalsToken_ = cc.consumes(edm::ESInputTag{"", "withTopoEff"});
71  gainsToken_ = cc.consumes();
72  lutCorrsToken_ = cc.consumes();
73  respCorrsToken_ = cc.consumes();
74  timeCorrsToken_ = cc.consumes();
75  pedestalWidthsToken_ = cc.consumes();
76  effectivePedestalWidthsToken_ = cc.consumes(edm::ESInputTag{"", "withTopoEff"});
77  gainWidthsToken_ = cc.consumes();
78  channelQualityToken_ = cc.consumes();
79  qieTypesToken_ = cc.consumes();
80  qieDataToken_ = cc.consumes();
81  sipmParametersToken_ = cc.consumes();
82  topologyToken_ = cc.consumes();
83  recConstantsToken_ = cc.consumes();
84  }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
edm::ESGetToken< HcalQIETypes, HcalQIETypesRcd > qieTypesToken_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topologyToken_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > recConstantsToken_
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > respCorrsToken_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcd > effectivePedestalWidthsToken_
edm::ESGetToken< HcalGainWidths, HcalGainWidthsRcd > gainWidthsToken_
edm::ESGetToken< HcalTimeCorrs, HcalTimeCorrsRcd > timeCorrsToken_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > channelQualityToken_
edm::ESGetToken< HcalRecoParams, HcalRecoParamsRcd > recoParamsToken_
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > pedestalsToken_
edm::ESGetToken< HcalQIEData, HcalQIEDataRcd > qieDataToken_
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcd > pedestalWidthsToken_
edm::ESGetToken< HcalSiPMParameters, HcalSiPMParametersRcd > sipmParametersToken_
edm::ESGetToken< HcalLUTCorrs, HcalLUTCorrsRcd > lutCorrsToken_
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > effectivePedestalsToken_

Member Function Documentation

◆ fillDescriptions()

static void ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

◆ produce()

std::unique_ptr<hcal::HcalMahiConditionsPortableHost> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::produce ( HcalMahiConditionsRcd const &  iRecord)
inline

Definition at line 91 of file HcalMahiConditionsESProducer.cc.

References channelQualityToken_, effectivePedestalsToken_, effectivePedestalWidthsToken_, ecalph2::gains, gainsToken_, gainWidthsToken_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), reco::JetExtendedAssociation::getValue(), cms::alpakatools::host(), mps_fire::i, IPHI_MAX, dqmdumpme::k, MainPageGenerator::l, linear(), lutCorrsToken_, hltrates_dqm_sourceclient-live_cfg::offset, pedestalsToken_, pedestalWidthsToken_, qieDataToken_, qieTypesToken_, recConstantsToken_, recoParamsToken_, respCorrsToken_, sipmParametersToken_, timeCorrsToken_, HLT_2024v14_cff::topology, and topologyToken_.

91  {
92  auto const& recoParams = iRecord.get(recoParamsToken_);
93  auto const& pedestals = iRecord.get(pedestalsToken_);
94  auto const& effectivePedestals = iRecord.get(effectivePedestalsToken_);
95  auto const& gains = iRecord.get(gainsToken_);
96  auto const& lutCorrs = iRecord.get(lutCorrsToken_);
97  auto const& respCorrs = iRecord.get(respCorrsToken_);
98  auto const& timeCorrs = iRecord.get(timeCorrsToken_);
99  auto const& pedestalWidths = iRecord.get(pedestalWidthsToken_);
100  auto const& effectivePedestalWidths = iRecord.get(effectivePedestalWidthsToken_);
101  auto const& gainWidths = iRecord.get(gainWidthsToken_);
102  auto const& channelQuality = iRecord.get(channelQualityToken_);
103  auto const& qieTypes = iRecord.get(qieTypesToken_);
104  auto const& qieData = iRecord.get(qieDataToken_);
105  auto const& sipmParameters = iRecord.get(sipmParametersToken_);
106  auto const& topology = iRecord.get(topologyToken_);
107  auto const& recConstants = iRecord.get(recConstantsToken_);
108 
109  size_t const totalChannels =
110  pedestals.getAllContainers()[0].second.size() + pedestals.getAllContainers()[1].second.size();
111 
112  auto product = std::make_unique<hcal::HcalMahiConditionsPortableHost>(totalChannels, cms::alpakatools::host());
113 
114  auto view = product->view();
115 
116  // convert pedestals
117  auto const ped_unitIsADC = pedestals.isADC();
118  auto const effPed_unitIsADC = effectivePedestals.isADC();
119 
120  // fill HB channels
121  auto const recoParams_containers = recoParams.getAllContainers();
122  auto const pedestals_containers = pedestals.getAllContainers();
123  auto const effectivePedestals_containers = effectivePedestals.getAllContainers();
124  auto const gains_containers = gains.getAllContainers();
125  auto const lutCorrs_containers = lutCorrs.getAllContainers();
126  auto const respCorrs_containers = respCorrs.getAllContainers();
127  auto const timeCorrs_containers = timeCorrs.getAllContainers();
128  auto const pedestalWidths_containers = pedestalWidths.getAllContainers();
129  auto const effectivePedestalWidths_containers = effectivePedestalWidths.getAllContainers();
130  auto const gainWidths_containers = gainWidths.getAllContainers();
131  auto const channelQuality_containers = channelQuality.getAllContainers();
132  auto const qieTypes_containers = qieTypes.getAllContainers();
133  auto const qieData_containers = qieData.getAllContainers();
134  auto const sipmParameters_containers = sipmParameters.getAllContainers();
135 
136  auto const& pedestals_barrel = pedestals_containers[0].second;
137  auto const& effectivePedestals_barrel = effectivePedestals_containers[0].second;
138  auto const& gains_barrel = gains_containers[0].second;
139  auto const& lutCorrs_barrel = lutCorrs_containers[0].second;
140  auto const& respCorrs_barrel = respCorrs_containers[0].second;
141  auto const& timeCorrs_barrel = timeCorrs_containers[0].second;
142  auto const& pedestalWidths_barrel = pedestalWidths_containers[0].second;
143  auto const& effectivePedestalWidths_barrel = effectivePedestalWidths_containers[0].second;
144  auto const& gainWidths_barrel = gainWidths_containers[0].second;
145  auto const& channelQuality_barrel = channelQuality_containers[0].second;
146  auto const& qieTypes_barrel = qieTypes_containers[0].second;
147  auto const& qieData_barrel = qieData_containers[0].second;
148  auto const& sipmParameters_barrel = sipmParameters_containers[0].second;
149 
150  for (uint64_t i = 0; i < pedestals_barrel.size(); ++i) {
151  auto vi = view[i];
152 
153  // convert pedestals
154  auto const& qieCoder = qieData_barrel[i];
155  auto const qieType = qieTypes_barrel[i].getValue() > 1 ? 1 : 0;
156  auto const& qieShape = qieData.getShape(qieType);
157 
158  // covert pedestal values if unit is ADC
159  vi.pedestals_value()[0] = ped_unitIsADC ? convertPed(pedestals_barrel[i].getValue(0), 0, qieCoder, qieShape)
160  : pedestals_barrel[i].getValue(0);
161  vi.pedestals_value()[1] = ped_unitIsADC ? convertPed(pedestals_barrel[i].getValue(1), 1, qieCoder, qieShape)
162  : pedestals_barrel[i].getValue(1);
163  vi.pedestals_value()[2] = ped_unitIsADC ? convertPed(pedestals_barrel[i].getValue(2), 2, qieCoder, qieShape)
164  : pedestals_barrel[i].getValue(2);
165  vi.pedestals_value()[3] = ped_unitIsADC ? convertPed(pedestals_barrel[i].getValue(3), 3, qieCoder, qieShape)
166  : pedestals_barrel[i].getValue(3);
167 
168  vi.pedestals_width()[0] =
169  ped_unitIsADC
170  ? convertPedWidths(
171  pedestals_barrel[i].getValue(0), pedestalWidths_barrel[i].getWidth(0), 0, qieCoder, qieShape)
172  : pedestalWidths_barrel[i].getWidth(0);
173  vi.pedestals_width()[1] =
174  ped_unitIsADC
175  ? convertPedWidths(
176  pedestals_barrel[i].getValue(1), pedestalWidths_barrel[i].getWidth(1), 1, qieCoder, qieShape)
177  : pedestalWidths_barrel[i].getWidth(1);
178  vi.pedestals_width()[2] =
179  ped_unitIsADC
180  ? convertPedWidths(
181  pedestals_barrel[i].getValue(2), pedestalWidths_barrel[i].getWidth(2), 2, qieCoder, qieShape)
182  : pedestalWidths_barrel[i].getWidth(2);
183  vi.pedestals_width()[3] =
184  ped_unitIsADC
185  ? convertPedWidths(
186  pedestals_barrel[i].getValue(3), pedestalWidths_barrel[i].getWidth(3), 3, qieCoder, qieShape)
187  : pedestalWidths_barrel[i].getWidth(3);
188 
189  vi.effectivePedestals()[0] = effPed_unitIsADC
190  ? convertPed(effectivePedestals_barrel[i].getValue(0), 0, qieCoder, qieShape)
191  : effectivePedestals_barrel[i].getValue(0);
192  vi.effectivePedestals()[1] = effPed_unitIsADC
193  ? convertPed(effectivePedestals_barrel[i].getValue(1), 1, qieCoder, qieShape)
194  : effectivePedestals_barrel[i].getValue(1);
195  vi.effectivePedestals()[2] = effPed_unitIsADC
196  ? convertPed(effectivePedestals_barrel[i].getValue(2), 2, qieCoder, qieShape)
197  : effectivePedestals_barrel[i].getValue(2);
198  vi.effectivePedestals()[3] = effPed_unitIsADC
199  ? convertPed(effectivePedestals_barrel[i].getValue(3), 3, qieCoder, qieShape)
200  : effectivePedestals_barrel[i].getValue(3);
201 
202  vi.effectivePedestalWidths()[0] = effPed_unitIsADC
203  ? convertPedWidths(effectivePedestals_barrel[i].getValue(0),
204  effectivePedestalWidths_barrel[i].getWidth(0),
205  0,
206  qieCoder,
207  qieShape)
208  : effectivePedestalWidths_barrel[i].getWidth(0);
209  vi.effectivePedestalWidths()[1] = effPed_unitIsADC
210  ? convertPedWidths(effectivePedestals_barrel[i].getValue(1),
211  effectivePedestalWidths_barrel[i].getWidth(1),
212  1,
213  qieCoder,
214  qieShape)
215  : effectivePedestalWidths_barrel[i].getWidth(1);
216  vi.effectivePedestalWidths()[2] = effPed_unitIsADC
217  ? convertPedWidths(effectivePedestals_barrel[i].getValue(2),
218  effectivePedestalWidths_barrel[i].getWidth(2),
219  2,
220  qieCoder,
221  qieShape)
222  : effectivePedestalWidths_barrel[i].getWidth(2);
223  vi.effectivePedestalWidths()[3] = effPed_unitIsADC
224  ? convertPedWidths(effectivePedestals_barrel[i].getValue(3),
225  effectivePedestalWidths_barrel[i].getWidth(3),
226  3,
227  qieCoder,
228  qieShape)
229  : effectivePedestalWidths_barrel[i].getWidth(3);
230 
231  vi.gains_value()[0] = gains_barrel[i].getValue(0);
232  vi.gains_value()[1] = gains_barrel[i].getValue(1);
233  vi.gains_value()[2] = gains_barrel[i].getValue(2);
234  vi.gains_value()[3] = gains_barrel[i].getValue(3);
235 
236  vi.lutCorrs_values() = lutCorrs_barrel[i].getValue();
237  vi.respCorrs_values() = respCorrs_barrel[i].getValue();
238  vi.timeCorrs_values() = timeCorrs_barrel[i].getValue();
239 
240  vi.pedestalWidths_sigma00() = *(pedestalWidths_barrel[i].getValues());
241  vi.pedestalWidths_sigma01() = *(pedestalWidths_barrel[i].getValues() + 1);
242  vi.pedestalWidths_sigma02() = *(pedestalWidths_barrel[i].getValues() + 2);
243  vi.pedestalWidths_sigma03() = *(pedestalWidths_barrel[i].getValues() + 3);
244  vi.pedestalWidths_sigma10() = *(pedestalWidths_barrel[i].getValues() + 4);
245  vi.pedestalWidths_sigma11() = *(pedestalWidths_barrel[i].getValues() + 5);
246  vi.pedestalWidths_sigma12() = *(pedestalWidths_barrel[i].getValues() + 6);
247  vi.pedestalWidths_sigma13() = *(pedestalWidths_barrel[i].getValues() + 7);
248  vi.pedestalWidths_sigma20() = *(pedestalWidths_barrel[i].getValues() + 8);
249  vi.pedestalWidths_sigma21() = *(pedestalWidths_barrel[i].getValues() + 9);
250  vi.pedestalWidths_sigma22() = *(pedestalWidths_barrel[i].getValues() + 10);
251  vi.pedestalWidths_sigma23() = *(pedestalWidths_barrel[i].getValues() + 11);
252  vi.pedestalWidths_sigma30() = *(pedestalWidths_barrel[i].getValues() + 12);
253  vi.pedestalWidths_sigma31() = *(pedestalWidths_barrel[i].getValues() + 13);
254  vi.pedestalWidths_sigma32() = *(pedestalWidths_barrel[i].getValues() + 14);
255  vi.pedestalWidths_sigma33() = *(pedestalWidths_barrel[i].getValues() + 15);
256 
257  vi.gainWidths_value0() = gainWidths_barrel[i].getValue(0);
258  vi.gainWidths_value1() = gainWidths_barrel[i].getValue(1);
259  vi.gainWidths_value2() = gainWidths_barrel[i].getValue(2);
260  vi.gainWidths_value3() = gainWidths_barrel[i].getValue(3);
261 
262  vi.channelQuality_status() = channelQuality_barrel[i].getValue();
263  vi.qieTypes_values() = qieTypes_barrel[i].getValue();
264 
265  for (uint32_t k = 0; k < 4; k++)
266  for (uint32_t l = 0; l < 4; l++) {
267  auto const linear = k * 4 + l;
268  vi.qieCoders_offsets()[linear] = qieData_barrel[i].offset(k, l);
269  vi.qieCoders_slopes()[linear] = qieData_barrel[i].slope(k, l);
270  }
271 
272  vi.sipmPar_type() = sipmParameters_barrel[i].getType();
273  vi.sipmPar_auxi1() = sipmParameters_barrel[i].getauxi1();
274  vi.sipmPar_fcByPE() = sipmParameters_barrel[i].getFCByPE();
275  vi.sipmPar_darkCurrent() = sipmParameters_barrel[i].getDarkCurrent();
276  vi.sipmPar_auxi2() = sipmParameters_barrel[i].getauxi2();
277  }
278 
279  // fill HE channels
280  auto const& pedestals_endcaps = pedestals_containers[1].second;
281  auto const& effectivePedestals_endcaps = effectivePedestals_containers[1].second;
282  auto const& gains_endcaps = gains_containers[1].second;
283  auto const& lutCorrs_endcaps = lutCorrs_containers[1].second;
284  auto const& respCorrs_endcaps = respCorrs_containers[1].second;
285  auto const& timeCorrs_endcaps = timeCorrs_containers[1].second;
286  auto const& pedestalWidths_endcaps = pedestalWidths_containers[1].second;
287  auto const& effectivePedestalWidths_endcaps = effectivePedestalWidths_containers[1].second;
288  auto const& gainWidths_endcaps = gainWidths_containers[1].second;
289  auto const& channelQuality_endcaps = channelQuality_containers[1].second;
290  auto const& qieTypes_endcaps = qieTypes_containers[1].second;
291  auto const& qieData_endcaps = qieData_containers[1].second;
292  auto const& sipmParameters_endcaps = sipmParameters_containers[1].second;
293 
294  auto const offset = pedestals_barrel.size();
295 
296  for (uint64_t i = 0; i < pedestals_endcaps.size(); ++i) {
297  auto const& qieCoder = qieData_endcaps[i];
298  auto const qieType = qieTypes_endcaps[i].getValue() > 1 ? 1 : 0;
299  auto const& qieShape = qieData.getShape(qieType);
300 
301  auto vi = view[offset + i];
302 
303  vi.pedestals_value()[0] = ped_unitIsADC ? convertPed(pedestals_endcaps[i].getValue(0), 0, qieCoder, qieShape)
304  : pedestals_endcaps[i].getValue(0);
305  vi.pedestals_value()[1] = ped_unitIsADC ? convertPed(pedestals_endcaps[i].getValue(1), 1, qieCoder, qieShape)
306  : pedestals_endcaps[i].getValue(1);
307  vi.pedestals_value()[2] = ped_unitIsADC ? convertPed(pedestals_endcaps[i].getValue(2), 2, qieCoder, qieShape)
308  : pedestals_endcaps[i].getValue(2);
309  vi.pedestals_value()[3] = ped_unitIsADC ? convertPed(pedestals_endcaps[i].getValue(3), 3, qieCoder, qieShape)
310  : pedestals_endcaps[i].getValue(3);
311 
312  vi.pedestals_width()[0] =
313  ped_unitIsADC
314  ? convertPedWidths(
315  pedestals_endcaps[i].getValue(0), pedestalWidths_endcaps[i].getWidth(0), 0, qieCoder, qieShape)
316  : pedestalWidths_endcaps[i].getWidth(0);
317  vi.pedestals_width()[1] =
318  ped_unitIsADC
319  ? convertPedWidths(
320  pedestals_endcaps[i].getValue(1), pedestalWidths_endcaps[i].getWidth(1), 1, qieCoder, qieShape)
321  : pedestalWidths_endcaps[i].getWidth(1);
322  vi.pedestals_width()[2] =
323  ped_unitIsADC
324  ? convertPedWidths(
325  pedestals_endcaps[i].getValue(2), pedestalWidths_endcaps[i].getWidth(2), 2, qieCoder, qieShape)
326  : pedestalWidths_endcaps[i].getWidth(2);
327  vi.pedestals_width()[3] =
328  ped_unitIsADC
329  ? convertPedWidths(
330  pedestals_endcaps[i].getValue(3), pedestalWidths_endcaps[i].getWidth(3), 3, qieCoder, qieShape)
331  : pedestalWidths_endcaps[i].getWidth(3);
332 
333  vi.effectivePedestals()[0] = effPed_unitIsADC
334  ? convertPed(effectivePedestals_endcaps[i].getValue(0), 0, qieCoder, qieShape)
335  : effectivePedestals_endcaps[i].getValue(0);
336  vi.effectivePedestals()[1] = effPed_unitIsADC
337  ? convertPed(effectivePedestals_endcaps[i].getValue(1), 1, qieCoder, qieShape)
338  : effectivePedestals_endcaps[i].getValue(1);
339  vi.effectivePedestals()[2] = effPed_unitIsADC
340  ? convertPed(effectivePedestals_endcaps[i].getValue(2), 2, qieCoder, qieShape)
341  : effectivePedestals_endcaps[i].getValue(2);
342  vi.effectivePedestals()[3] = effPed_unitIsADC
343  ? convertPed(effectivePedestals_endcaps[i].getValue(3), 3, qieCoder, qieShape)
344  : effectivePedestals_endcaps[i].getValue(3);
345 
346  vi.effectivePedestalWidths()[0] = effPed_unitIsADC
347  ? convertPedWidths(effectivePedestals_endcaps[i].getValue(0),
348  effectivePedestalWidths_endcaps[i].getWidth(0),
349  0,
350  qieCoder,
351  qieShape)
352  : effectivePedestalWidths_endcaps[i].getWidth(0);
353  vi.effectivePedestalWidths()[1] = effPed_unitIsADC
354  ? convertPedWidths(effectivePedestals_endcaps[i].getValue(1),
355  effectivePedestalWidths_endcaps[i].getWidth(1),
356  1,
357  qieCoder,
358  qieShape)
359  : effectivePedestalWidths_endcaps[i].getWidth(1);
360  vi.effectivePedestalWidths()[2] = effPed_unitIsADC
361  ? convertPedWidths(effectivePedestals_endcaps[i].getValue(2),
362  effectivePedestalWidths_endcaps[i].getWidth(2),
363  2,
364  qieCoder,
365  qieShape)
366  : effectivePedestalWidths_endcaps[i].getWidth(2);
367  vi.effectivePedestalWidths()[3] = effPed_unitIsADC
368  ? convertPedWidths(effectivePedestals_endcaps[i].getValue(3),
369  effectivePedestalWidths_endcaps[i].getWidth(3),
370  3,
371  qieCoder,
372  qieShape)
373  : effectivePedestalWidths_endcaps[i].getWidth(3);
374 
375  vi.gains_value()[0] = gains_endcaps[i].getValue(0);
376  vi.gains_value()[1] = gains_endcaps[i].getValue(1);
377  vi.gains_value()[2] = gains_endcaps[i].getValue(2);
378  vi.gains_value()[3] = gains_endcaps[i].getValue(3);
379 
380  vi.lutCorrs_values() = lutCorrs_endcaps[i].getValue();
381  vi.respCorrs_values() = respCorrs_endcaps[i].getValue();
382  vi.timeCorrs_values() = timeCorrs_endcaps[i].getValue();
383 
384  vi.pedestalWidths_sigma00() = *(pedestalWidths_endcaps[i].getValues());
385  vi.pedestalWidths_sigma01() = *(pedestalWidths_endcaps[i].getValues() + 1);
386  vi.pedestalWidths_sigma02() = *(pedestalWidths_endcaps[i].getValues() + 2);
387  vi.pedestalWidths_sigma03() = *(pedestalWidths_endcaps[i].getValues() + 3);
388  vi.pedestalWidths_sigma10() = *(pedestalWidths_endcaps[i].getValues() + 4);
389  vi.pedestalWidths_sigma11() = *(pedestalWidths_endcaps[i].getValues() + 5);
390  vi.pedestalWidths_sigma12() = *(pedestalWidths_endcaps[i].getValues() + 6);
391  vi.pedestalWidths_sigma13() = *(pedestalWidths_endcaps[i].getValues() + 7);
392  vi.pedestalWidths_sigma20() = *(pedestalWidths_endcaps[i].getValues() + 8);
393  vi.pedestalWidths_sigma21() = *(pedestalWidths_endcaps[i].getValues() + 9);
394  vi.pedestalWidths_sigma22() = *(pedestalWidths_endcaps[i].getValues() + 10);
395  vi.pedestalWidths_sigma23() = *(pedestalWidths_endcaps[i].getValues() + 11);
396  vi.pedestalWidths_sigma30() = *(pedestalWidths_endcaps[i].getValues() + 12);
397  vi.pedestalWidths_sigma31() = *(pedestalWidths_endcaps[i].getValues() + 13);
398  vi.pedestalWidths_sigma32() = *(pedestalWidths_endcaps[i].getValues() + 14);
399  vi.pedestalWidths_sigma33() = *(pedestalWidths_endcaps[i].getValues() + 15);
400 
401  vi.gainWidths_value0() = gainWidths_endcaps[i].getValue(0);
402  vi.gainWidths_value1() = gainWidths_endcaps[i].getValue(1);
403  vi.gainWidths_value2() = gainWidths_endcaps[i].getValue(2);
404  vi.gainWidths_value3() = gainWidths_endcaps[i].getValue(3);
405 
406  vi.channelQuality_status() = channelQuality_endcaps[i].getValue();
407  vi.qieTypes_values() = qieTypes_endcaps[i].getValue();
408 
409  for (uint32_t k = 0; k < 4; k++)
410  for (uint32_t l = 0; l < 4; l++) {
411  auto const linear = k * 4u + l;
412  vi.qieCoders_offsets()[linear] = qieData_endcaps[i].offset(k, l);
413  vi.qieCoders_slopes()[linear] = qieData_endcaps[i].slope(k, l);
414  }
415 
416  vi.sipmPar_type() = sipmParameters_endcaps[i].getType();
417  vi.sipmPar_auxi1() = sipmParameters_endcaps[i].getauxi1();
418  vi.sipmPar_fcByPE() = sipmParameters_endcaps[i].getFCByPE();
419  vi.sipmPar_darkCurrent() = sipmParameters_endcaps[i].getDarkCurrent();
420  vi.sipmPar_auxi2() = sipmParameters_endcaps[i].getauxi2();
421  }
422  //fill the scalars
423  static const int IPHI_MAX = 72; // private member of topology
424 
425  view.maxDepthHB() = topology.maxDepthHB();
426  view.maxDepthHE() = topology.maxDepthHE();
427  view.maxPhiHE() = recConstants.getNPhi(1) > IPHI_MAX ? recConstants.getNPhi(1) : IPHI_MAX;
428  view.firstHBRing() = topology.firstHBRing();
429  view.lastHBRing() = topology.lastHBRing();
430  view.firstHERing() = topology.firstHERing();
431  view.lastHERing() = topology.lastHERing();
432  view.nEtaHB() = recConstants.getEtaRange(0).second - recConstants.getEtaRange(0).first + 1;
433  view.nEtaHE() =
434  topology.firstHERing() > topology.lastHERing() ? 0 : (topology.lastHERing() - topology.firstHERing() + 1);
435  view.offsetForHashes() = offset;
436 
437  return product;
438  }
edm::ESGetToken< HcalQIETypes, HcalQIETypesRcd > qieTypesToken_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topologyToken_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > recConstantsToken_
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > respCorrsToken_
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcd > effectivePedestalWidthsToken_
edm::ESGetToken< HcalGainWidths, HcalGainWidthsRcd > gainWidthsToken_
edm::ESGetToken< HcalTimeCorrs, HcalTimeCorrsRcd > timeCorrsToken_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > channelQualityToken_
edm::ESGetToken< HcalRecoParams, HcalRecoParamsRcd > recoParamsToken_
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > pedestalsToken_
edm::ESGetToken< HcalQIEData, HcalQIEDataRcd > qieDataToken_
constexpr float gains[NGAINS]
Definition: EcalConstants.h:20
alpaka::DevCpu const & host()
Definition: host.h:14
unsigned long long uint64_t
Definition: Time.h:13
edm::ESGetToken< HcalPedestalWidths, HcalPedestalWidthsRcd > pedestalWidthsToken_
edm::ESGetToken< HcalSiPMParameters, HcalSiPMParametersRcd > sipmParametersToken_
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
float linear(float x)
edm::ESGetToken< HcalLUTCorrs, HcalLUTCorrsRcd > lutCorrsToken_
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > effectivePedestalsToken_
static const int IPHI_MAX
Definition: HcalTopology.cc:13

Member Data Documentation

◆ channelQualityToken_

edm::ESGetToken<HcalChannelQuality, HcalChannelQualityRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::channelQualityToken_
private

Definition at line 451 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ effectivePedestalsToken_

edm::ESGetToken<HcalPedestals, HcalPedestalsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::effectivePedestalsToken_
private

Definition at line 443 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ effectivePedestalWidthsToken_

edm::ESGetToken<HcalPedestalWidths, HcalPedestalWidthsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::effectivePedestalWidthsToken_
private

Definition at line 449 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ gainsToken_

edm::ESGetToken<HcalGains, HcalGainsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::gainsToken_
private

Definition at line 444 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ gainWidthsToken_

edm::ESGetToken<HcalGainWidths, HcalGainWidthsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::gainWidthsToken_
private

Definition at line 450 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ lutCorrsToken_

edm::ESGetToken<HcalLUTCorrs, HcalLUTCorrsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::lutCorrsToken_
private

Definition at line 445 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ pedestalsToken_

edm::ESGetToken<HcalPedestals, HcalPedestalsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::pedestalsToken_
private

Definition at line 442 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ pedestalWidthsToken_

edm::ESGetToken<HcalPedestalWidths, HcalPedestalWidthsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::pedestalWidthsToken_
private

Definition at line 448 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ qieDataToken_

edm::ESGetToken<HcalQIEData, HcalQIEDataRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::qieDataToken_
private

Definition at line 453 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ qieTypesToken_

edm::ESGetToken<HcalQIETypes, HcalQIETypesRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::qieTypesToken_
private

Definition at line 452 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ recConstantsToken_

edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::recConstantsToken_
private

Definition at line 456 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ recoParamsToken_

edm::ESGetToken<HcalRecoParams, HcalRecoParamsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::recoParamsToken_
private

Definition at line 441 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ respCorrsToken_

edm::ESGetToken<HcalRespCorrs, HcalRespCorrsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::respCorrsToken_
private

Definition at line 446 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ sipmParametersToken_

edm::ESGetToken<HcalSiPMParameters, HcalSiPMParametersRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::sipmParametersToken_
private

Definition at line 454 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ timeCorrsToken_

edm::ESGetToken<HcalTimeCorrs, HcalTimeCorrsRcd> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::timeCorrsToken_
private

Definition at line 447 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().

◆ topologyToken_

edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiConditionsESProducer::topologyToken_
private

Definition at line 455 of file HcalMahiConditionsESProducer.cc.

Referenced by HcalMahiConditionsESProducer(), and produce().