CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HFHitFilter.h
Go to the documentation of this file.
1 #ifndef HcalSimAlgos_HFHitFilter_h
2 #define HcalSimAlgos_HFHitFilter_h
3 
7 
8 #include <iostream>
9 
10 class HFHitFilter : public CaloVHitFilter {
11  public:
12  HFHitFilter(bool doHFWindow): doHFWindow_(doHFWindow) {}
13 
14  virtual bool accepts(const PCaloHit & hit) const {
15  HcalDetId hcalDetId(hit.id());
16  bool ok1 = hcalDetId.subdet() == HcalForward;
17  // might not want depth=1
18  //if(ok1) std::cout << " HF " << hcalDetId.subdet() << " " << doHFWindow_ << " DEPTH " << hit.depth() << std::endl;
19  bool ok2 = doHFWindow_ || hit.depth()==0;
20  return ok1 && ok2;
21  }
22 private:
24 };
25 
26 #endif
27 
HFHitFilter(bool doHFWindow)
Definition: HFHitFilter.h:12
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:45
uint16_t depth() const
Definition: PCaloHit.h:49
virtual bool accepts(const PCaloHit &hit) const
Definition: HFHitFilter.h:14
unsigned int id() const
Definition: PCaloHit.h:43
bool doHFWindow_
Definition: HFHitFilter.h:23