Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-21 04:25:51

0001 #include "HcalMaterials.h"
0002 
0003 #include <iostream>
0004 
0005 HcalMaterials::HcalMaterials() {}
0006 
0007 HcalMaterials::~HcalMaterials() {}
0008 
0009 float HcalMaterials::getValue(DetId fId, float energy) {
0010   // a real function should be added
0011   float value = 0.;
0012   for (unsigned int iItem = 0; iItem < mItems.size(); iItem++) {
0013     if (fId.rawId() == mItems[iItem].mmId()) {
0014       value = mItems[iItem].getValue(energy);
0015       continue;
0016     }
0017   }
0018   return value;
0019 }
0020 
0021 void HcalMaterials::putValue(DetId fId, const std::pair<std::vector<float>, std::vector<float> >& fArray) {
0022   Item item(fId.rawId(), fArray);
0023   mItems.push_back(item);
0024 }