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 PixelCPEBase {
16 public:
20 
21  // The truncation value pix_maximum is an angle-dependent cutoff on the
22  // individual pixel signals. It should be applied to all pixels in the
23  // cluster [signal_i = fminf(signal_i, pixmax)] before the column and row
24  // sums are made. Morris
25  int pixmx;
26 
27  // These are errors predicted by PIXELAV
28  float sigmay; // CPE Generic y-error for multi-pixel cluster
29  float sigmax; // CPE Generic x-error for multi-pixel cluster
30  float sy1; // CPE Generic y-error for single single-pixel
31  float sy2; // CPE Generic y-error for single double-pixel cluster
32  float sx1; // CPE Generic x-error for single single-pixel cluster
33  float sx2; // CPE Generic x-error for single double-pixel cluster
34  };
35 
36  PixelCPEFast(edm::ParameterSet const &conf,
37  const MagneticField *,
38  const TrackerGeometry &,
39  const TrackerTopology &,
40  const SiPixelLorentzAngle *,
42  const SiPixelLorentzAngle *);
43 
44  ~PixelCPEFast() override = default;
45 
47 
48  // The return value can only be used safely in kernels launched on
49  // the same cudaStream, or after cudaStreamSynchronize.
50  const pixelCPEforGPU::ParamsOnGPU *getGPUProductAsync(cudaStream_t cudaStream) const;
51 
53 
54 private:
55  std::unique_ptr<PixelCPEBase::ClusterParam> createClusterParam(const SiPixelCluster &cl) const override;
56 
57  LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
58  LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
59 
60  void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const;
61 
62  static void collect_edge_charges(ClusterParam &theClusterParam,
63  int &q_f_X,
64  int &q_l_X,
65  int &q_f_Y,
66  int &q_l_Y,
67  bool truncate);
68 
69  const float edgeClusterErrorX_;
70  const float edgeClusterErrorY_;
73 
78 
79  //--- DB Error Parametrization object, new light templates
80  std::vector<SiPixelGenErrorStore> thePixelGenError_;
81 
82  // allocate this with posix malloc to be compatible with the cpu workflow
83  std::vector<pixelCPEforGPU::DetParams> detParamsGPU_;
88 
89  struct GPUData {
90  ~GPUData();
91  // not needed if not used on CPU...
93  pixelCPEforGPU::ParamsOnGPU *paramsOnGPU_d = nullptr; // copy of the above on the Device
94  };
96 
97  void fillParamsForGpu();
98 };
99 
100 #endif // RecoLocalTracker_SiPixelRecHits_PixelCPEFast_h
PixelCPEFast::GPUData::~GPUData
~GPUData()
Definition: PixelCPEFast.cc:276
PixelCPEFast::ClusterParamGeneric::sx2
float sx2
Definition: PixelCPEFast.h:33
PixelCPEBase::ClusterParam
Definition: PixelCPEBase.h:69
pixelCPEforGPU.h
PixelCPEFast::useErrorsFromTemplates_
const bool useErrorsFromTemplates_
Definition: PixelCPEFast.h:71
PixelCPEFast::ClusterParamGeneric::sigmay
float sigmay
Definition: PixelCPEFast.h:28
PixelCPEFast::cpuData_
pixelCPEforGPU::ParamsOnGPU cpuData_
Definition: PixelCPEFast.h:87
PixelCPEFast::ClusterParamGeneric::sy1
float sy1
Definition: PixelCPEFast.h:30
SiPixelGenError.h
PixelCPEFast::localError
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEFast.cc:441
HostAllocator.h
TrackerTopology
Definition: TrackerTopology.h:16
SiPixelCPEGenericDBErrorParametrization.h
PixelCPEFast::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: PixelCPEFast.cc:561
PixelCPEFast::getCPUProduct
const pixelCPEforGPU::ParamsOnGPU & getCPUProduct() const
Definition: PixelCPEFast.h:52
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PixelCPEBase.h
PixelCPEFast::collect_edge_charges
static void collect_edge_charges(ClusterParam &theClusterParam, int &q_f_X, int &q_l_X, int &q_f_Y, int &q_l_Y, bool truncate)
Definition: PixelCPEFast.cc:394
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition: SiPixelCluster.h:28
PixelCPEFast::yerr_barrel_ln_
std::vector< float > yerr_barrel_ln_
Definition: PixelCPEFast.h:75
PixelCPEFast::yerr_endcap_def_
float yerr_endcap_def_
Definition: PixelCPEFast.h:77
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
PixelCPEFast::GPUData::paramsOnGPU_d
pixelCPEforGPU::ParamsOnGPU * paramsOnGPU_d
Definition: PixelCPEFast.h:93
SiPixelTemplate.h
PixelCPEFast::yerr_barrel_l1_def_
float yerr_barrel_l1_def_
Definition: PixelCPEFast.h:76
PixelCPEFast::thePixelGenError_
std::vector< SiPixelGenErrorStore > thePixelGenError_
Definition: PixelCPEFast.h:80
PixelCPEFast::truncatePixelCharge_
const bool truncatePixelCharge_
Definition: PixelCPEFast.h:72
PixelCPEFast::~PixelCPEFast
~PixelCPEFast() override=default
PixelCPEFast
Definition: PixelCPEFast.h:15
cms::cuda::ESProduct
Definition: ESProduct.h:19
SiPixelLorentzAngle
Definition: SiPixelLorentzAngle.h:11
Point3DBase< float, LocalTag >
PixelCPEFast::xerr_barrel_l1_def_
float xerr_barrel_l1_def_
Definition: PixelCPEFast.h:76
PixelCPEFast::edgeClusterErrorY_
const float edgeClusterErrorY_
Definition: PixelCPEFast.h:70
PixelCPEFast::errorFromTemplates
void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const
Definition: PixelCPEFast.cc:290
PixelCPEFast::GPUData
Definition: PixelCPEFast.h:89
PixelCPEFast::edgeClusterErrorX_
const float edgeClusterErrorX_
Definition: PixelCPEFast.h:69
edm::ParameterSet
Definition: ParameterSet.h:47
PixelCPEFast::xerr_barrel_ln_def_
float xerr_barrel_ln_def_
Definition: PixelCPEFast.h:76
pixelCPEforGPU::LayerGeometry
Definition: pixelCPEforGPU.h:49
PixelCPEFast::ClusterParamGeneric::sx1
float sx1
Definition: PixelCPEFast.h:32
LocalError
Definition: LocalError.h:12
PixelCPEFast::createClusterParam
std::unique_ptr< PixelCPEBase::ClusterParam > createClusterParam(const SiPixelCluster &cl) const override
Definition: PixelCPEFast.cc:286
PixelCPEFast::fillParamsForGpu
void fillParamsForGpu()
Definition: PixelCPEFast.cc:104
pixelCPEforGPU::CommonParams
Definition: pixelCPEforGPU.h:20
PixelCPEFast::xerr_endcap_
std::vector< float > xerr_endcap_
Definition: PixelCPEFast.h:75
phase1PixelTopology::AverageGeometry
Definition: phase1PixelTopology.h:161
PixelCPEFast::GPUData::paramsOnGPU_h
pixelCPEforGPU::ParamsOnGPU paramsOnGPU_h
Definition: PixelCPEFast.h:92
PixelCPEFast::layerGeometry_
pixelCPEforGPU::LayerGeometry layerGeometry_
Definition: PixelCPEFast.h:85
PixelCPEFast::ClusterParamGeneric::sigmax
float sigmax
Definition: PixelCPEFast.h:29
PixelCPEFast::detParamsGPU_
std::vector< pixelCPEforGPU::DetParams > detParamsGPU_
Definition: PixelCPEFast.h:83
PixelCPEFast::yerr_endcap_
std::vector< float > yerr_endcap_
Definition: PixelCPEFast.h:75
pixelCPEforGPU::ParamsOnGPU
Definition: pixelCPEforGPU.h:54
PixelCPEFast::yerr_barrel_ln_def_
float yerr_barrel_ln_def_
Definition: PixelCPEFast.h:77
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PixelCPEFast::averageGeometry_
pixelCPEforGPU::AverageGeometry averageGeometry_
Definition: PixelCPEFast.h:86
PixelCPEFast::xerr_barrel_l1_
std::vector< float > xerr_barrel_l1_
Definition: PixelCPEFast.h:74
PixelCPEFast::xerr_barrel_ln_
std::vector< float > xerr_barrel_ln_
Definition: PixelCPEFast.h:74
PixelCPEFast::gpuData_
cms::cuda::ESProduct< GPUData > gpuData_
Definition: PixelCPEFast.h:95
PixelCPEBase
Definition: PixelCPEBase.h:43
PixelCPEFast::ClusterParamGeneric
Definition: PixelCPEFast.h:17
PixelCPEFast::xerr_endcap_def_
float xerr_endcap_def_
Definition: PixelCPEFast.h:77
PixelCPEFast::ClusterParamGeneric::sy2
float sy2
Definition: PixelCPEFast.h:31
SiPixelGenErrorDBObject
Definition: SiPixelGenErrorDBObject.h:16
PixelCPEFast::getGPUProductAsync
const pixelCPEforGPU::ParamsOnGPU * getGPUProductAsync(cudaStream_t cudaStream) const
Definition: PixelCPEFast.cc:68
PixelCPEFast::ClusterParamGeneric::ClusterParamGeneric
ClusterParamGeneric()
Definition: PixelCPEFast.h:18
PixelCPEFast::yerr_barrel_l1_
std::vector< float > yerr_barrel_l1_
Definition: PixelCPEFast.h:74
MagneticField
Definition: MagneticField.h:19
PixelCPEFast::localPosition
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEFast.cc:346
ESProduct.h
PixelCPEFast::ClusterParamGeneric::ClusterParamGeneric
ClusterParamGeneric(const SiPixelCluster &cl)
Definition: PixelCPEFast.h:19
PixelCPEFast::ClusterParamGeneric::pixmx
int pixmx
Definition: PixelCPEFast.h:25
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:84