CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/Calibration/Tools/interface/EcalRingCalibrationTools.h

Go to the documentation of this file.
00001 #ifndef EcalRingCalibrationTools_h
00002 #define EcalRingCalibrationTools_h
00003 
00004 /****************************************
00005  *
00006  *   25/09/2007 P. Meridiani (CERN)
00007  *   Description:
00008  *   Tools to ease the hanling of indices  
00009  *   for ECAL ring intercalibration
00010  *
00011  ***************************************/
00012 
00013 #include <vector>
00014 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00015 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00016 
00017 class DetId;
00018 class CaloGeometry;
00019 
00020 class EcalRingCalibrationTools 
00021 {
00022  public:
00023   EcalRingCalibrationTools() {};
00024   ~EcalRingCalibrationTools() {};
00025   
00027   static short getRingIndex(DetId aDetId); 
00028 
00029   static short getModuleIndex(DetId aDetId); 
00030   
00032   static std::vector<DetId> getDetIdsInRing(short aRingIndex);
00033   static std::vector<DetId> getDetIdsInModule(short int);  
00034   static std::vector<DetId> getDetIdsInECAL();  
00035 
00036   static const short N_RING_TOTAL = 248;
00037   static const short N_RING_BARREL = 170 ;
00038   static const short N_RING_ENDCAP = 78;
00039 
00040   static const short N_MODULES_BARREL = 144;
00041 
00042   static void setCaloGeometry(const CaloGeometry* geometry) { caloGeometry_ = geometry; };
00043 
00044  private:
00045 
00046   static void initializeFromGeometry(); //needed only for the endcap
00047   
00048   static bool isInitializedFromGeometry_;
00049   static short endcapRingIndex_[EEDetId::IX_MAX][EEDetId::IY_MAX]; //array needed only for the endcaps 
00050   static const CaloGeometry* caloGeometry_;
00051 
00052 };
00053 #endif