119 , EBRecHitsLabel_ (iConfig.getParameter<edm::
InputTag> (
"recHitsEB"))
120 , EERecHitsLabel_ (iConfig.getParameter<edm::
InputTag> (
"recHitsEE"))
122 , FilterAlgo_ (iConfig.getUntrackedParameter<std::string> (
"FilterAlgo",
"TuningMode"))
123 , taggingMode_ (iConfig.getParameter<bool>(
"taggingMode"))
124 , skimGap_ (iConfig.getUntrackedParameter<bool> (
"skimGap",
false))
125 , skimDead_ (iConfig.getUntrackedParameter<bool> (
"skimDead",
false))
126 , cutBoundEnergyGapEE (iConfig.getUntrackedParameter<double> (
"cutBoundEnergyGapEE"))
127 , cutBoundEnergyGapEB (iConfig.getUntrackedParameter<double> (
"cutBoundEnergyGapEB"))
128 , cutBoundEnergyDeadCellsEB (iConfig.getUntrackedParameter<double> (
"cutBoundEnergyDeadCellsEB"))
129 , cutBoundEnergyDeadCellsEE (iConfig.getUntrackedParameter<double> (
"cutBoundEnergyDeadCellsEE"))
131 , limitFilterToEB_ (iConfig.getUntrackedParameter<bool> (
"limitFilterToEB",
false))
132 , limitFilterToEE_ (iConfig.getUntrackedParameter<bool> (
"limitFilterToEE",
false))
133 , limitDeadCellToChannelStatusEB_ (iConfig.getParameter<vector<int> > (
"limitDeadCellToChannelStatusEB"))
134 , limitDeadCellToChannelStatusEE_ (iConfig.getParameter<vector<int> > (
"limitDeadCellToChannelStatusEE"))
136 , enableGap_ (iConfig.getUntrackedParameter<bool> (
"enableGap",
false))
137 , debug_ (iConfig.getParameter<bool>(
"debug"))
160 if(
debug_ )
cout <<
"Constructor EcalAnomalousEvent" << endl;
164 produces<AnomalousECALVariables> (
"anomalousECALVariables");
206 vector<DetId> sameFlagDetIds;
213 cout <<
"process EB" << endl;
217 bool detIdAlreadyChecked =
false;
221 int status = (chit != ecalStatus->end()) ? chit->getStatusCode() & 0x1F : -1;
224 bool passChannelLimitation =
false;
227 vector<int> deadNeighbourStati;
233 for (vector<int>::iterator sit = deadNeighbourStati.begin(); sit != deadNeighbourStati.end(); ++sit) {
235 if (channelAllowed == *sit || (channelAllowed < 0 &&
abs(channelAllowed) <= *sit)) {
236 passChannelLimitation =
true;
242 for (vector<DetId>::iterator it = sameFlagDetIds.begin(); it != sameFlagDetIds.end(); it++) {
243 if (currDetId == *it)
244 detIdAlreadyChecked =
true;
258 for (vector<DetId>::iterator it = gapinfo.
detIds.begin(); it != gapinfo.
detIds.end(); it++) {
259 sameFlagDetIds.push_back(*it);
269 << gapinfo.
detIds.size() << endl;
275 && deadNeighbourStati.size() > 0))) {
284 for (vector<DetId>::iterator it = boundinfo.
detIds.begin(); it != boundinfo.
detIds.end(); it++) {
285 sameFlagDetIds.push_back(*it);
295 << boundinfo.
boundaryET <<
" deadCells: " << boundinfo.
detIds.size() << endl;
303 sameFlagDetIds.clear();
308 cout <<
"process EE" << endl;
312 bool detIdAlreadyChecked =
false;
316 int status = (chit != ecalStatus->end()) ? chit->getStatusCode() & 0x1F : -1;
319 bool passChannelLimitation =
false;
322 vector<int> deadNeighbourStati;
328 for (vector<int>::iterator sit = deadNeighbourStati.begin(); sit != deadNeighbourStati.end(); ++sit) {
330 if (channelAllowed == *sit || (channelAllowed < 0 &&
abs(channelAllowed) <= *sit)) {
331 passChannelLimitation =
true;
337 for (vector<DetId>::iterator it = sameFlagDetIds.begin(); it != sameFlagDetIds.end(); it++) {
338 if (currDetId == *it)
339 detIdAlreadyChecked =
true;
348 *
hit, ecalStatus) &&
abs(eta) < 1.6) {
357 for (vector<DetId>::iterator it = gapinfo.
detIds.begin(); it != gapinfo.
detIds.end(); it++) {
358 sameFlagDetIds.push_back(*it);
368 << gapinfo.
detIds.size() << endl;
374 && deadNeighbourStati.size() > 0))) {
383 for (vector<DetId>::iterator it = boundinfo.
detIds.begin(); it != boundinfo.
detIds.end(); it++) {
384 sameFlagDetIds.push_back(*it);
394 << boundinfo.
boundaryET <<
" deadCells: " << boundinfo.
detIds.size() << endl;
407 sameFlagDetIds.clear();
418 iEvent.
put(pAnomalousECALVariables,
"anomalousECALVariables");
420 iEvent.
put( std::auto_ptr<bool>(
new bool(pass)) );
EcalBoundaryInfoCalculator< EBDetId > ebBoundaryCalc
double maxBoundaryEnergy_
auto_ptr< ClusterSequence > cs
const double cutBoundEnergyDeadCellsEB
const double cutBoundEnergyDeadCellsEE
BoundaryInformation gapRecHits(const edm::Handle< EcalRecHitCollection > &, const EcalRecHit *, const edm::ESHandle< CaloTopology > theCaloTopology, const edm::ESHandle< EcalChannelStatus > ecalStatus, const edm::ESHandle< CaloGeometry > geometry)
vector< BoundaryInformation > v_enNeighboursGap_EB
BoundaryInformation boundaryRecHits(const edm::Handle< EcalRecHitCollection > &, const EcalRecHit *, const edm::ESHandle< CaloTopology > theCaloTopology, const edm::ESHandle< EcalChannelStatus > ecalStatus, const edm::ESHandle< CaloGeometry > geometry)
#define DEFINE_FWK_MODULE(type)
std::vector< EcalRecHit >::const_iterator const_iterator
vector< BoundaryInformation > v_enNeighboursGap_EE
const double cutBoundEnergyGapEE
vector< BoundaryInformation > v_boundaryInfoDeadCells_EB
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
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
const bool limitFilterToEB_
bool checkRecHitHasInvalidNeighbour(const EcalRecHit hit, const edm::ESHandle< EcalChannelStatus > ecalStatus)
const double cutBoundEnergyGapEB
EcalDeadCellBoundaryEnergyFilter(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
~EcalDeadCellBoundaryEnergyFilter()
bool checkRecHitHasDeadNeighbour(const EcalRecHit hit, const edm::ESHandle< EcalChannelStatus > ecalStatus, vector< int > &stati)
const vector< int > limitDeadCellToChannelStatusEE_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
vector< BoundaryInformation > v_boundaryInfoDeadCells_EE
const std::string FilterAlgo_
std::vector< Item >::const_iterator const_iterator
virtual bool filter(edm::Event &, const edm::EventSetup &)
float * enNeighboursGap_EE
ESHandle< TrackerGeometry > geometry
const edm::InputTag EBRecHitsLabel_
float * enNeighboursGap_EB
const vector< int > limitDeadCellToChannelStatusEB_
const edm::InputTag EERecHitsLabel_
const bool limitFilterToEE_