22 if (dynamic_cast<const StripGeomDetUnit*>(gdet) == 0) {
23 throw MeasurementDetException(
"TkStripMeasurementDet constructed with a GeomDet which is not a StripGeomDetUnit");
28 std::vector<TrajectoryMeasurement>
35 std::vector<TrajectoryMeasurement>
result;
38 LogDebug(
"TkStripMeasurementDet")<<
" found an inactive module "<<
rawId();
49 LogDebug(
"TkStripMeasurementDet") <<
" DetID " <<
rawId() <<
" empty ";
71 if (
isMasked(*leftCluster))
continue;
75 bool isCompatible(
false);
76 for(RecHitContainer::const_iterator recHit=recHits.begin();recHit!=recHits.end();++recHit){
77 std::pair<bool,double> diffEst = est.
estimate(stateOnThisDet, **recHit);
78 if ( diffEst.first ) {
84 if(!isCompatible)
break;
86 else LogDebug(
"TkStripMeasurementDet")<<
"skipping this str from last iteration on"<<
rawId()<<
" key: "<<clusterref.key();
91 for ( ; rightCluster !=
detSet().
end(); rightCluster++) {
92 if (
isMasked(*rightCluster))
continue;
96 bool isCompatible(
false);
97 for(RecHitContainer::const_iterator recHit=recHits.begin();recHit!=recHits.end();++recHit){
98 std::pair<bool,double> diffEst = est.
estimate(stateOnThisDet, **recHit);
99 if ( diffEst.first ) {
105 if(!isCompatible)
break;
107 else LogDebug(
"TkStripMeasurementDet")<<
"skipping this str from last iteration on" <<
rawId()<<
" key: "<<clusterref.key();
111 LogDebug(
"TkStripMeasurementDet")<<
" finding left/ right";
112 result.reserve(
size());
114 for (; rightCluster!=
endClusterI();++rightCluster){
116 if (clusterref->barycenter() > utraj)
break;
119 unsigned int leftCluster = 1;
120 for (
unsigned int iReadBackWard=1; iReadBackWard<=(rightCluster-
beginClusterI()) ; ++iReadBackWard){
121 leftCluster=rightCluster-iReadBackWard;
123 if (
isMasked(*clusterref))
continue;
126 bool isCompatible(
false);
127 for(RecHitContainer::const_iterator recHit=recHits.begin();recHit!=recHits.end();++recHit){
128 std::pair<bool,double> diffEst = est.
estimate(stateOnThisDet, **recHit);
129 if ( diffEst.first ) {
135 if(!isCompatible)
break;
137 else LogDebug(
"TkStripMeasurementDet")<<
"skipping this reg str from last iteration on"<<
rawId()<<
" key: "<<clusterref.
key();
141 for ( ; rightCluster !=
endClusterI(); ++rightCluster) {
143 if (
isMasked(*clusterref))
continue;
146 bool isCompatible(
false);
147 for(RecHitContainer::const_iterator recHit=recHits.begin();recHit!=recHits.end();++recHit){
148 std::pair<bool,double> diffEst = est.
estimate(stateOnThisDet, **recHit);
149 if ( diffEst.first ) {
155 if(!isCompatible)
break;
157 else LogDebug(
"TkStripMeasurementDet")<<
"skipping this reg str from last iteration on"<<
rawId()<<
" key: "<<clusterref.
key();
162 if ( result.empty()) {
180 if ( result.size() > 1) {
215 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){
229 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){
252 else LogDebug(
"TkStripMeasurementDet")<<
"skipping this str from last iteration on"<<
rawId()<<
" key: "<<cluster.key();
255 result.reserve(
size());
258 if (
isMasked(*clusterRef))
continue;
261 else LogDebug(
"TkStripMeasurementDet")<<
"skipping this reg str from last iteration on"<<
rawId()<<
" key: "<<clusterRef.
key();
268 template<
class ClusterRefT>
272 std::vector<SiStripRecHit2D>& res )
const
276 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){
277 res.push_back(SiStripRecHit2D( it->first, it->second,
rawId(), cluster));
295 else LogDebug(
"TkStripMeasurementDet")<<
"skipping this str from last iteration on"<<
rawId()<<
" key: "<<cluster.key();
298 result.reserve(
size());
301 if (
isMasked(*clusterRef))
continue;
304 else LogDebug(
"TkStripMeasurementDet")<<
"skipping this reg str from last iteration on"<<
rawId()<<
" key: "<<clusterRef.
key();
313 int16_t
start = (int16_t) std::max<float>(utraj - 3.
f*uerr, 0);
314 int16_t
end = (int16_t) std::min<float>(utraj + 3.
f*uerr,
totalStrips());
326 typedef std::vector<BadStripBlock>::const_iterator BSBIT;
328 int16_t
bad = 0, largestBadBlock = 0;
330 if (bsbc->last < start)
continue;
331 if (bsbc->first > end)
break;
333 if (thisBad > largestBadBlock) largestBadBlock = thisBad;
337 bool ok = (bad < (end-
start)) &&
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
TkStripMeasurementDet(const GeomDet *gdet, StMeasurementDetSet &dets)
void buildSimpleRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, std::vector< SiStripRecHit2D > &res) const
edm::Handle< edmNew::DetSetVector< SiStripCluster > > const & handle() const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const =0
StripClusterParameterEstimator::VLocalValues VLocalValues
LocalPoint localPosition() const
StripClusterParameterEstimator::LocalValues LocalValues
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
virtual const GeomDet & geomDet() const
BadStripCuts const & badStripCuts() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &) const
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
TransientTrackingRecHit::RecHitPointer buildRecHit(const SiStripClusterRef &, const TrajectoryStateOnSurface <p) const
uint16_t maxConsecutiveBad
LocalError positionError() const
bool isMasked(const SiStripCluster &cluster) const
int bad(Items const &cont)
const GeomDet & fastGeomDet() const
unsigned int beginClusterI() const
edm::Handle< edm::LazyGetter< SiStripCluster > > const & regionalHandle() const
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
virtual VLocalValues localParametersV(const T &cluster, const GeomDetUnit &gd) const
unsigned int endClusterI() const
virtual std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &startingState, const Propagator &, const MeasurementEstimator &) const
const T & max(const T &a, const T &b)
std::vector< BadStripBlock > const & badStripBlocks() const
Ref< LazyGetter< T >, T, FindValue< T > > makeRefToLazyGetter(const Handle< LazyGetter< T > > &handle, const uint32_t index)
TkStripMeasurementDet::RecHitContainer buildRecHits(const SiStripClusterRef &, const TrajectoryStateOnSurface <p) const
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const LocalTrajectoryError & localError() const
bool accept(SiStripClusterRef &r) const
key_type key() const
Accessor for product key.
const StripGeomDetUnit & specificGeomDet() const
const detset & detSet() const
const StripClusterParameterEstimator * cpe() const
SiStripRecHit2D::ClusterRef SiStripClusterRef
void simpleRecHits(const TrajectoryStateOnSurface &ts, std::vector< SiStripRecHit2D > &result) const
detset::const_iterator new_const_iterator
bool testStrips(float utraj, float uerr) const
return true if there are 'enough' good strips in the utraj +/- 3 uerr range.
bool isActive() const
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'...
unsigned int rawId() const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)