CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
RPixPileUpSignals Class Reference

#include <RPixPileUpSignals.h>

Public Member Functions

void add (const std::map< unsigned short, double > &charge_induced, int PSimHitIndex)
 
std::map< unsigned short,
std::vector< std::pair< int,
double > > > & 
dumpLinks ()
 
const std::map< unsigned short,
double > & 
dumpSignal ()
 
void reset ()
 
 RPixPileUpSignals (const edm::ParameterSet &params, uint32_t det_id)
 

Private Attributes

uint32_t det_id_
 
bool links_persistence_
 
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_
 
bool verbosity_
 

Detailed Description

Definition at line 7 of file RPixPileUpSignals.h.

Constructor & Destructor Documentation

RPixPileUpSignals::RPixPileUpSignals ( const edm::ParameterSet params,
uint32_t  det_id 
)

Definition at line 4 of file RPixPileUpSignals.cc.

References edm::ParameterSet::getParameter(), links_persistence_, and verbosity_.

4  : det_id_(det_id) {
5  links_persistence_ = params.getParameter<bool>("CTPPSPixelDigiSimHitRelationsPersistence");
6  verbosity_ = params.getParameter<int>("RPixVerbosity");
7 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Function Documentation

void RPixPileUpSignals::add ( const std::map< unsigned short, double > &  charge_induced,
int  PSimHitIndex 
)

Definition at line 14 of file RPixPileUpSignals.cc.

References det_id_, mps_fire::i, links_persistence_, the_pixel_charge_piled_up_map_, the_pixel_charge_piled_up_map_links_, and verbosity_.

Referenced by counter.Counter::register().

14  {
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
std::map<unsigned short, std::vector<std::pair<int, double> > >& RPixPileUpSignals::dumpLinks ( )
inline

Definition at line 18 of file RPixPileUpSignals.h.

References the_pixel_charge_piled_up_map_links_.

18  {
20  }
std::map< unsigned short, std::vector< std::pair< int, double > > > the_pixel_charge_piled_up_map_links_
const std::map<unsigned short, double>& RPixPileUpSignals::dumpSignal ( )
inline

Definition at line 15 of file RPixPileUpSignals.h.

References the_pixel_charge_piled_up_map_.

std::map< unsigned short, double > the_pixel_charge_piled_up_map_
void RPixPileUpSignals::reset ( void  )

Definition at line 9 of file RPixPileUpSignals.cc.

References the_pixel_charge_piled_up_map_, and the_pixel_charge_piled_up_map_links_.

9  {
12 }
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_

Member Data Documentation

uint32_t RPixPileUpSignals::det_id_
private

Definition at line 26 of file RPixPileUpSignals.h.

Referenced by add().

bool RPixPileUpSignals::links_persistence_
private

Definition at line 25 of file RPixPileUpSignals.h.

Referenced by add(), and RPixPileUpSignals().

std::map<unsigned short, double> RPixPileUpSignals::the_pixel_charge_piled_up_map_
private

Definition at line 23 of file RPixPileUpSignals.h.

Referenced by add(), dumpSignal(), and reset().

std::map<unsigned short, std::vector<std::pair<int, double> > > RPixPileUpSignals::the_pixel_charge_piled_up_map_links_
private

Definition at line 24 of file RPixPileUpSignals.h.

Referenced by add(), dumpLinks(), and reset().

bool RPixPileUpSignals::verbosity_
private

Definition at line 27 of file RPixPileUpSignals.h.

Referenced by add(), and RPixPileUpSignals().