Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
SimMuon
RPCDigitizer
src
IRPCDigitizer.cc
Go to the documentation of this file.
1
#include "
SimMuon/RPCDigitizer/src/IRPCDigitizer.h
"
2
#include "
SimMuon/RPCDigitizer/src/RPCSimFactory.h
"
3
#include "
SimMuon/RPCDigitizer/src/RPCSim.h
"
4
#include "
SimDataFormats/TrackingHit/interface/PSimHit.h
"
5
#include "
Geometry/RPCGeometry/interface/RPCRoll.h
"
6
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
7
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
8
#include "
SimMuon/RPCDigitizer/src/RPCSimSetUp.h
"
9
10
// default constructor allocates default wire and strip digitizers
11
12
IRPCDigitizer::IRPCDigitizer
(
const
edm::ParameterSet
&
config
)
13
: theRPCSim{
RPCSimFactory::get
()->create(
config
.getParameter<
std::string
>(
"digiIRPCModel"
),
14
config
.getParameter<
edm::ParameterSet
>(
"digiIRPCModelConfig"
))} {
15
theNoise =
config
.getParameter<
bool
>(
"doBkgNoise"
);
16
}
17
18
IRPCDigitizer::~IRPCDigitizer
() =
default
;
19
20
void
IRPCDigitizer::doAction
(
MixCollection<PSimHit>
&
simHits
,
21
RPCDigiCollection
& rpcDigis,
22
RPCDigiSimLinks
& rpcDigiSimLink,
23
CLHEP::HepRandomEngine* engine) {
24
theRPCSim
->setRPCSimSetUp(
theSimSetUp
);
25
26
// arrange the hits by roll
27
std::map<int, edm::PSimHitContainer> hitMap;
28
for
(
MixCollection<PSimHit>::MixItr
hitItr =
simHits
.begin(); hitItr !=
simHits
.end(); ++hitItr) {
29
hitMap[hitItr->detUnitId()].push_back(*hitItr);
30
}
31
32
if
(!
theGeometry
) {
33
throw
cms::Exception
(
"Configuration"
)
34
<<
"IRPCDigitizer requires the RPCGeometry \n which is not present in the configuration file. You must add "
35
"the service\n in the configuration file or remove the modules that require it."
;
36
}
37
38
const
std::vector<const RPCRoll*>& rpcRolls =
theGeometry
->
rolls
();
39
for
(
auto
r
= rpcRolls.begin();
r
!= rpcRolls.end();
r
++) {
40
RPCDetId
id
= (*r)->id();
41
const
edm::PSimHitContainer
& rollSimHits = hitMap[
id
];
42
43
if
((*r)->isIRPC()) {
44
theRPCSim
->simulate(*
r
, rollSimHits, engine);
45
46
if
(
theNoise
) {
47
theRPCSim
->simulateNoise(*
r
, engine);
48
}
49
}
50
51
theRPCSim
->fillDigis((*r)->id(), rpcDigis);
52
rpcDigiSimLink.
insert
(
theRPCSim
->rpcDigiSimLinks());
53
}
54
}
55
56
const
RPCRoll
*
IRPCDigitizer::findDet
(
int
detId)
const
{
57
assert
(
theGeometry
!=
nullptr
);
58
const
GeomDetUnit
* detUnit =
theGeometry
->
idToDetUnit
(
RPCDetId
(detId));
59
return
dynamic_cast<const RPCRoll*>(detUnit);
60
}
RPCRoll
Definition:
RPCRoll.h:12
edm::DetSetVector< RPCDigiSimLink >
IRPCDigitizer::findDet
const RPCRoll * findDet(int detId) const
finds the rpc det unit in the geometry associated with this det ID
Definition:
IRPCDigitizer.cc:56
MessageLogger.h
GeomDet
Definition:
GeomDet.h:27
RPCSimFactory.h
RPCDetId
Definition:
RPCDetId.h:16
IRPCDigitizer::theGeometry
const RPCGeometry * theGeometry
Definition:
IRPCDigitizer.h:56
IRPCDigitizer::IRPCDigitizer
IRPCDigitizer(const edm::ParameterSet &config)
Definition:
IRPCDigitizer.cc:12
cms::cuda::assert
assert(be >=bs)
FastTrackerRecHitCombiner_cfi.simHits
simHits
Definition:
FastTrackerRecHitCombiner_cfi.py:5
RPCRoll.h
RPCSim.h
IRPCDigitizer::~IRPCDigitizer
~IRPCDigitizer()
IRPCDigitizer.h
MixCollection::MixItr
Definition:
MixCollection.h:62
IRPCDigitizer::theSimSetUp
RPCSimSetUp * theSimSetUp
Definition:
IRPCDigitizer.h:58
RPCGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition:
RPCGeometry.cc:30
RPCDigiCollection
config
Definition:
config.py:1
edm::DetSetVector::insert
void insert(detset const &s)
Insert the given DetSet.
Definition:
DetSetVector.h:220
PSimHit.h
MixCollection
Definition:
MixCollection.h:11
IRPCDigitizer::theNoise
bool theNoise
Definition:
IRPCDigitizer.h:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
IRPCDigitizer::theRPCSim
std::unique_ptr< RPCSim > theRPCSim
Definition:
IRPCDigitizer.h:57
get
#define get
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:31
Exception
Definition:
hltDiff.cc:246
RPCSimSetUp.h
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition:
PSimHitContainer.h:11
RPCGeometry::rolls
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
Definition:
RPCGeometry.cc:44
ParameterSet.h
IRPCDigitizer::doAction
void doAction(MixCollection< PSimHit > &simHits, RPCDigiCollection &rpcDigis, RPCDigiSimLinks &rpcDigiSimLink, CLHEP::HepRandomEngine *)
Definition:
IRPCDigitizer.cc:20
Generated for CMSSW Reference Manual by
1.8.16