125 std::vector<HBHEHitMap> rbxs;
126 std::vector<HBHEHitMap> hpds;
127 std::vector<HBHEHitMap> dihits;
128 std::vector<HBHEHitMap> monohits;
134 if (
debug_ && (!rbxs.empty() || !hpds.empty() || !dihits.empty() || !monohits.empty())) {
135 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"RBXs:" << std::endl;
137 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nHPDs:" << std::endl;
139 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nDiHits:" << std::endl;
141 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nMonoHits:" << std::endl;
148 std::set<const HBHERecHit*> noisehits;
149 for (
int i = 0; i < static_cast<int>(rbxs.size());
i++) {
150 int nhits = rbxs[
i].nHits();
151 double ene = rbxs[
i].hitEnergy();
152 double trkfide = rbxs[
i].hitEnergyTrackFiducial();
153 double isolhcale = rbxs[
i].hcalEnergySameTowers() + rbxs[
i].hcalEnergyNeighborTowers();
154 double isolecale = rbxs[
i].ecalEnergySameTowers();
155 double isoltrke = rbxs[
i].trackEnergySameTowers() + rbxs[
i].trackEnergyNeighborTowers();
158 bool isLooseIso =
false;
159 bool isTightIso =
false;
168 if (ene <= RBXEneThreshold_ && ene > 0) {
180 noisehits.insert(it->first);
185 for (
int i = 0; i < static_cast<int>(hpds.size());
i++) {
186 int nhits = hpds[
i].nHits();
187 double ene = hpds[
i].hitEnergy();
188 double trkfide = hpds[
i].hitEnergyTrackFiducial();
189 double isolhcale = hpds[
i].hcalEnergySameTowers() + hpds[
i].hcalEnergyNeighborTowers();
190 double isolecale = hpds[
i].ecalEnergySameTowers();
191 double isoltrke = hpds[
i].trackEnergySameTowers() + hpds[
i].trackEnergyNeighborTowers();
201 noisehits.insert(it->first);
206 for (
int i = 0; i < static_cast<int>(dihits.size());
i++) {
207 double ene = dihits[
i].hitEnergy();
208 double trkfide = dihits[
i].hitEnergyTrackFiducial();
209 double isolhcale = dihits[
i].hcalEnergySameTowers() + dihits[
i].hcalEnergyNeighborTowers();
210 double isolecale = dihits[
i].ecalEnergySameTowers();
211 double isoltrke = dihits[
i].trackEnergySameTowers() + dihits[
i].trackEnergyNeighborTowers();
213 isoltrke / ene < LooseTrackIsol_ && trkfide > 0.99 * ene && trkfide >
LooseDiHitEne_) ||
217 noisehits.insert(it->first);
222 for (
int i = 0; i < static_cast<int>(monohits.size());
i++) {
223 double ene = monohits[
i].hitEnergy();
224 double trkfide = monohits[
i].hitEnergyTrackFiducial();
225 double isolhcale = monohits[
i].hcalEnergySameTowers() + monohits[
i].hcalEnergyNeighborTowers();
226 double isolecale = monohits[
i].ecalEnergySameTowers();
227 double isoltrke = monohits[
i].trackEnergySameTowers() + monohits[
i].trackEnergyNeighborTowers();
229 isoltrke / ene < LooseTrackIsol_ && trkfide > 0.99 * ene && trkfide >
LooseMonoHitEne_) ||
233 noisehits.insert(it->first);
239 auto pOut = std::make_unique<HBHERecHitCollection>();
244 if (noisehits.end() != noisehits.find(
hit)) {
247 pOut->push_back(newhit);
std::map< const HBHERecHit *, const PhysicsTower * >::const_iterator hitmap_const_iterator
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > ecalChStatusToken_
void setHcalChannelQuality(const HcalChannelQuality *q)
edm::ESGetToken< CaloTowerConstituentsMap, CaloGeometryRecord > ctcmToken_
void DumpHBHEHitMap(std::vector< HBHEHitMap > &i) const
std::vector< T >::const_iterator const_iterator
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > ecalSevToken_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > hcalSevToken_
edm::ESGetToken< HcalFrontEndMap, HcalFrontEndMapRcd > hfemapToken_
void setHcalSeverityLevelComputer(const HcalSeverityLevelComputer *q)
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChStatusToken_
edm::EDGetTokenT< std::vector< reco::TrackExtrapolation > > tok_trackExt_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoToken_
bool getData(T &iHolder) const
const_iterator begin() const
const_iterator end() const
void setEcalSeverityLevelAlgo(const EcalSeverityLevelAlgo *q)
void setEcalChannelStatus(const EcalChannelStatus *q)
Log< level::Info, false > LogInfo
void setEERecHitCollection(const EcalRecHitCollection *q)
ObjectValidator objvalidator_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
const HcalFrontEndMap * hfemap
void setEBRecHitCollection(const EcalRecHitCollection *q)