SimPPS
RPDigiProducer
plugins
RPPileUpSignals.cc
Go to the documentation of this file.
1
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include "
SimPPS/RPDigiProducer/plugins/RPPileUpSignals.h
"
4
#include <iostream>
5
6
RPPileUpSignals::RPPileUpSignals
(
const
edm::ParameterSet
&
params
,
RPDetId
det_id) : det_id_(det_id) {
7
links_persistence_
=
params
.getParameter<
bool
>(
"RPDigiSimHitRelationsPresistence"
);
8
verbosity_
=
params
.getParameter<
int
>(
"RPVerbosity"
);
9
}
10
11
void
RPPileUpSignals::reset
() {
12
the_strip_charge_piled_up_map_
.clear();
13
the_strip_charge_piled_up_map_links_
.clear();
14
}
15
16
void
RPPileUpSignals::add
(
const
simromanpot::strip_charge_map
&charge_induced,
int
PSimHitIndex) {
17
for
(simromanpot::strip_charge_map::const_iterator
i
= charge_induced.begin();
i
!= charge_induced.end(); ++
i
) {
18
the_strip_charge_piled_up_map_
[
i
->first] +=
i
->second;
19
if
(
links_persistence_
&&
i
->second > 0) {
20
the_strip_charge_piled_up_map_links_
[
i
->first].push_back(std::pair<int, double>(PSimHitIndex,
i
->second));
21
if
(
verbosity_
) {
22
edm::LogInfo
(
"RPPileUpSignals"
) <<
"Det id="
<<
det_id_
<<
" strip="
<<
i
->first <<
" charge="
<<
i
->second
23
<<
"\n"
;
24
}
25
}
26
}
27
}
RPPileUpSignals::RPPileUpSignals
RPPileUpSignals(const edm::ParameterSet ¶ms, RPDetId det_id)
Definition:
RPPileUpSignals.cc:6
mps_fire.i
i
Definition:
mps_fire.py:355
MessageLogger.h
CalibrationSummaryClient_cfi.params
params
Definition:
CalibrationSummaryClient_cfi.py:14
edm::LogInfo
Definition:
MessageLogger.h:254
RPPileUpSignals::add
void add(const simromanpot::strip_charge_map &charge_induced, int PSimHitIndex)
Definition:
RPPileUpSignals.cc:16
simromanpot::strip_charge_map
std::map< unsigned short, double > strip_charge_map
Definition:
RPSimTypes.h:14
RPPileUpSignals::links_persistence_
bool links_persistence_
Definition:
RPPileUpSignals.h:19
edm::ParameterSet
Definition:
ParameterSet.h:36
RPPileUpSignals::the_strip_charge_piled_up_map_links_
simromanpot::strip_charge_map_links_type the_strip_charge_piled_up_map_links_
Definition:
RPPileUpSignals.h:18
RPPileUpSignals.h
RPPileUpSignals::the_strip_charge_piled_up_map_
simromanpot::strip_charge_map the_strip_charge_piled_up_map_
Definition:
RPPileUpSignals.h:17
RPDetId
uint32_t RPDetId
Definition:
RPSimTypes.h:11
RPPileUpSignals::reset
void reset()
Definition:
RPPileUpSignals.cc:11
RPPileUpSignals::verbosity_
bool verbosity_
Definition:
RPPileUpSignals.h:21
RPPileUpSignals::det_id_
RPDetId det_id_
Definition:
RPPileUpSignals.h:20
Generated for CMSSW Reference Manual by
1.8.16