File indexing completed on 2024-04-06 12:32:12
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef MaterialBudgetCategorizer_h
0009 #define MaterialBudgetCategorizer_h 1
0010
0011 #include <string>
0012 #include <map>
0013 #include <vector>
0014
0015 class MaterialBudgetCategorizer {
0016 public:
0017 MaterialBudgetCategorizer(std::string mode);
0018
0019 int volume(std::string s) { return theVolumeMap[s]; }
0020 int material(std::string s) { return theMaterialMap[s]; }
0021
0022 const std::vector<float>& x0fraction(std::string s) { return theX0Map[s]; }
0023 const std::vector<float>& l0fraction(std::string s) { return theL0Map[s]; }
0024
0025
0026 const std::vector<float>& HGCalx0fraction(std::string s) { return theHGCalX0Map[s]; }
0027 const std::vector<float>& HGCall0fraction(std::string s) { return theHGCalL0Map[s]; }
0028
0029 private:
0030 void buildMaps();
0031 void buildCategoryMap(std::string theMaterialFileName, std::map<std::string, std::vector<float> >& theMap);
0032 void buildHGCalCategoryMap(std::string theMaterialFileName, std::map<std::string, std::vector<float> >& theMap);
0033 std::map<std::string, int> theVolumeMap, theMaterialMap;
0034
0035 std::map<std::string, std::vector<float> > theX0Map;
0036 std::map<std::string, std::vector<float> > theL0Map;
0037
0038
0039 std::map<std::string, std::vector<float> > theHGCalX0Map;
0040 std::map<std::string, std::vector<float> > theHGCalL0Map;
0041 };
0042
0043 #endif