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  bool isPhase2() const { return isPhase2_; };
35 
36 private:
37  LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
38  LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
39 
40  void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const;
41 
42  //--- DB Error Parametrization object, new light templates
43  std::vector<SiPixelGenErrorStore> thePixelGenError_;
44 
45  // allocate this with posix malloc to be compatible with the cpu workflow
46  std::vector<pixelCPEforGPU::DetParams> detParamsGPU_;
51 
52  bool isPhase2_;
53 
54  struct GPUData {
55  ~GPUData();
56  // not needed if not used on CPU...
58  pixelCPEforGPU::ParamsOnGPU *paramsOnGPU_d = nullptr; // copy of the above on the Device
59  };
61 
62  void fillParamsForGpu();
63 };
64 
65 #endif // RecoLocalTracker_SiPixelRecHits_PixelCPEFast_h
void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const
std::vector< SiPixelGenErrorStore > thePixelGenError_
Definition: PixelCPEFast.h:43
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
pixelCPEforGPU::ParamsOnGPU const & getCPUProduct() const
Definition: PixelCPEFast.h:32
pixelCPEforGPU::AverageGeometry averageGeometry_
Definition: PixelCPEFast.h:49
void fillParamsForGpu()
Definition: PixelCPEFast.cc:87
std::vector< pixelCPEforGPU::DetParams > detParamsGPU_
Definition: PixelCPEFast.h:46
static void fillPSetDescription(edm::ParameterSetDescription &desc)
pixelCPEforGPU::CommonParams commonParamsGPU_
Definition: PixelCPEFast.h:47
~PixelCPEFast() override=default
pixelCPEforGPU::ParamsOnGPU paramsOnGPU_h
Definition: PixelCPEFast.h:57
cms::cuda::ESProduct< GPUData > gpuData_
Definition: PixelCPEFast.h:60
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:51
pixelCPEforGPU::ParamsOnGPU cpuData_
Definition: PixelCPEFast.h:50
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
bool isPhase2() const
Definition: PixelCPEFast.h:34
pixelCPEforGPU::ParamsOnGPU * paramsOnGPU_d
Definition: PixelCPEFast.h:58
pixelCPEforGPU::LayerGeometry layerGeometry_
Definition: PixelCPEFast.h:48