00001 #ifndef Validation_EventGenerator_CaloCellManager 00002 #define Validation_EventGenerator_CaloCellManager 00003 00004 /* class CaloCellManager 00005 * 00006 * Simple eta-phi cell structure manager, mimic calorimetric tower structure 00007 * 00008 * $Date: 2010/05/25 09:45:03 $ 00009 * $Revision: 1.1 $ 00010 * 00011 */ 00012 00013 #include "Validation/EventGenerator/interface/CaloCellId.h" 00014 00015 #include <vector> 00016 00017 class CaloCellManager{ 00018 00019 public: 00020 00021 typedef std::vector<CaloCellId*> CaloCellCollection; 00022 00023 CaloCellManager(unsigned int theVerbosity); 00024 virtual ~CaloCellManager(); 00025 00026 unsigned int getCellIndexFromAngle(double eta, double phi); 00027 CaloCellId* getCellFromIndex(unsigned int id); 00028 std::vector<double> getEtaRanges(); 00029 00030 // approximated CMS eta-phi calorimetri tower grid 00031 00032 static const unsigned int nBarrelEta = 16; 00033 static const unsigned int nEndcapEta = 12; 00034 static const unsigned int nForwardEta = 12; 00035 00036 static const unsigned int nBarrelPhi = 72; 00037 static const unsigned int nEndcapPhi = 36; 00038 static const unsigned int nForwardPhi = 36; 00039 00040 static const unsigned int nBarrelCell = 2*nBarrelEta*nBarrelPhi; 00041 static const unsigned int nEndcapCell = 2*nEndcapEta*nEndcapPhi; 00042 static const unsigned int nForwardCell = 2*nForwardEta*nForwardPhi; 00043 00044 static const unsigned int nCaloCell = nBarrelCell+nEndcapCell+nForwardCell; 00045 00046 private: 00047 00048 void init(); 00049 void builder(); 00050 00051 unsigned int verbosity; 00052 00053 std::vector<double> etaLim; 00054 std::vector<double> phiLimBar; 00055 std::vector<double> phiLimEnd; 00056 std::vector<double> phiLimFor; 00057 00058 CaloCellCollection theCellCollection; 00059 00060 }; 00061 00062 #endif