Skip to content

Commit

Permalink
Adding CUDA DataFormats for GPU HGCal RecHit and UncalibRecHit
Browse files Browse the repository at this point in the history
  • Loading branch information
felicepantaleo authored and bfonta committed Sep 15, 2020
1 parent 715db98 commit d5af825
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
98 changes: 98 additions & 0 deletions CUDADataFormats/HGCal/interface/HGCConstant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#ifndef CUDADATAFORMATS_HGCCONSTANT_H
#define CUDADATAFORMATS_HGCCONSTANT_H 1

#include <vector>

class HGCConstantVectorData {
public:
std::vector<double> fCPerMIP;
std::vector<double> cce;
std::vector<double> noise_fC;
std::vector<double> rcorr;
std::vector<double> weights;
std::vector<int> waferTypeL;
};

class HGCeeUncalibratedRecHitConstantData {
public:
double hgcEE_keV2DIGI_;
double hgceeUncalib2GeV_;
double *hgcEE_fCPerMIP_;
double *hgcEE_cce_;
double *hgcEE_noise_fC_;
double *rcorr_;
double *weights_;
int *waferTypeL_;
float xmin_;
float xmax_;
float aterm_;
float cterm_;
uint32_t rangeMatch_;
uint32_t rangeMask_;
bool hgcEE_isSiFE_;
int nbytes;
int ndelem;
int nfelem;
int nuelem;
int nielem;
int nbelem;
int s_hgcEE_fCPerMIP_;
int s_hgcEE_cce_;
int s_hgcEE_noise_fC_;
int s_rcorr_;
int s_weights_;
int s_waferTypeL_;
};

class HGChefUncalibratedRecHitConstantData {
public:
double hgcHEF_keV2DIGI_;
double hgchefUncalib2GeV_;
double *hgcHEF_fCPerMIP_;
double *hgcHEF_cce_;
double *hgcHEF_noise_fC_;
double *rcorr_;
double *weights_;
int *waferTypeL_;
float xmin_;
float xmax_;
float aterm_;
float cterm_;
uint32_t rangeMatch_;
uint32_t rangeMask_;
uint32_t fhOffset_;
bool hgcHEF_isSiFE_;
int nbytes;
int ndelem;
int nfelem;
int nuelem;
int nielem;
int nbelem;
int s_hgcHEF_fCPerMIP_;
int s_hgcHEF_cce_;
int s_hgcHEF_noise_fC_;
int s_rcorr_;
int s_weights_;
int s_waferTypeL_;
};

class HGChebUncalibratedRecHitConstantData {
public:
double hgcHEB_keV2DIGI_;
double hgchebUncalib2GeV_;
double hgcHEB_noise_MIP_;
double *weights_;
uint32_t rangeMatch_;
uint32_t rangeMask_;
uint32_t fhOffset_;
bool hgcHEB_isSiFE_;
int nbytes;
int ndelem;
int nfelem;
int nuelem;
int nielem;
int nbelem;
int s_weights_;
};

#endif //CUDADATAFORMATS_HGCCONSTANT_H
15 changes: 15 additions & 0 deletions CUDADataFormats/HGCal/interface/HGCRecHitSoA.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef CUDADATAFORMATS_HGCRECHITSOA_H
#define CUDADATAFORMATS_HGCRECHITSOA_H 1

class HGCRecHitSoA {
public:
float *energy;
float *time;
float *timeError;
uint32_t *id;
uint32_t *flagBits;
uint8_t *son;
int nbytes;
};

#endif //CUDADATAFORMATS_HGCRECHITSOA_H
18 changes: 18 additions & 0 deletions CUDADataFormats/HGCal/interface/HGCUncalibratedRecHitSoA.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef CUDADATAFORMATS_HGCUNCALIBRATEDRECHITSOA_H
#define CUDADATAFORMATS_HGCUNCALIBRATEDRECHITSOA_H 1

class HGCUncalibratedRecHitSoA {
public:
float *amplitude;
float *pedestal;
float *jitter;
float *chi2;
float *OOTamplitude;
float *OOTchi2;
uint32_t *flags;
uint32_t *aux;
uint32_t *id;
int nbytes;
};

#endif //CUDADATAFORMATS_HGCUNCAIBRATEDRECHITSOA_H

0 comments on commit d5af825

Please sign in to comment.