CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalMaterials.cc
Go to the documentation of this file.
1 #include <iostream>
2 
4 
6 
8 
9 float HcalMaterials::getValue (DetId fId, float energy) {
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 }
20 
21 void HcalMaterials::putValue (DetId fId, const std::pair< std::vector <float>,std::vector <float> >& fArray) {
22  Item item (fId.rawId (), fArray);
23  mItems.push_back (item);
24 }
25 
26 
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
float getValue(DetId fId, float energy)
Definition: HcalMaterials.cc:9
Container mItems
Definition: HcalMaterials.h:37
Definition: DetId.h:18
void putValue(DetId fId, const std::pair< std::vector< float >, std::vector< float > > &fArray)