11 #define CORRECT_FOR_BIG_PIXELS 37 : useLAOffsetFromConfig_(
false),
38 useLAWidthFromConfig_(
false),
39 useLAWidthFromDB_(
false),
46 nRecHitsUsedEdge_ = 0,
123 unsigned m_detectors = dus.size();
124 for (
unsigned int i = 1;
i < 7; ++
i) {
125 LogDebug(
"PixelCPEBase:: LookingForFirstStrip")
139 LogDebug(
"LookingForFirstStrip") <<
" Chosen offset: " << m_detectors;
142 LogDebug(
"PixelCPEBase::fillDetParams():") <<
"caching " << m_detectors <<
" pixel detectors" << endl;
143 for (
unsigned i = 0;
i != m_detectors; ++
i) {
149 p.theOrigin =
p.theDet->surface().toLocal(
GlobalPoint(0, 0, 0));
152 p.thePart =
p.theDet->type().subDetector();
163 p.theThickness =
p.theDet->surface().bounds().thickness();
174 auto topol = &(
p.theDet->specificTopology());
178 std::pair<float, float> pitchxy =
p.theTopol->pitch();
179 p.thePitchX = pitchxy.first;
180 p.thePitchY = pitchxy.second;
193 LogDebug(
"PixelCPEBase::fillDetParams()") <<
"***** PIXEL LAYOUT *****" 194 <<
" thePart = " <<
p.thePart <<
" theThickness = " <<
p.theThickness
195 <<
" thePitchX = " <<
p.thePitchX <<
" thePitchY = " <<
p.thePitchY;
205 int minInX, minInY, maxInX, maxInY = 0;
211 int min_row(0), min_col(0);
215 if (minInX == min_row)
217 else if (maxInX == max_row)
222 if (minInY == min_col)
224 else if (maxInY == max_col)
291 theClusterParam.
cotalpha = gvx * gvz;
292 theClusterParam.
cotbeta = gvy * gvz;
339 LogDebug(
"PixelCPEBase::driftDirection()")
343 LogDebug(
"PixelCPEBase::driftDirection()") <<
" LA object is NULL, assume LA = 0" << endl;
345 LogDebug(
"PixelCPEBase::driftDirection()") <<
" Will use LA Offset from DB " << langle << endl;
348 LogDebug(
"PixelCPEBase::driftDirection()") <<
" Will use LA Offset from config " << langle << endl;
361 if (langleWidth != 0.0)
400 float dir_z = -(1.f + alpha2 *
Bfield.z() *
Bfield.z());
404 LogDebug(
"PixelCPEBase") <<
" The drift direction in local coordinate is " <<
dd;
419 LogDebug(
"PixelCPEBase::computeLorentzShifts()")
433 float probabilityXY = 0;
457 desc.add<
bool>(
"LoadTemplatesFromDB",
true);
458 desc.add<
bool>(
"Alpha2Order",
true);
459 desc.add<
int>(
"ClusterProbComputationFlag", 0);
460 desc.add<
bool>(
"useLAWidthFromDB",
true);
461 desc.add<
double>(
"lAOffset", 0.0);
462 desc.add<
double>(
"lAWidthBPix", 0.0);
463 desc.add<
double>(
"lAWidthFPix", 0.0);
464 desc.add<
bool>(
"doLorentzFromAlignment",
false);
465 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_
virtual int ncolumns() const =0
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
virtual int nrows() const =0
static void fillPSetDescription(edm::ParameterSetDescription &desc)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
bool doLorentzFromAlignment_
const PixelGeomDetUnit * theDet
GeomDetType::SubDetector thePart
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
virtual bool containsBigPixelInY(int iymin, int iymax) const =0
void setHasFilledProb(bool flag, QualWordType &qualWord) const
Abs< T >::type abs(const T &t)
virtual bool containsBigPixelInX(int ixmin, int ixmax) const =0
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_
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