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; }
111 unsigned int rawId()
const {
return conditionSet().id(
index()); }
112 unsigned char subId()
const {
return conditionSet().subId(
index());}
144 RecHitContainer &
result, std::vector<float> & diffs)
const;
149 TempMeasurements &
result)
const;
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;
223 conditionSet().set128StripStatus(
index(),good,idx);
229 bool testStrips(
float utraj,
float uerr)
const;
234 std::vector<BadStripBlock>
const &
badStripBlocks()
const {
return conditionSet().badStripBlocks(
index()); }
258 return conditionSet().isMasked(
index(), cluster);
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]));
virtual ~TkStripMeasurementDet()
DynArray< SiStripCluster const * > AClusters
StMeasurementConditionSet::BadStripCuts BadStripCuts
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
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)
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
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
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
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
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
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++()
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
bool maskBad128StripBlocks() const
new_const_iterator clusterI
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