CMS 3D CMS Logo

GeometryTranslator.h
Go to the documentation of this file.
1 #ifndef __L1TMUON_GEOMETRYTRANSLATOR_H__
2 #define __L1TMUON_GEOMETRYTRANSLATOR_H__
3 //
4 // Class: L1TMuon::GeometryTranslator
5 //
6 // Info: This class implements a the translations from packed bits or
7 // digi information into local or global CMS coordinates for all
8 // types of L1 trigger primitives that we want to consider for
9 // use in the integrated muon trigger.
10 //
11 // Note: This should be considered as a base class to some sort of global
12 // look-up table
13 //
14 // Author: L. Gray (FNAL)
15 // Some pieces of code lifted from: Matt Carver & Bobby Scurlock (UF)
16 //
17 
20 #include <memory>
21 
22 
23 // forwards
24 namespace edm {
25  class EventSetup;
26 }
27 
28 class GEMGeometry;
29 class RPCGeometry;
30 class CSCGeometry;
31 class CSCLayer;
32 class DTGeometry;
33 class MagneticField;
34 
35 namespace L1TMuon {
36  class TriggerPrimitive;
37 
39  public:
42 
43  double calculateGlobalEta(const TriggerPrimitive&) const;
44  double calculateGlobalPhi(const TriggerPrimitive&) const;
45  double calculateBendAngle(const TriggerPrimitive&) const;
46 
47  GlobalPoint getGlobalPoint(const TriggerPrimitive&) const;
48 
49  void checkAndUpdateGeometry(const edm::EventSetup&);
50 
51  const GEMGeometry& getGEMGeometry() const { return *_geogem; }
52  const RPCGeometry& getRPCGeometry() const { return *_georpc; }
53  const CSCGeometry& getCSCGeometry() const { return *_geocsc; }
54  const DTGeometry& getDTGeometry() const { return *_geodt; }
55 
56  const MagneticField& getMagneticField() const { return *_magfield; }
57 
58  private:
59  // pointers to the current geometry records
60  unsigned long long _geom_cache_id;
65 
66  unsigned long long _magfield_cache_id;
68 
69  GlobalPoint getGEMSpecificPoint(const TriggerPrimitive&) const;
70  double calcGEMSpecificEta(const TriggerPrimitive&) const;
71  double calcGEMSpecificPhi(const TriggerPrimitive&) const;
72  double calcGEMSpecificBend(const TriggerPrimitive&) const;
73 
74  GlobalPoint getRPCSpecificPoint(const TriggerPrimitive&) const;
75  double calcRPCSpecificEta(const TriggerPrimitive&) const;
76  double calcRPCSpecificPhi(const TriggerPrimitive&) const;
77  double calcRPCSpecificBend(const TriggerPrimitive&) const;
78 
79  GlobalPoint getCSCSpecificPoint(const TriggerPrimitive&) const;
80  double calcCSCSpecificEta(const TriggerPrimitive&) const;
81  double calcCSCSpecificPhi(const TriggerPrimitive&) const;
82  double calcCSCSpecificBend(const TriggerPrimitive&) const;
83  bool isCSCCounterClockwise(const std::unique_ptr<const CSCLayer>&) const;
84 
85  GlobalPoint calcDTSpecificPoint(const TriggerPrimitive&) const;
86  double calcDTSpecificEta(const TriggerPrimitive&) const;
87  double calcDTSpecificPhi(const TriggerPrimitive&) const;
88  double calcDTSpecificBend(const TriggerPrimitive&) const;
89  };
90 }
91 
92 #endif
edm::ESHandle< DTGeometry > _geodt
const RPCGeometry & getRPCGeometry() const
unsigned long long _geom_cache_id
edm::ESHandle< RPCGeometry > _georpc
edm::ESHandle< GEMGeometry > _geogem
edm::ESHandle< MagneticField > _magfield
L1TMuon::GeometryTranslator GeometryTranslator
Definition: Common.h:28
const CSCGeometry & getCSCGeometry() const
edm::ESHandle< CSCGeometry > _geocsc
const GEMGeometry & getGEMGeometry() const
HLT enums.
const MagneticField & getMagneticField() const
unsigned long long _magfield_cache_id
const DTGeometry & getDTGeometry() const