-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46453 from thomreis/ecalrechitproducer-alpaka-mig…
…ration ECAL RecHit producer Alpaka migration
- Loading branch information
Showing
47 changed files
with
1,848 additions
and
26 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
CondFormats/DataRecord/interface/EcalRecHitConditionsRcd.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef CondFormats_DataRecord_EcalRecHitConditionsRcd_h | ||
#define CondFormats_DataRecord_EcalRecHitConditionsRcd_h | ||
|
||
#include "FWCore/Framework/interface/DependentRecordImplementation.h" | ||
|
||
#include "CondFormats/DataRecord/interface/EcalADCToGeVConstantRcd.h" | ||
#include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h" | ||
#include "CondFormats/DataRecord/interface/EcalIntercalibConstantsRcd.h" | ||
#include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRcd.h" | ||
#include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRefRcd.h" | ||
#include "CondFormats/DataRecord/interface/EcalLaserAlphasRcd.h" | ||
#include "CondFormats/DataRecord/interface/EcalLinearCorrectionsRcd.h" | ||
#include "CondFormats/DataRecord/interface/EcalTimeCalibConstantsRcd.h" | ||
#include "CondFormats/DataRecord/interface/EcalTimeOffsetConstantRcd.h" | ||
|
||
class EcalRecHitConditionsRcd | ||
: public edm::eventsetup::DependentRecordImplementation<EcalRecHitConditionsRcd, | ||
edm::mpl::Vector<EcalADCToGeVConstantRcd, | ||
EcalChannelStatusRcd, | ||
EcalIntercalibConstantsRcd, | ||
EcalLaserAPDPNRatiosRcd, | ||
EcalLaserAPDPNRatiosRefRcd, | ||
EcalLaserAlphasRcd, | ||
EcalLinearCorrectionsRcd, | ||
EcalTimeCalibConstantsRcd, | ||
EcalTimeOffsetConstantRcd>> {}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "CondFormats/DataRecord/interface/EcalRecHitConditionsRcd.h" | ||
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" | ||
|
||
EVENTSETUP_RECORD_REG(EcalRecHitConditionsRcd); |
11 changes: 11 additions & 0 deletions
11
CondFormats/EcalObjects/interface/EcalRecHitConditionsHost.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef CondFormats_EcalObjects_interface_EcalRecHitConditionsHost_h | ||
#define CondFormats_EcalObjects_interface_EcalRecHitConditionsHost_h | ||
|
||
#include "CondFormats/EcalObjects/interface/EcalRecHitConditionsSoA.h" | ||
#include "DataFormats/Portable/interface/PortableHostCollection.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/config.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/memory.h" | ||
|
||
using EcalRecHitConditionsHost = PortableHostCollection<EcalRecHitConditionsSoA>; | ||
|
||
#endif |
46 changes: 46 additions & 0 deletions
46
CondFormats/EcalObjects/interface/EcalRecHitConditionsSoA.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef CondFormats_EcalObjects_EcalRecHitConditionsSoA_h | ||
#define CondFormats_EcalObjects_EcalRecHitConditionsSoA_h | ||
|
||
#include "DataFormats/SoATemplate/interface/SoACommon.h" | ||
#include "DataFormats/SoATemplate/interface/SoALayout.h" | ||
#include "DataFormats/SoATemplate/interface/SoAView.h" | ||
#include "DataFormats/Provenance/interface/Timestamp.h" | ||
|
||
GENERATE_SOA_LAYOUT(EcalRecHitConditionsSoALayout, | ||
SOA_COLUMN(uint32_t, rawid), | ||
// energy intercalibrations | ||
SOA_COLUMN(float, intercalibConstants), | ||
// time intercalibrations | ||
SOA_COLUMN(float, timeCalibConstants), | ||
// channel status | ||
SOA_COLUMN(uint16_t, channelStatus), | ||
// laser APDPN ratios | ||
SOA_COLUMN(float, laserAPDPNRatios_p1), | ||
SOA_COLUMN(float, laserAPDPNRatios_p2), | ||
SOA_COLUMN(float, laserAPDPNRatios_p3), | ||
SOA_COLUMN(edm::TimeValue_t, laserAPDPNRatios_t1), | ||
SOA_COLUMN(edm::TimeValue_t, laserAPDPNRatios_t2), | ||
SOA_COLUMN(edm::TimeValue_t, laserAPDPNRatios_t3), | ||
// laser APDPN reference | ||
SOA_COLUMN(float, laserAPDPNref), | ||
// laser alphas | ||
SOA_COLUMN(float, laserAlpha), | ||
// linear corrections | ||
SOA_COLUMN(float, linearCorrections_p1), | ||
SOA_COLUMN(float, linearCorrections_p2), | ||
SOA_COLUMN(float, linearCorrections_p3), | ||
SOA_COLUMN(edm::TimeValue_t, linearCorrections_t1), | ||
SOA_COLUMN(edm::TimeValue_t, linearCorrections_t2), | ||
SOA_COLUMN(edm::TimeValue_t, linearCorrections_t3), | ||
// ADC to GeV constants | ||
SOA_SCALAR(float, adcToGeVConstantEB), | ||
SOA_SCALAR(float, adcToGeVConstantEE), | ||
// time offsets constants | ||
SOA_SCALAR(float, timeOffsetConstantEB), | ||
SOA_SCALAR(float, timeOffsetConstantEE), | ||
// offset for hashed ID access to EE items of columns | ||
SOA_SCALAR(uint32_t, offsetEE)) | ||
|
||
using EcalRecHitConditionsSoA = EcalRecHitConditionsSoALayout<>; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef CondFormats_EcalObjects_EcalRecHitParameters_h | ||
#define CondFormats_EcalObjects_EcalRecHitParameters_h | ||
|
||
#include <bitset> | ||
#include <array> | ||
|
||
constexpr size_t kNEcalChannelStatusCodes = 16; // The HW supports 16 channel status codes | ||
using RecoFlagBitsArray = | ||
std::array<uint32_t, kNEcalChannelStatusCodes>; // associate recoFlagBits to all channel status codes | ||
|
||
struct EcalRecHitParameters { | ||
RecoFlagBitsArray recoFlagBits; | ||
std::bitset<kNEcalChannelStatusCodes> channelStatusCodesToBeExcluded; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef CondFormats_EcalObjects_interface_EcalRecHitParametersHost_h | ||
#define CondFormats_EcalObjects_interface_EcalRecHitParametersHost_h | ||
|
||
#include "CondFormats/EcalObjects/interface/EcalRecHitParameters.h" | ||
#include "DataFormats/Portable/interface/PortableHostObject.h" | ||
|
||
using EcalRecHitParametersHost = PortableHostObject<EcalRecHitParameters>; | ||
|
||
#endif |
17 changes: 17 additions & 0 deletions
17
CondFormats/EcalObjects/interface/alpaka/EcalRecHitConditionsDevice.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef CondFormats_EcalObjects_interface_alpaka_EcalRecHitConditionsDevice_h | ||
#define CondFormats_EcalObjects_interface_alpaka_EcalRecHitConditionsDevice_h | ||
|
||
#include "CondFormats/EcalObjects/interface/EcalRecHitConditionsHost.h" | ||
#include "CondFormats/EcalObjects/interface/EcalRecHitConditionsSoA.h" | ||
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/config.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/memory.h" | ||
|
||
namespace ALPAKA_ACCELERATOR_NAMESPACE { | ||
|
||
using ::EcalRecHitConditionsHost; | ||
using EcalRecHitConditionsDevice = PortableCollection<EcalRecHitConditionsSoA>; | ||
|
||
} // namespace ALPAKA_ACCELERATOR_NAMESPACE | ||
|
||
#endif |
18 changes: 18 additions & 0 deletions
18
CondFormats/EcalObjects/interface/alpaka/EcalRecHitParametersDevice.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef CondFormats_EcalObjects_interface_alpaka_EcalRecHitParametersDevice_h | ||
#define CondFormats_EcalObjects_interface_alpaka_EcalRecHitParametersDevice_h | ||
|
||
#include "CondFormats/EcalObjects/interface/EcalRecHitParameters.h" | ||
#include "CondFormats/EcalObjects/interface/EcalRecHitParametersHost.h" | ||
#include "DataFormats/Portable/interface/alpaka/PortableObject.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/config.h" | ||
|
||
namespace ALPAKA_ACCELERATOR_NAMESPACE { | ||
|
||
using ::EcalRecHitParametersHost; | ||
using EcalRecHitParametersDevice = PortableObject<EcalRecHitParameters>; | ||
|
||
} // namespace ALPAKA_ACCELERATOR_NAMESPACE | ||
|
||
ASSERT_DEVICE_MATCHES_HOST_COLLECTION(EcalRecHitParametersDevice, EcalRecHitParametersHost); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "CondFormats/EcalObjects/interface/EcalRecHitConditionsHost.h" | ||
#include "FWCore/Utilities/interface/typelookup.h" | ||
|
||
TYPELOOKUP_DATA_REG(EcalRecHitConditionsHost); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "CondFormats/EcalObjects/interface/EcalRecHitParametersHost.h" | ||
#include "FWCore/Utilities/interface/typelookup.h" | ||
|
||
TYPELOOKUP_DATA_REG(EcalRecHitParametersHost); |
4 changes: 4 additions & 0 deletions
4
CondFormats/EcalObjects/src/alpaka/ES_EcalRecHitConditionsDevice.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "HeterogeneousCore/AlpakaCore/interface/alpaka/typelookup.h" | ||
|
||
#include "CondFormats/EcalObjects/interface/alpaka/EcalRecHitConditionsDevice.h" | ||
TYPELOOKUP_ALPAKA_DATA_REG(EcalRecHitConditionsDevice); |
4 changes: 4 additions & 0 deletions
4
CondFormats/EcalObjects/src/alpaka/ES_EcalRecHitParametersDevice.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "HeterogeneousCore/AlpakaCore/interface/alpaka/typelookup.h" | ||
|
||
#include "CondFormats/EcalObjects/interface/alpaka/EcalRecHitParametersDevice.h" | ||
TYPELOOKUP_ALPAKA_DATA_REG(EcalRecHitParametersDevice); |
5 changes: 5 additions & 0 deletions
5
Configuration/ProcessModifiers/python/alpakaValidationEcal_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
# This modifier is for turning on alpaka validation modules for ECAL DQM | ||
|
||
alpakaValidationEcal = cms.Modifier() |
2 changes: 2 additions & 0 deletions
2
Configuration/ProcessModifiers/python/alpakaValidation_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from Configuration.ProcessModifiers.alpaka_cff import * | ||
from Configuration.ProcessModifiers.alpakaValidationEcal_cff import * | ||
from Configuration.ProcessModifiers.alpakaValidationPixel_cff import * | ||
|
||
# This modifier chain is for turning on DQM modules used for alpaka device/host validation | ||
|
||
alpakaValidation = cms.ModifierChain( | ||
alpaka, | ||
alpakaValidationEcal, | ||
alpakaValidationPixel | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.