1 #ifndef TkStripMeasurementDet_H
2 #define TkStripMeasurementDet_H
40 : mdet(&imdet), tsos(&itsos),
data(&idata) {}
47 : mdet(&imdet), tsos(&itsos),
data(&idata), clusterI(ci), clusterE(ce) {}
57 inline void advance();
60 bool empty()
const {
return clusterI == clusterE; }
96 int index()
const {
return index_; }
98 unsigned int rawId()
const {
return conditionSet().id(
index()); }
99 unsigned char subId()
const {
return conditionSet().subId(
index()); }
123 std::vector<SiStripRecHit2D>&
result)
const;
127 std::vector<SiStripRecHit2D>&
result)
const;
140 std::vector<float>& diffs)
const override;
145 TempMeasurements&
result)
const override;
149 template <
class ClusterRefT>
152 LocalValues lv = cpe()->localParameters(*cluster, gdu, ltp);
153 return std::make_shared<SiStripRecHit2D>(lv.first, lv.second,
fastGeomDet(), cluster);
156 template <
class ClusterRefT>
162 VLocalValues vlv = cpe()->localParametersV(*cluster, gdu, ltp);
163 for (VLocalValues::const_iterator it = vlv.begin(); it != vlv.end(); ++it)
164 res.push_back(std::make_shared<SiStripRecHit2D>(it->first, it->second, fastGeomDet(), cluster));
167 template <
class ClusterRefT>
174 std::vector<float>& diffs)
const {
175 if (isMasked(*cluster))
177 if (!
accept(cluster, skipClusters))
181 auto const& vl = cpe()->localParameters(*cluster, cpepar);
186 std::pair<bool, double> diffEst = est.
estimate(ltp, recHit);
187 LogDebug(
"TkStripMeasurementDet") <<
" chi2=" << diffEst.second;
189 result.push_back(std::make_shared<SiStripRecHit2D>(recHit));
190 diffs.push_back(diffEst.second);
192 return diffEst.first;
195 template <
class ClusterRefT>
201 std::vector<SiStripRecHit2D>&
result)
const {
202 if (isMasked(*cluster))
204 if (!
accept(cluster, skipClusters))
208 auto const& vl = cpe()->localParameters(*cluster, cpepar);
209 result.emplace_back(vl.first, vl.second, fastGeomDet(), cluster);
210 std::pair<bool, double> diffEst = est.
estimate(ltp, result.back());
211 LogDebug(
"TkStripMeasurementDet") <<
" chi2=" << diffEst.second;
214 return diffEst.first;
235 bool testStrips(
float utraj,
float uerr)
const;
240 std::vector<BadStripBlock>
const&
badStripBlocks()
const {
return conditionSet().badStripBlocks(
index()); }
267 std::vector<SiStripRecHit2D>& res)
const {
271 res.reserve(alv.size());
272 for (
unsigned int i = 0;
i < clusters.
size(); ++
i)
282 if (skipClusters.empty())
284 if (key >= skipClusters.size()) {
286 << key <<
" is larger than: " << skipClusters.size()
287 <<
"\n This must be a new cluster, and therefore should not be skiped most likely.";
290 return (not(skipClusters[key]));
std::pair< LocalPoint, LocalError > LocalValues
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
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'...
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)
StripClusterParameterEstimator::LocalValues LocalValues
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 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
SiStripRecHit2D hit(TkStripRecHitIter const &hi) const
const GeomDet & fastGeomDet() const
const StripCPE * cpe() 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 ...
std::vector< BadStripBlock > const & badStripBlocks() const
tuple key
prepare the HTCondor submission files and eventually submit them
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
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 hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const override
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)
auto const good
min quality of good
TkStripRecHitIter & operator++()
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
bool maskBad128StripBlocks() const
new_const_iterator clusterI
DynArray< SiStripCluster const * > AClusters
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
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
unsigned int size() 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