#include <PixelCPEBase.h>
Definition at line 47 of file PixelCPEBase.h.
typedef GloballyPositioned<double> PixelCPEBase::Frame [protected] |
Definition at line 179 of file PixelCPEBase.h.
typedef std::unordered_map< unsigned int, Param> PixelCPEBase::Params [private] |
Definition at line 326 of file PixelCPEBase.h.
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 45 of file PixelCPEBase.cc.
References alpha2Order, clusterProbComputationFlag_, genErrorParm_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), lorentzAngle_, mag(), magfield_, templateDBobject_, and theVerboseLevel.
: theDet(nullptr), theTopol(nullptr), theRecTopol(nullptr), theParam(nullptr), nRecHitsTotal_(0), nRecHitsUsedEdge_(0), probabilityX_(0.0), probabilityY_(0.0), probabilityQ_(0.0), qBin_(0), isOnEdge_(false), hasBadPixels_(false), spansTwoROCs_(false), hasFilledProb_(false), loc_trk_pred_(0.0, 0.0, 0.0, 0.0) { //--- Lorentz angle tangent per Tesla lorentzAngle_ = lorentzAngle; //--- Algorithm's verbosity theVerboseLevel = conf.getUntrackedParameter<int>("VerboseLevel",0); //-- Magnetic Field magfield_ = mag; //-- Error Parametriaztion from DB for CPE Generic genErrorParm_ = genErrorParm; //-- Template Calibration Object from DB templateDBobject_ = templateDBobject; //-- Switch on/off E.B alpha2Order = conf.getParameter<bool>("Alpha2Order"); //--- A flag that could be used to change the behavior of //--- clusterProbability() in TSiPixelRecHit (the *transient* one). //--- The problem is that the transient hits are made after the CPE runs //--- and they don't get the access to the PSet, so we pass it via the //--- CPE itself... // clusterProbComputationFlag_ = (unsigned int) conf.getParameter<int>("ClusterProbComputationFlag"); }
unsigned int PixelCPEBase::clusterProbComputationFlag | ( | ) | const [inline] |
Reimplemented from PixelClusterParameterEstimator.
Definition at line 160 of file PixelCPEBase.h.
References clusterProbComputationFlag_.
{ return clusterProbComputationFlag_ ; }
void PixelCPEBase::computeAnglesFromDetPosition | ( | const SiPixelCluster & | cl, |
const GeomDetUnit & | det | ||
) | const |
Definition at line 337 of file PixelCPEBase.cc.
References alpha_, beta_, cotalpha_, cotbeta_, Exception, Topology::localPosition(), mathSSE::sqrt(), GeomDet::surface(), theDet, theTopol, Surface::toGlobal(), with_track_angle, SiPixelCluster::x(), PV3DBase< T, PVType, FrameType >::x(), SiPixelCluster::y(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by localParameters().
{ //--- This is a new det unit, so cache it theDet = dynamic_cast<const PixelGeomDetUnit*>( &det ); if ( ! theDet ) { throw cms::Exception("PixelCPEBase::computeAngleFromDetPosition") << " Wrong pointer to pixel detector !!!" << endl; } // get cluster center of gravity (of charge) float xcenter = cl.x(); float ycenter = cl.y(); // get the cluster position in local coordinates (cm) // ggiurgiu@jhu.edu 12/09/2010 : This function is called without track info, therefore there are no track // angles to provide here. Call the default localPosition (without track info) LocalPoint lp = theTopol->localPosition( MeasurementPoint(xcenter, ycenter) ); // get the cluster position in global coordinates (cm) GlobalPoint gp = theDet->surface().toGlobal( lp ); float gp_mod = sqrt( gp.x()*gp.x() + gp.y()*gp.y() + gp.z()*gp.z() ); // normalize float gpx = gp.x()/gp_mod; float gpy = gp.y()/gp_mod; float gpz = gp.z()/gp_mod; // make a global vector out of the global point; this vector will point from the // origin of the detector to the cluster GlobalVector gv(gpx, gpy, gpz); // make local unit vector along local X axis const Local3DVector lvx(1.0, 0.0, 0.0); // get the unit X vector in global coordinates/ GlobalVector gvx = theDet->surface().toGlobal( lvx ); // make local unit vector along local Y axis const Local3DVector lvy(0.0, 1.0, 0.0); // get the unit Y vector in global coordinates GlobalVector gvy = theDet->surface().toGlobal( lvy ); // make local unit vector along local Z axis const Local3DVector lvz(0.0, 0.0, 1.0); // get the unit Z vector in global coordinates GlobalVector gvz = theDet->surface().toGlobal( lvz ); // calculate the components of gv (the unit vector pointing to the cluster) // in the local coordinate system given by the basis {gvx, gvy, gvz} // note that both gv and the basis {gvx, gvy, gvz} are given in global coordinates float gv_dot_gvx = gv.x()*gvx.x() + gv.y()*gvx.y() + gv.z()*gvx.z(); float gv_dot_gvy = gv.x()*gvy.x() + gv.y()*gvy.y() + gv.z()*gvy.z(); float gv_dot_gvz = gv.x()*gvz.x() + gv.y()*gvz.y() + gv.z()*gvz.z(); /* all the above is equivalent to const Local3DPoint origin = theDet->surface().toLocal(GlobalPoint(0,0,0)); // can be computed once... auto gvx = lp.x()-origin.x(); auto gvy = lp.y()-origin.y(); auto gvz = -origin.z(); * normalization not required as only ratio used... */ // calculate angles alpha_ = atan2( gv_dot_gvz, gv_dot_gvx ); beta_ = atan2( gv_dot_gvz, gv_dot_gvy ); cotalpha_ = gv_dot_gvx / gv_dot_gvz; cotbeta_ = gv_dot_gvy / gv_dot_gvz; with_track_angle = false; }
void PixelCPEBase::computeAnglesFromTrajectory | ( | const SiPixelCluster & | cl, |
const GeomDetUnit & | det, | ||
const LocalTrajectoryParameters & | ltp | ||
) | const [protected] |
Definition at line 217 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().
{ loc_traj_param_ = ltp; LocalVector localDir = ltp.momentum()/ltp.momentum().mag(); // &&& Or, maybe we need to move to the local frame ??? // LocalVector localDir( theDet->toLocal(theState.globalDirection())); //thePart = theDet->type().part(); float locx = localDir.x(); float locy = localDir.y(); float locz = localDir.z(); /* // Danek's definition alpha_ = acos(locx/sqrt(locx*locx+locz*locz)); if ( isFlipped() ) // &&& check for FPIX !!! alpha_ = PI - alpha_ ; beta_ = acos(locy/sqrt(locy*locy+locz*locz)); */ // &&& In the above, why not use atan2() ? // ggiurgiu@fnal.gov, 01/24/09 : Use it now. alpha_ = atan2( locz, locx ); beta_ = atan2( locz, locy ); cotalpha_ = locx/locz; cotbeta_ = locy/locz; LocalPoint trk_lp = ltp.position(); trk_lp_x = trk_lp.x(); trk_lp_y = trk_lp.y(); with_track_angle = true; // ggiurgiu@jhu.edu 12/09/2010 : needed to correct for bows/kinks AlgebraicVector5 vec_trk_parameters = ltp.mixedFormatVector(); //loc_trk_pred = &Topology::LocalTrackPred( vec_trk_parameters ); loc_trk_pred_ = Topology::LocalTrackPred( vec_trk_parameters ); }
void PixelCPEBase::computeLorentzShifts | ( | ) | const [protected] |
Definition at line 542 of file PixelCPEBase.cc.
References driftDirection_, getDrift(), LogDebug, lorentzShiftInCmX_, lorentzShiftInCmY_, lorentzShiftX_, lorentzShiftY_, thePitchX, thePitchY, theThickness, theVerboseLevel, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by PixelCPEGeneric::localPosition().
{ // this "has wrong sign..." so "corrected below driftDirection_ = getDrift(); // Max shift (at the other side of the sensor) in cm lorentzShiftInCmX_ = -driftDirection_.x()/driftDirection_.z() * theThickness; // &&& redundant // Express the shift in units of pitch, lorentzShiftX_ = lorentzShiftInCmX_ / thePitchX ; // Max shift (at the other side of the sensor) in cm lorentzShiftInCmY_ = -driftDirection_.y()/driftDirection_.z() * theThickness; // &&& redundant // Express the shift in units of pitch, lorentzShiftY_ = lorentzShiftInCmY_ / thePitchY; if ( theVerboseLevel > 9 ) { LogDebug("PixelCPEBase") << " The drift direction in local coordinate is " << driftDirection_ ; } }
LocalVector PixelCPEBase::driftDirection | ( | GlobalVector | bfield | ) | const [protected] |
Definition at line 497 of file PixelCPEBase.cc.
References GloballyPositioned< T >::position(), GloballyPositioned< T >::rotation(), GeomDet::surface(), and theDet.
Referenced by param().
{ Frame detFrame(theDet->surface().position(), theDet->surface().rotation()); LocalVector Bfield = detFrame.toLocal(bfield); return driftDirection(Bfield); }
LocalVector PixelCPEBase::driftDirection | ( | LocalVector | bfield | ) | const [protected] |
Definition at line 506 of file PixelCPEBase.cc.
References abs, alpha2Order, createTree::dd, Exception, f, GeomDet::geographicalId(), SiPixelLorentzAngle::getLorentzAngle(), LogDebug, lorentzAngle_, DetId::rawId(), pileupReCalc_HLTpaths::scale, theDet, theVerboseLevel, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
{ if(lorentzAngle_ == 0){ throw cms::Exception("invalidPointer") << "[PixelCPEBase::driftDirection] zero pointer to lorentz angle record "; } double langle = lorentzAngle_->getLorentzAngle(theDet->geographicalId().rawId()); float alpha2; if (alpha2Order) { alpha2 = langle*langle; } else { alpha2 = 0.0; } // &&& dir_x should have a "-" and dir_y a "+" // ********************************************************************** // Our convention is the following: // +x is defined by the direction of the Lorentz drift! // +z is defined by the direction of E field (so electrons always go into -z!) // +y is defined by +x and +z, and it turns out to be always opposite to the +B field. // ********************************************************************** float dir_x = ( langle * Bfield.y() + alpha2* Bfield.z()* Bfield.x() ); float dir_y = -( langle * Bfield.x() - alpha2* Bfield.z()* Bfield.y() ); float dir_z = -( 1.f + alpha2* Bfield.z()*Bfield.z() ); double scale = 1.f/std::abs( dir_z ); // same as 1 + alpha2*Bfield.z()*Bfield.z() LocalVector dd(dir_x*scale, dir_y*scale, -1.f ); // last is -1 ! if ( theVerboseLevel > 9 ) LogDebug("PixelCPEBase") << " The drift direction in local coordinate is " << dd ; return dd; }
LocalVector PixelCPEBase::driftDirectionCorrect | ( | GlobalVector | bfield | ) | const [protected] |
LocalVector const& PixelCPEBase::getDrift | ( | ) | const [inline, protected] |
Definition at line 319 of file PixelCPEBase.h.
References driftDirection_.
Referenced by computeLorentzShifts(), lorentzShiftX(), and lorentzShiftY().
{return driftDirection_ ;}
bool PixelCPEBase::hasBadPixels | ( | ) | const [inline] |
bool PixelCPEBase::hasFilledProb | ( | ) | const [inline] |
Definition at line 155 of file PixelCPEBase.h.
References hasFilledProb_.
{ return hasFilledProb_ ; }
bool PixelCPEBase::isFlipped | ( | ) | const [protected] |
Definition at line 432 of file PixelCPEBase.cc.
References PV3DBase< T, PVType, FrameType >::perp2(), GeomDet::surface(), theDet, and Surface::toGlobal().
Referenced by setTheDet().
{ // Check the relative position of the local +/- z in global coordinates. float tmp1 = theDet->surface().toGlobal(Local3DPoint(0.,0.,0.)).perp2(); float tmp2 = theDet->surface().toGlobal(Local3DPoint(0.,0.,1.)).perp2(); //cout << " 1: " << tmp1 << " 2: " << tmp2 << endl; if ( tmp2<tmp1 ) return true; else return false; }
bool PixelCPEBase::isOnEdge | ( | ) | const [inline] |
virtual LocalError PixelCPEBase::localError | ( | const SiPixelCluster & | cl, |
const GeomDetUnit & | det | ||
) | const [pure virtual] |
Implemented in PixelCPEGeneric, and PixelCPETemplateReco.
Referenced by localParameters(), and measurementError().
LocalValues PixelCPEBase::localParameters | ( | const SiPixelCluster & | cl, |
const GeomDetUnit & | det | ||
) | const [inline, virtual] |
Implements ClusterParameterEstimator< SiPixelCluster >.
Definition at line 66 of file PixelCPEBase.h.
References computeAnglesFromDetPosition(), asciidump::le, localError(), localPosition(), nRecHitsTotal_, and setTheDet().
{ nRecHitsTotal_++ ; setTheDet( det, cl ); computeAnglesFromDetPosition(cl, det); // localPosition( cl, det ) must be called before localError( cl, det ) !!! LocalPoint lp = localPosition( cl, det ); LocalError le = localError( cl, det ); return std::make_pair( lp, le ); }
LocalValues PixelCPEBase::localParameters | ( | const SiPixelCluster & | cl, |
const GeomDetUnit & | det, | ||
const LocalTrajectoryParameters & | ltp | ||
) | const [inline, virtual] |
Reimplemented from ClusterParameterEstimator< SiPixelCluster >.
Definition at line 83 of file PixelCPEBase.h.
References computeAnglesFromTrajectory(), asciidump::le, localError(), localPosition(), nRecHitsTotal_, and setTheDet().
{ nRecHitsTotal_++ ; setTheDet( det, cl ); computeAnglesFromTrajectory(cl, det, ltp); // localPosition( cl, det ) must be called before localError( cl, det ) !!! LocalPoint lp = localPosition( cl, det ); LocalError le = localError( cl, det ); return std::make_pair( lp, le ); }
LocalValues PixelCPEBase::localParameters | ( | const SiPixelCluster & | cl, |
const GeomDetUnit & | det, | ||
float | alpha, | ||
float | beta | ||
) | const [inline] |
Definition at line 101 of file PixelCPEBase.h.
References alpha, alpha_, beta, beta_, cotalpha_, cotbeta_, asciidump::le, localError(), localPosition(), nRecHitsTotal_, Pi, setTheDet(), and funct::tan().
{ nRecHitsTotal_++ ; alpha_ = alpha; beta_ = beta; double HalfPi = 0.5*TMath::Pi(); cotalpha_ = tan(HalfPi - alpha_); cotbeta_ = tan(HalfPi - beta_ ); setTheDet( det, cl ); // localPosition( cl, det ) must be called before localError( cl, det ) !!! LocalPoint lp = localPosition( cl, det ); LocalError le = localError( cl, det ); return std::make_pair( lp, le ); }
LocalPoint PixelCPEBase::localPosition | ( | const SiPixelCluster & | cl, |
const GeomDetUnit & | det | ||
) | const [virtual] |
Reimplemented in PixelCPEGeneric, and PixelCPETemplateReco.
Definition at line 281 of file PixelCPEBase.cc.
References setTheDet(), theLShiftX, theLShiftY, thePitchX, thePitchY, xpos(), and ypos().
Referenced by localParameters(), measurementError(), and measurementPosition().
{ setTheDet( det, cluster ); float lpx = xpos(cluster); float lpy = ypos(cluster); float lxshift = theLShiftX * thePitchX; // shift in cm float lyshift = theLShiftY * thePitchY; LocalPoint cdfsfs(lpx-lxshift, lpy-lyshift); return cdfsfs; }
float PixelCPEBase::lorentzShiftX | ( | ) | const [protected] |
Definition at line 458 of file PixelCPEBase.cc.
References dir, getDrift(), thePitchX, theThickness, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by setTheDet().
{ LocalVector dir = getDrift(); // max shift in cm float xdrift = dir.x()/dir.z() * theThickness; // express the shift in units of pitch, // divide by 2 to get the average correction float lshift = xdrift / (thePitchX*2.); return lshift; }
float PixelCPEBase::lorentzShiftY | ( | ) | const [protected] |
Definition at line 473 of file PixelCPEBase.cc.
References dir, getDrift(), thePitchY, theThickness, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by setTheDet().
{ LocalVector dir = getDrift(); float ydrift = dir.y()/dir.z() * theThickness; float lshift = ydrift / (thePitchY * 2.f); return lshift; }
MeasurementError PixelCPEBase::measurementError | ( | const SiPixelCluster & | cluster, |
const GeomDetUnit & | det | ||
) | const [protected] |
Definition at line 318 of file PixelCPEBase.cc.
References LocalTrajectoryParameters::dxdz(), LocalTrajectoryParameters::dydz(), asciidump::le, loc_traj_param_, localError(), localPosition(), Topology::measurementError(), theTopol, and with_track_angle.
{ LocalPoint lp( localPosition(cluster, det) ); LocalError le( localError( cluster, det) ); // ggiurgiu@jhu.edu 12/09/2010 : trk angles needed for bow/kink correction if ( with_track_angle ) return theTopol->measurementError( lp, le, Topology::LocalTrackAngles( loc_traj_param_.dxdz(), loc_traj_param_.dydz() ) ); else return theTopol->measurementError( lp, le ); }
MeasurementPoint PixelCPEBase::measurementPosition | ( | const SiPixelCluster & | cluster, |
const GeomDetUnit & | det | ||
) | const [protected] |
Definition at line 297 of file PixelCPEBase.cc.
References LocalTrajectoryParameters::dxdz(), LocalTrajectoryParameters::dydz(), loc_traj_param_, localPosition(), Topology::measurementPosition(), theTopol, and with_track_angle.
{ LocalPoint lp = localPosition(cluster,det); // ggiurgiu@jhu.edu 12/09/2010 : trk angles needed for bow/kink correction if ( with_track_angle ) return theTopol->measurementPosition( lp, Topology::LocalTrackAngles( loc_traj_param_.dxdz(), loc_traj_param_.dydz() ) ); else return theTopol->measurementPosition( lp ); }
PixelCPEBase::Param const & PixelCPEBase::param | ( | ) | const [protected] |
Definition at line 442 of file PixelCPEBase.cc.
References PixelCPEBase::Param::bz, PixelCPEBase::Param::drift, driftDirection(), GeomDet::geographicalId(), MagneticField::inTesla(), m_Params, magfield_, AlCaHLTBitMon_ParallelJobs::p, GloballyPositioned< T >::position(), DetId::rawId(), GeomDet::surface(), theDet, GloballyPositioned< T >::toLocal(), unlikely, and PV3DBase< T, PVType, FrameType >::z().
Referenced by setTheDet().
float PixelCPEBase::probabilityQ | ( | ) | const [inline] |
float PixelCPEBase::probabilityX | ( | ) | const [inline] |
float PixelCPEBase::probabilityXY | ( | ) | const [inline] |
Definition at line 141 of file PixelCPEBase.h.
References create_public_lumi_plots::log, probabilityX_, and probabilityY_.
Referenced by rawQualityWord().
{ if ( probabilityX_ !=0 && probabilityY_ !=0 ) { return probabilityX_ * probabilityY_ * (1.f - std::log(probabilityX_ * probabilityY_) ) ; } else return 0; }
float PixelCPEBase::probabilityY | ( | ) | const [inline] |
float PixelCPEBase::qBin | ( | ) | const [inline] |
SiPixelRecHitQuality::QualWordType PixelCPEBase::rawQualityWord | ( | ) | const [virtual] |
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.
Reimplemented from PixelClusterParameterEstimator.
Definition at line 572 of file PixelCPEBase.cc.
References hasBadPixels_, hasFilledProb_, isOnEdge_, probabilityQ_, probabilityXY(), qBin_, spansTwoROCs_, and SiPixelRecHitQuality::thePacking.
Referenced by cms::SiPixelRecHitConverter::run().
{ SiPixelRecHitQuality::QualWordType qualWord(0); SiPixelRecHitQuality::thePacking.setProbabilityXY ( probabilityXY() , qualWord ); SiPixelRecHitQuality::thePacking.setProbabilityQ ( probabilityQ_ , qualWord ); SiPixelRecHitQuality::thePacking.setQBin ( (int)qBin_, qualWord ); SiPixelRecHitQuality::thePacking.setIsOnEdge ( isOnEdge_, qualWord ); SiPixelRecHitQuality::thePacking.setHasBadPixels ( hasBadPixels_, qualWord ); SiPixelRecHitQuality::thePacking.setSpansTwoROCs ( spansTwoROCs_, qualWord ); SiPixelRecHitQuality::thePacking.setHasFilledProb ( hasFilledProb_, qualWord ); return qualWord; }
void PixelCPEBase::setMagField | ( | const MagneticField * | mag | ) | const [inline] |
void PixelCPEBase::setTheDet | ( | const GeomDetUnit & | det, |
const SiPixelCluster & | cluster | ||
) | const [protected] |
Definition at line 89 of file PixelCPEBase.cc.
References Surface::bounds(), driftDirection_, Exception, hasBadPixels_, i, isFlipped(), isOnEdge_, LogDebug, lorentzShiftX(), lorentzShiftY(), SiPixelCluster::maxPixelCol(), SiPixelCluster::maxPixelRow(), SiPixelCluster::minPixelCol(), SiPixelCluster::minPixelRow(), param(), SiPixelCluster::pixelADC(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, GloballyPositioned< T >::position(), spansTwoROCs_, PixelGeomDetUnit::specificTopology(), GeomDetType::subDetector(), GeomDet::surface(), theDet, theDetR, theDetZ, theLShiftX, theLShiftY, theNumOfCol, theNumOfRow, theParam, thePart, thePitchX, thePitchY, theRecTopol, theSign, theThickness, theTopol, theVerboseLevel, Bounds::thickness(), PixelGeomDetUnit::type(), and unlikely.
Referenced by PixelCPEGeneric::localError(), PixelCPETemplateReco::localError(), localParameters(), localPosition(), PixelCPEGeneric::localPosition(), and PixelCPETemplateReco::localPosition().
{ if ( theDet == &det ) return; // we have already seen this det unit //--- This is a new det unit, so cache it theDet = dynamic_cast<const PixelGeomDetUnit*>( &det ); if ( !theDet ) { throw cms::Exception(" PixelCPEBase::setTheDet : ") << " Wrong pointer to PixelGeomDetUnit object !!!"; } //--- theDet->type() returns a GeomDetType, which implements subDetector() thePart = theDet->type().subDetector(); switch ( thePart ) { case GeomDetEnumerators::PixelBarrel: // A barrel! A barrel! break; case GeomDetEnumerators::PixelEndcap: // A forward! A forward! break; default: throw cms::Exception("PixelCPEBase::setTheDet :") << "PixelCPEBase: A non-pixel detector type in here?" ; } //--- The location in of this DetUnit in a cyllindrical coord system (R,Z) //--- The call goes via BoundSurface, returned by theDet->surface(), but //--- position() is implemented in GloballyPositioned<> template //--- ( BoundSurface : Surface : GloballyPositioned<float> ) theDetR = theDet->surface().position().perp(); theDetZ = theDet->surface().position().z(); //--- Define parameters for chargewidth calculation //--- bounds() is implemented in BoundSurface itself. theThickness = theDet->surface().bounds().thickness(); //--- Cache the topology. // ggiurgiu@jhu.edu 12/09/2010 : no longer need to dynamyc cast to RectangularPixelTopology //theTopol //= dynamic_cast<const RectangularPixelTopology*>( & (theDet->specificTopology()) ); auto topol = &(theDet->specificTopology()); if unlikely(topol!=theTopol) { // there is ONE topology!) theTopol=topol; auto const proxyT = dynamic_cast<const ProxyPixelTopology*>(theTopol); if (proxyT) theRecTopol = dynamic_cast<const RectangularPixelTopology*>(&(proxyT->specificTopology())); else theRecTopol = dynamic_cast<const RectangularPixelTopology*>(theTopol); assert(theRecTopol); //---- The geometrical description of one module/plaquette theNumOfRow = theRecTopol->nrows(); // rows in x theNumOfCol = theRecTopol->ncolumns(); // cols in y std::pair<float,float> pitchxy = theRecTopol->pitch(); thePitchX = pitchxy.first; // pitch along x thePitchY = pitchxy.second; // pitch along y } theSign = isFlipped() ? -1 : 1; // will cache if not yest there (need some of the above) theParam = ¶m(); // this "has wrong sign..." driftDirection_ = (*theParam).drift; //--- The Lorentz shift. theLShiftX = lorentzShiftX(); theLShiftY = lorentzShiftY(); // testing if(thePart == GeomDetEnumerators::PixelBarrel) { //cout<<" lorentz shift "<<theLShiftX<<" "<<theLShiftY<<endl; theLShiftY=0.; } //--- Geometric Quality Information int minInX,minInY,maxInX,maxInY=0; minInX = cluster.minPixelRow(); minInY = cluster.minPixelCol(); maxInX = cluster.maxPixelRow(); maxInY = cluster.maxPixelCol(); if(theRecTopol->isItEdgePixelInX(minInX) || theRecTopol->isItEdgePixelInX(maxInX) || theRecTopol->isItEdgePixelInY(minInY) || theRecTopol->isItEdgePixelInY(maxInY) ) { isOnEdge_ = true; } else isOnEdge_ = false; // Bad Pixels have their charge set to 0 in the clusterizer hasBadPixels_ = false; for(unsigned int i=0; i<cluster.pixelADC().size(); ++i) { if(cluster.pixelADC()[i] == 0) hasBadPixels_ = true; } if(theRecTopol->containsBigPixelInX(minInX,maxInX) || theRecTopol->containsBigPixelInY(minInY,maxInY) ) { spansTwoROCs_ = true; } else spansTwoROCs_ = false; if (theVerboseLevel > 1) { LogDebug("PixelCPEBase") << "***** PIXEL LAYOUT *****" << " thePart = " << thePart << " theThickness = " << theThickness << " thePitchX = " << thePitchX << " thePitchY = " << thePitchY // << " theOffsetX = " << theOffsetX // << " theOffsetY = " << theOffsetY << " theLShiftX = " << theLShiftX; } }
bool PixelCPEBase::spansTwoRocks | ( | ) | const [inline] |
virtual float PixelCPEBase::xpos | ( | const SiPixelCluster & | ) | const [protected, pure virtual] |
Implemented in PixelCPEGeneric, and PixelCPETemplateReco.
Referenced by localPosition().
virtual float PixelCPEBase::ypos | ( | const SiPixelCluster & | ) | const [protected, pure virtual] |
Implemented in PixelCPEGeneric, and PixelCPETemplateReco.
Referenced by localPosition().
bool PixelCPEBase::alpha2Order [protected] |
Definition at line 271 of file PixelCPEBase.h.
Referenced by driftDirection(), and PixelCPEBase().
float PixelCPEBase::alpha_ [mutable, protected] |
Definition at line 210 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), PixelCPEGeneric::localError(), and localParameters().
float PixelCPEBase::beta_ [mutable, protected] |
Definition at line 211 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), PixelCPEGeneric::localError(), and localParameters().
unsigned int PixelCPEBase::clusterProbComputationFlag_ [protected] |
Reimplemented from PixelClusterParameterEstimator.
Definition at line 244 of file PixelCPEBase.h.
Referenced by clusterProbComputationFlag(), and PixelCPEBase().
float PixelCPEBase::cotalpha_ [mutable, protected] |
Definition at line 214 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), localParameters(), PixelCPEGeneric::localPosition(), and PixelCPETemplateReco::localPosition().
float PixelCPEBase::cotbeta_ [mutable, protected] |
Definition at line 215 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), localParameters(), PixelCPEGeneric::localPosition(), and PixelCPETemplateReco::localPosition().
LocalVector PixelCPEBase::driftDirection_ [mutable, protected] |
Definition at line 252 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), getDrift(), and setTheDet().
const SiPixelCPEGenericErrorParm* PixelCPEBase::genErrorParm_ [mutable, protected] |
Definition at line 267 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::localError(), and PixelCPEBase().
bool PixelCPEBase::hasBadPixels_ [mutable, protected] |
Definition at line 234 of file PixelCPEBase.h.
Referenced by hasBadPixels(), rawQualityWord(), and setTheDet().
bool PixelCPEBase::hasFilledProb_ [mutable, protected] |
Definition at line 236 of file PixelCPEBase.h.
Referenced by hasFilledProb(), PixelCPETemplateReco::localPosition(), and rawQualityWord().
bool PixelCPEBase::isOnEdge_ [mutable, protected] |
Definition at line 233 of file PixelCPEBase.h.
Referenced by isOnEdge(), rawQualityWord(), and setTheDet().
LocalTrajectoryParameters PixelCPEBase::loc_traj_param_ [mutable, protected] |
Definition at line 278 of file PixelCPEBase.h.
Referenced by computeAnglesFromTrajectory(), measurementError(), and measurementPosition().
Topology::LocalTrackPred PixelCPEBase::loc_trk_pred_ [mutable, protected] |
Definition at line 276 of file PixelCPEBase.h.
Referenced by computeAnglesFromTrajectory(), PixelCPEGeneric::localPosition(), and PixelCPETemplateReco::localPosition().
const SiPixelLorentzAngle* PixelCPEBase::lorentzAngle_ [mutable, protected] |
Definition at line 265 of file PixelCPEBase.h.
Referenced by driftDirection(), and PixelCPEBase().
double PixelCPEBase::lorentzShiftInCmX_ [mutable, protected] |
Definition at line 255 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), and PixelCPEGeneric::localPosition().
double PixelCPEBase::lorentzShiftInCmY_ [mutable, protected] |
Definition at line 256 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), and PixelCPEGeneric::localPosition().
double PixelCPEBase::lorentzShiftX_ [mutable, protected] |
Definition at line 253 of file PixelCPEBase.h.
Referenced by computeLorentzShifts().
double PixelCPEBase::lorentzShiftY_ [mutable, protected] |
Definition at line 254 of file PixelCPEBase.h.
Referenced by computeLorentzShifts().
Params PixelCPEBase::m_Params [mutable, private] |
Definition at line 328 of file PixelCPEBase.h.
Referenced by param().
const MagneticField* PixelCPEBase::magfield_ [mutable, protected] |
Definition at line 263 of file PixelCPEBase.h.
Referenced by param(), PixelCPEBase(), and setMagField().
int PixelCPEBase::nRecHitsTotal_ [mutable, protected] |
Definition at line 222 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::generic_position_formula(), and localParameters().
int PixelCPEBase::nRecHitsUsedEdge_ [mutable, protected] |
Definition at line 223 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::generic_position_formula().
float PixelCPEBase::probabilityQ_ [mutable, protected] |
Definition at line 231 of file PixelCPEBase.h.
Referenced by PixelCPETemplateReco::localPosition(), probabilityQ(), and rawQualityWord().
float PixelCPEBase::probabilityX_ [mutable, protected] |
Definition at line 229 of file PixelCPEBase.h.
Referenced by PixelCPETemplateReco::localPosition(), probabilityX(), and probabilityXY().
float PixelCPEBase::probabilityY_ [mutable, protected] |
Definition at line 230 of file PixelCPEBase.h.
Referenced by PixelCPETemplateReco::localPosition(), probabilityXY(), and probabilityY().
float PixelCPEBase::qBin_ [mutable, protected] |
Definition at line 232 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::localError(), PixelCPEGeneric::localPosition(), PixelCPETemplateReco::localPosition(), qBin(), and rawQualityWord().
bool PixelCPEBase::spansTwoROCs_ [mutable, protected] |
Definition at line 235 of file PixelCPEBase.h.
Referenced by rawQualityWord(), setTheDet(), and spansTwoRocks().
const SiPixelTemplateDBObject* PixelCPEBase::templateDBobject_ [mutable, protected] |
Definition at line 269 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::localPosition(), PixelCPETemplateReco::localPosition(), PixelCPEBase(), PixelCPEGeneric::PixelCPEGeneric(), and PixelCPETemplateReco::PixelCPETemplateReco().
const PixelGeomDetUnit* PixelCPEBase::theDet [mutable, protected] |
Definition at line 185 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), driftDirection(), isFlipped(), PixelCPEGeneric::localPosition(), PixelCPETemplateReco::localPosition(), param(), and setTheDet().
float PixelCPEBase::theDetR [mutable, protected] |
Definition at line 204 of file PixelCPEBase.h.
Referenced by setTheDet().
float PixelCPEBase::theDetZ [mutable, protected] |
Definition at line 203 of file PixelCPEBase.h.
Referenced by setTheDet().
float PixelCPEBase::theLShiftX [mutable, protected] |
Definition at line 205 of file PixelCPEBase.h.
Referenced by localPosition(), and setTheDet().
float PixelCPEBase::theLShiftY [mutable, protected] |
Definition at line 206 of file PixelCPEBase.h.
Referenced by localPosition(), and setTheDet().
float PixelCPEBase::theNumOfCol [mutable, protected] |
Definition at line 202 of file PixelCPEBase.h.
Referenced by setTheDet().
float PixelCPEBase::theNumOfRow [mutable, protected] |
Definition at line 201 of file PixelCPEBase.h.
Referenced by setTheDet().
Param const* PixelCPEBase::theParam [mutable, protected] |
Definition at line 192 of file PixelCPEBase.h.
Referenced by setTheDet().
GeomDetType::SubDetector PixelCPEBase::thePart [mutable, protected] |
Definition at line 194 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::generic_position_formula(), PixelCPEGeneric::localError(), PixelCPETemplateReco::localError(), PixelCPETemplateReco::localPosition(), and setTheDet().
float PixelCPEBase::thePitchX [mutable, protected] |
Definition at line 197 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), PixelCPEGeneric::localError(), PixelCPETemplateReco::localError(), localPosition(), PixelCPEGeneric::localPosition(), lorentzShiftX(), and setTheDet().
float PixelCPEBase::thePitchY [mutable, protected] |
Definition at line 198 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), PixelCPEGeneric::localError(), PixelCPETemplateReco::localError(), localPosition(), PixelCPEGeneric::localPosition(), lorentzShiftY(), and setTheDet().
const RectangularPixelTopology* PixelCPEBase::theRecTopol [mutable, protected] |
Definition at line 190 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::localError(), PixelCPETemplateReco::localError(), PixelCPEGeneric::localPosition(), PixelCPETemplateReco::localPosition(), and setTheDet().
float PixelCPEBase::theSign [mutable, protected] |
Definition at line 207 of file PixelCPEBase.h.
Referenced by setTheDet().
float PixelCPEBase::theThickness [mutable, protected] |
Definition at line 196 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), PixelCPEGeneric::generic_position_formula(), lorentzShiftX(), lorentzShiftY(), and setTheDet().
const PixelTopology* PixelCPEBase::theTopol [mutable, protected] |
Definition at line 189 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), PixelCPEGeneric::localPosition(), PixelCPETemplateReco::localPosition(), measurementError(), measurementPosition(), and setTheDet().
int PixelCPEBase::theVerboseLevel [protected] |
Definition at line 261 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), driftDirection(), PixelCPEGeneric::generic_position_formula(), PixelCPEGeneric::localError(), PixelCPETemplateReco::localError(), PixelCPEGeneric::localPosition(), PixelCPEBase(), PixelCPEGeneric::PixelCPEGeneric(), and setTheDet().
float PixelCPEBase::trk_lp_x [mutable, protected] |
Definition at line 218 of file PixelCPEBase.h.
Referenced by computeAnglesFromTrajectory(), and PixelCPETemplateReco::localPosition().
float PixelCPEBase::trk_lp_y [mutable, protected] |
Definition at line 219 of file PixelCPEBase.h.
Referenced by computeAnglesFromTrajectory(), and PixelCPETemplateReco::localPosition().
bool PixelCPEBase::with_track_angle [mutable, protected] |
Definition at line 226 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), PixelCPEGeneric::localError(), PixelCPEGeneric::localPosition(), PixelCPETemplateReco::localPosition(), measurementError(), and measurementPosition().