24 hbheLabel_(iConfig.getParameter<edm::InputTag>(
"hbheInput")),
25 ebLabel_(iConfig.getParameter<edm::InputTag>(
"ebInput")),
26 eeLabel_(iConfig.getParameter<edm::InputTag>(
"eeInput")),
27 trackExtrapolationLabel_(iConfig.getParameter<edm::InputTag>(
"trackExtrapolationInput")),
29 LooseHcalIsol_(iConfig.getParameter<double>(
"LooseHcalIsol")),
30 LooseEcalIsol_(iConfig.getParameter<double>(
"LooseEcalIsol")),
31 LooseTrackIsol_(iConfig.getParameter<double>(
"LooseTrackIsol")),
32 TightHcalIsol_(iConfig.getParameter<double>(
"TightHcalIsol")),
33 TightEcalIsol_(iConfig.getParameter<double>(
"TightEcalIsol")),
34 TightTrackIsol_(iConfig.getParameter<double>(
"TightTrackIsol")),
36 LooseRBXEne1_(iConfig.getParameter<double>(
"LooseRBXEne1")),
37 LooseRBXEne2_(iConfig.getParameter<double>(
"LooseRBXEne2")),
38 LooseRBXHits1_(iConfig.getParameter<int>(
"LooseRBXHits1")),
39 LooseRBXHits2_(iConfig.getParameter<int>(
"LooseRBXHits2")),
40 TightRBXEne1_(iConfig.getParameter<double>(
"TightRBXEne1")),
41 TightRBXEne2_(iConfig.getParameter<double>(
"TightRBXEne2")),
42 TightRBXHits1_(iConfig.getParameter<int>(
"TightRBXHits1")),
43 TightRBXHits2_(iConfig.getParameter<int>(
"TightRBXHits2")),
45 LooseHPDEne1_(iConfig.getParameter<double>(
"LooseHPDEne1")),
46 LooseHPDEne2_(iConfig.getParameter<double>(
"LooseHPDEne2")),
47 LooseHPDHits1_(iConfig.getParameter<int>(
"LooseHPDHits1")),
48 LooseHPDHits2_(iConfig.getParameter<int>(
"LooseHPDHits2")),
49 TightHPDEne1_(iConfig.getParameter<double>(
"TightHPDEne1")),
50 TightHPDEne2_(iConfig.getParameter<double>(
"TightHPDEne2")),
51 TightHPDHits1_(iConfig.getParameter<int>(
"TightHPDHits1")),
52 TightHPDHits2_(iConfig.getParameter<int>(
"TightHPDHits2")),
54 LooseDiHitEne_(iConfig.getParameter<double>(
"LooseDiHitEne")),
55 TightDiHitEne_(iConfig.getParameter<double>(
"TightDiHitEne")),
56 LooseMonoHitEne_(iConfig.getParameter<double>(
"LooseMonoHitEne")),
57 TightMonoHitEne_(iConfig.getParameter<double>(
"TightMonoHitEne")),
59 debug_(iConfig.getUntrackedParameter<bool>(
"debug",
true)),
60 objvalidator_(iConfig)
62 produces<HBHERecHitCollection>();
123 std::vector<HBHEHitMap> rbxs;
124 std::vector<HBHEHitMap> hpds;
125 std::vector<HBHEHitMap> dihits;
126 std::vector<HBHEHitMap> monohits;
132 if(
debug_ && (rbxs.size()>0 || hpds.size()>0 || dihits.size()>0 || monohits.size()>0)) {
133 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"RBXs:" << std::endl;
135 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nHPDs:" << std::endl;
137 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nDiHits:" << std::endl;
139 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nMonoHits:" << std::endl;
146 std::set<const HBHERecHit*> noisehits;
147 for(
int i=0; i<static_cast<int>(rbxs.size());
i++) {
148 int nhits=rbxs[
i].nHits();
149 double ene=rbxs[
i].hitEnergy();
150 double trkfide=rbxs[
i].hitEnergyTrackFiducial();
151 double isolhcale=rbxs[
i].hcalEnergySameTowers()+rbxs[
i].hcalEnergyNeighborTowers();
152 double isolecale=rbxs[
i].ecalEnergySameTowers();
153 double isoltrke=rbxs[
i].trackEnergySameTowers()+rbxs[
i].trackEnergyNeighborTowers();
157 noisehits.insert(it->first);
162 for(
int i=0; i<static_cast<int>(hpds.size());
i++) {
163 int nhits=hpds[
i].nHits();
164 double ene=hpds[
i].hitEnergy();
165 double trkfide=hpds[
i].hitEnergyTrackFiducial();
166 double isolhcale=hpds[
i].hcalEnergySameTowers()+hpds[
i].hcalEnergyNeighborTowers();
167 double isolecale=hpds[
i].ecalEnergySameTowers();
168 double isoltrke=hpds[
i].trackEnergySameTowers()+hpds[
i].trackEnergyNeighborTowers();
172 noisehits.insert(it->first);
177 for(
int i=0; i<static_cast<int>(dihits.size());
i++) {
178 double ene=dihits[
i].hitEnergy();
179 double trkfide=dihits[
i].hitEnergyTrackFiducial();
180 double isolhcale=dihits[
i].hcalEnergySameTowers()+dihits[
i].hcalEnergyNeighborTowers();
181 double isolecale=dihits[
i].ecalEnergySameTowers();
182 double isoltrke=dihits[
i].trackEnergySameTowers()+dihits[
i].trackEnergyNeighborTowers();
186 noisehits.insert(it->first);
191 for(
int i=0; i<static_cast<int>(monohits.size());
i++) {
192 double ene=monohits[
i].hitEnergy();
193 double trkfide=monohits[
i].hitEnergyTrackFiducial();
194 double isolhcale=monohits[
i].hcalEnergySameTowers()+monohits[
i].hcalEnergyNeighborTowers();
195 double isolecale=monohits[
i].ecalEnergySameTowers();
196 double isoltrke=monohits[
i].trackEnergySameTowers()+monohits[
i].trackEnergyNeighborTowers();
200 noisehits.insert(it->first);
211 if(noisehits.end()!=noisehits.find(hit)) {
214 pOut->push_back(newhit);
225 for(std::vector<HBHEHitMap>::const_iterator it=i.begin(); it!=i.end(); ++it) {
226 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"hit energy=" << it->hitEnergy()
227 <<
"; # hits=" << it->nHits()
228 <<
"; hcal energy same=" << it->hcalEnergySameTowers()
229 <<
"; ecal energy same=" << it->ecalEnergySameTowers()
230 <<
"; track energy same=" << it->trackEnergySameTowers()
231 <<
"; neighbor hcal energy=" << it->hcalEnergyNeighborTowers() << std::endl;
232 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"hits:" << std::endl;
237 <<
"; " << (*hit) << std::endl;
void DumpHBHEHitMap(std::vector< HBHEHitMap > &i) const
std::map< const HBHERecHit *, const PhysicsTower * >::const_iterator hitmap_const_iterator
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< T >::const_iterator const_iterator
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()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag trackExtrapolationLabel_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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
static int indexHPD(const HcalDetId &)
void setEBRecHitCollection(const EcalRecHitCollection *q)