1 #ifndef TkStripMeasurementDet_H
2 #define TkStripMeasurementDet_H
45 : mdet(&imdet),tsos(&itsos),
data(&idata), clusterI(ci), clusterE(ce) {}
56 inline void advance();
60 bool empty()
const {
return clusterI==clusterE; }
109 unsigned int rawId()
const {
return conditionSet().id(
index()); }
110 unsigned char subId()
const {
return conditionSet().subId(
index());}
142 RecHitContainer &
result, std::vector<float> & diffs)
const;
147 TempMeasurements &
result)
const;
152 template<
class ClusterRefT>
156 LocalValues lv = cpe()->localParameters( *cluster, gdu, ltp);
157 return std::make_shared<SiStripRecHit2D>( lv.first, lv.second,
fastGeomDet(), cluster);
161 template<
class ClusterRefT>
166 VLocalValues vlv = cpe()->localParametersV( *cluster, gdu, ltp);
167 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it)
168 res.push_back(std::make_shared<SiStripRecHit2D>( it->first, it->second, fastGeomDet(), cluster));
172 template<
class ClusterRefT>
175 if (isMasked(*cluster))
return true;
177 if (!
accept(cluster, skipClusters))
return true;
179 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
180 bool isCompatible(
false);
183 std::pair<bool,double> diffEst = est.
estimate(ltp, recHit);
184 LogDebug(
"TkStripMeasurementDet")<<
" chi2=" << diffEst.second;
185 if ( diffEst.first ) {
186 result.push_back(
std::move(std::make_shared<SiStripRecHit2D>(recHit)));
187 diffs.push_back(diffEst.second);
195 template<
class ClusterRefT>
197 std::vector<SiStripRecHit2D> &
result)
const {
198 if (isMasked(*cluster))
return true;
200 if (!
accept(cluster, skipClusters))
return true;
202 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
203 bool isCompatible(
false);
206 std::pair<bool,double> diffEst = est.
estimate(ltp, recHit);
207 LogDebug(
"TkStripMeasurementDet")<<
" chi2=" << diffEst.second;
208 if ( diffEst.first ) {
231 conditionSet().set128StripStatus(
index(),good,
idx);
237 bool testStrips(
float utraj,
float uerr)
const;
242 std::vector<BadStripBlock>
const &
badStripBlocks()
const {
return conditionSet().badStripBlocks(
index()); }
262 return conditionSet().isMasked(
index(), cluster);
266 template<
class ClusterRefT>
269 std::vector<SiStripRecHit2D>& res)
const {
271 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
272 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){
285 if(skipClusters.empty())
return true;
286 if (r.
key()>=skipClusters.size()){
287 LogDebug(
"TkStripMeasurementDet")<<r.
key()<<
" is larger than: "<<skipClusters.size()
288 <<
"\n This must be a new cluster, and therefore should not be skiped most likely.";
292 return (not (skipClusters[r.
key()]));
virtual ~TkStripMeasurementDet()
StMeasurementConditionSet::BadStripCuts BadStripCuts
new_const_iterator clusterE
void buildSimpleRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, std::vector< SiStripRecHit2D > &res) const
const StripDetset & detSet(int i) const
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
const detset & theSet(const StMeasurementDetSet &theDets) const
edmNew::DetSet< SiStripCluster > detset
SiStripRecHit2D operator*() const
StripClusterParameterEstimator::VLocalValues VLocalValues
unsigned char subId() const
bool operator==(TkStripRecHitIter const &rh)
StripClusterParameterEstimator::LocalValues LocalValues
bool filteredRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, std::vector< SiStripRecHit2D > &result) const
BadStripCuts const & badStripCuts() const
TkStripRecHitIter(const TkStripMeasurementDet &imdet, const TrajectoryStateOnSurface &itsos, const MeasurementTrackerEvent &idata)
data_type const * const_iterator
key_type key() const
Accessor for product key.
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
const StMeasurementDetSet & stripData() const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
bool isMasked(const SiStripCluster &cluster) const
SiStripRecHit2D hit(TkStripRecHitIter const &hi) const
const GeomDet & fastGeomDet() const
StMeasurementConditionSet & conditionSet()
void setActiveThisEvent(int i, bool active)
Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call ...
bool filteredRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
std::vector< BadStripBlock > const & badStripBlocks() const
bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const
std::vector< LocalValues > VLocalValues
void buildRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const RecHitContainer &_res) const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
bool hasAllGoodChannels() const
does this module have at least one bad strip, APV or channel?
void advance(TkStripRecHitIter &hi) const
void setActiveThisEvent(StMeasurementDetSet &theDets, bool active) const
Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call ...
TkStripRecHitIter(new_const_iterator ci, new_const_iterator ce, const TkStripMeasurementDet &imdet, const TrajectoryStateOnSurface &itsos, const MeasurementTrackerEvent &idata)
StMeasurementConditionSet::BadStripBlock BadStripBlock
std::vector< SiStripCluster >::const_iterator const_iterator
std::shared_ptr< TrackingRecHit const > RecHitPointer
const TkStripMeasurementDet * mdet
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
std::vector< BadStripBlock > & getBadStripBlocks()
bool operator<(TkStripRecHitIter const &rh)
TrackingRecHit::RecHitPointer buildRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p) const
void set128StripStatus(bool good, int idx=-1)
Sets the status of a block of 128 strips (or all blocks if idx=-1)
TkStripRecHitIter & operator++()
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'...
const StripGeomDetUnit & specificGeomDet() const
void setActiveThisPeriod(StMeasurementDetSet &theDets, bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...
bool isActive(int i) const
bool isEmpty(const StMeasurementDetSet &theDets) const
std::pair< LocalPoint, LocalError > LocalValues
bool maskBad128StripBlocks() const
new_const_iterator clusterI
const StripClusterParameterEstimator * cpe() const
TrackingRecHit::ConstRecHitContainer RecHitContainer
SiStripRecHit2D::ClusterRef SiStripClusterRef
const detset & detSet(const StMeasurementDetSet &theDets) const
detset::const_iterator new_const_iterator
unsigned int rawId() const
bool hasAny128StripBad() const
detset::const_iterator new_const_iterator
StMeasurementConditionSet * theDetConditions
void setEmpty(StMeasurementDetSet &theDets) const
bool operator!=(TkStripRecHitIter const &rh)
SiStripRecHit2D buildHit() const
const StMeasurementConditionSet & conditionSet() const
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0