Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimCalorimetry
HcalSimAlgos
src
HcalHitFilter.cc
Go to the documentation of this file.
1
#include "
SimCalorimetry/HcalSimAlgos/interface/HcalHitFilter.h
"
2
3
4
HcalHitFilter::HcalHitFilter
(
HcalSubdetector
subdet)
5
: theSubdet(subdet)
6
{
7
}
8
9
10
void
HcalHitFilter::setDetIds
(
const
std::vector<DetId> & detIds)
11
{
12
theDetIds
= detIds;
13
}
14
15
16
bool
HcalHitFilter::accepts
(
const
PCaloHit
&
hit
)
const
{
17
bool
result
=
false
;
18
HcalDetId
hcalDetId(hit.
id
());
19
if
(hcalDetId.subdet() ==
theSubdet
)
20
{
21
if
(
theDetIds
.empty() ||
std::find
(
theDetIds
.begin(),
theDetIds
.end(),
DetId
(hit.
id
())) !=
theDetIds
.end())
22
{
23
result =
true
;
24
}
25
}
26
return
result
;
27
}
28
HcalHitFilter::accepts
virtual bool accepts(const PCaloHit &hit) const
Definition:
HcalHitFilter.cc:16
PCaloHit
Definition:
PCaloHit.h:8
HcalHitFilter::setDetIds
void setDetIds(const std::vector< DetId > &detIds)
Definition:
HcalHitFilter.cc:10
HcalHitFilter.h
HcalHitFilter::theSubdet
HcalSubdetector theSubdet
Definition:
HcalHitFilter.h:20
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:7
HcalDetId
Definition:
HcalDetId.h:16
query.result
tuple result
Definition:
query.py:137
HcalSubdetector
HcalSubdetector
Definition:
HcalAssistant.h:31
PCaloHit::id
unsigned int id() const
Definition:
PCaloHit.h:43
DetId
Definition:
DetId.h:18
hit
Definition:
SiStripHitEffFromCalibTree.cc:79
HcalHitFilter::theDetIds
std::vector< DetId > theDetIds
Definition:
HcalHitFilter.h:22
HcalHitFilter::HcalHitFilter
HcalHitFilter(HcalSubdetector subdet)
Definition:
HcalHitFilter.cc:4
Generated for CMSSW Reference Manual by
1.8.5