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