CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
RPixPileUpSignals.cc
Go to the documentation of this file.
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 
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 }
std::map< unsigned short, double > the_pixel_charge_piled_up_map_
std::map< unsigned short, std::vector< std::pair< int, double > > > the_pixel_charge_piled_up_map_links_
Log< level::Info, false > LogInfo
RPixPileUpSignals(const edm::ParameterSet &params, uint32_t det_id)
void add(const std::map< unsigned short, double > &charge_induced, int PSimHitIndex)