Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:12

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // File : MaterialBudgetCategorizer.h
0003 // Author: T.Boccali  11.12.01
0004 // Description:
0005 // Modifications:
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   // rr
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   // rr
0025   //HGCal
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   // rr
0035   std::map<std::string, std::vector<float> > theX0Map;
0036   std::map<std::string, std::vector<float> > theL0Map;
0037   // rr
0038   //HGCal
0039   std::map<std::string, std::vector<float> > theHGCalX0Map;
0040   std::map<std::string, std::vector<float> > theHGCalL0Map;
0041 };
0042 
0043 #endif