Go to the documentation of this file.00001 #ifndef _CALO_MISCALIB_MAP_HCAL
00002 #define _CALO_MISCALIB_MAP_HCAL
00003 #include "CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMap.h"
00004 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00005 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00006 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00007 #include "FWCore/Framework/interface/EDProducer.h"
00008 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00009 #include "Geometry/CaloTopology/interface/HcalTopology.h"
00010
00011 #include <iostream>
00012 #include <iomanip>
00013 #include <map>
00014 #include <vector>
00015
00016 class CaloMiscalibMapHcal: public CaloMiscalibMap {
00017 public:
00018 CaloMiscalibMapHcal(){
00019 }
00020
00021 void prefillMap(const HcalTopology & topology){
00022
00023 for (int det = 1; det < 5; det++) {
00024 for (int eta = -63; eta < 64; eta++) {
00025 for (int phi = 0; phi < 128; phi++) {
00026 for (int depth = 1; depth < 5; depth++) {
00027
00028 try {
00029 HcalDetId hcaldetid ((HcalSubdetector) det, eta, phi, depth);
00030 if (topology.valid(hcaldetid))
00031
00032 {
00033 mapHcal_[hcaldetid.rawId()]=1.0;
00034
00035 }
00036
00037 }
00038 catch (...) {
00039 }
00040 }
00041 }
00042 }
00043 }
00044 }
00045
00046
00047 virtual void addCell(const DetId &cell, float scaling_factor)
00048 {
00049
00050 mapHcal_[cell.rawId()]=scaling_factor;
00051 }
00052
00053 void print()
00054 {
00055
00056 std::map<uint32_t,float>::const_iterator it;
00057
00058
00059
00060 for(it=mapHcal_.begin();it!=mapHcal_.end();it++){
00061 }
00062
00063 }
00064
00065 const std::map<uint32_t, float> & get(){
00066 return mapHcal_;
00067 }
00068
00069 private:
00070
00071 std::map<uint32_t, float> mapHcal_;
00072
00073
00074 };
00075
00076 #endif