diff --git a/FastSimulation/L1CaloTriggerProducer/interface/FastL1Region.h b/FastSimulation/L1CaloTriggerProducer/interface/FastL1Region.h index 95a567acbc246..83751cd4ea17b 100644 --- a/FastSimulation/L1CaloTriggerProducer/interface/FastL1Region.h +++ b/FastSimulation/L1CaloTriggerProducer/interface/FastL1Region.h @@ -196,7 +196,6 @@ class FastL1Region { FastL1BitInfo BitInfo; void SetFGBit(int twrid,bool FGBIT); - void SetHCFGBit(int twrid,bool FGBIT); void SetHOEBit(int twrid,bool FGBIT); private: @@ -205,7 +204,6 @@ class FastL1Region { void SetHOEBit(); void SetQuietBit(); void SetMIPBit(); - void SetHCFGBit(); // Save Tower info // 4x4 matrices (rows,columns): diff --git a/FastSimulation/L1CaloTriggerProducer/src/FastL1Region.cc b/FastSimulation/L1CaloTriggerProducer/src/FastL1Region.cc index 4167144b38b36..44b0df22a3b54 100644 --- a/FastSimulation/L1CaloTriggerProducer/src/FastL1Region.cc +++ b/FastSimulation/L1CaloTriggerProducer/src/FastL1Region.cc @@ -112,7 +112,6 @@ FastL1Region::SetTowerBits() { SetFGBit(); SetHOEBit(); - SetHCFGBit(); } // @@ -134,13 +133,12 @@ FastL1Region::FillEMCrystals(const CaloTowerConstituentsMap* theTowerConstituent //la[1].second = "EcalRecHitsEE"; - double ethres = Config.CrystalEBThreshold; // EB //e.getByLabel(la[0].first,la[0].second,ec); //e.getByLabel(Config.EmInputs.at(0),ec); - ethres = Config.CrystalEBThreshold; + double ethres = Config.CrystalEBThreshold; for(EcalRecHitCollection::const_iterator ecItr = ec0->begin(); ecItr != ec0->end(); ++ecItr) { //CaloRecHit recHit = (CaloRecHit)(*ecItr); @@ -167,7 +165,7 @@ FastL1Region::FillEMCrystals(const CaloTowerConstituentsMap* theTowerConstituent //int hiphi = m_RMap->convertFromECal_to_HCal_iphi(detId.tower_iphi()); //int hiphi = m_RMap->convertFromHCal_to_ECal_iphi(detId.tower_iphi()); int hiphi = detId.tower_iphi(); - if ( !Towers[i].id().iphi()==hiphi || !Towers[i].id().ieta()==hieta ) continue; + if (!(Towers[i].id().iphi() == hiphi) || !(Towers[i].id().ieta() == hieta)) continue; EMCrystalEnergy[i][crIeta + 5*crIphi] = ecItr->energy(); } } @@ -355,26 +353,22 @@ FastL1Region::FillTower_Scaled(const CaloTower& t, int& tid, bool doRCTTrunc,edm double hadScale = 1.0; //double outerScale = 1.0; - if (std::abs(t.eta()>1.3050) && std::abs(t.eta())<3.0) { + if ((std::abs(t.eta()) > 1.3050) && (std::abs(t.eta()) < 3.0)) { hadScale = Config.TowerHEScale; emScale = Config.TowerEEScale; } - if (std::abs(t.eta()<1.3050)) { + if (std::abs(t.eta()) < 1.3050) { hadScale = Config.TowerHBScale; emScale = Config.TowerEBScale; } double emet = emScale * t.emEt(); double hadet = hadScale * t.hadEt(); - double eme = emScale * t.emEnergy(); - double hade = hadScale * t.hadEnergy(); if (doRCTTrunc) { double upperThres = 1024.; emet = RCTEnergyTrunc(emet,Config.TowerEMLSB,upperThres); hadet = RCTEnergyTrunc(hadet,Config.TowerHadLSB,upperThres); - eme = RCTEnergyTrunc(eme,Config.TowerEMLSB,upperThres); - hade = RCTEnergyTrunc(hade,Config.TowerHadLSB,upperThres); } if ( emethadEt>100GeV) hcfgBit = true; ???? - //for (int i=0; i<16; i++) { - //} -} - void FastL1Region::SetMIPBit() { - if (quietBit) - for (int i=0; i<16; i++) { - if (hcfgBit) { - mipBit = true; - return; + if (quietBit) { + for (unsigned int i = 0U; i < 16; i++) { + if (hcfgBit[i]) { + mipBit = true; + return; + } } } } @@ -452,11 +438,7 @@ FastL1Region::SetFGBit(int twrid,bool FGBIT) { fgBit[twrid] = FGBIT; } -void -FastL1Region::SetHCFGBit(int twrid,bool FGBIT) -{ - ; -} + void FastL1Region::SetHOEBit(int twrid,bool FGBIT) {