TauAnalysis
MCEmbeddingTools
plugins
TrackerCleaner.cc
Go to the documentation of this file.
1
#include "
TauAnalysis/MCEmbeddingTools/plugins/TrackerCleaner.h
"
2
3
#include "
DataFormats/TrackerRecHit2D/interface/SiStripRecHit1D.h
"
4
#include "
DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h
"
5
#include "
DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h
"
6
#include "
DataFormats/TrackerRecHit2D/interface/ProjectedSiStripRecHit2D.h
"
7
8
#include "
DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h
"
9
#include "
DataFormats/SiPixelCluster/interface/SiPixelCluster.h
"
10
11
typedef
TrackerCleaner<SiPixelCluster>
PixelColCleaner
;
12
typedef
TrackerCleaner<SiStripCluster>
StripColCleaner
;
13
14
//-------------------------------------------------------------------------------
15
// define 'buildRecHit' functions used for different types of recHits
16
//-------------------------------------------------------------------------------
17
18
template
<
typename
T>
19
bool
TrackerCleaner<T>::match_rechit_type
(
const
TrackingRecHit
&murechit) {
20
assert
(0);
// CV: make sure general function never gets called;
21
// always use template specializations
22
return
false
;
23
}
24
25
template
<>
26
bool
TrackerCleaner<SiStripCluster>::match_rechit_type
(
const
TrackingRecHit
&murechit) {
27
const
std::type_info &hit_type =
typeid
(murechit);
28
if
(hit_type ==
typeid
(
SiStripRecHit2D
))
29
return
true
;
30
else
if
(hit_type ==
typeid
(
SiStripRecHit1D
))
31
return
true
;
32
else
if
(hit_type ==
typeid
(
SiStripMatchedRecHit2D
))
33
return
true
;
34
else
if
(hit_type ==
typeid
(
ProjectedSiStripRecHit2D
))
35
return
true
;
36
37
return
false
;
38
}
39
40
template
<>
41
bool
TrackerCleaner<SiPixelCluster>::match_rechit_type
(
const
TrackingRecHit
&murechit) {
42
const
std::type_info &hit_type =
typeid
(murechit);
43
if
(hit_type ==
typeid
(
SiPixelRecHit
))
44
return
true
;
45
46
return
false
;
47
}
48
49
DEFINE_FWK_MODULE
(
PixelColCleaner
);
50
DEFINE_FWK_MODULE
(
StripColCleaner
);
TrackerCleaner
Definition:
TrackerCleaner.h:38
SiStripRecHit1D.h
ProjectedSiStripRecHit2D.h
SiPixelRecHit.h
SiStripRecHit2D
Definition:
SiStripRecHit2D.h:7
PixelColCleaner
TrackerCleaner< SiPixelCluster > PixelColCleaner
Definition:
TrackerCleaner.cc:11
TrackingRecHit
Definition:
TrackingRecHit.h:21
cms::cuda::assert
assert(be >=bs)
SiStripRecHit2D.h
SiStripMatchedRecHit2D
Definition:
SiStripMatchedRecHit2D.h:8
TrackerCleaner.h
SiStripMatchedRecHit2D.h
StripColCleaner
TrackerCleaner< SiStripCluster > StripColCleaner
Definition:
TrackerCleaner.cc:12
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
SiStripRecHit1D
Definition:
SiStripRecHit1D.h:8
ProjectedSiStripRecHit2D
Definition:
ProjectedSiStripRecHit2D.h:8
TrackerCleaner::match_rechit_type
bool match_rechit_type(const TrackingRecHit &murechit)
Definition:
TrackerCleaner.cc:19
SiPixelCluster.h
SiPixelRecHit
Our base class.
Definition:
SiPixelRecHit.h:23
Generated for CMSSW Reference Manual by
1.8.14