5 constexpr
float micronsToCm = 1.0e-4;
6 const auto convertDoubleVecToFloatVec = [](std::vector<double>
const& iIn) {
7 return std::vector<float>(iIn.begin(), iIn.end());
18 :
PixelCPEBase(conf,
mag,
geom, ttopo, lorentzAngle, genErrorDBObject, nullptr, lorentzAngleWidth, 0),
19 edgeClusterErrorX_{
static_cast<float>(conf.
getParameter<
double>(
"EdgeClusterErrorX"))},
20 edgeClusterErrorY_{
static_cast<float>(conf.getParameter<
double>(
"EdgeClusterErrorY"))},
21 useErrorsFromTemplates_{conf.getParameter<
bool>(
"UseErrorsFromTemplates")},
22 truncatePixelCharge_{conf.getParameter<
bool>(
"TruncatePixelCharge")},
23 xerr_barrel_l1_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"xerr_barrel_l1"))},
24 yerr_barrel_l1_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"yerr_barrel_l1"))},
25 xerr_barrel_ln_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"xerr_barrel_ln"))},
26 yerr_barrel_ln_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"yerr_barrel_ln"))},
27 xerr_endcap_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"xerr_endcap"))},
28 yerr_endcap_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"yerr_endcap"))},
29 xerr_barrel_l1_def_{
static_cast<float>(conf.getParameter<
double>(
"xerr_barrel_l1_def"))},
30 yerr_barrel_l1_def_{
static_cast<float>(conf.getParameter<
double>(
"yerr_barrel_l1_def"))},
31 xerr_barrel_ln_def_{
static_cast<float>(conf.getParameter<
double>(
"xerr_barrel_ln_def"))},
32 yerr_barrel_ln_def_{
static_cast<float>(conf.getParameter<
double>(
"yerr_barrel_ln_def"))},
33 xerr_endcap_def_{
static_cast<float>(conf.getParameter<
double>(
"xerr_endcap_def"))},
34 yerr_endcap_def_{
static_cast<float>(conf.getParameter<
double>(
"yerr_endcap_def"))} {};
37 return std::make_unique<ClusterParamGeneric>(
cl);
65 for (
int i = 0;
i != isize; ++
i) {
68 int pix_adc =
pixel.adc;
129 const unsigned int sizex,
130 const unsigned int sizey,
133 const bool useTemplateErrors,
136 if (useTemplateErrors) {
140 xerr = theClusterParam.
sx1;
142 xerr = theClusterParam.
sx2;
145 xerr = theClusterParam.
sigmax;
152 yerr = theClusterParam.
sy1;
154 yerr = theClusterParam.
sy2;
157 yerr = theClusterParam.
sigmay;
218 desc.add<std::vector<double>>(
"xerr_barrel_l1", {0.00115, 0.00120, 0.00088});
219 desc.add<std::vector<double>>(
"yerr_barrel_l1",
220 {0.00375, 0.00230, 0.00250, 0.00250, 0.00230, 0.00230, 0.00210, 0.00210, 0.00240});
221 desc.add<std::vector<double>>(
"xerr_barrel_ln", {0.00115, 0.00120, 0.00088});
222 desc.add<std::vector<double>>(
"yerr_barrel_ln",
223 {0.00375, 0.00230, 0.00250, 0.00250, 0.00230, 0.00230, 0.00210, 0.00210, 0.00240});
224 desc.add<std::vector<double>>(
"xerr_endcap", {0.0020, 0.0020});
225 desc.add<std::vector<double>>(
"yerr_endcap", {0.00210});
226 desc.add<
double>(
"xerr_barrel_l1_def", 0.01030);
227 desc.add<
double>(
"yerr_barrel_l1_def", 0.00210);
228 desc.add<
double>(
"xerr_barrel_ln_def", 0.01030);
229 desc.add<
double>(
"yerr_barrel_ln_def", 0.00210);
230 desc.add<
double>(
"xerr_endcap_def", 0.0020);
231 desc.add<
double>(
"yerr_endcap_def", 0.00075);
T getParameter(std::string const &) const
const float yerr_barrel_l1_def_
const SiPixelCluster * theCluster
const std::vector< float > yerr_barrel_ln_
bool isBarrel(GeomDetEnumerators::SubDetector m)
const std::vector< float > xerr_barrel_ln_
const std::vector< float > yerr_barrel_l1_
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)
bool containsBigPixelInY(int iymin, int iymax) const override
const std::vector< float > yerr_endcap_
const PixelGeomDetUnit * theDet
GeomDetType::SubDetector thePart
const RectangularPixelTopology * theRecTopol
unsigned int layer(const DetId &id) const
bool containsBigPixelInX(int ixmin, int ixmax) const override
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
const float xerr_endcap_def_
const float edgeClusterErrorY_
const float yerr_endcap_def_
const std::vector< float > xerr_endcap_
bool isItEdgePixelInY(int iybin) const override
DetId geographicalId() const
The label of this GeomDet.
static void fillPSetDescription(edm::ParameterSetDescription &desc)
const float xerr_barrel_l1_def_
PixelCPEGenericBase(edm::ParameterSet const &conf, const MagneticField *mag, const TrackerGeometry &geom, const TrackerTopology &ttopo, const SiPixelLorentzAngle *lorentzAngle, const SiPixelGenErrorDBObject *genErrorDBObject, const SiPixelLorentzAngle *lorentzAngleWidth)
const float yerr_barrel_ln_def_
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
bool isItEdgePixelInX(int ixbin) const override
const TrackerTopology & ttopo_
void setXYErrors(float &xerr, float &yerr, const bool edgex, const bool edgey, const unsigned int sizex, const unsigned int sizey, const bool bigInX, const bool bigInY, const bool useTemplateErrors, DetParam const &theDetParam, ClusterParamGeneric const &theClusterParam) const
const float xerr_barrel_ln_def_
const std::vector< float > xerr_barrel_l1_
Pixel cluster – collection of neighboring pixels above threshold.
const float edgeClusterErrorX_
std::unique_ptr< ClusterParam > createClusterParam(const SiPixelCluster &cl) const override
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
void initializeLocalErrorVariables(float &xerr, float &yerr, bool &edgex, bool &edgey, bool &bigInX, bool &bigInY, int &maxPixelCol, int &maxPixelRow, int &minPixelCol, int &minPixelRow, uint &sizex, uint &sizey, DetParam const &theDetParam, ClusterParamGeneric const &theClusterParam) const