Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-03 04:18:11

0001 #ifndef RecoLocalCalo_HcalRecProducers_plugins_alpaka_Mahi_h
0002 #define RecoLocalCalo_HcalRecProducers_plugins_alpaka_Mahi_h
0003 
0004 #include <vector>
0005 
0006 #include "DataFormats/HcalDigi/interface/alpaka/HcalDigiDeviceCollection.h"
0007 #include "DataFormats/HcalRecHit/interface/alpaka/HcalRecHitDeviceCollection.h"
0008 #include "CondFormats/HcalObjects/interface/alpaka/HcalMahiConditionsDevice.h"
0009 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0010 #include "HeterogeneousCore/AlpakaInterface/interface/traits.h"
0011 #include "CondFormats/HcalObjects/interface/alpaka/HcalMahiConditionsDevice.h"
0012 #include "CondFormats/HcalObjects/interface/alpaka/HcalSiPMCharacteristicsDevice.h"
0013 #include "CondFormats/HcalObjects/interface/alpaka/HcalRecoParamWithPulseShapeDevice.h"
0014 #include "CondFormats/HcalObjects/interface/alpaka/HcalMahiPulseOffsetsDevice.h"
0015 
0016 namespace ALPAKA_ACCELERATOR_NAMESPACE::hcal::reconstruction {
0017 
0018   struct ConfigParameters {
0019     uint32_t maxTimeSamples;
0020     uint32_t kprep1dChannelsPerBlock;
0021     int sipmQTSShift;
0022     int sipmQNTStoSum;
0023     int firstSampleShift;
0024     bool useEffectivePedestals;
0025 
0026     float meanTime;
0027     float timeSigmaSiPM, timeSigmaHPD;
0028     float ts4Thresh;
0029 
0030     std::array<uint32_t, 3> kernelMinimizeThreads;
0031 
0032     // FIXME:
0033     //   - add "getters" to HcalTimeSlew calib formats
0034     //   - add ES Producer to consume what is produced above not to replicate.
0035     //   which ones to use is hardcoded, therefore no need to send those to the device
0036     bool applyTimeSlew;
0037     float tzeroTimeSlew, slopeTimeSlew, tmaxTimeSlew;
0038   };
0039 
0040   using IProductTypef01 = hcal::Phase1DigiDeviceCollection;
0041   using IProductTypef5 = hcal::Phase0DigiDeviceCollection;
0042   using IProductTypef3 = hcal::Phase1DigiDeviceCollection;
0043   using OProductType = hcal::RecHitDeviceCollection;
0044 
0045   void runMahiAsync(Queue& queue,
0046                     IProductTypef01::ConstView const& f01HEDigis,
0047                     IProductTypef5::ConstView const& f5HBDigis,
0048                     IProductTypef3::ConstView const& f3HBDigis,
0049                     OProductType::View outputGPU,
0050                     HcalMahiConditionsPortableDevice::ConstView const& mahi,
0051                     HcalSiPMCharacteristicsPortableDevice::ConstView const& sipmCharacteristics,
0052                     HcalRecoParamWithPulseShapeDevice::ConstView const& recoParams,
0053                     HcalMahiPulseOffsetsPortableDevice::ConstView const& mahiPulseOffsets,
0054                     ConfigParameters const& configParameters);
0055 
0056 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE::hcal::reconstruction
0057 #endif