#include <TkStripMeasurementDet.h>
Definition at line 22 of file TkStripMeasurementDet.h.
typedef std::vector<SiStripCluster>::const_iterator TkStripMeasurementDet::const_iterator |
Definition at line 35 of file TkStripMeasurementDet.h.
Definition at line 32 of file TkStripMeasurementDet.h.
Definition at line 25 of file TkStripMeasurementDet.h.
Definition at line 33 of file TkStripMeasurementDet.h.
Definition at line 28 of file TkStripMeasurementDet.h.
typedef edm::LazyGetter<SiStripCluster>::value_ref TkStripMeasurementDet::SiStripRegionalClusterRef |
Definition at line 30 of file TkStripMeasurementDet.h.
Definition at line 26 of file TkStripMeasurementDet.h.
virtual TkStripMeasurementDet::~TkStripMeasurementDet | ( | ) | [inline, virtual] |
Definition at line 37 of file TkStripMeasurementDet.h.
{}
TkStripMeasurementDet::TkStripMeasurementDet | ( | const GeomDet * | gdet, |
const StripClusterParameterEstimator * | cpe, | ||
bool | regional | ||
) |
Definition at line 17 of file TkStripMeasurementDet.cc.
References GeomDet::geographicalId(), id_, StripTopology::nstrips(), DetId::rawId(), specificGeomDet(), StripGeomDetUnit::specificTopology(), theStripGDU, and totalStrips_.
: MeasurementDet (gdet), isRegional(regional), empty(true), activeThisEvent_(true), activeThisPeriod_(true), theCPE(cpe) { theStripGDU = dynamic_cast<const StripGeomDetUnit*>(gdet); if (theStripGDU == 0) { throw MeasurementDetException( "TkStripMeasurementDet constructed with a GeomDet which is not a StripGeomDetUnit"); } //intialize the detId ! id_ = gdet->geographicalId().rawId(); //initalize the total number of strips totalStrips_ = specificGeomDet().specificTopology().nstrips(); }
bool TkStripMeasurementDet::accept | ( | SiStripClusterRef & | r | ) | const [inline] |
Definition at line 199 of file TkStripMeasurementDet.h.
References skipClusters_.
Referenced by fastMeasurements(), recHits(), and simpleRecHits().
{ return (skipClusters_.find(r) == skipClusters_.end()); }
bool TkStripMeasurementDet::accept | ( | SiStripRegionalClusterRef & | r | ) | const [inline] |
Definition at line 202 of file TkStripMeasurementDet.h.
References skipRegClusters_.
{ return (skipRegClusters_.find(r) == skipRegClusters_.end()); }
TransientTrackingRecHit::RecHitPointer TkStripMeasurementDet::buildRecHit | ( | const SiStripRegionalClusterRef & | cluster, |
const TrajectoryStateOnSurface & | ltp | ||
) | const |
Definition at line 204 of file TkStripMeasurementDet.cc.
References newFWLiteAna::build, MeasurementDet::geomDet(), ClusterParameterEstimator< T >::localParameters(), specificGeomDet(), and theCPE.
{ const GeomDetUnit& gdu( specificGeomDet()); LocalValues lv = theCPE->localParameters( *cluster, gdu, ltp); return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, &geomDet(), cluster, theCPE); }
TransientTrackingRecHit::RecHitPointer TkStripMeasurementDet::buildRecHit | ( | const SiStripClusterRef & | cluster, |
const TrajectoryStateOnSurface & | ltp | ||
) | const |
Definition at line 195 of file TkStripMeasurementDet.cc.
References newFWLiteAna::build, MeasurementDet::geomDet(), ClusterParameterEstimator< T >::localParameters(), specificGeomDet(), and theCPE.
Referenced by recHits().
{ const GeomDetUnit& gdu( specificGeomDet()); LocalValues lv = theCPE->localParameters( *cluster, gdu, ltp); return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, &geomDet(), cluster, theCPE); }
TkStripMeasurementDet::RecHitContainer TkStripMeasurementDet::buildRecHits | ( | const SiStripRegionalClusterRef & | cluster, |
const TrajectoryStateOnSurface & | ltp | ||
) | const |
Definition at line 229 of file TkStripMeasurementDet.cc.
References TSiStripRecHit2DLocalPos::build(), MeasurementDet::geomDet(), ClusterParameterEstimator< T >::localParametersV(), specificGeomDet(), and theCPE.
{ const GeomDetUnit& gdu( specificGeomDet()); VLocalValues vlv = theCPE->localParametersV( *cluster, gdu, ltp); RecHitContainer res; for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){ res.push_back(TSiStripRecHit2DLocalPos::build( it->first, it->second, &geomDet(), cluster, theCPE)); } return res; }
TkStripMeasurementDet::RecHitContainer TkStripMeasurementDet::buildRecHits | ( | const SiStripClusterRef & | cluster, |
const TrajectoryStateOnSurface & | ltp | ||
) | const |
Definition at line 215 of file TkStripMeasurementDet.cc.
References TSiStripRecHit2DLocalPos::build(), MeasurementDet::geomDet(), ClusterParameterEstimator< T >::localParametersV(), specificGeomDet(), and theCPE.
Referenced by fastMeasurements().
{ const GeomDetUnit& gdu( specificGeomDet()); VLocalValues vlv = theCPE->localParametersV( *cluster, gdu, ltp); RecHitContainer res; for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){ res.push_back(TSiStripRecHit2DLocalPos::build( it->first, it->second, &geomDet(), cluster, theCPE)); } return res; }
void TkStripMeasurementDet::buildSimpleRecHit | ( | const ClusterRefT & | cluster, |
const TrajectoryStateOnSurface & | ltp, | ||
std::vector< SiStripRecHit2D > & | res | ||
) | const [private] |
Definition at line 276 of file TkStripMeasurementDet.cc.
References MeasurementDet::geomDet(), ClusterParameterEstimator< T >::localParametersV(), specificGeomDet(), and theCPE.
Referenced by simpleRecHits().
{ const GeomDetUnit& gdu( specificGeomDet()); VLocalValues vlv = theCPE->localParametersV( *cluster, gdu, ltp); for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){ res.push_back(SiStripRecHit2D( it->first, it->second, geomDet().geographicalId(), cluster)); } }
std::vector< TrajectoryMeasurement > TkStripMeasurementDet::fastMeasurements | ( | const TrajectoryStateOnSurface & | stateOnThisDet, |
const TrajectoryStateOnSurface & | startingState, | ||
const Propagator & | , | ||
const MeasurementEstimator & | |||
) | const [virtual] |
faster version in case the TrajectoryState on the surface of the Det is already available. The first TrajectoryStateOnSurface is on the surface of this Det, and the second TrajectoryStateOnSurface is the statrting state, usually not on the surface of this Det. The stateOnThisDet should the result of
prop.propagate( startingState, this->surface())
Implements MeasurementDet.
Definition at line 39 of file TkStripMeasurementDet.cc.
References accept(), edmNew::DetSet< T >::begin(), beginClusterI_, InvalidTransientRecHit::build(), buildRecHits(), detSet_, empty, edmNew::DetSet< T >::end(), endClusterI_, MeasurementEstimator::estimate(), GeomDet::geographicalId(), MeasurementDet::geomDet(), handle_, TrajectoryStateOnSurface::hasError(), TrackingRecHit::inactive, isActive(), isMasked(), isRegional, edm::Ref< C, T, F >::key(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), LogDebug, edm::makeRefTo(), edm::makeRefToLazyGetter(), Topology::measurementError(), Topology::measurementPosition(), TrackingRecHit::missing, LocalTrajectoryError::positionError(), DetId::rawId(), recHits(), regionalHandle_, query::result, size(), python::multivaluedict::sort(), StripGeomDetUnit::specificTopology(), mathSSE::sqrt(), testStrips(), theStripGDU, and x.
{ std::vector<TrajectoryMeasurement> result; if (isActive() == false) { result.push_back( TrajectoryMeasurement( stateOnThisDet, InvalidTransientRecHit::build(&geomDet(), TrackingRecHit::inactive), 0.F)); // LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " inactive"; return result; } float utraj = theStripGDU->specificTopology().measurementPosition( stateOnThisDet.localPosition()).x(); float uerr; // if (theClusterRange.first == theClusterRange.second) { // empty if (empty == true){ //LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " empty "; if (stateOnThisDet.hasError()){ uerr= sqrt(theStripGDU->specificTopology().measurementError(stateOnThisDet.localPosition(),stateOnThisDet.localError().positionError()).uu()); if (testStrips(utraj,uerr)) { result.push_back( TrajectoryMeasurement( stateOnThisDet, InvalidTransientRecHit::build(&geomDet(), TrackingRecHit::missing), 0.F)); } else { result.push_back( TrajectoryMeasurement( stateOnThisDet, InvalidTransientRecHit::build(&geomDet(), TrackingRecHit::inactive), 0.F)); } }else{ result.push_back( TrajectoryMeasurement( stateOnThisDet, InvalidTransientRecHit::build(&geomDet(), TrackingRecHit::missing), 0.F)); } return result; } if(!isRegional){//old implemetation with DetSet new_const_iterator rightCluster = std::find_if( detSet_.begin(), detSet_.end(), StripClusterAboveU( utraj)); //FIXME if ( rightCluster != detSet_.begin()) { // there are hits on the left of the utraj new_const_iterator leftCluster = rightCluster; while ( --leftCluster >= detSet_.begin()) { if (isMasked(*leftCluster)) continue; SiStripClusterRef clusterref = edmNew::makeRefTo( handle_, leftCluster ); if (accept(clusterref)){ RecHitContainer recHits = buildRecHits(clusterref,stateOnThisDet); bool isCompatible(false); for(RecHitContainer::const_iterator recHit=recHits.begin();recHit!=recHits.end();++recHit){ std::pair<bool,double> diffEst = est.estimate(stateOnThisDet, **recHit); if ( diffEst.first ) { result.push_back( TrajectoryMeasurement( stateOnThisDet, *recHit, diffEst.second)); isCompatible = true; } } if(!isCompatible) break; // exit loop on first incompatible hit } else LogDebug("TkStripMeasurementDet")<<"skipping this str from last iteration on"<<geomDet().geographicalId().rawId()<<" key: "<<clusterref.key(); } } for ( ; rightCluster != detSet_.end(); rightCluster++) { if (isMasked(*rightCluster)) continue; SiStripClusterRef clusterref = edmNew::makeRefTo( handle_, rightCluster ); if (accept(clusterref)){ RecHitContainer recHits = buildRecHits(clusterref,stateOnThisDet); bool isCompatible(false); for(RecHitContainer::const_iterator recHit=recHits.begin();recHit!=recHits.end();++recHit){ std::pair<bool,double> diffEst = est.estimate(stateOnThisDet, **recHit); if ( diffEst.first ) { result.push_back( TrajectoryMeasurement( stateOnThisDet, *recHit, diffEst.second)); isCompatible = true; } } if(!isCompatible) break; // exit loop on first incompatible hit } else LogDebug("TkStripMeasurementDet")<<"skipping this str from last iteration on"<<geomDet().geographicalId().rawId()<<" key: "<<clusterref.key(); } }// end block with DetSet else{ result.reserve(size()); uint rightCluster = beginClusterI_; for (; rightCluster!= endClusterI_;++rightCluster){ SiStripRegionalClusterRef clusterref = edm::makeRefToLazyGetter(regionalHandle_,rightCluster); if (clusterref->barycenter() > utraj) break; } uint leftCluster = 1; for (uint iReadBackWard=1; iReadBackWard<=(rightCluster-beginClusterI_) ; ++iReadBackWard){ leftCluster=rightCluster-iReadBackWard; SiStripRegionalClusterRef clusterref = edm::makeRefToLazyGetter(regionalHandle_,leftCluster); if (isMasked(*clusterref)) continue; if (accept(clusterref)){ RecHitContainer recHits = buildRecHits(clusterref,stateOnThisDet); bool isCompatible(false); for(RecHitContainer::const_iterator recHit=recHits.begin();recHit!=recHits.end();++recHit){ std::pair<bool,double> diffEst = est.estimate(stateOnThisDet, **recHit); if ( diffEst.first ) { result.push_back( TrajectoryMeasurement( stateOnThisDet, *recHit, diffEst.second)); isCompatible = true; } } if(!isCompatible) break; // exit loop on first incompatible hit } else LogDebug("TkStripMeasurementDet")<<"skipping this reg str from last iteration on"<<geomDet().geographicalId().rawId()<<" key: "<<clusterref.key(); } for ( ; rightCluster != endClusterI_; ++rightCluster) { SiStripRegionalClusterRef clusterref = edm::makeRefToLazyGetter(regionalHandle_,rightCluster); if (isMasked(*clusterref)) continue; if (accept(clusterref)){ RecHitContainer recHits = buildRecHits(clusterref,stateOnThisDet); bool isCompatible(false); for(RecHitContainer::const_iterator recHit=recHits.begin();recHit!=recHits.end();++recHit){ std::pair<bool,double> diffEst = est.estimate(stateOnThisDet, **recHit); if ( diffEst.first ) { result.push_back( TrajectoryMeasurement( stateOnThisDet, *recHit, diffEst.second)); isCompatible = true; } } if(!isCompatible) break; // exit loop on first incompatible hit } else LogDebug("TkStripMeasurementDet")<<"skipping this reg str from last iteration on"<<geomDet().geographicalId().rawId()<<" key: "<<clusterref.key(); } } if ( result.empty()) { // create a TrajectoryMeasurement with an invalid RecHit and zero estimate if (stateOnThisDet.hasError()){ uerr= sqrt(theStripGDU->specificTopology().measurementError(stateOnThisDet.localPosition(),stateOnThisDet.localError().positionError()).uu()); if (testStrips(utraj,uerr)) { //LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " empty after search, but active "; result.push_back( TrajectoryMeasurement( stateOnThisDet, InvalidTransientRecHit::build(&geomDet(), TrackingRecHit::missing), 0.F)); } else { //LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " empty after search, and inactive "; result.push_back( TrajectoryMeasurement( stateOnThisDet, InvalidTransientRecHit::build(&geomDet(), TrackingRecHit::inactive), 0.F)); } }else{ result.push_back( TrajectoryMeasurement( stateOnThisDet, InvalidTransientRecHit::build(&geomDet(), TrackingRecHit::missing), 0.F)); } } else { //LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " full: " << (result.size()) << " compatible hits"; // sort results according to estimator value if ( result.size() > 1) { sort( result.begin(), result.end(), TrajMeasLessEstim()); } } return result; }
std::vector<BadStripBlock>& TkStripMeasurementDet::getBadStripBlocks | ( | ) | [inline] |
Definition at line 138 of file TkStripMeasurementDet.h.
References badStripBlocks_.
{ return badStripBlocks_; }
bool TkStripMeasurementDet::hasAllGoodChannels | ( | ) | const [inline] |
does this module have at least one bad strip, APV or channel?
Definition at line 115 of file TkStripMeasurementDet.h.
References badStripBlocks_, and hasAny128StripBad_.
Referenced by TkGluedMeasurementDet::fastMeasurements().
{ return !hasAny128StripBad_ && badStripBlocks_.empty(); }
bool TkStripMeasurementDet::hasBadComponents | ( | const TrajectoryStateOnSurface & | tsos | ) | const [inline, virtual] |
bool TkStripMeasurementDet::isActive | ( | ) | const [inline, virtual] |
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'.
Implements MeasurementDet.
Definition at line 66 of file TkStripMeasurementDet.h.
References activeThisEvent_, and activeThisPeriod_.
Referenced by fastMeasurements(), TkGluedMeasurementDet::fastMeasurements(), TkGluedMeasurementDet::isActive(), recHits(), and simpleRecHits().
{ return activeThisEvent_ && activeThisPeriod_; }
bool TkStripMeasurementDet::isEmpty | ( | void | ) | [inline] |
bool TkStripMeasurementDet::isMasked | ( | const SiStripCluster & | cluster | ) | const [inline, private] |
Definition at line 174 of file TkStripMeasurementDet.h.
References SiStripCluster::amplitudes(), bad128Strip_, SiStripCluster::barycenter(), and SiStripCluster::firstStrip().
Referenced by fastMeasurements(), recHits(), and simpleRecHits().
{ if ( bad128Strip_[cluster.firstStrip() >> 7] ) { if ( bad128Strip_[(cluster.firstStrip()+cluster.amplitudes().size()) >> 7] || bad128Strip_[static_cast<int32_t>(cluster.barycenter()-0.499999) >> 7] ) { return true; } } else { if ( bad128Strip_[(cluster.firstStrip()+cluster.amplitudes().size()) >> 7] && bad128Strip_[static_cast<int32_t>(cluster.barycenter()-0.499999) >> 7] ) { return true; } } return false; }
unsigned int TkStripMeasurementDet::rawId | ( | ) | const [inline] |
TkStripMeasurementDet::RecHitContainer TkStripMeasurementDet::recHits | ( | const TrajectoryStateOnSurface & | ts | ) | const [virtual] |
Implements MeasurementDet.
Definition at line 244 of file TkStripMeasurementDet.cc.
References accept(), edmNew::DetSet< T >::begin(), beginClusterI_, buildRecHit(), detSet_, empty, edmNew::DetSet< T >::end(), endClusterI_, GeomDet::geographicalId(), MeasurementDet::geomDet(), handle_, isActive(), isMasked(), isRegional, edm::Ref< C, T, F >::key(), LogDebug, edm::makeRefTo(), edm::makeRefToLazyGetter(), DetId::rawId(), regionalHandle_, query::result, edmNew::DetSet< T >::size(), and size().
Referenced by TkGluedMeasurementDet::collectRecHits(), and fastMeasurements().
{ RecHitContainer result; if (empty == true) return result; if (isActive() == false) return result; // GIO if(!isRegional){//old implemetation with DetSet result.reserve(detSet_.size()); for ( new_const_iterator ci = detSet_.begin(); ci != detSet_.end(); ++ ci ) { if (isMasked(*ci)) continue; // for ( ClusterIterator ci=theClusterRange.first; ci != theClusterRange.second; ci++) { SiStripClusterRef cluster = edmNew::makeRefTo( handle_, ci ); if (accept(cluster)) result.push_back( buildRecHit( cluster, ts)); else LogDebug("TkStripMeasurementDet")<<"skipping this str from last iteration on"<<geomDet().geographicalId().rawId()<<" key: "<<cluster.key(); } }else{ result.reserve(size()); for (uint ci = beginClusterI_ ; ci!= endClusterI_;++ci){ SiStripRegionalClusterRef clusterRef = edm::makeRefToLazyGetter(regionalHandle_,ci); if (isMasked(*clusterRef)) continue; if (accept(clusterRef)) result.push_back( buildRecHit( clusterRef, ts)); else LogDebug("TkStripMeasurementDet")<<"skipping this reg str from last iteration on"<<geomDet().geographicalId().rawId()<<" key: "<<clusterRef.key(); } } return result; }
void TkStripMeasurementDet::set128StripStatus | ( | bool | good, |
int | idx = -1 |
||
) |
Sets the status of a block of 128 strips (or all blocks if idx=-1)
Definition at line 317 of file TkStripMeasurementDet.cc.
References bad128Strip_, hasAny128StripBad_, and i.
{ if (idx == -1) { std::fill(bad128Strip_, bad128Strip_+6, !good); hasAny128StripBad_ = !good; } else { bad128Strip_[idx] = !good; if (good == false) { hasAny128StripBad_ = false; } else { // this should not happen, as usually you turn on all fibers // and then turn off the bad ones, and not vice-versa, // so I don't care if it's not optimized hasAny128StripBad_ = true; for (int i = 0; i < (totalStrips_ >> 7); i++) { if (bad128Strip_[i] == false) hasAny128StripBad_ = false; } } } }
void TkStripMeasurementDet::setActive | ( | bool | active | ) | [inline] |
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB, usually). This also resets the 'setActiveThisEvent' to true.
Definition at line 109 of file TkStripMeasurementDet.h.
References activeThisEvent_, activeThisPeriod_, and empty.
{ activeThisPeriod_ = active; activeThisEvent_ = true; if (!active) empty = true; }
void TkStripMeasurementDet::setActiveThisEvent | ( | bool | active | ) | [inline] |
Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call to 'update' or 'setEmpty'.
Definition at line 112 of file TkStripMeasurementDet.h.
References activeThisEvent_, and empty.
Referenced by OnDemandMeasurementTracker::assign().
{ activeThisEvent_ = active; if (!active) empty = true; }
void TkStripMeasurementDet::setBadStripCuts | ( | BadStripCuts | cuts | ) | [inline] |
Definition at line 131 of file TkStripMeasurementDet.h.
References badStripCuts_.
{ badStripCuts_ = cuts; }
Definition at line 211 of file TkStripMeasurementDet.h.
References skipClusters_.
{ skipClusters_.clear(); skipClusters_.insert(begin,end); }
void TkStripMeasurementDet::setEmpty | ( | ) | [inline] |
Definition at line 72 of file TkStripMeasurementDet.h.
References activeThisEvent_, and empty.
Referenced by OnDemandMeasurementTracker::assign().
{empty = true; activeThisEvent_ = true; }
void TkStripMeasurementDet::setMaskBad128StripBlocks | ( | bool | maskThem | ) | [inline] |
Definition at line 140 of file TkStripMeasurementDet.h.
References maskBad128StripBlocks_.
{ maskBad128StripBlocks_ = maskThem; }
void TkStripMeasurementDet::setRegionalClustersToSkip | ( | IT | begin, |
IT | end | ||
) | [inline] |
Definition at line 216 of file TkStripMeasurementDet.h.
References skipRegClusters_.
Referenced by OnDemandMeasurementTracker::assign(), and OnDemandMeasurementTracker::updateStrips().
{ skipRegClusters_.clear(); skipRegClusters_.insert(begin,end); }
void TkStripMeasurementDet::simpleRecHits | ( | const TrajectoryStateOnSurface & | ts, |
std::vector< SiStripRecHit2D > & | result | ||
) | const |
Definition at line 289 of file TkStripMeasurementDet.cc.
References accept(), edmNew::DetSet< T >::begin(), beginClusterI_, buildSimpleRecHit(), detSet_, empty, edmNew::DetSet< T >::end(), endClusterI_, GeomDet::geographicalId(), MeasurementDet::geomDet(), handle_, isActive(), isMasked(), isRegional, edm::Ref< C, T, F >::key(), LogDebug, edm::makeRefTo(), edm::makeRefToLazyGetter(), DetId::rawId(), regionalHandle_, edmNew::DetSet< T >::size(), and size().
Referenced by TkGluedMeasurementDet::collectRecHits().
{ if (empty || !isActive()) return; if(!isRegional){//old implemetation with DetSet result.reserve(detSet_.size()); for ( new_const_iterator ci = detSet_.begin(); ci != detSet_.end(); ++ ci ) { if (isMasked(*ci)) continue; // for ( ClusterIterator ci=theClusterRange.first; ci != theClusterRange.second; ci++) { SiStripClusterRef cluster = edmNew::makeRefTo( handle_, ci ); if (accept(cluster)) buildSimpleRecHit( cluster, ts,result); else LogDebug("TkStripMeasurementDet")<<"skipping this str from last iteration on"<<geomDet().geographicalId().rawId()<<" key: "<<cluster.key(); } }else{ result.reserve(size()); for (uint ci = beginClusterI_ ; ci!= endClusterI_;++ci){ SiStripRegionalClusterRef clusterRef = edm::makeRefToLazyGetter(regionalHandle_,ci); if (isMasked(*clusterRef)) continue; if (accept(clusterRef)) buildSimpleRecHit( clusterRef, ts,result); else LogDebug("TkStripMeasurementDet")<<"skipping this reg str from last iteration on"<<geomDet().geographicalId().rawId()<<" key: "<<clusterRef.key(); } } }
int TkStripMeasurementDet::size | ( | void | ) | const [inline] |
Definition at line 105 of file TkStripMeasurementDet.h.
References beginClusterI_, and endClusterI_.
Referenced by fastMeasurements(), recHits(), and simpleRecHits().
{return endClusterI_ - beginClusterI_ ; }
const StripGeomDetUnit& TkStripMeasurementDet::specificGeomDet | ( | ) | const [inline] |
Definition at line 83 of file TkStripMeasurementDet.h.
References theStripGDU.
Referenced by buildRecHit(), buildRecHits(), buildSimpleRecHit(), TkGluedMeasurementDet::testStrips(), and TkStripMeasurementDet().
{return *theStripGDU;}
bool TkStripMeasurementDet::testStrips | ( | float | utraj, |
float | uerr | ||
) | const |
return true if there are 'enough' good strips in the utraj +/- 3 uerr range.
Definition at line 338 of file TkStripMeasurementDet.cc.
References cond::ecalcond::bad(), badStripBlocks_, badStripCuts_, end, max(), TkStripMeasurementDet::BadStripCuts::maxBad, TkStripMeasurementDet::BadStripCuts::maxConsecutiveBad, min, convertSQLiteXML::ok, and totalStrips_.
Referenced by fastMeasurements(), and TkGluedMeasurementDet::testStrips().
{ int16_t start = (int16_t) std::max<float>(utraj - 3*uerr, 0); int16_t end = (int16_t) std::min<float>(utraj + 3*uerr, totalStrips_); if (start >= end) { // which means either end <=0 or start >= totalStrips_ /* LogDebug("TkStripMeasurementDet") << "Testing module " << id_ <<","<< " U = " << utraj << " +/- " << uerr << "; Range [" << (utraj - 3*uerr) << ", " << (utraj + 3*uerr) << "] " << ": YOU'RE COMPLETELY OFF THE MODULE."; */ //return false; return true; // Wolfgang thinks this way is better // and solves some problems with grouped ckf } typedef std::vector<BadStripBlock>::const_iterator BSBIT; BSBIT bsbc = badStripBlocks_.begin(), bsbe = badStripBlocks_.end(); int16_t bad = 0, largestBadBlock = 0; for (BSBIT bsbc = badStripBlocks_.begin(), bsbe = badStripBlocks_.end(); bsbc != bsbe; ++bsbc) { if (bsbc->last < start) continue; if (bsbc->first > end) break; int16_t thisBad = std::min(bsbc->last, end) - std::max(bsbc->first, start); if (thisBad > largestBadBlock) largestBadBlock = thisBad; bad += thisBad; } bool ok = (bad < (end-start)) && (uint16_t(bad) <= badStripCuts_.maxBad) && (uint16_t(largestBadBlock) <= badStripCuts_.maxConsecutiveBad); // if (bad) { // edm::LogWarning("TkStripMeasurementDet") << "Testing module " << id_ <<" (subdet: "<< SiStripDetId(id_).subdetId() << ")" << // " U = " << utraj << " +/- " << uerr << // "; Range [" << (utraj - 3*uerr) << ", " << (utraj + 3*uerr) << "] " << // "= [" << start << "," << end << "]" << // " total strips:" << (end-start) << ", good:" << (end-start-bad) << ", bad:" << bad << ", largestBadBlock: " << largestBadBlock << // ". " << (ok ? "OK" : "NO"); // } return ok; }
const detset& TkStripMeasurementDet::theSet | ( | ) | [inline] |
void TkStripMeasurementDet::unset | ( | ) | [inline] |
Definition at line 206 of file TkStripMeasurementDet.h.
References skipClusters_, and skipRegClusters_.
Referenced by OnDemandMeasurementTracker::assign().
{ skipClusters_.clear(); skipRegClusters_.clear(); }
void TkStripMeasurementDet::update | ( | std::vector< SiStripCluster >::const_iterator | begin, |
std::vector< SiStripCluster >::const_iterator | end, | ||
const edm::Handle< edm::LazyGetter< SiStripCluster > > | h, | ||
unsigned int | id | ||
) | [inline] |
Definition at line 53 of file TkStripMeasurementDet.h.
References activeThisEvent_, beginClusterI_, empty, endClusterI_, h, id_, isRegional, and regionalHandle_.
{ regionalHandle_ = h; beginClusterI_ = begin - regionalHandle_->begin_record(); endClusterI_ = end - regionalHandle_->begin_record(); id_ = id; empty = false; activeThisEvent_ = true; isRegional = true; }
void TkStripMeasurementDet::update | ( | const detset & | detSet, |
const edm::Handle< edmNew::DetSetVector< SiStripCluster > > | h, | ||
unsigned int | id | ||
) | [inline] |
Definition at line 43 of file TkStripMeasurementDet.h.
References detSet_, empty, h, handle_, id_, and isRegional.
Referenced by OnDemandMeasurementTracker::assign(), and OnDemandMeasurementTracker::updateStrips().
bool TkStripMeasurementDet::activeThisEvent_ [private] |
Definition at line 148 of file TkStripMeasurementDet.h.
Referenced by isActive(), setActive(), setActiveThisEvent(), setEmpty(), and update().
bool TkStripMeasurementDet::activeThisPeriod_ [private] |
Definition at line 148 of file TkStripMeasurementDet.h.
Referenced by isActive(), and setActive().
bool TkStripMeasurementDet::bad128Strip_[6] [private] |
Definition at line 161 of file TkStripMeasurementDet.h.
Referenced by isMasked(), and set128StripStatus().
std::vector<BadStripBlock> TkStripMeasurementDet::badStripBlocks_ [private] |
Definition at line 164 of file TkStripMeasurementDet.h.
Referenced by getBadStripBlocks(), hasAllGoodChannels(), and testStrips().
Definition at line 166 of file TkStripMeasurementDet.h.
Referenced by setBadStripCuts(), and testStrips().
uint TkStripMeasurementDet::beginClusterI_ [private] |
Definition at line 171 of file TkStripMeasurementDet.h.
Referenced by fastMeasurements(), recHits(), simpleRecHits(), size(), and update().
detset TkStripMeasurementDet::detSet_ [private] |
Definition at line 152 of file TkStripMeasurementDet.h.
Referenced by fastMeasurements(), recHits(), simpleRecHits(), theSet(), and update().
bool TkStripMeasurementDet::empty [private] |
Definition at line 146 of file TkStripMeasurementDet.h.
Referenced by fastMeasurements(), isEmpty(), recHits(), setActive(), setActiveThisEvent(), setEmpty(), simpleRecHits(), and update().
uint TkStripMeasurementDet::endClusterI_ [private] |
Definition at line 172 of file TkStripMeasurementDet.h.
Referenced by fastMeasurements(), recHits(), simpleRecHits(), size(), and update().
Definition at line 153 of file TkStripMeasurementDet.h.
Referenced by fastMeasurements(), recHits(), simpleRecHits(), and update().
bool TkStripMeasurementDet::hasAny128StripBad_ [private] |
Definition at line 162 of file TkStripMeasurementDet.h.
Referenced by hasAllGoodChannels(), and set128StripStatus().
unsigned int TkStripMeasurementDet::id_ [private] |
Definition at line 150 of file TkStripMeasurementDet.h.
Referenced by rawId(), TkStripMeasurementDet(), and update().
bool TkStripMeasurementDet::isRegional [private] |
Definition at line 144 of file TkStripMeasurementDet.h.
Referenced by fastMeasurements(), recHits(), simpleRecHits(), and update().
bool TkStripMeasurementDet::maskBad128StripBlocks_ [private] |
Definition at line 162 of file TkStripMeasurementDet.h.
Referenced by setMaskBad128StripBlocks().
Definition at line 170 of file TkStripMeasurementDet.h.
Referenced by fastMeasurements(), recHits(), simpleRecHits(), and update().
std::set<SiStripClusterRef> TkStripMeasurementDet::skipClusters_ [private] |
Definition at line 195 of file TkStripMeasurementDet.h.
Referenced by accept(), setClusterToSkip(), and unset().
std::set<SiStripRegionalClusterRef> TkStripMeasurementDet::skipRegClusters_ [private] |
Definition at line 196 of file TkStripMeasurementDet.h.
Referenced by accept(), setRegionalClustersToSkip(), and unset().
const StripClusterParameterEstimator* TkStripMeasurementDet::theCPE [private] |
Definition at line 157 of file TkStripMeasurementDet.h.
Referenced by buildRecHit(), buildRecHits(), and buildSimpleRecHit().
const StripGeomDetUnit* TkStripMeasurementDet::theStripGDU [private] |
Definition at line 156 of file TkStripMeasurementDet.h.
Referenced by fastMeasurements(), specificGeomDet(), and TkStripMeasurementDet().
int TkStripMeasurementDet::totalStrips_ [private] |
Definition at line 165 of file TkStripMeasurementDet.h.
Referenced by testStrips(), and TkStripMeasurementDet().