26 LooseHcalIsol_(iConfig.getParameter<double>(
"LooseHcalIsol")),
27 LooseEcalIsol_(iConfig.getParameter<double>(
"LooseEcalIsol")),
28 LooseTrackIsol_(iConfig.getParameter<double>(
"LooseTrackIsol")),
29 TightHcalIsol_(iConfig.getParameter<double>(
"TightHcalIsol")),
30 TightEcalIsol_(iConfig.getParameter<double>(
"TightEcalIsol")),
31 TightTrackIsol_(iConfig.getParameter<double>(
"TightTrackIsol")),
33 LooseRBXEne1_(iConfig.getParameter<double>(
"LooseRBXEne1")),
34 LooseRBXEne2_(iConfig.getParameter<double>(
"LooseRBXEne2")),
35 LooseRBXHits1_(iConfig.getParameter<int>(
"LooseRBXHits1")),
36 LooseRBXHits2_(iConfig.getParameter<int>(
"LooseRBXHits2")),
37 TightRBXEne1_(iConfig.getParameter<double>(
"TightRBXEne1")),
38 TightRBXEne2_(iConfig.getParameter<double>(
"TightRBXEne2")),
39 TightRBXHits1_(iConfig.getParameter<int>(
"TightRBXHits1")),
40 TightRBXHits2_(iConfig.getParameter<int>(
"TightRBXHits2")),
42 LooseHPDEne1_(iConfig.getParameter<double>(
"LooseHPDEne1")),
43 LooseHPDEne2_(iConfig.getParameter<double>(
"LooseHPDEne2")),
44 LooseHPDHits1_(iConfig.getParameter<int>(
"LooseHPDHits1")),
45 LooseHPDHits2_(iConfig.getParameter<int>(
"LooseHPDHits2")),
46 TightHPDEne1_(iConfig.getParameter<double>(
"TightHPDEne1")),
47 TightHPDEne2_(iConfig.getParameter<double>(
"TightHPDEne2")),
48 TightHPDHits1_(iConfig.getParameter<int>(
"TightHPDHits1")),
49 TightHPDHits2_(iConfig.getParameter<int>(
"TightHPDHits2")),
51 LooseDiHitEne_(iConfig.getParameter<double>(
"LooseDiHitEne")),
52 TightDiHitEne_(iConfig.getParameter<double>(
"TightDiHitEne")),
53 LooseMonoHitEne_(iConfig.getParameter<double>(
"LooseMonoHitEne")),
54 TightMonoHitEne_(iConfig.getParameter<double>(
"TightMonoHitEne")),
56 debug_(iConfig.getUntrackedParameter<bool>(
"debug",
true)),
57 objvalidator_(iConfig)
65 produces<HBHERecHitCollection>();
127 std::vector<HBHEHitMap> rbxs;
128 std::vector<HBHEHitMap> hpds;
129 std::vector<HBHEHitMap> dihits;
130 std::vector<HBHEHitMap> monohits;
136 if(
debug_ && (rbxs.size()>0 || hpds.size()>0 || dihits.size()>0 || monohits.size()>0)) {
137 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"RBXs:" << std::endl;
139 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nHPDs:" << std::endl;
141 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nDiHits:" << std::endl;
143 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nMonoHits:" << std::endl;
150 std::set<const HBHERecHit*> noisehits;
151 for(
int i=0; i<static_cast<int>(rbxs.size());
i++) {
152 int nhits=rbxs[
i].nHits();
153 double ene=rbxs[
i].hitEnergy();
154 double trkfide=rbxs[
i].hitEnergyTrackFiducial();
155 double isolhcale=rbxs[
i].hcalEnergySameTowers()+rbxs[
i].hcalEnergyNeighborTowers();
156 double isolecale=rbxs[
i].ecalEnergySameTowers();
157 double isoltrke=rbxs[
i].trackEnergySameTowers()+rbxs[
i].trackEnergyNeighborTowers();
161 noisehits.insert(it->first);
166 for(
int i=0; i<static_cast<int>(hpds.size());
i++) {
167 int nhits=hpds[
i].nHits();
168 double ene=hpds[
i].hitEnergy();
169 double trkfide=hpds[
i].hitEnergyTrackFiducial();
170 double isolhcale=hpds[
i].hcalEnergySameTowers()+hpds[
i].hcalEnergyNeighborTowers();
171 double isolecale=hpds[
i].ecalEnergySameTowers();
172 double isoltrke=hpds[
i].trackEnergySameTowers()+hpds[
i].trackEnergyNeighborTowers();
176 noisehits.insert(it->first);
181 for(
int i=0; i<static_cast<int>(dihits.size());
i++) {
182 double ene=dihits[
i].hitEnergy();
183 double trkfide=dihits[
i].hitEnergyTrackFiducial();
184 double isolhcale=dihits[
i].hcalEnergySameTowers()+dihits[
i].hcalEnergyNeighborTowers();
185 double isolecale=dihits[
i].ecalEnergySameTowers();
186 double isoltrke=dihits[
i].trackEnergySameTowers()+dihits[
i].trackEnergyNeighborTowers();
190 noisehits.insert(it->first);
195 for(
int i=0; i<static_cast<int>(monohits.size());
i++) {
196 double ene=monohits[
i].hitEnergy();
197 double trkfide=monohits[
i].hitEnergyTrackFiducial();
198 double isolhcale=monohits[
i].hcalEnergySameTowers()+monohits[
i].hcalEnergyNeighborTowers();
199 double isolecale=monohits[
i].ecalEnergySameTowers();
200 double isoltrke=monohits[
i].trackEnergySameTowers()+monohits[
i].trackEnergyNeighborTowers();
204 noisehits.insert(it->first);
215 if(noisehits.end()!=noisehits.find(hit)) {
218 pOut->push_back(newhit);
229 for(std::vector<HBHEHitMap>::const_iterator it=i.begin(); it!=i.end(); ++it) {
230 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"hit energy=" << it->hitEnergy()
231 <<
"; # hits=" << it->nHits()
232 <<
"; hcal energy same=" << it->hcalEnergySameTowers()
233 <<
"; ecal energy same=" << it->ecalEnergySameTowers()
234 <<
"; track energy same=" << it->trackEnergySameTowers()
235 <<
"; neighbor hcal energy=" << it->hcalEnergyNeighborTowers() << std::endl;
236 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"hits:" << std::endl;
241 <<
"; " << (*hit) << std::endl;
T getParameter(std::string const &) const
void DumpHBHEHitMap(std::vector< HBHEHitMap > &i) const
std::map< const HBHERecHit *, const PhysicsTower * >::const_iterator hitmap_const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static int indexRBX(const HcalDetId &)
#define DEFINE_FWK_MODULE(type)
void setHcalChannelQuality(const HcalChannelQuality *q)
void getHPDs(std::vector< HBHEHitMap > &v, double energy) const
HcalDetId id() const
get the id
void setFlagField(uint32_t value, int base, int width=1)
std::vector< HBHERecHit >::const_iterator const_iterator
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
HBHEIsolatedNoiseReflagger(const edm::ParameterSet &)
void getRBXs(std::vector< HBHEHitMap > &v, double energy) const
void getMonoHits(std::vector< HBHEHitMap > &v, double energy) const
void setHcalSeverityLevelComputer(const HcalSeverityLevelComputer *q)
~HBHEIsolatedNoiseReflagger()
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< std::vector< reco::TrackExtrapolation > > tok_trackExt_
edm::SortedCollection< HBHERecHit > HBHERecHitCollection
void setEcalSeverityLevelAlgo(const EcalSeverityLevelAlgo *q)
void setEcalChannelStatus(const EcalChannelStatus *q)
void setEERecHitCollection(const EcalRecHitCollection *q)
virtual void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const
ObjectValidator objvalidator_
void getDiHits(std::vector< HBHEHitMap > &v, double energy) const
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
static int indexHPD(const HcalDetId &)
void setEBRecHitCollection(const EcalRecHitCollection *q)