CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Attributes | Private Member Functions | Friends
HcalSiPMCharacteristics Class Reference

#include <HcalSiPMCharacteristics.h>

Classes

class  PrecisionItem
 

Public Member Functions

const PrecisionItemfindByType (int type) const
 
int getAuxi1 (int type) const
 get auxiliary words More...
 
float getAuxi2 (int type) const
 
float getCrossTalk (int type) const
 get cross talk More...
 
std::vector< float > getNonLinearities (int type) const
 get nonlinearity constants More...
 
int getPixels (int type) const
 get # of pixels More...
 
int getType (unsigned int k) const
 
unsigned int getTypes () const
 get # of types More...
 
 HcalSiPMCharacteristics ()
 
 HcalSiPMCharacteristics (const HcalSiPMCharacteristics &src)
 
 HcalSiPMCharacteristics (const HcalSiPMCharacteristicsAddons::Helper &helper)
 
 HcalSiPMCharacteristics (HcalSiPMCharacteristics &&other)
 
void initialize ()
 
HcalSiPMCharacteristicsoperator= (const HcalSiPMCharacteristics &rhs)
 
void sortByType ()
 
void swap (HcalSiPMCharacteristics &other)
 
 ~HcalSiPMCharacteristics ()
 

Protected Attributes

std::vector< PrecisionItemmPItems
 
std::vector< const PrecisionItem * > mPItemsByType
 

Private Member Functions

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

Friends

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

Detailed Description

Definition at line 18 of file HcalSiPMCharacteristics.h.

Constructor & Destructor Documentation

◆ HcalSiPMCharacteristics() [1/4]

HcalSiPMCharacteristics::HcalSiPMCharacteristics ( )
inline

Definition at line 49 of file HcalSiPMCharacteristics.h.

49 {}

◆ HcalSiPMCharacteristics() [2/4]

HcalSiPMCharacteristics::HcalSiPMCharacteristics ( const HcalSiPMCharacteristicsAddons::Helper helper)

Definition at line 9 of file HcalSiPMCharacteristics.cc.

10  : mPItems(helper.mPItems.begin(), helper.mPItems.end()) {
11  initialize();
12 }

References initialize().

◆ ~HcalSiPMCharacteristics()

HcalSiPMCharacteristics::~HcalSiPMCharacteristics ( )

Definition at line 14 of file HcalSiPMCharacteristics.cc.

14 {}

◆ HcalSiPMCharacteristics() [3/4]

HcalSiPMCharacteristics::HcalSiPMCharacteristics ( const HcalSiPMCharacteristics src)

Definition at line 17 of file HcalSiPMCharacteristics.cc.

18  : mPItems(src.mPItems), mPItemsByType(src.mPItemsByType) {}

◆ HcalSiPMCharacteristics() [4/4]

HcalSiPMCharacteristics::HcalSiPMCharacteristics ( HcalSiPMCharacteristics &&  other)

Definition at line 34 of file HcalSiPMCharacteristics.cc.

35  other.swap(*this);
36 }

References trackingPlots::other.

Member Function Documentation

◆ findByType()

const HcalSiPMCharacteristics::PrecisionItem * HcalSiPMCharacteristics::findByType ( int  type) const

Definition at line 38 of file HcalSiPMCharacteristics.cc.

38  {
39  const HcalSiPMCharacteristics::PrecisionItem* retItem = nullptr;
40 
41  for (unsigned int i = 0; i < getTypes(); i++) {
42  auto iter = &mPItems.at(i);
43  if (type == iter->type_)
44  retItem = iter;
45  }
46  return retItem;
47 
48  //NOT WORKING:
49  //PrecisionItem target(type, 0, 0, 0, 0, 0, 0, 0);
50  //return HcalObjectAddons::findByT<PrecisionItem,HcalSiPMCharacteristicsAddons::LessByType>(&target,mPItemsByType);
51 }

References getTypes(), mps_fire::i, and mPItems.

◆ getAuxi1()

int HcalSiPMCharacteristics::getAuxi1 ( int  type) const

get auxiliary words

Definition at line 93 of file HcalSiPMCharacteristics.cc.

93  {
95  return (item ? item->auxi1_ : 0);
96 }

References B2GTnPMonitor_cfi::item.

◆ getAuxi2()

float HcalSiPMCharacteristics::getAuxi2 ( int  type) const

Definition at line 98 of file HcalSiPMCharacteristics.cc.

98  {
100  return (item ? item->auxi2_ : 0);
101 }

References B2GTnPMonitor_cfi::item.

◆ getCrossTalk()

float HcalSiPMCharacteristics::getCrossTalk ( int  type) const

get cross talk

Definition at line 88 of file HcalSiPMCharacteristics.cc.

88  {
89  const PrecisionItem* item = findByType(type);
90  return (item ? item->crossTalk_ : 0);
91 }

References B2GTnPMonitor_cfi::item.

Referenced by HcalSimParameters::sipmCrossTalk().

◆ getNonLinearities()

std::vector< float > HcalSiPMCharacteristics::getNonLinearities ( int  type) const

get nonlinearity constants

Definition at line 77 of file HcalSiPMCharacteristics.cc.

77  {
79  std::vector<float> pars;
80  if (item) {
81  pars.push_back(item->parLin1_);
82  pars.push_back(item->parLin2_);
83  pars.push_back(item->parLin3_);
84  }
85  return pars;
86 }

References B2GTnPMonitor_cfi::item.

Referenced by HcalSimParameters::sipmNonlinearity().

◆ getPixels()

int HcalSiPMCharacteristics::getPixels ( int  type) const

get # of pixels

Definition at line 72 of file HcalSiPMCharacteristics.cc.

72  {
74  return (item ? item->pixels_ : 0);
75 }

References B2GTnPMonitor_cfi::item.

Referenced by HcalSimParameters::pixels().

◆ getType()

int HcalSiPMCharacteristics::getType ( unsigned int  k) const
inline

Definition at line 66 of file HcalSiPMCharacteristics.h.

66 { return mPItems[k].type_; }

References dqmdumpme::k, and mPItems.

◆ getTypes()

unsigned int HcalSiPMCharacteristics::getTypes ( ) const
inline

get # of types

Definition at line 65 of file HcalSiPMCharacteristics.h.

65 { return mPItems.size(); }

References mPItems.

Referenced by findByType().

◆ initialize()

void HcalSiPMCharacteristics::initialize ( )

Definition at line 107 of file HcalSiPMCharacteristics.cc.

References sortByType().

Referenced by HcalSiPMCharacteristics().

◆ operator=()

HcalSiPMCharacteristics & HcalSiPMCharacteristics::operator= ( const HcalSiPMCharacteristics rhs)

Definition at line 21 of file HcalSiPMCharacteristics.cc.

21  {
23  temp.swap(*this);
24  return *this;
25 }

References groupFilesInBlocks::temp.

◆ serialize()

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

◆ sortByType()

void HcalSiPMCharacteristics::sortByType ( )

Definition at line 103 of file HcalSiPMCharacteristics.cc.

103  {
104  HcalObjectAddons::sortByT<PrecisionItem, HcalSiPMCharacteristicsAddons::LessByType>(mPItems, mPItemsByType);
105 }

Referenced by initialize().

◆ swap()

void HcalSiPMCharacteristics::swap ( HcalSiPMCharacteristics other)

Definition at line 28 of file HcalSiPMCharacteristics.cc.

28  {
29  std::swap(mPItems, other.mPItems);
30  std::swap(mPItemsByType, other.mPItemsByType);
31 }

References mPItems, mPItemsByType, trackingPlots::other, and std::swap().

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 87 of file HcalSiPMCharacteristics.h.

◆ cond::serialization::access

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

Definition at line 87 of file HcalSiPMCharacteristics.h.

Member Data Documentation

◆ mPItems

std::vector<PrecisionItem> HcalSiPMCharacteristics::mPItems
protected

Definition at line 84 of file HcalSiPMCharacteristics.h.

Referenced by findByType(), getType(), getTypes(), and swap().

◆ mPItemsByType

std::vector<const PrecisionItem*> HcalSiPMCharacteristics::mPItemsByType
protected

Definition at line 85 of file HcalSiPMCharacteristics.h.

Referenced by swap().

HcalSiPMCharacteristics::mPItems
std::vector< PrecisionItem > mPItems
Definition: HcalSiPMCharacteristics.h:84
HcalSiPMCharacteristics::sortByType
void sortByType()
Definition: HcalSiPMCharacteristics.cc:103
mps_fire.i
i
Definition: mps_fire.py:428
HcalSiPMCharacteristics::PrecisionItem
Definition: HcalSiPMCharacteristics.h:20
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
HcalSiPMCharacteristics::initialize
void initialize()
Definition: HcalSiPMCharacteristics.cc:107
HcalSiPMCharacteristics::HcalSiPMCharacteristics
HcalSiPMCharacteristics()
Definition: HcalSiPMCharacteristics.h:49
HcalSiPMCharacteristics::findByType
const PrecisionItem * findByType(int type) const
Definition: HcalSiPMCharacteristics.cc:38
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
trackingPlots.other
other
Definition: trackingPlots.py:1460
dqmdumpme.k
k
Definition: dqmdumpme.py:60
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
helper
Definition: helper.py:1
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
HcalSiPMCharacteristics::mPItemsByType
std::vector< const PrecisionItem * > mPItemsByType
Definition: HcalSiPMCharacteristics.h:85
HcalSiPMCharacteristics::getTypes
unsigned int getTypes() const
get # of types
Definition: HcalSiPMCharacteristics.h:65
HcalSiPMCharacteristics
Definition: HcalSiPMCharacteristics.h:18