CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
PixelCPEClusterRepair Class Reference

#include <PixelCPEClusterRepair.h>

Inheritance diagram for PixelCPEClusterRepair:
PixelCPEBase PixelClusterParameterEstimator

Classes

struct  ClusterParamTemplate
 
class  Rule
 

Public Member Functions

 PixelCPEClusterRepair (edm::ParameterSet const &conf, const MagneticField *, const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, const SiPixelTemplateDBObject *, const SiPixel2DTemplateDBObject *)
 
 ~PixelCPEClusterRepair () override
 
- Public Member Functions inherited from PixelCPEBase
ReturnType getParameters (const SiPixelCluster &cl, const GeomDetUnit &det) const override
 
ReturnType getParameters (const SiPixelCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const override
 
 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)
 
- Public Member Functions inherited from PixelClusterParameterEstimator
unsigned int clusterProbComputationFlag () const
 
virtual ReturnType getParameters (const SiPixelCluster &cl, const GeomDetUnit &det, const TrajectoryStateOnSurface &tsos) const
 
virtual VLocalValues localParametersV (const SiPixelCluster &cluster, const GeomDetUnit &gd) const
 
virtual VLocalValues localParametersV (const SiPixelCluster &cluster, const GeomDetUnit &gd, TrajectoryStateOnSurface &tsos) const
 
 PixelClusterParameterEstimator ()
 
virtual ~PixelClusterParameterEstimator ()
 

Static Public Member Functions

static void fillPSetDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from PixelCPEBase
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 

Private Member Functions

void callTempReco1D (DetParam const &theDetParam, ClusterParamTemplate &theClusterParam, SiPixelTemplateReco::ClusMatrix &clusterPayload, int ID, LocalPoint &lp) const
 
void callTempReco2D (DetParam const &theDetParam, ClusterParamTemplate &theClusterParam, SiPixelTemplateReco2D::ClusMatrix &clusterPayload, int ID, LocalPoint &lp) const
 
void checkRecommend2D (DetParam const &theDetParam, ClusterParamTemplate &theClusterParam, SiPixelTemplateReco::ClusMatrix &clusterPayload, int ID) const
 
std::unique_ptr< ClusterParamcreateClusterParam (const SiPixelCluster &cl) const override
 
void fill2DTemplIDs ()
 
LocalError localError (DetParam const &theDetParam, ClusterParam &theClusterParam) const override
 
LocalPoint localPosition (DetParam const &theDetParam, ClusterParam &theClusterParam) const override
 

Private Attributes

int barrelTemplateID_
 
int forwardTemplateID_
 
float maxSizeMismatchInY_
 
float minChargeRatio_
 
std::vector< Rulerecommend2D_
 
bool runDamagedClusters_
 
int speed_
 
const SiPixel2DTemplateDBObjecttemplateDBobject2D_
 
std::string templateDir_
 
std::vector< SiPixelTemplateStore2DthePixelTemp2D_
 
std::vector< SiPixelTemplateStorethePixelTemp_
 
bool UseClusterSplitter_
 

Additional Inherited Members

- Public Types inherited from PixelClusterParameterEstimator
typedef std::pair< LocalPoint, LocalErrorLocalValues
 
using ReturnType = std::tuple< LocalPoint, LocalError, SiPixelRecHitQuality::QualWordType >
 
typedef std::vector< LocalValuesVLocalValues
 
- Protected Types inherited from PixelCPEBase
using DetParams = std::vector< DetParam >
 
typedef GloballyPositioned< double > Frame
 
- Protected Member Functions inherited from PixelCPEBase
void computeAnglesFromDetPosition (DetParam const &theDetParam, ClusterParam &theClusterParam) const
 
void computeAnglesFromTrajectory (DetParam const &theDetParam, ClusterParam &theClusterParam, const LocalTrajectoryParameters &ltp) const
 
void computeLorentzShifts (DetParam &) const
 
DetParam const & detParam (const GeomDetUnit &det) const
 
LocalVector driftDirection (DetParam &theDetParam, GlobalVector bfield) const
 
LocalVector driftDirection (DetParam &theDetParam, LocalVector bfield) const
 
void setTheClu (DetParam const &, ClusterParam &theClusterParam) const
 
- Protected Attributes inherited from PixelCPEBase
bool alpha2Order
 
bool DoLorentz_
 
const SiPixelGenErrorDBObjectgenErrorDBObject_
 
const TrackerGeometrygeom_
 
float lAOffset_
 
float lAWidthBPix_
 
float lAWidthFPix_
 
bool LoadTemplatesFromDB_
 
const SiPixelLorentzAnglelorentzAngle_
 
const SiPixelLorentzAnglelorentzAngleWidth_
 
DetParams m_DetParams = DetParams(1440)
 
const MagneticFieldmagfield_
 
const SiPixelTemplateDBObjecttemplateDBobject_
 
int theFlag_
 
int theVerboseLevel
 
const TrackerTopologyttopo_
 
bool useLAOffsetFromConfig_
 
bool useLAWidthFromConfig_
 
bool useLAWidthFromDB_
 
- Protected Attributes inherited from PixelClusterParameterEstimator
unsigned int clusterProbComputationFlag_
 
- Static Protected Attributes inherited from PixelCPEBase
static constexpr float bothEdgeXError_ = 31.0f
 
static constexpr float bothEdgeYError_ = 90.0f
 
static constexpr float clusterSplitMaxError_ = 7777.7f
 
static constexpr float xEdgeXError_ = 23.0f
 
static constexpr float xEdgeYError_ = 39.0f
 
static constexpr float yEdgeXError_ = 24.0f
 
static constexpr float yEdgeYError_ = 96.0f
 

Detailed Description

Definition at line 34 of file PixelCPEClusterRepair.h.

Constructor & Destructor Documentation

◆ PixelCPEClusterRepair()

PixelCPEClusterRepair::PixelCPEClusterRepair ( edm::ParameterSet const &  conf,
const MagneticField mag,
const TrackerGeometry geom,
const TrackerTopology ttopo,
const SiPixelLorentzAngle lorentzAngle,
const SiPixelTemplateDBObject templateDBobject,
const SiPixel2DTemplateDBObject templateDBobject2D 
)

Definition at line 38 of file PixelCPEClusterRepair.cc.

45  : PixelCPEBase(conf, mag, geom, ttopo, lorentzAngle, nullptr, templateDBobject, nullptr, 1) {
46  LogDebug("PixelCPEClusterRepair::(constructor)") << endl;
47 
48  //--- Parameter to decide between DB or text file template access
50  // Initialize template store to the selected ID [Morris, 6/25/08]
52  throw cms::Exception("PixelCPEClusterRepair")
53  << "\nERROR: Templates not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version "
54  << (*templateDBobject_).version() << "\n\n";
55 
56  // Initialize template store to the selected ID [Morris, 6/25/08]
57  if (!SiPixelTemplate2D::pushfile(*templateDBobject2D, thePixelTemp2D_))
58  throw cms::Exception("PixelCPEClusterRepair")
59  << "\nERROR: Templates not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject2D version "
60  << (*templateDBobject2D).version() << "\n\n";
61  } else {
62  LogDebug("PixelCPEClusterRepair") << "Loading templates for barrel and forward from ASCII files." << endl;
63  //--- (Archaic) Get configurable template IDs. This code executes only if we loading pixels from ASCII
64  // files, and then they are mandatory.
65  barrelTemplateID_ = conf.getParameter<int>("barrelTemplateID");
66  forwardTemplateID_ = conf.getParameter<int>("forwardTemplateID");
67  templateDir_ = conf.getParameter<int>("directoryWithTemplates");
68 
70  throw cms::Exception("PixelCPEClusterRepair")
71  << "\nERROR: Template ID " << barrelTemplateID_
72  << " not loaded correctly from text file. Reconstruction will fail.\n\n";
73 
75  throw cms::Exception("PixelCPEClusterRepair")
76  << "\nERROR: Template ID " << forwardTemplateID_
77  << " not loaded correctly from text file. Reconstruction will fail.\n\n";
78  }
79 
80  speed_ = conf.getParameter<int>("speed");
81  LogDebug("PixelCPEClusterRepair::PixelCPEClusterRepair:") << "Template speed = " << speed_ << "\n";
82 
83  // this returns the magnetic field value in kgauss (1T = 10 kgauss)
84  int theMagField = mag->nominalValue();
85 
86  if (theMagField >= 36 && theMagField < 39) {
87  LogDebug("PixelCPEClusterRepair::PixelCPEClusterRepair:")
88  << "Magnetic field value is: " << theMagField << " kgauss. Algorithm is being run \n";
89 
90  templateDBobject2D_ = templateDBobject2D;
92  }
93 
94  UseClusterSplitter_ = conf.getParameter<bool>("UseClusterSplitter");
95 
96  maxSizeMismatchInY_ = conf.getParameter<double>("MaxSizeMismatchInY");
97  minChargeRatio_ = conf.getParameter<double>("MinChargeRatio");
98 
99  // read sub-detectors and apply rule to recommend 2D
100  // can be:
101  // XYX (XYZ = PXB, PXE)
102  // XYZ n (XYZ as above, n = layer, wheel or disk = 1 .. 6 ;)
103  std::vector<std::string> str_recommend2D = conf.getParameter<std::vector<std::string>>("Recommend2D");
104  recommend2D_.reserve(str_recommend2D.size());
105  for (auto& str : str_recommend2D) {
106  recommend2D_.push_back(str);
107  }
108 
109  // do not recommend 2D if theMagField!=3.8T
110  if (theMagField < 36 || theMagField > 39) {
111  recommend2D_.clear();
112  }
113 
114  // run CR on damaged clusters (and not only on edge hits)
115  runDamagedClusters_ = conf.getParameter<bool>("RunDamagedClusters");
116 }

References barrelTemplateID_, Exception, fill2DTemplIDs(), forwardTemplateID_, edm::ParameterSet::getParameter(), PixelCPEBase::LoadTemplatesFromDB_, LogDebug, mag(), maxSizeMismatchInY_, minChargeRatio_, SiPixelTemplate2D::pushfile(), SiPixelTemplate::pushfile(), recommend2D_, runDamagedClusters_, speed_, str, templateDBobject2D_, PixelCPEBase::templateDBobject_, templateDir_, thePixelTemp2D_, thePixelTemp_, and UseClusterSplitter_.

◆ ~PixelCPEClusterRepair()

PixelCPEClusterRepair::~PixelCPEClusterRepair ( )
override

Definition at line 158 of file PixelCPEClusterRepair.cc.

158  {
159  for (auto x : thePixelTemp_)
160  x.destroy();
161  for (auto x : thePixelTemp2D_)
162  x.destroy();
163 }

References thePixelTemp2D_, thePixelTemp_, and x.

Member Function Documentation

◆ callTempReco1D()

void PixelCPEClusterRepair::callTempReco1D ( DetParam const &  theDetParam,
ClusterParamTemplate theClusterParam,
SiPixelTemplateReco::ClusMatrix clusterPayload,
int  ID,
LocalPoint lp 
) const
private

Definition at line 315 of file PixelCPEClusterRepair.cc.

319  {
321 
322  // Output:
323  float nonsense = -99999.9f; // nonsense init value
324  theClusterParam.templXrec_ = theClusterParam.templYrec_ = theClusterParam.templSigmaX_ =
325  theClusterParam.templSigmaY_ = nonsense;
326  // If the template recontruction fails, we want to return 1.0 for now
327  theClusterParam.probabilityX_ = theClusterParam.probabilityY_ = theClusterParam.probabilityQ_ = 1.f;
328  theClusterParam.qBin_ = 0;
329  // We have a boolean denoting whether the reco failed or not
330  theClusterParam.hasFilledProb_ = false;
331 
332  // ******************************************************************
333  //--- Call normal TemplateReco
334  //
335  float locBz = theDetParam.bz;
336  float locBx = theDetParam.bx;
337  //
338  const bool deadpix = false;
339  std::vector<std::pair<int, int>> zeropix;
340  int nypix = 0, nxpix = 0;
341  //
342  theClusterParam.ierr = PixelTempReco1D(ID,
343  theClusterParam.cotalpha,
344  theClusterParam.cotbeta,
345  locBz,
346  locBx,
347  clusterPayload,
348  templ,
349  theClusterParam.templYrec_,
350  theClusterParam.templSigmaY_,
351  theClusterParam.probabilityY_,
352  theClusterParam.templXrec_,
353  theClusterParam.templSigmaX_,
354  theClusterParam.probabilityX_,
355  theClusterParam.qBin_,
356  speed_,
357  deadpix,
358  zeropix,
359  theClusterParam.probabilityQ_,
360  nypix,
361  nxpix);
362  // ******************************************************************
363 
364  //--- Check exit status
365  if UNLIKELY (theClusterParam.ierr != 0) {
366  LogDebug("PixelCPEClusterRepair::localPosition")
367  << "reconstruction failed with error " << theClusterParam.ierr << "\n";
368 
369  theClusterParam.probabilityX_ = theClusterParam.probabilityY_ = theClusterParam.probabilityQ_ = 0.f;
370  theClusterParam.qBin_ = 0;
371 
372  // Gavril: what do we do in this case ? For now, just return the cluster center of gravity in microns
373  // In the x case, apply a rough Lorentz drift average correction
374  // To do: call PixelCPEGeneric whenever PixelTempReco1D fails
375  float lorentz_drift = -999.9;
376  if (!GeomDetEnumerators::isEndcap(theDetParam.thePart))
377  lorentz_drift = 60.0f; // in microns
378  else
379  lorentz_drift = 10.0f; // in microns
380  // GG: trk angles needed to correct for bows/kinks
381  if (theClusterParam.with_track_angle) {
382  theClusterParam.templXrec_ =
383  theDetParam.theTopol->localX(theClusterParam.theCluster->x(), theClusterParam.loc_trk_pred) -
384  lorentz_drift * micronsToCm; // rough Lorentz drift correction
385  theClusterParam.templYrec_ =
386  theDetParam.theTopol->localY(theClusterParam.theCluster->y(), theClusterParam.loc_trk_pred);
387  } else {
388  edm::LogError("PixelCPEClusterRepair") << "@SUB = PixelCPEClusterRepair::localPosition"
389  << "Should never be here. PixelCPEClusterRepair should always be called "
390  "with track angles. This is a bad error !!! ";
391 
392  theClusterParam.templXrec_ = theDetParam.theTopol->localX(theClusterParam.theCluster->x()) -
393  lorentz_drift * micronsToCm; // rough Lorentz drift correction
394  theClusterParam.templYrec_ = theDetParam.theTopol->localY(theClusterParam.theCluster->y());
395  }
396  } else {
397  //--- Template Reco succeeded. The probabilities are filled.
398  theClusterParam.hasFilledProb_ = true;
399 
400  //--- Go from microns to centimeters
401  theClusterParam.templXrec_ *= micronsToCm;
402  theClusterParam.templYrec_ *= micronsToCm;
403 
404  //--- Go back to the module coordinate system
405  theClusterParam.templXrec_ += lp.x();
406  theClusterParam.templYrec_ += lp.y();
407  }
408  return;
409 }

References PixelCPEBase::DetParam::bx, PixelCPEBase::DetParam::bz, PixelCPEBase::ClusterParam::cotalpha, PixelCPEBase::ClusterParam::cotbeta, PixelCPEBase::ClusterParam::hasFilledProb_, PixelCPEClusterRepair::ClusterParamTemplate::ierr, GeomDetEnumerators::isEndcap(), PixelCPEBase::ClusterParam::loc_trk_pred, PixelTopology::localX(), PixelTopology::localY(), LogDebug, SiPixelTemplateReco::PixelTempReco1D(), PixelCPEBase::ClusterParam::probabilityQ_, PixelCPEBase::ClusterParam::probabilityX_, PixelCPEBase::ClusterParam::probabilityY_, PixelCPEBase::ClusterParam::qBin_, speed_, PixelCPEClusterRepair::ClusterParamTemplate::templSigmaX_, PixelCPEClusterRepair::ClusterParamTemplate::templSigmaY_, PixelCPEClusterRepair::ClusterParamTemplate::templXrec_, PixelCPEClusterRepair::ClusterParamTemplate::templYrec_, PixelCPEBase::ClusterParam::theCluster, PixelCPEBase::DetParam::thePart, thePixelTemp_, PixelCPEBase::DetParam::theTopol, UNLIKELY, PixelCPEBase::ClusterParam::with_track_angle, PV3DBase< T, PVType, FrameType >::x(), SiPixelCluster::x(), PV3DBase< T, PVType, FrameType >::y(), and SiPixelCluster::y().

Referenced by localPosition().

◆ callTempReco2D()

void PixelCPEClusterRepair::callTempReco2D ( DetParam const &  theDetParam,
ClusterParamTemplate theClusterParam,
SiPixelTemplateReco2D::ClusMatrix clusterPayload,
int  ID,
LocalPoint lp 
) const
private

Definition at line 414 of file PixelCPEClusterRepair.cc.

418  {
420 
421  // Output:
422  float nonsense = -99999.9f; // nonsense init value
423  theClusterParam.templXrec_ = theClusterParam.templYrec_ = theClusterParam.templSigmaX_ =
424  theClusterParam.templSigmaY_ = nonsense;
425  // If the template recontruction fails, we want to return 1.0 for now
426  theClusterParam.probabilityX_ = theClusterParam.probabilityY_ = theClusterParam.probabilityQ_ = 1.f;
427  theClusterParam.qBin_ = 0;
428  // We have a boolean denoting whether the reco failed or not
429  theClusterParam.hasFilledProb_ = false;
430 
431  // ******************************************************************
432  //--- Call 2D TemplateReco
433  //
434  float locBz = theDetParam.bz;
435  float locBx = theDetParam.bx;
436 
437  //--- Input:
438  // edgeflagy - (input) flag to indicate the present of edges in y:
439  // 0=none (or interior gap),1=edge at small y, 2=edge at large y, 3=edge at either end
440  //
441  // edgeflagx - (input) flag to indicate the present of edges in x:
442  // 0=none, 1=edge at small x, 2=edge at large x
443  //
444  // These two variables are calculated in setTheClu() and stored in edgeTypeX_ and edgeTypeY_
445  //
446  //--- Output:
447  // deltay - (output) template y-length - cluster length [when > 0, possibly missing end]
448  // npixels - ??? &&& Ask Morris
449 
450  float deltay = 0; // return param
451  int npixels = 0; // return param
452 
453  //For now, turn off edgeX_ flags
454  theClusterParam.edgeTypeX_ = 0;
455 
456  if (clusterPayload.mrow > 4) {
457  // The cluster is too big, the 2D reco will perform horribly.
458  // Better to return immediately in error
459  theClusterParam.ierr2 = 8;
460 
461  } else {
462  theClusterParam.ierr2 = PixelTempReco2D(ID,
463  theClusterParam.cotalpha,
464  theClusterParam.cotbeta,
465  locBz,
466  locBx,
467  theClusterParam.edgeTypeY_,
468  theClusterParam.edgeTypeX_,
469  clusterPayload,
470  templ2d,
471  theClusterParam.templYrec_,
472  theClusterParam.templSigmaY_,
473  theClusterParam.templXrec_,
474  theClusterParam.templSigmaX_,
475  theClusterParam.templProbXY_,
476  theClusterParam.probabilityQ_,
477  theClusterParam.qBin_,
478  deltay,
479  npixels);
480  }
481  // ******************************************************************
482 
483  //--- Check exit status
484  if UNLIKELY (theClusterParam.ierr2 != 0) {
485  LogDebug("PixelCPEClusterRepair::localPosition")
486  << "2D reconstruction failed with error " << theClusterParam.ierr2 << "\n";
487 
488  theClusterParam.probabilityX_ = theClusterParam.probabilityY_ = theClusterParam.probabilityQ_ = 0.f;
489  theClusterParam.qBin_ = 0;
490  // GG: what do we do in this case? For now, just return the cluster center of gravity in microns
491  // In the x case, apply a rough Lorentz drift average correction
492  float lorentz_drift = -999.9;
493  if (!GeomDetEnumerators::isEndcap(theDetParam.thePart))
494  lorentz_drift = 60.0f; // in microns // &&& replace with a constant (globally)
495  else
496  lorentz_drift = 10.0f; // in microns
497  // GG: trk angles needed to correct for bows/kinks
498  if (theClusterParam.with_track_angle) {
499  theClusterParam.templXrec_ =
500  theDetParam.theTopol->localX(theClusterParam.theCluster->x(), theClusterParam.loc_trk_pred) -
501  lorentz_drift * micronsToCm; // rough Lorentz drift correction
502  theClusterParam.templYrec_ =
503  theDetParam.theTopol->localY(theClusterParam.theCluster->y(), theClusterParam.loc_trk_pred);
504  } else {
505  edm::LogError("PixelCPEClusterRepair") << "@SUB = PixelCPEClusterRepair::localPosition"
506  << "Should never be here. PixelCPEClusterRepair should always be called "
507  "with track angles. This is a bad error !!! ";
508 
509  theClusterParam.templXrec_ = theDetParam.theTopol->localX(theClusterParam.theCluster->x()) -
510  lorentz_drift * micronsToCm; // rough Lorentz drift correction
511  theClusterParam.templYrec_ = theDetParam.theTopol->localY(theClusterParam.theCluster->y());
512  }
513  } else {
514  //--- Template Reco succeeded.
515  theClusterParam.hasFilledProb_ = true;
516 
517  //--- Go from microns to centimeters
518  theClusterParam.templXrec_ *= micronsToCm;
519  theClusterParam.templYrec_ *= micronsToCm;
520 
521  //--- Go back to the module coordinate system
522  theClusterParam.templXrec_ += lp.x();
523  theClusterParam.templYrec_ += lp.y();
524  }
525  return;
526 }

References PixelCPEBase::DetParam::bx, PixelCPEBase::DetParam::bz, PixelCPEBase::ClusterParam::cotalpha, PixelCPEBase::ClusterParam::cotbeta, PixelCPEBase::ClusterParam::edgeTypeX_, PixelCPEBase::ClusterParam::edgeTypeY_, PixelCPEBase::ClusterParam::hasFilledProb_, PixelCPEClusterRepair::ClusterParamTemplate::ierr2, GeomDetEnumerators::isEndcap(), PixelCPEBase::ClusterParam::loc_trk_pred, PixelTopology::localX(), PixelTopology::localY(), LogDebug, SiPixelTemplateReco2D::ClusMatrix::mrow, SiPixelTemplateReco2D::PixelTempReco2D(), PixelCPEBase::ClusterParam::probabilityQ_, PixelCPEBase::ClusterParam::probabilityX_, PixelCPEBase::ClusterParam::probabilityY_, PixelCPEBase::ClusterParam::qBin_, PixelCPEClusterRepair::ClusterParamTemplate::templProbXY_, PixelCPEClusterRepair::ClusterParamTemplate::templSigmaX_, PixelCPEClusterRepair::ClusterParamTemplate::templSigmaY_, PixelCPEClusterRepair::ClusterParamTemplate::templXrec_, PixelCPEClusterRepair::ClusterParamTemplate::templYrec_, PixelCPEBase::ClusterParam::theCluster, PixelCPEBase::DetParam::thePart, thePixelTemp2D_, PixelCPEBase::DetParam::theTopol, UNLIKELY, PixelCPEBase::ClusterParam::with_track_angle, PV3DBase< T, PVType, FrameType >::x(), SiPixelCluster::x(), PV3DBase< T, PVType, FrameType >::y(), and SiPixelCluster::y().

Referenced by localPosition().

◆ checkRecommend2D()

void PixelCPEClusterRepair::checkRecommend2D ( DetParam const &  theDetParam,
ClusterParamTemplate theClusterParam,
SiPixelTemplateReco::ClusMatrix clusterPayload,
int  ID 
) const
private

Definition at line 531 of file PixelCPEClusterRepair.cc.

536 {
537  // recommend2D is false by default
538  theClusterParam.recommended2D_ = false;
539 
540  DetId id = (theDetParam.theDet->geographicalId());
541 
542  bool recommend = false;
543  for (auto& rec : recommend2D_) {
544  recommend = rec.recommend(id, ttopo_);
545  if (recommend)
546  break;
547  }
548 
549  // only run on those layers recommended by configuration
550  if (!recommend) {
551  theClusterParam.recommended2D_ = false;
552  return;
553  }
554 
555  if (theClusterParam.edgeTypeY_) {
556  // For clusters that have edges in Y, run 2d reco.
557  // Flags already set by CPEBase
558  theClusterParam.recommended2D_ = true;
559  return;
560  }
561  // The 1d pixel template
563  if (!templ.interpolate(ID, theClusterParam.cotalpha, theClusterParam.cotbeta, theDetParam.bz, theDetParam.bx)) {
564  //error setting up template, return false
565  theClusterParam.recommended2D_ = false;
566  return;
567  }
568 
569  //length of the cluster taking into account double sized pixels
570  float nypix = clusterPayload.mcol;
571  for (int i = 0; i < clusterPayload.mcol; i++) {
572  if (clusterPayload.ydouble[i])
573  nypix += 1.;
574  }
575 
576  // templ.clsleny() is the expected length of the cluster along y axis.
577  // templ.qavg() is the expected total charge of the cluster
578  // theClusterParam.theCluster->charge() is the total charge of this cluster
579  float nydiff = templ.clsleny() - nypix;
580  float qratio = theClusterParam.theCluster->charge() / templ.qavg();
581 
582  if (nydiff > maxSizeMismatchInY_ && qratio < minChargeRatio_) {
583  // If the cluster is shorter than expected and has less charge, likely
584  // due to truncated cluster, try 2D reco
585 
586  theClusterParam.recommended2D_ = true;
587  theClusterParam.hasBadPixels_ = true;
588 
589  // if not RunDamagedClusters flag, don't try to fix any clusters
590  if (!runDamagedClusters_) {
591  theClusterParam.recommended2D_ = false;
592  }
593 
594  // Figure out what edge flags to set for truncated cluster
595  // Truncated clusters usually come from dead double columns
596  //
597  // If cluster is of even length, either both of or neither of beginning and ending
598  // edge are on a double column, so we cannot figure out the likely edge of
599  // truncation, let the 2D algorithm try extending on both sides (option 3)
600  if (theClusterParam.theCluster->sizeY() % 2 == 0)
601  theClusterParam.edgeTypeY_ = 3;
602  else {
603  //If the cluster is of odd length, only one of the edges can end on
604  //a double column, this is the likely edge of truncation
605  //Double columns always start on even indexes
606  int min_col = theClusterParam.theCluster->minPixelCol();
607  if (min_col % 2 == 0) {
608  //begining edge is at a double column (end edge cannot be,
609  //because odd length) so likely truncated at small y (option 1)
610  theClusterParam.edgeTypeY_ = 1;
611  } else {
612  //end edge is at a double column (beginning edge cannot be,
613  //because odd length) so likely truncated at large y (option 2)
614  theClusterParam.edgeTypeY_ = 2;
615  }
616  }
617  }
618 }

References PixelCPEBase::DetParam::bx, PixelCPEBase::DetParam::bz, SiPixelCluster::charge(), SiPixelTemplate::clsleny(), PixelCPEBase::ClusterParam::cotalpha, PixelCPEBase::ClusterParam::cotbeta, PixelCPEBase::ClusterParam::edgeTypeY_, GeomDet::geographicalId(), PixelCPEBase::ClusterParam::hasBadPixels_, mps_fire::i, SiPixelTemplate::interpolate(), maxSizeMismatchInY_, SiPixelTemplateReco::ClusMatrix::mcol, minChargeRatio_, SiPixelCluster::minPixelCol(), SiPixelTemplate::qavg(), recommend2D_, PixelCPEClusterRepair::ClusterParamTemplate::recommended2D_, runDamagedClusters_, SiPixelCluster::sizeY(), PixelCPEBase::ClusterParam::theCluster, PixelCPEBase::DetParam::theDet, thePixelTemp_, PixelCPEBase::ttopo_, and SiPixelTemplateReco::ClusMatrix::ydouble.

Referenced by localPosition().

◆ createClusterParam()

std::unique_ptr< PixelCPEBase::ClusterParam > PixelCPEClusterRepair::createClusterParam ( const SiPixelCluster cl) const
overrideprivatevirtual

Implements PixelCPEBase.

Definition at line 165 of file PixelCPEClusterRepair.cc.

165  {
166  return std::make_unique<ClusterParamTemplate>(cl);
167 }

References GetRecoTauVFromDQM_MC_cff::cl.

◆ fill2DTemplIDs()

void PixelCPEClusterRepair::fill2DTemplIDs ( )
private

Definition at line 121 of file PixelCPEClusterRepair.cc.

121  {
122  auto const& dus = geom_.detUnits();
123  unsigned m_detectors = dus.size();
124  for (unsigned int i = 1; i < 7; ++i) {
125  LogDebug("PixelCPEClusterRepair:: LookingForFirstStrip")
126  << "Subdetector " << i << " GeomDetEnumerator " << GeomDetEnumerators::tkDetEnum[i] << " offset "
127  << geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i]) << " is it strip? "
128  << (geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i]) != dus.size()
129  ? dus[geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i])]->type().isOuterTracker()
130  : false);
131  if (geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i]) != dus.size() &&
132  dus[geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i])]->type().isOuterTracker()) {
133  if (geom_.offsetDU(GeomDetEnumerators::tkDetEnum[i]) < m_detectors)
135  }
136  }
137  LogDebug("LookingForFirstStrip") << " Chosen offset: " << m_detectors;
138 
139  m_DetParams.resize(m_detectors);
140  LogDebug("PixelCPEClusterRepair::fillDetParams():") << "caching " << m_detectors << " pixel detectors" << endl;
141  //Loop through detectors and store 2D template ID
142  bool printed_info = false;
143  for (unsigned i = 0; i != m_detectors; ++i) {
144  auto& p = m_DetParams[i];
145 
146  p.detTemplateId2D = templateDBobject2D_->getTemplateID(p.theDet->geographicalId());
147  if (p.detTemplateId != p.detTemplateId2D && !printed_info) {
148  edm::LogWarning("PixelCPEClusterRepair")
149  << "different template ID between 1D and 2D " << p.detTemplateId << " " << p.detTemplateId2D << endl;
150  printed_info = true;
151  }
152  }
153 }

References TrackerGeometry::detUnits(), PixelCPEBase::geom_, SiPixel2DTemplateDBObject::getTemplateID(), mps_fire::i, LogDebug, PixelCPEBase::m_DetParams, TrackerGeometry::offsetDU(), AlCaHLTBitMon_ParallelJobs::p, templateDBobject2D_, and GeomDetEnumerators::tkDetEnum.

Referenced by PixelCPEClusterRepair().

◆ fillPSetDescription()

void PixelCPEClusterRepair::fillPSetDescription ( edm::ParameterSetDescription desc)
static

Definition at line 727 of file PixelCPEClusterRepair.cc.

727  {
728  desc.add<int>("barrelTemplateID", 0);
729  desc.add<int>("forwardTemplateID", 0);
730  desc.add<int>("directoryWithTemplates", 0);
731  desc.add<int>("speed", -2);
732  desc.add<bool>("UseClusterSplitter", false);
733  desc.add<double>("MaxSizeMismatchInY", 0.3);
734  desc.add<double>("MinChargeRatio", 0.8);
735  desc.add<std::vector<std::string>>("Recommend2D", {"PXB 2", "PXB 3", "PXB 4"});
736  desc.add<bool>("RunDamagedClusters", false);
737 }

References submitPVResolutionJobs::desc.

Referenced by PixelCPEClusterRepairESProducer::fillDescriptions().

◆ localError()

LocalError PixelCPEClusterRepair::localError ( DetParam const &  theDetParam,
ClusterParam theClusterParam 
) const
overrideprivatevirtual

Implements PixelCPEBase.

Definition at line 623 of file PixelCPEClusterRepair.cc.

623  {
624  ClusterParamTemplate& theClusterParam = static_cast<ClusterParamTemplate&>(theClusterParamBase);
625 
626  //--- Default is the maximum error used for edge clusters.
627  //--- (never used, in fact: let comment it out, shut up the complains of the static analyzer, and save a few CPU cycles)
628  float xerr = 0.0f, yerr = 0.0f;
629 
630  // Check if the errors were already set at the clusters splitting level
631  if (theClusterParam.theCluster->getSplitClusterErrorX() > 0.0f &&
632  theClusterParam.theCluster->getSplitClusterErrorX() < clusterSplitMaxError_ &&
633  theClusterParam.theCluster->getSplitClusterErrorY() > 0.0f &&
634  theClusterParam.theCluster->getSplitClusterErrorY() < clusterSplitMaxError_) {
635  xerr = theClusterParam.theCluster->getSplitClusterErrorX() * micronsToCm;
636  yerr = theClusterParam.theCluster->getSplitClusterErrorY() * micronsToCm;
637 
638  //cout << "Errors set at cluster splitting level : " << endl;
639  //cout << "xerr = " << xerr << endl;
640  //cout << "yerr = " << yerr << endl;
641  } else {
642  // If errors are not split at the cluster splitting level, set the errors here
643 
644  //--- Check status of both template calls.
645  if UNLIKELY ((theClusterParam.ierr != 0) || (theClusterParam.ierr2 != 0)) {
646  // If reconstruction fails the hit position is calculated from cluster center of gravity
647  // corrected in x by average Lorentz drift. Assign huge errors.
648  //
649  if UNLIKELY (!GeomDetEnumerators::isTrackerPixel(theDetParam.thePart))
651 
652  // Assign better errors based on the residuals for failed template cases
653  if (GeomDetEnumerators::isBarrel(theDetParam.thePart)) {
654  xerr = 55.0f * micronsToCm; // &&& get errors from elsewhere?
655  yerr = 36.0f * micronsToCm;
656  } else {
657  xerr = 42.0f * micronsToCm;
658  yerr = 39.0f * micronsToCm;
659  }
660  }
661  // Use special edge hit errors (derived from observed RMS's) for edge hits that we did not run the 2D reco on
662  //
663  else if (!theClusterParamBase.filled_from_2d && (theClusterParam.edgeTypeX_ || theClusterParam.edgeTypeY_)) {
664  // for edge pixels assign errors according to observed residual RMS
665  if (theClusterParam.edgeTypeX_ && !theClusterParam.edgeTypeY_) {
666  xerr = xEdgeXError_ * micronsToCm;
667  yerr = xEdgeYError_ * micronsToCm;
668  } else if (!theClusterParam.edgeTypeX_ && theClusterParam.edgeTypeY_) {
669  xerr = yEdgeXError_ * micronsToCm;
670  yerr = yEdgeYError_ * micronsToCm;
671  } else if (theClusterParam.edgeTypeX_ && theClusterParam.edgeTypeY_) {
672  xerr = bothEdgeXError_ * micronsToCm;
673  yerr = bothEdgeYError_ * micronsToCm;
674  }
675  } else {
676  xerr = theClusterParam.templSigmaX_ * micronsToCm;
677  yerr = theClusterParam.templSigmaY_ * micronsToCm;
678  // &&& should also check ierr (saved as class variable) and return
679  // &&& nonsense (another class static) if the template fit failed.
680  }
681  }
682 
683  if (theVerboseLevel > 9) {
684  LogDebug("PixelCPEClusterRepair") << " Sizex = " << theClusterParam.theCluster->sizeX()
685  << " Sizey = " << theClusterParam.theCluster->sizeY()
686  << " Edgex = " << theClusterParam.edgeTypeX_
687  << " Edgey = " << theClusterParam.edgeTypeY_ << " ErrX = " << xerr
688  << " ErrY = " << yerr;
689  }
690 
691  if (!(xerr > 0.0f))
692  throw cms::Exception("PixelCPEClusterRepair::localError")
693  << "\nERROR: Negative pixel error xerr = " << xerr << "\n\n";
694 
695  if (!(yerr > 0.0f))
696  throw cms::Exception("PixelCPEClusterRepair::localError")
697  << "\nERROR: Negative pixel error yerr = " << yerr << "\n\n";
698 
699  return LocalError(xerr * xerr, 0, yerr * yerr);
700 }

References PixelCPEBase::bothEdgeXError_, PixelCPEBase::bothEdgeYError_, PixelCPEBase::clusterSplitMaxError_, PixelCPEBase::ClusterParam::edgeTypeX_, PixelCPEBase::ClusterParam::edgeTypeY_, Exception, f, PixelCPEBase::ClusterParam::filled_from_2d, SiPixelCluster::getSplitClusterErrorX(), SiPixelCluster::getSplitClusterErrorY(), PixelCPEClusterRepair::ClusterParamTemplate::ierr, PixelCPEClusterRepair::ClusterParamTemplate::ierr2, GeomDetEnumerators::isBarrel(), GeomDetEnumerators::isTrackerPixel(), LogDebug, SiPixelCluster::sizeX(), SiPixelCluster::sizeY(), PixelCPEClusterRepair::ClusterParamTemplate::templSigmaX_, PixelCPEClusterRepair::ClusterParamTemplate::templSigmaY_, PixelCPEBase::ClusterParam::theCluster, PixelCPEBase::DetParam::thePart, PixelCPEBase::theVerboseLevel, UNLIKELY, PixelCPEBase::xEdgeXError_, PixelCPEBase::xEdgeYError_, PixelCPEBase::yEdgeXError_, and PixelCPEBase::yEdgeYError_.

◆ localPosition()

LocalPoint PixelCPEClusterRepair::localPosition ( DetParam const &  theDetParam,
ClusterParam theClusterParam 
) const
overrideprivatevirtual

Implements PixelCPEBase.

Definition at line 176 of file PixelCPEClusterRepair.cc.

176  {
177  ClusterParamTemplate& theClusterParam = static_cast<ClusterParamTemplate&>(theClusterParamBase);
178  bool filled_from_2d = false;
179 
180  if (!GeomDetEnumerators::isTrackerPixel(theDetParam.thePart))
181  throw cms::Exception("PixelCPEClusterRepair::localPosition :") << "A non-pixel detector type in here?";
182 
183  int ID1 = -9999;
184  int ID2 = -9999;
185  if (LoadTemplatesFromDB_) {
186  ID1 = theDetParam.detTemplateId;
187  ID2 = theDetParam.detTemplateId2D;
188  } else { // from asci file
189  if (!GeomDetEnumerators::isEndcap(theDetParam.thePart))
190  ID1 = ID2 = barrelTemplateID_; // barrel
191  else
192  ID1 = ID2 = forwardTemplateID_; // forward
193  }
194 
195  // &&& PM, note for later: PixelCPEBase calculates minInX,Y, and maxInX,Y
196  // Why can't we simply use that and save time with row_offset, col_offset
197  // and mrow = maxInX-minInX, mcol = maxInY-minInY ... Except that we
198  // also need to take into account cluster_matrix_size_x,y.
199 
200  //--- Preparing to retrieve ADC counts from the SiPixeltheClusterParam.theCluster
201  // The pixels from minPixelRow() will go into clust_array_2d[0][*],
202  // and the pixels from minPixelCol() will go into clust_array_2d[*][0].
203  int row_offset = theClusterParam.theCluster->minPixelRow();
204  int col_offset = theClusterParam.theCluster->minPixelCol();
205 
206  //--- Store the coordinates of the center of the (0,0) pixel of the array that
207  // gets passed to PixelTempReco2D. Will add these values to the output of TemplReco2D
208  float tmp_x = float(row_offset) + 0.5f;
209  float tmp_y = float(col_offset) + 0.5f;
210 
211  //--- Store these offsets (to be added later) in a LocalPoint after tranforming
212  // them from measurement units (pixel units) to local coordinates (cm)
213  LocalPoint lp;
214  if (theClusterParam.with_track_angle)
215  //--- Update call with trk angles needed for bow/kink corrections // Gavril
216  lp = theDetParam.theTopol->localPosition(MeasurementPoint(tmp_x, tmp_y), theClusterParam.loc_trk_pred);
217  else {
218  edm::LogError("PixelCPEClusterRepair") << "@SUB = PixelCPEClusterRepair::localPosition"
219  << "Should never be here. PixelCPEClusterRepair should always be called "
220  "with track angles. This is a bad error !!! ";
221  lp = theDetParam.theTopol->localPosition(MeasurementPoint(tmp_x, tmp_y));
222  }
223 
224  //--- Compute the size of the matrix which will be passed to TemplateReco.
225  // We'll later make clustMatrix[ mrow ][ mcol ]
226  int mrow = 0, mcol = 0;
227  for (int i = 0; i != theClusterParam.theCluster->size(); ++i) {
228  auto pix = theClusterParam.theCluster->pixel(i);
229  int irow = int(pix.x);
230  int icol = int(pix.y);
231  mrow = std::max(mrow, irow);
232  mcol = std::max(mcol, icol);
233  }
234  mrow -= row_offset;
235  mrow += 1;
236  mrow = std::min(mrow, cluster_matrix_size_x);
237  mcol -= col_offset;
238  mcol += 1;
239  mcol = std::min(mcol, cluster_matrix_size_y);
240  assert(mrow > 0);
241  assert(mcol > 0);
242 
243  //--- Make and fill the bool arrays flagging double pixels
244  bool xdouble[mrow], ydouble[mcol];
245  // x directions (shorter), rows
246  for (int irow = 0; irow < mrow; ++irow)
247  xdouble[irow] = theDetParam.theRecTopol->isItBigPixelInX(irow + row_offset);
248  //
249  // y directions (longer), columns
250  for (int icol = 0; icol < mcol; ++icol)
251  ydouble[icol] = theDetParam.theRecTopol->isItBigPixelInY(icol + col_offset);
252 
253  //--- C-style matrix. We'll need it in either case.
254  float clustMatrix[mrow][mcol];
255  float clustMatrix2[mrow][mcol];
256 
257  //--- Prepare struct that passes pointers to TemplateReco. It doesn't own anything.
258  SiPixelTemplateReco::ClusMatrix clusterPayload{&clustMatrix[0][0], xdouble, ydouble, mrow, mcol};
259  SiPixelTemplateReco2D::ClusMatrix clusterPayload2d{&clustMatrix2[0][0], xdouble, ydouble, mrow, mcol};
260 
261  //--- Copy clust's pixels (calibrated in electrons) into clustMatrix;
262  memset(clustMatrix, 0, sizeof(float) * mrow * mcol); // Wipe it clean.
263  for (int i = 0; i != theClusterParam.theCluster->size(); ++i) {
264  auto pix = theClusterParam.theCluster->pixel(i);
265  int irow = int(pix.x) - row_offset;
266  int icol = int(pix.y) - col_offset;
267  // &&& Do we ever get pixels that are out of bounds ??? Need to check.
268  if ((irow < mrow) & (icol < mcol))
269  clustMatrix[irow][icol] = float(pix.adc);
270  }
271  // &&& Save for later: fillClustMatrix( float * clustMatrix );
272 
273  //--- Save a copy of clustMatrix into clustMatrix2
274  memcpy(clustMatrix2, clustMatrix, sizeof(float) * mrow * mcol);
275 
276  //--- Set both return statuses, since we may call only one.
277  theClusterParam.ierr = 0;
278  theClusterParam.ierr2 = 0;
279 
280  //--- Should we run the 2D reco?
281  checkRecommend2D(theDetParam, theClusterParam, clusterPayload, ID1);
282  if (theClusterParam.recommended2D_) {
283  //--- Call the Template Reco 2d with cluster repair
284  filled_from_2d = true;
285  callTempReco2D(theDetParam, theClusterParam, clusterPayload2d, ID2, lp);
286  } else {
287  //--- Call the vanilla Template Reco
288  callTempReco1D(theDetParam, theClusterParam, clusterPayload, ID1, lp);
289  filled_from_2d = false;
290  }
291 
292  //--- Make sure cluster repair returns all info about the hit back up to caller
293  //--- Necessary because it copied the base class so it does not modify it
294  theClusterParamBase.isOnEdge_ = theClusterParam.isOnEdge_;
295  theClusterParamBase.hasBadPixels_ = theClusterParam.hasBadPixels_;
296  theClusterParamBase.spansTwoROCs_ = theClusterParam.spansTwoROCs_;
297  theClusterParamBase.hasFilledProb_ = theClusterParam.hasFilledProb_;
298  theClusterParamBase.qBin_ = theClusterParam.qBin_;
299  theClusterParamBase.probabilityQ_ = theClusterParam.probabilityQ_;
300  theClusterParamBase.filled_from_2d = filled_from_2d;
301  if (filled_from_2d) {
302  theClusterParamBase.probabilityX_ = theClusterParam.templProbXY_;
303  theClusterParamBase.probabilityY_ = 0.;
304  } else {
305  theClusterParamBase.probabilityX_ = theClusterParam.probabilityX_;
306  theClusterParamBase.probabilityY_ = theClusterParam.probabilityY_;
307  }
308 
309  return LocalPoint(theClusterParam.templXrec_, theClusterParam.templYrec_);
310 }

References cms::cuda::assert(), barrelTemplateID_, callTempReco1D(), callTempReco2D(), checkRecommend2D(), PixelCPEBase::DetParam::detTemplateId, PixelCPEBase::DetParam::detTemplateId2D, Exception, PixelCPEBase::ClusterParam::filled_from_2d, dqmMemoryStats::float, forwardTemplateID_, PixelCPEBase::ClusterParam::hasBadPixels_, PixelCPEBase::ClusterParam::hasFilledProb_, mps_fire::i, PixelCPEClusterRepair::ClusterParamTemplate::ierr, PixelCPEClusterRepair::ClusterParamTemplate::ierr2, createfilelist::int, GeomDetEnumerators::isEndcap(), RectangularPixelTopology::isItBigPixelInX(), RectangularPixelTopology::isItBigPixelInY(), PixelCPEBase::ClusterParam::isOnEdge_, GeomDetEnumerators::isTrackerPixel(), PixelCPEBase::LoadTemplatesFromDB_, PixelCPEBase::ClusterParam::loc_trk_pred, Topology::localPosition(), SiStripPI::max, min(), SiPixelCluster::minPixelCol(), SiPixelCluster::minPixelRow(), SiPixelCluster::pixel(), PixelCPEBase::ClusterParam::probabilityQ_, PixelCPEBase::ClusterParam::probabilityX_, PixelCPEBase::ClusterParam::probabilityY_, PixelCPEBase::ClusterParam::qBin_, PixelCPEClusterRepair::ClusterParamTemplate::recommended2D_, SiPixelCluster::size(), PixelCPEBase::ClusterParam::spansTwoROCs_, PixelCPEClusterRepair::ClusterParamTemplate::templProbXY_, PixelCPEClusterRepair::ClusterParamTemplate::templXrec_, PixelCPEClusterRepair::ClusterParamTemplate::templYrec_, PixelCPEBase::ClusterParam::theCluster, PixelCPEBase::DetParam::thePart, PixelCPEBase::DetParam::theRecTopol, PixelCPEBase::DetParam::theTopol, and PixelCPEBase::ClusterParam::with_track_angle.

Member Data Documentation

◆ barrelTemplateID_

int PixelCPEClusterRepair::barrelTemplateID_
private

Definition at line 108 of file PixelCPEClusterRepair.h.

Referenced by localPosition(), and PixelCPEClusterRepair().

◆ forwardTemplateID_

int PixelCPEClusterRepair::forwardTemplateID_
private

Definition at line 109 of file PixelCPEClusterRepair.h.

Referenced by localPosition(), and PixelCPEClusterRepair().

◆ maxSizeMismatchInY_

float PixelCPEClusterRepair::maxSizeMismatchInY_
private

Definition at line 116 of file PixelCPEClusterRepair.h.

Referenced by checkRecommend2D(), and PixelCPEClusterRepair().

◆ minChargeRatio_

float PixelCPEClusterRepair::minChargeRatio_
private

Definition at line 115 of file PixelCPEClusterRepair.h.

Referenced by checkRecommend2D(), and PixelCPEClusterRepair().

◆ recommend2D_

std::vector<Rule> PixelCPEClusterRepair::recommend2D_
private

Definition at line 143 of file PixelCPEClusterRepair.h.

Referenced by checkRecommend2D(), and PixelCPEClusterRepair().

◆ runDamagedClusters_

bool PixelCPEClusterRepair::runDamagedClusters_
private

Definition at line 146 of file PixelCPEClusterRepair.h.

Referenced by checkRecommend2D(), and PixelCPEClusterRepair().

◆ speed_

int PixelCPEClusterRepair::speed_
private

Definition at line 103 of file PixelCPEClusterRepair.h.

Referenced by callTempReco1D(), and PixelCPEClusterRepair().

◆ templateDBobject2D_

const SiPixel2DTemplateDBObject* PixelCPEClusterRepair::templateDBobject2D_
private

Definition at line 112 of file PixelCPEClusterRepair.h.

Referenced by fill2DTemplIDs(), and PixelCPEClusterRepair().

◆ templateDir_

std::string PixelCPEClusterRepair::templateDir_
private

Definition at line 110 of file PixelCPEClusterRepair.h.

Referenced by PixelCPEClusterRepair().

◆ thePixelTemp2D_

std::vector<SiPixelTemplateStore2D> PixelCPEClusterRepair::thePixelTemp2D_
private

◆ thePixelTemp_

std::vector<SiPixelTemplateStore> PixelCPEClusterRepair::thePixelTemp_
private

◆ UseClusterSplitter_

bool PixelCPEClusterRepair::UseClusterSplitter_
private

Definition at line 105 of file PixelCPEClusterRepair.h.

Referenced by PixelCPEClusterRepair().

PixelCPEClusterRepair::barrelTemplateID_
int barrelTemplateID_
Definition: PixelCPEClusterRepair.h:108
PixelCPEBase::bothEdgeYError_
static constexpr float bothEdgeYError_
Definition: PixelCPEBase.h:263
PixelCPEBase::templateDBobject_
const SiPixelTemplateDBObject * templateDBobject_
Definition: PixelCPEBase.h:248
mps_fire.i
i
Definition: mps_fire.py:428
PixelCPEClusterRepair::forwardTemplateID_
int forwardTemplateID_
Definition: PixelCPEClusterRepair.h:109
SiPixelTemplate::pushfile
static bool pushfile(int filenum, std::vector< SiPixelTemplateStore > &pixelTemp, std::string dir="CalibTracker/SiPixelESProducers/data/")
Definition: SiPixelTemplate.cc:129
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
min
T min(T a, T b)
Definition: MathUtil.h:58
SiPixelTemplate
Definition: SiPixelTemplate.h:255
PixelCPEClusterRepair::templateDBobject2D_
const SiPixel2DTemplateDBObject * templateDBobject2D_
Definition: PixelCPEClusterRepair.h:112
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PixelCPEBase::ttopo_
const TrackerTopology & ttopo_
Definition: PixelCPEBase.h:240
PixelCPEClusterRepair::maxSizeMismatchInY_
float maxSizeMismatchInY_
Definition: PixelCPEClusterRepair.h:116
muonClassificationByHits_cfi.pixel
pixel
Definition: muonClassificationByHits_cfi.py:9
cms::cuda::assert
assert(be >=bs)
SiPixelTemplateReco::PixelTempReco1D
int PixelTempReco1D(int id, float cotalpha, float cotbeta, float locBz, float locBx, ClusMatrix &cluster, 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, int &nypix, int &nxpix)
Definition: SiPixelTemplateReco.cc:134
PixelCPEClusterRepair::callTempReco1D
void callTempReco1D(DetParam const &theDetParam, ClusterParamTemplate &theClusterParam, SiPixelTemplateReco::ClusMatrix &clusterPayload, int ID, LocalPoint &lp) const
Definition: PixelCPEClusterRepair.cc:315
PixelCPEBase::geom_
const TrackerGeometry & geom_
Definition: PixelCPEBase.h:239
PixelCPEClusterRepair::localPosition
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEClusterRepair.cc:176
PixelCPEClusterRepair::callTempReco2D
void callTempReco2D(DetParam const &theDetParam, ClusterParamTemplate &theClusterParam, SiPixelTemplateReco2D::ClusMatrix &clusterPayload, int ID, LocalPoint &lp) const
Definition: PixelCPEClusterRepair.cc:414
PixelCPEClusterRepair::fill2DTemplIDs
void fill2DTemplIDs()
Definition: PixelCPEClusterRepair.cc:121
DDAxes::x
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
SiPixelTemplateReco2D::ClusMatrix::mrow
int mrow
Definition: SiPixelTemplateReco2D.h:44
PixelCPEBase::bothEdgeXError_
static constexpr float bothEdgeXError_
Definition: PixelCPEBase.h:262
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
PixelCPEClusterRepair
Definition: PixelCPEClusterRepair.h:34
SiPixelTemplate2D
Definition: SiPixelTemplate2D.h:132
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
DetId
Definition: DetId.h:17
PixelCPEClusterRepair::thePixelTemp_
std::vector< SiPixelTemplateStore > thePixelTemp_
Definition: PixelCPEClusterRepair.h:100
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
SiPixelTemplateReco2D::ClusMatrix
Definition: SiPixelTemplateReco2D.h:38
TrackerGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: TrackerGeometry.h:61
PixelCPEBase::m_DetParams
DetParams m_DetParams
Definition: PixelCPEBase.h:291
GeomDetEnumerators::tkDetEnum
constexpr SubDetector tkDetEnum[8]
Definition: GeomDetEnumerators.h:37
str
#define str(s)
Definition: TestProcessor.cc:51
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
PixelCPEClusterRepair::speed_
int speed_
Definition: PixelCPEClusterRepair.h:103
PixelCPEBase::xEdgeXError_
static constexpr float xEdgeXError_
Definition: PixelCPEBase.h:256
Point3DBase< float, LocalTag >
PixelCPEClusterRepair::checkRecommend2D
void checkRecommend2D(DetParam const &theDetParam, ClusterParamTemplate &theClusterParam, SiPixelTemplateReco::ClusMatrix &clusterPayload, int ID) const
Definition: PixelCPEClusterRepair.cc:531
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
MeasurementPoint
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Definition: MeasurementPoint.h:12
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
align::ID
uint32_t ID
Definition: Definitions.h:24
SiPixel2DTemplateDBObject::getTemplateID
short getTemplateID(const uint32_t &detid) const
Definition: SiPixel2DTemplateDBObject.h:90
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
LocalError
Definition: LocalError.h:12
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
Exception
recoMuon::in
Definition: RecoMuonEnumerators.h:6
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
createfilelist.int
int
Definition: createfilelist.py:10
GeomDetEnumerators::isTrackerPixel
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:68
PixelCPEBase::theVerboseLevel
int theVerboseLevel
Definition: PixelCPEBase.h:235
PixelCPEBase::PixelCPEBase
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:30
PixelCPEClusterRepair::UseClusterSplitter_
bool UseClusterSplitter_
Definition: PixelCPEClusterRepair.h:105
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
PixelCPEBase::LoadTemplatesFromDB_
bool LoadTemplatesFromDB_
Definition: PixelCPEBase.h:252
GeomDetEnumerators
Definition: GeomDetEnumerators.h:8
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
SiPixelTemplateReco::ClusMatrix::mcol
int mcol
Definition: SiPixelTemplateReco.h:79
PixelCPEClusterRepair::minChargeRatio_
float minChargeRatio_
Definition: PixelCPEClusterRepair.h:115
SiPixelTemplateReco::ClusMatrix::ydouble
bool const * ydouble
Definition: SiPixelTemplateReco.h:78
Exception
Definition: hltDiff.cc:246
PixelCPEBase::yEdgeYError_
static constexpr float yEdgeYError_
Definition: PixelCPEBase.h:260
SiPixelTemplateReco::ClusMatrix
Definition: SiPixelTemplateReco.h:73
PixelCPEBase::clusterSplitMaxError_
static constexpr float clusterSplitMaxError_
Definition: PixelCPEBase.h:265
ALCARECOPromptCalibProdSiPixelAli0T_cff.throw
throw
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:9
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
cms::Exception
Definition: Exception.h:70
SiPixelTemplateReco2D::PixelTempReco2D
int PixelTempReco2D(int id, float cotalpha, float cotbeta, float locBz, float locBx, int edgeflagy, int edgeflagx, ClusMatrix &cluster, SiPixelTemplate2D &templ, float &yrec, float &sigmay, float &xrec, float &sigmax, float &probxy, float &probQ, int &qbin, float &deltay, int &npixel)
Definition: SiPixelTemplateReco2D.cc:83
TrackerGeometry::offsetDU
unsigned int offsetDU(SubDetector sid) const
Definition: TrackerGeometry.h:72
PixelCPEBase::xEdgeYError_
static constexpr float xEdgeYError_
Definition: PixelCPEBase.h:257
GeomDetEnumerators::isEndcap
bool isEndcap(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:62
A
SiPixelTemplate2D::pushfile
static bool pushfile(int filenum, std::vector< SiPixelTemplateStore2D > &pixelTemp, std::string dir="CalibTracker/SiPixelESProducers/data/")
Definition: SiPixelTemplate2D.cc:61
PixelCPEClusterRepair::thePixelTemp2D_
std::vector< SiPixelTemplateStore2D > thePixelTemp2D_
Definition: PixelCPEClusterRepair.h:101
PixelCPEClusterRepair::runDamagedClusters_
bool runDamagedClusters_
Definition: PixelCPEClusterRepair.h:146
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
PixelCPEClusterRepair::recommend2D_
std::vector< Rule > recommend2D_
Definition: PixelCPEClusterRepair.h:143
PixelCPEBase::yEdgeXError_
static constexpr float yEdgeXError_
Definition: PixelCPEBase.h:259
PixelCPEClusterRepair::templateDir_
std::string templateDir_
Definition: PixelCPEClusterRepair.h:110