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 
19 public:
20 
22  static float swissCross( const DetId& id,
23  const EcalRecHitCollection & recHits,
24  float recHitThreshold ,
25  bool avoidIeta85=true);
26 
28 
32  static bool isNextToDead( const DetId& id, const edm::EventSetup& es);
33 
35 
41  static bool isNextToDeadFromNeighbours( const DetId& id,
42  const EcalChannelStatus& chs,
43  int chStatusThreshold) ;
44 
46  static bool isNextToBoundary (const DetId& id);
47 
49  static bool deadNeighbour(const DetId& id, const EcalChannelStatus& chs,
50  int chStatusThreshold,
51  int dx, int dy);
52 
54  static inline bool isHGCalDet(DetId::Detector thedet){
55  return (thedet == DetId::Forward || thedet == DetId::Hcal || thedet == DetId::HGCalEE || thedet == DetId::HGCalHSi || thedet == DetId::HGCalHSc);
56  }
57 
58 private:
59 
60  static float recHitE( const DetId id, const EcalRecHitCollection &recHits );
61  static float recHitE( const DetId id, const EcalRecHitCollection & recHits,
62  int dEta, int dPhi );
63  static float recHitApproxEt( const DetId id,
64  const EcalRecHitCollection &recHits );
65 
66 
67 
68 };
69 
70 
71 #endif // __EcalTools_h_
72 
73 // Configure (x)emacs for this file ...
74 // Local Variables:
75 // mode:c++
76 // compile-command: "scram b -k"
77 // 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:54
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:52
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:18
Detector
Definition: DetId.h:26
static float recHitE(const DetId id, const EcalRecHitCollection &recHits)
Definition: EcalTools.cc:132
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:88
static float recHitApproxEt(const DetId id, const EcalRecHitCollection &recHits)
Definition: EcalTools.cc:142