|
|
Go to the documentation of this file.
14 #define CORRECT_FOR_BIG_PIXELS
40 : useLAOffsetFromConfig_(
false),
41 useLAWidthFromConfig_(
false),
42 useLAWidthFromDB_(
false),
49 nRecHitsUsedEdge_ = 0,
125 unsigned m_detectors = dus.size();
126 for (
unsigned int i = 1;
i < 7; ++
i) {
127 LogDebug(
"PixelCPEBase:: LookingForFirstStrip")
141 LogDebug(
"LookingForFirstStrip") <<
" Chosen offset: " << m_detectors;
144 LogDebug(
"PixelCPEBase::fillDetParams():") <<
"caching " << m_detectors <<
" pixel detectors" << endl;
145 for (
unsigned i = 0;
i != m_detectors; ++
i) {
147 p.theDet = dynamic_cast<const PixelGeomDetUnit*>(dus[
i]);
151 p.theOrigin =
p.theDet->surface().toLocal(
GlobalPoint(0, 0, 0));
154 p.thePart =
p.theDet->type().subDetector();
165 p.theThickness =
p.theDet->surface().bounds().thickness();
176 auto topol = &(
p.theDet->specificTopology());
178 auto const proxyT = dynamic_cast<const ProxyPixelTopology*>(
p.theTopol);
180 p.theRecTopol = dynamic_cast<const RectangularPixelTopology*>(&(proxyT->specificTopology()));
182 p.theRecTopol = dynamic_cast<const RectangularPixelTopology*>(
p.theTopol);
188 std::pair<float, float> pitchxy =
p.theRecTopol->pitch();
189 p.thePitchX = pitchxy.first;
190 p.thePitchY = pitchxy.second;
202 LogDebug(
"PixelCPEBase::fillDetParams()") <<
"***** PIXEL LAYOUT *****"
203 <<
" thePart = " <<
p.thePart <<
" theThickness = " <<
p.theThickness
204 <<
" thePitchX = " <<
p.thePitchX <<
" thePitchY = " <<
p.thePitchY;
214 int minInX, minInY, maxInX, maxInY = 0;
220 int min_row(0), min_col(0);
224 if (minInX == min_row)
226 else if (maxInX == max_row)
231 if (minInY == min_col)
233 else if (maxInY == max_col)
300 theClusterParam.
cotalpha = gvx * gvz;
301 theClusterParam.
cotbeta = gvy * gvz;
348 LogDebug(
"PixelCPEBase::driftDirection()")
352 LogDebug(
"PixelCPEBase::driftDirection()") <<
" LA object is NULL, assume LA = 0" << endl;
354 LogDebug(
"PixelCPEBase::driftDirection()") <<
" Will use LA Offset from DB " << langle << endl;
357 LogDebug(
"PixelCPEBase::driftDirection()") <<
" Will use LA Offset from config " << langle << endl;
370 if (langleWidth != 0.0)
407 float dir_x = -(langle * Bfield.
y() + alpha2 * Bfield.
z() * Bfield.
x());
408 float dir_y = (langle * Bfield.
x() - alpha2 * Bfield.
z() * Bfield.
y());
409 float dir_z = -(1.f + alpha2 * Bfield.
z() * Bfield.
z());
413 LogDebug(
"PixelCPEBase") <<
" The drift direction in local coordinate is " <<
dd;
428 LogDebug(
"PixelCPEBase::computeLorentzShifts()")
442 float probabilityXY = 0;
466 desc.add<
bool>(
"LoadTemplatesFromDB",
true);
467 desc.add<
bool>(
"Alpha2Order",
true);
468 desc.add<
int>(
"ClusterProbComputationFlag", 0);
469 desc.add<
bool>(
"useLAWidthFromDB",
true);
470 desc.add<
double>(
"lAOffset", 0.0);
471 desc.add<
double>(
"lAWidthBPix", 0.0);
472 desc.add<
double>(
"lAWidthFPix", 0.0);
bool useLAOffsetFromConfig_
const PixelTopology * theTopol
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
const SiPixelTemplateDBObject * templateDBobject_
const RectangularPixelTopology * theRecTopol
unsigned int clusterProbComputationFlag_
const SiPixelGenErrorDBObject * genErrorDBObject_
void setSpansTwoROCs(bool flag, QualWordType &qualWord) const
void setIsOnEdge(bool flag, QualWordType &qualWord) const
LocalVector driftDirection(DetParam &theDetParam, GlobalVector bfield) const
const TrackerGeometry & geom_
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
T getUntrackedParameter(std::string const &, T const &) const
bool containsBigPixelInY(int iymin, int iymax) const override
DetParam const & detParam(const GeomDetUnit &det) const
const PixelGeomDetUnit * theDet
const SiPixelCluster * theCluster
void computeAnglesFromTrajectory(DetParam const &theDetParam, ClusterParam &theClusterParam, const LocalTrajectoryParameters <p) const
float getLorentzAngle(const uint32_t &) const
const Plane & surface() const
The nominal surface of the GeomDet.
bool containsBigPixelInX(int ixmin, int ixmax) const override
LocalPoint position() const
Local x and y position coordinates.
static const Packing thePacking
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
unsigned int QualWordType
constexpr SubDetector tkDetEnum[8]
int nrows() const override
Global3DPoint GlobalPoint
void setQBin(int qbin, QualWordType &qualWord) const
bool useLAWidthFromConfig_
short getGenErrorID(const uint32_t &detid) const
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
DetId geographicalId() const
The label of this GeomDet.
void setTheClu(DetParam const &, ClusterParam &theClusterParam) const
void setHasBadPixels(bool flag, QualWordType &qualWord) const
const SiPixelLorentzAngle * lorentzAngle_
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
bool isBarrel(GeomDetEnumerators::SubDetector m)
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)
const SiPixelLorentzAngle * lorentzAngleWidth_
bool LoadTemplatesFromDB_
short getTemplateID(const uint32_t &detid) const
GeomDetType::SubDetector thePart
void computeAnglesFromDetPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const
const PositionType & position() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
constexpr uint32_t rawId() const
get the raw id
int ncolumns() const override
void setProbabilityQ(float prob, QualWordType &qualWord) const
LocalVector driftDirection
void computeLorentzShifts(DetParam &) const
Topology::LocalTrackPred loc_trk_pred
static void fillPSetDescription(edm::ParameterSetDescription &desc)
T getParameter(std::string const &) const
SiPixelRecHitQuality::QualWordType rawQualityWord(ClusterParam &theClusterParam) const
void setProbabilityXY(float prob, QualWordType &qualWord) const
Abs< T >::type abs(const T &t)
void setHasFilledProb(bool flag, QualWordType &qualWord) const
const RotationType & rotation() const
unsigned int offsetDU(SubDetector sid) const
const MagneticField * magfield_