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 
105 
106 //------------------------------------------------------------------
107 // Public methods mandated by the base class.
108 //------------------------------------------------------------------
109 
110 //------------------------------------------------------------------
111 // The main call to the template code.
112 //------------------------------------------------------------------
115 {
116  setTheDet( det, cluster );
117 
118  bool fpix; // barrel(false) or forward(true)
120  fpix = false; // no, it's not forward -- it's barrel
121  else
122  fpix = true; // yes, it's forward
123 
124  int ID = -9999;
125 
126  if ( LoadTemplatesFromDB_ )
127  {
129  }
130  else
131  {
132  if ( !fpix )
133  ID = 40; // barrel
134  else
135  ID = 41; // endcap
136  }
137 
138  //cout << "PixelCPETemplateReco : ID = " << ID << endl;
139 
140 
141  // Make from cluster (a SiPixelCluster) a boost multi_array_2d called
142  // clust_array_2d.
143  boost::multi_array<float, 2> clust_array_2d(boost::extents[cluster_matrix_size_x][cluster_matrix_size_y]);
144 
145  // Preparing to retrieve ADC counts from the SiPixelCluster. In the cluster,
146  // we have the following:
147  // int minPixelRow(); // Minimum pixel index in the x direction (low edge).
148  // int maxPixelRow(); // Maximum pixel index in the x direction (top edge).
149  // int minPixelCol(); // Minimum pixel index in the y direction (left edge).
150  // int maxPixelCol(); // Maximum pixel index in the y direction (right edge).
151  // So the pixels from minPixelRow() will go into clust_array_2d[0][*],
152  // and the pixels from minPixelCol() will go into clust_array_2d[*][0].
153 
154  int row_offset = cluster.minPixelRow();
155  int col_offset = cluster.minPixelCol();
156 
157  // Store the coordinates of the center of the (0,0) pixel of the array that
158  // gets passed to PixelTempReco2D
159  // Will add these values to the output of PixelTempReco2D
160  float tmp_x = float(row_offset) + 0.5f;
161  float tmp_y = float(col_offset) + 0.5f;
162 
163  // Store these offsets (to be added later) in a LocalPoint after tranforming
164  // them from measurement units (pixel units) to local coordinates (cm)
165 
166  // ggiurgiu@jhu.edu 12/09/2010 : update call with trk angles needed for bow/kink corrections
167  LocalPoint lp;
168 
169  if ( with_track_angle )
170  lp = theTopol->localPosition( MeasurementPoint(tmp_x, tmp_y), loc_trk_pred_ );
171  else
172  {
173  edm::LogError("PixelCPETemplateReco")
174  << "@SUB = PixelCPETemplateReco::localPosition"
175  << "Should never be here. PixelCPETemplateReco should always be called with track angles. This is a bad error !!! ";
176 
177  lp = theTopol->localPosition( MeasurementPoint(tmp_x, tmp_y) );
178  }
179 
180 
181  // Visualize large clusters ---------------------------------------------------------
182  // From Petar: maybe this should be moved into a method in the base class?
183  /*
184  char cluster_matrix[100][100];
185  for (int i=0; i<100; i++)
186  for (int j=0; j<100; j++)
187  cluster_matrix[i][j] = '.';
188 
189  if ( cluster.sizeX()>cluster_matrix_size_x || cluster.sizeY()>cluster_matrix_size_y )
190  {
191  cout << "cluster.size() = " << cluster.size() << endl;
192  cout << "cluster.sizeX() = " << cluster.sizeX() << endl;
193  cout << "cluster.sizeY() = " << cluster.sizeY() << endl;
194 
195  for ( std::vector<SiPixelCluster::Pixel>::const_iterator pix = pixVec.begin(); pix != pixVec.end(); ++pix )
196  {
197  int i = (int)(pix->x) - row_offset;
198  int j = (int)(pix->y) - col_offset;
199  cluster_matrix[i][j] = '*';
200  }
201 
202  for (int i=0; i<(int)cluster.sizeX()+2; i++)
203  {
204  for (int j=0; j<(int)cluster.sizeY()+2; j++)
205  cout << cluster_matrix[i][j];
206  cout << endl;
207  }
208  } // if ( cluster.sizeX()>cluster_matrix_size_x || cluster.sizeY()>cluster_matrix_size_y )
209  */
210  // End Visualize clusters ---------------------------------------------------------
211 
212 
213  // Copy clust's pixels (calibrated in electrons) into clust_array_2d;
214  for (int i=0 ; i!=cluster.size(); ++i )
215  {
216  auto pix = cluster.pixel(i);
217  // *pixIter dereferences to Pixel struct, with public vars x, y, adc (all float)
218  // 02/13/2008 ggiurgiu@fnal.gov: type of x, y and adc has been changed to unsigned char, unsigned short, unsigned short
219  // in DataFormats/SiPixelCluster/interface/SiPixelCluster.h so the type cast to int is redundant. Leave it there, it
220  // won't hurt.
221  int irow = int(pix.x) - row_offset; // &&& do we need +0.5 ???
222  int icol = int(pix.y) - col_offset; // &&& do we need +0.5 ???
223 
224  // Gavril : what do we do here if the row/column is larger than cluster_matrix_size_x/cluster_matrix_size_y = 7/21 ?
225  // Ignore them for the moment...
226  if ( irow<cluster_matrix_size_x && icol<cluster_matrix_size_y )
227  // 02/13/2008 ggiurgiu@fnal.gov typecast pixIter->adc to float
228  clust_array_2d[irow][icol] = (float)pix.adc;
229  }
230 
231  // Make and fill the bool arrays flagging double pixels
232  std::vector<bool> ydouble(cluster_matrix_size_y), xdouble(cluster_matrix_size_x);
233  // x directions (shorter), rows
234  for (int irow = 0; irow < cluster_matrix_size_x; ++irow)
235  {
236  xdouble[irow] = theRecTopol->isItBigPixelInX( irow+row_offset );
237  }
238 
239  // y directions (longer), columns
240  for (int icol = 0; icol < cluster_matrix_size_y; ++icol)
241  {
242  ydouble[icol] = theRecTopol->isItBigPixelInY( icol+col_offset );
243  }
244 
245  // Output:
246  float nonsense = -99999.9f; // nonsense init value
248  // If the template recontruction fails, we want to return 1.0 for now
250  templQbin_ = 0;
251  // We have a boolean denoting whether the reco failed or not
252  hasFilledProb_ = false;
253 
254  float templYrec1_ = nonsense;
255  float templXrec1_ = nonsense;
256  float templYrec2_ = nonsense;
257  float templXrec2_ = nonsense;
258 
259  // ******************************************************************
260  // Do it! Use cotalpha_ and cotbeta_ calculated in PixelCPEBase
261 
262 
263  float locBz = (*theParam).bz;
264 
265  ierr =
267  locBz,
268  clust_array_2d, ydouble, xdouble,
269  templ_,
272  templQbin_,
273  speed_,
275  );
276 
277  // ******************************************************************
278 
279  // Check exit status
280  if unlikely( ierr != 0 )
281  {
282  LogDebug("PixelCPETemplateReco::localPosition") <<
283  "reconstruction failed with error " << ierr << "\n";
284 
285  // Gavril: what do we do in this case ? For now, just return the cluster center of gravity in microns
286  // In the x case, apply a rough Lorentz drift average correction
287  // To do: call PixelCPEGeneric whenever PixelTempReco2D fails
288  float lorentz_drift = -999.9;
290  lorentz_drift = 60.0f; // in microns
292  lorentz_drift = 10.0f; // in microns
293  else
294  throw cms::Exception("PixelCPETemplateReco::localPosition :")
295  << "A non-pixel detector type in here?" << "\n";
296  // ggiurgiu@jhu.edu, 21/09/2010 : trk angles needed to correct for bows/kinks
297  if ( with_track_angle )
298  {
299  templXrec_ = theTopol->localX( cluster.x(), loc_trk_pred_ ) - lorentz_drift * micronsToCm; // rough Lorentz drift correction
300  templYrec_ = theTopol->localY( cluster.y(), loc_trk_pred_ );
301  }
302  else
303  {
304  edm::LogError("PixelCPETemplateReco")
305  << "@SUB = PixelCPETemplateReco::localPosition"
306  << "Should never be here. PixelCPETemplateReco should always be called with track angles. This is a bad error !!! ";
307 
308  templXrec_ = theTopol->localX( cluster.x() ) - lorentz_drift * micronsToCm; // rough Lorentz drift correction
309  templYrec_ = theTopol->localY( cluster.y() );
310  }
311  }
312  else if unlikely( UseClusterSplitter_ && templQbin_ == 0 )
313  {
314  cout << " PixelCPETemplateReco : We should never be here !!!!!!!!!!!!!!!!!!!!!!" << endl;
315  cout << " (int)UseClusterSplitter_ = " << (int)UseClusterSplitter_ << endl;
316 
317  //ierr =
318  //PixelTempSplit( ID, fpix, cotalpha_, cotbeta_,
319  // clust_array_2d, ydouble, xdouble,
320  // templ_,
321  // templYrec1_, templYrec2_, templSigmaY_, templProbY_,
322  // templXrec1_, templXrec2_, templSigmaX_, templProbX_,
323  // templQbin_ );
324 
325 
326  float dchisq;
327  float templProbQ_;
328  SiPixelTemplate2D templ2D_;
329  templ2D_.pushfile(ID);
330 
331  ierr =
333  clust_array_2d,
334  ydouble, xdouble,
335  templ_,
336  templYrec1_, templYrec2_, templSigmaY_, templProbY_,
337  templXrec1_, templXrec2_, templSigmaX_, templProbX_,
338  templQbin_,
339  templProbQ_,
340  true,
341  dchisq,
342  templ2D_ );
343 
344 
345  if ( ierr != 0 )
346  {
347  LogDebug("PixelCPETemplateReco::localPosition") <<
348  "reconstruction failed with error " << ierr << "\n";
349 
350  // Gavril: what do we do in this case ? For now, just return the cluster center of gravity in microns
351  // In the x case, apply a rough Lorentz drift average correction
352  // To do: call PixelCPEGeneric whenever PixelTempReco2D fails
353  float lorentz_drift = -999.9f;
355  lorentz_drift = 60.0f; // in microns
357  lorentz_drift = 10.0f; // in microns
358  else
359  throw cms::Exception("PixelCPETemplateReco::localPosition :")
360  << "A non-pixel detector type in here?" << "\n";
361 
362  // ggiurgiu@jhu.edu, 12/09/2010 : trk angles needed to correct for bows/kinks
363  if ( with_track_angle )
364  {
365  templXrec_ = theTopol->localX( cluster.x(),loc_trk_pred_ ) - lorentz_drift * micronsToCm; // rough Lorentz drift correction
366  templYrec_ = theTopol->localY( cluster.y(),loc_trk_pred_ );
367  }
368  else
369  {
370  edm::LogError("PixelCPETemplateReco")
371  << "@SUB = PixelCPETemplateReco::localPosition"
372  << "Should never be here. PixelCPETemplateReco should always be called with track angles. This is a bad error !!! ";
373 
374  templXrec_ = theTopol->localX( cluster.x() ) - lorentz_drift * micronsToCm; // very rough Lorentz drift correction
375  templYrec_ = theTopol->localY( cluster.y() );
376 
377  }
378  }
379  else
380  {
381  // go from micrometer to centimeter
382  templXrec1_ *= micronsToCm;
383  templYrec1_ *= micronsToCm;
384  templXrec2_ *= micronsToCm;
385  templYrec2_ *= micronsToCm;
386 
387  // go back to the module coordinate system
388  templXrec1_ += lp.x();
389  templYrec1_ += lp.y();
390  templXrec2_ += lp.x();
391  templYrec2_ += lp.y();
392 
393  // calculate distance from each hit to the track and choose the
394  // hit closest to the track
395  float distance11 = sqrt( (templXrec1_ - trk_lp_x)*(templXrec1_ - trk_lp_x) +
396  (templYrec1_ - trk_lp_y)*(templYrec1_ - trk_lp_y) );
397 
398  float distance12 = sqrt( (templXrec1_ - trk_lp_x)*(templXrec1_ - trk_lp_x) +
399  (templYrec2_ - trk_lp_y)*(templYrec2_ - trk_lp_y) );
400 
401  float distance21 = sqrt( (templXrec2_ - trk_lp_x)*(templXrec2_ - trk_lp_x) +
402  (templYrec1_ - trk_lp_y)*(templYrec1_ - trk_lp_y) );
403 
404  float distance22 = sqrt( (templXrec2_ - trk_lp_x)*(templXrec2_ - trk_lp_x) +
405  (templYrec2_ - trk_lp_y)*(templYrec2_ - trk_lp_y) );
406 
407  float min_templXrec_ = -999.9;
408  float min_templYrec_ = -999.9;
409  float distance_min = 9999999999.9;
410  if ( distance11 < distance_min )
411  {
412  distance_min = distance11;
413  min_templXrec_ = templXrec1_;
414  min_templYrec_ = templYrec1_;
415  }
416  if ( distance12 < distance_min )
417  {
418  distance_min = distance12;
419  min_templXrec_ = templXrec1_;
420  min_templYrec_ = templYrec2_;
421  }
422  if ( distance21 < distance_min )
423  {
424  distance_min = distance21;
425  min_templXrec_ = templXrec2_;
426  min_templYrec_ = templYrec1_;
427  }
428  if ( distance22 < distance_min )
429  {
430  distance_min = distance22;
431  min_templXrec_ = templXrec2_;
432  min_templYrec_ = templYrec2_;
433  }
434 
435  templXrec_ = min_templXrec_;
436  templYrec_ = min_templYrec_;
437  }
438  } // else if ( UseClusterSplitter_ && templQbin_ == 0 )
439 
440  else // apparenly this is he good one!
441  {
442  // go from micrometer to centimeter
445 
446  // go back to the module coordinate system
447  templXrec_ += lp.x();
448  templYrec_ += lp.y();
449  }
450 
451  // Save probabilities and qBin in the quantities given to us by the base class
452  // (for which there are also inline getters). &&& templProbX_ etc. should be retired...
456  qBin_ = templQbin_;
457 
458  if ( ierr == 0 ) // always true here
459  hasFilledProb_ = true;
460 
461  return LocalPoint( templXrec_, templYrec_ );
462 
463 }
464 
465 //------------------------------------------------------------------
466 // localError() relies on localPosition() being called FIRST!!!
467 //------------------------------------------------------------------
468 LocalError
470  const GeomDetUnit& det ) const
471 {
472  //cout << endl;
473  //cout << "Set PixelCPETemplate errors .............................................." << endl;
474 
475  //cout << "CPETemplate : " << endl;
476 
477  //--- Default is the maximum error used for edge clusters.
478  const float sig12 = 1./sqrt(12.0);
479  float xerr = thePitchX *sig12;
480  float yerr = thePitchY *sig12;
481 
482  // Check if the errors were already set at the clusters splitting level
483  if ( cluster.getSplitClusterErrorX() > 0.0f && cluster.getSplitClusterErrorX() < 7777.7f &&
484  cluster.getSplitClusterErrorY() > 0.0f && cluster.getSplitClusterErrorY() < 7777.7f )
485  {
486  xerr = cluster.getSplitClusterErrorX() * micronsToCm;
487  yerr = cluster.getSplitClusterErrorY() * micronsToCm;
488 
489  //cout << "Errors set at cluster splitting level : " << endl;
490  //cout << "xerr = " << xerr << endl;
491  //cout << "yerr = " << yerr << endl;
492  }
493  else
494  {
495  // If errors are not split at the cluster splitting level, set the errors here
496 
497  //cout << "Errors are not split at the cluster splitting level, set the errors here : " << endl;
498 
499  setTheDet( det, cluster );
500 
501  int maxPixelCol = cluster.maxPixelCol();
502  int maxPixelRow = cluster.maxPixelRow();
503  int minPixelCol = cluster.minPixelCol();
504  int minPixelRow = cluster.minPixelRow();
505 
506  //--- Are we near either of the edges?
507  bool edgex = ( theRecTopol->isItEdgePixelInX( minPixelRow ) || theRecTopol->isItEdgePixelInX( maxPixelRow ) );
508  bool edgey = ( theRecTopol->isItEdgePixelInY( minPixelCol ) || theRecTopol->isItEdgePixelInY( maxPixelCol ) );
509 
510  if ( ierr !=0 )
511  {
512  // If reconstruction fails the hit position is calculated from cluster center of gravity
513  // corrected in x by average Lorentz drift. Assign huge errors.
514  //xerr = 10.0 * (float)cluster.sizeX() * xerr;
515  //yerr = 10.0 * (float)cluster.sizeX() * yerr;
516 
517  // Assign better errors based on the residuals for failed template cases
519  {
520  xerr = 55.0f * micronsToCm;
521  yerr = 36.0f * micronsToCm;
522  }
524  {
525  xerr = 42.0f * micronsToCm;
526  yerr = 39.0f * micronsToCm;
527  }
528  else
529  throw cms::Exception("PixelCPETemplateReco::localError :") << "A non-pixel detector type in here?" ;
530 
531  //cout << "xerr = " << xerr << endl;
532  //cout << "yerr = " << yerr << endl;
533 
534  //return LocalError(xerr*xerr, 0, yerr*yerr);
535  }
536  else if ( edgex || edgey )
537  {
538  // for edge pixels assign errors according to observed residual RMS
539  if ( edgex && !edgey )
540  {
541  xerr = 23.0f * micronsToCm;
542  yerr = 39.0f * micronsToCm;
543  }
544  else if ( !edgex && edgey )
545  {
546  xerr = 24.0f * micronsToCm;
547  yerr = 96.0f * micronsToCm;
548  }
549  else if ( edgex && edgey )
550  {
551  xerr = 31.0f * micronsToCm;
552  yerr = 90.0f * micronsToCm;
553  }
554  else
555  {
556  throw cms::Exception(" PixelCPETemplateReco::localError: Something wrong with pixel edge flag !!!");
557  }
558 
559  //cout << "xerr = " << xerr << endl;
560  //cout << "yerr = " << yerr << endl;
561  }
562  else
563  {
564  // &&& need a class const
565  //const float micronsToCm = 1.0e-4;
566 
567  xerr = templSigmaX_ * micronsToCm;
568  yerr = templSigmaY_ * micronsToCm;
569 
570  //cout << "xerr = " << xerr << endl;
571  //cout << "yerr = " << yerr << endl;
572 
573  // &&& should also check ierr (saved as class variable) and return
574  // &&& nonsense (another class static) if the template fit failed.
575  }
576 
577  if (theVerboseLevel > 9)
578  {
579  LogDebug("PixelCPETemplateReco") <<
580  " Sizex = " << cluster.sizeX() << " Sizey = " << cluster.sizeY() << " Edgex = " << edgex << " Edgey = " << edgey <<
581  " ErrX = " << xerr << " ErrY = " << yerr;
582  }
583 
584  } // else
585 
586  if ( !(xerr > 0.0f) )
587  throw cms::Exception("PixelCPETemplateReco::localError")
588  << "\nERROR: Negative pixel error xerr = " << xerr << "\n\n";
589 
590  if ( !(yerr > 0.0f) )
591  throw cms::Exception("PixelCPETemplateReco::localError")
592  << "\nERROR: Negative pixel error yerr = " << yerr << "\n\n";
593 
594  //cout << "Final errors set to: " << endl;
595  //cout << "xerr = " << xerr << endl;
596  //cout << "yerr = " << yerr << endl;
597  //cout << "Out of PixelCPETemplateREco..........................................................................." << endl;
598  //cout << endl;
599 
600  return LocalError(xerr*xerr, 0, yerr*yerr);
601 }
602 
#define LogDebug(id)
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
Topology::LocalTrackPred loc_trk_pred_
Definition: PixelCPEBase.h:276
int minPixelCol() const
bool with_track_angle
Definition: PixelCPEBase.h:226
const float micronsToCm
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
#define PI
short getTemplateID(const uint32_t &detid) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
uint32_t ID
Definition: Definitions.h:26
T y() const
Definition: PV3DBase.h:63
float probabilityQ_
Definition: PixelCPEBase.h:231
LocalError localError(const SiPixelCluster &cl, const GeomDetUnit &det) const
GeomDetType::SubDetector thePart
Definition: PixelCPEBase.h:194
int maxPixelRow() const
#define unlikely(x)
Definition: Likely.h:21
float probabilityY_
Definition: PixelCPEBase.h:230
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
int minPixelRow() const
T sqrt(T t)
Definition: SSEVec.h:48
bool hasFilledProb_
Definition: PixelCPEBase.h:236
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:269
LocalPoint localPosition(const SiPixelCluster &cluster, const GeomDetUnit &det) const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
double f[11][100]
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 float localX(const float mpX) const =0
bool pushfile(int filenum)
float getSplitClusterErrorY() const
const RectangularPixelTopology * theRecTopol
Definition: PixelCPEBase.h:190
const PixelTopology * theTopol
Definition: PixelCPEBase.h:189
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:89
Pixel cluster – collection of neighboring pixels above threshold.
Pixel pixel(int i) const
float getSplitClusterErrorX() const
float y() const
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
bool pushfile(int filenum)
const int cluster_matrix_size_x
tuple cout
Definition: gather_cfg.py:121
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:185
int sizeX() const
T x() const
Definition: PV3DBase.h:62
const float degsPerRad
Definition: PixelCPEBase.cc:39
float probabilityX_
Definition: PixelCPEBase.h:229
float x() const
virtual float localY(const float mpY) const =0
int size() const