|
|
Go to the documentation of this file.
19 : minStatus_(
cfg.getParameter<uint32_t>(
"minStatus")),
20 dR2_(
std::
pow(
cfg.getParameter<double>(
"dR"), 2)),
21 extrapolateToECalEntrance_(
cfg.getParameter<
bool>(
"extrapolateToECalEntrance")),
22 verbosity_(
cfg.getParameter<
int>(
"verbosity")),
24 isFirstEvent_(
true) {}
35 void loopXtals(std::map<uint32_t, unsigned>& nBadCrystals,
36 std::map<uint32_t, unsigned>& maxStatus,
37 std::map<uint32_t, double>& sumEta,
38 std::map<uint32_t, double>& sumPhi,
43 const uint16_t statusMask) {
46 for (
int i = 0;
i < Id::kSizeForDenseIndexing; ++
i) {
47 Id
id = Id::unhashIndex(
i);
51 unsigned status = (it == channelStatus->
end()) ? 0 : (it->getStatusCode() & statusMask);
81 std::map<uint32_t, unsigned> nBadCrystals, maxStatus;
82 std::map<uint32_t, double> sumEta, sumPhi;
84 loopXtals<EBDetId>(nBadCrystals,
93 loopXtals<EEDetId>(nBadCrystals,
104 for (
auto it : nBadCrystals) {
105 uint32_t
key = it.first;
113 bool isNearBadTower =
false;
119 if (pfTau !=
nullptr) {
122 const pat::Tau* patTau = dynamic_cast<const pat::Tau*>(
tau);
123 if (patTau !=
nullptr) {
128 if (leadChargedHadron !=
nullptr) {
132 tau_eta = positionAtECalEntrance.eta();
133 tau_phi = positionAtECalEntrance.phi();
137 edm::LogPrint(
"TauAgainstEleDeadECAL") <<
"<AntiElectronDeadECal::operator()>:";
139 if (leadChargedHadron !=
nullptr) {
141 <<
" leadChargedHadron (" << leadChargedHadron->
pdgId() <<
"): Pt = " << leadChargedHadron->
pt()
142 <<
", eta at ECAL (vtx) = " <<
tau_eta <<
" (" << leadChargedHadron->
eta() <<
")"
143 <<
", phi at ECAL (vtx) = " <<
tau_phi <<
" (" << leadChargedHadron->
phi() <<
")";
146 <<
" tau: Pt = " <<
tau->pt() <<
", eta at vtx = " <<
tau_eta <<
", phi at vtx = " <<
tau_phi;
153 <<
" matches badTower: eta = " << badTower.eta_ <<
", phi = " << badTower.phi_;
155 isNearBadTower =
true;
159 return isNearBadTower;
const reco::CandidatePtr leadChargedHadrCand() const
const self & getMap() const
static const uint16_t statusMask_
bool check(const edm::EventSetup &iSetup)
T const * product() const
const_iterator end() const
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
virtual double eta() const =0
momentum pseudorapidity
Analysis-level tau class.
Log< level::Warning, true > LogPrint
virtual double pt() const =0
transverse momentum
T const * get() const
Returns C++ pointer to the item.
edm::ESWatcher< CaloGeometryRecord > caloGeometryWatcher_
void updateBadTowers(const edm::EventSetup &)
void beginEvent(const edm::EventSetup &)
bool operator()(const reco::Candidate *tau) const
edm::ESWatcher< IdealGeometryRecord > idealGeometryWatcher_
const_iterator find(uint32_t rawId) const
const CandidatePtr & leadChargedHadrCand() const
PositionAtECalEntranceComputer positionAtECalEntrance_
AntiElectronDeadECAL(const edm::ParameterSet &, edm::ConsumesCollector &&)
const unsigned minStatus_
virtual int pdgId() const =0
PDG identifier.
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
edm::ESWatcher< EcalChannelStatusRcd > channelStatusWatcher_
bool isNonnull() const
Checks for non-null.
Power< A, B >::type pow(const A &a, const B &b)
std::vector< Item >::const_iterator const_iterator
math::XYZPoint Point
point in the space
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
virtual double phi() const =0
momentum azimuthal angle
const bool extrapolateToECalEntrance_
std::vector< TowerInfo > badTowers_
void beginEvent(const edm::EventSetup &)