CMS 3D CMS Logo

HGCalTriggerTools.h
Go to the documentation of this file.
1 #ifndef __L1Trigger_L1THGCal_HGCalTriggerTools_h__
2 #define __L1Trigger_L1THGCal_HGCalTriggerTools_h__
3 
16 #include <array>
17 #include <cmath>
20 
22 class DetId;
23 
24 
25 namespace edm {
26  class Event;
27  class EventSetup;
28 }
29 
31  public:
33  eeLayers_(0), fhLayers_(0), bhLayers_(0), totalLayers_(0){}
35 
36  void eventSetup(const edm::EventSetup&);
37  GlobalPoint getTCPosition(const DetId& id) const;
38  unsigned layers(ForwardSubdetector type) const;
39  unsigned layer(const DetId&) const;
40  unsigned layerWithOffset(const DetId&) const;
41 
42  unsigned lastLayerEE() const {return eeLayers_;}
43  unsigned lastLayerFH() const {return eeLayers_+fhLayers_;}
44  unsigned lastLayerBH() const {return totalLayers_;}
45 
46  // 4-vector helper functions using GlobalPoint
47  float getEta(const GlobalPoint& position, const float& vertex_z = 0.) const;
48  float getPhi(const GlobalPoint& position) const;
49  float getPt(const GlobalPoint& position, const float& hitEnergy, const float& vertex_z = 0.) const;
50 
51  // 4-vector helper functions using DetId
52  float getTCEta(const DetId& id, const float& vertex_z = 0.) const;
53  float getTCPhi(const DetId& id) const;
54  float getTCPt(const DetId& id, const float& hitEnergy, const float& vertex_z = 0.) const;
55 
56  inline const HGCalTriggerGeometryBase * getTriggerGeometry() const {return geom_;};
57 
58  float getLayerZ(const unsigned& layerWithOffset) const;
59  float getLayerZ(const int& subdet, const unsigned& layer) const;
60 
61 
62 
63  private:
65  unsigned eeLayers_;
66  unsigned fhLayers_;
67  unsigned bhLayers_;
68  unsigned totalLayers_;
69 };
70 
71 
72 #endif
type
Definition: HCALResponse.h:21
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
unsigned lastLayerEE() const
const HGCalTriggerGeometryBase * geom_
static float getEta(float eta, int bits=5)
const HGCalTriggerGeometryBase * getTriggerGeometry() const
#define nullptr
ForwardSubdetector
unsigned lastLayerBH() const
Definition: DetId.h:18
HLT enums.
static int position[264][3]
Definition: ReadPGInfo.cc:509
unsigned lastLayerFH() const