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 HcalSiPMCharacteristicsAddons::Helper &helper)
 
 HcalSiPMCharacteristics (const HcalSiPMCharacteristics &src)
 
 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.

References initialize().

10  : mPItems(helper.mPItems.begin(), helper.mPItems.end()) {
11  initialize();
12 }
Definition: helper.py:1
std::vector< PrecisionItem > mPItems

◆ ~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) {}
std::vector< const PrecisionItem * > mPItemsByType
std::vector< PrecisionItem > mPItems

◆ HcalSiPMCharacteristics() [4/4]

HcalSiPMCharacteristics::HcalSiPMCharacteristics ( HcalSiPMCharacteristics &&  other)

Definition at line 34 of file HcalSiPMCharacteristics.cc.

References trackingPlots::other.

Member Function Documentation

◆ findByType()

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

Definition at line 38 of file HcalSiPMCharacteristics.cc.

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

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 }
unsigned int getTypes() const
get # of types
std::vector< PrecisionItem > mPItems

◆ getAuxi1()

int HcalSiPMCharacteristics::getAuxi1 ( int  type) const

get auxiliary words

Definition at line 94 of file HcalSiPMCharacteristics.cc.

References B2GTnPMonitor_cfi::item.

◆ getAuxi2()

float HcalSiPMCharacteristics::getAuxi2 ( int  type) const

◆ getCrossTalk()

float HcalSiPMCharacteristics::getCrossTalk ( int  type) const

get cross talk

Definition at line 89 of file HcalSiPMCharacteristics.cc.

References B2GTnPMonitor_cfi::item.

Referenced by HcalSimParameters::sipmCrossTalk().

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

◆ getNonLinearities()

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

get nonlinearity constants

Definition at line 77 of file HcalSiPMCharacteristics.cc.

References B2GTnPMonitor_cfi::item.

Referenced by HcalSimParameters::sipmNonlinearity().

77  {
79  std::vector<float> pars;
80  pars.reserve(3);
81  if (item) {
82  pars.push_back(item->parLin1_);
83  pars.push_back(item->parLin2_);
84  pars.push_back(item->parLin3_);
85  }
86  return pars;
87 }
const PrecisionItem * findByType(int type) const

◆ getPixels()

int HcalSiPMCharacteristics::getPixels ( int  type) const

get # of pixels

Definition at line 72 of file HcalSiPMCharacteristics.cc.

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.

References dqmdumpme::k, and mPItems.

66 { return mPItems[k].type_; }
std::vector< PrecisionItem > mPItems

◆ getTypes()

unsigned int HcalSiPMCharacteristics::getTypes ( ) const
inline

get # of types

Definition at line 65 of file HcalSiPMCharacteristics.h.

References mPItems.

Referenced by findByType().

65 { return mPItems.size(); }
std::vector< PrecisionItem > mPItems

◆ initialize()

void HcalSiPMCharacteristics::initialize ( )

◆ operator=()

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

Definition at line 21 of file HcalSiPMCharacteristics.cc.

References groupFilesInBlocks::temp.

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

◆ serialize()

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

◆ sortByType()

void HcalSiPMCharacteristics::sortByType ( )

Definition at line 104 of file HcalSiPMCharacteristics.cc.

Referenced by initialize().

104  {
105  HcalObjectAddons::sortByT<PrecisionItem, HcalSiPMCharacteristicsAddons::LessByType>(mPItems, mPItemsByType);
106 }
std::vector< const PrecisionItem * > mPItemsByType
std::vector< PrecisionItem > mPItems

◆ swap()

void HcalSiPMCharacteristics::swap ( HcalSiPMCharacteristics other)

Definition at line 28 of file HcalSiPMCharacteristics.cc.

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

28  {
29  std::swap(mPItems, other.mPItems);
30  std::swap(mPItemsByType, other.mPItemsByType);
31 }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< const PrecisionItem * > mPItemsByType
std::vector< PrecisionItem > mPItems

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().