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
EcalDeadCellBoundaryEnergyFilter Class Reference

#include <PhysicsTools/EcalDeadCellBoundaryEnergyFilter/src/EcalDeadCellBoundaryEnergyFilter.cc>

Inheritance diagram for EcalDeadCellBoundaryEnergyFilter:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EcalDeadCellBoundaryEnergyFilter (const edm::ParameterSet &)
 
 ~EcalDeadCellBoundaryEnergyFilter ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilter ()
 
- 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 (const std::string &iProcessName, std::vector< const char * > &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

virtual void beginJob () override
 
virtual void endJob () override
 
virtual bool filter (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

const double cutBoundEnergyDeadCellsEB
 
const double cutBoundEnergyDeadCellsEE
 
const double cutBoundEnergyGapEB
 
const double cutBoundEnergyGapEE
 
const bool debug_
 
EcalBoundaryInfoCalculator
< EBDetId
ebBoundaryCalc
 
edm::EDGetTokenT
< EcalRecHitCollection
EBRecHitsToken_
 
EcalBoundaryInfoCalculator
< EEDetId
eeBoundaryCalc
 
edm::EDGetTokenT
< EcalRecHitCollection
EERecHitsToken_
 
const bool enableGap_
 
float * enNeighboursGap_EB
 
float * enNeighboursGap_EE
 
const std::string FilterAlgo_
 
int i_EBDead
 
int i_EBGap
 
int i_EEDead
 
int i_EEGap
 
const int kMAX
 
const std::vector< int > limitDeadCellToChannelStatusEB_
 
const std::vector< int > limitDeadCellToChannelStatusEE_
 
const bool limitFilterToEB_
 
const bool limitFilterToEE_
 
double maxBoundaryEnergy_
 
const bool skimDead_
 
const bool skimGap_
 
const bool taggingMode_
 
std::vector< BoundaryInformationv_boundaryInfoDeadCells_EB
 
std::vector< BoundaryInformationv_boundaryInfoDeadCells_EE
 
std::vector< BoundaryInformationv_enNeighboursGap_EB
 
std::vector< BoundaryInformationv_enNeighboursGap_EE
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter 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::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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

Description: <one line="" class="" summary>=""> Event filtering for anomalous ECAL events where the energy measured by ECAL is significantly biased due to energy depositions in passive or problematic detector regions. The filter will handle ECAL flags and will compute the boundary energy in the channels surrounding the problematic regions such as dead channels and gaps.

Filter Algos : a) "TuningMode" keep all events and save event info in a ROOT TTree for tuning/algo development b) "FilterMode" returns false for all events passing the AnomalousEcalVariables.isDeadEcalCluster() function (—>rejects events affected by energy deposits in Dead Cells)

Implementation: <Notes on="" implementation>="">

Definition at line 60 of file EcalDeadCellBoundaryEnergyFilter.cc.

Constructor & Destructor Documentation

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

Definition at line 115 of file EcalDeadCellBoundaryEnergyFilter.cc.

References gather_cfg::cout, cutBoundEnergyDeadCellsEB, debug_, i_EBDead, i_EBGap, i_EEDead, i_EEGap, maxBoundaryEnergy_, skimDead_, skimGap_, v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

116  : kMAX (50)
117  //now do what ever initialization is needed
118  , EBRecHitsToken_ (consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag> ("recHitsEB")))
119  , EERecHitsToken_ (consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag> ("recHitsEE")))
120 
121  , FilterAlgo_ (iConfig.getUntrackedParameter<std::string> ("FilterAlgo", "TuningMode"))
122  , taggingMode_ (iConfig.getParameter<bool>("taggingMode"))
123  , skimGap_ (iConfig.getUntrackedParameter<bool> ("skimGap", false))
124  , skimDead_ (iConfig.getUntrackedParameter<bool> ("skimDead", false))
125  , cutBoundEnergyGapEE (iConfig.getUntrackedParameter<double> ("cutBoundEnergyGapEE"))
126  , cutBoundEnergyGapEB (iConfig.getUntrackedParameter<double> ("cutBoundEnergyGapEB"))
127  , cutBoundEnergyDeadCellsEB (iConfig.getUntrackedParameter<double> ("cutBoundEnergyDeadCellsEB"))
128  , cutBoundEnergyDeadCellsEE (iConfig.getUntrackedParameter<double> ("cutBoundEnergyDeadCellsEE"))
129 
130  , limitFilterToEB_ (iConfig.getUntrackedParameter<bool> ("limitFilterToEB", false))
131  , limitFilterToEE_ (iConfig.getUntrackedParameter<bool> ("limitFilterToEE", false))
132  , limitDeadCellToChannelStatusEB_ (iConfig.getParameter<std::vector<int> > ("limitDeadCellToChannelStatusEB"))
133  , limitDeadCellToChannelStatusEE_ (iConfig.getParameter<std::vector<int> > ("limitDeadCellToChannelStatusEE"))
134 
135  , enableGap_ (iConfig.getUntrackedParameter<bool> ("enableGap", false))
136  , debug_ (iConfig.getParameter<bool>("debug"))
137 {
138 
140 
141  i_EBDead = 0;
142  i_EEDead = 0;
143  i_EBGap = 0;
144  i_EEGap = 0;
145 
146  v_enNeighboursGap_EB.clear();
147  v_enNeighboursGap_EE.clear();
148  v_enNeighboursGap_EB.reserve(50);
149  v_enNeighboursGap_EE.reserve(50);
150 
151  v_boundaryInfoDeadCells_EB.reserve(50);
152  v_boundaryInfoDeadCells_EE.reserve(50);
155 
156  if (skimGap_ && debug_ ) std::cout << "Skim Gap!" << std::endl;
157  if (skimDead_ && debug_ ) std::cout << "Skim Dead!" << std::endl;
158 
159  if( debug_ ) std::cout << "Constructor EcalAnomalousEvent" << std::endl;
160 
161  produces<bool>();
162 
163  produces<AnomalousECALVariables> ("anomalousECALVariables");
164 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< BoundaryInformation > v_enNeighboursGap_EB
std::vector< BoundaryInformation > v_enNeighboursGap_EE
edm::EDGetTokenT< EcalRecHitCollection > EERecHitsToken_
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EE
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EB
edm::EDGetTokenT< EcalRecHitCollection > EBRecHitsToken_
tuple cout
Definition: gather_cfg.py:121
EcalDeadCellBoundaryEnergyFilter::~EcalDeadCellBoundaryEnergyFilter ( )

Definition at line 166 of file EcalDeadCellBoundaryEnergyFilter.cc.

166  {
167  //std::cout << "destructor Filter" << std::endl;
168 }

Member Function Documentation

void EcalDeadCellBoundaryEnergyFilter::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 470 of file EcalDeadCellBoundaryEnergyFilter.cc.

470  {
471 }
void EcalDeadCellBoundaryEnergyFilter::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 474 of file EcalDeadCellBoundaryEnergyFilter.cc.

474  {
475 }
bool EcalDeadCellBoundaryEnergyFilter::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDFilter.

Definition at line 171 of file EcalDeadCellBoundaryEnergyFilter.cc.

References funct::abs(), BoundaryInformation::boundaryEnergy, BoundaryInformation::boundaryET, EcalBoundaryInfoCalculator< EcalDetId >::boundaryRecHits(), EcalBoundaryInfoCalculator< EcalDetId >::checkRecHitHasDeadNeighbour(), EcalBoundaryInfoCalculator< EcalDetId >::checkRecHitHasInvalidNeighbour(), gather_cfg::cout, fwrapper::cs, cutBoundEnergyDeadCellsEB, cutBoundEnergyDeadCellsEE, cutBoundEnergyGapEB, cutBoundEnergyGapEE, debug_, BoundaryInformation::detIds, ebBoundaryCalc, egHLT::errCodes::EBRecHits, EBRecHitsToken_, eeBoundaryCalc, egHLT::errCodes::EERecHits, EERecHitsToken_, enableGap_, eta, PV3DBase< T, PVType, FrameType >::eta(), EcalBoundaryInfoCalculator< EcalDetId >::gapRecHits(), geometry, edm::EventSetup::get(), edm::Event::getByToken(), CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), i_EBDead, i_EBGap, i_EEDead, i_EEGap, hit::id, limitDeadCellToChannelStatusEB_, limitDeadCellToChannelStatusEE_, limitFilterToEB_, limitFilterToEE_, maxBoundaryEnergy_, edm::Event::put(), EcalBoundaryInfoCalculator< EcalDetId >::setDebugMode(), skimDead_, skimGap_, ntuplemaker::status, taggingMode_, v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

171  {
172  using namespace edm;
173 
174  //int eventno = (int) iEvent.eventAuxiliary().event();
175 
176  v_enNeighboursGap_EB.clear();
177  v_enNeighboursGap_EE.clear();
178 
181 
182  // Get the Ecal RecHits
187 
188  edm::ESHandle<CaloTopology> theCaloTopology;
189  iSetup.get<CaloTopologyRecord> ().get(theCaloTopology);
190 
192  iSetup.get<EcalChannelStatusRcd> ().get(ecalStatus);
193 
195  iSetup.get<CaloGeometryRecord> ().get(geometry);
196 
197 // int DeadChannelsCounterEB = 0;
198 // int DeadChannelsCounterEE = 0;
199 
200  i_EBDead = 0;
201  i_EEDead = 0;
202  i_EBGap = 0;
203  i_EEGap = 0;
204 
205  std::vector<DetId> sameFlagDetIds;
206 
207  bool pass = true;
208 
209  if (!limitFilterToEE_) {
210 
211  if (debug_)
212  std::cout << "process EB" << std::endl;
213 
214  for (EcalRecHitCollection::const_iterator hit = EBRecHits->begin(); hit != EBRecHits->end(); ++hit) {
215 
216  bool detIdAlreadyChecked = false;
217  DetId currDetId = (DetId) hit->id();
218  //add limitation to channel stati
219  EcalChannelStatus::const_iterator chit = ecalStatus->find(currDetId);
220  int status = (chit != ecalStatus->end()) ? chit->getStatusCode() & 0x1F : -1;
221  if (status != 0)
222  continue;
223  bool passChannelLimitation = false;
224 
225  // check if hit has a dead neighbour
226  std::vector<int> deadNeighbourStati;
227  ebBoundaryCalc.checkRecHitHasDeadNeighbour(*hit, ecalStatus, deadNeighbourStati);
228 
229  for (int cs = 0; cs < (int) limitDeadCellToChannelStatusEB_.size(); ++cs) {
230  int channelAllowed = limitDeadCellToChannelStatusEB_[cs];
231 
232  for (std::vector<int>::iterator sit = deadNeighbourStati.begin(); sit != deadNeighbourStati.end(); ++sit) {
233  //std::cout << "Neighbouring dead channel with status: " << *sit << std::endl;
234  if (channelAllowed == *sit || (channelAllowed < 0 && abs(channelAllowed) <= *sit)) {
235  passChannelLimitation = true;
236  break;
237  }
238  }
239  }
240 
241  for (std::vector<DetId>::iterator it = sameFlagDetIds.begin(); it != sameFlagDetIds.end(); it++) {
242  if (currDetId == *it)
243  detIdAlreadyChecked = true;
244  }
245 
246  // RecHit is at EB boundary and should be processed
247  if (!detIdAlreadyChecked && deadNeighbourStati.size() == 0 && ebBoundaryCalc.checkRecHitHasInvalidNeighbour(
248  *hit, ecalStatus)) {
249 
250  if (debug_)
253  (const edm::Handle<EcalRecHitCollection>&) EBRecHits, (const EcalRecHit *) &(*hit), theCaloTopology,
254  ecalStatus, geometry);
255 
256  // get rechits along gap cluster
257  for (std::vector<DetId>::iterator it = gapinfo.detIds.begin(); it != gapinfo.detIds.end(); it++) {
258  sameFlagDetIds.push_back(*it);
259  }
260 
261  if (gapinfo.boundaryEnergy > cutBoundEnergyGapEB) {
262 
263  i_EBGap++;
264  v_enNeighboursGap_EB.push_back(gapinfo);
265 
266  if (debug_)
267  std::cout << "EB: gap cluster energy: " << gapinfo.boundaryEnergy << " deadCells: "
268  << gapinfo.detIds.size() << std::endl;
269  }
270  }
271 
272  // RecHit is member of boundary and should be processed
273  if (!detIdAlreadyChecked && (passChannelLimitation || (limitDeadCellToChannelStatusEB_.size() == 0
274  && deadNeighbourStati.size() > 0))) {
275 
276  if (debug_)
279  (const edm::Handle<EcalRecHitCollection>&) EBRecHits, (const EcalRecHit *) &(*hit), theCaloTopology,
280  ecalStatus, geometry);
281 
282  // get boundary of !kDead rechits arround the dead cluster
283  for (std::vector<DetId>::iterator it = boundinfo.detIds.begin(); it != boundinfo.detIds.end(); it++) {
284  sameFlagDetIds.push_back(*it);
285  }
286 
287  if (boundinfo.boundaryEnergy > cutBoundEnergyDeadCellsEB) {
288 
289  i_EBDead++;
290  v_boundaryInfoDeadCells_EB.push_back(boundinfo);
291 
292  if (debug_)
293  std::cout << "EB: boundary Energy dead RecHit: " << boundinfo.boundaryEnergy << " ET: "
294  << boundinfo.boundaryET << " deadCells: " << boundinfo.detIds.size() << std::endl;
295  }
296 
297  }
298  }
299 
300  }
301 
302  sameFlagDetIds.clear();
303 
304  if (!limitFilterToEB_) {
305 
306  if (debug_)
307  std::cout << "process EE" << std::endl;
308 
309  for (EcalRecHitCollection::const_iterator hit = EERecHits->begin(); hit != EERecHits->end(); ++hit) {
310 
311  bool detIdAlreadyChecked = false;
312  DetId currDetId = (DetId) hit->id();
313  //add limitation to channel stati
314  EcalChannelStatus::const_iterator chit = ecalStatus->find(currDetId);
315  int status = (chit != ecalStatus->end()) ? chit->getStatusCode() & 0x1F : -1;
316  if (status != 0)
317  continue;
318  bool passChannelLimitation = false;
319 
320  // check if hit has a dead neighbour
321  std::vector<int> deadNeighbourStati;
322  eeBoundaryCalc.checkRecHitHasDeadNeighbour(*hit, ecalStatus, deadNeighbourStati);
323 
324  for (int cs = 0; cs < (int) limitDeadCellToChannelStatusEE_.size(); ++cs) {
325  int channelAllowed = limitDeadCellToChannelStatusEE_[cs];
326 
327  for (std::vector<int>::iterator sit = deadNeighbourStati.begin(); sit != deadNeighbourStati.end(); ++sit) {
328  //std::cout << "Neighbouring dead channel with status: " << *sit << std::endl;
329  if (channelAllowed == *sit || (channelAllowed < 0 && abs(channelAllowed) <= *sit)) {
330  passChannelLimitation = true;
331  break;
332  }
333  }
334  }
335 
336  for (std::vector<DetId>::iterator it = sameFlagDetIds.begin(); it != sameFlagDetIds.end(); it++) {
337  if (currDetId == *it)
338  detIdAlreadyChecked = true;
339  }
340 
341  // RecHit is at EE boundary and should be processed
342  const CaloSubdetectorGeometry* subGeom = geometry->getSubdetectorGeometry(currDetId);
343  const CaloCellGeometry* cellGeom = subGeom->getGeometry(currDetId);
344  double eta = cellGeom->getPosition().eta();
345 
346  if (!detIdAlreadyChecked && deadNeighbourStati.size() == 0 && eeBoundaryCalc.checkRecHitHasInvalidNeighbour(
347  *hit, ecalStatus) && abs(eta) < 1.6) {
348 
349  if (debug_)
352  (const edm::Handle<EcalRecHitCollection>&) EERecHits, (const EcalRecHit *) &(*hit), theCaloTopology,
353  ecalStatus, geometry);
354 
355  // get rechits along gap cluster
356  for (std::vector<DetId>::iterator it = gapinfo.detIds.begin(); it != gapinfo.detIds.end(); it++) {
357  sameFlagDetIds.push_back(*it);
358  }
359 
360  if (gapinfo.boundaryEnergy > cutBoundEnergyGapEE) {
361 
362  i_EEGap++;
363  v_enNeighboursGap_EE.push_back(gapinfo);
364 
365  if (debug_)
366  std::cout << "EE: gap cluster energy: " << gapinfo.boundaryEnergy << " deadCells: "
367  << gapinfo.detIds.size() << std::endl;
368  }
369  }
370 
371  // RecHit is member of boundary and should be processed
372  if (!detIdAlreadyChecked && (passChannelLimitation || (limitDeadCellToChannelStatusEE_.size() == 0
373  && deadNeighbourStati.size() > 0))) {
374 
375  if (debug_)
378  (const edm::Handle<EcalRecHitCollection>&) EERecHits, (const EcalRecHit *) &(*hit), theCaloTopology,
379  ecalStatus, geometry);
380 
381  // get boundary of !kDead rechits arround the dead cluster
382  for (std::vector<DetId>::iterator it = boundinfo.detIds.begin(); it != boundinfo.detIds.end(); it++) {
383  sameFlagDetIds.push_back(*it);
384  }
385 
386  if (boundinfo.boundaryEnergy > cutBoundEnergyDeadCellsEE) {
387 
388  i_EEDead++;
389  v_boundaryInfoDeadCells_EE.push_back(boundinfo);
390 
391  if (debug_)
392  std::cout << "EE: boundary Energy dead RecHit: " << boundinfo.boundaryEnergy << " ET: "
393  << boundinfo.boundaryET << " deadCells: " << boundinfo.detIds.size() << std::endl;
394 
395  // for (std::vector<DetId>::iterator it = boundinfo.detIds.begin(); it != boundinfo.detIds.end(); it++) {
396  // std::cout << (EEDetId) * it << std::endl;
397  // }
398 
399  }
400 
401  }
402  }
403 
404  }
405 
406  sameFlagDetIds.clear();
407 
408  std::auto_ptr<AnomalousECALVariables> pAnomalousECALVariables(new AnomalousECALVariables(v_enNeighboursGap_EB,
410 
411 
412  bool isGap = pAnomalousECALVariables->isGapEcalCluster(cutBoundEnergyGapEB, cutBoundEnergyGapEE);
413  bool isBoundary = pAnomalousECALVariables->isDeadEcalCluster(maxBoundaryEnergy_, limitDeadCellToChannelStatusEB_,
415  pass = (!isBoundary && ((!isGap && enableGap_) || !enableGap_));
416 
417  iEvent.put(pAnomalousECALVariables, "anomalousECALVariables");
418 
419  iEvent.put( std::auto_ptr<bool>(new bool(pass)) );
420 
421  if( taggingMode_ ){
422  if (skimDead_ && (i_EBDead >= 1 || i_EEDead >= 1)) {
423  return true;
424  } else if (skimGap_ && (i_EBGap >= 1 || i_EEGap >= 1)) {
425  return true;
426  } else if (!skimDead_ && !skimGap_)
427  return true;
428  else {
429  return false;
430  }
431  }
432  else return pass;
433 
434 /*
435  if (FilterAlgo_ == "TuningMode") {
436  std::auto_ptr<AnomalousECALVariables> pAnomalousECALVariables(new AnomalousECALVariables(v_enNeighboursGap_EB,
437  v_enNeighboursGap_EE, v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE));
438  iEvent.put(pAnomalousECALVariables, "anomalousECALVariables");
439 
440  if (skimDead_ && (i_EBDead >= 1 || i_EEDead >= 1)) {
441  return true;
442  } else if (skimGap_ && (i_EBGap >= 1 || i_EEGap >= 1)) {
443  return true;
444  } else if (!skimDead_ && !skimGap_)
445  return true;
446  else {
447  return false;
448  }
449  }
450 
451  if (FilterAlgo_ == "FilterMode") {
452  std::auto_ptr<AnomalousECALVariables> pAnomalousECALVariables(new AnomalousECALVariables(v_enNeighboursGap_EB,
453  v_enNeighboursGap_EE, v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE));
454 
455  bool isGap = pAnomalousECALVariables->isGapEcalCluster(cutBoundEnergyGapEB, cutBoundEnergyGapEE);
456  bool isBoundary = pAnomalousECALVariables->isDeadEcalCluster(maxBoundaryEnergy_, limitDeadCellToChannelStatusEB_,
457  limitDeadCellToChannelStatusEE_);
458 
459  bool result = (!isBoundary && ((!isGap && enableGap_) || !enableGap_));
460  if (!result) {
461  }
462  return result;
463  }
464 */
465 
466 // return true;
467 }
EcalBoundaryInfoCalculator< EBDetId > ebBoundaryCalc
auto_ptr< ClusterSequence > cs
std::vector< BoundaryInformation > v_enNeighboursGap_EB
std::vector< BoundaryInformation > v_enNeighboursGap_EE
BoundaryInformation gapRecHits(const edm::Handle< EcalRecHitCollection > &, const EcalRecHit *, const edm::ESHandle< CaloTopology > theCaloTopology, const edm::ESHandle< EcalChannelStatus > ecalStatus, const edm::ESHandle< CaloGeometry > geometry)
bool checkRecHitHasDeadNeighbour(const EcalRecHit &hit, const edm::ESHandle< EcalChannelStatus > ecalStatus, std::vector< int > &stati)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
edm::EDGetTokenT< EcalRecHitCollection > EERecHitsToken_
BoundaryInformation boundaryRecHits(const edm::Handle< EcalRecHitCollection > &, const EcalRecHit *, const edm::ESHandle< CaloTopology > theCaloTopology, const edm::ESHandle< EcalChannelStatus > ecalStatus, const edm::ESHandle< CaloGeometry > geometry)
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EE
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
EcalBoundaryInfoCalculator< EEDetId > eeBoundaryCalc
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
std::vector< DetId > detIds
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EB
unsigned int id
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:56
std::vector< Item >::const_iterator const_iterator
bool checkRecHitHasInvalidNeighbour(const EcalRecHit &hit, const edm::ESHandle< EcalChannelStatus > ecalStatus)
T eta() const
Definition: PV3DBase.h:76
ESHandle< TrackerGeometry > geometry
edm::EDGetTokenT< EcalRecHitCollection > EBRecHitsToken_
tuple cout
Definition: gather_cfg.py:121
tuple status
Definition: ntuplemaker.py:245
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.

Member Data Documentation

const double EcalDeadCellBoundaryEnergyFilter::cutBoundEnergyDeadCellsEB
private

Definition at line 82 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

const double EcalDeadCellBoundaryEnergyFilter::cutBoundEnergyDeadCellsEE
private

Definition at line 82 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

const double EcalDeadCellBoundaryEnergyFilter::cutBoundEnergyGapEB
private

Definition at line 82 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

const double EcalDeadCellBoundaryEnergyFilter::cutBoundEnergyGapEE
private

Definition at line 82 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

const bool EcalDeadCellBoundaryEnergyFilter::debug_
private
EcalBoundaryInfoCalculator<EBDetId> EcalDeadCellBoundaryEnergyFilter::ebBoundaryCalc
private

Definition at line 94 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

edm::EDGetTokenT<EcalRecHitCollection> EcalDeadCellBoundaryEnergyFilter::EBRecHitsToken_
private

Definition at line 73 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

EcalBoundaryInfoCalculator<EEDetId> EcalDeadCellBoundaryEnergyFilter::eeBoundaryCalc
private

Definition at line 95 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

edm::EDGetTokenT<EcalRecHitCollection> EcalDeadCellBoundaryEnergyFilter::EERecHitsToken_
private

Definition at line 74 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

const bool EcalDeadCellBoundaryEnergyFilter::enableGap_
private

Definition at line 103 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

float* EcalDeadCellBoundaryEnergyFilter::enNeighboursGap_EB
private

Definition at line 85 of file EcalDeadCellBoundaryEnergyFilter.cc.

float* EcalDeadCellBoundaryEnergyFilter::enNeighboursGap_EE
private

Definition at line 86 of file EcalDeadCellBoundaryEnergyFilter.cc.

const std::string EcalDeadCellBoundaryEnergyFilter::FilterAlgo_
private

Definition at line 76 of file EcalDeadCellBoundaryEnergyFilter.cc.

int EcalDeadCellBoundaryEnergyFilter::i_EBDead
private

Definition at line 84 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

int EcalDeadCellBoundaryEnergyFilter::i_EBGap
private

Definition at line 84 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

int EcalDeadCellBoundaryEnergyFilter::i_EEDead
private

Definition at line 84 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

int EcalDeadCellBoundaryEnergyFilter::i_EEGap
private

Definition at line 84 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

const int EcalDeadCellBoundaryEnergyFilter::kMAX
private

Definition at line 71 of file EcalDeadCellBoundaryEnergyFilter.cc.

const std::vector<int> EcalDeadCellBoundaryEnergyFilter::limitDeadCellToChannelStatusEB_
private

Definition at line 100 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

const std::vector<int> EcalDeadCellBoundaryEnergyFilter::limitDeadCellToChannelStatusEE_
private

Definition at line 101 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

const bool EcalDeadCellBoundaryEnergyFilter::limitFilterToEB_
private

Definition at line 99 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

const bool EcalDeadCellBoundaryEnergyFilter::limitFilterToEE_
private

Definition at line 99 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

double EcalDeadCellBoundaryEnergyFilter::maxBoundaryEnergy_
private

Definition at line 97 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

const bool EcalDeadCellBoundaryEnergyFilter::skimDead_
private

Definition at line 80 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

const bool EcalDeadCellBoundaryEnergyFilter::skimGap_
private

Definition at line 79 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

const bool EcalDeadCellBoundaryEnergyFilter::taggingMode_
private

Definition at line 77 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by filter().

std::vector<BoundaryInformation> EcalDeadCellBoundaryEnergyFilter::v_boundaryInfoDeadCells_EB
private

Definition at line 91 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

std::vector<BoundaryInformation> EcalDeadCellBoundaryEnergyFilter::v_boundaryInfoDeadCells_EE
private

Definition at line 92 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

std::vector<BoundaryInformation> EcalDeadCellBoundaryEnergyFilter::v_enNeighboursGap_EB
private

Definition at line 88 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().

std::vector<BoundaryInformation> EcalDeadCellBoundaryEnergyFilter::v_enNeighboursGap_EE
private

Definition at line 89 of file EcalDeadCellBoundaryEnergyFilter.cc.

Referenced by EcalDeadCellBoundaryEnergyFilter(), and filter().