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
);
SiPixelCluster.h
cms::cuda::assert
assert(be >=bs)
TrackerCleaner::match_rechit_type
bool match_rechit_type(const TrackingRecHit &murechit)
Definition:
TrackerCleaner.cc:19
SiStripRecHit2D
Definition:
SiStripRecHit2D.h:7
ProjectedSiStripRecHit2D
Definition:
ProjectedSiStripRecHit2D.h:8
SiPixelRecHit
Our base class.
Definition:
SiPixelRecHit.h:23
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
TrackerCleaner
Definition:
TrackerCleaner.h:38
SiPixelRecHit.h
TrackerCleaner.h
StripColCleaner
TrackerCleaner< SiStripCluster > StripColCleaner
Definition:
TrackerCleaner.cc:12
ProjectedSiStripRecHit2D.h
SiStripRecHit1D
Definition:
SiStripRecHit1D.h:8
TrackingRecHit
Definition:
TrackingRecHit.h:21
SiStripRecHit1D.h
SiStripMatchedRecHit2D
Definition:
SiStripMatchedRecHit2D.h:8
SiStripMatchedRecHit2D.h
SiStripRecHit2D.h
PixelColCleaner
TrackerCleaner< SiPixelCluster > PixelColCleaner
Definition:
TrackerCleaner.cc:11
Generated for CMSSW Reference Manual by
1.8.16