#include <RecoLocalTracker/SiPixelRecHits/interface/PixelCPEBase.h>
Definition at line 43 of file PixelCPEBase.h.
typedef GloballyPositioned<double> PixelCPEBase::Frame [protected] |
Definition at line 122 of file PixelCPEBase.h.
typedef __gnu_cxx::hash_map< unsigned int, Param> PixelCPEBase::Params [private] |
Definition at line 279 of file PixelCPEBase.h.
PixelCPEBase::PixelCPEBase | ( | edm::ParameterSet const & | conf, | |
const MagneticField * | mag = 0 , |
|||
const SiPixelLorentzAngle * | lorentzAngle = 0 | |||
) |
Definition at line 42 of file PixelCPEBase.cc.
References alpha2Order, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), lorentzAngle_, magfield_, and theVerboseLevel.
00043 : theDet(0), nRecHitsTotal_(0), nRecHitsUsedEdge_(0), 00044 cotAlphaFromCluster_(-99999.0), cotBetaFromCluster_(-99999.0), 00045 probabilityX_(-99999.0), probabilityY_(-99999.0), qBin_(-99999.0) 00046 { 00047 //--- Lorentz angle tangent per Tesla 00048 // theTanLorentzAnglePerTesla = 00049 // conf.getParameter<double>("TanLorentzAnglePerTesla"); 00050 lorentzAngle_ = lorentzAngle; 00051 /* if(!lorentzAngle_) 00052 theTanLorentzAnglePerTesla = 00053 conf.getParameter<double>("TanLorentzAnglePerTesla"); 00054 */ 00055 00056 //--- Algorithm's verbosity 00057 theVerboseLevel = 00058 conf.getUntrackedParameter<int>("VerboseLevel",0); 00059 00060 //-- Magnetic Field 00061 magfield_ = mag; 00062 00063 //-- Switch on/off E.B 00064 alpha2Order = conf.getParameter<bool>("Alpha2Order"); 00065 }
void PixelCPEBase::computeAnglesFromDetPosition | ( | const SiPixelCluster & | cl, | |
const GeomDetUnit & | det | |||
) | const [protected] |
Definition at line 168 of file PixelCPEBase.cc.
References alpha_, beta_, cotalpha_, cotbeta_, lat::endl(), Exception, RectangularPixelTopology::localPosition(), lp, funct::sqrt(), GeomDet::surface(), theDet, theTopol, Surface::toGlobal(), SiPixelCluster::x(), PV3DBase< T, PVType, FrameType >::x(), SiPixelCluster::y(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by localParameters().
00170 { 00171 //--- This is a new det unit, so cache it 00172 theDet = dynamic_cast<const PixelGeomDetUnit*>( &det ); 00173 if ( ! theDet ) 00174 { 00175 throw cms::Exception("PixelCPEBase::computeAngleFromDetPosition") 00176 << " Wrong pointer to pixel detector !!!" << endl; 00177 00178 } 00179 00180 // get cluster center of gravity (of charge) 00181 float xcenter = cl.x(); 00182 float ycenter = cl.y(); 00183 00184 // get the cluster position in local coordinates (cm) 00185 LocalPoint lp = theTopol->localPosition( MeasurementPoint(xcenter, ycenter) ); 00186 //float lp_mod = sqrt( lp.x()*lp.x() + lp.y()*lp.y() + lp.z()*lp.z() ); 00187 00188 // get the cluster position in global coordinates (cm) 00189 GlobalPoint gp = theDet->surface().toGlobal( lp ); 00190 float gp_mod = sqrt( gp.x()*gp.x() + gp.y()*gp.y() + gp.z()*gp.z() ); 00191 00192 // normalize 00193 float gpx = gp.x()/gp_mod; 00194 float gpy = gp.y()/gp_mod; 00195 float gpz = gp.z()/gp_mod; 00196 00197 // make a global vector out of the global point; this vector will point from the 00198 // origin of the detector to the cluster 00199 GlobalVector gv(gpx, gpy, gpz); 00200 00201 // make local unit vector along local X axis 00202 const Local3DVector lvx(1.0, 0.0, 0.0); 00203 00204 // get the unit X vector in global coordinates/ 00205 GlobalVector gvx = theDet->surface().toGlobal( lvx ); 00206 00207 // make local unit vector along local Y axis 00208 const Local3DVector lvy(0.0, 1.0, 0.0); 00209 00210 // get the unit Y vector in global coordinates 00211 GlobalVector gvy = theDet->surface().toGlobal( lvy ); 00212 00213 // make local unit vector along local Z axis 00214 const Local3DVector lvz(0.0, 0.0, 1.0); 00215 00216 // get the unit Z vector in global coordinates 00217 GlobalVector gvz = theDet->surface().toGlobal( lvz ); 00218 00219 // calculate the components of gv (the unit vector pointing to the cluster) 00220 // in the local coordinate system given by the basis {gvx, gvy, gvz} 00221 // note that both gv and the basis {gvx, gvy, gvz} are given in global coordinates 00222 float gv_dot_gvx = gv.x()*gvx.x() + gv.y()*gvx.y() + gv.z()*gvx.z(); 00223 float gv_dot_gvy = gv.x()*gvy.x() + gv.y()*gvy.y() + gv.z()*gvy.z(); 00224 float gv_dot_gvz = gv.x()*gvz.x() + gv.y()*gvz.y() + gv.z()*gvz.z(); 00225 00226 // calculate angles 00227 alpha_ = atan2( gv_dot_gvz, gv_dot_gvx ); 00228 beta_ = atan2( gv_dot_gvz, gv_dot_gvy ); 00229 00230 // calculate cotalpha and cotbeta 00231 // cotalpha_ = 1.0/tan(alpha_); 00232 // cotbeta_ = 1.0/tan(beta_ ); 00233 // or like this 00234 cotalpha_ = gv_dot_gvx / gv_dot_gvz; 00235 cotbeta_ = gv_dot_gvy / gv_dot_gvz; 00236 00237 }
void PixelCPEBase::computeAnglesFromTrajectory | ( | const SiPixelCluster & | cl, | |
const GeomDetUnit & | det, | |||
const LocalTrajectoryParameters & | ltp | |||
) | const [protected] |
Definition at line 244 of file PixelCPEBase.cc.
References alpha_, beta_, cotalpha_, cotbeta_, isFlipped(), PV3DBase< T, PVType, FrameType >::mag(), LocalTrajectoryParameters::momentum(), PI, LocalTrajectoryParameters::position(), funct::sqrt(), trk_lp_x, trk_lp_y, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by localParameters().
00247 { 00248 LocalVector localDir = ltp.momentum()/ltp.momentum().mag(); 00249 00250 // &&& Or, maybe we need to move to the local frame ??? 00251 // LocalVector localDir( theDet->toLocal(theState.globalDirection())); 00252 //thePart = theDet->type().part(); 00253 00254 float locx = localDir.x(); 00255 float locy = localDir.y(); 00256 float locz = localDir.z(); 00257 00258 //cout << "locx = " << locx << endl; 00259 //cout << "locy = " << locy << endl; 00260 //cout << "locz = " << locz << endl; 00261 00262 alpha_ = acos(locx/sqrt(locx*locx+locz*locz)); 00263 if ( isFlipped() ) // &&& check for FPIX !!! 00264 alpha_ = PI - alpha_ ; 00265 00266 beta_ = acos(locy/sqrt(locy*locy+locz*locz)); 00267 00268 // &&& In the above, why not use atan2() ? 00269 00270 cotalpha_ = localDir.x()/localDir.z(); 00271 cotbeta_ = localDir.y()/localDir.z(); 00272 00273 LocalPoint trk_lp = ltp.position(); 00274 trk_lp_x = trk_lp.x(); 00275 trk_lp_y = trk_lp.y(); 00276 00277 }
void PixelCPEBase::computeLorentzShifts | ( | ) | const [protected] |
Definition at line 523 of file PixelCPEBase.cc.
References alpha2Order, driftDirection_, Exception, PixelGeomDetUnit::geographicalId(), SiPixelLorentzAngle::getLorentzAngle(), MagneticField::inTesla(), LogDebug, lorentzAngle_, lorentzShiftInCmX_, lorentzShiftInCmY_, lorentzShiftX_, lorentzShiftY_, magfield_, GloballyPositioned< T >::position(), DetId::rawId(), GloballyPositioned< T >::rotation(), scale, 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().
00524 { 00525 Frame detFrame(theDet->surface().position(), theDet->surface().rotation()); 00526 GlobalVector global_Bfield = magfield_->inTesla( theDet->surface().position() ); 00527 LocalVector Bfield = detFrame.toLocal(global_Bfield); 00528 if(lorentzAngle_ == 0){ 00529 throw cms::Exception("invalidPointer") << "[PixelCPEBase::computeLorentzShifts] zero pointer to lorentz angle record "; 00530 } 00531 double langle = lorentzAngle_->getLorentzAngle(theDet->geographicalId().rawId()); 00532 double alpha2; 00533 if ( alpha2Order) { 00534 alpha2 = langle * langle; 00535 } 00536 else { 00537 alpha2 = 0.0; 00538 } 00539 00540 // ********************************************************************** 00541 // Our convention is the following: 00542 // +x is defined by the direction of the Lorentz drift! 00543 // +z is defined by the direction of E field (so electrons always go into -z!) 00544 // +y is defined by +x and +z, and it turns out to be always opposite to the +B field. 00545 // ********************************************************************** 00546 00547 // Note correct signs for dir_x and dir_y! 00548 double dir_x = -( langle * Bfield.y() + alpha2* Bfield.z()* Bfield.x() ); 00549 double dir_y = ( langle * Bfield.x() - alpha2* Bfield.z()* Bfield.y() ); 00550 double dir_z = -( 1 + alpha2* Bfield.z()* Bfield.z() ); 00551 00552 // &&& Why do we need to scale??? 00553 //double scale = (1 + alpha2* Bfield.z()*Bfield.z() ); 00554 double scale = fabs( dir_z ); // same as 1 + alpha2*Bfield.z()*Bfield.z() 00555 driftDirection_ = LocalVector(dir_x/scale, dir_y/scale, dir_z/scale ); // last is -1 ! 00556 00557 // Max shift (at the other side of the sensor) in cm 00558 lorentzShiftInCmX_ = driftDirection_.x()/driftDirection_.z() * theThickness; // &&& redundant 00559 // Express the shift in units of pitch, 00560 lorentzShiftX_ = lorentzShiftInCmX_ / thePitchX ; 00561 00562 // Max shift (at the other side of the sensor) in cm 00563 lorentzShiftInCmY_ = driftDirection_.y()/driftDirection_.z() * theThickness; // &&& redundant 00564 // Express the shift in units of pitch, 00565 lorentzShiftY_ = lorentzShiftInCmY_ / thePitchY; 00566 00567 00568 if ( theVerboseLevel > 9 ) { 00569 LogDebug("PixelCPEBase") << " The drift direction in local coordinate is " 00570 << driftDirection_ ; 00571 00572 // cout << "Lorentz Drift (in cm) along X = " << lorentzShiftInCmX_ << endl; 00573 // cout << "Lorentz Drift (in cm) along Y = " << lorentzShiftInCmY_ << endl; 00574 } 00575 }
float PixelCPEBase::cotAlphaFromCluster | ( | ) | const [inline] |
Definition at line 112 of file PixelCPEBase.h.
References cotAlphaFromCluster_.
Referenced by cms::SiPixelRecHitConverter::run().
00112 { return cotAlphaFromCluster_; }
float PixelCPEBase::cotBetaFromCluster | ( | ) | const [inline] |
Definition at line 113 of file PixelCPEBase.h.
References cotBetaFromCluster_.
Referenced by cms::SiPixelRecHitConverter::run().
00113 { return cotBetaFromCluster_; }
LocalVector PixelCPEBase::driftDirection | ( | GlobalVector | bfield | ) | const [protected] |
Definition at line 492 of file PixelCPEBase.cc.
References alpha2Order, Exception, PixelGeomDetUnit::geographicalId(), SiPixelLorentzAngle::getLorentzAngle(), LogDebug, lorentzAngle_, GloballyPositioned< T >::position(), DetId::rawId(), GloballyPositioned< T >::rotation(), scale, GeomDet::surface(), theDet, and theVerboseLevel.
Referenced by lorentzShiftX(), and lorentzShiftY().
00492 { 00493 00494 Frame detFrame(theDet->surface().position(), theDet->surface().rotation()); 00495 LocalVector Bfield = detFrame.toLocal(bfield); 00496 if(lorentzAngle_ == 0){ 00497 throw cms::Exception("invalidPointer") << "[PixelCPEBase::driftDirection] zero pointer to lorentz angle record "; 00498 } 00499 double langle = lorentzAngle_->getLorentzAngle(theDet->geographicalId().rawId()); 00500 float alpha2; 00501 if (alpha2Order) { 00502 alpha2 = langle*langle; 00503 } else { 00504 alpha2 = 0.0; 00505 } 00506 // &&& dir_x should have a "-" and dir_y a "+" 00507 float dir_x = ( langle * Bfield.y() + alpha2* Bfield.z()* Bfield.x() ); 00508 float dir_y = -( langle * Bfield.x() - alpha2* Bfield.z()* Bfield.y() ); 00509 float dir_z = -( 1 + alpha2* Bfield.z()*Bfield.z() ); 00510 float scale = (1 + alpha2* Bfield.z()*Bfield.z() ); 00511 LocalVector theDriftDirection = LocalVector(dir_x/scale, dir_y/scale, dir_z/scale ); 00512 if ( theVerboseLevel > 9 ) 00513 LogDebug("PixelCPEBase") << " The drift direction in local coordinate is " 00514 << theDriftDirection ; 00515 00516 return theDriftDirection; 00517 }
LocalVector PixelCPEBase::driftDirectionCorrect | ( | GlobalVector | bfield | ) | const [protected] |
bool PixelCPEBase::isFlipped | ( | ) | const [protected] |
Definition at line 343 of file PixelCPEBase.cc.
References PV3DBase< T, PVType, FrameType >::perp(), GeomDet::surface(), theDet, tmp1, tmp2, and Surface::toGlobal().
Referenced by computeAnglesFromTrajectory(), and setTheDet().
00344 { 00345 // Check the relative position of the local +/- z in global coordinates. 00346 float tmp1 = theDet->surface().toGlobal(Local3DPoint(0.,0.,0.)).perp(); 00347 float tmp2 = theDet->surface().toGlobal(Local3DPoint(0.,0.,1.)).perp(); 00348 //cout << " 1: " << tmp1 << " 2: " << tmp2 << endl; 00349 if ( tmp2<tmp1 ) return true; 00350 else return false; 00351 }
virtual LocalError PixelCPEBase::localError | ( | const SiPixelCluster & | cl, | |
const GeomDetUnit & | det | |||
) | const [pure virtual] |
Implemented in PixelCPEGeneric, PixelCPEInitial, PixelCPEParmError, and PixelCPETemplateReco.
Referenced by localParameters(), and measurementError().
LocalValues PixelCPEBase::localParameters | ( | const SiPixelCluster & | cl, | |
const GeomDetUnit & | det, | |||
float | alpha, | |||
float | beta | |||
) | const [inline] |
Definition at line 77 of file PixelCPEBase.h.
References alpha_, beta_, cotalpha_, cotbeta_, localError(), localPosition(), nRecHitsTotal_, Pi, setTheDet(), and funct::tan().
00080 { 00081 nRecHitsTotal_++ ; 00082 alpha_ = alpha; 00083 beta_ = beta; 00084 double HalfPi = 0.5*TMath::Pi(); 00085 cotalpha_ = tan(HalfPi - alpha_); 00086 cotbeta_ = tan(HalfPi - beta_ ); 00087 setTheDet( det ); 00088 return std::make_pair( localPosition(cl,det), localError(cl,det) ); 00089 }
LocalValues PixelCPEBase::localParameters | ( | const SiPixelCluster & | cl, | |
const GeomDetUnit & | det, | |||
const LocalTrajectoryParameters & | ltp | |||
) | const [inline, virtual] |
Reimplemented from ClusterParameterEstimator< SiPixelCluster >.
Definition at line 64 of file PixelCPEBase.h.
References computeAnglesFromTrajectory(), localError(), localPosition(), nRecHitsTotal_, and setTheDet().
00067 { 00068 nRecHitsTotal_++ ; 00069 setTheDet( det ); 00070 computeAnglesFromTrajectory(cl, det, ltp); 00071 return std::make_pair( localPosition(cl,det), localError(cl,det) ); 00072 }
LocalValues PixelCPEBase::localParameters | ( | const SiPixelCluster & | cl, | |
const GeomDetUnit & | det | |||
) | const [inline, virtual] |
Implements ClusterParameterEstimator< SiPixelCluster >.
Definition at line 52 of file PixelCPEBase.h.
References computeAnglesFromDetPosition(), localError(), localPosition(), nRecHitsTotal_, and setTheDet().
00054 { 00055 nRecHitsTotal_++ ; 00056 setTheDet( det ); 00057 computeAnglesFromDetPosition(cl, det); 00058 return std::make_pair( localPosition(cl,det), localError(cl,det) ); 00059 }
LocalPoint PixelCPEBase::localPosition | ( | const SiPixelCluster & | cl, | |
const GeomDetUnit & | det | |||
) | const [virtual] |
Reimplemented in PixelCPEGeneric, and PixelCPETemplateReco.
Definition at line 295 of file PixelCPEBase.cc.
References setTheDet(), theLShiftX, theLShiftY, thePitchX, thePitchY, xpos(), and ypos().
Referenced by localParameters(), measurementError(), and measurementPosition().
00296 { 00297 setTheDet( det ); 00298 00299 float lpx = xpos(cluster); 00300 float lpy = ypos(cluster); 00301 float lxshift = theLShiftX * thePitchX; // shift in cm 00302 float lyshift = theLShiftY * thePitchY; 00303 LocalPoint cdfsfs(lpx-lxshift, lpy-lyshift); 00304 return cdfsfs; 00305 }
float PixelCPEBase::lorentzShiftX | ( | ) | const [protected, virtual] |
Definition at line 358 of file PixelCPEBase.cc.
References dir, PixelCPEBase::Param::drift, driftDirection(), PixelGeomDetUnit::geographicalId(), MagneticField::inTesla(), m_Params, magfield_, 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().
00359 { 00360 LocalVector dir; 00361 Param & p = const_cast<PixelCPEBase*>(this)->m_Params[ theDet->geographicalId().rawId() ]; 00362 if ( p.topology ) 00363 { 00364 //cout << "--------------- old ----------------------" << endl; 00365 //cout << "p.topology = " << p.topology << endl; 00366 dir = p.drift; 00367 //cout << "same direction: dir = " << dir << endl; 00368 } 00369 else 00370 { 00371 //cout << "--------------- new ----------------------" << endl; 00372 //cout << "p.topology = " << p.topology << endl; 00373 p.topology = (RectangularPixelTopology*)( & ( theDet->specificTopology() ) ); 00374 p.drift = driftDirection(magfield_->inTesla(theDet->surface().position()) ); 00375 dir = p.drift; 00376 //cout << "p.topology = " << p.topology << endl; 00377 //cout << "new direction: dir = " << dir << endl; 00378 00379 } 00380 //LocalVector dir = driftDirection(magfield_->inTesla(theDet->surface().position()) ); 00381 00382 // max shift in cm 00383 float xdrift = dir.x()/dir.z() * theThickness; 00384 // express the shift in units of pitch, 00385 // divide by 2 to get the average correction 00386 float lshift = xdrift / thePitchX / 2.; 00387 00388 //cout << "Lorentz Drift = " << lshift << endl; 00389 //cout << "X Drift = " << dir.x() << endl; 00390 //cout << "Z Drift = " << dir.z() << endl; 00391 00392 return lshift; 00393 00394 00395 }
float PixelCPEBase::lorentzShiftY | ( | ) | const [protected, virtual] |
Definition at line 397 of file PixelCPEBase.cc.
References dir, PixelCPEBase::Param::drift, driftDirection(), PixelGeomDetUnit::geographicalId(), MagneticField::inTesla(), m_Params, magfield_, 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().
00398 { 00399 00400 LocalVector dir; 00401 00402 Param & p = const_cast<PixelCPEBase*>(this)->m_Params[ theDet->geographicalId().rawId() ]; 00403 if ( p.topology ) 00404 { 00405 //cout << "--------------- old y ----------------------" << endl; 00406 //cout << "p.topology y = " << p.topology << endl; 00407 dir = p.drift; 00408 //cout << "same direction y: dir = " << dir << endl; 00409 } 00410 else 00411 { 00412 //cout << "--------------- new y ----------------------" << endl; 00413 //cout << "p.topology y = " << p.topology << endl; 00414 p.topology = (RectangularPixelTopology*)( & ( theDet->specificTopology() ) ); 00415 p.drift = driftDirection(magfield_->inTesla(theDet->surface().position()) ); 00416 dir = p.drift; 00417 //cout << "p.topology y = " << p.topology << endl; 00418 //cout << "new direction y: dir = " << dir << endl; 00419 00420 } 00421 00422 //LocalVector dir = driftDirection(magfield_->inTesla(theDet->surface().position()) ); 00423 00424 float ydrift = dir.y()/dir.z() * theThickness; 00425 float lshift = ydrift / thePitchY / 2.; 00426 return lshift; 00427 00428 00429 }
MeasurementError PixelCPEBase::measurementError | ( | const SiPixelCluster & | cluster, | |
const GeomDetUnit & | det | |||
) | const [protected] |
Definition at line 324 of file PixelCPEBase.cc.
References asciidump::le, localError(), localPosition(), lp, RectangularPixelTopology::measurementError(), and theTopol.
00325 { 00326 LocalPoint lp( localPosition(cluster, det) ); 00327 LocalError le( localError( cluster, det) ); 00328 return theTopol->measurementError( lp, le ); 00329 }
MeasurementPoint PixelCPEBase::measurementPosition | ( | const SiPixelCluster & | cluster, | |
const GeomDetUnit & | det | |||
) | const [protected] |
Reimplemented in PixelCPEGeneric, and PixelCPETemplateReco.
Definition at line 311 of file PixelCPEBase.cc.
References localPosition(), lp, RectangularPixelTopology::measurementPosition(), and theTopol.
00312 { 00313 00314 LocalPoint lp = localPosition(cluster,det); 00315 return theTopol->measurementPosition(lp); 00316 }
float PixelCPEBase::probabilityX | ( | ) | const [inline] |
Definition at line 114 of file PixelCPEBase.h.
References probabilityX_.
Referenced by cms::SiPixelRecHitConverter::run().
00114 { return probabilityX_; }
float PixelCPEBase::probabilityY | ( | ) | const [inline] |
Definition at line 115 of file PixelCPEBase.h.
References probabilityY_.
Referenced by cms::SiPixelRecHitConverter::run().
00115 { return probabilityY_; }
float PixelCPEBase::qBin | ( | ) | const [inline] |
Definition at line 116 of file PixelCPEBase.h.
References qBin_.
Referenced by cms::SiPixelRecHitConverter::run().
00116 { return qBin_ ; }
void PixelCPEBase::setDBAccess | ( | const SiPixelCPEParmErrors * | parmErrors | ) | const [inline] |
Definition at line 100 of file PixelCPEBase.h.
References parmErrors_.
00100 { parmErrors_ = parmErrors; }
void PixelCPEBase::setMagField | ( | const MagneticField * | mag | ) | const [inline] |
void PixelCPEBase::setTheDet | ( | const GeomDetUnit & | det | ) | const [protected] |
Definition at line 71 of file PixelCPEBase.cc.
References BoundSurface::bounds(), Exception, isFlipped(), LogDebug, lorentzShiftX(), lorentzShiftY(), RectangularPixelTopology::measurementPosition(), RectangularPixelTopology::ncolumns(), RectangularPixelTopology::nrows(), offset, RectangularPixelTopology::pitch(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, GloballyPositioned< T >::position(), PixelGeomDetUnit::specificTopology(), GeomDetType::subDetector(), GeomDet::surface(), theDet, theDetR, theDetZ, theLShiftX, theLShiftY, theNumOfCol, theNumOfRow, theOffsetX, theOffsetY, thePart, thePitchX, thePitchY, theSign, theThickness, theTopol, theVerboseLevel, Bounds::thickness(), PixelGeomDetUnit::type(), PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().
Referenced by PixelCPEParmError::localError(), PixelCPEGeneric::localError(), PixelCPEInitial::localError(), PixelCPETemplateReco::localError(), localParameters(), localPosition(), PixelCPEGeneric::localPosition(), and PixelCPETemplateReco::localPosition().
00072 { 00073 if ( theDet == &det ) 00074 return; // we have already seen this det unit 00075 00076 //--- This is a new det unit, so cache it 00077 theDet = dynamic_cast<const PixelGeomDetUnit*>( &det ); 00078 00079 if ( !theDet ) 00080 { 00081 // &&& Fatal error! TO DO: throw an exception! 00082 00083 throw cms::Exception(" PixelCPEBase::setTheDet : ") 00084 << " Wrong pointer to PixelGeomDetUnit object !!!"; 00085 } 00086 00087 //--- theDet->type() returns a GeomDetType, which implements subDetector() 00088 thePart = theDet->type().subDetector(); 00089 switch ( thePart ) 00090 { 00091 case GeomDetEnumerators::PixelBarrel: 00092 // A barrel! A barrel! 00093 break; 00094 case GeomDetEnumerators::PixelEndcap: 00095 // A forward! A forward! 00096 break; 00097 default: 00098 throw cms::Exception("PixelCPEBase::setTheDet :") 00099 << "PixelCPEBase: A non-pixel detector type in here?" ; 00100 } 00101 00102 //--- The location in of this DetUnit in a cyllindrical coord system (R,Z) 00103 //--- The call goes via BoundSurface, returned by theDet->surface(), but 00104 //--- position() is implemented in GloballyPositioned<> template 00105 //--- ( BoundSurface : Surface : GloballyPositioned<float> ) 00106 theDetR = theDet->surface().position().perp(); 00107 theDetZ = theDet->surface().position().z(); 00108 //--- Define parameters for chargewidth calculation 00109 00110 //--- bounds() is implemented in BoundSurface itself. 00111 theThickness = theDet->surface().bounds().thickness(); 00112 00113 //--- Cache the topology. 00114 theTopol 00115 = dynamic_cast<const RectangularPixelTopology*>( & (theDet->specificTopology()) ); 00116 00117 //---- The geometrical description of one module/plaquette 00118 theNumOfRow = theTopol->nrows(); // rows in x 00119 theNumOfCol = theTopol->ncolumns(); // cols in y 00120 std::pair<float,float> pitchxy = theTopol->pitch(); 00121 thePitchX = pitchxy.first; // pitch along x 00122 thePitchY = pitchxy.second; // pitch along y 00123 00124 //--- Find the offset 00125 MeasurementPoint offset = 00126 theTopol->measurementPosition( LocalPoint(0., 0.) ); 00127 theOffsetX = offset.x(); 00128 theOffsetY = offset.y(); 00129 00130 //--- Find if the E field is flipped: i.e. whether it points 00131 //--- from the beam, or towards the beam. (The voltages are 00132 //--- applied backwards on every other module in barrel and 00133 //--- blade in forward.) 00134 theSign = isFlipped() ? -1 : 1; 00135 00136 //--- The Lorentz shift. 00137 theLShiftX = lorentzShiftX(); 00138 00139 theLShiftY = lorentzShiftY(); 00140 00141 // testing 00142 if(thePart == GeomDetEnumerators::PixelBarrel) { 00143 //cout<<" lorentz shift "<<theLShiftX<<" "<<theLShiftY<<endl; 00144 theLShiftY=0.; 00145 } 00146 00147 if (theVerboseLevel > 1) 00148 { 00149 LogDebug("PixelCPEBase") << "***** PIXEL LAYOUT *****" 00150 << " thePart = " << thePart 00151 << " theThickness = " << theThickness 00152 << " thePitchX = " << thePitchX 00153 << " thePitchY = " << thePitchY 00154 << " theOffsetX = " << theOffsetX 00155 << " theOffsetY = " << theOffsetY 00156 << " theLShiftX = " << theLShiftX; 00157 } 00158 00159 }
void PixelCPEBase::xCharge | ( | const std::vector< SiPixelCluster::Pixel > & | , | |
const int & | , | |||
const int & | , | |||
float & | q1, | |||
float & | q2 | |||
) | const [protected] |
Referenced by PixelCPEInitial::xpos(), and PixelCPEParmError::xpos().
virtual float PixelCPEBase::xpos | ( | const SiPixelCluster & | ) | const [protected, pure virtual] |
Implemented in PixelCPEGeneric, PixelCPEInitial, PixelCPEParmError, and PixelCPETemplateReco.
Referenced by localPosition().
void PixelCPEBase::yCharge | ( | const std::vector< SiPixelCluster::Pixel > & | , | |
const int & | , | |||
const int & | , | |||
float & | q1, | |||
float & | q2 | |||
) | const [protected] |
Referenced by PixelCPEParmError::ypos(), and PixelCPEInitial::ypos().
virtual float PixelCPEBase::ypos | ( | const SiPixelCluster & | ) | const [protected, pure virtual] |
Implemented in PixelCPEGeneric, PixelCPEInitial, PixelCPEParmError, and PixelCPETemplateReco.
Referenced by localPosition().
bool PixelCPEBase::alpha2Order [protected] |
Definition at line 201 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthY(), computeLorentzShifts(), driftDirection(), and PixelCPEBase().
float PixelCPEBase::alpha_ [mutable, protected] |
Definition at line 146 of file PixelCPEBase.h.
Referenced by PixelCPEParmError::chargeWidthX(), computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), PixelCPEParmError::localError(), and localParameters().
float PixelCPEBase::beta_ [mutable, protected] |
Definition at line 147 of file PixelCPEBase.h.
Referenced by PixelCPEParmError::chargeWidthY(), computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), PixelCPEParmError::localError(), and localParameters().
float PixelCPEBase::cotalpha_ [mutable, protected] |
Definition at line 150 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), localParameters(), PixelCPEGeneric::localPosition(), and PixelCPETemplateReco::localPosition().
float PixelCPEBase::cotAlphaFromCluster_ [mutable, protected] |
Definition at line 166 of file PixelCPEBase.h.
Referenced by cotAlphaFromCluster(), and PixelCPEGeneric::localPosition().
float PixelCPEBase::cotbeta_ [mutable, protected] |
Definition at line 151 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), computeAnglesFromTrajectory(), localParameters(), PixelCPEGeneric::localPosition(), and PixelCPETemplateReco::localPosition().
float PixelCPEBase::cotBetaFromCluster_ [mutable, protected] |
Definition at line 167 of file PixelCPEBase.h.
Referenced by cotBetaFromCluster(), and PixelCPEGeneric::localPosition().
LocalVector PixelCPEBase::driftDirection_ [mutable, protected] |
const SiPixelLorentzAngle* PixelCPEBase::lorentzAngle_ [mutable, protected] |
Definition at line 199 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), driftDirection(), and PixelCPEBase().
double PixelCPEBase::lorentzShiftInCmX_ [mutable, protected] |
Definition at line 183 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), and PixelCPEGeneric::localPosition().
double PixelCPEBase::lorentzShiftInCmY_ [mutable, protected] |
Definition at line 184 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), and PixelCPEGeneric::localPosition().
double PixelCPEBase::lorentzShiftX_ [mutable, protected] |
double PixelCPEBase::lorentzShiftY_ [mutable, protected] |
Params PixelCPEBase::m_Params [private] |
const MagneticField* PixelCPEBase::magfield_ [mutable, protected] |
Definition at line 195 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), lorentzShiftX(), lorentzShiftY(), PixelCPEBase(), PixelCPETemplateReco::PixelCPETemplateReco(), and setMagField().
int PixelCPEBase::nRecHitsTotal_ [mutable, protected] |
Definition at line 187 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::generic_position_formula(), and localParameters().
int PixelCPEBase::nRecHitsUsedEdge_ [mutable, protected] |
Definition at line 188 of file PixelCPEBase.h.
Referenced by PixelCPEGeneric::generic_position_formula().
const SiPixelCPEParmErrors* PixelCPEBase::parmErrors_ [mutable, protected] |
float PixelCPEBase::probabilityX_ [mutable, protected] |
Definition at line 170 of file PixelCPEBase.h.
Referenced by PixelCPETemplateReco::localPosition(), and probabilityX().
float PixelCPEBase::probabilityY_ [mutable, protected] |
Definition at line 171 of file PixelCPEBase.h.
Referenced by PixelCPETemplateReco::localPosition(), and probabilityY().
float PixelCPEBase::qBin_ [mutable, protected] |
Definition at line 172 of file PixelCPEBase.h.
Referenced by PixelCPETemplateReco::localPosition(), and qBin().
const PixelGeomDetUnit* PixelCPEBase::theDet [mutable, protected] |
Definition at line 128 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), computeLorentzShifts(), driftDirection(), isFlipped(), lorentzShiftX(), lorentzShiftY(), and setTheDet().
float PixelCPEBase::theDetR [mutable, protected] |
Definition at line 140 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthX(), PixelCPEInitial::chargeWidthY(), PixelCPEInitial::geomCorrectionX(), PixelCPEInitial::geomCorrectionY(), and setTheDet().
float PixelCPEBase::theDetZ [mutable, protected] |
Definition at line 139 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthX(), PixelCPEInitial::chargeWidthY(), PixelCPEInitial::geomCorrectionY(), and setTheDet().
EtaCorrection PixelCPEBase::theEtaFunc [mutable, protected] |
Definition at line 131 of file PixelCPEBase.h.
float PixelCPEBase::theLShiftX [mutable, protected] |
Definition at line 141 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthX(), PixelCPEParmError::chargeWidthX(), localPosition(), and setTheDet().
float PixelCPEBase::theLShiftY [mutable, protected] |
Definition at line 142 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthY(), localPosition(), and setTheDet().
float PixelCPEBase::theNumOfCol [mutable, protected] |
float PixelCPEBase::theNumOfRow [mutable, protected] |
float PixelCPEBase::theOffsetX [mutable, protected] |
Definition at line 135 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::geomCorrectionX(), and setTheDet().
float PixelCPEBase::theOffsetY [mutable, protected] |
Definition at line 136 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::geomCorrectionY(), and setTheDet().
GeomDetType::SubDetector PixelCPEBase::thePart [mutable, protected] |
Definition at line 130 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthX(), PixelCPEParmError::chargeWidthX(), PixelCPEInitial::chargeWidthY(), PixelCPEParmError::chargeWidthY(), PixelCPEGeneric::err2X(), PixelCPEInitial::err2X(), PixelCPEGeneric::err2Y(), PixelCPEInitial::err2Y(), PixelCPEGeneric::generic_position_formula(), PixelCPEInitial::geomCorrectionX(), PixelCPEInitial::geomCorrectionY(), PixelCPEParmError::localError(), PixelCPETemplateReco::localError(), PixelCPETemplateReco::localPosition(), and setTheDet().
float PixelCPEBase::thePitchX [mutable, protected] |
Definition at line 133 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthX(), PixelCPEParmError::chargeWidthX(), computeLorentzShifts(), PixelCPEGeneric::err2X(), PixelCPEInitial::err2X(), PixelCPEParmError::localError(), PixelCPETemplateReco::localError(), localPosition(), PixelCPEGeneric::localPosition(), lorentzShiftX(), setTheDet(), PixelCPEInitial::xpos(), and PixelCPEParmError::xpos().
float PixelCPEBase::thePitchY [mutable, protected] |
Definition at line 134 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthY(), PixelCPEParmError::chargeWidthY(), computeLorentzShifts(), PixelCPEGeneric::err2Y(), PixelCPEInitial::err2Y(), PixelCPEParmError::localError(), PixelCPETemplateReco::localError(), localPosition(), PixelCPEGeneric::localPosition(), lorentzShiftY(), setTheDet(), PixelCPEParmError::ypos(), and PixelCPEInitial::ypos().
float PixelCPEBase::theSign [mutable, protected] |
Definition at line 143 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::geomCorrectionX(), and setTheDet().
float PixelCPEBase::theThickness [mutable, protected] |
Definition at line 132 of file PixelCPEBase.h.
Referenced by PixelCPEInitial::chargeWidthX(), PixelCPEParmError::chargeWidthX(), PixelCPEInitial::chargeWidthY(), PixelCPEParmError::chargeWidthY(), computeLorentzShifts(), PixelCPEGeneric::generic_position_formula(), PixelCPEInitial::geomCorrectionX(), PixelCPEInitial::geomCorrectionY(), lorentzShiftX(), lorentzShiftY(), and setTheDet().
const RectangularPixelTopology* PixelCPEBase::theTopol [mutable, protected] |
Definition at line 129 of file PixelCPEBase.h.
Referenced by computeAnglesFromDetPosition(), PixelCPEParmError::localError(), PixelCPEGeneric::localError(), PixelCPEInitial::localError(), PixelCPETemplateReco::localError(), PixelCPEGeneric::localPosition(), PixelCPETemplateReco::localPosition(), measurementError(), PixelCPEGeneric::measurementPosition(), PixelCPETemplateReco::measurementPosition(), measurementPosition(), setTheDet(), PixelCPEInitial::xpos(), PixelCPEParmError::xpos(), PixelCPEParmError::ypos(), and PixelCPEInitial::ypos().
int PixelCPEBase::theVerboseLevel [protected] |
Definition at line 193 of file PixelCPEBase.h.
Referenced by computeLorentzShifts(), driftDirection(), PixelCPEGeneric::generic_position_formula(), PixelCPEParmError::localError(), PixelCPEGeneric::localError(), PixelCPEInitial::localError(), PixelCPETemplateReco::localError(), PixelCPEGeneric::localPosition(), PixelCPEBase(), PixelCPEGeneric::PixelCPEGeneric(), and setTheDet().
float PixelCPEBase::trk_lp_x [mutable, protected] |
Definition at line 154 of file PixelCPEBase.h.
Referenced by computeAnglesFromTrajectory(), and PixelCPETemplateReco::localPosition().
float PixelCPEBase::trk_lp_y [mutable, protected] |
Definition at line 155 of file PixelCPEBase.h.
Referenced by computeAnglesFromTrajectory(), and PixelCPETemplateReco::localPosition().