Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:43

0001 #ifndef RecoLocalCalo_EcalRecProducers_plugins_EcalRecHitBuilderKernels_h
0002 #define RecoLocalCalo_EcalRecProducers_plugins_EcalRecHitBuilderKernels_h
0003 
0004 //
0005 // Builder of ECAL RecHits on GPU
0006 //
0007 
0008 #include "CUDADataFormats/EcalRecHitSoA/interface/EcalRecHit.h"
0009 #include "CUDADataFormats/EcalRecHitSoA/interface/EcalUncalibratedRecHit.h"
0010 #include "DataFormats/Provenance/interface/Timestamp.h"
0011 
0012 #include "DeclsForKernels.h"
0013 
0014 namespace ecal {
0015   namespace rechit {
0016 
0017     __global__ void kernel_create_ecal_rehit(
0018         // configuration
0019         int const* ChannelStatusToBeExcluded,
0020         uint32_t ChannelStatusToBeExcludedSize,
0021         bool killDeadChannels,
0022         bool const recoverEBIsolatedChannels,
0023         bool const recoverEEIsolatedChannels,
0024         bool const recoverEBVFE,
0025         bool const recoverEEVFE,
0026         bool const recoverEBFE,
0027         bool const recoverEEFE,
0028         // for flags setting
0029         int const* expanded_v_DB_reco_flags,
0030         uint32_t const* expanded_Sizes_v_DB_reco_flags,
0031         uint32_t const* expanded_flagbit_v_DB_reco_flags,
0032         uint32_t expanded_v_DB_reco_flagsSize,
0033         uint32_t flagmask,
0034         // conditions
0035         float const* adc2gev,
0036         float const* intercalib,
0037         uint16_t const* status,
0038         float const* apdpnrefs,
0039         float const* alphas,
0040         // input for transparency corrections
0041         float const* p1,
0042         float const* p2,
0043         float const* p3,
0044         edm::TimeValue_t const* t1,
0045         edm::TimeValue_t const* t2,
0046         edm::TimeValue_t const* t3,
0047         // input for linear corrections
0048         float const* lp1,
0049         float const* lp2,
0050         float const* lp3,
0051         edm::TimeValue_t const* lt1,
0052         edm::TimeValue_t const* lt2,
0053         edm::TimeValue_t const* lt3,
0054         // time, used for time dependent corrections
0055         edm::TimeValue_t const event_time,
0056         // input
0057         uint32_t const* did_eb,
0058         uint32_t const* did_ee,
0059         ::ecal::reco::StorageScalarType const* amplitude_eb,  // in adc counts
0060         ::ecal::reco::StorageScalarType const* amplitude_ee,  // in adc counts
0061         ::ecal::reco::StorageScalarType const* time_eb,
0062         ::ecal::reco::StorageScalarType const* time_ee,
0063         ::ecal::reco::StorageScalarType const* chi2_eb,
0064         ::ecal::reco::StorageScalarType const* chi2_ee,
0065         uint32_t const* flags_eb,
0066         uint32_t const* flags_ee,
0067         // output
0068         uint32_t* did,
0069         ::ecal::reco::StorageScalarType* energy,  // in energy [GeV]
0070         ::ecal::reco::StorageScalarType* time,
0071         ::ecal::reco::StorageScalarType* chi2,
0072         uint32_t* flagBits,
0073         uint32_t* extra,
0074         int const nchannels,
0075         uint32_t const nChannelsBarrel,
0076         uint32_t const offsetForHashes);
0077 
0078     // host version, to be called by the plugin
0079 
0080     void create_ecal_rehit(EventInputDataGPU const& eventInputGPU,
0081                            EventOutputDataGPU& eventOutputGPU,
0082                            ConditionsProducts const& conditions,
0083                            ConfigurationParameters const& configParameters,
0084                            uint32_t const nChannelsBarrel,
0085                            edm::TimeValue_t const event_time,
0086                            cudaStream_t cudaStream);
0087 
0088   }  // namespace rechit
0089 
0090 }  // namespace ecal
0091 
0092 #endif  // RecoLocalCalo_EcalRecProducers_plugins_EcalRecHitBuilderKernels_h