test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Private Attributes

bool debug_
 
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
< EcalRecHitCollection
tok_EB_
 
edm::EDGetTokenT
< EcalRecHitCollection
tok_EE_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
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 24 of file HBHEIsolatedNoiseReflagger.cc.

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

24  :
25 
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")),
32 
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")),
41 
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")),
50 
51  LooseDiHitEne_(iConfig.getParameter<double>("LooseDiHitEne")),
52  TightDiHitEne_(iConfig.getParameter<double>("TightDiHitEne")),
53  LooseMonoHitEne_(iConfig.getParameter<double>("LooseMonoHitEne")),
54  TightMonoHitEne_(iConfig.getParameter<double>("TightMonoHitEne")),
55 
56  RBXEneThreshold_(iConfig.getParameter<double>("RBXEneThreshold")),
57 
58  debug_(iConfig.getUntrackedParameter<bool>("debug",true)),
59  objvalidator_(iConfig)
60 {
61 
62  tok_hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInput"));
63  tok_EB_ = consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("ebInput"));
64  tok_EE_ = consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("eeInput"));
65  tok_trackExt_ = consumes<std::vector<reco::TrackExtrapolation> >(iConfig.getParameter<edm::InputTag>("trackExtrapolationInput"));
66 
67  produces<HBHERecHitCollection>();
68 }
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 70 of file HBHEIsolatedNoiseReflagger.cc.

71 {
72 }

Member Function Documentation

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

Definition at line 246 of file HBHEIsolatedNoiseReflagger.cc.

References HBHERecHit::id(), HcalHPDRBXMap::indexHPD(), and HcalHPDRBXMap::indexRBX().

Referenced by produce().

247 {
248  for(std::vector<HBHEHitMap>::const_iterator it=i.begin(); it!=i.end(); ++it) {
249  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "hit energy=" << it->hitEnergy()
250  << "; # hits=" << it->nHits()
251  << "; hcal energy same=" << it->hcalEnergySameTowers()
252  << "; ecal energy same=" << it->ecalEnergySameTowers()
253  << "; track energy same=" << it->trackEnergySameTowers()
254  << "; neighbor hcal energy=" << it->hcalEnergyNeighborTowers() << std::endl;
255  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "hits:" << std::endl;
256  for(HBHEHitMap::hitmap_const_iterator it2=it->beginHits(); it2!=it->endHits(); ++it2) {
257  const HBHERecHit *hit=it2->first;
258  edm::LogInfo("HBHEIsolatedNoiseReflagger") << "RBX #=" << HcalHPDRBXMap::indexRBX(hit->id())
259  << "; HPD #=" << HcalHPDRBXMap::indexHPD(hit->id())
260  << "; " << (*hit) << std::endl;
261  }
262  }
263  return;
264 }
int i
Definition: DBlmapReader.cc:9
std::map< const HBHERecHit *, const PhysicsTower * >::const_iterator hitmap_const_iterator
static int indexRBX(const HcalDetId &)
HcalDetId id() const
get the id
Definition: HBHERecHit.h:23
static int indexHPD(const HcalDetId &)
void HBHEIsolatedNoiseReflagger::produce ( edm::Event iEvent,
const edm::EventSetup evSetup 
)
overrideprivatevirtual

Implements edm::stream::EDProducerBase.

Definition at line 76 of file HBHEIsolatedNoiseReflagger.cc.

References debug_, DumpHBHEHitMap(), edm::EventSetup::get(), edm::Event::getByToken(), HBHEHitMapOrganizer::getDiHits(), HBHEHitMapOrganizer::getHPDs(), HBHEHitMapOrganizer::getMonoHits(), HBHEHitMapOrganizer::getRBXs(), HcalCaloFlagLabels::HBHEIsolatedNoise, i, LooseDiHitEne_, LooseEcalIsol_, LooseHcalIsol_, LooseHPDEne1_, LooseHPDEne2_, LooseHPDHits1_, LooseHPDHits2_, LooseMonoHitEne_, LooseRBXEne1_, LooseRBXEne2_, LooseRBXHits1_, LooseRBXHits2_, LooseTrackIsol_, nhits, objvalidator_, edm::ESHandle< class >::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_.

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

Member Data Documentation

bool HBHEIsolatedNoiseReflagger::debug_
private

Definition at line 58 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseDiHitEne_
private

Definition at line 51 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseEcalIsol_
private

Definition at line 37 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseHcalIsol_
private

Definition at line 36 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseHPDEne1_
private

Definition at line 47 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseHPDEne2_
private

Definition at line 47 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::LooseHPDHits1_
private

Definition at line 48 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::LooseHPDHits2_
private

Definition at line 48 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseMonoHitEne_
private

Definition at line 53 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseRBXEne1_
private

Definition at line 43 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseRBXEne2_
private

Definition at line 43 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::LooseRBXHits1_
private

Definition at line 44 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::LooseRBXHits2_
private

Definition at line 44 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::LooseTrackIsol_
private

Definition at line 38 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

ObjectValidator HBHEIsolatedNoiseReflagger::objvalidator_
private

Definition at line 61 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::RBXEneThreshold_
private

Definition at line 56 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightDiHitEne_
private

Definition at line 52 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightEcalIsol_
private

Definition at line 40 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightHcalIsol_
private

Definition at line 39 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightHPDEne1_
private

Definition at line 49 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightHPDEne2_
private

Definition at line 49 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::TightHPDHits1_
private

Definition at line 50 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::TightHPDHits2_
private

Definition at line 50 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightMonoHitEne_
private

Definition at line 54 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightRBXEne1_
private

Definition at line 45 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightRBXEne2_
private

Definition at line 45 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::TightRBXHits1_
private

Definition at line 46 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

int HBHEIsolatedNoiseReflagger::TightRBXHits2_
private

Definition at line 46 of file HBHEIsolatedNoiseReflagger.h.

Referenced by produce().

double HBHEIsolatedNoiseReflagger::TightTrackIsol_
private

Definition at line 41 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().