CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HitMaskHelper.h
Go to the documentation of this file.
1 #ifndef FASTSIMULATION_TRACKING_HITMASKHELPER_H
2 #define FASTSIMULATION_TRACKING_HITMASKHELPER_H
3 
5 #include "vector"
6 
7 class HitMaskHelper {
8 
9  public:
10 
11  HitMaskHelper(const std::vector<bool> * hitMasks) : hitMasks_(hitMasks) { ; }
12 
13  bool mask(const FastTrackerRecHit * hit) const{
14  for(unsigned int i = 0;i<hit->nIds();i++){
15  if(!(*hitMasks_)[hit->id(i)]){
16  return false;
17  }
18  }
19  return true;
20  }
21 
22  private:
23 
24  HitMaskHelper();
25  const std::vector<bool> * hitMasks_;
26 };
27 
28 #endif
bool mask(const FastTrackerRecHit *hit) const
Definition: HitMaskHelper.h:13
HitMaskHelper(const std::vector< bool > *hitMasks)
Definition: HitMaskHelper.h:11
int i
Definition: DBlmapReader.cc:9
virtual size_t nIds() const
const std::vector< bool > * hitMasks_
Definition: HitMaskHelper.h:25
virtual int32_t id(size_t i=0) const