CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PixelCPEFast.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_SiPixelRecHits_PixelCPEFast_h
2 #define RecoLocalTracker_SiPixelRecHits_PixelCPEFast_h
3 
4 #include <utility>
5 
12 
13 class MagneticField;
14 class PixelCPEFast final : public PixelCPEGenericBase {
15 public:
16  PixelCPEFast(edm::ParameterSet const &conf,
17  const MagneticField *,
18  const TrackerGeometry &,
19  const TrackerTopology &,
20  const SiPixelLorentzAngle *,
22  const SiPixelLorentzAngle *);
23 
24  ~PixelCPEFast() override = default;
25 
27 
28  // The return value can only be used safely in kernels launched on
29  // the same cudaStream, or after cudaStreamSynchronize.
30  const pixelCPEforGPU::ParamsOnGPU *getGPUProductAsync(cudaStream_t cudaStream) const;
31 
33 
34 private:
35  LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
36  LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
37 
38  void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const;
39 
40  //--- DB Error Parametrization object, new light templates
41  std::vector<SiPixelGenErrorStore> thePixelGenError_;
42 
43  // allocate this with posix malloc to be compatible with the cpu workflow
44  std::vector<pixelCPEforGPU::DetParams> detParamsGPU_;
49 
50  struct GPUData {
51  ~GPUData();
52  // not needed if not used on CPU...
54  pixelCPEforGPU::ParamsOnGPU *paramsOnGPU_d = nullptr; // copy of the above on the Device
55  };
57 
58  void fillParamsForGpu();
59 };
60 
61 #endif // RecoLocalTracker_SiPixelRecHits_PixelCPEFast_h
void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const
std::vector< SiPixelGenErrorStore > thePixelGenError_
Definition: PixelCPEFast.h:41
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
pixelCPEforGPU::ParamsOnGPU const & getCPUProduct() const
Definition: PixelCPEFast.h:32
pixelCPEforGPU::AverageGeometry averageGeometry_
Definition: PixelCPEFast.h:47
void fillParamsForGpu()
Definition: PixelCPEFast.cc:85
std::vector< pixelCPEforGPU::DetParams > detParamsGPU_
Definition: PixelCPEFast.h:44
static void fillPSetDescription(edm::ParameterSetDescription &desc)
pixelCPEforGPU::CommonParams commonParamsGPU_
Definition: PixelCPEFast.h:45
~PixelCPEFast() override=default
pixelCPEforGPU::ParamsOnGPU paramsOnGPU_h
Definition: PixelCPEFast.h:53
cms::cuda::ESProduct< GPUData > gpuData_
Definition: PixelCPEFast.h:56
PixelCPEFast(edm::ParameterSet const &conf, const MagneticField *, const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, const SiPixelLorentzAngle *)
The constructor.
Definition: PixelCPEFast.cc:23
const pixelCPEforGPU::ParamsOnGPU * getGPUProductAsync(cudaStream_t cudaStream) const
Definition: PixelCPEFast.cc:49
pixelCPEforGPU::ParamsOnGPU cpuData_
Definition: PixelCPEFast.h:48
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
pixelCPEforGPU::ParamsOnGPU * paramsOnGPU_d
Definition: PixelCPEFast.h:54
pixelCPEforGPU::LayerGeometry layerGeometry_
Definition: PixelCPEFast.h:46