25 LooseHcalIsol_(iConfig.getParameter<double>(
"LooseHcalIsol")),
26 LooseEcalIsol_(iConfig.getParameter<double>(
"LooseEcalIsol")),
27 LooseTrackIsol_(iConfig.getParameter<double>(
"LooseTrackIsol")),
28 TightHcalIsol_(iConfig.getParameter<double>(
"TightHcalIsol")),
29 TightEcalIsol_(iConfig.getParameter<double>(
"TightEcalIsol")),
30 TightTrackIsol_(iConfig.getParameter<double>(
"TightTrackIsol")),
32 LooseRBXEne1_(iConfig.getParameter<double>(
"LooseRBXEne1")),
33 LooseRBXEne2_(iConfig.getParameter<double>(
"LooseRBXEne2")),
34 LooseRBXHits1_(iConfig.getParameter<int>(
"LooseRBXHits1")),
35 LooseRBXHits2_(iConfig.getParameter<int>(
"LooseRBXHits2")),
36 TightRBXEne1_(iConfig.getParameter<double>(
"TightRBXEne1")),
37 TightRBXEne2_(iConfig.getParameter<double>(
"TightRBXEne2")),
38 TightRBXHits1_(iConfig.getParameter<int>(
"TightRBXHits1")),
39 TightRBXHits2_(iConfig.getParameter<int>(
"TightRBXHits2")),
41 LooseHPDEne1_(iConfig.getParameter<double>(
"LooseHPDEne1")),
42 LooseHPDEne2_(iConfig.getParameter<double>(
"LooseHPDEne2")),
43 LooseHPDHits1_(iConfig.getParameter<int>(
"LooseHPDHits1")),
44 LooseHPDHits2_(iConfig.getParameter<int>(
"LooseHPDHits2")),
45 TightHPDEne1_(iConfig.getParameter<double>(
"TightHPDEne1")),
46 TightHPDEne2_(iConfig.getParameter<double>(
"TightHPDEne2")),
47 TightHPDHits1_(iConfig.getParameter<int>(
"TightHPDHits1")),
48 TightHPDHits2_(iConfig.getParameter<int>(
"TightHPDHits2")),
50 LooseDiHitEne_(iConfig.getParameter<double>(
"LooseDiHitEne")),
51 TightDiHitEne_(iConfig.getParameter<double>(
"TightDiHitEne")),
52 LooseMonoHitEne_(iConfig.getParameter<double>(
"LooseMonoHitEne")),
53 TightMonoHitEne_(iConfig.getParameter<double>(
"TightMonoHitEne")),
55 debug_(iConfig.getUntrackedParameter<bool>(
"debug",
true)),
56 objvalidator_(iConfig)
64 produces<HBHERecHitCollection>();
125 std::vector<HBHEHitMap> rbxs;
126 std::vector<HBHEHitMap> hpds;
127 std::vector<HBHEHitMap> dihits;
128 std::vector<HBHEHitMap> monohits;
134 if(
debug_ && (rbxs.size()>0 || hpds.size()>0 || dihits.size()>0 || monohits.size()>0)) {
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();
159 noisehits.insert(it->first);
164 for(
int i=0; i<static_cast<int>(hpds.size());
i++) {
165 int nhits=hpds[
i].nHits();
166 double ene=hpds[
i].hitEnergy();
167 double trkfide=hpds[
i].hitEnergyTrackFiducial();
168 double isolhcale=hpds[
i].hcalEnergySameTowers()+hpds[
i].hcalEnergyNeighborTowers();
169 double isolecale=hpds[
i].ecalEnergySameTowers();
170 double isoltrke=hpds[
i].trackEnergySameTowers()+hpds[
i].trackEnergyNeighborTowers();
174 noisehits.insert(it->first);
179 for(
int i=0; i<static_cast<int>(dihits.size());
i++) {
180 double ene=dihits[
i].hitEnergy();
181 double trkfide=dihits[
i].hitEnergyTrackFiducial();
182 double isolhcale=dihits[
i].hcalEnergySameTowers()+dihits[
i].hcalEnergyNeighborTowers();
183 double isolecale=dihits[
i].ecalEnergySameTowers();
184 double isoltrke=dihits[
i].trackEnergySameTowers()+dihits[
i].trackEnergyNeighborTowers();
188 noisehits.insert(it->first);
193 for(
int i=0; i<static_cast<int>(monohits.size());
i++) {
194 double ene=monohits[
i].hitEnergy();
195 double trkfide=monohits[
i].hitEnergyTrackFiducial();
196 double isolhcale=monohits[
i].hcalEnergySameTowers()+monohits[
i].hcalEnergyNeighborTowers();
197 double isolecale=monohits[
i].ecalEnergySameTowers();
198 double isoltrke=monohits[
i].trackEnergySameTowers()+monohits[
i].trackEnergyNeighborTowers();
202 noisehits.insert(it->first);
213 if(noisehits.end()!=noisehits.find(hit)) {
216 pOut->push_back(newhit);
227 for(std::vector<HBHEHitMap>::const_iterator it=i.begin(); it!=i.end(); ++it) {
228 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"hit energy=" << it->hitEnergy()
229 <<
"; # hits=" << it->nHits()
230 <<
"; hcal energy same=" << it->hcalEnergySameTowers()
231 <<
"; ecal energy same=" << it->ecalEnergySameTowers()
232 <<
"; track energy same=" << it->trackEnergySameTowers()
233 <<
"; neighbor hcal energy=" << it->hcalEnergyNeighborTowers() << std::endl;
234 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"hits:" << std::endl;
239 <<
"; " << (*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
virtual void produce(edm::Event &, const edm::EventSetup &)
static int indexRBX(const HcalDetId &)
#define DEFINE_FWK_MODULE(type)
void setHcalChannelQuality(const HcalChannelQuality *q)
void getHPDs(std::vector< HBHEHitMap > &v, double energy) const
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)
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)