1 #ifndef TkStripMeasurementDet_H
2 #define TkStripMeasurementDet_H
46 : mdet(&imdet),tsos(&itsos),
data(&idata), clusterI(ci), clusterE(ce) {}
57 inline void advance();
61 bool empty()
const {
return clusterI==clusterE; }
110 unsigned int rawId()
const {
return conditionSet().id(
index()); }
111 unsigned char subId()
const {
return conditionSet().subId(
index());}
143 RecHitContainer &
result, std::vector<float> & diffs)
const;
148 TempMeasurements &
result)
const;
153 template<
class ClusterRefT>
157 LocalValues lv = cpe()->localParameters( *cluster, gdu, ltp);
158 return std::make_shared<SiStripRecHit2D>( lv.first, lv.second,
fastGeomDet(), cluster);
162 template<
class ClusterRefT>
167 VLocalValues vlv = cpe()->localParametersV( *cluster, gdu, ltp);
168 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it)
169 res.push_back(std::make_shared<SiStripRecHit2D>( it->first, it->second, fastGeomDet(), cluster));
173 template<
class ClusterRefT>
176 if (isMasked(*cluster))
return true;
178 if (!
accept(cluster, skipClusters))
return true;
180 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
181 bool isCompatible(
false);
184 std::pair<bool,double> diffEst = est.
estimate(ltp, recHit);
185 LogDebug(
"TkStripMeasurementDet")<<
" chi2=" << diffEst.second;
186 if ( diffEst.first ) {
187 result.push_back(std::move(std::make_shared<SiStripRecHit2D>(recHit)));
188 diffs.push_back(diffEst.second);
196 template<
class ClusterRefT>
198 std::vector<SiStripRecHit2D> &
result)
const {
199 if (isMasked(*cluster))
return true;
201 if (!
accept(cluster, skipClusters))
return true;
203 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
204 bool isCompatible(
false);
207 std::pair<bool,double> diffEst = est.
estimate(ltp, recHit);
208 LogDebug(
"TkStripMeasurementDet")<<
" chi2=" << diffEst.second;
209 if ( diffEst.first ) {
210 result.push_back(std::move(recHit));
232 conditionSet().set128StripStatus(
index(),good,
idx);
238 bool testStrips(
float utraj,
float uerr)
const;
243 std::vector<BadStripBlock>
const &
badStripBlocks()
const {
return conditionSet().badStripBlocks(
index()); }
263 return conditionSet().isMasked(
index(), cluster);
267 template<
class ClusterRefT>
270 std::vector<SiStripRecHit2D>& res)
const {
272 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
273 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){
286 if(skipClusters.empty())
return true;
287 if (r.
key()>=skipClusters.size()){
288 LogDebug(
"TkStripMeasurementDet")<<r.
key()<<
" is larger than: "<<skipClusters.size()
289 <<
"\n This must be a new cluster, and therefore should not be skiped most likely.";
293 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
char data[epos_bytes_allocation]
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