1 #ifndef TkStripMeasurementDet_H 2 #define TkStripMeasurementDet_H 47 : mdet(&imdet),tsos(&itsos),
data(&idata), clusterI(ci), clusterE(ce) {}
58 inline void advance();
62 bool empty()
const {
return clusterI==clusterE; }
154 template<
class ClusterRefT>
158 LocalValues lv = cpe()->localParameters( *cluster, gdu, ltp);
159 return std::make_shared<SiStripRecHit2D>( lv.first, lv.second,
fastGeomDet(), cluster);
163 template<
class ClusterRefT>
168 VLocalValues vlv = cpe()->localParametersV( *cluster, gdu, ltp);
169 for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it)
170 res.push_back(std::make_shared<SiStripRecHit2D>( it->first, it->second, fastGeomDet(), cluster));
174 template<
class ClusterRefT>
178 if (isMasked(*cluster))
return true;
179 if (!
accept(cluster, skipClusters))
return true;
181 auto const & vl = cpe()->localParameters( *cluster, cpepar);
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);
189 return diffEst.first;
193 template<
class ClusterRefT>
196 std::vector<SiStripRecHit2D> & result)
const {
197 if (isMasked(*cluster))
return true;
198 if (!
accept(cluster, skipClusters))
return true;
200 auto const & vl = cpe()->localParameters( *cluster, cpepar);
201 result.emplace_back( vl.first, vl.second, fastGeomDet(), cluster);
202 std::pair<bool,double> diffEst = est.
estimate(ltp, result.back());
203 LogDebug(
"TkStripMeasurementDet")<<
" chi2=" << diffEst.second;
204 if ( !diffEst.first ) result.pop_back();
205 return diffEst.first;
229 bool testStrips(
float utraj,
float uerr)
const;
263 const detset & detSet,
265 std::vector<SiStripRecHit2D>&
res)
const {
269 res.reserve(alv.size());
270 for (
unsigned int i=0;
i< clusters.
size(); ++
i)
287 if(skipClusters.empty())
return true;
288 if (key>=skipClusters.size()){
289 LogDebug(
"TkStripMeasurementDet")<<key<<
" is larger than: "<<skipClusters.size()
290 <<
"\n This must be a new cluster, and therefore should not be skiped most likely.";
293 return (not (skipClusters[key]));
302 return mdet->
hit(*
this);
306 mdet->advance(*
this);
bool isMasked(int i, const SiStripCluster &cluster) const
DynArray< SiStripCluster const * > AClusters
StMeasurementConditionSet::BadStripCuts BadStripCuts
~TkStripMeasurementDet() override
bool filteredRecHits(const ClusterRefT &cluster, StripCPE::AlgoParam const &cpepar, const TrajectoryStateOnSurface <p, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
new_const_iterator clusterE
int totalStrips(int i) const
const StripDetset & detSet(int i) const
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
const detset & theSet(const StMeasurementDetSet &theDets) const
const LocalTrajectoryParameters & localParameters() const
edmNew::DetSet< SiStripCluster > detset
SiStripRecHit2D operator*() const
StripClusterParameterEstimator::VLocalValues VLocalValues
unsigned char subId() const
bool operator==(TkStripRecHitIter const &rh)
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'...
StripClusterParameterEstimator::LocalValues LocalValues
BadStripCuts const & badStripCuts() const
TkStripRecHitIter(const TkStripMeasurementDet &imdet, const TrajectoryStateOnSurface &itsos, const MeasurementTrackerEvent &idata)
std::pair< LocalPoint, LocalError > LocalValues
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 filteredRecHits(const ClusterRefT &cluster, StripCPE::AlgoParam const &cpepar, const TrajectoryStateOnSurface <p, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, std::vector< SiStripRecHit2D > &result) const
bool isMasked(const SiStripCluster &cluster) const
bool accept(unsigned int key, const std::vector< bool > &skipClusters) const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
const GeomDet & fastGeomDet() const
const StripCPE * cpe() const
const BadStripCuts & badStripCuts(int i) const
unsigned int id(int i) 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 ...
void setActive(int i, bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...
std::vector< BadStripBlock > & getBadStripBlocks(int i)
std::vector< BadStripBlock > const & badStripBlocks() const
BaseTrackerRecHit const * hit() const final
bool hasAny128StripBad(int i) const
std::vector< LocalValues > VLocalValues
const StripClusterParameterEstimator * stripCPE() const
void buildRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface <p, const RecHitContainer &_res) const
bool hasAllGoodChannels() const
does this module have at least one bad strip, APV or channel?
DynArray< LocalValues > ALocalValues
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
bool maskBad128StripBlocks() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
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++()
const StripGeomDetUnit & specificGeomDet() const
bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const override
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
bool maskBad128StripBlocks() const
new_const_iterator clusterI
TrackingRecHit::ConstRecHitContainer RecHitContainer
std::vector< BaseTrackerRecHit * > SimpleHitContainer
SiStripRecHit2D::ClusterRef SiStripClusterRef
const detset & detSet(const StMeasurementDetSet &theDets) const
char data[epos_bytes_allocation]
detset::const_iterator new_const_iterator
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0
std::vector< BadStripBlock > const & badStripBlocks(int i) const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
unsigned int rawId() const
void buildSimpleRecHits(AClusters const &clusters, const MeasurementTrackerEvent &data, const detset &detSet, const TrajectoryStateOnSurface <p, std::vector< SiStripRecHit2D > &res) const
#define declareDynArray(T, n, x)
bool hasAny128StripBad() const
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(HandleT const &handle, const_iterator ci) const
void set128StripStatus(int i, bool good, int idx=-1)
unsigned int size() const
detset::const_iterator new_const_iterator
StMeasurementConditionSet * theDetConditions
unsigned char subId(int i) const
void setEmpty(StMeasurementDetSet &theDets) const
bool operator!=(TkStripRecHitIter const &rh)
SiStripRecHit2D buildHit() const
const StMeasurementConditionSet & conditionSet() const