File indexing completed on 2024-04-06 12:24:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef __EcalTools_h_
0010 #define __EcalTools_h_
0011
0012 #include "DataFormats/DetId/interface/DetId.h"
0013 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0014 #include "CondFormats/EcalObjects/interface/EcalChannelStatus.h"
0015 #include "RecoEcal/EgammaCoreTools/interface/EcalNextToDeadChannel.h"
0016 #include "FWCore/Framework/interface/Frameworkfwd.h"
0017
0018 class EcalTools {
0019 public:
0020
0021 static float swissCross(const DetId& id,
0022 const EcalRecHitCollection& recHits,
0023 float recHitThreshold,
0024 bool avoidIeta85 = true);
0025
0026
0027
0028
0029
0030
0031 static bool isNextToDead(const DetId& id, const EcalNextToDeadChannel& es);
0032
0033
0034
0035
0036
0037
0038
0039
0040 static bool isNextToDeadFromNeighbours(const DetId& id, const EcalChannelStatus& chs, int chStatusThreshold);
0041
0042
0043 static bool isNextToBoundary(const DetId& id);
0044
0045
0046 static bool deadNeighbour(const DetId& id, const EcalChannelStatus& chs, int chStatusThreshold, int dx, int dy);
0047
0048
0049 static inline bool isHGCalDet(DetId::Detector thedet) {
0050 return (thedet == DetId::Forward || thedet == DetId::Hcal || thedet == DetId::HGCalEE ||
0051 thedet == DetId::HGCalHSi || thedet == DetId::HGCalHSc);
0052 }
0053
0054 private:
0055 static float recHitE(const DetId id, const EcalRecHitCollection& recHits);
0056 static float recHitE(const DetId id, const EcalRecHitCollection& recHits, int dEta, int dPhi);
0057 static float recHitApproxEt(const DetId id, const EcalRecHitCollection& recHits);
0058 };
0059
0060 #endif
0061
0062
0063
0064
0065
0066