CMS 3D CMS Logo

AmplitudeComputationCommonKernels.h
Go to the documentation of this file.
1 #ifndef RecoLocalCalo_EcalRecProducers_plugins_AmplitudeComputationCommonKernels_h
2 #define RecoLocalCalo_EcalRecProducers_plugins_AmplitudeComputationCommonKernels_h
3 
4 #include "DeclsForKernels.h"
5 #include "EigenMatrixTypes_gpu.h"
6 
7 class EcalPulseShape;
8 // this flag setting is applied to all of the cases
11 
12 namespace ecal {
13  namespace multifit {
14 
21  uint16_t const* digis_in_eb,
22  uint32_t const* dids_eb,
23  uint16_t const* digis_in_ee,
24  uint32_t const* dids_ee,
25  SampleVector* amplitudes,
26  SampleVector* amplitudesForMinimizationEB,
27  SampleVector* amplitudesForMinimizationEE,
28  SampleGainVector* gainsNoise,
29  float const* mean_x1,
30  float const* mean_x12,
31  float const* rms_x12,
32  float const* mean_x6,
33  float const* gain6Over1,
34  float const* gain12Over6,
35  bool* hasSwitchToGain6,
36  bool* hasSwitchToGain1,
37  bool* isSaturated,
38  ::ecal::reco::StorageScalarType* energiesEB,
39  ::ecal::reco::StorageScalarType* energiesEE,
42  ::ecal::reco::StorageScalarType* pedestalEB,
43  ::ecal::reco::StorageScalarType* pedestalEE,
44  uint32_t* dids_outEB,
45  uint32_t* dids_outEE,
46  uint32_t* flagsEB,
47  uint32_t* flagsEE,
48  char* acState,
49  BXVectorType* bxs,
50  uint32_t const offsetForHashes,
51  uint32_t const offsetForInputs,
52  bool const gainSwitchUseMaxSampleEB,
53  bool const gainSwitchUseMaxSampleEE,
54  int const nchannels);
55 
60  __global__ void kernel_prep_2d(SampleGainVector const* gainNoise,
61  uint32_t const* dids_eb,
62  uint32_t const* dids_ee,
63  float const* rms_x12,
64  float const* rms_x6,
65  float const* rms_x1,
66  float const* gain12Over6,
67  float const* gain6Over1,
68  double const* G12SamplesCorrelationEB,
69  double const* G6SamplesCorrelationEB,
70  double const* G1SamplesCorrelationEB,
71  double const* G12SamplesCorrelationEE,
72  double const* G6SamplesCorrelationEE,
73  double const* G1SamplesCorrelationEE,
74  SampleMatrix* noisecov,
75  PulseMatrixType* pulse_matrix,
76  EcalPulseShape const* pulse_shape,
77  bool const* hasSwitchToGain6,
78  bool const* hasSwitchToGain1,
79  bool const* isSaturated,
80  uint32_t const offsetForHashes,
81  uint32_t const offsetForInputs);
82 
84  BXVectorType const* activeBXs,
86  char const* acState,
87  int const nchannels);
88 
95 #ifdef RUN_BUILD_AOS_RECHIT
96  __global__ void kernel_build_rechit(
97  float const* energies, float const* chi2s, uint32_t* dids, EcalUncalibratedRecHit* rechits, int nchannels);
98 #endif // RUN_BUILD_AOS_RECHIT
99 
100  } // namespace multifit
101 } // namespace ecal
102 
103 #endif // RecoLocalCalo_EcalRecProducers_plugins_AmplitudeComputationCommonKernels_h
Eigen::Matrix< data_type, SampleVectorSize, SampleVectorSize > SampleMatrix
__global__ void kernel_prep_1d_and_initialize(EcalPulseShape const *shapes_in, uint16_t const *digis_in_eb, uint32_t const *dids_eb, uint16_t const *digis_in_ee, uint32_t const *dids_ee, SampleVector *amplitudes, SampleVector *amplitudesForMinimizationEB, SampleVector *amplitudesForMinimizationEE, SampleGainVector *gainsNoise, float const *mean_x1, float const *mean_x12, float const *rms_x12, float const *mean_x6, float const *gain6Over1, float const *gain12Over6, bool *hasSwitchToGain6, bool *hasSwitchToGain1, bool *isSaturated, ::ecal::reco::StorageScalarType *energiesEB, ::ecal::reco::StorageScalarType *energiesEE, ::ecal::reco::StorageScalarType *chi2EB, ::ecal::reco::StorageScalarType *chi2EE, ::ecal::reco::StorageScalarType *pedestalEB, ::ecal::reco::StorageScalarType *pedestalEE, uint32_t *dids_outEB, uint32_t *dids_outEE, uint32_t *flagsEB, uint32_t *flagsEE, char *acState, BXVectorType *bxs, uint32_t const offsetForHashes, uint32_t const offsetForInputs, bool const gainSwitchUseMaxSampleEB, bool const gainSwitchUseMaxSampleEE, int const nchannels)
#define __global__
Definition: cudaCompat.h:19
float StorageScalarType
Definition: RecoTypes.h:8
Eigen::Matrix< data_type, SampleVectorSize, 1 > SampleVector
Eigen::Matrix< data_type, SampleVectorSize, SampleVectorSize > PulseMatrixType
Eigen::Matrix< char, SampleVectorSize, 1 > SampleGainVector
__global__ void kernel_prep_2d(SampleGainVector const *gainNoise, uint32_t const *dids_eb, uint32_t const *dids_ee, float const *rms_x12, float const *rms_x6, float const *rms_x1, float const *gain12Over6, float const *gain6Over1, double const *G12SamplesCorrelationEB, double const *G6SamplesCorrelationEB, double const *G1SamplesCorrelationEB, double const *G12SamplesCorrelationEE, double const *G6SamplesCorrelationEE, double const *G1SamplesCorrelationEE, SampleMatrix *noisecov, PulseMatrixType *pulse_matrix, EcalPulseShape const *pulse_shape, bool const *hasSwitchToGain6, bool const *hasSwitchToGain1, bool const *isSaturated, uint32_t const offsetForHashes, uint32_t const offsetForInputs)
__global__ void kernel_permute_results(SampleVector *amplitudes, BXVectorType const *activeBXs, ::ecal::reco::StorageScalarType *energies, char const *acState, int const nchannels)
bool isSaturated(const Digi &digi, const int &maxADCvalue, int ifirst, int n)
Eigen::Matrix< char, SampleVectorSize, 1 > BXVectorType