-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29739 from cms-tau-pog/CMSSW_10_6_X_tau-pog_deadECAL
Restructured code of againstElectronDeadECAL tauID (10_6_X)
- Loading branch information
Showing
15 changed files
with
1,044 additions
and
880 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#ifndef RecoTauTag_RecoTau_AntiElectronDeadECAL_h | ||
#define RecoTauTag_RecoTau_AntiElectronDeadECAL_h | ||
|
||
/** \class AntiElectronDeadECAL | ||
* | ||
* Flag tau candidates reconstructed near dead ECAL channels, | ||
* in order to reduce e -> tau fakes not rejected by anti-e MVA discriminator | ||
* | ||
* The motivation for this flag is this presentation: | ||
* https://indico.cern.ch/getFile.py/access?contribId=0&resId=0&materialId=slides&confId=177223 | ||
* | ||
* Code adapted from: | ||
* RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronDeadECAL.cc | ||
* | ||
* \authors Lauri Andreas Wendland, | ||
* Christian Veelken | ||
* | ||
* | ||
* | ||
*/ | ||
|
||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/Framework/interface/ESWatcher.h" | ||
#include "DataFormats/Candidate/interface/Candidate.h" | ||
#include "RecoTauTag/RecoTau/interface/PositionAtECalEntranceComputer.h" | ||
|
||
#include <vector> | ||
#include <string> | ||
|
||
class EcalChannelStatusRcd; | ||
class CaloGeometryRecord; | ||
class IdealGeometryRecord; | ||
|
||
class AntiElectronDeadECAL { | ||
public: | ||
explicit AntiElectronDeadECAL(const edm::ParameterSet&); | ||
~AntiElectronDeadECAL(); | ||
|
||
void beginEvent(const edm::EventSetup&); | ||
|
||
bool operator()(const reco::Candidate* tau) const; | ||
|
||
private: | ||
const unsigned minStatus_; | ||
const double dR2_; | ||
const bool extrapolateToECalEntrance_; | ||
const int verbosity_; | ||
|
||
PositionAtECalEntranceComputer positionAtECalEntrance_; | ||
|
||
void updateBadTowers(const edm::EventSetup&); | ||
|
||
struct TowerInfo { | ||
TowerInfo(uint32_t id, unsigned nBad, unsigned maxStatus, double eta, double phi) | ||
: id_(id), nBad_(nBad), maxStatus_(maxStatus), eta_(eta), phi_(phi) {} | ||
uint32_t id_; | ||
unsigned nBad_; | ||
unsigned maxStatus_; | ||
double eta_; | ||
double phi_; | ||
}; | ||
|
||
std::vector<TowerInfo> badTowers_; | ||
static const uint16_t statusMask_ = 0x1F; | ||
|
||
edm::ESWatcher<EcalChannelStatusRcd> channelStatusWatcher_; | ||
edm::ESWatcher<CaloGeometryRecord> caloGeometryWatcher_; | ||
edm::ESWatcher<IdealGeometryRecord> idealGeometryWatcher_; | ||
|
||
bool isFirstEvent_; | ||
}; | ||
|
||
#endif // RecoTauTag_RecoTau_AntiElectronDeadECAL_h |
Oops, something went wrong.