CMS 3D CMS Logo

PixelCPEBase.cc
Go to the documentation of this file.
1 // Move geomCorrection to the concrete class. d.k. 06/06.
2 // Change drift direction. d.k. 06/06
3 // G. Giurgiu (ggiurgiu@pha.jhu.edu), 12/01/06, implemented the function:
4 // computeAnglesFromDetPosition(const SiPixelCluster & cl,
5 // change to use Lorentz angle from DB Lotte Wilke, Jan. 31st, 2008
6 // Change to use Generic error & Template calibration from DB - D.Fehling 11/08
7 
8 
12 
14 
15 #define CORRECT_FOR_BIG_PIXELS
16 
17 // MessageLogger
19 
20 // Magnetic field
22 
23 
24 #include <iostream>
25 
26 using namespace std;
27 
28 //-----------------------------------------------------------------------------
29 // A constructor run for generic and templates
30 //
31 //-----------------------------------------------------------------------------
33  const MagneticField *mag,
34  const TrackerGeometry& geom,
35  const TrackerTopology& ttopo,
36  const SiPixelLorentzAngle * lorentzAngle,
37  const SiPixelGenErrorDBObject * genErrorDBObject,
38  const SiPixelTemplateDBObject * templateDBobject,
39  const SiPixelLorentzAngle * lorentzAngleWidth,
40  int flag)
41 // : useLAAlignmentOffsets_(false), useLAOffsetFromConfig_(false),
42 : useLAOffsetFromConfig_(false),
43 useLAWidthFromConfig_(false), useLAWidthFromDB_(false), theFlag_(flag),
44 magfield_(mag), geom_(geom), ttopo_(ttopo)
45 {
46 
47 #ifdef EDM_ML_DEBUG
48  nRecHitsTotal_=0;
49  nRecHitsUsedEdge_=0,
50 #endif
51 
52  //--- Lorentz angle tangent per Tesla
53  lorentzAngle_ = lorentzAngle;
54  lorentzAngleWidth_ = lorentzAngleWidth;
55 
56  //-- GenError Calibration Object (different from SiPixelCPEGenericErrorParm) from DB
57  genErrorDBObject_ = genErrorDBObject;
58 
59  //-- Template Calibration Object from DB
60  if(theFlag_!=0) templateDBobject_ = templateDBobject; // flag to check if it is generic or templates
61 
62  // Configurables
63  // For both templates & generic
64 
65  // Read templates and/or generic errors from DB
66  LoadTemplatesFromDB_ = conf.getParameter<bool>("LoadTemplatesFromDB");
67 
68  //--- Algorithm's verbosity
70  conf.getUntrackedParameter<int>("VerboseLevel",0);
71 
72  //-- Switch on/off E.B
73  alpha2Order = conf.getParameter<bool>("Alpha2Order");
74 
75  //--- A flag that could be used to change the behavior of
76  //--- clusterProbability() in TSiPixelRecHit (the *transient* one).
77  //--- The problem is that the transient hits are made after the CPE runs
78  //--- and they don't get the access to the PSet, so we pass it via the
79  //--- CPE itself...
80  //
82  = (unsigned int) conf.getParameter<int>("ClusterProbComputationFlag");
83 
84  // This LA related parameters are only relevant for the Generic algo
85  // They still have to be used in Base since the LA computation is in Base
86 
87  // Use LA-width from DB.
88  // If both (this and from config) are false LA-width is calcuated from LA-offset
89  useLAWidthFromDB_ = conf.existsAs<bool>("useLAWidthFromDB")?
90  conf.getParameter<bool>("useLAWidthFromDB"):false;
91 
92  // Use Alignment LA-offset in generic
93  // (Experimental; leave commented out)
94  //useLAAlignmentOffsets_ = conf.existsAs<bool>("useLAAlignmentOffsets")?
95  //conf.getParameter<bool>("useLAAlignmentOffsets"):false;
96 
97  // Used only for testing
98  lAOffset_ = conf.existsAs<double>("lAOffset")? // fixed LA value
99  conf.getParameter<double>("lAOffset"):0.0;
100  lAWidthBPix_ = conf.existsAs<double>("lAWidthBPix")? // fixed LA width
101  conf.getParameter<double>("lAWidthBPix"):0.0;
102  lAWidthFPix_ = conf.existsAs<double>("lAWidthFPix")? // fixed LA width
103  conf.getParameter<double>("lAWidthFPix"):0.0;
104 
105  // Use LA-offset from config, for testing only
106  if (lAOffset_>0.0)
107  useLAOffsetFromConfig_ = true;
108  // Use LA-width from config, split into fpix & bpix, for testing only
109  if (lAWidthBPix_>0.0 || lAWidthFPix_>0.0)
110  useLAWidthFromConfig_ = true;
111 
112 
113  // For Templates only
114  // Compute the Lorentz shifts for this detector element for templates (from Alignment)
115  DoLorentz_ = conf.existsAs<bool>("DoLorentz")?conf.getParameter<bool>("DoLorentz"):false;
116 
117  LogDebug("PixelCPEBase") <<" LA constants - "
118  << lAOffset_ << " " << lAWidthBPix_ << " " <<lAWidthFPix_ << endl; //dk
119 
120  fillDetParams();
121 }
122 
123 
124 //-----------------------------------------------------------------------------
125 // Fill all variables which are constant for an event (geometry)
126 //-----------------------------------------------------------------------------
128 {
129  // &&& PM: I have no idea what this code is doing, and what it is doing here!???
130  //
131  auto const & dus = geom_.detUnits();
132  unsigned m_detectors = dus.size();
133  for(unsigned int i=1;i<7;++i) {
134  LogDebug("PixelCPEBase:: LookingForFirstStrip") << "Subdetector " << i
135  << " GeomDetEnumerator " << GeomDetEnumerators::tkDetEnum[i]
136  << " offset " << geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i])
137  << " is it strip? " << (geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i]) != dus.size() ?
138  dus[geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i])]->type().isTrackerStrip() : false);
139  if(geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i]) != dus.size() &&
140  dus[geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i])]->type().isTrackerStrip()) {
142  }
143  }
144  LogDebug("LookingForFirstStrip") << " Chosen offset: " << m_detectors;
145 
146 
147  m_DetParams.resize(m_detectors);
148  LogDebug("PixelCPEBase::fillDetParams():") <<"caching "<<m_detectors<<" pixel detectors"<<endl;
149  for (unsigned i=0; i!=m_detectors;++i) {
150  auto & p=m_DetParams[i];
151  p.theDet = dynamic_cast<const PixelGeomDetUnit*>(dus[i]);
152  assert(p.theDet);
153  assert(p.theDet->index()==int(i));
154 
155  p.theOrigin = p.theDet->surface().toLocal(GlobalPoint(0,0,0));
156 
157  //--- p.theDet->type() returns a GeomDetType, which implements subDetector()
158  p.thePart = p.theDet->type().subDetector();
159 
160 
161  //--- The location in of this DetUnit in a cyllindrical coord system (R,Z)
162  //--- The call goes via BoundSurface, returned by p.theDet->surface(), but
163  //--- position() is implemented in GloballyPositioned<> template
164  //--- ( BoundSurface : Surface : GloballyPositioned<float> )
165  //p.theDetR = p.theDet->surface().position().perp(); //Not used, AH
166  //p.theDetZ = p.theDet->surface().position().z(); //Not used, AH
167  //--- Define parameters for chargewidth calculation
168 
169  //--- bounds() is implemented in BoundSurface itself.
170  p.theThickness = p.theDet->surface().bounds().thickness();
171 
172  // Cache the det id for templates and generic erros
173 
174  if(theFlag_==0) { // for generic
175  if(LoadTemplatesFromDB_ ) // do only if genError requested
176  p.detTemplateId = genErrorDBObject_->getGenErrorID(p.theDet->geographicalId().rawId());
177  } else { // for templates
178  p.detTemplateId = templateDBobject_->getTemplateID(p.theDet->geographicalId());
179  }
180 
181 
182  auto topol = &(p.theDet->specificTopology());
183  p.theTopol=topol;
184  auto const proxyT = dynamic_cast<const ProxyPixelTopology*>(p.theTopol);
185  if (proxyT) p.theRecTopol = dynamic_cast<const RectangularPixelTopology*>(&(proxyT->specificTopology()));
186  else p.theRecTopol = dynamic_cast<const RectangularPixelTopology*>(p.theTopol);
187  assert(p.theRecTopol);
188 
189  //--- The geometrical description of one module/plaquette
190  //p.theNumOfRow = p.theRecTopol->nrows(); // rows in x //Not used, AH. PM: leave commented out.
191  //p.theNumOfCol = p.theRecTopol->ncolumns(); // cols in y //Not used, AH. PM: leave commented out.
192  std::pair<float,float> pitchxy = p.theRecTopol->pitch();
193  p.thePitchX = pitchxy.first; // pitch along x
194  p.thePitchY = pitchxy.second; // pitch along y
195 
196 
197  LocalVector Bfield = p.theDet->surface().toLocal(magfield_->inTesla(p.theDet->surface().position()));
198  p.bz = Bfield.z();
199  p.bx = Bfield.x();
200 
201 
202  //--- Compute the Lorentz shifts for this detector element
203  if ( (theFlag_==0) || DoLorentz_ ) { // do always for generic and if(DOLorentz) for templates
204  p.driftDirection = driftDirection(p, Bfield );
206  }
207 
208 
209  LogDebug("PixelCPEBase::fillDetParams()") << "***** PIXEL LAYOUT *****"
210  << " thePart = " << p.thePart
211  << " theThickness = " << p.theThickness
212  << " thePitchX = " << p.thePitchX
213  << " thePitchY = " << p.thePitchY;
214  // << " theLShiftX = " << p.theLShiftX;
215 
216 
217  }
218 }
219 
220 //-----------------------------------------------------------------------------
221 // One function to cache the variables common for one DetUnit.
222 //-----------------------------------------------------------------------------
223 void
224 PixelCPEBase::setTheClu( DetParam const & theDetParam, ClusterParam & theClusterParam ) const
225 {
226 
227  //--- Geometric Quality Information
228  int minInX,minInY,maxInX,maxInY=0;
229  minInX = theClusterParam.theCluster->minPixelRow();
230  minInY = theClusterParam.theCluster->minPixelCol();
231  maxInX = theClusterParam.theCluster->maxPixelRow();
232  maxInY = theClusterParam.theCluster->maxPixelCol();
233 
234  if ( theDetParam.theRecTopol->isItEdgePixelInX(minInX) )
235  theClusterParam.edgeTypeX_ = 1;
236  else if ( theDetParam.theRecTopol->isItEdgePixelInX(maxInX) )
237  theClusterParam.edgeTypeX_ = 2;
238  else
239  theClusterParam.edgeTypeX_ = 0;
240 
241  if ( theDetParam.theRecTopol->isItEdgePixelInY(minInY) )
242  theClusterParam.edgeTypeY_ = 1;
243  else if ( theDetParam.theRecTopol->isItEdgePixelInY(maxInY) )
244  theClusterParam.edgeTypeY_ = 2;
245  else
246  theClusterParam.edgeTypeY_ = 0;
247 
248  theClusterParam.isOnEdge_ = ( theClusterParam.edgeTypeX_ || theClusterParam.edgeTypeY_ );
249 
250  // &&& FOR NOW UNUSED. KEEP IT IN CASE WE WANT TO USE IT IN THE FUTURE
251  // Bad Pixels have their charge set to 0 in the clusterizer
252  //hasBadPixels_ = false;
253  //for(unsigned int i=0; i<theClusterParam.theCluster->pixelADC().size(); ++i) {
254  //if(theClusterParam.theCluster->pixelADC()[i] == 0) { hasBadPixels_ = true; break;}
255  //}
256 
257  theClusterParam.spansTwoROCs_ = theDetParam.theRecTopol->containsBigPixelInX(minInX,maxInX) |
258  theDetParam.theRecTopol->containsBigPixelInY(minInY,maxInY);
259 
260 }
261 
262 
263 //-----------------------------------------------------------------------------
264 // Compute alpha_ and beta_ from the LocalTrajectoryParameters.
265 // Note: should become const after both localParameters() become const.
266 //-----------------------------------------------------------------------------
267 void PixelCPEBase::
268 computeAnglesFromTrajectory( DetParam const & theDetParam, ClusterParam & theClusterParam,
269  const LocalTrajectoryParameters & ltp) const
270 {
271 
272  theClusterParam.cotalpha = ltp.dxdz();
273  theClusterParam.cotbeta = ltp.dydz();
274 
275 
276  LocalPoint trk_lp = ltp.position();
277  theClusterParam.trk_lp_x = trk_lp.x();
278  theClusterParam.trk_lp_y = trk_lp.y();
279 
280  theClusterParam.with_track_angle = true;
281 
282  // GG: needed to correct for bows/kinks
283  theClusterParam.loc_trk_pred =
284  Topology::LocalTrackPred(theClusterParam.trk_lp_x, theClusterParam.trk_lp_y,
285  theClusterParam.cotalpha,theClusterParam.cotbeta);
286 
287 }
288 
289 //-----------------------------------------------------------------------------
290 // Estimate theAlpha for barrel, based on the det position.
291 // &&& Needs to be consolidated from the above.
292 //-----------------------------------------------------------------------------
293 //float
294 //PixelCPEBase::estimatedAlphaForBarrel(float centerx) const
295 //{
296 // float tanalpha = theSign * (centerx-theOffsetX) * thePitchX / theDetR;
297 // return PI/2.0 - atan(tanalpha);
298 //}
299 
300 
301 
302 
303 //-----------------------------------------------------------------------------
304 // Compute alpha_ and beta_ from the position of this DetUnit.
305 // &&& DOES NOT WORK FOR NOW. d.k. 6/06
306 // The angles from dets are calculated internaly in the PixelCPEInitial class
307 //-----------------------------------------------------------------------------
308 // G. Giurgiu, 12/01/06 : implement the function
309 void PixelCPEBase::
310 computeAnglesFromDetPosition(DetParam const & theDetParam, ClusterParam & theClusterParam ) const
311 {
312 
313  LocalPoint lp = theDetParam.theTopol->localPosition( MeasurementPoint(theClusterParam.theCluster->x(), theClusterParam.theCluster->y()) );
314  auto gvx = lp.x()-theDetParam.theOrigin.x();
315  auto gvy = lp.y()-theDetParam.theOrigin.y();
316  auto gvz = -1.f/theDetParam.theOrigin.z();
317  //--- Note that the normalization is not required as only the ratio used
318 
319  //theClusterParam.zneg = (gvz < 0); // Not used, AH
320 
321  // calculate angles
322  theClusterParam.cotalpha = gvx*gvz;
323  theClusterParam.cotbeta = gvy*gvz;
324 
325  theClusterParam.with_track_angle = false;
326 
327 
328  /*
329  // used only in dberror param...
330  auto alpha = HALF_PI - std::atan(cotalpha_);
331  auto beta = HALF_PI - std::atan(cotbeta_);
332  if (zneg) { beta -=PI; alpha -=PI;}
333 
334  auto alpha_ = atan2( gv_dot_gvz, gv_dot_gvx );
335  auto beta_ = atan2( gv_dot_gvz, gv_dot_gvy );
336 
337  assert(std::abs(std::round(alpha*10000.f)-std::round(alpha_*10000.f))<2);
338  assert(std::abs(std::round(beta*10000.f)-std::round(beta_*10000.f))<2);
339  */
340 
341 }
342 
343 
344 
345 //------------------------------------------------------------------------
347 {
348  auto i = det.index();
349  //cout << "get parameters of detector " << i << endl;
350  assert(i<int(m_DetParams.size()));
351  //if (i>=int(m_DetParams.size())) m_DetParams.resize(i+1); // should never happen!
352  const DetParam & p = m_DetParams[i];
353  return p;
354 }
355 
356 //-----------------------------------------------------------------------------
357 // Drift direction.
358 // Works OK for barrel and forward.
359 // The formulas used for dir_x,y,z have to be exactly the same as the ones
360 // used in the digitizer (SiPixelDigitizerAlgorithm.cc).
361 // &&& PM: needs to be consolidated, discuss with PS.
362 //-----------------------------------------------------------------------------
364 PixelCPEBase::driftDirection(DetParam & theDetParam, GlobalVector bfield ) const
365 {
366  Frame detFrame(theDetParam.theDet->surface().position(), theDetParam.theDet->surface().rotation());
367  LocalVector Bfield = detFrame.toLocal(bfield);
368  return driftDirection(theDetParam,Bfield);
369 }
370 
371 
373 PixelCPEBase::driftDirection(DetParam & theDetParam, LocalVector Bfield ) const
374 {
375  // Use LA from DB or from config
376  float langle = 0.;
377  if( !useLAOffsetFromConfig_ ) { // get it from DB
378  if(lorentzAngle_ != nullptr) { // a real LA object
379  langle = lorentzAngle_->getLorentzAngle(theDetParam.theDet->geographicalId().rawId());
380  LogDebug("PixelCPEBase::driftDirection()")
381  <<" la "<<langle<<" "<< theDetParam.theDet->geographicalId().rawId() <<endl;
382  } else { // no LA, unused
383  langle = 0; // set to a fake value
384  LogDebug("PixelCPEBase::driftDirection()") <<" LA object is NULL, assume LA = 0"<<endl; //dk
385  }
386  LogDebug("PixelCPEBase::driftDirection()") << " Will use LA Offset from DB "<<langle<<endl;
387  } else { // from config file
388  langle = lAOffset_;
389  LogDebug("PixelCPEBase::driftDirection()") << " Will use LA Offset from config "<<langle<<endl;
390  }
391 
392  // Now do the LA width stuff
393  theDetParam.widthLAFractionX = 1.; // predefine to 1 (default) if things fail
394  theDetParam.widthLAFractionY = 1.;
395 
396  // Compute the charge width, generic only
397  if(theFlag_==0) {
398 
399  if(useLAWidthFromDB_ && (lorentzAngleWidth_ != nullptr) ) {
400  // take it from a separate, special LA DB object (forWidth)
401 
402  auto langleWidth = lorentzAngleWidth_->getLorentzAngle(theDetParam.theDet->geographicalId().rawId());
403  if(langleWidth!=0.0) theDetParam.widthLAFractionX = std::abs(langleWidth/langle);
404  // leave the widthLAFractionY=1.
405  //cout<<" LAWidth lorentz width "<<theDetParam.widthLAFractionX<<" "<<theDetParam.widthLAFractionY<<endl;
406 
407  } else if(useLAWidthFromConfig_) { // get from config
408 
409  double lAWidth=0;
410  if( GeomDetEnumerators::isTrackerPixel(theDetParam.thePart) && GeomDetEnumerators::isBarrel(theDetParam.thePart) ) lAWidth = lAWidthBPix_; // barrel
411  else lAWidth = lAWidthFPix_;
412 
413  if(langle!=0.0) theDetParam.widthLAFractionX = std::abs(lAWidth/langle);
414  // fix the FractionY at 1
415 
416  //cout<<" Lorentz width from config "<<theDetParam.widthLAFractionX<<" "<<theDetParam.widthLAFractionY<<endl;
417 
418  } else { // get if from the offset LA (old method used until 2013)
419  // do nothing
420  //cout<<" Old default LA width method "<<theDetParam.widthLAFractionX<<" "<<theDetParam.widthLAFractionY<<endl;
421 
422  }
423 
424  //cout<<" Final LA fraction "<<theDetParam.widthLAFractionX<<" "<<theDetParam.widthLAFractionY<<endl;
425 
426  } // if flag
427 
428 
429  float alpha2 = alpha2Order ? langle*langle : 0; //
430 
431  // **********************************************************************
432  // Our convention is the following:
433  // +x is defined by the direction of the Lorentz drift!
434  // +z is defined by the direction of E field (so electrons always go into -z!)
435  // +y is defined by +x and +z, and it turns out to be always opposite to the +B field.
436  // **********************************************************************
437 
438  float dir_x = -( langle * Bfield.y() + alpha2* Bfield.z()* Bfield.x() );
439  float dir_y = ( langle * Bfield.x() - alpha2* Bfield.z()* Bfield.y() );
440  float dir_z = -( 1.f + alpha2* Bfield.z()*Bfield.z() );
441  auto scale = 1.f/std::abs( dir_z ); // same as 1 + alpha2*Bfield.z()*Bfield.z()
442  LocalVector dd(dir_x*scale, dir_y*scale, -1.f ); // last is -1 !
443 
444  LogDebug("PixelCPEBase") << " The drift direction in local coordinate is " << dd ;
445 
446  return dd;
447 }
448 
449 //-----------------------------------------------------------------------------
450 // One-shot computation of the driftDirection and both lorentz shifts
451 //-----------------------------------------------------------------------------
452 void
454 {
455  // Max shift (at the other side of the sensor) in cm
456  theDetParam.lorentzShiftInCmX = theDetParam.driftDirection.x()/theDetParam.driftDirection.z() * theDetParam.theThickness; //
457  theDetParam.lorentzShiftInCmY = theDetParam.driftDirection.y()/theDetParam.driftDirection.z() * theDetParam.theThickness; //
458 
459  LogDebug("PixelCPEBase::computeLorentzShifts()") << " lorentzShiftsInCmX,Y = "
460  << theDetParam.lorentzShiftInCmX <<" "
461  << theDetParam.lorentzShiftInCmY <<" "
462  << theDetParam.driftDirection;
463 }
464 
465 //-----------------------------------------------------------------------------
470 //-----------------------------------------------------------------------------
473 {
475  if (theClusterParam.hasFilledProb_) {
476  float probabilityXY=0;
477  if(theClusterParam.filled_from_2d) probabilityXY = theClusterParam.probabilityX_;
478  else if ( theClusterParam.probabilityX_ !=0 && theClusterParam.probabilityY_ !=0 )
479  probabilityXY = theClusterParam.probabilityX_ * theClusterParam.probabilityY_ * (1.f - std::log(theClusterParam.probabilityX_ * theClusterParam.probabilityY_) ) ;
481  qualWord );
482 
484  qualWord );
485  }
487  qualWord );
488 
490  qualWord );
491 
493  qualWord );
494 
496  qualWord );
497 
499  qualWord );
500 
501  return qualWord;
502 }
#define LogDebug(id)
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
int minPixelCol() const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:185
Local3DPoint theOrigin
Definition: PixelCPEBase.h:66
const SiPixelLorentzAngle * lorentzAngleWidth_
Definition: PixelCPEBase.h:248
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
Definition: PixelCPEBase.h:87
bool isBarrel(GeomDetEnumerators::SubDetector m)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
T y() const
Definition: PV3DBase.h:63
DetParams m_DetParams
Definition: PixelCPEBase.h:283
void fillDetParams()
short getGenErrorID(const uint32_t &detid) const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:60
GeomDetType::SubDetector thePart
Definition: PixelCPEBase.h:65
const RectangularPixelTopology * theRecTopol
Definition: PixelCPEBase.h:63
bool useLAWidthFromDB_
Definition: PixelCPEBase.h:237
float lAWidthBPix_
Definition: PixelCPEBase.h:232
int maxPixelRow() const
bool useLAWidthFromConfig_
Definition: PixelCPEBase.h:236
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
bool isItEdgePixelInX(int ixbin) const override
const PixelTopology * theTopol
Definition: PixelCPEBase.h:62
int minPixelRow() const
bool LoadTemplatesFromDB_
Definition: PixelCPEBase.h:257
void computeAnglesFromTrajectory(DetParam const &theDetParam, ClusterParam &theClusterParam, const LocalTrajectoryParameters &ltp) const
unsigned int offsetDU(SubDetector sid) const
T z() const
Definition: PV3DBase.h:64
void computeLorentzShifts(DetParam &) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const SiPixelTemplateDBObject * templateDBobject_
Definition: PixelCPEBase.h:253
void setHasBadPixels(bool flag, QualWordType &qualWord) const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
double f[11][100]
const MagneticField * magfield_
Definition: PixelCPEBase.h:243
int index() const
Definition: GeomDet.h:99
void computeAnglesFromDetPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const
void setProbabilityQ(float prob, QualWordType &qualWord) const
SiPixelRecHitQuality::QualWordType rawQualityWord(ClusterParam &theClusterParam) const
SubDetector tkDetEnum[8]
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
Definition: PixelCPEBase.h:101
void setIsOnEdge(bool flag, QualWordType &qualWord) const
const SiPixelLorentzAngle * lorentzAngle_
Definition: PixelCPEBase.h:247
const SiPixelGenErrorDBObject * genErrorDBObject_
Definition: PixelCPEBase.h:250
void setTheClu(DetParam const &, ClusterParam &theClusterParam) const
int maxPixelCol() const
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
bool useLAOffsetFromConfig_
Definition: PixelCPEBase.h:235
const TrackerGeometry & geom_
Definition: PixelCPEBase.h:244
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)
Definition: PixelCPEBase.cc:32
float getLorentzAngle(const uint32_t &) const
float y() const
LocalVector driftDirection
Definition: PixelCPEBase.h:73
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
bool isItEdgePixelInY(int iybin) const override
T x() const
Definition: PV3DBase.h:62
const PositionType & position() const
void setQBin(int qbin, QualWordType &qualWord) const
float x() const
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
float lAWidthFPix_
Definition: PixelCPEBase.h:233
DetParam const & detParam(const GeomDetUnit &det) const