CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelCPETemplateReco.cc
Go to the documentation of this file.
1 // Include our own header first
3 
4 // Geometry services
7 
8 //#define DEBUG
9 
10 // MessageLogger
12 
13 // Magnetic field
15 
16 // The template header files
18 
20 
22 
23 #include <vector>
24 #include "boost/multi_array.hpp"
25 
26 #include <iostream>
27 
28 using namespace SiPixelTemplateReco;
29 //using namespace SiPixelTemplateSplit;
30 using namespace std;
31 
32 const float PI = 3.141593;
33 const float HALFPI = PI * 0.5;
34 const float degsPerRad = 57.29578;
35 
36 // &&& need a class const
37 const float micronsToCm = 1.0e-4;
38 
39 const int cluster_matrix_size_x = 13;
40 const int cluster_matrix_size_y = 21;
41 
42 //-----------------------------------------------------------------------------
43 // Constructor. All detUnit-dependent quantities will be initialized later,
44 // in setTheDet(). Here we only load the templates into the template store templ_ .
45 //-----------------------------------------------------------------------------
47  const MagneticField * mag, const SiPixelLorentzAngle * lorentzAngle,
48  const SiPixelTemplateDBObject * templateDBobject)
49  : PixelCPEBase(conf, mag, lorentzAngle, 0, templateDBobject)
50 {
51  //cout << endl;
52  //cout << "Constructing PixelCPETemplateReco::PixelCPETemplateReco(...)................................................." << endl;
53  //cout << endl;
54 
55  // &&& initialize the templates, etc.
56 
57  //-- Use Magnetic field at (0,0,0) to select a template ID [Morris, 6/25/08] (temporary until we implement DB access)
58 
59  DoCosmics_ = conf.getParameter<bool>("DoCosmics");
60  LoadTemplatesFromDB_ = conf.getParameter<bool>("LoadTemplatesFromDB");
61  //cout << " PixelCPETemplateReco : (int)LoadTemplatesFromDB_ = " << (int)LoadTemplatesFromDB_ << endl;
62  //cout << "field_magnitude = " << field_magnitude << endl;
63 
64  // ggiurgiu@fnal.gov, 12/17/2008: use configuration parameter to decide between DB or text file template access
65  if ( LoadTemplatesFromDB_ )
66  {
67  //cout << "PixelCPETemplateReco: Loading templates from database (DB) ------------------------------- " << endl;
68 
69  // Initialize template store to the selected ID [Morris, 6/25/08]
71  throw cms::Exception("PixelCPETemplateReco")
72  << "\nERROR: Templates not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version "
73  << (*templateDBobject_).version() << "\n\n";
74  }
75  else
76  {
77  //cout << "PixelCPETemplateReco : Loading templates 40 and 41 from ASCII files ------------------------" << endl;
78 
79  if ( !templ_.pushfile( 40 ) )
80  throw cms::Exception("PixelCPETemplateReco")
81  << "\nERROR: Templates 40 not loaded correctly from text file. Reconstruction will fail.\n\n";
82 
83  if ( !templ_.pushfile( 41 ) )
84  throw cms::Exception("PixelCPETemplateReco")
85  << "\nERROR: Templates 41 not loaded correctly from text file. Reconstruction will fail.\n\n";
86  }
87 
88  speed_ = conf.getParameter<int>( "speed");
89  LogDebug("PixelCPETemplateReco::PixelCPETemplateReco:") <<
90  "Template speed = " << speed_ << "\n";
91 
92  UseClusterSplitter_ = conf.getParameter<bool>("UseClusterSplitter");
93 
94 }
95 
96 //-----------------------------------------------------------------------------
97 // Clean up.
98 //-----------------------------------------------------------------------------
100 {
101  // &&& delete template store?
102 }
103 
104 
107  const GeomDetUnit & det) const
108 {
109  LocalPoint lp = localPosition(cluster,det);
110 
111  // ggiurgiu@jhu.edu 12/09/2010 : trk angles needed to correct for bows/kinks
112  if ( with_track_angle )
114  else
115  {
116  edm::LogError("PixelCPETemplateReco")
117  << "@SUB = PixelCPETemplateReco::measurementPosition"
118  << "Should never be here. PixelCPETemplateReco should always be called with track angles. This is a bad error !!! ";
119 
120  return theTopol->measurementPosition( lp );
121  }
122 
123 }
124 
125 
126 //------------------------------------------------------------------
127 // Public methods mandated by the base class.
128 //------------------------------------------------------------------
129 
130 //------------------------------------------------------------------
131 // The main call to the template code.
132 //------------------------------------------------------------------
135 {
136  setTheDet( det, cluster );
137 
138  bool fpix; // barrel(false) or forward(true)
140  fpix = false; // no, it's not forward -- it's barrel
141  else
142  fpix = true; // yes, it's forward
143 
144  int ID = -9999;
145 
146  if ( LoadTemplatesFromDB_ )
147  {
149  }
150  else
151  {
152  if ( !fpix )
153  ID = 40; // barrel
154  else
155  ID = 41; // endcap
156  }
157 
158  //cout << "PixelCPETemplateReco : ID = " << ID << endl;
159 
160 
161  // Make from cluster (a SiPixelCluster) a boost multi_array_2d called
162  // clust_array_2d.
163  boost::multi_array<float, 2> clust_array_2d(boost::extents[cluster_matrix_size_x][cluster_matrix_size_y]);
164 
165  // Preparing to retrieve ADC counts from the SiPixelCluster. In the cluster,
166  // we have the following:
167  // int minPixelRow(); // Minimum pixel index in the x direction (low edge).
168  // int maxPixelRow(); // Maximum pixel index in the x direction (top edge).
169  // int minPixelCol(); // Minimum pixel index in the y direction (left edge).
170  // int maxPixelCol(); // Maximum pixel index in the y direction (right edge).
171  // So the pixels from minPixelRow() will go into clust_array_2d[0][*],
172  // and the pixels from minPixelCol() will go into clust_array_2d[*][0].
173  int row_offset = cluster.minPixelRow();
174  int col_offset = cluster.minPixelCol();
175 
176  // Store the coordinates of the center of the (0,0) pixel of the array that
177  // gets passed to PixelTempReco2D
178  // Will add these values to the output of PixelTempReco2D
179  float tmp_x = float(cluster.minPixelRow()) + 0.5;
180  float tmp_y = float(cluster.minPixelCol()) + 0.5;
181 
182  // Store these offsets (to be added later) in a LocalPoint after tranforming
183  // them from measurement units (pixel units) to local coordinates (cm)
184 
185  // ggiurgiu@jhu.edu 12/09/2010 : update call with trk angles needed for bow/kink corrections
186  LocalPoint lp;
187 
188  if ( with_track_angle )
189  lp = theTopol->localPosition( MeasurementPoint(tmp_x, tmp_y), loc_trk_pred_ );
190  else
191  {
192  edm::LogError("PixelCPETemplateReco")
193  << "@SUB = PixelCPETemplateReco::localPosition"
194  << "Should never be here. PixelCPETemplateReco should always be called with track angles. This is a bad error !!! ";
195 
196  lp = theTopol->localPosition( MeasurementPoint(tmp_x, tmp_y) );
197  }
198 
199  const std::vector<SiPixelCluster::Pixel> & pixVec = cluster.pixels();
200  std::vector<SiPixelCluster::Pixel>::const_iterator
201  pixIter = pixVec.begin(), pixEnd = pixVec.end();
202 
203  // Visualize large clusters ---------------------------------------------------------
204  // From Petar: maybe this should be moved into a method in the base class?
205  /*
206  char cluster_matrix[100][100];
207  for (int i=0; i<100; i++)
208  for (int j=0; j<100; j++)
209  cluster_matrix[i][j] = '.';
210 
211  if ( cluster.sizeX()>cluster_matrix_size_x || cluster.sizeY()>cluster_matrix_size_y )
212  {
213  cout << "cluster.size() = " << cluster.size() << endl;
214  cout << "cluster.sizeX() = " << cluster.sizeX() << endl;
215  cout << "cluster.sizeY() = " << cluster.sizeY() << endl;
216 
217  for ( std::vector<SiPixelCluster::Pixel>::const_iterator pix = pixVec.begin(); pix != pixVec.end(); ++pix )
218  {
219  int i = (int)(pix->x) - row_offset;
220  int j = (int)(pix->y) - col_offset;
221  cluster_matrix[i][j] = '*';
222  }
223 
224  for (int i=0; i<(int)cluster.sizeX()+2; i++)
225  {
226  for (int j=0; j<(int)cluster.sizeY()+2; j++)
227  cout << cluster_matrix[i][j];
228  cout << endl;
229  }
230  } // if ( cluster.sizeX()>cluster_matrix_size_x || cluster.sizeY()>cluster_matrix_size_y )
231  */
232  // End Visualize clusters ---------------------------------------------------------
233 
234 
235  // Copy clust's pixels (calibrated in electrons) into clust_array_2d;
236  for ( ; pixIter != pixEnd; ++pixIter )
237  {
238  // *pixIter dereferences to Pixel struct, with public vars x, y, adc (all float)
239  // 02/13/2008 ggiurgiu@fnal.gov: type of x, y and adc has been changed to unsigned char, unsigned short, unsigned short
240  // in DataFormats/SiPixelCluster/interface/SiPixelCluster.h so the type cast to int is redundant. Leave it there, it
241  // won't hurt.
242  int irow = int(pixIter->x) - row_offset; // &&& do we need +0.5 ???
243  int icol = int(pixIter->y) - col_offset; // &&& do we need +0.5 ???
244 
245  // Gavril : what do we do here if the row/column is larger than cluster_matrix_size_x/cluster_matrix_size_y = 7/21 ?
246  // Ignore them for the moment...
247  if ( irow<cluster_matrix_size_x && icol<cluster_matrix_size_y )
248  // 02/13/2008 ggiurgiu@fnal.gov typecast pixIter->adc to float
249  clust_array_2d[irow][icol] = (float)pixIter->adc;
250  }
251 
252  // Make and fill the bool arrays flagging double pixels
253  std::vector<bool> ydouble(cluster_matrix_size_y), xdouble(cluster_matrix_size_x);
254  // x directions (shorter), rows
255  for (int irow = 0; irow < cluster_matrix_size_x; ++irow)
256  {
257  xdouble[irow] = theTopol->isItBigPixelInX( irow+row_offset );
258  }
259 
260  // y directions (longer), columns
261  for (int icol = 0; icol < cluster_matrix_size_y; ++icol)
262  {
263  ydouble[icol] = theTopol->isItBigPixelInY( icol+col_offset );
264  }
265 
266  // Output:
267  float nonsense = -99999.9; // nonsense init value
269  // If the template recontruction fails, we want to return 1.0 for now
271  templQbin_ = 0;
272  // We have a boolean denoting whether the reco failed or not
273  hasFilledProb_ = false;
274 
275  float templYrec1_ = nonsense;
276  float templXrec1_ = nonsense;
277  float templYrec2_ = nonsense;
278  float templXrec2_ = nonsense;
279 
280  // ******************************************************************
281  // Do it! Use cotalpha_ and cotbeta_ calculated in PixelCPEBase
282 
284 
285  Frame detFrame( theDet->surface().position(), theDet->surface().rotation() );
286  LocalVector Bfield = detFrame.toLocal( bfield );
287  float locBz = Bfield.z();
288 
289  ierr =
291  locBz,
292  clust_array_2d, ydouble, xdouble,
293  templ_,
296  templQbin_,
297  speed_,
299  );
300 
301  // ******************************************************************
302 
303  // Check exit status
304  if ( ierr != 0 )
305  {
306  LogDebug("PixelCPETemplateReco::localPosition") <<
307  "reconstruction failed with error " << ierr << "\n";
308 
309  // Gavril: what do we do in this case ? For now, just return the cluster center of gravity in microns
310  // In the x case, apply a rough Lorentz drift average correction
311  // To do: call PixelCPEGeneric whenever PixelTempReco2D fails
312  double lorentz_drift = -999.9;
314  lorentz_drift = 60.0; // in microns
316  lorentz_drift = 10.0; // in microns
317  else
318  throw cms::Exception("PixelCPETemplateReco::localPosition :")
319  << "A non-pixel detector type in here?" << "\n";
320  // ggiurgiu@jhu.edu, 21/09/2010 : trk angles needed to correct for bows/kinks
321  if ( with_track_angle )
322  {
323  templXrec_ = theTopol->localX( cluster.x(), loc_trk_pred_ ) - lorentz_drift * micronsToCm; // rough Lorentz drift correction
324  templYrec_ = theTopol->localY( cluster.y(), loc_trk_pred_ );
325  }
326  else
327  {
328  edm::LogError("PixelCPETemplateReco")
329  << "@SUB = PixelCPETemplateReco::localPosition"
330  << "Should never be here. PixelCPETemplateReco should always be called with track angles. This is a bad error !!! ";
331 
332  templXrec_ = theTopol->localX( cluster.x() ) - lorentz_drift * micronsToCm; // rough Lorentz drift correction
333  templYrec_ = theTopol->localY( cluster.y() );
334  }
335  }
336  else if ( UseClusterSplitter_ && templQbin_ == 0 )
337  {
338  cout << " PixelCPETemplateReco : We should never be here !!!!!!!!!!!!!!!!!!!!!!" << endl;
339  cout << " (int)UseClusterSplitter_ = " << (int)UseClusterSplitter_ << endl;
340 
341  //ierr =
342  //PixelTempSplit( ID, fpix, cotalpha_, cotbeta_,
343  // clust_array_2d, ydouble, xdouble,
344  // templ_,
345  // templYrec1_, templYrec2_, templSigmaY_, templProbY_,
346  // templXrec1_, templXrec2_, templSigmaX_, templProbX_,
347  // templQbin_ );
348 
349 
350  float dchisq;
351  float templProbQ_;
352  SiPixelTemplate2D templ2D_;
353  templ2D_.pushfile(ID);
354 
355  ierr =
357  clust_array_2d,
358  ydouble, xdouble,
359  templ_,
360  templYrec1_, templYrec2_, templSigmaY_, templProbY_,
361  templXrec1_, templXrec2_, templSigmaX_, templProbX_,
362  templQbin_,
363  templProbQ_,
364  true,
365  dchisq,
366  templ2D_ );
367 
368 
369  if ( ierr != 0 )
370  {
371  LogDebug("PixelCPETemplateReco::localPosition") <<
372  "reconstruction failed with error " << ierr << "\n";
373 
374  // Gavril: what do we do in this case ? For now, just return the cluster center of gravity in microns
375  // In the x case, apply a rough Lorentz drift average correction
376  // To do: call PixelCPEGeneric whenever PixelTempReco2D fails
377  double lorentz_drift = -999.9;
379  lorentz_drift = 60.0; // in microns
381  lorentz_drift = 10.0; // in microns
382  else
383  throw cms::Exception("PixelCPETemplateReco::localPosition :")
384  << "A non-pixel detector type in here?" << "\n";
385 
386  // ggiurgiu@jhu.edu, 12/09/2010 : trk angles needed to correct for bows/kinks
387  if ( with_track_angle )
388  {
389  templXrec_ = theTopol->localX( cluster.x(),loc_trk_pred_ ) - lorentz_drift * micronsToCm; // rough Lorentz drift correction
390  templYrec_ = theTopol->localY( cluster.y(),loc_trk_pred_ );
391  }
392  else
393  {
394  edm::LogError("PixelCPETemplateReco")
395  << "@SUB = PixelCPETemplateReco::localPosition"
396  << "Should never be here. PixelCPETemplateReco should always be called with track angles. This is a bad error !!! ";
397 
398  templXrec_ = theTopol->localX( cluster.x() ) - lorentz_drift * micronsToCm; // very rough Lorentz drift correction
399  templYrec_ = theTopol->localY( cluster.y() );
400 
401  }
402  }
403  else
404  {
405  // go from micrometer to centimeter
406  templXrec1_ *= micronsToCm;
407  templYrec1_ *= micronsToCm;
408  templXrec2_ *= micronsToCm;
409  templYrec2_ *= micronsToCm;
410 
411  // go back to the module coordinate system
412  templXrec1_ += lp.x();
413  templYrec1_ += lp.y();
414  templXrec2_ += lp.x();
415  templYrec2_ += lp.y();
416 
417  // calculate distance from each hit to the track and choose the
418  // hit closest to the track
419  float distance11 = sqrt( (templXrec1_ - trk_lp_x)*(templXrec1_ - trk_lp_x) +
420  (templYrec1_ - trk_lp_y)*(templYrec1_ - trk_lp_y) );
421 
422  float distance12 = sqrt( (templXrec1_ - trk_lp_x)*(templXrec1_ - trk_lp_x) +
423  (templYrec2_ - trk_lp_y)*(templYrec2_ - trk_lp_y) );
424 
425  float distance21 = sqrt( (templXrec2_ - trk_lp_x)*(templXrec2_ - trk_lp_x) +
426  (templYrec1_ - trk_lp_y)*(templYrec1_ - trk_lp_y) );
427 
428  float distance22 = sqrt( (templXrec2_ - trk_lp_x)*(templXrec2_ - trk_lp_x) +
429  (templYrec2_ - trk_lp_y)*(templYrec2_ - trk_lp_y) );
430 
431  float min_templXrec_ = -999.9;
432  float min_templYrec_ = -999.9;
433  float distance_min = 9999999999.9;
434  if ( distance11 < distance_min )
435  {
436  distance_min = distance11;
437  min_templXrec_ = templXrec1_;
438  min_templYrec_ = templYrec1_;
439  }
440  if ( distance12 < distance_min )
441  {
442  distance_min = distance12;
443  min_templXrec_ = templXrec1_;
444  min_templYrec_ = templYrec2_;
445  }
446  if ( distance21 < distance_min )
447  {
448  distance_min = distance21;
449  min_templXrec_ = templXrec2_;
450  min_templYrec_ = templYrec1_;
451  }
452  if ( distance22 < distance_min )
453  {
454  distance_min = distance22;
455  min_templXrec_ = templXrec2_;
456  min_templYrec_ = templYrec2_;
457  }
458 
459  templXrec_ = min_templXrec_;
460  templYrec_ = min_templYrec_;
461  }
462  } // else if ( UseClusterSplitter_ && templQbin_ == 0 )
463  else
464  {
465  // go from micrometer to centimeter
468 
469  // go back to the module coordinate system
470  templXrec_ += lp.x();
471  templYrec_ += lp.y();
472  }
473 
474  // Save probabilities and qBin in the quantities given to us by the base class
475  // (for which there are also inline getters). &&& templProbX_ etc. should be retired...
479  qBin_ = templQbin_;
480 
481  if ( ierr == 0 )
482  hasFilledProb_ = true;
483 
484  LocalPoint template_lp = LocalPoint( nonsense, nonsense );
485  template_lp = LocalPoint( templXrec_, templYrec_ );
486 
487  return template_lp;
488 
489 }
490 
491 //------------------------------------------------------------------
492 // localError() relies on localPosition() being called FIRST!!!
493 //------------------------------------------------------------------
494 LocalError
496  const GeomDetUnit& det ) const
497 {
498  //cout << endl;
499  //cout << "Set PixelCPETemplate errors .............................................." << endl;
500 
501  //cout << "CPETemplate : " << endl;
502 
503  //--- Default is the maximum error used for edge clusters.
504  float xerr = thePitchX / sqrt(12.0);
505  float yerr = thePitchY / sqrt(12.0);
506 
507  // Check if the errors were already set at the clusters splitting level
508  if ( cluster.getSplitClusterErrorX() > 0.0 && cluster.getSplitClusterErrorX() < 7777.7 &&
509  cluster.getSplitClusterErrorY() > 0.0 && cluster.getSplitClusterErrorY() < 7777.7 )
510  {
511  xerr = cluster.getSplitClusterErrorX() * micronsToCm;
512  yerr = cluster.getSplitClusterErrorY() * micronsToCm;
513 
514  //cout << "Errors set at cluster splitting level : " << endl;
515  //cout << "xerr = " << xerr << endl;
516  //cout << "yerr = " << yerr << endl;
517  }
518  else
519  {
520  // If errors are not split at the cluster splitting level, set the errors here
521 
522  //cout << "Errors are not split at the cluster splitting level, set the errors here : " << endl;
523 
524  setTheDet( det, cluster );
525 
526  int maxPixelCol = cluster.maxPixelCol();
527  int maxPixelRow = cluster.maxPixelRow();
528  int minPixelCol = cluster.minPixelCol();
529  int minPixelRow = cluster.minPixelRow();
530 
531  //--- Are we near either of the edges?
532  bool edgex = ( theTopol->isItEdgePixelInX( minPixelRow ) || theTopol->isItEdgePixelInX( maxPixelRow ) );
533  bool edgey = ( theTopol->isItEdgePixelInY( minPixelCol ) || theTopol->isItEdgePixelInY( maxPixelCol ) );
534 
535  if ( ierr !=0 )
536  {
537  // If reconstruction fails the hit position is calculated from cluster center of gravity
538  // corrected in x by average Lorentz drift. Assign huge errors.
539  //xerr = 10.0 * (float)cluster.sizeX() * xerr;
540  //yerr = 10.0 * (float)cluster.sizeX() * yerr;
541 
542  // Assign better errors based on the residuals for failed template cases
544  {
545  xerr = 55.0 * micronsToCm;
546  yerr = 36.0 * micronsToCm;
547  }
549  {
550  xerr = 42.0 * micronsToCm;
551  yerr = 39.0 * micronsToCm;
552  }
553  else
554  throw cms::Exception("PixelCPETemplateReco::localError :") << "A non-pixel detector type in here?" ;
555 
556  //cout << "xerr = " << xerr << endl;
557  //cout << "yerr = " << yerr << endl;
558 
559  //return LocalError(xerr*xerr, 0, yerr*yerr);
560  }
561  else if ( edgex || edgey )
562  {
563  // for edge pixels assign errors according to observed residual RMS
564  if ( edgex && !edgey )
565  {
566  xerr = 23.0 * micronsToCm;
567  yerr = 39.0 * micronsToCm;
568  }
569  else if ( !edgex && edgey )
570  {
571  xerr = 24.0 * micronsToCm;
572  yerr = 96.0 * micronsToCm;
573  }
574  else if ( edgex && edgey )
575  {
576  xerr = 31.0 * micronsToCm;
577  yerr = 90.0 * micronsToCm;
578  }
579  else
580  {
581  throw cms::Exception(" PixelCPETemplateReco::localError: Something wrong with pixel edge flag !!!");
582  }
583 
584  //cout << "xerr = " << xerr << endl;
585  //cout << "yerr = " << yerr << endl;
586  }
587  else
588  {
589  // &&& need a class const
590  //const float micronsToCm = 1.0e-4;
591 
592  xerr = templSigmaX_ * micronsToCm;
593  yerr = templSigmaY_ * micronsToCm;
594 
595  //cout << "xerr = " << xerr << endl;
596  //cout << "yerr = " << yerr << endl;
597 
598  // &&& should also check ierr (saved as class variable) and return
599  // &&& nonsense (another class static) if the template fit failed.
600  }
601 
602  if (theVerboseLevel > 9)
603  {
604  LogDebug("PixelCPETemplateReco") <<
605  " Sizex = " << cluster.sizeX() << " Sizey = " << cluster.sizeY() << " Edgex = " << edgex << " Edgey = " << edgey <<
606  " ErrX = " << xerr << " ErrY = " << yerr;
607  }
608 
609  } // else
610 
611  if ( !(xerr > 0.0) )
612  throw cms::Exception("PixelCPETemplateReco::localError")
613  << "\nERROR: Negative pixel error xerr = " << xerr << "\n\n";
614 
615  if ( !(yerr > 0.0) )
616  throw cms::Exception("PixelCPETemplateReco::localError")
617  << "\nERROR: Negative pixel error yerr = " << yerr << "\n\n";
618 
619  //cout << "Final errors set to: " << endl;
620  //cout << "xerr = " << xerr << endl;
621  //cout << "yerr = " << yerr << endl;
622  //cout << "Out of PixelCPETemplateREco..........................................................................." << endl;
623  //cout << endl;
624 
625  return LocalError(xerr*xerr, 0, yerr*yerr);
626 }
627 
#define LogDebug(id)
T getParameter(std::string const &) const
Topology::LocalTrackPred loc_trk_pred_
Definition: PixelCPEBase.h:270
int minPixelCol() const
bool with_track_angle
Definition: PixelCPEBase.h:220
const float micronsToCm
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
#define PI
short getTemplateID(const uint32_t &detid) const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
uint32_t ID
Definition: Definitions.h:26
float probabilityQ_
Definition: PixelCPEBase.h:225
LocalError localError(const SiPixelCluster &cl, const GeomDetUnit &det) const
GeomDetType::SubDetector thePart
Definition: PixelCPEBase.h:188
int maxPixelRow() const
float probabilityY_
Definition: PixelCPEBase.h:224
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
virtual bool isItEdgePixelInX(int ixbin) const =0
int minPixelRow() const
T sqrt(T t)
Definition: SSEVec.h:46
MeasurementPoint measurementPosition(const SiPixelCluster &, const GeomDetUnit &det) const
bool hasFilledProb_
Definition: PixelCPEBase.h:230
T z() const
Definition: PV3DBase.h:63
int PixelTempSplit(int id, float cotalpha, float cotbeta, array_2d &cluster, std::vector< bool > &ydouble, std::vector< bool > &xdouble, SiPixelTemplate &templ, float &yrec1, float &yrec2, float &sigmay, float &prob2y, float &xrec1, float &xrec2, float &sigmax, float &prob2x, int &q2bin, float &prob2Q, bool resolve, int speed, float &dchisq, bool deadpix, std::vector< std::pair< int, int > > &zeropix, SiPixelTemplate2D &templ2D)
const float HALFPI
const SiPixelTemplateDBObject * templateDBobject_
Definition: PixelCPEBase.h:263
LocalPoint localPosition(const SiPixelCluster &cluster, const GeomDetUnit &det) const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
const MagneticField * magfield_
Definition: PixelCPEBase.h:257
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
int PixelTempReco2D(int id, float cotalpha, float cotbeta, float locBz, array_2d &cluster, std::vector< bool > &ydouble, std::vector< bool > &xdouble, SiPixelTemplate &templ, float &yrec, float &sigmay, float &proby, float &xrec, float &sigmax, float &probx, int &qbin, int speed, bool deadpix, std::vector< std::pair< int, int > > &zeropix, float &probQ)
tuple conf
Definition: dbtoconf.py:185
virtual bool isItBigPixelInX(const int ixbin) const =0
virtual float localX(const float mpX) const =0
bool pushfile(int filenum)
float getSplitClusterErrorY() const
LocalTrajectoryParameters loc_traj_param_
Definition: PixelCPEBase.h:272
const PixelTopology * theTopol
Definition: PixelCPEBase.h:185
int maxPixelCol() const
const int cluster_matrix_size_y
PixelCPETemplateReco(edm::ParameterSet const &conf, const MagneticField *, const SiPixelLorentzAngle *, const SiPixelTemplateDBObject *)
int sizeY() const
void setTheDet(const GeomDetUnit &det, const SiPixelCluster &cluster) const
Definition: PixelCPEBase.cc:95
Pixel cluster – collection of neighboring pixels above threshold.
virtual bool isItEdgePixelInY(int iybin) const =0
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
float getSplitClusterErrorX() const
float y() const
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
const RotationType & rotation() const
bool pushfile(int filenum)
const int cluster_matrix_size_x
tuple cout
Definition: gather_cfg.py:121
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
int sizeX() const
const float degsPerRad
Definition: PixelCPEBase.cc:38
float probabilityX_
Definition: PixelCPEBase.h:223
const PositionType & position() const
float x() const
const std::vector< Pixel > pixels() const
virtual float localY(const float mpY) const =0
virtual bool isItBigPixelInY(const int iybin) const =0