File indexing completed on 2023-03-17 11:19:39
0001 #ifndef RecoLocalTracker_SiPixelRecHits_PixelCPEGenericBase_H
0002 #define RecoLocalTracker_SiPixelRecHits_PixelCPEGenericBase_H
0003
0004 #include "PixelCPEBase.h"
0005 #include <vector>
0006
0007 class PixelCPEGenericBase : public PixelCPEBase {
0008 public:
0009 struct ClusterParamGeneric : ClusterParam {
0010 ClusterParamGeneric(){};
0011 ClusterParamGeneric(const SiPixelCluster& cl) : ClusterParam(cl) {}
0012
0013
0014
0015
0016 int pixmx{};
0017
0018
0019 float sigmay{};
0020 float sigmax{};
0021 float sy1{};
0022 float sy2{};
0023 float sx1{};
0024 float sx2{};
0025
0026
0027 float deltay{};
0028 float deltax{};
0029 float dy1{};
0030 float dy2{};
0031 float dx1{};
0032 float dx2{};
0033 };
0034
0035 PixelCPEGenericBase(edm::ParameterSet const& conf,
0036 const MagneticField* mag,
0037 const TrackerGeometry& geom,
0038 const TrackerTopology& ttopo,
0039 const SiPixelLorentzAngle* lorentzAngle,
0040 const SiPixelGenErrorDBObject* genErrorDBObject,
0041 const SiPixelLorentzAngle* lorentzAngleWidth);
0042
0043 ~PixelCPEGenericBase() override = default;
0044
0045 static void fillPSetDescription(edm::ParameterSetDescription& desc);
0046
0047 protected:
0048 std::unique_ptr<ClusterParam> createClusterParam(const SiPixelCluster& cl) const override;
0049
0050 static void collect_edge_charges(ClusterParam& theClusterParam,
0051 int& q_f_X,
0052 int& q_l_X,
0053 int& q_f_Y,
0054 int& q_l_Y,
0055 bool truncate);
0056
0057 void initializeLocalErrorVariables(float& xerr,
0058 float& yerr,
0059 bool& edgex,
0060 bool& edgey,
0061 bool& bigInX,
0062 bool& bigInY,
0063 int& maxPixelCol,
0064 int& maxPixelRow,
0065 int& minPixelCol,
0066 int& minPixelRow,
0067 uint& sizex,
0068 uint& sizey,
0069 DetParam const& theDetParam,
0070 ClusterParamGeneric const& theClusterParam) const;
0071
0072 void setXYErrors(float& xerr,
0073 float& yerr,
0074 const bool edgex,
0075 const bool edgey,
0076 const unsigned int sizex,
0077 const unsigned int sizey,
0078 const bool bigInX,
0079 const bool bigInY,
0080 const bool useTemplateErrors,
0081 DetParam const& theDetParam,
0082 ClusterParamGeneric const& theClusterParam) const;
0083
0084 const float edgeClusterErrorX_;
0085 const float edgeClusterErrorY_;
0086 bool useErrorsFromTemplates_;
0087 const bool truncatePixelCharge_;
0088
0089
0090 const std::vector<float> xerr_barrel_l1_, yerr_barrel_l1_, xerr_barrel_ln_;
0091 const std::vector<float> yerr_barrel_ln_, xerr_endcap_, yerr_endcap_;
0092 const float xerr_barrel_l1_def_, yerr_barrel_l1_def_, xerr_barrel_ln_def_;
0093 const float yerr_barrel_ln_def_, xerr_endcap_def_, yerr_endcap_def_;
0094 };
0095
0096 #endif