CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Attributes
PixelCPEBase Class Referenceabstract

#include <PixelCPEBase.h>

Inheritance diagram for PixelCPEBase:
ClusterParameterEstimator< T > PixelCPEGeneric PixelCPETemplateReco

Classes

struct  Param
 

Public Member Functions

unsigned int clusterProbComputationFlag () const
 
bool hasBadPixels () const
 
bool hasFilledProb () const
 
bool isOnEdge () const
 
virtual LocalError localError (const SiPixelCluster &cl, const GeomDetUnit &det) const =0
 
LocalValues localParameters (const SiPixelCluster &cl, const GeomDetUnit &det) const
 
LocalValues localParameters (const SiPixelCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const
 
LocalValues localParameters (const SiPixelCluster &cl, const GeomDetUnit &det, float alpha, float beta) const
 
virtual LocalPoint localPosition (const SiPixelCluster &cl, const GeomDetUnit &det) const
 
 PixelCPEBase (edm::ParameterSet const &conf, const MagneticField *mag=0, const SiPixelLorentzAngle *lorentzAngle=0, const SiPixelCPEGenericErrorParm *genErrorParm=0, const SiPixelTemplateDBObject *templateDBobject=0)
 
float probabilityQ () const
 
float probabilityX () const
 
float probabilityXY () const
 
float probabilityY () const
 
float qBin () const
 
SiPixelRecHitQuality::QualWordType rawQualityWord () const
 
void setMagField (const MagneticField *mag) const
 
bool spansTwoRocks () const
 
- Public Member Functions inherited from ClusterParameterEstimator< T >
virtual void clearParameters () const
 
virtual void enterLocalParameters (unsigned int id, std::pair< int, int > &row_col, LocalValues pos_err_info) const
 
virtual void enterLocalParameters (uint32_t id, uint16_t firstStrip, LocalValues pos_err_info) const
 
virtual LocalValues localParameters (const T &, const GeomDetUnit &) const =0
 
virtual LocalValues localParameters (const T &cluster, const GeomDetUnit &gd, const LocalTrajectoryParameters &) const
 
virtual LocalValues localParameters (const T &cluster, const GeomDetUnit &gd, const TrajectoryStateOnSurface &tsos) const
 
virtual VLocalValues localParametersV (const T &cluster, const GeomDetUnit &gd) const
 
virtual VLocalValues localParametersV (const T &cluster, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
 
virtual VLocalValues localParametersV (const T &cluster, const GeomDetUnit &gd, const TrajectoryStateOnSurface &tsos) const
 
virtual ~ClusterParameterEstimator ()
 

Protected Types

typedef GloballyPositioned
< double > 
Frame
 

Protected Member Functions

void computeAnglesFromDetPosition (const SiPixelCluster &cl, const GeomDetUnit &det) const
 
void computeAnglesFromTrajectory (const SiPixelCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const
 
void computeLorentzShifts () const
 
LocalVector driftDirection (GlobalVector bfield) const
 
LocalVector driftDirectionCorrect (GlobalVector bfield) const
 
bool isFlipped () const
 
virtual float lorentzShiftX () const
 
virtual float lorentzShiftY () const
 
MeasurementError measurementError (const SiPixelCluster &, const GeomDetUnit &det) const
 
MeasurementPoint measurementPosition (const SiPixelCluster &, const GeomDetUnit &det) const
 
void setTheDet (const GeomDetUnit &det, const SiPixelCluster &cluster) const
 
void xCharge (const std::vector< SiPixelCluster::Pixel > &, const int &, const int &, float &q1, float &q2) const
 
virtual float xpos (const SiPixelCluster &) const =0
 
void yCharge (const std::vector< SiPixelCluster::Pixel > &, const int &, const int &, float &q1, float &q2) const
 
virtual float ypos (const SiPixelCluster &) const =0
 

Protected Attributes

bool alpha2Order
 
float alpha_
 
float beta_
 
unsigned int clusterProbComputationFlag_
 
float cotalpha_
 
float cotbeta_
 
LocalVector driftDirection_
 
const SiPixelCPEGenericErrorParmgenErrorParm_
 
bool hasBadPixels_
 
bool hasFilledProb_
 
bool isOnEdge_
 
LocalTrajectoryParameters loc_traj_param_
 
Topology::LocalTrackPred loc_trk_pred_
 
const SiPixelLorentzAnglelorentzAngle_
 
double lorentzShiftInCmX_
 
double lorentzShiftInCmY_
 
double lorentzShiftX_
 
double lorentzShiftY_
 
const MagneticFieldmagfield_
 
int nRecHitsTotal_
 
int nRecHitsUsedEdge_
 
float probabilityQ_
 
float probabilityX_
 
float probabilityY_
 
float qBin_
 
bool spansTwoROCs_
 
const SiPixelTemplateDBObjecttemplateDBobject_
 
const PixelGeomDetUnittheDet
 
float theDetR
 
float theDetZ
 
float theLShiftX
 
float theLShiftY
 
float theNumOfCol
 
float theNumOfRow
 
GeomDetType::SubDetector thePart
 
float thePitchX
 
float thePitchY
 
float theSign
 
float theThickness
 
const PixelTopologytheTopol
 
int theVerboseLevel
 
float trk_lp_x
 
float trk_lp_y
 
bool with_track_angle
 

Private Types

typedef __gnu_cxx::hash_map
< unsigned int, Param
Params
 

Private Attributes

Params m_Params
 

Additional Inherited Members

- Public Types inherited from ClusterParameterEstimator< T >
typedef std::pair< LocalPoint,
LocalError
LocalValues
 
typedef std::vector< LocalValuesVLocalValues
 

Detailed Description

Definition at line 53 of file PixelCPEBase.h.

Member Typedef Documentation

typedef GloballyPositioned<double> PixelCPEBase::Frame
protected

Definition at line 175 of file PixelCPEBase.h.

typedef __gnu_cxx::hash_map< unsigned int, Param> PixelCPEBase::Params
private

Definition at line 353 of file PixelCPEBase.h.

Constructor & Destructor Documentation

PixelCPEBase::PixelCPEBase ( edm::ParameterSet const &  conf,
const MagneticField mag = 0,
const SiPixelLorentzAngle lorentzAngle = 0,
const SiPixelCPEGenericErrorParm genErrorParm = 0,
const SiPixelTemplateDBObject templateDBobject = 0 
)

Definition at line 44 of file PixelCPEBase.cc.

References alpha2Order, clusterProbComputationFlag_, genErrorParm_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), lorentzAngle_, mag(), magfield_, templateDBobject_, and theVerboseLevel.

47  probabilityX_(0.0), probabilityY_(0.0),
48  probabilityQ_(0.0), qBin_(0),
49  isOnEdge_(0), hasBadPixels_(0),
50  spansTwoROCs_(0),
52  loc_trk_pred_(0.0, 0.0, 0.0, 0.0)
53 {
54  //--- Lorentz angle tangent per Tesla
55  // theTanLorentzAnglePerTesla =
56 
57  // conf.getParameter<double>("TanLorentzAnglePerTesla");
58  lorentzAngle_ = lorentzAngle;
59  /* if(!lorentzAngle_)
60  theTanLorentzAnglePerTesla =
61  conf.getParameter<double>("TanLorentzAnglePerTesla");
62  */
63 
64  //--- Algorithm's verbosity
66  conf.getUntrackedParameter<int>("VerboseLevel",0);
67 
68  //-- Magnetic Field
69  magfield_ = mag;
70 
71  //-- Error Parametriaztion from DB for CPE Generic
72  genErrorParm_ = genErrorParm;
73 
74  //-- Template Calibration Object from DB
75  templateDBobject_ = templateDBobject;
76 
77  //-- Switch on/off E.B
78  alpha2Order = conf.getParameter<bool>("Alpha2Order");
79 
80  //--- A flag that could be used to change the behavior of
81  //--- clusterProbability() in TSiPixelRecHit (the *transient* one).
82  //--- The problem is that the transient hits are made after the CPE runs
83  //--- and they don't get the access to the PSet, so we pass it via the
84  //--- CPE itself...
85  //
87  = (unsigned int) conf.getParameter<int>("ClusterProbComputationFlag");
88 
89 }
Topology::LocalTrackPred loc_trk_pred_
Definition: PixelCPEBase.h:270
unsigned int clusterProbComputationFlag_
Definition: PixelCPEBase.h:238
float probabilityQ_
Definition: PixelCPEBase.h:225
bool spansTwoROCs_
Definition: PixelCPEBase.h:229
float probabilityY_
Definition: PixelCPEBase.h:224
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
bool hasBadPixels_
Definition: PixelCPEBase.h:228
bool hasFilledProb_
Definition: PixelCPEBase.h:230
const SiPixelTemplateDBObject * templateDBobject_
Definition: PixelCPEBase.h:263
const MagneticField * magfield_
Definition: PixelCPEBase.h:257
tuple conf
Definition: dbtoconf.py:185
const SiPixelLorentzAngle * lorentzAngle_
Definition: PixelCPEBase.h:259
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
float probabilityX_
Definition: PixelCPEBase.h:223
const SiPixelCPEGenericErrorParm * genErrorParm_
Definition: PixelCPEBase.h:261
int nRecHitsUsedEdge_
Definition: PixelCPEBase.h:217

Member Function Documentation

unsigned int PixelCPEBase::clusterProbComputationFlag ( ) const
inline

Definition at line 156 of file PixelCPEBase.h.

References clusterProbComputationFlag_.

Referenced by TSiPixelRecHit::TSiPixelRecHit().

157  {
159  }
unsigned int clusterProbComputationFlag_
Definition: PixelCPEBase.h:238
void PixelCPEBase::computeAnglesFromDetPosition ( const SiPixelCluster cl,
const GeomDetUnit det 
) const
protected

Definition at line 223 of file PixelCPEBase.cc.

References alpha_, beta_, cotalpha_, cotbeta_, edm::hlt::Exception, Topology::localPosition(), mathSSE::sqrt(), GeomDet::surface(), theDet, theTopol, Surface::toGlobal(), with_track_angle, PV3DBase< T, PVType, FrameType >::x(), SiPixelCluster::x(), PV3DBase< T, PVType, FrameType >::y(), SiPixelCluster::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by localParameters().

225 {
226  //--- This is a new det unit, so cache it
227  theDet = dynamic_cast<const PixelGeomDetUnit*>( &det );
228  if ( ! theDet )
229  {
230  throw cms::Exception("PixelCPEBase::computeAngleFromDetPosition")
231  << " Wrong pointer to pixel detector !!!" << endl;
232 
233  }
234 
235  // get cluster center of gravity (of charge)
236  float xcenter = cl.x();
237  float ycenter = cl.y();
238 
239  // get the cluster position in local coordinates (cm)
240 
241  // ggiurgiu@jhu.edu 12/09/2010 : This function is called without track info, therefore there are no track
242  // angles to provide here. Call the default localPosition (without track info)
243  LocalPoint lp = theTopol->localPosition( MeasurementPoint(xcenter, ycenter) );
244 
245  // get the cluster position in global coordinates (cm)
246  GlobalPoint gp = theDet->surface().toGlobal( lp );
247  float gp_mod = sqrt( gp.x()*gp.x() + gp.y()*gp.y() + gp.z()*gp.z() );
248 
249  // normalize
250  float gpx = gp.x()/gp_mod;
251  float gpy = gp.y()/gp_mod;
252  float gpz = gp.z()/gp_mod;
253 
254  // make a global vector out of the global point; this vector will point from the
255  // origin of the detector to the cluster
256  GlobalVector gv(gpx, gpy, gpz);
257 
258  // make local unit vector along local X axis
259  const Local3DVector lvx(1.0, 0.0, 0.0);
260 
261  // get the unit X vector in global coordinates/
262  GlobalVector gvx = theDet->surface().toGlobal( lvx );
263 
264  // make local unit vector along local Y axis
265  const Local3DVector lvy(0.0, 1.0, 0.0);
266 
267  // get the unit Y vector in global coordinates
268  GlobalVector gvy = theDet->surface().toGlobal( lvy );
269 
270  // make local unit vector along local Z axis
271  const Local3DVector lvz(0.0, 0.0, 1.0);
272 
273  // get the unit Z vector in global coordinates
274  GlobalVector gvz = theDet->surface().toGlobal( lvz );
275 
276  // calculate the components of gv (the unit vector pointing to the cluster)
277  // in the local coordinate system given by the basis {gvx, gvy, gvz}
278  // note that both gv and the basis {gvx, gvy, gvz} are given in global coordinates
279  float gv_dot_gvx = gv.x()*gvx.x() + gv.y()*gvx.y() + gv.z()*gvx.z();
280  float gv_dot_gvy = gv.x()*gvy.x() + gv.y()*gvy.y() + gv.z()*gvy.z();
281  float gv_dot_gvz = gv.x()*gvz.x() + gv.y()*gvz.y() + gv.z()*gvz.z();
282 
283  // calculate angles
284  alpha_ = atan2( gv_dot_gvz, gv_dot_gvx );
285  beta_ = atan2( gv_dot_gvz, gv_dot_gvy );
286 
287  cotalpha_ = gv_dot_gvx / gv_dot_gvz;
288  cotbeta_ = gv_dot_gvy / gv_dot_gvz;
289 
290  with_track_angle = false;
291 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
bool with_track_angle
Definition: PixelCPEBase.h:220
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
T y() const
Definition: PV3DBase.h:57
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
const PixelTopology * theTopol
Definition: PixelCPEBase.h:185
float y() const
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
T x() const
Definition: PV3DBase.h:56
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
float x() const
void PixelCPEBase::computeAnglesFromTrajectory ( const SiPixelCluster cl,
const GeomDetUnit det,
const LocalTrajectoryParameters ltp 
) const
protected

Definition at line 298 of file PixelCPEBase.cc.

References alpha_, beta_, cotalpha_, cotbeta_, loc_traj_param_, loc_trk_pred_, PV3DBase< T, PVType, FrameType >::mag(), LocalTrajectoryParameters::mixedFormatVector(), LocalTrajectoryParameters::momentum(), LocalTrajectoryParameters::position(), trk_lp_x, trk_lp_y, with_track_angle, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by localParameters().

301 {
302  loc_traj_param_ = ltp;
303 
304  LocalVector localDir = ltp.momentum()/ltp.momentum().mag();
305 
306  // &&& Or, maybe we need to move to the local frame ???
307  // LocalVector localDir( theDet->toLocal(theState.globalDirection()));
308  //thePart = theDet->type().part();
309 
310  float locx = localDir.x();
311  float locy = localDir.y();
312  float locz = localDir.z();
313 
314  /*
315  // Danek's definition
316  alpha_ = acos(locx/sqrt(locx*locx+locz*locz));
317  if ( isFlipped() ) // &&& check for FPIX !!!
318  alpha_ = PI - alpha_ ;
319  beta_ = acos(locy/sqrt(locy*locy+locz*locz));
320  */
321 
322  // &&& In the above, why not use atan2() ?
323  // ggiurgiu@fnal.gov, 01/24/09 : Use it now.
324  alpha_ = atan2( locz, locx );
325  beta_ = atan2( locz, locy );
326 
327  cotalpha_ = locx/locz;
328  cotbeta_ = locy/locz;
329 
330  LocalPoint trk_lp = ltp.position();
331  trk_lp_x = trk_lp.x();
332  trk_lp_y = trk_lp.y();
333 
334  with_track_angle = true;
335 
336 
337  // ggiurgiu@jhu.edu 12/09/2010 : needed to correct for bows/kinks
338  AlgebraicVector5 vec_trk_parameters = ltp.mixedFormatVector();
339  //loc_trk_pred = &Topology::LocalTrackPred( vec_trk_parameters );
340  loc_trk_pred_ = Topology::LocalTrackPred( vec_trk_parameters );
341 
342 }
Topology::LocalTrackPred loc_trk_pred_
Definition: PixelCPEBase.h:270
bool with_track_angle
Definition: PixelCPEBase.h:220
LocalPoint position() const
Local x and y position coordinates.
T y() const
Definition: PV3DBase.h:57
T mag() const
Definition: PV3DBase.h:61
T z() const
Definition: PV3DBase.h:58
LocalVector momentum() const
Momentum vector in the local frame.
ROOT::Math::SVector< double, 5 > AlgebraicVector5
LocalTrajectoryParameters loc_traj_param_
Definition: PixelCPEBase.h:272
AlgebraicVector5 mixedFormatVector() const
T x() const
Definition: PV3DBase.h:56
void PixelCPEBase::computeLorentzShifts ( ) const
protected

Definition at line 609 of file PixelCPEBase.cc.

References alpha2Order, driftDirection_, edm::hlt::Exception, GeomDet::geographicalId(), SiPixelLorentzAngle::getLorentzAngle(), MagneticField::inTesla(), LogDebug, lorentzAngle_, lorentzShiftInCmX_, lorentzShiftInCmY_, lorentzShiftX_, lorentzShiftY_, magfield_, GloballyPositioned< T >::position(), DetId::rawId(), GloballyPositioned< T >::rotation(), GeomDet::surface(), theDet, thePitchX, thePitchY, theThickness, theVerboseLevel, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by PixelCPEGeneric::localPosition().

610 {
611  Frame detFrame(theDet->surface().position(), theDet->surface().rotation());
612  GlobalVector global_Bfield = magfield_->inTesla( theDet->surface().position() );
613  LocalVector Bfield = detFrame.toLocal(global_Bfield);
614  if(lorentzAngle_ == 0){
615  throw cms::Exception("invalidPointer") << "[PixelCPEBase::computeLorentzShifts] zero pointer to lorentz angle record ";
616  }
618  double alpha2;
619  if ( alpha2Order) {
620  alpha2 = langle * langle;
621  }
622  else {
623  alpha2 = 0.0;
624  }
625 
626  // **********************************************************************
627  // Our convention is the following:
628  // +x is defined by the direction of the Lorentz drift!
629  // +z is defined by the direction of E field (so electrons always go into -z!)
630  // +y is defined by +x and +z, and it turns out to be always opposite to the +B field.
631  // **********************************************************************
632 
633  // Note correct signs for dir_x and dir_y!
634  double dir_x = -( langle * Bfield.y() + alpha2* Bfield.z()* Bfield.x() );
635  double dir_y = ( langle * Bfield.x() - alpha2* Bfield.z()* Bfield.y() );
636  double dir_z = -( 1 + alpha2* Bfield.z()* Bfield.z() );
637 
638  // &&& Why do we need to scale???
639  //double scale = (1 + alpha2* Bfield.z()*Bfield.z() );
640  double scale = fabs( dir_z ); // same as 1 + alpha2*Bfield.z()*Bfield.z()
641  driftDirection_ = LocalVector(dir_x/scale, dir_y/scale, dir_z/scale ); // last is -1 !
642 
643  // Max shift (at the other side of the sensor) in cm
645  // Express the shift in units of pitch,
647 
648  // Max shift (at the other side of the sensor) in cm
650  // Express the shift in units of pitch,
652 
653 
654  if ( theVerboseLevel > 9 ) {
655  LogDebug("PixelCPEBase") << " The drift direction in local coordinate is "
656  << driftDirection_ ;
657 
658 // cout << "Lorentz Drift (in cm) along X = " << lorentzShiftInCmX_ << endl;
659 // cout << "Lorentz Drift (in cm) along Y = " << lorentzShiftInCmY_ << endl;
660  }
661 }
#define LogDebug(id)
double lorentzShiftX_
Definition: PixelCPEBase.h:247
Local3DVector LocalVector
Definition: LocalVector.h:12
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
float theThickness
Definition: PixelCPEBase.h:190
T y() const
Definition: PV3DBase.h:57
double lorentzShiftInCmY_
Definition: PixelCPEBase.h:250
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
LocalVector driftDirection_
Definition: PixelCPEBase.h:246
T z() const
Definition: PV3DBase.h:58
double lorentzShiftInCmX_
Definition: PixelCPEBase.h:249
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
const MagneticField * magfield_
Definition: PixelCPEBase.h:257
const SiPixelLorentzAngle * lorentzAngle_
Definition: PixelCPEBase.h:259
GloballyPositioned< double > Frame
Definition: PixelCPEBase.h:175
float getLorentzAngle(const uint32_t &) const
const RotationType & rotation() const
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
double lorentzShiftY_
Definition: PixelCPEBase.h:248
T x() const
Definition: PV3DBase.h:56
const PositionType & position() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
LocalVector PixelCPEBase::driftDirection ( GlobalVector  bfield) const
protected

Definition at line 577 of file PixelCPEBase.cc.

References alpha2Order, edm::hlt::Exception, GeomDet::geographicalId(), SiPixelLorentzAngle::getLorentzAngle(), LogDebug, lorentzAngle_, GloballyPositioned< T >::position(), DetId::rawId(), GloballyPositioned< T >::rotation(), GeomDet::surface(), theDet, and theVerboseLevel.

Referenced by lorentzShiftX(), and lorentzShiftY().

577  {
578 
579  Frame detFrame(theDet->surface().position(), theDet->surface().rotation());
580  LocalVector Bfield = detFrame.toLocal(bfield);
581 
582  if(lorentzAngle_ == 0){
583  throw cms::Exception("invalidPointer") << "[PixelCPEBase::driftDirection] zero pointer to lorentz angle record ";
584  }
586  float alpha2;
587  if (alpha2Order) {
588  alpha2 = langle*langle;
589  } else {
590  alpha2 = 0.0;
591  }
592  // &&& dir_x should have a "-" and dir_y a "+"
593  float dir_x = ( langle * Bfield.y() + alpha2* Bfield.z()* Bfield.x() );
594  float dir_y = -( langle * Bfield.x() - alpha2* Bfield.z()* Bfield.y() );
595  float dir_z = -( 1 + alpha2* Bfield.z()*Bfield.z() );
596  float scale = (1 + alpha2* Bfield.z()*Bfield.z() );
597  LocalVector theDriftDirection = LocalVector(dir_x/scale, dir_y/scale, dir_z/scale );
598  if ( theVerboseLevel > 9 )
599  LogDebug("PixelCPEBase") << " The drift direction in local coordinate is "
600  << theDriftDirection ;
601 
602  return theDriftDirection;
603 }
#define LogDebug(id)
Local3DVector LocalVector
Definition: LocalVector.h:12
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
const SiPixelLorentzAngle * lorentzAngle_
Definition: PixelCPEBase.h:259
GloballyPositioned< double > Frame
Definition: PixelCPEBase.h:175
float getLorentzAngle(const uint32_t &) const
const RotationType & rotation() const
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
const PositionType & position() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
LocalVector PixelCPEBase::driftDirectionCorrect ( GlobalVector  bfield) const
protected
bool PixelCPEBase::hasBadPixels ( ) const
inline

Definition at line 149 of file PixelCPEBase.h.

References hasBadPixels_.

149 { return hasBadPixels_ ; }
bool hasBadPixels_
Definition: PixelCPEBase.h:228
bool PixelCPEBase::hasFilledProb ( ) const
inline

Definition at line 151 of file PixelCPEBase.h.

References hasFilledProb_.

151 { return hasFilledProb_ ; }
bool hasFilledProb_
Definition: PixelCPEBase.h:230
bool PixelCPEBase::isFlipped ( ) const
protected

Definition at line 421 of file PixelCPEBase.cc.

References PV3DBase< T, PVType, FrameType >::perp(), GeomDet::surface(), theDet, and Surface::toGlobal().

Referenced by setTheDet().

422 {
423  // Check the relative position of the local +/- z in global coordinates.
424  float tmp1 = theDet->surface().toGlobal(Local3DPoint(0.,0.,0.)).perp();
425  float tmp2 = theDet->surface().toGlobal(Local3DPoint(0.,0.,1.)).perp();
426  //cout << " 1: " << tmp1 << " 2: " << tmp2 << endl;
427  if ( tmp2<tmp1 ) return true;
428  else return false;
429 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
T perp() const
Definition: PV3DBase.h:66
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
bool PixelCPEBase::isOnEdge ( ) const
inline

Definition at line 148 of file PixelCPEBase.h.

References isOnEdge_.

148 { return isOnEdge_ ; }
virtual LocalError PixelCPEBase::localError ( const SiPixelCluster cl,
const GeomDetUnit det 
) const
pure virtual
LocalValues PixelCPEBase::localParameters ( const SiPixelCluster cl,
const GeomDetUnit det 
) const
inline

Definition at line 65 of file PixelCPEBase.h.

References computeAnglesFromDetPosition(), asciidump::le, localError(), localPosition(), nRecHitsTotal_, and setTheDet().

67  {
68  nRecHitsTotal_++ ;
69  setTheDet( det, cl );
71 
72  // localPosition( cl, det ) must be called before localError( cl, det ) !!!
73  LocalPoint lp = localPosition( cl, det );
74  LocalError le = localError( cl, det );
75 
76  return std::make_pair( lp, le );
77  }
void computeAnglesFromDetPosition(const SiPixelCluster &cl, const GeomDetUnit &det) const
virtual LocalError localError(const SiPixelCluster &cl, const GeomDetUnit &det) const =0
void setTheDet(const GeomDetUnit &det, const SiPixelCluster &cluster) const
Definition: PixelCPEBase.cc:95
virtual LocalPoint localPosition(const SiPixelCluster &cl, const GeomDetUnit &det) const
LocalValues PixelCPEBase::localParameters ( const SiPixelCluster cl,
const GeomDetUnit det,
const LocalTrajectoryParameters ltp 
) const
inline

Definition at line 82 of file PixelCPEBase.h.

References computeAnglesFromTrajectory(), asciidump::le, localError(), localPosition(), nRecHitsTotal_, and setTheDet().

85  {
86  nRecHitsTotal_++ ;
87  setTheDet( det, cl );
88  computeAnglesFromTrajectory(cl, det, ltp);
89 
90  // localPosition( cl, det ) must be called before localError( cl, det ) !!!
91  LocalPoint lp = localPosition( cl, det );
92  LocalError le = localError( cl, det );
93 
94  return std::make_pair( lp, le );
95  }
void computeAnglesFromTrajectory(const SiPixelCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const
virtual LocalError localError(const SiPixelCluster &cl, const GeomDetUnit &det) const =0
void setTheDet(const GeomDetUnit &det, const SiPixelCluster &cluster) const
Definition: PixelCPEBase.cc:95
virtual LocalPoint localPosition(const SiPixelCluster &cl, const GeomDetUnit &det) const
LocalValues PixelCPEBase::localParameters ( const SiPixelCluster cl,
const GeomDetUnit det,
float  alpha,
float  beta 
) const
inline

Definition at line 100 of file PixelCPEBase.h.

References alpha, alpha_, beta, beta_, cotalpha_, cotbeta_, asciidump::le, localError(), localPosition(), nRecHitsTotal_, Pi, setTheDet(), and funct::tan().

103  {
104  nRecHitsTotal_++ ;
105  alpha_ = alpha;
106  beta_ = beta;
107  double HalfPi = 0.5*TMath::Pi();
108  cotalpha_ = tan(HalfPi - alpha_);
109  cotbeta_ = tan(HalfPi - beta_ );
110  setTheDet( det, cl );
111 
112  // localPosition( cl, det ) must be called before localError( cl, det ) !!!
113  LocalPoint lp = localPosition( cl, det );
114  LocalError le = localError( cl, det );
115 
116  return std::make_pair( lp, le );
117  }
const double beta
const double Pi
float alpha
Definition: AMPTWrapper.h:95
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
virtual LocalError localError(const SiPixelCluster &cl, const GeomDetUnit &det) const =0
void setTheDet(const GeomDetUnit &det, const SiPixelCluster &cluster) const
Definition: PixelCPEBase.cc:95
virtual LocalPoint localPosition(const SiPixelCluster &cl, const GeomDetUnit &det) const
LocalPoint PixelCPEBase::localPosition ( const SiPixelCluster cl,
const GeomDetUnit det 
) const
virtual

Reimplemented in PixelCPEGeneric, and PixelCPETemplateReco.

Definition at line 360 of file PixelCPEBase.cc.

References setTheDet(), theLShiftX, theLShiftY, thePitchX, thePitchY, xpos(), and ypos().

Referenced by localParameters(), measurementError(), and measurementPosition().

361  {
362  setTheDet( det, cluster );
363 
364  float lpx = xpos(cluster);
365  float lpy = ypos(cluster);
366  float lxshift = theLShiftX * thePitchX; // shift in cm
367  float lyshift = theLShiftY * thePitchY;
368  LocalPoint cdfsfs(lpx-lxshift, lpy-lyshift);
369  return cdfsfs;
370 }
float theLShiftY
Definition: PixelCPEBase.h:200
virtual float ypos(const SiPixelCluster &) const =0
void setTheDet(const GeomDetUnit &det, const SiPixelCluster &cluster) const
Definition: PixelCPEBase.cc:95
float theLShiftX
Definition: PixelCPEBase.h:199
virtual float xpos(const SiPixelCluster &) const =0
float PixelCPEBase::lorentzShiftX ( ) const
protectedvirtual

Definition at line 436 of file PixelCPEBase.cc.

References dir, PixelCPEBase::Param::drift, driftDirection(), GeomDet::geographicalId(), MagneticField::inTesla(), m_Params, magfield_, L1TEmulatorMonitor_cff::p, GloballyPositioned< T >::position(), DetId::rawId(), PixelGeomDetUnit::specificTopology(), GeomDet::surface(), theDet, thePitchX, theThickness, PixelCPEBase::Param::topology, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by setTheDet().

437 {
439  Param & p = const_cast<PixelCPEBase*>(this)->m_Params[ theDet->geographicalId().rawId() ];
440  if ( p.topology )
441  {
442  //cout << "--------------- old ----------------------" << endl;
443  //cout << "p.topology = " << p.topology << endl;
444  dir = p.drift;
445  //cout << "same direction: dir = " << dir << endl;
446  }
447  else
448  {
449  //cout << "--------------- new ----------------------" << endl;
450  //cout << "p.topology = " << p.topology << endl;
451 
452  // ggiurgiu@jhu.edu 12/09/2010 : no longer need to cast
453  //p.topology = (RectangularPixelTopology*)( & ( theDet->specificTopology() ) );
454  p.topology = &( theDet->specificTopology() );
455 
457  dir = p.drift;
458  //cout << "p.topology = " << p.topology << endl;
459  //cout << "new direction: dir = " << dir << endl;
460 
461  }
462  //LocalVector dir = driftDirection(magfield_->inTesla(theDet->surface().position()) );
463 
464  // max shift in cm
465  float xdrift = dir.x()/dir.z() * theThickness;
466  // express the shift in units of pitch,
467  // divide by 2 to get the average correction
468  float lshift = xdrift / thePitchX / 2.;
469 
470  //cout << "Lorentz Drift = " << lshift << endl;
471  //cout << "X Drift = " << dir.x() << endl;
472  //cout << "Z Drift = " << dir.z() << endl;
473 
474  return lshift;
475 
476 
477 }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
float theThickness
Definition: PixelCPEBase.h:190
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
T z() const
Definition: PV3DBase.h:58
LocalVector driftDirection(GlobalVector bfield) const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
const MagneticField * magfield_
Definition: PixelCPEBase.h:257
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
Params m_Params
Definition: PixelCPEBase.h:355
dbl *** dir
Definition: mlp_gen.cc:35
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
T x() const
Definition: PV3DBase.h:56
const PositionType & position() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
float PixelCPEBase::lorentzShiftY ( ) const
protectedvirtual

Definition at line 479 of file PixelCPEBase.cc.

References dir, PixelCPEBase::Param::drift, driftDirection(), GeomDet::geographicalId(), MagneticField::inTesla(), m_Params, magfield_, L1TEmulatorMonitor_cff::p, GloballyPositioned< T >::position(), DetId::rawId(), PixelGeomDetUnit::specificTopology(), GeomDet::surface(), theDet, thePitchY, theThickness, PixelCPEBase::Param::topology, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by setTheDet().

480 {
481 
483 
484  Param & p = const_cast<PixelCPEBase*>(this)->m_Params[ theDet->geographicalId().rawId() ];
485  if ( p.topology )
486  {
487  //cout << "--------------- old y ----------------------" << endl;
488  //cout << "p.topology y = " << p.topology << endl;
489  dir = p.drift;
490  //cout << "same direction y: dir = " << dir << endl;
491  }
492  else
493  {
494  //cout << "--------------- new y ----------------------" << endl;
495  //cout << "p.topology y = " << p.topology << endl;
496 
497  //p.topology = (RectangularPixelTopology*)( & ( theDet->specificTopology() ) );
498  p.topology = &( theDet->specificTopology() );
499 
501  dir = p.drift;
502  //cout << "p.topology y = " << p.topology << endl;
503  //cout << "new direction y: dir = " << dir << endl;
504 
505  }
506 
507  //LocalVector dir = driftDirection(magfield_->inTesla(theDet->surface().position()) );
508 
509  float ydrift = dir.y()/dir.z() * theThickness;
510  float lshift = ydrift / thePitchY / 2.;
511  return lshift;
512 
513 
514 }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
float theThickness
Definition: PixelCPEBase.h:190
T y() const
Definition: PV3DBase.h:57
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
T z() const
Definition: PV3DBase.h:58
LocalVector driftDirection(GlobalVector bfield) const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
const MagneticField * magfield_
Definition: PixelCPEBase.h:257
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
Params m_Params
Definition: PixelCPEBase.h:355
dbl *** dir
Definition: mlp_gen.cc:35
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
const PositionType & position() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
MeasurementError PixelCPEBase::measurementError ( const SiPixelCluster cluster,
const GeomDetUnit det 
) const
protected

Definition at line 397 of file PixelCPEBase.cc.

References LocalTrajectoryParameters::dxdz(), LocalTrajectoryParameters::dydz(), asciidump::le, loc_traj_param_, localError(), localPosition(), Topology::measurementError(), theTopol, and with_track_angle.

398 {
399  LocalPoint lp( localPosition(cluster, det) );
400  LocalError le( localError( cluster, det) );
401 
402  // ggiurgiu@jhu.edu 12/09/2010 : trk angles needed for bow/kink correction
403  if ( with_track_angle )
405  else
406  return theTopol->measurementError( lp, le );
407 }
bool with_track_angle
Definition: PixelCPEBase.h:220
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
virtual LocalError localError(const SiPixelCluster &cl, const GeomDetUnit &det) const =0
LocalTrajectoryParameters loc_traj_param_
Definition: PixelCPEBase.h:272
const PixelTopology * theTopol
Definition: PixelCPEBase.h:185
virtual LocalPoint localPosition(const SiPixelCluster &cl, const GeomDetUnit &det) const
MeasurementPoint PixelCPEBase::measurementPosition ( const SiPixelCluster cluster,
const GeomDetUnit det 
) const
protected

Definition at line 376 of file PixelCPEBase.cc.

References LocalTrajectoryParameters::dxdz(), LocalTrajectoryParameters::dydz(), loc_traj_param_, localPosition(), Topology::measurementPosition(), theTopol, and with_track_angle.

377  {
378 
379  LocalPoint lp = localPosition(cluster,det);
380 
381  // ggiurgiu@jhu.edu 12/09/2010 : trk angles needed for bow/kink correction
382 
383  if ( with_track_angle )
385  else
386  return theTopol->measurementPosition( lp );
387 
388 }
bool with_track_angle
Definition: PixelCPEBase.h:220
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
LocalTrajectoryParameters loc_traj_param_
Definition: PixelCPEBase.h:272
const PixelTopology * theTopol
Definition: PixelCPEBase.h:185
virtual LocalPoint localPosition(const SiPixelCluster &cl, const GeomDetUnit &det) const
float PixelCPEBase::probabilityQ ( ) const
inline

Definition at line 146 of file PixelCPEBase.h.

References probabilityQ_.

146 { return probabilityQ_ ; }
float probabilityQ_
Definition: PixelCPEBase.h:225
float PixelCPEBase::probabilityX ( ) const
inline

Definition at line 135 of file PixelCPEBase.h.

References probabilityX_.

135 { return probabilityX_ ; }
float probabilityX_
Definition: PixelCPEBase.h:223
float PixelCPEBase::probabilityXY ( ) const
inline

Definition at line 137 of file PixelCPEBase.h.

References funct::log(), probabilityX_, and probabilityY_.

Referenced by rawQualityWord().

137  {
138  if ( probabilityX_ !=0 && probabilityY_ !=0 )
139  {
141  }
142  else
143  return 0;
144  }
float probabilityY_
Definition: PixelCPEBase.h:224
Log< T >::type log(const T &t)
Definition: Log.h:22
float probabilityX_
Definition: PixelCPEBase.h:223
float PixelCPEBase::probabilityY ( ) const
inline

Definition at line 136 of file PixelCPEBase.h.

References probabilityY_.

136 { return probabilityY_ ; }
float probabilityY_
Definition: PixelCPEBase.h:224
float PixelCPEBase::qBin ( ) const
inline

Definition at line 147 of file PixelCPEBase.h.

References qBin_.

147 { return qBin_ ; }
SiPixelRecHitQuality::QualWordType PixelCPEBase::rawQualityWord ( ) const

A convenience method to fill a whole SiPixelRecHitQuality word in one shot. This way, we can keep the details of what is filled within the pixel code and not expose the Transient SiPixelRecHit to it as well. The name of this function is chosen to match the one in SiPixelRecHit.

Definition at line 670 of file PixelCPEBase.cc.

References hasBadPixels_, hasFilledProb_, isOnEdge_, probabilityQ_, probabilityXY(), qBin_, SiPixelRecHitQuality::Packing::setHasBadPixels(), SiPixelRecHitQuality::Packing::setHasFilledProb(), SiPixelRecHitQuality::Packing::setIsOnEdge(), SiPixelRecHitQuality::Packing::setProbabilityQ(), SiPixelRecHitQuality::Packing::setProbabilityXY(), SiPixelRecHitQuality::Packing::setQBin(), SiPixelRecHitQuality::Packing::setSpansTwoROCs(), spansTwoROCs_, and SiPixelRecHitQuality::thePacking.

Referenced by cms::SiPixelRecHitConverter::run(), and TSiPixelRecHit::TSiPixelRecHit().

671 {
673 
675  qualWord );
676 
678  qualWord );
679 
681  qualWord );
682 
684  qualWord );
685 
687  qualWord );
688 
690  qualWord );
691 
693  qualWord );
694 
695  return qualWord;
696 }
void setIsOnEdge(bool flag, QualWordType &qualWord)
void setProbabilityXY(float prob, QualWordType &qualWord)
void setSpansTwoROCs(bool flag, QualWordType &qualWord)
void setHasBadPixels(bool flag, QualWordType &qualWord)
float probabilityQ_
Definition: PixelCPEBase.h:225
bool spansTwoROCs_
Definition: PixelCPEBase.h:229
void setProbabilityQ(float prob, QualWordType &qualWord)
bool hasBadPixels_
Definition: PixelCPEBase.h:228
bool hasFilledProb_
Definition: PixelCPEBase.h:230
void setHasFilledProb(bool flag, QualWordType &qualWord)
float probabilityXY() const
Definition: PixelCPEBase.h:137
void setQBin(int qbin, QualWordType &qualWord)
void PixelCPEBase::setMagField ( const MagneticField mag) const
inline

Definition at line 123 of file PixelCPEBase.h.

References mag(), and magfield_.

123 { magfield_ = mag; }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const MagneticField * magfield_
Definition: PixelCPEBase.h:257
void PixelCPEBase::setTheDet ( const GeomDetUnit det,
const SiPixelCluster cluster 
) const
protected

Definition at line 95 of file PixelCPEBase.cc.

References BoundSurface::bounds(), PixelTopology::containsBigPixelInX(), PixelTopology::containsBigPixelInY(), edm::hlt::Exception, hasBadPixels_, i, isFlipped(), PixelTopology::isItEdgePixelInX(), PixelTopology::isItEdgePixelInY(), isOnEdge_, LogDebug, lorentzShiftX(), lorentzShiftY(), SiPixelCluster::maxPixelCol(), SiPixelCluster::maxPixelRow(), SiPixelCluster::minPixelCol(), SiPixelCluster::minPixelRow(), PixelTopology::ncolumns(), PixelTopology::nrows(), PV3DBase< T, PVType, FrameType >::perp(), PixelTopology::pitch(), SiPixelCluster::pixelADC(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, GloballyPositioned< T >::position(), spansTwoROCs_, PixelGeomDetUnit::specificTopology(), GeomDetType::subDetector(), GeomDet::surface(), theDet, theDetR, theDetZ, theLShiftX, theLShiftY, theNumOfCol, theNumOfRow, thePart, thePitchX, thePitchY, theSign, theThickness, theTopol, theVerboseLevel, Bounds::thickness(), PixelGeomDetUnit::type(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by PixelCPETemplateReco::localError(), PixelCPEGeneric::localError(), localParameters(), PixelCPETemplateReco::localPosition(), PixelCPEGeneric::localPosition(), and localPosition().

96 {
97  if ( theDet == &det )
98  return; // we have already seen this det unit
99 
100  //--- This is a new det unit, so cache it
101  theDet = dynamic_cast<const PixelGeomDetUnit*>( &det );
102 
103  if ( !theDet )
104  {
105  throw cms::Exception(" PixelCPEBase::setTheDet : ")
106  << " Wrong pointer to PixelGeomDetUnit object !!!";
107  }
108 
109  //--- theDet->type() returns a GeomDetType, which implements subDetector()
111  switch ( thePart )
112  {
114  // A barrel! A barrel!
115  break;
117  // A forward! A forward!
118  break;
119  default:
120  throw cms::Exception("PixelCPEBase::setTheDet :")
121  << "PixelCPEBase: A non-pixel detector type in here?" ;
122  }
123 
124  //--- The location in of this DetUnit in a cyllindrical coord system (R,Z)
125  //--- The call goes via BoundSurface, returned by theDet->surface(), but
126  //--- position() is implemented in GloballyPositioned<> template
127  //--- ( BoundSurface : Surface : GloballyPositioned<float> )
129  theDetZ = theDet->surface().position().z();
130  //--- Define parameters for chargewidth calculation
131 
132  //--- bounds() is implemented in BoundSurface itself.
134 
135  //--- Cache the topology.
136  // ggiurgiu@jhu.edu 12/09/2010 : no longer need to dynamyc cast to RectangularPixelTopology
137  //theTopol
138  //= dynamic_cast<const RectangularPixelTopology*>( & (theDet->specificTopology()) );
139 
141 
142  //---- The geometrical description of one module/plaquette
143  theNumOfRow = theTopol->nrows(); // rows in x
144  theNumOfCol = theTopol->ncolumns(); // cols in y
145  std::pair<float,float> pitchxy = theTopol->pitch();
146  thePitchX = pitchxy.first; // pitch along x
147  thePitchY = pitchxy.second; // pitch along y
148 
149  //--- Find the offset
150  // ggiurgiu@jhu.edu 12/09/2010 : this piece is deprecated
151  //MeasurementPoint offset =
152  //theTopol->measurementPosition( LocalPoint(0.0, 0.0),
153  // Topology::LocalTrackAngles( LocalTrajectoryParameters::dxdz(),
154  // LocalTrajectoryParameters::dydz() ) );
155  //
156  //theOffsetX = offset.x();
157  //theOffsetY = offset.y();
158 
159  //--- Find if the E field is flipped: i.e. whether it points
160  //--- from the beam, or towards the beam. (The voltages are
161  //--- applied backwards on every other module in barrel and
162  //--- blade in forward.)
163  theSign = isFlipped() ? -1 : 1;
164 
165  //--- The Lorentz shift.
167 
169 
170  // testing
172  //cout<<" lorentz shift "<<theLShiftX<<" "<<theLShiftY<<endl;
173  theLShiftY=0.;
174  }
175 
176  //--- Geometric Quality Information
177  int minInX,minInY,maxInX,maxInY=0;
178  minInX = cluster.minPixelRow();
179  minInY = cluster.minPixelCol();
180  maxInX = cluster.maxPixelRow();
181  maxInY = cluster.maxPixelCol();
182 
183  if(theTopol->isItEdgePixelInX(minInX) || theTopol->isItEdgePixelInX(maxInX) ||
184  theTopol->isItEdgePixelInY(minInY) || theTopol->isItEdgePixelInY(maxInY) ) {
185  isOnEdge_ = true;
186  }
187  else isOnEdge_ = false;
188 
189  // Bad Pixels have their charge set to 0 in the clusterizer
190  hasBadPixels_ = false;
191  for(unsigned int i=0; i<cluster.pixelADC().size(); ++i) {
192  if(cluster.pixelADC()[i] == 0) hasBadPixels_ = true;
193  }
194 
195  if(theTopol->containsBigPixelInX(minInX,maxInX) ||
196  theTopol->containsBigPixelInY(minInY,maxInY) ) {
197  spansTwoROCs_ = true;
198  }
199  else spansTwoROCs_ = false;
200 
201 
202  if (theVerboseLevel > 1)
203  {
204  LogDebug("PixelCPEBase") << "***** PIXEL LAYOUT *****"
205  << " thePart = " << thePart
206  << " theThickness = " << theThickness
207  << " thePitchX = " << thePitchX
208  << " thePitchY = " << thePitchY
209  // << " theOffsetX = " << theOffsetX
210  // << " theOffsetY = " << theOffsetY
211  << " theLShiftX = " << theLShiftX;
212  }
213 
214 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
int minPixelCol() const
float theNumOfRow
Definition: PixelCPEBase.h:195
virtual bool containsBigPixelInX(const int &ixmin, const int &ixmax) const =0
T perp() const
Definition: PV3DBase.h:66
virtual int ncolumns() const =0
float theLShiftY
Definition: PixelCPEBase.h:200
float theThickness
Definition: PixelCPEBase.h:190
virtual int nrows() const =0
bool spansTwoROCs_
Definition: PixelCPEBase.h:229
GeomDetType::SubDetector thePart
Definition: PixelCPEBase.h:188
float theNumOfCol
Definition: PixelCPEBase.h:196
int maxPixelRow() const
virtual float thickness() const =0
virtual bool isItEdgePixelInX(int ixbin) const =0
int minPixelRow() const
bool hasBadPixels_
Definition: PixelCPEBase.h:228
bool isFlipped() const
T z() const
Definition: PV3DBase.h:58
virtual bool containsBigPixelInY(const int &iymin, const int &iymax) const =0
const std::vector< uint16_t > & pixelADC() const
virtual std::pair< float, float > pitch() const =0
const Bounds & bounds() const
Definition: BoundSurface.h:89
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
const PixelTopology * theTopol
Definition: PixelCPEBase.h:185
int maxPixelCol() const
virtual float lorentzShiftX() const
virtual bool isItEdgePixelInY(int iybin) const =0
virtual const GeomDetType & type() const
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:181
float theLShiftX
Definition: PixelCPEBase.h:199
virtual float lorentzShiftY() const
const PositionType & position() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
SubDetector subDetector() const
Definition: GeomDetType.h:22
bool PixelCPEBase::spansTwoRocks ( ) const
inline

Definition at line 150 of file PixelCPEBase.h.

References spansTwoROCs_.

150 { return spansTwoROCs_ ; }
bool spansTwoROCs_
Definition: PixelCPEBase.h:229
void PixelCPEBase::xCharge ( const std::vector< SiPixelCluster::Pixel > &  pixelsVec,
const int &  imin,
const int &  imax,
float &  q1,
float &  q2 
) const
protected

Definition at line 521 of file PixelCPEBase.cc.

References ecalMGPA::adc(), i, and ExpressReco_HICollisions_FallBack::x.

523  {
524  //calculate charge in the first and last pixel in y
525  // and the total cluster charge
526  q1 = 0.0;
527  q2 = 0.0;
528  float qm = 0.0;
529  int isize = pixelsVec.size();
530  for (int i=0; i<isize; ++i) {
531  if ( (pixelsVec[i].x) == imin )
532  q1 += pixelsVec[i].adc;
533  else if ( (pixelsVec[i].x) == imax)
534  q2 += float(pixelsVec[i].adc);
535  else
536  qm += float(pixelsVec[i].adc);
537  }
538  return;
539 }
int adc(sample_type sample)
get the ADC sample (12 bits)
int i
Definition: DBlmapReader.cc:9
double q2[4]
Definition: TauolaWrapper.h:88
double q1[4]
Definition: TauolaWrapper.h:87
virtual float PixelCPEBase::xpos ( const SiPixelCluster ) const
protectedpure virtual

Implemented in PixelCPEGeneric, and PixelCPETemplateReco.

Referenced by localPosition().

void PixelCPEBase::yCharge ( const std::vector< SiPixelCluster::Pixel > &  pixelsVec,
const int &  imin,
const int &  imax,
float &  q1,
float &  q2 
) const
protected

Definition at line 545 of file PixelCPEBase.cc.

References ecalMGPA::adc(), i, and ExpressReco_HICollisions_FallBack::y.

547  {
548 
549  //calculate charge in the first and last pixel in y
550  // and the inner cluster charge
551  q1 = 0;
552  q2 = 0;
553  float qm=0;
554  int isize = pixelsVec.size();
555  for (int i=0; i<isize; ++i) {
556  if ( (pixelsVec[i].y) == imin)
557  q1 += pixelsVec[i].adc;
558  else if ( (pixelsVec[i].y) == imax)
559  q2 += pixelsVec[i].adc;
560  //else if (pixelsVec[i].y < ymax && pixelsVec[i].y > ymin )
561  else
562  qm += float(pixelsVec[i].adc);
563  }
564  return;
565 }
int adc(sample_type sample)
get the ADC sample (12 bits)
int i
Definition: DBlmapReader.cc:9
double q2[4]
Definition: TauolaWrapper.h:88
double q1[4]
Definition: TauolaWrapper.h:87
virtual float PixelCPEBase::ypos ( const SiPixelCluster ) const
protectedpure virtual

Implemented in PixelCPEGeneric, and PixelCPETemplateReco.

Referenced by localPosition().

Member Data Documentation

bool PixelCPEBase::alpha2Order
protected

Definition at line 265 of file PixelCPEBase.h.

Referenced by computeLorentzShifts(), driftDirection(), and PixelCPEBase().

float PixelCPEBase::alpha_
mutableprotected
float PixelCPEBase::beta_
mutableprotected
unsigned int PixelCPEBase::clusterProbComputationFlag_
protected

Definition at line 238 of file PixelCPEBase.h.

Referenced by clusterProbComputationFlag(), and PixelCPEBase().

float PixelCPEBase::cotalpha_
mutableprotected
float PixelCPEBase::cotbeta_
mutableprotected
LocalVector PixelCPEBase::driftDirection_
mutableprotected

Definition at line 246 of file PixelCPEBase.h.

Referenced by computeLorentzShifts().

const SiPixelCPEGenericErrorParm* PixelCPEBase::genErrorParm_
mutableprotected

Definition at line 261 of file PixelCPEBase.h.

Referenced by PixelCPEGeneric::localError(), and PixelCPEBase().

bool PixelCPEBase::hasBadPixels_
mutableprotected

Definition at line 228 of file PixelCPEBase.h.

Referenced by hasBadPixels(), rawQualityWord(), and setTheDet().

bool PixelCPEBase::hasFilledProb_
mutableprotected
bool PixelCPEBase::isOnEdge_
mutableprotected

Definition at line 227 of file PixelCPEBase.h.

Referenced by isOnEdge(), rawQualityWord(), and setTheDet().

LocalTrajectoryParameters PixelCPEBase::loc_traj_param_
mutableprotected
Topology::LocalTrackPred PixelCPEBase::loc_trk_pred_
mutableprotected
const SiPixelLorentzAngle* PixelCPEBase::lorentzAngle_
mutableprotected

Definition at line 259 of file PixelCPEBase.h.

Referenced by computeLorentzShifts(), driftDirection(), and PixelCPEBase().

double PixelCPEBase::lorentzShiftInCmX_
mutableprotected

Definition at line 249 of file PixelCPEBase.h.

Referenced by computeLorentzShifts(), and PixelCPEGeneric::localPosition().

double PixelCPEBase::lorentzShiftInCmY_
mutableprotected

Definition at line 250 of file PixelCPEBase.h.

Referenced by computeLorentzShifts(), and PixelCPEGeneric::localPosition().

double PixelCPEBase::lorentzShiftX_
mutableprotected

Definition at line 247 of file PixelCPEBase.h.

Referenced by computeLorentzShifts().

double PixelCPEBase::lorentzShiftY_
mutableprotected

Definition at line 248 of file PixelCPEBase.h.

Referenced by computeLorentzShifts().

Params PixelCPEBase::m_Params
private

Definition at line 355 of file PixelCPEBase.h.

Referenced by lorentzShiftX(), and lorentzShiftY().

const MagneticField* PixelCPEBase::magfield_
mutableprotected
int PixelCPEBase::nRecHitsTotal_
mutableprotected

Definition at line 216 of file PixelCPEBase.h.

Referenced by PixelCPEGeneric::generic_position_formula(), and localParameters().

int PixelCPEBase::nRecHitsUsedEdge_
mutableprotected

Definition at line 217 of file PixelCPEBase.h.

Referenced by PixelCPEGeneric::generic_position_formula().

float PixelCPEBase::probabilityQ_
mutableprotected
float PixelCPEBase::probabilityX_
mutableprotected
float PixelCPEBase::probabilityY_
mutableprotected
float PixelCPEBase::qBin_
mutableprotected
bool PixelCPEBase::spansTwoROCs_
mutableprotected

Definition at line 229 of file PixelCPEBase.h.

Referenced by rawQualityWord(), setTheDet(), and spansTwoRocks().

const SiPixelTemplateDBObject* PixelCPEBase::templateDBobject_
mutableprotected
const PixelGeomDetUnit* PixelCPEBase::theDet
mutableprotected
float PixelCPEBase::theDetR
mutableprotected

Definition at line 198 of file PixelCPEBase.h.

Referenced by setTheDet().

float PixelCPEBase::theDetZ
mutableprotected

Definition at line 197 of file PixelCPEBase.h.

Referenced by setTheDet().

float PixelCPEBase::theLShiftX
mutableprotected

Definition at line 199 of file PixelCPEBase.h.

Referenced by localPosition(), and setTheDet().

float PixelCPEBase::theLShiftY
mutableprotected

Definition at line 200 of file PixelCPEBase.h.

Referenced by localPosition(), and setTheDet().

float PixelCPEBase::theNumOfCol
mutableprotected

Definition at line 196 of file PixelCPEBase.h.

Referenced by setTheDet().

float PixelCPEBase::theNumOfRow
mutableprotected

Definition at line 195 of file PixelCPEBase.h.

Referenced by setTheDet().

GeomDetType::SubDetector PixelCPEBase::thePart
mutableprotected
float PixelCPEBase::thePitchX
mutableprotected
float PixelCPEBase::thePitchY
mutableprotected
float PixelCPEBase::theSign
mutableprotected

Definition at line 201 of file PixelCPEBase.h.

Referenced by setTheDet().

float PixelCPEBase::theThickness
mutableprotected
const PixelTopology* PixelCPEBase::theTopol
mutableprotected
int PixelCPEBase::theVerboseLevel
protected
float PixelCPEBase::trk_lp_x
mutableprotected
float PixelCPEBase::trk_lp_y
mutableprotected
bool PixelCPEBase::with_track_angle
mutableprotected