1 #ifndef TkStripMeasurementDet_H
2 #define TkStripMeasurementDet_H
48 theDets().update(
index(),detSet);
50 void update( std::vector<SiStripCluster>::const_iterator
begin ,std::vector<SiStripCluster>::const_iterator
end ) {
51 theDets().update(
index(), begin, end);
54 bool isRegional()
const {
return theDets().isRegional();}
60 int index()
const {
return index_;}
62 unsigned int rawId()
const {
return theDets().id(
index()); }
63 unsigned char subId()
const {
return theDets().subId(
index());}
72 int size()
const {
return endClusterI() - beginClusterI() ; }
87 RecHitContainer &
result, std::vector<float> & diffs)
const;
91 TempMeasurements &
result)
const;
96 template<
class ClusterRefT>
100 LocalValues lv = cpe()->localParameters( *cluster, gdu, ltp);
105 template<
class ClusterRefT>
110 VLocalValues vlv = cpe()->localParametersV( *cluster, gdu, ltp);
111 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it)
116 template<
class ClusterRefT>
119 if (isMasked(*cluster))
return true;
121 if (!
accept(cluster))
return true;
122 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
123 bool isCompatible(
false);
126 std::pair<bool,double> diffEst = est.
estimate(ltp, *recHit);
127 if ( diffEst.first ) {
128 result.push_back(std::move(recHit));
129 diffs.push_back(diffEst.second);
150 theDets().set128StripStatus(
index(),good,
idx);
156 bool testStrips(
float utraj,
float uerr)
const;
183 const std::vector<bool> &
skipClusters()
const {
return theDets().clusterToSkip();}
196 return theDets().isMasked(
index(), cluster);
200 template<
class ClusterRefT>
203 std::vector<SiStripRecHit2D>& res)
const {
205 VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
206 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){
207 res.push_back(SiStripRecHit2D( it->first, it->second, rawId(), cluster));
216 if(skipClusters().
empty())
return true;
217 if (r.key()>=skipClusters().size()){
218 edm::LogError(
"WrongStripMasking")<<r.key()<<
" is larger than: "<<skipClusters().size()<<
" no skipping done";
221 return (not (skipClusters()[r.key()]));
224 if(skipClusters().
empty())
return true;
225 if (r.
key()>=skipClusters().size()){
226 LogDebug(
"TkStripMeasurementDet")<<r.
key()<<
" is larger than: "<<skipClusters().size()
227 <<
"\n This must be a new cluster, and therefore should not be skiped most likely.";
230 return (not (skipClusters()[r.
key()]));
virtual ~TkStripMeasurementDet()
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const =0
bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
bool hasAny128StripBad() const
unsigned int beginClusterI() const
StMeasurementDetSet::BadStripBlock BadStripBlock
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?
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::pair< LocalPoint, LocalError > LocalValues
const StripGeomDetUnit & specificGeomDet() const
const StripClusterParameterEstimator * cpe() const
const GeomDet & fastGeomDet() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &) const =0
edmNew::DetSet< SiStripCluster > detset
bool accept(SiStripRegionalClusterRef const &r) const
void setActiveThisEvent(bool active)
Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call ...
StMeasurementDetSet * theDets_
edm::Handle< edm::LazyGetter< SiStripCluster > > const & regionalHandle() const
void buildSimpleRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, std::vector< SiStripRecHit2D > &res) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
std::vector< LocalValues > VLocalValues
edm::Handle< edmNew::DetSetVector< SiStripCluster > > const & handle() const
StMeasurementDetSet & theDets()
unsigned char subId() const
StMeasurementDetSet & theDets() const
StMeasurementDetSet::BadStripCuts BadStripCuts
std::vector< BadStripBlock > const & badStripBlocks() const
const detset & detSet() const
const detset & theSet() const
std::vector< BadStripBlock > & getBadStripBlocks()
bool accept(SiStripClusterRef const &r) const
void buildRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const RecHitContainer &_res) const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
key_type key() const
Accessor for product key.
void update(const detset &detSet)
bool maskBad128StripBlocks() const
void update(std::vector< SiStripCluster >::const_iterator begin, std::vector< SiStripCluster >::const_iterator end)
unsigned int rawId() const
edm::LazyGetter< SiStripCluster >::value_ref SiStripRegionalClusterRef
bool filteredRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const MeasurementEstimator &est, RecHitContainer &result, std::vector< float > &diffs) const
StripClusterParameterEstimator::VLocalValues VLocalValues
unsigned int endClusterI() const
bool isActive() const
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'...
const std::vector< bool > & skipClusters() const
void setActive(bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...
BadStripCuts const & badStripCuts() const
std::vector< SiStripCluster >::const_iterator const_iterator
TransientTrackingRecHit::RecHitPointer buildRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p) const
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const =0
bool isMasked(const SiStripCluster &cluster) const
detset::const_iterator new_const_iterator
StripClusterParameterEstimator::LocalValues LocalValues
Unlimited (trivial) bounds.