CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HcalMaterials Class Reference

#include <HcalMaterials.h>

Public Types

typedef std::vector< ItemContainer
 
typedef HcalMaterial Item
 

Public Member Functions

float getValue (DetId fId, float energy)
 
 HcalMaterials ()
 
void putValue (DetId fId, const std::pair< std::vector< float >, std::vector< float > > &fArray)
 
 ~HcalMaterials ()
 

Private Attributes

Container mItems
 

Detailed Description

Definition at line 28 of file HcalMaterials.h.

Member Typedef Documentation

◆ Container

typedef std::vector<Item> HcalMaterials::Container

Definition at line 37 of file HcalMaterials.h.

◆ Item

Definition at line 36 of file HcalMaterials.h.

Constructor & Destructor Documentation

◆ HcalMaterials()

HcalMaterials::HcalMaterials ( )

Definition at line 5 of file HcalMaterials.cc.

5 {}

◆ ~HcalMaterials()

HcalMaterials::~HcalMaterials ( )

Definition at line 7 of file HcalMaterials.cc.

7 {}

Member Function Documentation

◆ getValue()

float HcalMaterials::getValue ( DetId  fId,
float  energy 
)

Definition at line 9 of file HcalMaterials.cc.

9  {
10  // a real function should be added
11  float value = 0.;
12  for (unsigned int iItem = 0; iItem < mItems.size(); iItem++) {
13  if (fId.rawId() == mItems[iItem].mmId()) {
14  value = mItems[iItem].getValue(energy);
15  continue;
16  }
17  }
18  return value;
19 }

References HCALHighEnergyHPDFilter_cfi::energy, mItems, DetId::rawId(), and relativeConstraints::value.

◆ putValue()

void HcalMaterials::putValue ( DetId  fId,
const std::pair< std::vector< float >, std::vector< float > > &  fArray 
)

Definition at line 21 of file HcalMaterials.cc.

21  {
22  Item item(fId.rawId(), fArray);
23  mItems.push_back(item);
24 }

References B2GTnPMonitor_cfi::item, mItems, and DetId::rawId().

Member Data Documentation

◆ mItems

Container HcalMaterials::mItems
private

Definition at line 40 of file HcalMaterials.h.

Referenced by getValue(), and putValue().

HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
value
Definition: value.py:1
HcalMaterials::mItems
Container mItems
Definition: HcalMaterials.h:40
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
HcalMaterials::Item
HcalMaterial Item
Definition: HcalMaterials.h:36
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
relativeConstraints.value
value
Definition: relativeConstraints.py:53