Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimCalorimetry
HcalSimAlgos
interface
HFHitFilter.h
Go to the documentation of this file.
1
#ifndef HcalSimAlgos_HFHitFilter_h
2
#define HcalSimAlgos_HFHitFilter_h
3
4
#include "
SimCalorimetry/CaloSimAlgos/interface/CaloVHitFilter.h
"
5
#include "
DataFormats/HcalDetId/interface/HcalSubdetector.h
"
6
#include "
DataFormats/HcalDetId/interface/HcalDetId.h
"
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
:
23
bool
doHFWindow_
;
24
};
25
26
#endif
27
HFHitFilter::HFHitFilter
HFHitFilter(bool doHFWindow)
Definition:
HFHitFilter.h:12
HcalDetId::subdet
HcalSubdetector subdet() const
get the subdetector
Definition:
HcalDetId.h:45
PCaloHit
Definition:
PCaloHit.h:8
HcalSubdetector.h
PCaloHit::depth
uint16_t depth() const
Definition:
PCaloHit.h:49
HFHitFilter::accepts
virtual bool accepts(const PCaloHit &hit) const
Definition:
HFHitFilter.h:14
CaloVHitFilter
Definition:
CaloVHitFilter.h:7
CaloVHitFilter.h
HcalDetId
Definition:
HcalDetId.h:16
HcalDetId.h
HFHitFilter
Definition:
HFHitFilter.h:10
HcalForward
Definition:
HcalAssistant.h:31
PCaloHit::id
unsigned int id() const
Definition:
PCaloHit.h:43
HFHitFilter::doHFWindow_
bool doHFWindow_
Definition:
HFHitFilter.h:23
hit
Definition:
SiStripHitEffFromCalibTree.cc:79
Generated for CMSSW Reference Manual by
1.8.5