CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TkStripMeasurementDet Class Reference

#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
< SiStripCluster
detset
 
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
 
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, 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, 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
 
SiStripRecHit2D hit (TkStripRecHitIter const &hi) const
 
std::tuple< TkStripRecHitIter,
TkStripRecHitIter
hitRange (const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const
 
int index () const
 
bool isActive (const MeasurementTrackerEvent &data) const
 Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'. More...
 
bool isEmpty (const StMeasurementDetSet &theDets) const
 
bool maskBad128StripBlocks () const
 
virtual bool measurements (const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const
 
unsigned int rawId () const
 
virtual RecHitContainer recHits (const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const
 
virtual bool recHits (SimpleHitContainer &result, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &, const MeasurementTrackerEvent &data) const
 
virtual bool recHits (const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, RecHitContainer &result, std::vector< float > &diffs) const
 
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)
 
virtual ~TkStripMeasurementDet ()
 
- Public Member Functions inherited from MeasurementDet
const GeomDetfastGeomDet () const
 
std::vector
< TrajectoryMeasurement
fastMeasurements (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
 

Private Member Functions

BadStripCuts const & badStripCuts () const
 
template<class ClusterRefT >
void buildSimpleRecHit (const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp, std::vector< SiStripRecHit2D > &res) const
 
StMeasurementConditionSetconditionSet ()
 
const StMeasurementConditionSetconditionSet () const
 
const
StripClusterParameterEstimator
cpe () 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 84 of file TkStripMeasurementDet.h.

Member Typedef Documentation

Definition at line 239 of file TkStripMeasurementDet.h.

Definition at line 234 of file TkStripMeasurementDet.h.

Definition at line 95 of file TkStripMeasurementDet.h.

Definition at line 92 of file TkStripMeasurementDet.h.

Definition at line 87 of file TkStripMeasurementDet.h.

Definition at line 93 of file TkStripMeasurementDet.h.

Definition at line 90 of file TkStripMeasurementDet.h.

Definition at line 88 of file TkStripMeasurementDet.h.

Constructor & Destructor Documentation

virtual TkStripMeasurementDet::~TkStripMeasurementDet ( )
inlinevirtual

Definition at line 97 of file TkStripMeasurementDet.h.

97 {}
TkStripMeasurementDet::TkStripMeasurementDet ( const GeomDet gdet,
StMeasurementConditionSet conditionSet 
)

Definition at line 16 of file TkStripMeasurementDet.cc.

16  :
17  MeasurementDet (gdet), index_(-1), theDetConditions(&conditions)
18  {
19  if (dynamic_cast<const StripGeomDetUnit*>(gdet) == 0) {
20  throw MeasurementDetException( "TkStripMeasurementDet constructed with a GeomDet which is not a StripGeomDetUnit");
21  }
22  }
MeasurementDet(const GeomDet *gdet)
StMeasurementConditionSet * theDetConditions

Member Function Documentation

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

Definition at line 284 of file TkStripMeasurementDet.h.

References edm::Ref< C, T, F >::key(), and LogDebug.

Referenced by advance(), Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), empty(), esMonitoring.FDJsonServer::handle_accept(), recHits(), and simpleRecHits().

284  {
285  if(skipClusters.empty()) return true;
286  if (r.key()>=skipClusters.size()){
287  LogDebug("TkStripMeasurementDet")<<r.key()<<" is larger than: "<<skipClusters.size()
288  <<"\n This must be a new cluster, and therefore should not be skiped most likely.";
289  // edm::LogError("WrongStripMasking")<<r.key()<<" is larger than: "<<skipClusters.size()<<" no skipping done"; // protect for on demand???
290  return true;
291  }
292  return (not (skipClusters[r.key()]));
293  }
#define LogDebug(id)
void TkStripMeasurementDet::advance ( TkStripRecHitIter hi) const

Definition at line 234 of file TkStripMeasurementDet.cc.

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

Referenced by TkStripRecHitIter::advance().

234  {
235  while (!hi.empty()) {
236  auto ci = hi.clusterI;
237  auto const & data = *hi.data;
238  if (isMasked(*ci)) continue;
239  SiStripClusterRef cluster = edmNew::makeRefTo( data.stripData().handle(), ci );
240  if (accept(cluster, data.stripClustersToSkip())) return;
241  ++hi.clusterI;
242  }
243 }
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
bool isMasked(const SiStripCluster &cluster) const
const MeasurementTrackerEvent * data
new_const_iterator clusterI
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::vector<BadStripBlock> const& TkStripMeasurementDet::badStripBlocks ( ) const
inline

Definition at line 242 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

Referenced by testStrips().

242 { return conditionSet().badStripBlocks(index()); }
StMeasurementConditionSet & conditionSet()
std::vector< BadStripBlock > const & badStripBlocks(int i) const
BadStripCuts const& TkStripMeasurementDet::badStripCuts ( ) const
inlineprivate

Definition at line 256 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

Referenced by testStrips().

256 { return conditionSet().badStripCuts(index());}
const BadStripCuts & badStripCuts(int i) const
StMeasurementConditionSet & conditionSet()
template<class ClusterRefT >
TrackingRecHit::RecHitPointer TkStripMeasurementDet::buildRecHit ( const ClusterRefT &  cluster,
const TrajectoryStateOnSurface ltp 
) const
inline

Definition at line 154 of file TkStripMeasurementDet.h.

References MeasurementDet::fastGeomDet().

Referenced by recHits().

154  {
155  const GeomDetUnit& gdu( specificGeomDet());
156  LocalValues lv = cpe()->localParameters( *cluster, gdu, ltp);
157  return std::make_shared<SiStripRecHit2D>( lv.first, lv.second, fastGeomDet(), cluster);
158  }
virtual LocalValues localParameters(const SiStripCluster &, const GeomDetUnit &) const
StripClusterParameterEstimator::LocalValues LocalValues
const GeomDet & fastGeomDet() const
const StripGeomDetUnit & specificGeomDet() const
const StripClusterParameterEstimator * cpe() const
template<class ClusterRefT >
void TkStripMeasurementDet::buildRecHits ( const ClusterRefT &  cluster,
const TrajectoryStateOnSurface ltp,
const RecHitContainer _res 
) const
inline

Definition at line 163 of file TkStripMeasurementDet.h.

163  {
164  RecHitContainer res = _res;
165  const GeomDetUnit& gdu( specificGeomDet());
166  VLocalValues vlv = cpe()->localParametersV( *cluster, gdu, ltp);
167  for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it)
168  res.push_back(std::make_shared<SiStripRecHit2D>( it->first, it->second, fastGeomDet(), cluster));
169  }
virtual VLocalValues localParametersV(const SiStripCluster &cluster, const GeomDetUnit &gd) const
StripClusterParameterEstimator::VLocalValues VLocalValues
const GeomDet & fastGeomDet() const
const StripGeomDetUnit & specificGeomDet() const
const StripClusterParameterEstimator * cpe() const
TrackingRecHit::ConstRecHitContainer RecHitContainer
template<class ClusterRefT >
void TkStripMeasurementDet::buildSimpleRecHit ( const ClusterRefT &  cluster,
const TrajectoryStateOnSurface ltp,
std::vector< SiStripRecHit2D > &  res 
) const
inlineprivate

Definition at line 267 of file TkStripMeasurementDet.h.

Referenced by simpleRecHits().

269  {
270  const GeomDetUnit& gdu( specificGeomDet());
271  VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
272  for(VLocalValues::const_iterator it=vlv.begin();it!=vlv.end();++it){
273  res.push_back(SiStripRecHit2D( it->first, it->second, gdu, cluster));
274  }
275  }
virtual VLocalValues localParametersV(const SiStripCluster &cluster, const GeomDetUnit &gd) const
StripClusterParameterEstimator::VLocalValues VLocalValues
const StripGeomDetUnit & specificGeomDet() const
const StripClusterParameterEstimator * cpe() const
StMeasurementConditionSet& TkStripMeasurementDet::conditionSet ( )
inlineprivate

Definition at line 249 of file TkStripMeasurementDet.h.

249 { return *theDetConditions; }
StMeasurementConditionSet * theDetConditions
const StMeasurementConditionSet& TkStripMeasurementDet::conditionSet ( ) const
inlineprivate

Definition at line 250 of file TkStripMeasurementDet.h.

250 { return *theDetConditions; }
StMeasurementConditionSet * theDetConditions
const StripClusterParameterEstimator* TkStripMeasurementDet::cpe ( ) const
inlineprivate

Definition at line 252 of file TkStripMeasurementDet.h.

Referenced by hit().

252 { return conditionSet().stripCPE(); }
StMeasurementConditionSet & conditionSet()
const StripClusterParameterEstimator * stripCPE() const
const detset& TkStripMeasurementDet::detSet ( const StMeasurementDetSet theDets) const
inline

Definition at line 114 of file TkStripMeasurementDet.h.

References StMeasurementDetSet::detSet(), and cmsHarvester::index.

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

114 {return theDets.detSet(index());}
const StripDetset & detSet(int i) const
bool TkStripMeasurementDet::empty ( const MeasurementTrackerEvent data) const

Definition at line 26 of file TkStripMeasurementDet.cc.

References accept(), edmNew::DetSet< T >::begin(), detSet(), StMeasurementDetSet::detSet(), edmNew::DetSet< T >::end(), StMeasurementDetSet::handle(), index(), isActive(), isEmpty(), isMasked(), edmNew::makeRefTo(), MeasurementTrackerEvent::stripClustersToSkip(), MeasurementTrackerEvent::stripData(), and unlikely.

26  {
27  if unlikely( (!isActive(data)) || isEmpty(data.stripData())) return true;
28 
29  const detset & detSet = data.stripData().detSet(index());
30  for ( auto ci = detSet.begin(); ci != detSet.end(); ++ ci ) {
31  if (isMasked(*ci)) continue;
32  SiStripClusterRef cluster = edmNew::makeRefTo( data.stripData().handle(), ci );
33  if (accept(cluster, data.stripClustersToSkip()))
34  return false;
35  }
36  return true;
37 }
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)
edmNew::DetSet< SiStripCluster > detset
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
const StMeasurementDetSet & stripData() const
const std::vector< bool > & stripClustersToSkip() const
bool isMasked(const SiStripCluster &cluster) const
return((rh^lh)&mask)
#define unlikely(x)
#define end
Definition: vmac.h:37
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
string const
Definition: compareJSON.py:14
bool isEmpty(const StMeasurementDetSet &theDets) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
const detset & detSet(const StMeasurementDetSet &theDets) const
#define begin
Definition: vmac.h:30
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
for(const auto &isodef:isoDefs)
template<class ClusterRefT >
bool TkStripMeasurementDet::filteredRecHits ( const ClusterRefT &  cluster,
const TrajectoryStateOnSurface ltp,
const MeasurementEstimator est,
const std::vector< bool > &  skipClusters,
RecHitContainer result,
std::vector< float > &  diffs 
) const
inline

Definition at line 173 of file TkStripMeasurementDet.h.

References accept(), MeasurementEstimator::estimate(), LogDebug, eostools::move(), and MeasurementEstimator::preFilter().

Referenced by recHits(), and simpleRecHits().

174  {
175  if (isMasked(*cluster)) return true;
176  const GeomDetUnit& gdu( specificGeomDet());
177  if (!accept(cluster, skipClusters)) return true;
178  if (!est.preFilter(ltp, ClusterFilterPayload(rawId(),&*cluster) )) return true; // avoids shadow; consistent with previous statement...
179  VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
180  bool isCompatible(false);
181  for(auto vl : vlv) {
182  SiStripRecHit2D recHit(vl.first, vl.second, fastGeomDet(), cluster); // FIXME add cluster count in OmniRef
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);
188  isCompatible = true;
189  }
190  }
191  return isCompatible;
192  }
#define LogDebug(id)
virtual VLocalValues localParametersV(const SiStripCluster &cluster, const GeomDetUnit &gd) const
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
StripClusterParameterEstimator::VLocalValues VLocalValues
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
bool isMasked(const SiStripCluster &cluster) const
const GeomDet & fastGeomDet() const
tuple result
Definition: query.py:137
def move
Definition: eostools.py:510
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
const StripGeomDetUnit & specificGeomDet() const
const StripClusterParameterEstimator * cpe() const
unsigned int rawId() const
template<class ClusterRefT >
bool TkStripMeasurementDet::filteredRecHits ( const ClusterRefT &  cluster,
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, eostools::move(), and MeasurementEstimator::preFilter().

197  {
198  if (isMasked(*cluster)) return true;
199  const GeomDetUnit& gdu( specificGeomDet());
200  if (!accept(cluster, skipClusters)) return true;
201  if (!est.preFilter(ltp, ClusterFilterPayload(rawId(),&*cluster) )) return true; // avoids shadow; consistent with previous statement...
202  VLocalValues const & vlv = cpe()->localParametersV( *cluster, gdu, ltp);
203  bool isCompatible(false);
204  for(auto vl : vlv) {
205  auto && recHit = SiStripRecHit2D( vl.first, vl.second, gdu, cluster); // FIXME add cluster count in OmniRef
206  std::pair<bool,double> diffEst = est.estimate(ltp, recHit);
207  LogDebug("TkStripMeasurementDet")<<" chi2=" << diffEst.second;
208  if ( diffEst.first ) {
209  result.push_back(std::move(recHit));
210  isCompatible = true;
211  }
212  }
213  return isCompatible;
214  }
#define LogDebug(id)
virtual VLocalValues localParametersV(const SiStripCluster &cluster, const GeomDetUnit &gd) const
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
StripClusterParameterEstimator::VLocalValues VLocalValues
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
bool isMasked(const SiStripCluster &cluster) const
tuple result
Definition: query.py:137
def move
Definition: eostools.py:510
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
const StripGeomDetUnit & specificGeomDet() const
const StripClusterParameterEstimator * cpe() const
unsigned int rawId() const
std::vector<BadStripBlock>& TkStripMeasurementDet::getBadStripBlocks ( )
inline

Definition at line 241 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

241 { return conditionSet().getBadStripBlocks(index()); }
StMeasurementConditionSet & conditionSet()
std::vector< BadStripBlock > & getBadStripBlocks(int i)
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
bool TkStripMeasurementDet::hasAny128StripBad ( ) const
inlineprivate

Definition at line 258 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

258 { return conditionSet().hasAny128StripBad(index()); }
StMeasurementConditionSet & conditionSet()
bool hasAny128StripBad(int i) const
bool TkStripMeasurementDet::hasBadComponents ( const TrajectoryStateOnSurface tsos,
const MeasurementTrackerEvent data 
) const
inlinevirtual

Implements MeasurementDet.

Definition at line 121 of file TkStripMeasurementDet.h.

121 {return false;}
SiStripRecHit2D TkStripMeasurementDet::hit ( TkStripRecHitIter const &  hi) const

Definition at line 245 of file TkStripMeasurementDet.cc.

References TkStripRecHitIter::clusterI, cpe(), TkStripRecHitIter::data, data, StripClusterParameterEstimator::localParameters(), edmNew::makeRefTo(), specificGeomDet(), and TkStripRecHitIter::tsos.

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

245  {
246  const GeomDetUnit& gdu( specificGeomDet());
247  auto ci = hi.clusterI;
248  auto const & data = *hi.data;
249  auto const & ltp = *hi.tsos;
250 
251  SiStripClusterRef cluster = edmNew::makeRefTo( data.stripData().handle(), ci );
252  LocalValues lv = cpe()->localParameters( *cluster, gdu, ltp);
253  return SiStripRecHit2D(lv.first,lv.second, gdu, cluster);
254 }
virtual LocalValues localParameters(const SiStripCluster &, const GeomDetUnit &) const
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)
StripClusterParameterEstimator::LocalValues LocalValues
const StripGeomDetUnit & specificGeomDet() const
const StripClusterParameterEstimator * cpe() const
SiStripRecHit2D::ClusterRef SiStripClusterRef
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::tuple< TkStripRecHitIter, TkStripRecHitIter > TkStripMeasurementDet::hitRange ( const TrajectoryStateOnSurface ts,
const MeasurementTrackerEvent data 
) const

Definition at line 225 of file TkStripMeasurementDet.cc.

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

226 {
227  if (isEmpty(data.stripData()) || !isActive(data)) return std::tuple<TkStripRecHitIter,TkStripRecHitIter>();
228  const detset & detSet = data.stripData().detSet(index());
229  return std::make_tuple(TkStripRecHitIter(detSet.begin(),detSet.end(),*this,ts,data),
230  TkStripRecHitIter(detSet.end(),detSet.end(),*this,ts,data)
231  );
232 }
const StripDetset & detSet(int i) const
edmNew::DetSet< SiStripCluster > detset
const StMeasurementDetSet & stripData() const
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
bool isEmpty(const StMeasurementDetSet &theDets) const
const detset & detSet(const StMeasurementDetSet &theDets) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int TkStripMeasurementDet::index ( ) const
inline
bool TkStripMeasurementDet::isActive ( const MeasurementTrackerEvent data) const
inlinevirtual

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

Implements MeasurementDet.

Definition at line 118 of file TkStripMeasurementDet.h.

References cmsHarvester::index, StMeasurementDetSet::isActive(), and MeasurementTrackerEvent::stripData().

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

118 { return data.stripData().isActive(index()); }
const StMeasurementDetSet & stripData() const
bool isActive(int i) const
bool TkStripMeasurementDet::isEmpty ( const StMeasurementDetSet theDets) const
inline

Definition at line 105 of file TkStripMeasurementDet.h.

References StMeasurementDetSet::empty(), and cmsHarvester::index.

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

105 {return theDets.empty(index());}
bool empty(int i) const
bool TkStripMeasurementDet::isMasked ( const SiStripCluster cluster) const
inlineprivate

Definition at line 261 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

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

261  {
262  return conditionSet().isMasked(index(), cluster);
263  }
bool isMasked(int i, const SiStripCluster &cluster) const
StMeasurementConditionSet & conditionSet()
bool TkStripMeasurementDet::maskBad128StripBlocks ( ) const
inline

Definition at line 244 of file TkStripMeasurementDet.h.

244 { return conditionSet().maskBad128StripBlocks();}
StMeasurementConditionSet & conditionSet()
bool TkStripMeasurementDet::measurements ( const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est,
const MeasurementTrackerEvent data,
TempMeasurements result 
) const
virtual

Implements MeasurementDet.

Definition at line 160 of file TkStripMeasurementDet.cc.

References tracking::TempMeasurements::add(), tracking::TempMeasurements::distances, F(), TrajectoryStateOnSurface::hasError(), tracking::TempMeasurements::hits, isActive(), isEmpty(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), LogDebug, Topology::measurementPosition(), LocalTrajectoryError::positionError(), rawId(), HI_PhotonSkim_cff::rechits, recHits(), specificGeomDet(), StripGeomDetUnit::specificTopology(), mathSSE::sqrt(), MeasurementTrackerEvent::stripData(), testStrips(), MeasurementDet::theInactiveHit, MeasurementDet::theMissingHit, and x.

162  {
163 
164  if (!isActive(data)) {
165  LogDebug("TkStripMeasurementDet")<<" found an inactive module "<<rawId();
166  result.add(theInactiveHit, 0.F);
167  return true;
168  }
169 
170  if (!isEmpty(data.stripData())){
171  LogDebug("TkStripMeasurementDet")<<" found hit on this module "<<rawId();
173  std::vector<float> diffs;
174  if (recHits(stateOnThisDet,est,data,result.hits,result.distances)) return true;
175  }
176 
177 
178  // create a TrajectoryMeasurement with an invalid RecHit and zero estimate
179 
180  if (!stateOnThisDet.hasError()) {
181  result.add(theMissingHit, 0.F);
182  return false;
183  }
184 
185  float utraj = specificGeomDet().specificTopology().measurementPosition( stateOnThisDet.localPosition()).x();
186  float uerr= sqrt(specificGeomDet().specificTopology().measurementError(stateOnThisDet.localPosition(),stateOnThisDet.localError().positionError()).uu());
187  if (testStrips(utraj,uerr)) {
188  //LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " empty after search, but active ";
189  result.add(theMissingHit, 0.F);
190  return false;
191  }
192 
193  //LogDebug("TkStripMeasurementDet") << " DetID " << id_ << " empty after search, and inactive ";
194  result.add(theInactiveHit, 0.F);
195  return true;
196 
197 }
#define LogDebug(id)
const StMeasurementDetSet & stripData() const
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
LocalError positionError() const
TrackingRecHit::ConstRecHitPointer theMissingHit
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const
T sqrt(T t)
Definition: SSEVec.h:48
tuple result
Definition: query.py:137
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const LocalTrajectoryError & localError() const
TrackingRecHit::ConstRecHitPointer theInactiveHit
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
const StripGeomDetUnit & specificGeomDet() const
bool isEmpty(const StMeasurementDetSet &theDets) const
TrackingRecHit::ConstRecHitContainer RecHitContainer
bool testStrips(float utraj, float uerr) const
return true if there are &#39;enough&#39; good strips in the utraj +/- 3 uerr range.
unsigned int rawId() const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
unsigned int TkStripMeasurementDet::rawId ( ) const
inline

Definition at line 109 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

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

109 { return conditionSet().id(index()); }
unsigned int id(int i) const
StMeasurementConditionSet & conditionSet()
TkStripMeasurementDet::RecHitContainer TkStripMeasurementDet::recHits ( const TrajectoryStateOnSurface ts,
const MeasurementTrackerEvent data 
) const
virtual

Implements MeasurementDet.

Definition at line 41 of file TkStripMeasurementDet.cc.

References accept(), edmNew::DetSet< T >::begin(), buildRecHit(), detSet(), StMeasurementDetSet::detSet(), edmNew::DetSet< T >::end(), StMeasurementDetSet::handle(), index(), isActive(), isEmpty(), isMasked(), edm::Ref< C, T, F >::key(), LogDebug, edmNew::makeRefTo(), rawId(), query::result, edmNew::DetSet< T >::size(), MeasurementTrackerEvent::stripClustersToSkip(), MeasurementTrackerEvent::stripData(), and unlikely.

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

42 {
44  if unlikely( (!isActive(data)) || isEmpty(data.stripData())) return result;
45  const detset & detSet = data.stripData().detSet(index());
46  result.reserve(detSet.size());
47  for ( new_const_iterator ci = detSet.begin(); ci != detSet.end(); ++ ci ) {
48  if (isMasked(*ci)) continue;
49  // for ( ClusterIterator ci=theClusterRange.first; ci != theClusterRange.second; ci++) {
50  SiStripClusterRef cluster = edmNew::makeRefTo( data.stripData().handle(), ci );
51  if (accept(cluster, data.stripClustersToSkip()))
52  result.push_back( buildRecHit( cluster, ts));
53  else LogDebug("TkStripMeasurementDet")<<"skipping this str from last iteration on"<<rawId()<<" key: "<<cluster.key();
54  }
55  return result;
56 
57 }
#define LogDebug(id)
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)
edmNew::DetSet< SiStripCluster > detset
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
const StMeasurementDetSet & stripData() const
const std::vector< bool > & stripClustersToSkip() const
bool isMasked(const SiStripCluster &cluster) const
return((rh^lh)&mask)
#define unlikely(x)
tuple result
Definition: query.py:137
#define end
Definition: vmac.h:37
TrackingRecHit::RecHitPointer buildRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp) const
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
string const
Definition: compareJSON.py:14
bool isEmpty(const StMeasurementDetSet &theDets) const
TrackingRecHit::ConstRecHitContainer RecHitContainer
SiStripRecHit2D::ClusterRef SiStripClusterRef
const detset & detSet(const StMeasurementDetSet &theDets) const
#define begin
Definition: vmac.h:30
detset::const_iterator new_const_iterator
unsigned int rawId() const
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
for(const auto &isodef:isoDefs)
tuple size
Write out results.
bool TkStripMeasurementDet::recHits ( SimpleHitContainer result,
const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est,
const MeasurementTrackerEvent data 
) const
virtual

Reimplemented from MeasurementDet.

Definition at line 61 of file TkStripMeasurementDet.cc.

References edmNew::DetSet< T >::begin(), detSet(), StMeasurementDetSet::detSet(), edmNew::DetSet< T >::end(), filteredRecHits(), h, StMeasurementDetSet::handle(), hit(), index(), isActive(), isEmpty(), TrajectoryStateOnSurface::localPosition(), edmNew::makeRefTo(), Topology::measurementPosition(), eostools::move(), specificGeomDet(), StripGeomDetUnit::specificTopology(), MeasurementTrackerEvent::stripClustersToSkip(), MeasurementTrackerEvent::stripData(), tmp, unlikely, and x.

63  {
64  if unlikely( (!isActive(data)) || isEmpty(data.stripData())) return false;
65  auto oldSize = result.size();
66 
67  int utraj = specificGeomDet().specificTopology().measurementPosition( stateOnThisDet.localPosition()).x();
68  const detset & detSet = data.stripData().detSet(index());
69  auto rightCluster =
70  std::find_if( detSet.begin(), detSet.end(), [utraj](const SiStripCluster& hit) { return hit.firstStrip() > utraj; });
71 
72 
73  std::vector<SiStripRecHit2D> tmp;
74  if ( rightCluster != detSet.begin()) {
75  // there are hits on the left of the utraj
76  auto leftCluster = rightCluster;
77  while ( --leftCluster >= detSet.begin()) {
78  SiStripClusterRef clusterref = edmNew::makeRefTo( data.stripData().handle(), leftCluster );
79  bool isCompatible = filteredRecHits(clusterref, stateOnThisDet, est, data.stripClustersToSkip(), tmp);
80  if(!isCompatible) break; // exit loop on first incompatible hit
81  for (auto && h: tmp) result.push_back(new SiStripRecHit2D(std::move(h))); tmp.clear();
82  }
83  }
84  for ( ; rightCluster != detSet.end(); rightCluster++) {
85  SiStripClusterRef clusterref = edmNew::makeRefTo( data.stripData().handle(), rightCluster );
86  bool isCompatible = filteredRecHits(clusterref, stateOnThisDet, est, data.stripClustersToSkip(), tmp);
87  if(!isCompatible) break; // exit loop on first incompatible hit
88  for (auto && h: tmp) result.push_back(new SiStripRecHit2D(std::move(h))); tmp.clear();
89  }
90 
91  return result.size()>oldSize;
92 }
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)
edmNew::DetSet< SiStripCluster > detset
const StMeasurementDetSet & stripData() const
const std::vector< bool > & stripClustersToSkip() const
return((rh^lh)&mask)
#define unlikely(x)
bool filteredRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
tuple result
Definition: query.py:137
def move
Definition: eostools.py:510
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
#define end
Definition: vmac.h:37
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
const StripGeomDetUnit & specificGeomDet() const
string const
Definition: compareJSON.py:14
bool isEmpty(const StMeasurementDetSet &theDets) const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
SiStripRecHit2D::ClusterRef SiStripClusterRef
const detset & detSet(const StMeasurementDetSet &theDets) const
#define begin
Definition: vmac.h:30
iterator end()
Definition: DetSetNew.h:70
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
iterator begin()
Definition: DetSetNew.h:67
bool TkStripMeasurementDet::recHits ( const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est,
const MeasurementTrackerEvent data,
RecHitContainer result,
std::vector< float > &  diffs 
) const
virtual

Reimplemented from MeasurementDet.

Definition at line 130 of file TkStripMeasurementDet.cc.

References edmNew::DetSet< T >::begin(), detSet(), StMeasurementDetSet::detSet(), edmNew::DetSet< T >::end(), filteredRecHits(), StMeasurementDetSet::handle(), hit(), index(), isActive(), isEmpty(), TrajectoryStateOnSurface::localPosition(), edmNew::makeRefTo(), Topology::measurementPosition(), query::result, specificGeomDet(), StripGeomDetUnit::specificTopology(), MeasurementTrackerEvent::stripClustersToSkip(), MeasurementTrackerEvent::stripData(), unlikely, and x.

131  {
132  if unlikely( (!isActive(data)) || isEmpty(data.stripData())) return false;
133 
134  auto oldSize = result.size();
135 
136  int utraj = specificGeomDet().specificTopology().measurementPosition( stateOnThisDet.localPosition()).x();
137 
138  const detset & detSet = data.stripData().detSet(index());
139  auto rightCluster =
140  std::find_if( detSet.begin(), detSet.end(), [utraj](const SiStripCluster& hit) { return hit.firstStrip() > utraj; });
141 
142  if ( rightCluster != detSet.begin()) {
143  // there are hits on the left of the utraj
144  auto leftCluster = rightCluster;
145  while ( --leftCluster >= detSet.begin()) {
146  SiStripClusterRef clusterref = edmNew::makeRefTo( data.stripData().handle(), leftCluster );
147  bool isCompatible = filteredRecHits(clusterref, stateOnThisDet, est, data.stripClustersToSkip(), result, diffs);
148  if(!isCompatible) break; // exit loop on first incompatible hit
149  }
150  }
151  for ( ; rightCluster != detSet.end(); rightCluster++) {
152  SiStripClusterRef clusterref = edmNew::makeRefTo( data.stripData().handle(), rightCluster );
153  bool isCompatible = filteredRecHits(clusterref, stateOnThisDet, est, data.stripClustersToSkip(), result,diffs);
154  if(!isCompatible) break; // exit loop on first incompatible hit
155  }
156 
157  return result.size()>oldSize;
158 }
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)
edmNew::DetSet< SiStripCluster > detset
const StMeasurementDetSet & stripData() const
const std::vector< bool > & stripClustersToSkip() const
return((rh^lh)&mask)
#define unlikely(x)
bool filteredRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
tuple result
Definition: query.py:137
#define end
Definition: vmac.h:37
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
const StripGeomDetUnit & specificGeomDet() const
string const
Definition: compareJSON.py:14
bool isEmpty(const StMeasurementDetSet &theDets) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
const detset & detSet(const StMeasurementDetSet &theDets) const
#define begin
Definition: vmac.h:30
iterator end()
Definition: DetSetNew.h:70
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
iterator begin()
Definition: DetSetNew.h:67
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 customizeTrackingMonitorSeedNumber::idx, and cmsHarvester::index.

230  {
232  }
StMeasurementConditionSet & conditionSet()
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void set128StripStatus(int i, bool good, int idx=-1)
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 224 of file TkStripMeasurementDet.h.

References cmsHarvester::index, and StMeasurementDetSet::setActiveThisEvent().

224 { theDets.setActiveThisEvent(index(),active); }
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 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 220 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

220 { 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...
void TkStripMeasurementDet::setEmpty ( StMeasurementDetSet theDets) const
inline

Definition at line 103 of file TkStripMeasurementDet.h.

References cmsHarvester::index, and StMeasurementDetSet::setEmpty().

103 { theDets.setEmpty(index()); }
void TkStripMeasurementDet::setIndex ( int  i)
inline

Definition at line 101 of file TkStripMeasurementDet.h.

References i.

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

Definition at line 206 of file TkStripMeasurementDet.cc.

References accept(), edmNew::DetSet< T >::begin(), buildSimpleRecHit(), detSet(), StMeasurementDetSet::detSet(), edmNew::DetSet< T >::end(), StMeasurementDetSet::handle(), index(), isActive(), isEmpty(), isMasked(), edm::Ref< C, T, F >::key(), LogDebug, edmNew::makeRefTo(), rawId(), edmNew::DetSet< T >::size(), MeasurementTrackerEvent::stripClustersToSkip(), and MeasurementTrackerEvent::stripData().

Referenced by TkGluedMeasurementDet::collectRecHits().

207 {
208  if (isEmpty(data.stripData()) || !isActive(data)) return;
209 
210  const detset & detSet = data.stripData().detSet(index());
211  result.reserve(detSet.size());
212  for ( new_const_iterator ci = detSet.begin(); ci != detSet.end(); ++ ci ) {
213  if (isMasked(*ci)) continue;
214  // for ( ClusterIterator ci=theClusterRange.first; ci != theClusterRange.second; ci++) {
215  SiStripClusterRef cluster = edmNew::makeRefTo( data.stripData().handle(), ci );
216  if (accept(cluster, data.stripClustersToSkip()))
217  buildSimpleRecHit( cluster, ts,result);
218  else LogDebug("TkStripMeasurementDet")<<"skipping this str from last iteration on"<<rawId()<<" key: "<<cluster.key();
219  }
220 }
#define LogDebug(id)
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)
void buildSimpleRecHit(const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp, std::vector< SiStripRecHit2D > &res) const
const StripDetset & detSet(int i) const
edmNew::DetSet< SiStripCluster > detset
bool accept(SiStripClusterRef const &r, const std::vector< bool > &skipClusters) const
const StMeasurementDetSet & stripData() const
const std::vector< bool > & stripClustersToSkip() const
bool isMasked(const SiStripCluster &cluster) const
tuple result
Definition: query.py:137
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
bool isEmpty(const StMeasurementDetSet &theDets) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
const detset & detSet(const StMeasurementDetSet &theDets) const
detset::const_iterator new_const_iterator
unsigned int rawId() const
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
bool TkStripMeasurementDet::simpleRecHits ( const TrajectoryStateOnSurface ts,
const MeasurementEstimator est,
const MeasurementTrackerEvent data,
std::vector< SiStripRecHit2D > &  result 
) const

Definition at line 97 of file TkStripMeasurementDet.cc.

References edmNew::DetSet< T >::begin(), detSet(), StMeasurementDetSet::detSet(), edmNew::DetSet< T >::end(), filteredRecHits(), StMeasurementDetSet::handle(), hit(), index(), isActive(), isEmpty(), TrajectoryStateOnSurface::localPosition(), edmNew::makeRefTo(), Topology::measurementPosition(), query::result, specificGeomDet(), StripGeomDetUnit::specificTopology(), MeasurementTrackerEvent::stripClustersToSkip(), MeasurementTrackerEvent::stripData(), unlikely, and x.

99  {
100  if unlikely( (!isActive(data)) || isEmpty(data.stripData())) return false;
101 
102  auto oldSize = result.size();
103 
104  int utraj = specificGeomDet().specificTopology().measurementPosition( stateOnThisDet.localPosition()).x();
105  const detset & detSet = data.stripData().detSet(index());
106  auto rightCluster =
107  std::find_if( detSet.begin(), detSet.end(), [utraj](const SiStripCluster& hit) { return hit.firstStrip() > utraj; });
108 
109  if ( rightCluster != detSet.begin()) {
110  // there are hits on the left of the utraj
111  auto leftCluster = rightCluster;
112  while ( --leftCluster >= detSet.begin()) {
113  SiStripClusterRef clusterref = edmNew::makeRefTo( data.stripData().handle(), leftCluster );
114  bool isCompatible = filteredRecHits(clusterref, stateOnThisDet, est, data.stripClustersToSkip(), result);
115  if(!isCompatible) break; // exit loop on first incompatible hit
116  }
117  }
118  for ( ; rightCluster != detSet.end(); rightCluster++) {
119  SiStripClusterRef clusterref = edmNew::makeRefTo( data.stripData().handle(), rightCluster );
120  bool isCompatible = filteredRecHits(clusterref, stateOnThisDet, est, data.stripClustersToSkip(), result);
121  if(!isCompatible) break; // exit loop on first incompatible hit
122  }
123 
124  return result.size()>oldSize;
125 }
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)
edmNew::DetSet< SiStripCluster > detset
const StMeasurementDetSet & stripData() const
const std::vector< bool > & stripClustersToSkip() const
return((rh^lh)&mask)
#define unlikely(x)
bool filteredRecHits(const ClusterRefT &cluster, const TrajectoryStateOnSurface &ltp, const MeasurementEstimator &est, const std::vector< bool > &skipClusters, RecHitContainer &result, std::vector< float > &diffs) const
tuple result
Definition: query.py:137
#define end
Definition: vmac.h:37
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
const StripGeomDetUnit & specificGeomDet() const
string const
Definition: compareJSON.py:14
bool isEmpty(const StMeasurementDetSet &theDets) const
SiStripRecHit2D::ClusterRef SiStripClusterRef
const detset & detSet(const StMeasurementDetSet &theDets) const
#define begin
Definition: vmac.h:30
iterator end()
Definition: DetSetNew.h:70
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
iterator begin()
Definition: DetSetNew.h:67
const StripGeomDetUnit& TkStripMeasurementDet::specificGeomDet ( ) const
inline

Definition at line 149 of file TkStripMeasurementDet.h.

References MeasurementDet::fastGeomDet().

Referenced by hit(), measurements(), recHits(), simpleRecHits(), and TkGluedMeasurementDet::testStrips().

149 {return static_cast<StripGeomDetUnit const &>(fastGeomDet());}
const GeomDet & fastGeomDet() const
unsigned char TkStripMeasurementDet::subId ( ) const
inline

Definition at line 110 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

110 { return conditionSet().subId(index());}
StMeasurementConditionSet & conditionSet()
unsigned char subId(int i) const
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 257 of file TkStripMeasurementDet.cc.

References cond::ecalcond::bad(), badStripBlocks(), badStripCuts(), end, f, bookConverter::max, StMeasurementConditionSet::BadStripCuts::maxBad, StMeasurementConditionSet::BadStripCuts::maxConsecutiveBad, min(), convertSQLiteXML::ok, dqm_diff::start, and totalStrips().

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

257  {
258  int16_t start = (int16_t) std::max<float>(utraj - 3.f*uerr, 0);
259  int16_t end = (int16_t) std::min<float>(utraj + 3.f*uerr, totalStrips());
260 
261  if (start >= end) { // which means either end <=0 or start >= totalStrips_
262  /* LogDebug("TkStripMeasurementDet") << "Testing module " << id_ <<","<<
263  " U = " << utraj << " +/- " << uerr <<
264  "; Range [" << (utraj - 3*uerr) << ", " << (utraj + 3*uerr) << "] " <<
265  ": YOU'RE COMPLETELY OFF THE MODULE."; */
266  //return false;
267  return true; // Wolfgang thinks this way is better
268  // and solves some problems with grouped ckf
269  }
270 
271  typedef std::vector<BadStripBlock>::const_iterator BSBIT;
272 
273  int16_t bad = 0, largestBadBlock = 0;
274  for (BSBIT bsbc = badStripBlocks().begin(), bsbe = badStripBlocks().end(); bsbc != bsbe; ++bsbc) {
275  if (bsbc->last < start) continue;
276  if (bsbc->first > end) break;
277  int16_t thisBad = std::min(bsbc->last, end) - std::max(bsbc->first, start);
278  if (thisBad > largestBadBlock) largestBadBlock = thisBad;
279  bad += thisBad;
280  }
281 
282  bool ok = (bad < (end-start)) &&
283  (uint16_t(bad) <= badStripCuts().maxBad) &&
284  (uint16_t(largestBadBlock) <= badStripCuts().maxConsecutiveBad);
285 
286 // if (bad) {
287 // edm::LogWarning("TkStripMeasurementDet") << "Testing module " << id_ <<" (subdet: "<< SiStripDetId(id_).subdetId() << ")" <<
288 // " U = " << utraj << " +/- " << uerr <<
289 // "; Range [" << (utraj - 3*uerr) << ", " << (utraj + 3*uerr) << "] " <<
290 // "= [" << start << "," << end << "]" <<
291 // " total strips:" << (end-start) << ", good:" << (end-start-bad) << ", bad:" << bad << ", largestBadBlock: " << largestBadBlock <<
292 // ". " << (ok ? "OK" : "NO");
293 // }
294  return ok;
295 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
BadStripCuts const & badStripCuts() const
int bad(Items const &cont)
std::vector< BadStripBlock > const & badStripBlocks() const
double f[11][100]
#define end
Definition: vmac.h:37
T min(T a, T b)
Definition: MathUtil.h:58
const detset& TkStripMeasurementDet::theSet ( const StMeasurementDetSet theDets) const
inline

Definition at line 113 of file TkStripMeasurementDet.h.

References StMeasurementDetSet::detSet(), and cmsHarvester::index.

113 {return theDets.detSet(index());}
const StripDetset & detSet(int i) const
int TkStripMeasurementDet::totalStrips ( ) const
inlineprivate

Definition at line 255 of file TkStripMeasurementDet.h.

References cmsHarvester::index.

Referenced by testStrips().

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

Member Data Documentation

int TkStripMeasurementDet::index_
private

Definition at line 247 of file TkStripMeasurementDet.h.

StMeasurementConditionSet* TkStripMeasurementDet::theDetConditions
private

Definition at line 248 of file TkStripMeasurementDet.h.