SimPPS
PPSPixelDigiProducer
src
RPixPileUpSignals.cc
Go to the documentation of this file.
1
#include "
SimPPS/PPSPixelDigiProducer/interface/RPixPileUpSignals.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
4
RPixPileUpSignals::RPixPileUpSignals
(
const
edm::ParameterSet
&
params
, uint32_t det_id) : det_id_(det_id) {
5
links_persistence_
=
params
.getParameter<
bool
>(
"CTPPSPixelDigiSimHitRelationsPersistence"
);
6
verbosity_
=
params
.getParameter<
int
>(
"RPixVerbosity"
);
7
}
8
9
void
RPixPileUpSignals::reset
() {
10
the_pixel_charge_piled_up_map_
.clear();
11
the_pixel_charge_piled_up_map_links_
.clear();
12
}
13
14
void
RPixPileUpSignals::add
(
const
std::map<unsigned short, double> &charge_induced,
int
PSimHitIndex) {
15
for
(std::map<unsigned short, double>::const_iterator
i
= charge_induced.begin();
i
!= charge_induced.end(); ++
i
) {
16
the_pixel_charge_piled_up_map_
[
i
->first] +=
i
->second;
17
if
(
links_persistence_
&&
i
->second > 0) {
18
the_pixel_charge_piled_up_map_links_
[
i
->first].push_back(std::pair<int, double>(PSimHitIndex,
i
->second));
19
if
(
verbosity_
) {
20
edm::LogInfo
(
"RPixPileUpSignals"
) <<
"Det id="
<<
det_id_
<<
" pixel="
<<
i
->first <<
" charge="
<<
i
->second;
21
}
22
}
23
}
24
}
mps_fire.i
i
Definition:
mps_fire.py:428
MessageLogger.h
CalibrationSummaryClient_cfi.params
params
Definition:
CalibrationSummaryClient_cfi.py:14
RPixPileUpSignals::det_id_
uint32_t det_id_
Definition:
RPixPileUpSignals.h:26
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
RPixPileUpSignals::the_pixel_charge_piled_up_map_
std::map< unsigned short, double > the_pixel_charge_piled_up_map_
Definition:
RPixPileUpSignals.h:23
RPixPileUpSignals::the_pixel_charge_piled_up_map_links_
std::map< unsigned short, std::vector< std::pair< int, double > > > the_pixel_charge_piled_up_map_links_
Definition:
RPixPileUpSignals.h:24
edm::ParameterSet
Definition:
ParameterSet.h:47
RPixPileUpSignals::RPixPileUpSignals
RPixPileUpSignals(const edm::ParameterSet ¶ms, uint32_t det_id)
Definition:
RPixPileUpSignals.cc:4
RPixPileUpSignals.h
RPixPileUpSignals::add
void add(const std::map< unsigned short, double > &charge_induced, int PSimHitIndex)
Definition:
RPixPileUpSignals.cc:14
RPixPileUpSignals::links_persistence_
bool links_persistence_
Definition:
RPixPileUpSignals.h:25
RPixPileUpSignals::reset
void reset()
Definition:
RPixPileUpSignals.cc:9
RPixPileUpSignals::verbosity_
bool verbosity_
Definition:
RPixPileUpSignals.h:27
Generated for CMSSW Reference Manual by
1.8.16