22 hbheLabel_(iConfig.getParameter<edm::InputTag>(
"hbheInput")),
23 ebLabel_(iConfig.getParameter<edm::InputTag>(
"ebInput")),
24 eeLabel_(iConfig.getParameter<edm::InputTag>(
"eeInput")),
25 trackExtrapolationLabel_(iConfig.getParameter<edm::InputTag>(
"trackExtrapolationInput")),
27 LooseHcalIsol_(iConfig.getParameter<double>(
"LooseHcalIsol")),
28 LooseEcalIsol_(iConfig.getParameter<double>(
"LooseEcalIsol")),
29 LooseTrackIsol_(iConfig.getParameter<double>(
"LooseTrackIsol")),
30 TightHcalIsol_(iConfig.getParameter<double>(
"TightHcalIsol")),
31 TightEcalIsol_(iConfig.getParameter<double>(
"TightEcalIsol")),
32 TightTrackIsol_(iConfig.getParameter<double>(
"TightTrackIsol")),
34 LooseRBXEne1_(iConfig.getParameter<double>(
"LooseRBXEne1")),
35 LooseRBXEne2_(iConfig.getParameter<double>(
"LooseRBXEne2")),
36 LooseRBXHits1_(iConfig.getParameter<int>(
"LooseRBXHits1")),
37 LooseRBXHits2_(iConfig.getParameter<int>(
"LooseRBXHits2")),
38 TightRBXEne1_(iConfig.getParameter<double>(
"TightRBXEne1")),
39 TightRBXEne2_(iConfig.getParameter<double>(
"TightRBXEne2")),
40 TightRBXHits1_(iConfig.getParameter<int>(
"TightRBXHits1")),
41 TightRBXHits2_(iConfig.getParameter<int>(
"TightRBXHits2")),
43 LooseHPDEne1_(iConfig.getParameter<double>(
"LooseHPDEne1")),
44 LooseHPDEne2_(iConfig.getParameter<double>(
"LooseHPDEne2")),
45 LooseHPDHits1_(iConfig.getParameter<int>(
"LooseHPDHits1")),
46 LooseHPDHits2_(iConfig.getParameter<int>(
"LooseHPDHits2")),
47 TightHPDEne1_(iConfig.getParameter<double>(
"TightHPDEne1")),
48 TightHPDEne2_(iConfig.getParameter<double>(
"TightHPDEne2")),
49 TightHPDHits1_(iConfig.getParameter<int>(
"TightHPDHits1")),
50 TightHPDHits2_(iConfig.getParameter<int>(
"TightHPDHits2")),
52 LooseDiHitEne_(iConfig.getParameter<double>(
"LooseDiHitEne")),
53 TightDiHitEne_(iConfig.getParameter<double>(
"TightDiHitEne")),
54 LooseMonoHitEne_(iConfig.getParameter<double>(
"LooseMonoHitEne")),
55 TightMonoHitEne_(iConfig.getParameter<double>(
"TightMonoHitEne")),
57 debug_(iConfig.getUntrackedParameter<bool>(
"debug",
true)),
58 objvalidator_(iConfig)
60 produces<HBHERecHitCollection>();
118 std::vector<HBHEHitMap> rbxs;
119 std::vector<HBHEHitMap> hpds;
120 std::vector<HBHEHitMap> dihits;
121 std::vector<HBHEHitMap> monohits;
127 if(
debug_ && (rbxs.size()>0 || hpds.size()>0 || dihits.size()>0 || monohits.size()>0)) {
128 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"RBXs:" << std::endl;
130 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nHPDs:" << std::endl;
132 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nDiHits:" << std::endl;
134 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"\nMonoHits:" << std::endl;
141 std::set<const HBHERecHit*> noisehits;
142 for(
int i=0; i<static_cast<int>(rbxs.size());
i++) {
143 int nhits=rbxs[
i].nHits();
144 double ene=rbxs[
i].hitEnergy();
145 double trkfide=rbxs[
i].hitEnergyTrackFiducial();
146 double isolhcale=rbxs[
i].hcalEnergySameTowers()+rbxs[
i].hcalEnergyNeighborTowers();
147 double isolecale=rbxs[
i].ecalEnergySameTowers();
148 double isoltrke=rbxs[
i].trackEnergySameTowers()+rbxs[
i].trackEnergyNeighborTowers();
152 noisehits.insert(it->first);
157 for(
int i=0; i<static_cast<int>(hpds.size());
i++) {
158 int nhits=hpds[
i].nHits();
159 double ene=hpds[
i].hitEnergy();
160 double trkfide=hpds[
i].hitEnergyTrackFiducial();
161 double isolhcale=hpds[
i].hcalEnergySameTowers()+hpds[
i].hcalEnergyNeighborTowers();
162 double isolecale=hpds[
i].ecalEnergySameTowers();
163 double isoltrke=hpds[
i].trackEnergySameTowers()+hpds[
i].trackEnergyNeighborTowers();
167 noisehits.insert(it->first);
172 for(
int i=0; i<static_cast<int>(dihits.size());
i++) {
173 double ene=dihits[
i].hitEnergy();
174 double trkfide=dihits[
i].hitEnergyTrackFiducial();
175 double isolhcale=dihits[
i].hcalEnergySameTowers()+dihits[
i].hcalEnergyNeighborTowers();
176 double isolecale=dihits[
i].ecalEnergySameTowers();
177 double isoltrke=dihits[
i].trackEnergySameTowers()+dihits[
i].trackEnergyNeighborTowers();
181 noisehits.insert(it->first);
186 for(
int i=0; i<static_cast<int>(monohits.size());
i++) {
187 double ene=monohits[
i].hitEnergy();
188 double trkfide=monohits[
i].hitEnergyTrackFiducial();
189 double isolhcale=monohits[
i].hcalEnergySameTowers()+monohits[
i].hcalEnergyNeighborTowers();
190 double isolecale=monohits[
i].ecalEnergySameTowers();
191 double isoltrke=monohits[
i].trackEnergySameTowers()+monohits[
i].trackEnergyNeighborTowers();
195 noisehits.insert(it->first);
206 if(noisehits.end()!=noisehits.find(hit)) {
209 pOut->push_back(newhit);
214 delete ecalSevLvlAlgo;
222 for(std::vector<HBHEHitMap>::const_iterator it=i.begin(); it!=i.end(); ++it) {
223 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"hit energy=" << it->hitEnergy()
224 <<
"; # hits=" << it->nHits()
225 <<
"; hcal energy same=" << it->hcalEnergySameTowers()
226 <<
"; ecal energy same=" << it->ecalEnergySameTowers()
227 <<
"; track energy same=" << it->trackEnergySameTowers()
228 <<
"; neighbor hcal energy=" << it->hcalEnergyNeighborTowers() << std::endl;
229 edm::LogInfo(
"HBHEIsolatedNoiseReflagger") <<
"hits:" << std::endl;
234 <<
"; " << (*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
HcalDetId id() const
get the id
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)