src
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::det_id_
RPDetId det_id_
Definition:
RPPileUpSignals.h:20
mps_fire.i
i
Definition:
mps_fire.py:429
MessageLogger.h
RPPileUpSignals::the_strip_charge_piled_up_map_
simromanpot::strip_charge_map the_strip_charge_piled_up_map_
Definition:
RPPileUpSignals.h:17
RPPileUpSignals::add
void add(const simromanpot::strip_charge_map &charge_induced, int PSimHitIndex)
Definition:
RPPileUpSignals.cc:16
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::RPPileUpSignals
RPPileUpSignals(const edm::ParameterSet ¶ms, RPDetId det_id)
Definition:
RPPileUpSignals.cc:6
RPPileUpSignals.h
RPDetId
uint32_t RPDetId
Definition:
RPSimTypes.h:12
submitPVValidationJobs.params
def params
Definition:
submitPVValidationJobs.py:482
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:131
simromanpot::strip_charge_map
std::map< unsigned short, double > strip_charge_map
Definition:
RPSimTypes.h:15
RPPileUpSignals::links_persistence_
bool links_persistence_
Definition:
RPPileUpSignals.h:19
RPPileUpSignals::reset
void reset()
Definition:
RPPileUpSignals.cc:11
edm::ParameterSet
Definition:
ParameterSet.h:47
RPPileUpSignals::verbosity_
bool verbosity_
Definition:
RPPileUpSignals.h:21
Generated for CMSSW Reference Manual by
1.8.14