CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HBHEIsolatedNoiseReflagger Class Reference

#include <HBHEIsolatedNoiseReflagger.h>

Inheritance diagram for HBHEIsolatedNoiseReflagger:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HBHEIsolatedNoiseReflagger (const edm::ParameterSet &)
 
 ~HBHEIsolatedNoiseReflagger ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void DumpHBHEHitMap (std::vector< HBHEHitMap > &i) const
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

bool debug_
 
const HcalFrontEndMaphfemap
 
double LooseDiHitEne_
 
double LooseEcalIsol_
 
double LooseHcalIsol_
 
double LooseHPDEne1_
 
double LooseHPDEne2_
 
int LooseHPDHits1_
 
int LooseHPDHits2_
 
double LooseMonoHitEne_
 
double LooseRBXEne1_
 
double LooseRBXEne2_
 
int LooseRBXHits1_
 
int LooseRBXHits2_
 
double LooseTrackIsol_
 
ObjectValidator objvalidator_
 
double RBXEneThreshold_
 
double TightDiHitEne_
 
double TightEcalIsol_
 
double TightHcalIsol_
 
double TightHPDEne1_
 
double TightHPDEne2_
 
int TightHPDHits1_
 
int TightHPDHits2_
 
double TightMonoHitEne_
 
double TightRBXEne1_
 
double TightRBXEne2_
 
int TightRBXHits1_
 
int TightRBXHits2_
 
double TightTrackIsol_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EB_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EE_
 
edm::EDGetTokenT< HBHERecHitCollectiontok_hbhe_
 
edm::EDGetTokenT< std::vector< reco::TrackExtrapolation > > tok_trackExt_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 19 of file HBHEIsolatedNoiseReflagger.h.

Constructor & Destructor Documentation

HBHEIsolatedNoiseReflagger::HBHEIsolatedNoiseReflagger ( const edm::ParameterSet iConfig)
explicit

Definition at line 26 of file HBHEIsolatedNoiseReflagger.cc.

References edm::ParameterSet::getParameter(), tok_EB_, tok_EE_, tok_hbhe_, and tok_trackExt_.

26  :
27 
28  LooseHcalIsol_(iConfig.getParameter<double>("LooseHcalIsol")),
29  LooseEcalIsol_(iConfig.getParameter<double>("LooseEcalIsol")),
30  LooseTrackIsol_(iConfig.getParameter<double>("LooseTrackIsol")),
31  TightHcalIsol_(iConfig.getParameter<double>("TightHcalIsol")),
32  TightEcalIsol_(iConfig.getParameter<double>("TightEcalIsol")),
33  TightTrackIsol_(iConfig.getParameter<double>("TightTrackIsol")),
34 
35  LooseRBXEne1_(iConfig.getParameter<double>("LooseRBXEne1")),
36  LooseRBXEne2_(iConfig.getParameter<double>("LooseRBXEne2")),
37  LooseRBXHits1_(iConfig.getParameter<int>("LooseRBXHits1")),
38  LooseRBXHits2_(iConfig.getParameter<int>("LooseRBXHits2")),
39  TightRBXEne1_(iConfig.getParameter<double>("TightRBXEne1")),
40  TightRBXEne2_(iConfig.getParameter<double>("TightRBXEne2")),
41  TightRBXHits1_(iConfig.getParameter<int>("TightRBXHits1")),
42  TightRBXHits2_(iConfig.getParameter<int>("TightRBXHits2")),
43 
44  LooseHPDEne1_(iConfig.getParameter<double>("LooseHPDEne1")),
45  LooseHPDEne2_(iConfig.getParameter<double>("LooseHPDEne2")),
46  LooseHPDHits1_(iConfig.getParameter<int>("LooseHPDHits1")),
47  LooseHPDHits2_(iConfig.getParameter<int>("LooseHPDHits2")),
48  TightHPDEne1_(iConfig.getParameter<double>("TightHPDEne1")),
49  TightHPDEne2_(iConfig.getParameter<double>("TightHPDEne2")),
50  TightHPDHits1_(iConfig.getParameter<int>("TightHPDHits1")),
51  TightHPDHits2_(iConfig.getParameter<int>("TightHPDHits2")),
52 
53  LooseDiHitEne_(iConfig.getParameter<double>("LooseDiHitEne")),
54  TightDiHitEne_(iConfig.getParameter<double>("TightDiHitEne")),
55  LooseMonoHitEne_(iConfig.getParameter<double>("LooseMonoHitEne")),
56  TightMonoHitEne_(iConfig.getParameter<double>("TightMonoHitEne")),
57 
58  RBXEneThreshold_(iConfig.getParameter<double>("RBXEneThreshold")),
59 
60  debug_(iConfig.getUntrackedParameter<bool>("debug",true)),
61  objvalidator_(iConfig)
62 {
63 
64  tok_hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInput"));
65  tok_EB_ = consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("ebInput"));
66  tok_EE_ = consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("eeInput"));
67  tok_trackExt_ = consumes<std::vector<reco::TrackExtrapolation> >(iConfig.getParameter<edm::InputTag>("trackExtrapolationInput"));
68 
69  produces<HBHERecHitCollection>();
70 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::EDGetTokenT< std::vector< reco::TrackExtrapolation > > tok_trackExt_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
HBHEIsolatedNoiseReflagger::~HBHEIsolatedNoiseReflagger ( )

Definition at line 72 of file HBHEIsolatedNoiseReflagger.cc.

73 {
74 }

Member Function Documentation

void HBHEIsolatedNoiseReflagger::DumpHBHEHitMap ( std::vector< HBHEHitMap > &  i) const
private

Definition at line 253 of file HBHEIsolatedNoiseReflagger.cc.

References DEFINE_FWK_MODULE, hfemap, HBHERecHit::id(), HcalFrontEndMap::lookupRBX(), and HcalFrontEndMap::lookupRMIndex().

Referenced by produce().

254 {
255  for(std::vector<HBHEHitMap>::const_iterator it=i.begin(); it!=i.end(); ++it) {
256  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "hit energy=" << it->hitEnergy()
257  << "; # hits=" << it->nHits()
258  << "; hcal energy same=" << it->hcalEnergySameTowers()
259  << "; ecal energy same=" << it->ecalEnergySameTowers()
260  << "; track energy same=" << it->trackEnergySameTowers()
261  << "; neighbor hcal energy=" << it->hcalEnergyNeighborTowers() << std::endl;
262  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "hits:" << std::endl;
263  for(HBHEHitMap::hitmap_const_iterator it2=it->beginHits(); it2!=it->endHits(); ++it2) {
264  const HBHERecHit *hit=it2->first;
265  edm::LogInfo("HBHEIsolatedNoiseReflagger")
266  << "RBX #=" << hfemap->lookupRBX(hit->id())
267  << "; HPD #=" << hfemap->lookupRMIndex(hit->id())
268  << "; " << (*hit) << std::endl;
269  }
270  }
271  return;
272 }
std::map< const HBHERecHit *, const PhysicsTower * >::const_iterator hitmap_const_iterator
HcalDetId id() const
get the id
Definition: HBHERecHit.h:25
const int lookupRMIndex(DetId fId) const
const std::string lookupRBX(DetId fId) const
brief lookup the RBX associated with the given logical id
void HBHEIsolatedNoiseReflagger::produce ( edm::Event iEvent,
const edm::EventSetup evSetup 
)
overrideprivatevirtual

Definition at line 78 of file HBHEIsolatedNoiseReflagger.cc.

References edm::SortedCollection< T, SORT >::begin(), debug_, DumpHBHEHitMap(), edm::SortedCollection< T, SORT >::end(), edm::EventSetup::get(), edm::Event::getByToken(), HBHEHitMapOrganizer::getDiHits(), HBHEHitMapOrganizer::getHPDs(), HBHEHitMapOrganizer::getMonoHits(), HBHEHitMapOrganizer::getRBXs(), HcalCaloFlagLabels::HBHEIsolatedNoise, hfemap, mps_fire::i, LooseDiHitEne_, LooseEcalIsol_, LooseHcalIsol_, LooseHPDEne1_, LooseHPDEne2_, LooseHPDHits1_, LooseHPDHits2_, LooseMonoHitEne_, LooseRBXEne1_, LooseRBXEne2_, LooseRBXHits1_, LooseRBXHits2_, LooseTrackIsol_, eostools::move(), nhits, objvalidator_, edm::ESHandle< T >::product(), edm::Event::put(), RBXEneThreshold_, ObjectValidator::setEBRecHitCollection(), ObjectValidator::setEcalChannelStatus(), ObjectValidator::setEcalSeverityLevelAlgo(), ObjectValidator::setEERecHitCollection(), CaloRecHit::setFlagField(), ObjectValidator::setHcalChannelQuality(), ObjectValidator::setHcalSeverityLevelComputer(), TightDiHitEne_, TightEcalIsol_, TightHcalIsol_, TightHPDEne1_, TightHPDEne2_, TightHPDHits1_, TightHPDHits2_, TightMonoHitEne_, TightRBXEne1_, TightRBXEne2_, TightRBXHits1_, TightRBXHits2_, TightTrackIsol_, tok_EB_, tok_EE_, tok_hbhe_, and tok_trackExt_.

79 {
80  // get the ECAL channel status map
82  evSetup.get<EcalChannelStatusRcd>().get( ecalChStatus );
83  const EcalChannelStatus* dbEcalChStatus = ecalChStatus.product();
84 
85  // get the HCAL channel status map
86 
88  evSetup.get<HcalChannelQualityRcd>().get( "withTopo", hcalChStatus );
89  const HcalChannelQuality* dbHcalChStatus = hcalChStatus.product();
90 
91  // get the severity level computers
92  edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl;
93  evSetup.get<HcalSeverityLevelComputerRcd>().get(hcalSevLvlComputerHndl);
94  const HcalSeverityLevelComputer* hcalSevLvlComputer = hcalSevLvlComputerHndl.product();
95 
96  edm::ESHandle<EcalSeverityLevelAlgo> ecalSevLvlAlgoHndl;
97  evSetup.get<EcalSeverityLevelAlgoRcd>().get(ecalSevLvlAlgoHndl);
98  const EcalSeverityLevelAlgo* ecalSevLvlAlgo = ecalSevLvlAlgoHndl.product();
99 
100  // get the calotower mappings
102  evSetup.get<CaloGeometryRecord>().get(ctcm);
103 
104  // get hcal frontend map
106  evSetup.get<HcalFrontEndMapRcd>().get(hfemapHndl);
107  hfemap = hfemapHndl.product();
108 
109  // get the HB/HE hits
111  iEvent.getByToken(tok_hbhe_, hbhehits_h);
112 
113  // get the ECAL hits
115  iEvent.getByToken(tok_EB_, ebhits_h);
117  iEvent.getByToken(tok_EE_, eehits_h);
118 
119  // get the tracks
121  iEvent.getByToken(tok_trackExt_, trackextraps_h);
122 
123  // set the status maps and severity level computers for the hit validator
124  objvalidator_.setHcalChannelQuality(dbHcalChStatus);
125  objvalidator_.setEcalChannelStatus(dbEcalChStatus);
126  objvalidator_.setHcalSeverityLevelComputer(hcalSevLvlComputer);
127  objvalidator_.setEcalSeverityLevelAlgo(ecalSevLvlAlgo);
128  objvalidator_.setEBRecHitCollection(&(*ebhits_h));
129  objvalidator_.setEERecHitCollection(&(*eehits_h));
130 
131  // organizer the hits
132  PhysicsTowerOrganizer pto(iEvent, evSetup, hbhehits_h, ebhits_h, eehits_h, trackextraps_h, objvalidator_, *(ctcm.product()));
133  HBHEHitMapOrganizer organizer(hbhehits_h, objvalidator_, pto, hfemap);
134 
135  // get the rbxs, hpds, dihits, and monohits
136  std::vector<HBHEHitMap> rbxs;
137  std::vector<HBHEHitMap> hpds;
138  std::vector<HBHEHitMap> dihits;
139  std::vector<HBHEHitMap> monohits;
140  organizer.getRBXs(rbxs, LooseRBXEne1_<TightRBXEne1_ ? LooseRBXEne1_ : TightRBXEne1_);
141  organizer.getHPDs(hpds, LooseHPDEne1_<TightHPDEne1_ ? LooseHPDEne1_ : TightHPDEne1_);
142  organizer.getDiHits(dihits, LooseDiHitEne_<TightDiHitEne_ ? LooseDiHitEne_ : TightDiHitEne_);
143  organizer.getMonoHits(monohits, LooseMonoHitEne_<TightMonoHitEne_ ? LooseMonoHitEne_ : TightMonoHitEne_);
144 
145  if(debug_ && (rbxs.size()>0 || hpds.size()>0 || dihits.size()>0 || monohits.size()>0)) {
146  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "RBXs:" << std::endl;
147  DumpHBHEHitMap(rbxs);
148  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "\nHPDs:" << std::endl;
149  DumpHBHEHitMap(hpds);
150  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "\nDiHits:" << std::endl;
151  DumpHBHEHitMap(dihits);
152  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "\nMonoHits:" << std::endl;
153  DumpHBHEHitMap(monohits);
154  }
155 
156  // bool result=true;
157 
158  // determine which hits are noisy
159  std::set<const HBHERecHit*> noisehits;
160  for(int i=0; i<static_cast<int>(rbxs.size()); i++) {
161  int nhits=rbxs[i].nHits();
162  double ene=rbxs[i].hitEnergy();
163  double trkfide=rbxs[i].hitEnergyTrackFiducial();
164  double isolhcale=rbxs[i].hcalEnergySameTowers()+rbxs[i].hcalEnergyNeighborTowers();
165  double isolecale=rbxs[i].ecalEnergySameTowers();
166  double isoltrke=rbxs[i].trackEnergySameTowers()+rbxs[i].trackEnergyNeighborTowers();
167  //
168  // RBX mistag reduction
169  bool isLooseIso=false;
170  bool isTightIso=false;
171  if( ene>RBXEneThreshold_ && ene>0 ){// New absolute iso-cut for high energy RBX clusters
173  isLooseIso=true;
174  if( isolhcale<TightHcalIsol_*RBXEneThreshold_ && isolecale<TightEcalIsol_*RBXEneThreshold_ && isoltrke<TightTrackIsol_*RBXEneThreshold_ )
175  isTightIso=true;
176  }
177  if( ene<=RBXEneThreshold_ && ene>0 ){// Old relative iso-cut for low energy RBX clusters
178  if( isolhcale/ene<LooseHcalIsol_ && isolecale/ene<LooseEcalIsol_ && isoltrke/ene<LooseTrackIsol_ )
179  isLooseIso=true;
180  if( isolhcale/ene<TightHcalIsol_ && isolecale/ene<TightEcalIsol_ && isoltrke/ene<TightTrackIsol_ )
181  isTightIso=true;
182  }
183  //
184  if((isLooseIso && ((trkfide>LooseRBXEne1_ && nhits>=LooseRBXHits1_) || (trkfide>LooseRBXEne2_ && nhits>=LooseRBXHits2_))) ||
185  (isTightIso && ((trkfide>TightRBXEne1_ && nhits>=TightRBXHits1_) || (trkfide>TightRBXEne2_ && nhits>=TightRBXHits2_)))) {
186  for(HBHEHitMap::hitmap_const_iterator it=rbxs[i].beginHits(); it!=rbxs[i].endHits(); ++it)
187  noisehits.insert(it->first);
188  // result=false;
189  }
190  }
191 
192  for(int i=0; i<static_cast<int>(hpds.size()); i++) {
193  int nhits=hpds[i].nHits();
194  double ene=hpds[i].hitEnergy();
195  double trkfide=hpds[i].hitEnergyTrackFiducial();
196  double isolhcale=hpds[i].hcalEnergySameTowers()+hpds[i].hcalEnergyNeighborTowers();
197  double isolecale=hpds[i].ecalEnergySameTowers();
198  double isoltrke=hpds[i].trackEnergySameTowers()+hpds[i].trackEnergyNeighborTowers();
199  if((ene>0 && isolhcale/ene<LooseHcalIsol_ && isolecale/ene<LooseEcalIsol_ && isoltrke/ene<LooseTrackIsol_ && ((trkfide>LooseHPDEne1_ && nhits>=LooseHPDHits1_) || (trkfide>LooseHPDEne2_ && nhits>=LooseHPDHits2_))) ||
200  (ene>0 && isolhcale/ene<TightHcalIsol_ && isolecale/ene<TightEcalIsol_ && isoltrke/ene<TightTrackIsol_ && ((trkfide>TightHPDEne1_ && nhits>=TightHPDHits1_) || (trkfide>TightHPDEne2_ && nhits>=TightHPDHits2_)))) {
201  for(HBHEHitMap::hitmap_const_iterator it=hpds[i].beginHits(); it!=hpds[i].endHits(); ++it)
202  noisehits.insert(it->first);
203  // result=false;
204  }
205  }
206 
207  for(int i=0; i<static_cast<int>(dihits.size()); i++) {
208  double ene=dihits[i].hitEnergy();
209  double trkfide=dihits[i].hitEnergyTrackFiducial();
210  double isolhcale=dihits[i].hcalEnergySameTowers()+dihits[i].hcalEnergyNeighborTowers();
211  double isolecale=dihits[i].ecalEnergySameTowers();
212  double isoltrke=dihits[i].trackEnergySameTowers()+dihits[i].trackEnergyNeighborTowers();
213  if((ene>0 && isolhcale/ene<LooseHcalIsol_ && isolecale/ene<LooseEcalIsol_ && isoltrke/ene<LooseTrackIsol_ && trkfide>0.99*ene && trkfide>LooseDiHitEne_) ||
214  (ene>0 && isolhcale/ene<TightHcalIsol_ && isolecale/ene<TightEcalIsol_ && isoltrke/ene<TightTrackIsol_ && ene>TightDiHitEne_)) {
215  for(HBHEHitMap::hitmap_const_iterator it=dihits[i].beginHits(); it!=dihits[i].endHits(); ++it)
216  noisehits.insert(it->first);
217  // result=false;
218  }
219  }
220 
221  for(int i=0; i<static_cast<int>(monohits.size()); i++) {
222  double ene=monohits[i].hitEnergy();
223  double trkfide=monohits[i].hitEnergyTrackFiducial();
224  double isolhcale=monohits[i].hcalEnergySameTowers()+monohits[i].hcalEnergyNeighborTowers();
225  double isolecale=monohits[i].ecalEnergySameTowers();
226  double isoltrke=monohits[i].trackEnergySameTowers()+monohits[i].trackEnergyNeighborTowers();
227  if((ene>0 && isolhcale/ene<LooseHcalIsol_ && isolecale/ene<LooseEcalIsol_ && isoltrke/ene<LooseTrackIsol_ && trkfide>0.99*ene && trkfide>LooseMonoHitEne_) ||
228  (ene>0 && isolhcale/ene<TightHcalIsol_ && isolecale/ene<TightEcalIsol_ && isoltrke/ene<TightTrackIsol_ && ene>TightMonoHitEne_)) {
229  for(HBHEHitMap::hitmap_const_iterator it=monohits[i].beginHits(); it!=monohits[i].endHits(); ++it)
230  noisehits.insert(it->first);
231  // result=false;
232  }
233  }
234 
235  // prepare the output HBHE RecHit collection
236  auto pOut = std::make_unique<HBHERecHitCollection>();
237  // loop over rechits, and set the new bit you wish to use
238  for(HBHERecHitCollection::const_iterator it=hbhehits_h->begin(); it!=hbhehits_h->end(); ++it) {
239  const HBHERecHit* hit=&(*it);
240  HBHERecHit newhit(*hit);
241  if(noisehits.end()!=noisehits.find(hit)) {
242  newhit.setFlagField(1, HcalCaloFlagLabels::HBHEIsolatedNoise);
243  }
244  pOut->push_back(newhit);
245  }
246 
247  iEvent.put(std::move(pOut));
248 
249  return;
250 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
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
Definition: Event.h:460
void setHcalChannelQuality(const HcalChannelQuality *q)
std::vector< HBHERecHit >::const_iterator const_iterator
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
void setHcalSeverityLevelComputer(const HcalSeverityLevelComputer *q)
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::EDGetTokenT< std::vector< reco::TrackExtrapolation > > tok_trackExt_
const_iterator end() const
void setEcalSeverityLevelAlgo(const EcalSeverityLevelAlgo *q)
void setEcalChannelStatus(const EcalChannelStatus *q)
void setEERecHitCollection(const EcalRecHitCollection *q)
const T & get() const
Definition: EventSetup.h:56
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
void setEBRecHitCollection(const EcalRecHitCollection *q)
T const * product() const
Definition: ESHandle.h:86
def move(src, dest)
Definition: eostools.py:510
const_iterator begin() const

Member Data Documentation

bool HBHEIsolatedNoiseReflagger::debug_
private

Definition at line 59 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

const HcalFrontEndMap* HBHEIsolatedNoiseReflagger::hfemap
private

Definition at line 35 of file HBHEIsolatedNoiseReflagger.h.

Referenced by DumpHBHEHitMap(), and produce().

double HBHEIsolatedNoiseReflagger::LooseDiHitEne_
private

Definition at line 52 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseEcalIsol_
private

Definition at line 38 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseHcalIsol_
private

Definition at line 37 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseHPDEne1_
private

Definition at line 48 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseHPDEne2_
private

Definition at line 48 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::LooseHPDHits1_
private

Definition at line 49 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::LooseHPDHits2_
private

Definition at line 49 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseMonoHitEne_
private

Definition at line 54 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseRBXEne1_
private

Definition at line 44 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseRBXEne2_
private

Definition at line 44 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::LooseRBXHits1_
private

Definition at line 45 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::LooseRBXHits2_
private

Definition at line 45 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseTrackIsol_
private

Definition at line 39 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

ObjectValidator HBHEIsolatedNoiseReflagger::objvalidator_
private

Definition at line 62 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::RBXEneThreshold_
private

Definition at line 57 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightDiHitEne_
private

Definition at line 53 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightEcalIsol_
private

Definition at line 41 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightHcalIsol_
private

Definition at line 40 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightHPDEne1_
private

Definition at line 50 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightHPDEne2_
private

Definition at line 50 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::TightHPDHits1_
private

Definition at line 51 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::TightHPDHits2_
private

Definition at line 51 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightMonoHitEne_
private

Definition at line 55 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightRBXEne1_
private

Definition at line 46 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightRBXEne2_
private

Definition at line 46 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::TightRBXHits1_
private

Definition at line 47 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::TightRBXHits2_
private

Definition at line 47 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightTrackIsol_
private

Definition at line 42 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

edm::EDGetTokenT<EcalRecHitCollection> HBHEIsolatedNoiseReflagger::tok_EB_
private

Definition at line 32 of file HBHEIsolatedNoiseReflagger.h.

Referenced by HBHEIsolatedNoiseReflagger(), and produce().

edm::EDGetTokenT<EcalRecHitCollection> HBHEIsolatedNoiseReflagger::tok_EE_
private

Definition at line 33 of file HBHEIsolatedNoiseReflagger.h.

Referenced by HBHEIsolatedNoiseReflagger(), and produce().

edm::EDGetTokenT<HBHERecHitCollection> HBHEIsolatedNoiseReflagger::tok_hbhe_
private

Definition at line 31 of file HBHEIsolatedNoiseReflagger.h.

Referenced by HBHEIsolatedNoiseReflagger(), and produce().

edm::EDGetTokenT<std::vector<reco::TrackExtrapolation> > HBHEIsolatedNoiseReflagger::tok_trackExt_
private

Definition at line 34 of file HBHEIsolatedNoiseReflagger.h.

Referenced by HBHEIsolatedNoiseReflagger(), and produce().