CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
TkStripMeasurementDet Class Referencefinal

#include <TkStripMeasurementDet.h>

Inheritance diagram for TkStripMeasurementDet:
MeasurementDet

Public Types

typedef StMeasurementConditionSet::BadStripBlock BadStripBlock
 
typedef StMeasurementConditionSet::BadStripCuts BadStripCuts
 
typedef std::vector< SiStripCluster >::const_iterator const_iterator
 
typedef edmNew::DetSet< SiStripClusterdetset
 
typedef StripClusterParameterEstimator::LocalValues LocalValues
 
typedef detset::const_iterator new_const_iterator
 
typedef SiStripRecHit2D::ClusterRef SiStripClusterRef
 
typedef StripClusterParameterEstimator::VLocalValues VLocalValues
 
- Public Types inherited from MeasurementDet
typedef TrackingRecHit::ConstRecHitContainer RecHitContainer
 
using SimpleHitContainer = std::vector< BaseTrackerRecHit * >
 
typedef tracking::TempMeasurements TempMeasurements
 

Public Member Functions

bool accept (SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
 
bool accept (unsigned int key, const std::vector< bool > &skipClusters) const
 
void advance (TkStripRecHitIter &hi) const
 
std::vector< BadStripBlock > const & badStripBlocks () const
 
template<class ClusterRefT >
TrackingRecHit::RecHitPointer buildRecHit (const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp) const
 
template<class ClusterRefT >
void buildRecHits (const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp, const RecHitContainer &_res) const
 
const detsetdetSet (const StMeasurementDetSet &theDets) const
 
bool empty (const MeasurementTrackerEvent &data) const
 
template<class ClusterRefT >
bool filteredRecHits (const ClusterRefT &cluster, StripCPE::AlgoParam const &cpepar, const TrajectoryStateOnSurface &ltp, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
 
template<class ClusterRefT >
bool filteredRecHits (const ClusterRefT &cluster, StripCPE::AlgoParam const &cpepar, const TrajectoryStateOnSurface &ltp, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, std::vector< SiStripRecHit2D > &result) const
 
std::vector< BadStripBlock > & getBadStripBlocks ()
 
bool hasAllGoodChannels () const
 does this module have at least one bad strip, APV or channel? More...
 
bool hasBadComponents (const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const override
 
SiStripRecHit2D hit (TkStripRecHitIter const &hi) const
 
std::tuple< TkStripRecHitIter, TkStripRecHitIterhitRange (const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const
 
int index () const
 
bool isActive (const MeasurementTrackerEvent &data) const override
 Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'. More...
 
bool isEmpty (const StMeasurementDetSet &theDets) const
 
bool maskBad128StripBlocks () const
 
bool measurements (const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const override
 
unsigned int rawId () const
 
RecHitContainer recHits (const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const override
 
bool recHits (SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const override
 
bool recHits (const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, RecHitContainer &result, std::vector< float > &diffs) const override
 
void set128StripStatus (bool good, int idx=-1)
 Sets the status of a block of 128 strips (or all blocks if idx=-1) More...
 
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 to 'update' or 'setEmpty'. More...
 
void setActiveThisPeriod (StMeasurementDetSet &theDets, bool active)
 Turn on/off the module for reconstruction, for the full run or lumi (using info from DB, usually). More...
 
void setEmpty (StMeasurementDetSet &theDets) const
 
void setIndex (int i)
 
void simpleRecHits (const TrajectoryStateOnSurface &ts, const MeasurementTrackerEvent &data, std::vector< SiStripRecHit2D > &result) const
 
bool simpleRecHits (const TrajectoryStateOnSurface &ts, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, std::vector< SiStripRecHit2D > &result) const
 
const StripGeomDetUnitspecificGeomDet () const
 
unsigned char subId () const
 
bool testStrips (float utraj, float uerr) const
 return true if there are 'enough' good strips in the utraj +/- 3 uerr range. More...
 
const detsettheSet (const StMeasurementDetSet &theDets) const
 
 TkStripMeasurementDet (const GeomDet *gdet, StMeasurementConditionSet &conditionSet)
 
 ~TkStripMeasurementDet () override
 
- Public Member Functions inherited from MeasurementDet
const GeomDetfastGeomDet () const
 
std::vector< TrajectoryMeasurementfastMeasurements (const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &est, const MeasurementTrackerEvent &data) const
 
virtual const GeomDetgeomDet () const
 
 MeasurementDet (const GeomDet *gdet)
 
const Surface::PositionTypeposition () const
 
const Surfacesurface () const
 
virtual ~MeasurementDet ()=default
 

Private Types

using AClusters = StripClusterParameterEstimator::AClusters
 
using ALocalValues = StripClusterParameterEstimator::ALocalValues
 

Private Member Functions

BadStripCuts const & badStripCuts () const
 
void buildSimpleRecHits (AClusters const &clusters, const MeasurementTrackerEvent &data, const detset &detSet, const TrajectoryStateOnSurface &ltp, std::vector< SiStripRecHit2D > &res) const
 
StMeasurementConditionSetconditionSet ()
 
const StMeasurementConditionSetconditionSet () const
 
const StripCPEcpe () const
 
bool hasAny128StripBad () const
 
bool isMasked (const SiStripCluster &cluster) const
 
int totalStrips () const
 

Private Attributes

int index_
 
StMeasurementConditionSettheDetConditions
 

Additional Inherited Members

- Protected Attributes inherited from MeasurementDet
TrackingRecHit::ConstRecHitPointer theInactiveHit
 
TrackingRecHit::ConstRecHitPointer theMissingHit
 

Detailed Description

Definition at line 74 of file TkStripMeasurementDet.h.

Member Typedef Documentation

◆ AClusters

Definition at line 245 of file TkStripMeasurementDet.h.

◆ ALocalValues

Definition at line 246 of file TkStripMeasurementDet.h.

◆ BadStripBlock

Definition at line 237 of file TkStripMeasurementDet.h.

◆ BadStripCuts

Definition at line 232 of file TkStripMeasurementDet.h.

◆ const_iterator

Definition at line 84 of file TkStripMeasurementDet.h.

◆ detset

Definition at line 81 of file TkStripMeasurementDet.h.

◆ LocalValues

Definition at line 76 of file TkStripMeasurementDet.h.

◆ new_const_iterator

Definition at line 82 of file TkStripMeasurementDet.h.

◆ SiStripClusterRef

Definition at line 79 of file TkStripMeasurementDet.h.

◆ VLocalValues

Definition at line 77 of file TkStripMeasurementDet.h.

Constructor & Destructor Documentation

◆ ~TkStripMeasurementDet()

TkStripMeasurementDet::~TkStripMeasurementDet ( )
inlineoverride

Definition at line 86 of file TkStripMeasurementDet.h.

86 {}

◆ TkStripMeasurementDet()

TkStripMeasurementDet::TkStripMeasurementDet ( const GeomDet gdet,
StMeasurementConditionSet conditionSet 
)

Definition at line 16 of file TkStripMeasurementDet.cc.

18  if (dynamic_cast<const StripGeomDetUnit*>(gdet) == nullptr) {
19  throw MeasurementDetException("TkStripMeasurementDet constructed with a GeomDet which is not a StripGeomDetUnit");
20  }
21 }
MeasurementDet(const GeomDet *gdet)
StMeasurementConditionSet * theDetConditions

Member Function Documentation

◆ accept() [1/2]

bool TkStripMeasurementDet::accept ( SiStripClusterRef const &  r,
const std::vector< bool > &  skipClusters 
) const
inline

Definition at line 277 of file TkStripMeasurementDet.h.

References accept(), alignCSCRings::r, and HLTSiStripMonitoring_cff::skipClusters.

Referenced by advance(), empty(), esMonitoring.FDJsonServer::handle_accept(), recHits(), and simpleRecHits().

277  {
278  return accept(r.key(), skipClusters);
279  }
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const

◆ accept() [2/2]

bool TkStripMeasurementDet::accept ( unsigned int  key,
const std::vector< bool > &  skipClusters 
) const
inline

Definition at line 281 of file TkStripMeasurementDet.h.

References crabWrapper::key, LogDebug, and HLTSiStripMonitoring_cff::skipClusters.

Referenced by esMonitoring.FDJsonServer::handle_accept().

281  {
282  if (skipClusters.empty())
283  return true;
284  if (key >= skipClusters.size()) {
285  LogDebug("TkStripMeasurementDet")
286  << key << " is larger than: " << skipClusters.size()
287  << "\n This must be a new cluster, and therefore should not be skiped most likely.";
288  return true;
289  }
290  return (not(skipClusters[key]));
291  }
#define LogDebug(id)

◆ advance()

void TkStripMeasurementDet::advance ( TkStripRecHitIter hi) const

Definition at line 250 of file TkStripMeasurementDet.cc.

References accept(), data, isMasked(), and edmNew::makeRefTo().

Referenced by TkStripRecHitIter::advance().

250  {
251  while (!hi.empty()) {
252  auto ci = hi.clusterI;
253  auto const& data = *hi.data;
254  if (isMasked(*ci))
255  continue;
256  SiStripClusterRef cluster = edmNew::makeRefTo(data.stripData().handle(), ci);
257  if (accept(cluster, data.stripClustersToSkip()))
258  return;
259  ++hi.clusterI;
260  }
261 }
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
Definition: EPCuts.h:4
bool isMasked(const SiStripCluster &cluster) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ badStripBlocks()

std::vector<BadStripBlock> const& TkStripMeasurementDet::badStripBlocks ( ) const
inline

Definition at line 240 of file TkStripMeasurementDet.h.

Referenced by testStrips().

240 { return conditionSet().badStripBlocks(index()); }
StMeasurementConditionSet & conditionSet()
std::vector< BadStripBlock > const & badStripBlocks(int i) const

◆ badStripCuts()

BadStripCuts const& TkStripMeasurementDet::badStripCuts ( ) const
inlineprivate

Definition at line 257 of file TkStripMeasurementDet.h.

Referenced by testStrips().

257 { return conditionSet().badStripCuts(index()); }
StMeasurementConditionSet & conditionSet()
const BadStripCuts & badStripCuts(int i) const

◆ buildRecHit()

template<class ClusterRefT >
TrackingRecHit::RecHitPointer TkStripMeasurementDet::buildRecHit ( const ClusterRefT &  cluster,
const TrajectoryStateOnSurface ltp 
) const
inline

Definition at line 150 of file TkStripMeasurementDet.h.

References MeasurementDet::fastGeomDet().

Referenced by recHits().

150  {
151  const GeomDetUnit& gdu(specificGeomDet());
152  LocalValues lv = cpe()->localParameters(*cluster, gdu, ltp);
153  return std::make_shared<SiStripRecHit2D>(lv.first, lv.second, fastGeomDet(), cluster);
154  }
const StripGeomDetUnit & specificGeomDet() const
StripClusterParameterEstimator::LocalValues LocalValues
const StripCPE * cpe() const
StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster &cl, const GeomDetUnit &) const override
Definition: StripCPE.cc:62
const GeomDet & fastGeomDet() const

◆ buildRecHits()

template<class ClusterRefT >
void TkStripMeasurementDet::buildRecHits ( const ClusterRefT &  cluster,
const TrajectoryStateOnSurface ltp,
const RecHitContainer _res 
) const
inline

Definition at line 157 of file TkStripMeasurementDet.h.

159  {
160  RecHitContainer res = _res;
161  const GeomDetUnit& gdu(specificGeomDet());
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));
165  }
const StripGeomDetUnit & specificGeomDet() const
StripClusterParameterEstimator::VLocalValues VLocalValues
const StripCPE * cpe() const
virtual VLocalValues localParametersV(const SiStripCluster &cluster, const GeomDetUnit &gd) const
Definition: Electron.h:6
const GeomDet & fastGeomDet() const
TrackingRecHit::ConstRecHitContainer RecHitContainer

◆ buildSimpleRecHits()

void TkStripMeasurementDet::buildSimpleRecHits ( AClusters const &  clusters,
const MeasurementTrackerEvent data,
const detset detSet,
const TrajectoryStateOnSurface ltp,
std::vector< SiStripRecHit2D > &  res 
) const
inlineprivate

Definition at line 263 of file TkStripMeasurementDet.h.

References bsc_activity_cfg::clusters, data, declareDynArray, mps_fire::i, TrajectoryStateOnSurface::localParameters(), and edmNew::DetSet< T >::makeRefTo().

Referenced by simpleRecHits().

267  {
268  const GeomDetUnit& gdu(specificGeomDet());
269  declareDynArray(LocalValues, clusters.size(), alv);
270  cpe()->localParameters(clusters, alv, gdu, ltp.localParameters());
271  res.reserve(alv.size());
272  for (unsigned int i = 0; i < clusters.size(); ++i)
273  res.emplace_back(alv[i].first, alv[i].second, gdu, detSet.makeRefTo(data.stripData().handle(), clusters[i]));
274  }
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(HandleT const &handle, const_iterator ci) const
Definition: DetSetNew.h:70
const StripGeomDetUnit & specificGeomDet() const
StripClusterParameterEstimator::LocalValues LocalValues
const StripCPE * cpe() const
const LocalTrajectoryParameters & localParameters() const
Definition: Electron.h:6
StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster &cl, const GeomDetUnit &) const override
Definition: StripCPE.cc:62
const detset & detSet(const StMeasurementDetSet &theDets) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
#define declareDynArray(T, n, x)
Definition: DynArray.h:91

◆ conditionSet() [1/2]

StMeasurementConditionSet& TkStripMeasurementDet::conditionSet ( )
inlineprivate

Definition at line 250 of file TkStripMeasurementDet.h.

250 { return *theDetConditions; }
StMeasurementConditionSet * theDetConditions

◆ conditionSet() [2/2]

const StMeasurementConditionSet& TkStripMeasurementDet::conditionSet ( ) const
inlineprivate

Definition at line 251 of file TkStripMeasurementDet.h.

251 { return *theDetConditions; }
StMeasurementConditionSet * theDetConditions

◆ cpe()

const StripCPE* TkStripMeasurementDet::cpe ( ) const
inlineprivate

Definition at line 253 of file TkStripMeasurementDet.h.

Referenced by hit(), recHits(), and simpleRecHits().

253 { return static_cast<const StripCPE*>(conditionSet().stripCPE()); }
const StripClusterParameterEstimator * stripCPE() const
StMeasurementConditionSet & conditionSet()

◆ detSet()

const detset& TkStripMeasurementDet::detSet ( const StMeasurementDetSet theDets) const
inline

Definition at line 102 of file TkStripMeasurementDet.h.

References StMeasurementDetSet::detSet().

Referenced by empty(), hitRange(), recHits(), and simpleRecHits().

102 { return theDets.detSet(index()); }
const StripDetset & detSet(int i) const

◆ empty()

bool TkStripMeasurementDet::empty ( const MeasurementTrackerEvent data) const

Definition at line 24 of file TkStripMeasurementDet.cc.

References accept(), edmNew::DetSet< T >::begin(), data, detSet(), edmNew::DetSet< T >::end(), index(), isActive(), isEmpty(), isMasked(), edmNew::DetSet< T >::makeRefTo(), and UNLIKELY.

24  {
25  if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData()))
26  return true;
27 
28  const detset& detSet = data.stripData().detSet(index());
29  for (auto ci = detSet.begin(); ci != detSet.end(); ++ci) {
30  if (isMasked(*ci))
31  continue;
32  SiStripClusterRef cluster = detSet.makeRefTo(data.stripData().handle(), ci);
33  if (accept(cluster, data.stripClustersToSkip()))
34  return false;
35  }
36  return true;
37 }
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(HandleT const &handle, const_iterator ci) const
Definition: DetSetNew.h:70
edmNew::DetSet< SiStripCluster > detset
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
return((rh ^ lh) &mask)
bool isEmpty(const StMeasurementDetSet &theDets) const
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
bool isMasked(const SiStripCluster &cluster) const
const detset & detSet(const StMeasurementDetSet &theDets) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
#define UNLIKELY(x)
Definition: Likely.h:21

◆ filteredRecHits() [1/2]

template<class ClusterRefT >
bool TkStripMeasurementDet::filteredRecHits ( const ClusterRefT &  cluster,
StripCPE::AlgoParam const &  cpepar,
const TrajectoryStateOnSurface ltp,
const MeasurementEstimator est,
const std::vector< bool > &  skipClusters,
RecHitContainer result,
std::vector< float > &  diffs 
) const
inline

Definition at line 168 of file TkStripMeasurementDet.h.

References accept(), MeasurementEstimator::estimate(), LogDebug, MeasurementEstimator::preFilter(), nano_mu_digi_cff::rawId, rpcPointValidation_cfi::recHit, mps_fire::result, and HLTSiStripMonitoring_cff::skipClusters.

Referenced by recHits(), and simpleRecHits().

174  {
175  if (isMasked(*cluster))
176  return true;
177  if (!accept(cluster, skipClusters))
178  return true;
179  if (!est.preFilter(ltp, ClusterFilterPayload(rawId(), &*cluster)))
180  return true; // avoids shadow; consistent with previous statement...
181  auto const& vl = cpe()->localParameters(*cluster, cpepar);
182  SiStripRecHit2D recHit(vl.first,
183  vl.second,
184  fastGeomDet(),
185  cluster); // FIXME add cluster count in OmniRef (and move again to multiple sub-clusters..)
186  std::pair<bool, double> diffEst = est.estimate(ltp, recHit);
187  LogDebug("TkStripMeasurementDet") << " chi2=" << diffEst.second;
188  if (diffEst.first) {
189  result.push_back(std::make_shared<SiStripRecHit2D>(recHit));
190  diffs.push_back(diffEst.second);
191  }
192  return diffEst.first;
193  }
unsigned int rawId() const
const StripCPE * cpe() const
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster &cl, const GeomDetUnit &) const override
Definition: StripCPE.cc:62
bool isMasked(const SiStripCluster &cluster) const
const GeomDet & fastGeomDet() const
#define LogDebug(id)

◆ filteredRecHits() [2/2]

template<class ClusterRefT >
bool TkStripMeasurementDet::filteredRecHits ( const ClusterRefT &  cluster,
StripCPE::AlgoParam const &  cpepar,
const TrajectoryStateOnSurface ltp,
const MeasurementEstimator est,
const std::vector< bool > &  skipClusters,
std::vector< SiStripRecHit2D > &  result 
) const
inline

Definition at line 196 of file TkStripMeasurementDet.h.

References accept(), MeasurementEstimator::estimate(), LogDebug, MeasurementEstimator::preFilter(), nano_mu_digi_cff::rawId, mps_fire::result, and HLTSiStripMonitoring_cff::skipClusters.

201  {
202  if (isMasked(*cluster))
203  return true;
204  if (!accept(cluster, skipClusters))
205  return true;
206  if (!est.preFilter(ltp, ClusterFilterPayload(rawId(), &*cluster)))
207  return true; // avoids shadow; consistent with previous statement...
208  auto const& vl = cpe()->localParameters(*cluster, cpepar);
209  result.emplace_back(vl.first, vl.second, fastGeomDet(), cluster); // FIXME add cluster count in OmniRef
210  std::pair<bool, double> diffEst = est.estimate(ltp, result.back());
211  LogDebug("TkStripMeasurementDet") << " chi2=" << diffEst.second;
212  if (!diffEst.first)
213  result.pop_back();
214  return diffEst.first;
215  }
unsigned int rawId() const
const StripCPE * cpe() const
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster &cl, const GeomDetUnit &) const override
Definition: StripCPE.cc:62
bool isMasked(const SiStripCluster &cluster) const
const GeomDet & fastGeomDet() const
#define LogDebug(id)

◆ getBadStripBlocks()

std::vector<BadStripBlock>& TkStripMeasurementDet::getBadStripBlocks ( )
inline

Definition at line 239 of file TkStripMeasurementDet.h.

239 { return conditionSet().getBadStripBlocks(index()); }
StMeasurementConditionSet & conditionSet()
std::vector< BadStripBlock > & getBadStripBlocks(int i)

◆ hasAllGoodChannels()

bool TkStripMeasurementDet::hasAllGoodChannels ( ) const
inline

does this module have at least one bad strip, APV or channel?

Definition at line 227 of file TkStripMeasurementDet.h.

Referenced by TkGluedMeasurementDet::measurements().

227 { return (!hasAny128StripBad()) && badStripBlocks().empty(); }
std::vector< BadStripBlock > const & badStripBlocks() const

◆ hasAny128StripBad()

bool TkStripMeasurementDet::hasAny128StripBad ( ) const
inlineprivate

Definition at line 259 of file TkStripMeasurementDet.h.

259 { return conditionSet().hasAny128StripBad(index()); }
StMeasurementConditionSet & conditionSet()
bool hasAny128StripBad(int i) const

◆ hasBadComponents()

bool TkStripMeasurementDet::hasBadComponents ( const TrajectoryStateOnSurface tsos,
const MeasurementTrackerEvent data 
) const
inlineoverridevirtual

Implements MeasurementDet.

Definition at line 108 of file TkStripMeasurementDet.h.

108  {
109  return false;
110  }

◆ hit()

SiStripRecHit2D TkStripMeasurementDet::hit ( TkStripRecHitIter const &  hi) const

Definition at line 263 of file TkStripMeasurementDet.cc.

References cpe(), data, StripCPE::localParameters(), edmNew::makeRefTo(), and specificGeomDet().

Referenced by TkStripRecHitIter::buildHit(), recHits(), and simpleRecHits().

263  {
264  const GeomDetUnit& gdu(specificGeomDet());
265  auto ci = hi.clusterI;
266  auto const& data = *hi.data;
267  auto const& ltp = *hi.tsos;
268 
269  SiStripClusterRef cluster = edmNew::makeRefTo(data.stripData().handle(), ci);
270  LocalValues lv = cpe()->localParameters(*cluster, gdu, ltp);
271  return SiStripRecHit2D(lv.first, lv.second, gdu, cluster);
272 }
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
const StripGeomDetUnit & specificGeomDet() const
StripClusterParameterEstimator::LocalValues LocalValues
const StripCPE * cpe() const
Definition: EPCuts.h:4
StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster &cl, const GeomDetUnit &) const override
Definition: StripCPE.cc:62
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ hitRange()

std::tuple< TkStripRecHitIter, TkStripRecHitIter > TkStripMeasurementDet::hitRange ( const TrajectoryStateOnSurface ts,
const MeasurementTrackerEvent data 
) const

Definition at line 241 of file TkStripMeasurementDet.cc.

References edmNew::DetSet< T >::begin(), data, detSet(), edmNew::DetSet< T >::end(), index(), isActive(), and isEmpty().

242  {
243  if (isEmpty(data.stripData()) || !isActive(data))
244  return std::tuple<TkStripRecHitIter, TkStripRecHitIter>();
245  const detset& detSet = data.stripData().detSet(index());
246  return std::make_tuple(TkStripRecHitIter(detSet.begin(), detSet.end(), *this, ts, data),
247  TkStripRecHitIter(detSet.end(), detSet.end(), *this, ts, data));
248 }
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
edmNew::DetSet< SiStripCluster > detset
bool isEmpty(const StMeasurementDetSet &theDets) const
const detset & detSet(const StMeasurementDetSet &theDets) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
iterator end()
Definition: DetSetNew.h:53
iterator begin()
Definition: DetSetNew.h:51

◆ index()

int TkStripMeasurementDet::index ( ) const
inline

Definition at line 96 of file TkStripMeasurementDet.h.

Referenced by empty(), hitRange(), recHits(), and simpleRecHits().

◆ isActive()

bool TkStripMeasurementDet::isActive ( const MeasurementTrackerEvent data) const
inlineoverridevirtual

Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'.

Implements MeasurementDet.

Definition at line 105 of file TkStripMeasurementDet.h.

References data.

Referenced by empty(), hitRange(), TkGluedMeasurementDet::measurements(), measurements(), TkGluedMeasurementDet::recHits(), recHits(), and simpleRecHits().

105 { return data.stripData().isActive(index()); }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ isEmpty()

bool TkStripMeasurementDet::isEmpty ( const StMeasurementDetSet theDets) const
inline

Definition at line 94 of file TkStripMeasurementDet.h.

References StMeasurementDetSet::empty().

Referenced by plotting.Plot::clone(), empty(), hitRange(), measurements(), recHits(), and simpleRecHits().

94 { return theDets.empty(index()); }
bool empty(int i) const

◆ isMasked()

bool TkStripMeasurementDet::isMasked ( const SiStripCluster cluster) const
inlineprivate

Definition at line 261 of file TkStripMeasurementDet.h.

Referenced by advance(), empty(), recHits(), and simpleRecHits().

261 { return conditionSet().isMasked(index(), cluster); }
StMeasurementConditionSet & conditionSet()
bool isMasked(int i, const SiStripCluster &cluster) const

◆ maskBad128StripBlocks()

bool TkStripMeasurementDet::maskBad128StripBlocks ( ) const
inline

Definition at line 242 of file TkStripMeasurementDet.h.

242 { return conditionSet().maskBad128StripBlocks(); }
StMeasurementConditionSet & conditionSet()

◆ measurements()

bool TkStripMeasurementDet::measurements ( const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est,
const MeasurementTrackerEvent data,
TempMeasurements result 
) const
overridevirtual

Implements MeasurementDet.

Definition at line 178 of file TkStripMeasurementDet.cc.

References data, F(), TrajectoryStateOnSurface::hasError(), isActive(), isEmpty(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), LogDebug, Topology::measurementPosition(), LocalTrajectoryError::positionError(), rawId(), HI_PhotonSkim_cff::rechits, recHits(), mps_fire::result, specificGeomDet(), StripGeomDetUnit::specificTopology(), mathSSE::sqrt(), testStrips(), MeasurementDet::theInactiveHit, MeasurementDet::theMissingHit, and x.

181  {
182  if (!isActive(data)) {
183  LogDebug("TkStripMeasurementDet") << " found an inactive module " << rawId();
184  result.add(theInactiveHit, 0.F);
185  return true;
186  }
187 
188  if (!isEmpty(data.stripData())) {
189  LogDebug("TkStripMeasurementDet") << " found hit on this module " << rawId();
191  std::vector<float> diffs;
192  if (recHits(stateOnThisDet, est, data, result.hits, result.distances))
193  return true;
194  }
195 
196  // create a TrajectoryMeasurement with an invalid RecHit and zero estimate
197 
198  if (!stateOnThisDet.hasError()) {
199  result.add(theMissingHit, 0.F);
200  return false;
201  }
202 
203  float utraj = specificGeomDet().specificTopology().measurementPosition(stateOnThisDet.localPosition()).x();
204  float uerr = sqrt(specificGeomDet()
205  .specificTopology()
206  .measurementError(stateOnThisDet.localPosition(), stateOnThisDet.localError().positionError())
207  .uu());
208  if (testStrips(utraj, uerr)) {
209  //LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " empty after search, but active ";
210  result.add(theMissingHit, 0.F);
211  return false;
212  }
213 
214  //LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " empty after search, and inactive ";
215  result.add(theInactiveHit, 0.F);
216  return true;
217 }
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
bool testStrips(float utraj, float uerr) const
return true if there are &#39;enough&#39; good strips in the utraj +/- 3 uerr range.
const StripGeomDetUnit & specificGeomDet() const
const LocalTrajectoryError & localError() const
unsigned int rawId() const
RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const override
LocalError positionError() const
bool isEmpty(const StMeasurementDetSet &theDets) const
TrackingRecHit::ConstRecHitPointer theMissingHit
T sqrt(T t)
Definition: SSEVec.h:19
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
TrackingRecHit::ConstRecHitPointer theInactiveHit
TrackingRecHit::ConstRecHitContainer RecHitContainer
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
#define LogDebug(id)

◆ rawId()

unsigned int TkStripMeasurementDet::rawId ( ) const
inline

Definition at line 98 of file TkStripMeasurementDet.h.

Referenced by measurements(), recHits(), and simpleRecHits().

98 { return conditionSet().id(index()); }
StMeasurementConditionSet & conditionSet()
unsigned int id(int i) const

◆ recHits() [1/3]

TkStripMeasurementDet::RecHitContainer TkStripMeasurementDet::recHits ( const TrajectoryStateOnSurface ts,
const MeasurementTrackerEvent data 
) const
overridevirtual

Implements MeasurementDet.

Definition at line 39 of file TkStripMeasurementDet.cc.

References accept(), edmNew::DetSet< T >::begin(), buildRecHit(), data, detSet(), edmNew::DetSet< T >::end(), index(), isActive(), isEmpty(), isMasked(), edm::Ref< C, T, F >::key(), LogDebug, edmNew::DetSet< T >::makeRefTo(), rawId(), mps_fire::result, edmNew::DetSet< T >::size(), and UNLIKELY.

Referenced by TkGluedMeasurementDet::collectRecHits(), and measurements().

40  {
42  if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData()))
43  return result;
44  const detset& detSet = data.stripData().detSet(index());
45  result.reserve(detSet.size());
46  for (new_const_iterator ci = detSet.begin(); ci != detSet.end(); ++ci) {
47  if (isMasked(*ci))
48  continue;
49  // for ( ClusterIterator ci=theClusterRange.first; ci != theClusterRange.second; ci++) {
50  SiStripClusterRef cluster = detSet.makeRefTo(data.stripData().handle(), ci);
51  if (accept(cluster, data.stripClustersToSkip()))
52  result.push_back(buildRecHit(cluster, ts));
53  else
54  LogDebug("TkStripMeasurementDet") << "skipping this str from last iteration on" << rawId()
55  << " key: " << cluster.key();
56  }
57  return result;
58 }
size
Write out results.
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(HandleT const &handle, const_iterator ci) const
Definition: DetSetNew.h:70
edmNew::DetSet< SiStripCluster > detset
unsigned int rawId() const
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
return((rh ^ lh) &mask)
bool isEmpty(const StMeasurementDetSet &theDets) const
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
bool isMasked(const SiStripCluster &cluster) const
TrackingRecHit::RecHitPointer buildRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp) const
const detset & detSet(const StMeasurementDetSet &theDets) const
TrackingRecHit::ConstRecHitContainer RecHitContainer
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
detset::const_iterator new_const_iterator
#define UNLIKELY(x)
Definition: Likely.h:21
#define LogDebug(id)

◆ recHits() [2/3]

bool TkStripMeasurementDet::recHits ( SimpleHitContainer result,
const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est,
const MeasurementTrackerEvent data 
) const
overridevirtual

Reimplemented from MeasurementDet.

Definition at line 61 of file TkStripMeasurementDet.cc.

References edmNew::DetSet< T >::begin(), cpe(), data, detSet(), edmNew::DetSet< T >::end(), filteredRecHits(), StripCPE::getAlgoParam(), h, hit(), index(), isActive(), isEmpty(), TrajectoryStateOnSurface::localParameters(), TrajectoryStateOnSurface::localPosition(), edmNew::DetSet< T >::makeRefTo(), Topology::measurementPosition(), mps_fire::result, specificGeomDet(), StripGeomDetUnit::specificTopology(), createJobs::tmp, UNLIKELY, and x.

64  {
65  if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData()))
66  return false;
67  auto oldSize = result.size();
68 
69  int utraj = specificGeomDet().specificTopology().measurementPosition(stateOnThisDet.localPosition()).x();
70  const detset& detSet = data.stripData().detSet(index());
71  auto const& cpepar = cpe()->getAlgoParam(specificGeomDet(), stateOnThisDet.localParameters());
72 
73  auto rightCluster = std::find_if(
74  detSet.begin(), detSet.end(), [utraj](const SiStripCluster& hit) { return hit.firstStrip() > utraj; });
75 
76  std::vector<SiStripRecHit2D> tmp;
77  if (rightCluster != detSet.begin()) {
78  // there are hits on the left of the utraj
79  auto leftCluster = rightCluster;
80  while (--leftCluster >= detSet.begin()) {
81  SiStripClusterRef clusterref = detSet.makeRefTo(data.stripData().handle(), leftCluster);
82  bool isCompatible = filteredRecHits(clusterref, cpepar, stateOnThisDet, est, data.stripClustersToSkip(), tmp);
83  if (!isCompatible)
84  break; // exit loop on first incompatible hit
85  for (auto&& h : tmp)
86  result.push_back(new SiStripRecHit2D(h));
87  tmp.clear();
88  }
89  }
90  for (; rightCluster != detSet.end(); rightCluster++) {
91  SiStripClusterRef clusterref = detSet.makeRefTo(data.stripData().handle(), rightCluster);
92  bool isCompatible = filteredRecHits(clusterref, cpepar, stateOnThisDet, est, data.stripClustersToSkip(), tmp);
93  if (!isCompatible)
94  break; // exit loop on first incompatible hit
95  for (auto&& h : tmp)
96  result.push_back(new SiStripRecHit2D(h));
97  tmp.clear();
98  }
99 
100  return result.size() > oldSize;
101 }
size
Write out results.
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(HandleT const &handle, const_iterator ci) const
Definition: DetSetNew.h:70
const StripGeomDetUnit & specificGeomDet() const
edmNew::DetSet< SiStripCluster > detset
return((rh ^ lh) &mask)
const StripCPE * cpe() const
bool isEmpty(const StMeasurementDetSet &theDets) const
bool filteredRecHits(const ClusterRefT &cluster, StripCPE::AlgoParam const &cpepar, const TrajectoryStateOnSurface &ltp, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
const detset & detSet(const StMeasurementDetSet &theDets) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
iterator end()
Definition: DetSetNew.h:53
#define UNLIKELY(x)
Definition: Likely.h:21
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
tmp
align.sh
Definition: createJobs.py:716
iterator begin()
Definition: DetSetNew.h:51

◆ recHits() [3/3]

bool TkStripMeasurementDet::recHits ( const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est,
const MeasurementTrackerEvent data,
RecHitContainer result,
std::vector< float > &  diffs 
) const
overridevirtual

Reimplemented from MeasurementDet.

Definition at line 139 of file TkStripMeasurementDet.cc.

References edmNew::DetSet< T >::begin(), cpe(), data, detSet(), edmNew::DetSet< T >::end(), filteredRecHits(), StripCPE::getAlgoParam(), hit(), index(), isActive(), isEmpty(), TrajectoryStateOnSurface::localParameters(), TrajectoryStateOnSurface::localPosition(), edmNew::DetSet< T >::makeRefTo(), Topology::measurementPosition(), mps_fire::result, specificGeomDet(), StripGeomDetUnit::specificTopology(), UNLIKELY, and x.

143  {
144  if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData()))
145  return false;
146 
147  auto oldSize = result.size();
148  auto const& cpepar = cpe()->getAlgoParam(specificGeomDet(), stateOnThisDet.localParameters());
149 
150  int utraj = specificGeomDet().specificTopology().measurementPosition(stateOnThisDet.localPosition()).x();
151 
152  const detset& detSet = data.stripData().detSet(index());
153  auto rightCluster = std::find_if(
154  detSet.begin(), detSet.end(), [utraj](const SiStripCluster& hit) { return hit.firstStrip() > utraj; });
155 
156  if (rightCluster != detSet.begin()) {
157  // there are hits on the left of the utraj
158  auto leftCluster = rightCluster;
159  while (--leftCluster >= detSet.begin()) {
160  SiStripClusterRef clusterref = detSet.makeRefTo(data.stripData().handle(), leftCluster);
161  bool isCompatible =
162  filteredRecHits(clusterref, cpepar, stateOnThisDet, est, data.stripClustersToSkip(), result, diffs);
163  if (!isCompatible)
164  break; // exit loop on first incompatible hit
165  }
166  }
167  for (; rightCluster != detSet.end(); rightCluster++) {
168  SiStripClusterRef clusterref = detSet.makeRefTo(data.stripData().handle(), rightCluster);
169  bool isCompatible =
170  filteredRecHits(clusterref, cpepar, stateOnThisDet, est, data.stripClustersToSkip(), result, diffs);
171  if (!isCompatible)
172  break; // exit loop on first incompatible hit
173  }
174 
175  return result.size() > oldSize;
176 }
size
Write out results.
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(HandleT const &handle, const_iterator ci) const
Definition: DetSetNew.h:70
const StripGeomDetUnit & specificGeomDet() const
edmNew::DetSet< SiStripCluster > detset
return((rh ^ lh) &mask)
const StripCPE * cpe() const
bool isEmpty(const StMeasurementDetSet &theDets) const
bool filteredRecHits(const ClusterRefT &cluster, StripCPE::AlgoParam const &cpepar, const TrajectoryStateOnSurface &ltp, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
const detset & detSet(const StMeasurementDetSet &theDets) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
iterator end()
Definition: DetSetNew.h:53
#define UNLIKELY(x)
Definition: Likely.h:21
iterator begin()
Definition: DetSetNew.h:51

◆ set128StripStatus()

void TkStripMeasurementDet::set128StripStatus ( bool  good,
int  idx = -1 
)
inline

Sets the status of a block of 128 strips (or all blocks if idx=-1)

Definition at line 230 of file TkStripMeasurementDet.h.

References caHitNtupletGeneratorKernels::good, and heavyIonCSV_trainingSettings::idx.

◆ setActiveThisEvent()

void TkStripMeasurementDet::setActiveThisEvent ( StMeasurementDetSet theDets,
bool  active 
) const
inline

Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call to 'update' or 'setEmpty'.

Definition at line 222 of file TkStripMeasurementDet.h.

References StMeasurementDetSet::setActiveThisEvent().

222  {
223  theDets.setActiveThisEvent(index(), active);
224  }
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 ...

◆ setActiveThisPeriod()

void TkStripMeasurementDet::setActiveThisPeriod ( StMeasurementDetSet theDets,
bool  active 
)
inline

Turn on/off the module for reconstruction, for the full run or lumi (using info from DB, usually).

Definition at line 218 of file TkStripMeasurementDet.h.

218 { conditionSet().setActive(index(), active); }
StMeasurementConditionSet & conditionSet()
void setActive(int i, bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...

◆ setEmpty()

void TkStripMeasurementDet::setEmpty ( StMeasurementDetSet theDets) const
inline

Definition at line 92 of file TkStripMeasurementDet.h.

References StMeasurementDetSet::setEmpty().

92 { theDets.setEmpty(index()); }

◆ setIndex()

void TkStripMeasurementDet::setIndex ( int  i)
inline

Definition at line 90 of file TkStripMeasurementDet.h.

References mps_fire::i.

◆ simpleRecHits() [1/2]

void TkStripMeasurementDet::simpleRecHits ( const TrajectoryStateOnSurface ts,
const MeasurementTrackerEvent data,
std::vector< SiStripRecHit2D > &  result 
) const

Definition at line 219 of file TkStripMeasurementDet.cc.

References accept(), cms::cuda::assert(), buildSimpleRecHits(), bsc_activity_cfg::clusters, data, detSet(), index(), isActive(), isEmpty(), isMasked(), LogDebug, edmNew::DetSet< T >::makeKeyOf(), rawId(), mps_fire::result, edmNew::DetSet< T >::size(), and unInitDynArray.

Referenced by TkGluedMeasurementDet::collectRecHits().

221  {
222  if (isEmpty(data.stripData()) || !isActive(data))
223  return;
224 
225  const detset& detSet = data.stripData().detSet(index());
227  assert(clusters.empty());
228  for (auto const& ci : detSet) {
229  if (isMasked(ci))
230  continue;
231  if (accept(detSet.makeKeyOf(&ci), data.stripClustersToSkip()))
232  clusters.push_back(&ci);
233  else
234  LogDebug("TkStripMeasurementDet") << "skipping this str from last iteration on" << rawId()
235  << " key: " << detSet.makeKeyOf(&ci);
236  }
237  if (!clusters.empty())
239 }
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
edmNew::DetSet< SiStripCluster > detset
unsigned int rawId() const
void buildSimpleRecHits(AClusters const &clusters, const MeasurementTrackerEvent &data, const detset &detSet, const TrajectoryStateOnSurface &ltp, std::vector< SiStripRecHit2D > &res) const
unsigned int makeKeyOf(const_iterator ci) const
Definition: DetSetNew.h:76
bool isEmpty(const StMeasurementDetSet &theDets) const
assert(be >=bs)
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
#define unInitDynArray(T, n, x)
Definition: DynArray.h:88
bool isMasked(const SiStripCluster &cluster) const
T value_type
Definition: DynArray.h:12
const detset & detSet(const StMeasurementDetSet &theDets) const
size_type size() const
Definition: DetSetNew.h:65
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
#define LogDebug(id)

◆ simpleRecHits() [2/2]

bool TkStripMeasurementDet::simpleRecHits ( const TrajectoryStateOnSurface ts,
const MeasurementEstimator est,
const MeasurementTrackerEvent data,
std::vector< SiStripRecHit2D > &  result 
) const

Definition at line 103 of file TkStripMeasurementDet.cc.

References edmNew::DetSet< T >::begin(), cpe(), data, detSet(), edmNew::DetSet< T >::end(), filteredRecHits(), StripCPE::getAlgoParam(), hit(), index(), isActive(), isEmpty(), TrajectoryStateOnSurface::localParameters(), TrajectoryStateOnSurface::localPosition(), edmNew::DetSet< T >::makeRefTo(), Topology::measurementPosition(), mps_fire::result, specificGeomDet(), StripGeomDetUnit::specificTopology(), UNLIKELY, and x.

106  {
107  if UNLIKELY ((!isActive(data)) || isEmpty(data.stripData()))
108  return false;
109 
110  auto oldSize = result.size();
111 
112  int utraj = specificGeomDet().specificTopology().measurementPosition(stateOnThisDet.localPosition()).x();
113  const detset& detSet = data.stripData().detSet(index());
114  auto const& cpepar = cpe()->getAlgoParam(specificGeomDet(), stateOnThisDet.localParameters());
115 
116  auto rightCluster = std::find_if(
117  detSet.begin(), detSet.end(), [utraj](const SiStripCluster& hit) { return hit.firstStrip() > utraj; });
118 
119  if (rightCluster != detSet.begin()) {
120  // there are hits on the left of the utraj
121  auto leftCluster = rightCluster;
122  while (--leftCluster >= detSet.begin()) {
123  SiStripClusterRef clusterref = detSet.makeRefTo(data.stripData().handle(), leftCluster);
124  bool isCompatible = filteredRecHits(clusterref, cpepar, stateOnThisDet, est, data.stripClustersToSkip(), result);
125  if (!isCompatible)
126  break; // exit loop on first incompatible hit
127  }
128  }
129  for (; rightCluster != detSet.end(); rightCluster++) {
130  SiStripClusterRef clusterref = detSet.makeRefTo(data.stripData().handle(), rightCluster);
131  bool isCompatible = filteredRecHits(clusterref, cpepar, stateOnThisDet, est, data.stripClustersToSkip(), result);
132  if (!isCompatible)
133  break; // exit loop on first incompatible hit
134  }
135 
136  return result.size() > oldSize;
137 }
size
Write out results.
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(HandleT const &handle, const_iterator ci) const
Definition: DetSetNew.h:70
const StripGeomDetUnit & specificGeomDet() const
edmNew::DetSet< SiStripCluster > detset
return((rh ^ lh) &mask)
const StripCPE * cpe() const
bool isEmpty(const StMeasurementDetSet &theDets) const
bool filteredRecHits(const ClusterRefT &cluster, StripCPE::AlgoParam const &cpepar, const TrajectoryStateOnSurface &ltp, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
const detset & detSet(const StMeasurementDetSet &theDets) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
iterator end()
Definition: DetSetNew.h:53
#define UNLIKELY(x)
Definition: Likely.h:21
iterator begin()
Definition: DetSetNew.h:51

◆ specificGeomDet()

const StripGeomDetUnit& TkStripMeasurementDet::specificGeomDet ( ) const
inline

◆ subId()

unsigned char TkStripMeasurementDet::subId ( ) const
inline

Definition at line 99 of file TkStripMeasurementDet.h.

99 { return conditionSet().subId(index()); }
StMeasurementConditionSet & conditionSet()
unsigned char subId(int i) const

◆ testStrips()

bool TkStripMeasurementDet::testStrips ( float  utraj,
float  uerr 
) const

return true if there are 'enough' good strips in the utraj +/- 3 uerr range.

Definition at line 274 of file TkStripMeasurementDet.cc.

References badStripBlocks(), badStripCuts(), mps_fire::end, f, SiStripPI::max, StMeasurementConditionSet::BadStripCuts::maxBad, StMeasurementConditionSet::BadStripCuts::maxConsecutiveBad, SiStripPI::min, convertSQLiteXML::ok, command_line::start, and totalStrips().

Referenced by measurements(), and TkGluedMeasurementDet::testStrips().

274  {
275  int16_t start = (int16_t)std::max<float>(utraj - 3.f * uerr, 0);
276  int16_t end = (int16_t)std::min<float>(utraj + 3.f * uerr, totalStrips());
277 
278  if (start >= end) { // which means either end <=0 or start >= totalStrips_
279  /* LogDebug("TkStripMeasurementDet") << "Testing module " << id_ <<","<<
280  " U = " << utraj << " +/- " << uerr <<
281  "; Range [" << (utraj - 3*uerr) << ", " << (utraj + 3*uerr) << "] " <<
282  ": YOU'RE COMPLETELY OFF THE MODULE."; */
283  //return false;
284  return true; // Wolfgang thinks this way is better
285  // and solves some problems with grouped ckf
286  }
287 
288  typedef std::vector<BadStripBlock>::const_iterator BSBIT;
289 
290  int16_t bad = 0, largestBadBlock = 0;
291  for (BSBIT bsbc = badStripBlocks().begin(), bsbe = badStripBlocks().end(); bsbc != bsbe; ++bsbc) {
292  if (bsbc->last < start)
293  continue;
294  if (bsbc->first > end)
295  break;
296  int16_t thisBad = std::min(bsbc->last, end) - std::max(bsbc->first, start);
297  if (thisBad > largestBadBlock)
298  largestBadBlock = thisBad;
299  bad += thisBad;
300  }
301 
302  bool ok = (bad < (end - start)) && (uint16_t(bad) <= badStripCuts().maxBad) &&
303  (uint16_t(largestBadBlock) <= badStripCuts().maxConsecutiveBad);
304 
305  // if (bad) {
306  // edm::LogWarning("TkStripMeasurementDet") << "Testing module " << id_ <<" (subdet: "<< SiStripDetId(id_).subdetId() << ")" <<
307  // " U = " << utraj << " +/- " << uerr <<
308  // "; Range [" << (utraj - 3*uerr) << ", " << (utraj + 3*uerr) << "] " <<
309  // "= [" << start << "," << end << "]" <<
310  // " total strips:" << (end-start) << ", good:" << (end-start-bad) << ", bad:" << bad << ", largestBadBlock: " << largestBadBlock <<
311  // ". " << (ok ? "OK" : "NO");
312  // }
313  return ok;
314 }
Definition: start.py:1
BadStripCuts const & badStripCuts() const
std::vector< BadStripBlock > const & badStripBlocks() const
double f[11][100]

◆ theSet()

const detset& TkStripMeasurementDet::theSet ( const StMeasurementDetSet theDets) const
inline

Definition at line 101 of file TkStripMeasurementDet.h.

References StMeasurementDetSet::detSet().

101 { return theDets.detSet(index()); }
const StripDetset & detSet(int i) const

◆ totalStrips()

int TkStripMeasurementDet::totalStrips ( ) const
inlineprivate

Definition at line 256 of file TkStripMeasurementDet.h.

Referenced by testStrips().

256 { return conditionSet().totalStrips(index()); }
StMeasurementConditionSet & conditionSet()

Member Data Documentation

◆ index_

int TkStripMeasurementDet::index_
private

Definition at line 248 of file TkStripMeasurementDet.h.

◆ theDetConditions

StMeasurementConditionSet* TkStripMeasurementDet::theDetConditions
private

Definition at line 249 of file TkStripMeasurementDet.h.