CMS 3D CMS Logo

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 
13 
14 class MagneticField;
15 class PixelCPEFast final : public PixelCPEGenericBase {
16 public:
17  PixelCPEFast(edm::ParameterSet const &conf,
18  const MagneticField *,
19  const TrackerGeometry &,
20  const TrackerTopology &,
21  const SiPixelLorentzAngle *,
23  const SiPixelLorentzAngle *);
24 
25  ~PixelCPEFast() override = default;
26 
28 
29  // The return value can only be used safely in kernels launched on
30  // the same cudaStream, or after cudaStreamSynchronize.
31  const pixelCPEforGPU::ParamsOnGPU *getGPUProductAsync(cudaStream_t cudaStream) const;
32 
34 
35 private:
36  LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
37  LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
38 
39  void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const;
40 
41  //--- DB Error Parametrization object, new light templates
42  std::vector<SiPixelGenErrorStore> thePixelGenError_;
43 
44  // allocate this with posix malloc to be compatible with the cpu workflow
45  std::vector<pixelCPEforGPU::DetParams> detParamsGPU_;
50 
51  struct GPUData {
52  ~GPUData();
53  // not needed if not used on CPU...
55  pixelCPEforGPU::ParamsOnGPU *paramsOnGPU_d = nullptr; // copy of the above on the Device
56  };
58 
59  void fillParamsForGpu();
60 };
61 
62 #endif // RecoLocalTracker_SiPixelRecHits_PixelCPEFast_h
PixelCPEFast::GPUData::~GPUData
~GPUData()
Definition: PixelCPEFast.cc:348
pixelCPEforGPU.h
PixelCPEFast::cpuData_
pixelCPEforGPU::ParamsOnGPU cpuData_
Definition: PixelCPEFast.h:49
SiPixelGenError.h
PixelCPEFast::localError
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEFast.cc:469
HostAllocator.h
TrackerTopology
Definition: TrackerTopology.h:16
SiPixelCPEGenericDBErrorParametrization.h
PixelCPEFast::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: PixelCPEFast.cc:483
PixelCPEFast::getCPUProduct
const pixelCPEforGPU::ParamsOnGPU & getCPUProduct() const
Definition: PixelCPEFast.h:33
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PixelCPEFast::GPUData::paramsOnGPU_d
pixelCPEforGPU::ParamsOnGPU * paramsOnGPU_d
Definition: PixelCPEFast.h:55
SiPixelTemplate.h
PixelCPEFast::thePixelGenError_
std::vector< SiPixelGenErrorStore > thePixelGenError_
Definition: PixelCPEFast.h:42
PixelCPEFast::~PixelCPEFast
~PixelCPEFast() override=default
PixelCPEFast
Definition: PixelCPEFast.h:15
cms::cuda::ESProduct
Definition: ESProduct.h:20
SiPixelLorentzAngle
Definition: SiPixelLorentzAngle.h:11
Point3DBase< float, LocalTag >
PixelCPEFast::errorFromTemplates
void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const
Definition: PixelCPEFast.cc:358
PixelCPEFast::GPUData
Definition: PixelCPEFast.h:51
edm::ParameterSet
Definition: ParameterSet.h:47
pixelCPEforGPU::LayerGeometry
Definition: pixelCPEforGPU.h:55
LocalError
Definition: LocalError.h:12
PixelCPEGenericBase.h
PixelCPEFast::fillParamsForGpu
void fillParamsForGpu()
Definition: PixelCPEFast.cc:85
pixelCPEforGPU::CommonParams
Definition: pixelCPEforGPU.h:22
PixelCPEGenericBase
Definition: PixelCPEGenericBase.h:7
phase1PixelTopology::AverageGeometry
Definition: phase1PixelTopology.h:161
PixelCPEFast::GPUData::paramsOnGPU_h
pixelCPEforGPU::ParamsOnGPU paramsOnGPU_h
Definition: PixelCPEFast.h:54
PixelCPEFast::layerGeometry_
pixelCPEforGPU::LayerGeometry layerGeometry_
Definition: PixelCPEFast.h:47
PixelCPEFast::detParamsGPU_
std::vector< pixelCPEforGPU::DetParams > detParamsGPU_
Definition: PixelCPEFast.h:45
pixelCPEforGPU::ParamsOnGPU
Definition: pixelCPEforGPU.h:60
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PixelCPEFast::averageGeometry_
pixelCPEforGPU::AverageGeometry averageGeometry_
Definition: PixelCPEFast.h:48
PixelCPEFast::gpuData_
cms::cuda::ESProduct< GPUData > gpuData_
Definition: PixelCPEFast.h:57
SiPixelGenErrorDBObject
Definition: SiPixelGenErrorDBObject.h:16
PixelCPEFast::getGPUProductAsync
const pixelCPEforGPU::ParamsOnGPU * getGPUProductAsync(cudaStream_t cudaStream) const
Definition: PixelCPEFast.cc:49
MagneticField
Definition: MagneticField.h:19
PixelCPEFast::localPosition
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEFast.cc:414
ESProduct.h
PixelCPEFast::PixelCPEFast
PixelCPEFast(edm::ParameterSet const &conf, const MagneticField *, const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, const SiPixelLorentzAngle *)
The constructor.
Definition: PixelCPEFast.cc:23
TrackerGeometry
Definition: TrackerGeometry.h:14
PixelCPEFast::commonParamsGPU_
pixelCPEforGPU::CommonParams commonParamsGPU_
Definition: PixelCPEFast.h:46