Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
TauAnalysis
MCEmbeddingTools
plugins
MuonDetRecHitMixer.cc
Go to the documentation of this file.
1
#include "
TauAnalysis/MCEmbeddingTools/plugins/MuonDetRecHitMixer.h
"
2
3
#include "
DataFormats/MuonDetId/interface/CSCDetId.h
"
4
#include "
DataFormats/CSCRecHit/interface/CSCRecHit2D.h
"
5
#include "
DataFormats/MuonDetId/interface/DTLayerId.h
"
6
#include "
DataFormats/DTRecHit/interface/DTRecHit1DPair.h
"
7
#include "
DataFormats/MuonDetId/interface/RPCDetId.h
"
8
#include "
DataFormats/RPCRecHit/interface/RPCRecHit.h
"
9
10
typedef
MuonDetRecHitMixer<CSCDetId, CSCRecHit2D>
CSCRecHitMixer
;
11
typedef
MuonDetRecHitMixer<DTLayerId, DTRecHit1DPair>
DTRecHitMixer
;
12
typedef
MuonDetRecHitMixer<RPCDetId, RPCRecHit>
RPCRecHitMixer
;
13
14
//-------------------------------------------------------------------------------
15
// define 'getDetIds' functions used for different types of recHits
16
//-------------------------------------------------------------------------------
17
18
template
<
typename
T1,
typename
T2>
19
uint32_t
MuonDetRecHitMixer<T1,T2>::getRawDetId
(
const
T2& recHit)
20
{
21
assert(0);
// CV: make sure general function never gets called;
22
// always use template specializations
23
}
24
25
26
template
<>
27
uint32_t
MuonDetRecHitMixer<CSCDetId, CSCRecHit2D>::getRawDetId
(
const
CSCRecHit2D
& recHit)
28
{
29
return
recHit.cscDetId().rawId();
30
}
31
32
template
<>
33
uint32_t
MuonDetRecHitMixer<DTLayerId, DTRecHit1DPair>::getRawDetId
(
const
DTRecHit1DPair
& recHit)
34
{
35
return
recHit.
geographicalId
().
rawId
();
36
}
37
38
template
<>
39
uint32_t
MuonDetRecHitMixer<RPCDetId, RPCRecHit>::getRawDetId
(
const
RPCRecHit
& recHit)
40
{
41
return
recHit.
rpcId
().
rawId
();
42
}
43
44
#include "
FWCore/Framework/interface/MakerMacros.h
"
45
46
DEFINE_FWK_MODULE
(
CSCRecHitMixer
);
47
DEFINE_FWK_MODULE
(
DTRecHitMixer
);
48
DEFINE_FWK_MODULE
(
RPCRecHitMixer
);
49
50
51
CSCRecHit2D
CSCDetId.h
RPCDetId.h
RPCRecHitMixer
MuonDetRecHitMixer< RPCDetId, RPCRecHit > RPCRecHitMixer
Definition:
MuonDetRecHitMixer.cc:12
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
RPCRecHit
Definition:
RPCRecHit.h:15
MakerMacros.h
RPCRecHit.h
MuonDetRecHitMixer::getRawDetId
uint32_t getRawDetId(const T2 &)
Definition:
MuonDetRecHitMixer.cc:19
DTRecHitMixer
MuonDetRecHitMixer< DTLayerId, DTRecHit1DPair > DTRecHitMixer
Definition:
MuonDetRecHitMixer.cc:11
DetId::rawId
uint32_t rawId() const
get the raw id
Definition:
DetId.h:43
MuonDetRecHitMixer.h
RPCRecHit::rpcId
RPCDetId rpcId() const
Return the rpcId.
Definition:
RPCRecHit.h:97
DTRecHit1DPair::geographicalId
virtual DetId geographicalId() const
Return the detId of the Det (a DTLayer).
Definition:
DTRecHit1DPair.cc:80
DTLayerId.h
MuonDetRecHitMixer
Definition:
MuonDetRecHitMixer.h:30
DTRecHit1DPair.h
CSCRecHit2D.h
CSCRecHitMixer
MuonDetRecHitMixer< CSCDetId, CSCRecHit2D > CSCRecHitMixer
Definition:
MuonDetRecHitMixer.cc:10
DTRecHit1DPair
Definition:
DTRecHit1DPair.h:26
Generated for CMSSW Reference Manual by
1.8.5