1 #ifndef TkStripMeasurementDet_H
2 #define TkStripMeasurementDet_H
29 class TkStripMeasurementDet;
42 const TkStripMeasurementDet & imdet,
48 const TkStripMeasurementDet *
mdet = 0;
55 inline SiStripRecHit2D
buildHit()
const;
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;
178 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
179 bool isCompatible(
false);
181 SiStripRecHit2D recHit(vl.first, vl.second, fastGeomDet(), cluster);
182 std::pair<bool,double> diffEst = est.
estimate(ltp, recHit);
183 LogDebug(
"TkStripMeasurementDet")<<
" chi2=" << diffEst.second;
184 if ( diffEst.first ) {
185 result.push_back(std::move(std::make_shared<SiStripRecHit2D>(recHit)));
186 diffs.push_back(diffEst.second);
194 template<
class ClusterRefT>
196 std::vector<SiStripRecHit2D> &
result)
const {
197 if (isMasked(*cluster))
return true;
199 if (!
accept(cluster, skipClusters))
return true;
200 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
201 bool isCompatible(
false);
203 auto && recHit = SiStripRecHit2D( vl.first, vl.second, gdu, cluster);
204 std::pair<bool,double> diffEst = est.
estimate(ltp, recHit);
205 LogDebug(
"TkStripMeasurementDet")<<
" chi2=" << diffEst.second;
206 if ( diffEst.first ) {
207 result.push_back(std::move(recHit));
229 conditionSet().set128StripStatus(
index(),good,
idx);
235 bool testStrips(
float utraj,
float uerr)
const;
240 std::vector<BadStripBlock>
const &
badStripBlocks()
const {
return conditionSet().badStripBlocks(
index()); }
260 return conditionSet().isMasked(
index(), cluster);
264 template<
class ClusterRefT>
267 std::vector<SiStripRecHit2D>& res)
const {
269 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
270 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){
271 res.push_back(SiStripRecHit2D( it->first, it->second, gdu, cluster));
283 if(skipClusters.empty())
return true;
284 if (r.key()>=skipClusters.size()){
285 LogDebug(
"TkStripMeasurementDet")<<r.key()<<
" is larger than: "<<skipClusters.size()
286 <<
"\n This must be a new cluster, and therefore should not be skiped most likely.";
290 return (not (skipClusters[r.key()]));
298 return mdet->hit(*
this);
302 mdet->advance(*
this);
const StMeasurementConditionSet & conditionSet() const
virtual ~TkStripMeasurementDet()
bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const
new_const_iterator clusterE
const StripDetset & detSet(int i) const
const TrajectoryStateOnSurface * tsos
StMeasurementConditionSet::BadStripBlock BadStripBlock
SiStripRecHit2D operator*() const
bool operator==(TkStripRecHitIter const &rh)
bool hasAny128StripBad() const
TrackingRecHit::RecHitPointer buildRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p) const
std::vector< ConstRecHitPointer > RecHitContainer
TkStripRecHitIter(const TkStripMeasurementDet &imdet, const TrajectoryStateOnSurface &itsos, const MeasurementTrackerEvent &idata)
data_type const * const_iterator
void set128StripStatus(bool good, int idx=-1)
Sets the status of a block of 128 strips (or all blocks if idx=-1)
bool hasAllGoodChannels() const
does this module have at least one bad strip, APV or channel?
const StMeasurementDetSet & stripData() const
StMeasurementConditionSet & conditionSet()
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
const StripGeomDetUnit & specificGeomDet() const
const StripClusterParameterEstimator * cpe() const
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'...
const MeasurementTrackerEvent * data
const GeomDet & fastGeomDet() const
const detset & theSet(const StMeasurementDetSet &theDets) const
edmNew::DetSet< SiStripCluster > detset
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 ...
void setActiveThisPeriod(StMeasurementDetSet &theDets, bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...
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 ...
void buildSimpleRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, std::vector< SiStripRecHit2D > &res) const
std::vector< LocalValues > VLocalValues
SiStripRecHit2D::ClusterRef SiStripClusterRef
bool filteredRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, std::vector< SiStripRecHit2D > &result) const
const detset & detSet(const StMeasurementDetSet &theDets) const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
TkStripRecHitIter(new_const_iterator ci, new_const_iterator ce, const TkStripMeasurementDet &imdet, const TrajectoryStateOnSurface &itsos, const MeasurementTrackerEvent &idata)
unsigned char subId() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
const TkStripMeasurementDet * mdet
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
std::vector< BadStripBlock > const & badStripBlocks() const
bool operator<(TkStripRecHitIter const &rh)
std::vector< BadStripBlock > & getBadStripBlocks()
TkStripRecHitIter & operator++()
void buildRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const RecHitContainer &_res) const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
StMeasurementConditionSet::BadStripCuts BadStripCuts
bool isActive(int i) const
bool maskBad128StripBlocks() const
std::pair< LocalPoint, LocalError > LocalValues
new_const_iterator clusterI
void setEmpty(StMeasurementDetSet &theDets) const
unsigned int rawId() const
char data[epos_bytes_allocation]
bool filteredRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
StripClusterParameterEstimator::VLocalValues VLocalValues
bool isEmpty(const StMeasurementDetSet &theDets) const
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
BadStripCuts const & badStripCuts() const
std::vector< SiStripCluster >::const_iterator const_iterator
detset::const_iterator new_const_iterator
bool operator!=(TkStripRecHitIter const &rh)
bool isMasked(const SiStripCluster &cluster) const
SiStripRecHit2D buildHit() const
detset::const_iterator new_const_iterator
StripClusterParameterEstimator::LocalValues LocalValues
StMeasurementConditionSet * theDetConditions
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0
Unlimited (trivial) bounds.