CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
SiPixelDynamicInefficiency Class Reference

#include <SiPixelDynamicInefficiency.h>

Public Member Functions

double getChipGeomFactor (const uint32_t &) const
 
const std::map< unsigned int, double > & getChipGeomFactors () const
 
double getColGeomFactor (const uint32_t &) const
 
const std::map< unsigned int, double > & getColGeomFactors () const
 
uint32_t getDetIdmask (unsigned int &) const
 
const std::vector< uint32_t > getDetIdmasks () const
 
double getPixelGeomFactor (const uint32_t &) const
 
const std::map< unsigned int, double > & getPixelGeomFactors () const
 
std::vector< double > getPUFactor (const uint32_t &) const
 
const std::map< unsigned int, std::vector< double > > & getPUFactors () const
 
double gettheInstLumiScaleFactor () const
 
const double gettheInstLumiScaleFactor_ () const
 
bool putChipGeomFactor (const uint32_t &, double &)
 
void putChipGeomFactors (std::map< unsigned int, double > &ChipGeomFactors)
 
bool putColGeomFactor (const uint32_t &, double &)
 
void putColGeomFactors (std::map< unsigned int, double > &ColGeomFactors)
 
bool putDetIdmask (uint32_t &)
 
void putDetIdmasks (std::vector< uint32_t > &masks)
 
bool putPixelGeomFactor (const uint32_t &, double &)
 
void putPixelGeomFactors (std::map< unsigned int, double > &PixelGeomFactors)
 
bool putPUFactor (const uint32_t &, std::vector< double > &)
 
void putPUFactors (std::map< unsigned int, std::vector< double > > &PUFactors)
 
bool puttheInstLumiScaleFactor (double &)
 
void puttheInstLumiScaleFactor_ (double &InstLumiScaleFactor)
 
 SiPixelDynamicInefficiency ()
 
 ~SiPixelDynamicInefficiency ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::map< unsigned int, double > m_ChipGeomFactors
 
std::map< unsigned int, double > m_ColGeomFactors
 
std::map< unsigned int, double > m_PixelGeomFactors
 
std::map< unsigned int, std::vector< double > > m_PUFactors
 
double theInstLumiScaleFactor_
 
std::vector< uint32_t > v_DetIdmasks
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 11 of file SiPixelDynamicInefficiency.h.

Constructor & Destructor Documentation

◆ SiPixelDynamicInefficiency()

SiPixelDynamicInefficiency::SiPixelDynamicInefficiency ( )

Definition at line 4 of file SiPixelDynamicInefficiency.cc.

4 { theInstLumiScaleFactor_ = -9999; }

References theInstLumiScaleFactor_.

◆ ~SiPixelDynamicInefficiency()

SiPixelDynamicInefficiency::~SiPixelDynamicInefficiency ( )
inline

Definition at line 14 of file SiPixelDynamicInefficiency.h.

14 {};

Member Function Documentation

◆ getChipGeomFactor()

double SiPixelDynamicInefficiency::getChipGeomFactor ( const uint32_t &  detid) const

Definition at line 61 of file SiPixelDynamicInefficiency.cc.

61  {
62  std::map<unsigned int, double>::const_iterator id = m_ChipGeomFactors.find(detid);
63  if (id != m_ChipGeomFactors.end())
64  return id->second;
65  else {
66  edm::LogError("SiPixelDynamicInefficiency")
67  << "SiPixelDynamicInefficiency ChipGeomFactor for DetID " << detid << " is not stored" << std::endl;
68  }
69  return 0;
70 }

References triggerObjects_cff::id, and m_ChipGeomFactors.

◆ getChipGeomFactors()

const std::map<unsigned int, double>& SiPixelDynamicInefficiency::getChipGeomFactors ( ) const
inline

◆ getColGeomFactor()

double SiPixelDynamicInefficiency::getColGeomFactor ( const uint32_t &  detid) const

Definition at line 39 of file SiPixelDynamicInefficiency.cc.

39  {
40  std::map<unsigned int, double>::const_iterator id = m_ColGeomFactors.find(detid);
41  if (id != m_ColGeomFactors.end())
42  return id->second;
43  else {
44  edm::LogError("SiPixelDynamicInefficiency")
45  << "SiPixelDynamicInefficiency ColGeomFactor for DetID " << detid << " is not stored" << std::endl;
46  }
47  return 0;
48 }

References triggerObjects_cff::id, and m_ColGeomFactors.

◆ getColGeomFactors()

const std::map<unsigned int, double>& SiPixelDynamicInefficiency::getColGeomFactors ( ) const
inline

◆ getDetIdmask()

uint32_t SiPixelDynamicInefficiency::getDetIdmask ( unsigned int &  i) const

Definition at line 102 of file SiPixelDynamicInefficiency.cc.

102  {
103  if (v_DetIdmasks.size() <= i) {
104  edm::LogError("SiPixelDynamicInefficiency")
105  << "SiPixelDynamicInefficiency DetIdmask " << i << " is not stored!" << std::endl;
106  return 0;
107  } else
108  return v_DetIdmasks.at(i);
109 }

References mps_fire::i, and v_DetIdmasks.

◆ getDetIdmasks()

const std::vector<uint32_t> SiPixelDynamicInefficiency::getDetIdmasks ( ) const
inline

Definition at line 36 of file SiPixelDynamicInefficiency.h.

36 { return v_DetIdmasks; }

References v_DetIdmasks.

Referenced by SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db().

◆ getPixelGeomFactor()

double SiPixelDynamicInefficiency::getPixelGeomFactor ( const uint32_t &  detid) const

Definition at line 17 of file SiPixelDynamicInefficiency.cc.

17  {
18  std::map<unsigned int, double>::const_iterator id = m_PixelGeomFactors.find(detid);
19  if (id != m_PixelGeomFactors.end())
20  return id->second;
21  else {
22  edm::LogError("SiPixelDynamicInefficiency")
23  << "SiPixelDynamicInefficiency PixelGeomFactor for DetID " << detid << " is not stored" << std::endl;
24  }
25  return 0;
26 }

References triggerObjects_cff::id, and m_PixelGeomFactors.

◆ getPixelGeomFactors()

const std::map<unsigned int, double>& SiPixelDynamicInefficiency::getPixelGeomFactors ( ) const
inline

◆ getPUFactor()

std::vector< double > SiPixelDynamicInefficiency::getPUFactor ( const uint32_t &  detid) const

Definition at line 83 of file SiPixelDynamicInefficiency.cc.

83  {
84  std::map<unsigned int, std::vector<double> >::const_iterator id = m_PUFactors.find(detid);
85  if (id != m_PUFactors.end())
86  return id->second;
87  else {
88  edm::LogError("SiPixelDynamicInefficiency")
89  << "SiPixelDynamicInefficiency PUFactor for DetID " << detid << " is not stored" << std::endl;
90  }
91  std::vector<double> empty;
92  return empty;
93 }

References triggerObjects_cff::id, and m_PUFactors.

◆ getPUFactors()

const std::map<unsigned int, std::vector<double> >& SiPixelDynamicInefficiency::getPUFactors ( ) const
inline

Definition at line 30 of file SiPixelDynamicInefficiency.h.

30 { return m_PUFactors; }

References m_PUFactors.

Referenced by SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db().

◆ gettheInstLumiScaleFactor()

double SiPixelDynamicInefficiency::gettheInstLumiScaleFactor ( ) const

Definition at line 122 of file SiPixelDynamicInefficiency.cc.

122  {
123  if (theInstLumiScaleFactor_ == -9999) {
124  edm::LogError("SiPixelDynamicInefficiency")
125  << "SiPixelDynamicInefficiency theInstLumiScaleFactor is not stored!" << std::endl;
126  return 0;
127  } else
129 }

References theInstLumiScaleFactor_.

Referenced by SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db().

◆ gettheInstLumiScaleFactor_()

const double SiPixelDynamicInefficiency::gettheInstLumiScaleFactor_ ( ) const
inline

Definition at line 33 of file SiPixelDynamicInefficiency.h.

33 { return theInstLumiScaleFactor_; }

References theInstLumiScaleFactor_.

◆ putChipGeomFactor()

bool SiPixelDynamicInefficiency::putChipGeomFactor ( const uint32_t &  detid,
double &  value 
)

Definition at line 50 of file SiPixelDynamicInefficiency.cc.

50  {
51  std::map<unsigned int, double>::const_iterator id = m_ChipGeomFactors.find(detid);
52  if (id != m_ChipGeomFactors.end()) {
53  edm::LogError("SiPixelDynamicInefficiency") << "SiPixelDynamicInefficiency ChipGeomFactor for DetID " << detid
54  << " is already stored. Skippig this put" << std::endl;
55  return false;
56  } else
57  m_ChipGeomFactors[detid] = value;
58  return true;
59 }

References m_ChipGeomFactors, and relativeConstraints::value.

◆ putChipGeomFactors()

void SiPixelDynamicInefficiency::putChipGeomFactors ( std::map< unsigned int, double > &  ChipGeomFactors)
inline

Definition at line 24 of file SiPixelDynamicInefficiency.h.

24  {
25  m_ChipGeomFactors = ChipGeomFactors;
26  }

References m_ChipGeomFactors.

◆ putColGeomFactor()

bool SiPixelDynamicInefficiency::putColGeomFactor ( const uint32_t &  detid,
double &  value 
)

Definition at line 28 of file SiPixelDynamicInefficiency.cc.

28  {
29  std::map<unsigned int, double>::const_iterator id = m_ColGeomFactors.find(detid);
30  if (id != m_ColGeomFactors.end()) {
31  edm::LogError("SiPixelDynamicInefficiency") << "SiPixelDynamicInefficiency ColGeomFactor for DetID " << detid
32  << " is already stored. Skippig this put" << std::endl;
33  return false;
34  } else
35  m_ColGeomFactors[detid] = value;
36  return true;
37 }

References m_ColGeomFactors, and relativeConstraints::value.

◆ putColGeomFactors()

void SiPixelDynamicInefficiency::putColGeomFactors ( std::map< unsigned int, double > &  ColGeomFactors)
inline

Definition at line 21 of file SiPixelDynamicInefficiency.h.

21 { m_ColGeomFactors = ColGeomFactors; }

References m_ColGeomFactors.

◆ putDetIdmask()

bool SiPixelDynamicInefficiency::putDetIdmask ( uint32_t &  mask)

Definition at line 95 of file SiPixelDynamicInefficiency.cc.

95  {
96  for (unsigned int i = 0; i < v_DetIdmasks.size(); i++)
97  if (mask == v_DetIdmasks.at(i))
98  return false;
99  v_DetIdmasks.push_back(mask);
100  return true;
101 }

References mps_fire::i, and v_DetIdmasks.

◆ putDetIdmasks()

void SiPixelDynamicInefficiency::putDetIdmasks ( std::vector< uint32_t > &  masks)
inline

Definition at line 35 of file SiPixelDynamicInefficiency.h.

35 { v_DetIdmasks = masks; }

References v_DetIdmasks.

◆ putPixelGeomFactor()

bool SiPixelDynamicInefficiency::putPixelGeomFactor ( const uint32_t &  detid,
double &  value 
)

Definition at line 6 of file SiPixelDynamicInefficiency.cc.

6  {
7  std::map<unsigned int, double>::const_iterator id = m_PixelGeomFactors.find(detid);
8  if (id != m_PixelGeomFactors.end()) {
9  edm::LogError("SiPixelDynamicInefficiency") << "SiPixelDynamicInefficiency PixelGeomFactor for DetID " << detid
10  << " is already stored. Skippig this put" << std::endl;
11  return false;
12  } else
13  m_PixelGeomFactors[detid] = value;
14  return true;
15 }

References m_PixelGeomFactors, and relativeConstraints::value.

◆ putPixelGeomFactors()

void SiPixelDynamicInefficiency::putPixelGeomFactors ( std::map< unsigned int, double > &  PixelGeomFactors)
inline

Definition at line 16 of file SiPixelDynamicInefficiency.h.

16  {
17  m_PixelGeomFactors = PixelGeomFactors;
18  }

References m_PixelGeomFactors.

◆ putPUFactor()

bool SiPixelDynamicInefficiency::putPUFactor ( const uint32_t &  detid,
std::vector< double > &  v_value 
)

Definition at line 72 of file SiPixelDynamicInefficiency.cc.

72  {
73  std::map<unsigned int, std::vector<double> >::const_iterator id = m_PUFactors.find(detid);
74  if (id != m_PUFactors.end()) {
75  edm::LogError("SiPixelDynamicInefficiency") << "SiPixelDynamicInefficiency PUFactor for DetID " << detid
76  << " is already stored. Skippig this put" << std::endl;
77  return false;
78  } else
79  m_PUFactors[detid] = v_value;
80  return true;
81 }

References m_PUFactors.

◆ putPUFactors()

void SiPixelDynamicInefficiency::putPUFactors ( std::map< unsigned int, std::vector< double > > &  PUFactors)
inline

Definition at line 29 of file SiPixelDynamicInefficiency.h.

29 { m_PUFactors = PUFactors; }

References m_PUFactors.

◆ puttheInstLumiScaleFactor()

bool SiPixelDynamicInefficiency::puttheInstLumiScaleFactor ( double &  theInstLumiScaleFactor)

Definition at line 111 of file SiPixelDynamicInefficiency.cc.

111  {
112  if (theInstLumiScaleFactor_ != -9999) {
113  edm::LogError("SiPixelDynamicInefficiency")
114  << "SiPixelDynamicInefficiency theInstLumiScaleFactor is already stored! Skippig this put!" << std::endl;
115  return false;
116  } else {
117  theInstLumiScaleFactor_ = theInstLumiScaleFactor;
118  return true;
119  }
120 }

References theInstLumiScaleFactor_.

◆ puttheInstLumiScaleFactor_()

void SiPixelDynamicInefficiency::puttheInstLumiScaleFactor_ ( double &  InstLumiScaleFactor)
inline

Definition at line 32 of file SiPixelDynamicInefficiency.h.

32 { theInstLumiScaleFactor_ = InstLumiScaleFactor; }

References theInstLumiScaleFactor_.

◆ serialize()

template<class Archive >
void SiPixelDynamicInefficiency::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 64 of file SiPixelDynamicInefficiency.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 64 of file SiPixelDynamicInefficiency.h.

Member Data Documentation

◆ m_ChipGeomFactors

std::map<unsigned int, double> SiPixelDynamicInefficiency::m_ChipGeomFactors
private

◆ m_ColGeomFactors

std::map<unsigned int, double> SiPixelDynamicInefficiency::m_ColGeomFactors
private

◆ m_PixelGeomFactors

std::map<unsigned int, double> SiPixelDynamicInefficiency::m_PixelGeomFactors
private

◆ m_PUFactors

std::map<unsigned int, std::vector<double> > SiPixelDynamicInefficiency::m_PUFactors
private

Definition at line 60 of file SiPixelDynamicInefficiency.h.

Referenced by getPUFactor(), getPUFactors(), putPUFactor(), and putPUFactors().

◆ theInstLumiScaleFactor_

double SiPixelDynamicInefficiency::theInstLumiScaleFactor_
private

◆ v_DetIdmasks

std::vector<uint32_t> SiPixelDynamicInefficiency::v_DetIdmasks
private
SiPixelDynamicInefficiency::m_ChipGeomFactors
std::map< unsigned int, double > m_ChipGeomFactors
Definition: SiPixelDynamicInefficiency.h:59
SiPixelDynamicInefficiency::m_ColGeomFactors
std::map< unsigned int, double > m_ColGeomFactors
Definition: SiPixelDynamicInefficiency.h:58
mps_fire.i
i
Definition: mps_fire.py:355
SiPixelDynamicInefficiency::m_PUFactors
std::map< unsigned int, std::vector< double > > m_PUFactors
Definition: SiPixelDynamicInefficiency.h:60
SiPixelDynamicInefficiency::m_PixelGeomFactors
std::map< unsigned int, double > m_PixelGeomFactors
Definition: SiPixelDynamicInefficiency.h:57
edm::LogError
Definition: MessageLogger.h:183
SiPixelDynamicInefficiency::v_DetIdmasks
std::vector< uint32_t > v_DetIdmasks
Definition: SiPixelDynamicInefficiency.h:61
SiPixelDynamicInefficiency::theInstLumiScaleFactor_
double theInstLumiScaleFactor_
Definition: SiPixelDynamicInefficiency.h:62
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
relativeConstraints.value
value
Definition: relativeConstraints.py:53
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46