CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

HcalMaterials Class Reference

#include <HcalMaterials.h>

List of all members.

Public Types

typedef std::vector< ItemContainer
typedef HcalMaterial Item

Public Member Functions

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

Private Attributes

Container mItems

Detailed Description

Definition at line 26 of file HcalMaterials.h.


Member Typedef Documentation

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

Definition at line 35 of file HcalMaterials.h.

Definition at line 34 of file HcalMaterials.h.


Constructor & Destructor Documentation

HcalMaterials::HcalMaterials ( )

Definition at line 5 of file HcalMaterials.cc.

{}
HcalMaterials::~HcalMaterials ( )

Definition at line 7 of file HcalMaterials.cc.

{}

Member Function Documentation

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

Definition at line 9 of file HcalMaterials.cc.

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

                                                      {
  // a real function should be added
  float value = 0.;
  for(unsigned int iItem=0; iItem<mItems.size();iItem++){
    if(fId.rawId()==mItems[iItem].mmId()){
      value = mItems[iItem].getValue(energy);
      continue;
    }
  }
  return value;
}
void HcalMaterials::putValue ( DetId  fId,
std::pair< std::vector< float >, std::vector< float > >  fArray 
)

Definition at line 21 of file HcalMaterials.cc.

References mItems, and DetId::rawId().

                                                                                              {
  Item item (fId.rawId (), fArray);
  mItems.push_back (item);
}

Member Data Documentation

Definition at line 37 of file HcalMaterials.h.

Referenced by getValue(), and putValue().