diff --git a/[refs] b/[refs] index c39243b3bb61e..728c288d878b5 100644 --- a/[refs] +++ b/[refs] @@ -4,4 +4,4 @@ refs/heads/CMSSW_4_1_X: a4334f9063dcad3cb0c038ac911fd8357c3bbaaa refs/heads/with_VBF_Hbb_fragment: 5b1f2347e6db46cfd6288879a97056d280cf27c5 refs/heads/withOnlineToOfflineProducer: c0b9423e0d6c6d5315f93d1ee32e9bf68078d9c0 refs/heads/withNewDZ: a67661d3e05d8a51194ddc51d1ff68044af2314a -refs/heads/usePFclusteringInRegionsForMuonsBackUp: 1cd3e8e09ab14dfafcc77e4f40c7007028a4b154 +refs/heads/usePFclusteringInRegionsForMuonsBackUp: 252c4507d30da9c838013ec506616cf2103c9d63 diff --git a/branches/usePFclusteringInRegionsForMuonsBackUp/L1Trigger/L1TCalorimeter/plugins/PhysicalEtAdder.cc b/branches/usePFclusteringInRegionsForMuonsBackUp/L1Trigger/L1TCalorimeter/plugins/PhysicalEtAdder.cc index cdeaec890df09..1808210e0d535 100644 --- a/branches/usePFclusteringInRegionsForMuonsBackUp/L1Trigger/L1TCalorimeter/plugins/PhysicalEtAdder.cc +++ b/branches/usePFclusteringInRegionsForMuonsBackUp/L1Trigger/L1TCalorimeter/plugins/PhysicalEtAdder.cc @@ -1,4 +1,5 @@ #include "L1Trigger/L1TCalorimeter/plugins/PhysicalEtAdder.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "CondFormats/L1TObjects/interface/L1CaloEtScale.h" #include "CondFormats/DataRecord/interface/L1JetEtScaleRcd.h" @@ -18,6 +19,8 @@ #include "FWCore/Framework/interface/ESHandle.h" #include +#include + double getPhysicalEta(int etaIndex, bool forward = false); double getPhysicalPhi(int phiIndex); @@ -66,11 +69,7 @@ l1t::PhysicalEtAdder::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) edm::ESHandle< L1CaloEtScale > jetScale ; iSetup.get< L1JetEtScaleRcd >().get( jetScale ) ; - edm::ESHandle< L1CaloEtScale > hwForJetScale ; - iSetup.get< L1JetEtScaleRcd >().get( hwForJetScale ) ; - edm::ESHandle< L1CaloEtScale > htMissScale ; - std::vector< bool > htMissMatched ; iSetup.get< L1HtMissScaleRcd >().get( htMissScale ) ; int firstBX = old_egammas->getFirstBX(); @@ -244,11 +243,21 @@ int getRegionEta(int gtEta, bool forward) int centralGtEta[] = {11, 12, 13, 14, 15, 16, 17, -100, 10, 9, 8, 7, 6, 5, 4}; int forwardGtEta[] = {18, 19, 20, 21, -100, -100, -100, -100, 3, 2, 1, 0}; + //printf("%i, %i\n",gtEta,forward); + + int regionEta; + if(!forward) { - return centralGtEta[gtEta]; + regionEta = centralGtEta[gtEta]; } else - return forwardGtEta[gtEta]; + regionEta = forwardGtEta[gtEta]; + + if(regionEta == -100) + edm::LogError("EtaIndexError") + << "Bad eta index passed to PhysicalEtAdder::getRegionEta, " << gtEta << std::endl; + + return regionEta; } // adapted these from the UCT2015 codebase.