CMS 3D CMS Logo

EcalTools.h
Go to the documentation of this file.
1 
9 #ifndef __EcalTools_h_
10 #define __EcalTools_h_
11 
17 
18 class EcalTools {
19 public:
21  static float swissCross(const DetId& id,
23  float recHitThreshold,
24  bool avoidIeta85 = true);
25 
27 
31  static bool isNextToDead(const DetId& id, const EcalNextToDeadChannel& es);
32 
34 
40  static bool isNextToDeadFromNeighbours(const DetId& id, const EcalChannelStatus& chs, int chStatusThreshold);
41 
43  static bool isNextToBoundary(const DetId& id);
44 
46  static bool deadNeighbour(const DetId& id, const EcalChannelStatus& chs, int chStatusThreshold, int dx, int dy);
47 
49  static inline bool isHGCalDet(DetId::Detector thedet) {
50  return (thedet == DetId::Forward || thedet == DetId::Hcal || thedet == DetId::HGCalEE ||
51  thedet == DetId::HGCalHSi || thedet == DetId::HGCalHSc);
52  }
53 
54 private:
55  static float recHitE(const DetId id, const EcalRecHitCollection& recHits);
56  static float recHitE(const DetId id, const EcalRecHitCollection& recHits, int dEta, int dPhi);
57  static float recHitApproxEt(const DetId id, const EcalRecHitCollection& recHits);
58 };
59 
60 #endif // __EcalTools_h_
61 
62 // Configure (x)emacs for this file ...
63 // Local Variables:
64 // mode:c++
65 // compile-command: "scram b -k"
66 // 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:49
static bool isNextToDeadFromNeighbours(const DetId &id, const EcalChannelStatus &chs, int chStatusThreshold)
same as isNextToDead, but will use information from the neighbour
Definition: EcalTools.cc:66
static bool isNextToDead(const DetId &id, const EcalNextToDeadChannel &es)
true if the channel is near a dead one (in the 3x3)
Definition: EcalTools.cc:54
Definition: DetId.h:17
Detector
Definition: DetId.h:24
static float recHitE(const DetId id, const EcalRecHitCollection &recHits)
Definition: EcalTools.cc:123
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:9
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:87
static float recHitApproxEt(const DetId id, const EcalRecHitCollection &recHits)
Definition: EcalTools.cc:134