5 const auto convertDoubleVecToFloatVec = [](std::vector<double>
const& iIn) {
6 return std::vector<float>(iIn.begin(), iIn.end());
17 :
PixelCPEBase(conf,
mag,
geom, ttopo, lorentzAngle, genErrorDBObject, nullptr, lorentzAngleWidth, 0),
18 edgeClusterErrorX_{
static_cast<float>(conf.
getParameter<
double>(
"EdgeClusterErrorX"))},
19 edgeClusterErrorY_{
static_cast<float>(conf.getParameter<
double>(
"EdgeClusterErrorY"))},
20 useErrorsFromTemplates_{conf.getParameter<
bool>(
"UseErrorsFromTemplates")},
21 truncatePixelCharge_{conf.getParameter<
bool>(
"TruncatePixelCharge")},
22 xerr_barrel_l1_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"xerr_barrel_l1"))},
23 yerr_barrel_l1_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"yerr_barrel_l1"))},
24 xerr_barrel_ln_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"xerr_barrel_ln"))},
25 yerr_barrel_ln_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"yerr_barrel_ln"))},
26 xerr_endcap_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"xerr_endcap"))},
27 yerr_endcap_{convertDoubleVecToFloatVec(conf.getParameter<std::vector<double>>(
"yerr_endcap"))},
28 xerr_barrel_l1_def_{
static_cast<float>(conf.getParameter<
double>(
"xerr_barrel_l1_def"))},
29 yerr_barrel_l1_def_{
static_cast<float>(conf.getParameter<
double>(
"yerr_barrel_l1_def"))},
30 xerr_barrel_ln_def_{
static_cast<float>(conf.getParameter<
double>(
"xerr_barrel_ln_def"))},
31 yerr_barrel_ln_def_{
static_cast<float>(conf.getParameter<
double>(
"yerr_barrel_ln_def"))},
32 xerr_endcap_def_{
static_cast<float>(conf.getParameter<
double>(
"xerr_endcap_def"))},
33 yerr_endcap_def_{
static_cast<float>(conf.getParameter<
double>(
"yerr_endcap_def"))} {};
36 return std::make_unique<ClusterParamGeneric>(
cl);
64 for (
int i = 0;
i != isize; ++
i) {
67 int pix_adc =
pixel.adc;
128 const unsigned int sizex,
129 const unsigned int sizey,
132 const bool useTemplateErrors,
135 if (useTemplateErrors) {
139 xerr = theClusterParam.
sx1;
141 xerr = theClusterParam.
sx2;
144 xerr = theClusterParam.
sigmax;
151 yerr = theClusterParam.
sy1;
153 yerr = theClusterParam.
sy2;
156 yerr = theClusterParam.
sigmay;
217 desc.add<std::vector<double>>(
"xerr_barrel_l1", {0.00115, 0.00120, 0.00088});
218 desc.add<std::vector<double>>(
"yerr_barrel_l1",
219 {0.00375, 0.00230, 0.00250, 0.00250, 0.00230, 0.00230, 0.00210, 0.00210, 0.00240});
220 desc.add<std::vector<double>>(
"xerr_barrel_ln", {0.00115, 0.00120, 0.00088});
221 desc.add<std::vector<double>>(
"yerr_barrel_ln",
222 {0.00375, 0.00230, 0.00250, 0.00250, 0.00230, 0.00230, 0.00210, 0.00210, 0.00240});
223 desc.add<std::vector<double>>(
"xerr_endcap", {0.0020, 0.0020});
224 desc.add<std::vector<double>>(
"yerr_endcap", {0.00210});
225 desc.add<
double>(
"xerr_barrel_l1_def", 0.01030);
226 desc.add<
double>(
"yerr_barrel_l1_def", 0.00210);
227 desc.add<
double>(
"xerr_barrel_ln_def", 0.01030);
228 desc.add<
double>(
"yerr_barrel_ln_def", 0.00210);
229 desc.add<
double>(
"xerr_endcap_def", 0.0020);
230 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)
const std::vector< float > yerr_endcap_
const PixelGeomDetUnit * theDet
GeomDetType::SubDetector thePart
unsigned int layer(const DetId &id) const
constexpr float micronsToCm
const float xerr_endcap_def_
virtual bool isItEdgePixelInX(int ixbin) const =0
const PixelTopology * theTopol
virtual bool containsBigPixelInY(int iymin, int iymax) const =0
const float edgeClusterErrorY_
const float yerr_endcap_def_
virtual bool containsBigPixelInX(int ixmin, int ixmax) const =0
const std::vector< float > xerr_endcap_
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())
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.
virtual bool isItEdgePixelInY(int iybin) const =0
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