15 #define CORRECT_FOR_BIG_PIXELS 42 : useLAOffsetFromConfig_(
false),
43 useLAWidthFromConfig_(
false), useLAWidthFromDB_(
false), theFlag_(flag),
44 magfield_(mag), geom_(geom), ttopo_(ttopo)
117 LogDebug(
"PixelCPEBase") <<
" LA constants - " 132 unsigned m_detectors = dus.size();
133 for(
unsigned int i=1;
i<7;++
i) {
134 LogDebug(
"PixelCPEBase:: LookingForFirstStrip") <<
"Subdetector " <<
i 144 LogDebug(
"LookingForFirstStrip") <<
" Chosen offset: " << m_detectors;
148 LogDebug(
"PixelCPEBase::fillDetParams():") <<
"caching "<<m_detectors<<
" pixel detectors"<<endl;
149 for (
unsigned i=0;
i!=m_detectors;++
i) {
153 assert(
p.theDet->index()==
int(
i));
155 p.theOrigin =
p.theDet->surface().toLocal(
GlobalPoint(0,0,0));
158 p.thePart =
p.theDet->type().subDetector();
170 p.theThickness =
p.theDet->surface().bounds().thickness();
182 auto topol = &(
p.theDet->specificTopology());
187 assert(
p.theRecTopol);
192 std::pair<float,float> pitchxy =
p.theRecTopol->pitch();
193 p.thePitchX = pitchxy.first;
194 p.thePitchY = pitchxy.second;
209 LogDebug(
"PixelCPEBase::fillDetParams()") <<
"***** PIXEL LAYOUT *****" 210 <<
" thePart = " <<
p.thePart
211 <<
" theThickness = " <<
p.theThickness
212 <<
" thePitchX = " <<
p.thePitchX
213 <<
" thePitchY = " <<
p.thePitchY;
228 int minInX,minInY,maxInX,maxInY=0;
234 int min_row(0), min_col(0);
238 if (minInX == min_row)
240 else if (maxInX == max_row)
245 if(minInY == min_col)
247 else if (maxInY == max_col)
327 theClusterParam.
cotbeta = gvy*gvz;
384 LogDebug(
"PixelCPEBase::driftDirection()")
388 LogDebug(
"PixelCPEBase::driftDirection()") <<
" LA object is NULL, assume LA = 0"<<endl;
390 LogDebug(
"PixelCPEBase::driftDirection()") <<
" Will use LA Offset from DB "<<langle<<endl;
393 LogDebug(
"PixelCPEBase::driftDirection()") <<
" Will use LA Offset from config "<<langle<<endl;
442 float dir_x = -( langle * Bfield.
y() + alpha2* Bfield.
z()* Bfield.
x() );
443 float dir_y = ( langle * Bfield.
x() - alpha2* Bfield.
z()* Bfield.
y() );
444 float dir_z = -( 1.f + alpha2* Bfield.
z()*Bfield.
z() );
448 LogDebug(
"PixelCPEBase") <<
" The drift direction in local coordinate is " <<
dd ;
463 LogDebug(
"PixelCPEBase::computeLorentzShifts()") <<
" lorentzShiftsInCmX,Y = " 480 float probabilityXY=0;
T getParameter(std::string const &) const
void setProbabilityXY(float prob, QualWordType &qualWord) const
T getUntrackedParameter(std::string const &, T const &) const
static const Packing thePacking
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
const SiPixelLorentzAngle * lorentzAngleWidth_
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
LocalVector driftDirection(DetParam &theDetParam, GlobalVector bfield) const
short getTemplateID(const uint32_t &detid) const
LocalPoint position() const
Local x and y position coordinates.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const SiPixelCluster * theCluster
bool isBarrel(GeomDetEnumerators::SubDetector m)
Global3DPoint GlobalPoint
constexpr uint32_t rawId() const
get the raw id
short getGenErrorID(const uint32_t &detid) const
const Plane & surface() const
The nominal surface of the GeomDet.
const PixelGeomDetUnit * theDet
GeomDetType::SubDetector thePart
const RectangularPixelTopology * theRecTopol
bool useLAWidthFromConfig_
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
const PixelTopology * theTopol
bool LoadTemplatesFromDB_
void computeAnglesFromTrajectory(DetParam const &theDetParam, ClusterParam &theClusterParam, const LocalTrajectoryParameters <p) const
int nrows() const override
unsigned int offsetDU(SubDetector sid) const
void computeLorentzShifts(DetParam &) const
Abs< T >::type abs(const T &t)
const SiPixelTemplateDBObject * templateDBobject_
void setHasBadPixels(bool flag, QualWordType &qualWord) const
DetId geographicalId() const
The label of this GeomDet.
const MagneticField * magfield_
unsigned int clusterProbComputationFlag_
void computeAnglesFromDetPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const
void setProbabilityQ(float prob, QualWordType &qualWord) const
SiPixelRecHitQuality::QualWordType rawQualityWord(ClusterParam &theClusterParam) const
void setSpansTwoROCs(bool flag, QualWordType &qualWord) const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
Topology::LocalTrackPred loc_trk_pred
void setIsOnEdge(bool flag, QualWordType &qualWord) const
const SiPixelLorentzAngle * lorentzAngle_
const SiPixelGenErrorDBObject * genErrorDBObject_
void setTheClu(DetParam const &, ClusterParam &theClusterParam) const
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
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)
float getLorentzAngle(const uint32_t &) const
LocalVector driftDirection
const RotationType & rotation() const
bool containsBigPixelInY(int iymin, int iymax) const override
bool containsBigPixelInX(int ixmin, int ixmax) const override
void setHasFilledProb(bool flag, QualWordType &qualWord) const
const PositionType & position() const
void setQBin(int qbin, QualWordType &qualWord) const
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
int ncolumns() const override
DetParam const & detParam(const GeomDetUnit &det) const