CMS 3D CMS Logo

EcalTools.h
Go to the documentation of this file.
1 
9 #ifndef __EcalTools_h_
10 #define __EcalTools_h_
11 
16 
17 class EcalTools {
18 public:
20  static float swissCross(const DetId& id,
22  float recHitThreshold,
23  bool avoidIeta85 = true);
24 
26 
30  static bool isNextToDead(const DetId& id, const edm::EventSetup& es);
31 
33 
39  static bool isNextToDeadFromNeighbours(const DetId& id, const EcalChannelStatus& chs, int chStatusThreshold);
40 
42  static bool isNextToBoundary(const DetId& id);
43 
45  static bool deadNeighbour(const DetId& id, const EcalChannelStatus& chs, int chStatusThreshold, int dx, int dy);
46 
48  static inline bool isHGCalDet(DetId::Detector thedet) {
49  return (thedet == DetId::Forward || thedet == DetId::Hcal || thedet == DetId::HGCalEE ||
50  thedet == DetId::HGCalHSi || thedet == DetId::HGCalHSc);
51  }
52 
53 private:
54  static float recHitE(const DetId id, const EcalRecHitCollection& recHits);
55  static float recHitE(const DetId id, const EcalRecHitCollection& recHits, int dEta, int dPhi);
56  static float recHitApproxEt(const DetId id, const EcalRecHitCollection& recHits);
57 };
58 
59 #endif // __EcalTools_h_
60 
61 // Configure (x)emacs for this file ...
62 // Local Variables:
63 // mode:c++
64 // compile-command: "scram b -k"
65 // End:
static bool isNextToBoundary(const DetId &id)
true if near a crack or ecal border
static bool isHGCalDet(DetId::Detector thedet)
identify HGCal cells
Definition: EcalTools.h:48
static bool isNextToDead(const DetId &id, const edm::EventSetup &es)
true if the channel is near a dead one (in the 3x3)
Definition: EcalTools.cc:56
static bool isNextToDeadFromNeighbours(const DetId &id, const EcalChannelStatus &chs, int chStatusThreshold)
same as isNextToDead, but will use information from the neighbour
Definition: EcalTools.cc:71
Definition: DetId.h:17
Detector
Definition: DetId.h:24
static float recHitE(const DetId id, const EcalRecHitCollection &recHits)
Definition: EcalTools.cc:128
static float swissCross(const DetId &id, const EcalRecHitCollection &recHits, float recHitThreshold, bool avoidIeta85=true)
the good old 1-e4/e1. Ignore hits below recHitThreshold
Definition: EcalTools.cc:11
static bool deadNeighbour(const DetId &id, const EcalChannelStatus &chs, int chStatusThreshold, int dx, int dy)
return true if the channel at offsets dx,dy is dead
Definition: EcalTools.cc:92
static float recHitApproxEt(const DetId id, const EcalRecHitCollection &recHits)
Definition: EcalTools.cc:139