14 #define CORRECT_FOR_BIG_PIXELS 40 : useLAOffsetFromConfig_(
false),
41 useLAWidthFromConfig_(
false),
42 useLAWidthFromDB_(
false),
49 nRecHitsUsedEdge_ = 0,
126 unsigned m_detectors = dus.size();
127 for (
unsigned int i = 1;
i < 7; ++
i) {
128 LogDebug(
"PixelCPEBase:: LookingForFirstStrip")
142 LogDebug(
"LookingForFirstStrip") <<
" Chosen offset: " << m_detectors;
145 LogDebug(
"PixelCPEBase::fillDetParams():") <<
"caching " << m_detectors <<
" pixel detectors" << endl;
146 for (
unsigned i = 0;
i != m_detectors; ++
i) {
152 p.theOrigin =
p.theDet->surface().toLocal(
GlobalPoint(0, 0, 0));
155 p.thePart =
p.theDet->type().subDetector();
166 p.theThickness =
p.theDet->surface().bounds().thickness();
177 auto topol = &(
p.theDet->specificTopology());
189 std::pair<float, float> pitchxy =
p.theRecTopol->pitch();
190 p.thePitchX = pitchxy.first;
191 p.thePitchY = pitchxy.second;
204 LogDebug(
"PixelCPEBase::fillDetParams()") <<
"***** PIXEL LAYOUT *****" 205 <<
" thePart = " <<
p.thePart <<
" theThickness = " <<
p.theThickness
206 <<
" thePitchX = " <<
p.thePitchX <<
" thePitchY = " <<
p.thePitchY;
216 int minInX, minInY, maxInX, maxInY = 0;
222 int min_row(0), min_col(0);
226 if (minInX == min_row)
228 else if (maxInX == max_row)
233 if (minInY == min_col)
235 else if (maxInY == max_col)
302 theClusterParam.
cotalpha = gvx * gvz;
303 theClusterParam.
cotbeta = gvy * gvz;
350 LogDebug(
"PixelCPEBase::driftDirection()")
354 LogDebug(
"PixelCPEBase::driftDirection()") <<
" LA object is NULL, assume LA = 0" << endl;
356 LogDebug(
"PixelCPEBase::driftDirection()") <<
" Will use LA Offset from DB " << langle << endl;
359 LogDebug(
"PixelCPEBase::driftDirection()") <<
" Will use LA Offset from config " << langle << endl;
372 if (langleWidth != 0.0)
411 float dir_z = -(1.f + alpha2 *
Bfield.z() *
Bfield.z());
415 LogDebug(
"PixelCPEBase") <<
" The drift direction in local coordinate is " <<
dd;
430 LogDebug(
"PixelCPEBase::computeLorentzShifts()")
444 float probabilityXY = 0;
468 desc.add<
bool>(
"LoadTemplatesFromDB",
true);
469 desc.add<
bool>(
"Alpha2Order",
true);
470 desc.add<
int>(
"ClusterProbComputationFlag", 0);
471 desc.add<
bool>(
"useLAWidthFromDB",
true);
472 desc.add<
double>(
"lAOffset", 0.0);
473 desc.add<
double>(
"lAWidthBPix", 0.0);
474 desc.add<
double>(
"lAWidthFPix", 0.0);
475 desc.add<
bool>(
"doLorentzFromAlignment",
false);
476 desc.add<
bool>(
"useLAFromDB",
true);
static const Packing thePacking
T getParameter(std::string const &) const
void computeAnglesFromTrajectory(DetParam const &theDetParam, ClusterParam &theClusterParam, const LocalTrajectoryParameters <p) const
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
const SiPixelLorentzAngle * lorentzAngleWidth_
void computeAnglesFromDetPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
const SiPixelCluster * theCluster
bool isBarrel(GeomDetEnumerators::SubDetector m)
unsigned int offsetDU(SubDetector sid) const
Global3DPoint GlobalPoint
void setHasBadPixels(bool flag, QualWordType &qualWord) const
bool containsBigPixelInY(int iymin, int iymax) const override
static void fillPSetDescription(edm::ParameterSetDescription &desc)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
bool doLorentzFromAlignment_
int nrows() const override
const PixelGeomDetUnit * theDet
GeomDetType::SubDetector thePart
const RectangularPixelTopology * theRecTopol
bool containsBigPixelInX(int ixmin, int ixmax) const override
void setSpansTwoROCs(bool flag, QualWordType &qualWord) const
void computeLorentzShifts(DetParam &) const
T getUntrackedParameter(std::string const &, T const &) const
bool useLAWidthFromConfig_
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
const PixelTopology * theTopol
SiPixelRecHitQuality::QualWordType rawQualityWord(ClusterParam &theClusterParam) const
void setIsOnEdge(bool flag, QualWordType &qualWord) const
bool LoadTemplatesFromDB_
short getGenErrorID(const uint32_t &detid) const
void setHasFilledProb(bool flag, QualWordType &qualWord) const
Abs< T >::type abs(const T &t)
const SiPixelTemplateDBObject * templateDBobject_
void setQBin(int qbin, QualWordType &qualWord) const
const MagneticField * magfield_
unsigned int clusterProbComputationFlag_
DetId geographicalId() const
The label of this GeomDet.
void setProbabilityQ(float prob, QualWordType &qualWord) const
Topology::LocalTrackPred loc_trk_pred
const Plane & surface() const
The nominal surface of the GeomDet.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const PositionType & position() const
constexpr uint32_t rawId() const
get the raw id
const SiPixelLorentzAngle * lorentzAngle_
const SiPixelGenErrorDBObject * genErrorDBObject_
int ncolumns() const override
short getTemplateID(const uint32_t &detid) const
LocalVector driftDirection(DetParam &theDetParam, GlobalVector bfield) const
DetParam const & detParam(const GeomDetUnit &det) const
bool useLAOffsetFromConfig_
const TrackerGeometry & geom_
unsigned int QualWordType
PixelCPEBase(edm::ParameterSet const &conf, const MagneticField *mag, const TrackerGeometry &geom, const TrackerTopology &ttopo, const SiPixelLorentzAngle *lorentzAngle, const SiPixelGenErrorDBObject *genErrorDBObject, const SiPixelTemplateDBObject *templateDBobject, const SiPixelLorentzAngle *lorentzAngleWidth, int flag=0)
LocalVector driftDirection
const RotationType & rotation() const
LocalPoint position() const
Local x and y position coordinates.
float getLorentzAngle(const uint32_t &) const
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
void setProbabilityXY(float prob, QualWordType &qualWord) const
constexpr SubDetector tkDetEnum[8]
void setTheClu(DetParam const &, ClusterParam &theClusterParam) const