CMS 3D CMS Logo

Globals.h
Go to the documentation of this file.
1 // Globals: holds "global" variables such as the IMATH_TrackletCalculators
2 #ifndef L1Trigger_TrackFindingTracklet_interface_Globals_h
3 #define L1Trigger_TrackFindingTracklet_interface_Globals_h
4 
5 #include <memory>
6 #include <map>
7 #include <string>
8 #include <vector>
9 #include <array>
10 #include <fstream>
11 #include <unordered_map>
12 
13 #ifdef USEHYBRID
16 #endif
17 
18 namespace trklet {
19 
20  class TETableBase;
21  class TrackDerTable;
22  class ProjectionRouterBendTable;
23  class SLHCEvent;
24  class HistBase;
25  class Settings;
26  class VMRouterPhiCorrTable;
27  struct imathGlobals;
28  class IMATH_TrackletCalculator;
29  class IMATH_TrackletCalculatorDisk;
30  class IMATH_TrackletCalculatorOverlap;
31 
32  class Globals {
33  public:
34  Globals(Settings const& settings);
35 
36  ~Globals();
37 
38  SLHCEvent*& event() { return theEvent_; }
39 
41 
43 
44  VMRouterPhiCorrTable*& phiCorr(unsigned int layer) { return thePhiCorr_[layer]; }
45 
47 
48  std::map<std::string, std::vector<int> >& ILindex() { return ILindex_; }
49 
50  std::map<std::string, int>& layerdiskmap() { return layerdiskmap_; }
51 
56 
61 
66 
67  std::ofstream& ofstream(std::string fname);
68 
69 #ifdef USEHYBRID
70  std::unique_ptr<tmtt::Settings>& tmttSettings() { return tmttSettings_; }
71  std::unique_ptr<tmtt::KFParamsComb>& tmttKFParamsComb() { return tmttKFParamsComb_; }
72 #endif
73 
74  private:
75  std::unordered_map<std::string, std::ofstream*> ofstreams_;
76 
77  std::unique_ptr<imathGlobals> imathGlobals_;
78 
79  // tracklet calculators
80  std::unique_ptr<IMATH_TrackletCalculator> ITC_L1L2_;
81  std::unique_ptr<IMATH_TrackletCalculator> ITC_L2L3_;
82  std::unique_ptr<IMATH_TrackletCalculator> ITC_L3L4_;
83  std::unique_ptr<IMATH_TrackletCalculator> ITC_L5L6_;
84 
85  std::unique_ptr<IMATH_TrackletCalculatorDisk> ITC_F1F2_;
86  std::unique_ptr<IMATH_TrackletCalculatorDisk> ITC_F3F4_;
87  std::unique_ptr<IMATH_TrackletCalculatorDisk> ITC_B1B2_;
88  std::unique_ptr<IMATH_TrackletCalculatorDisk> ITC_B3B4_;
89 
90  std::unique_ptr<IMATH_TrackletCalculatorOverlap> ITC_L1F1_;
91  std::unique_ptr<IMATH_TrackletCalculatorOverlap> ITC_L2F1_;
92  std::unique_ptr<IMATH_TrackletCalculatorOverlap> ITC_L1B1_;
93  std::unique_ptr<IMATH_TrackletCalculatorOverlap> ITC_L2B1_;
94 
95  SLHCEvent* theEvent_{nullptr};
96 
98 
100 
102 
103 #ifdef USEHYBRID
104  std::unique_ptr<tmtt::Settings> tmttSettings_;
105  std::unique_ptr<tmtt::KFParamsComb> tmttKFParamsComb_;
106 #endif
107 
108  std::array<VMRouterPhiCorrTable*, 6> thePhiCorr_{{nullptr, nullptr, nullptr, nullptr, nullptr, nullptr}};
109 
110  std::map<std::string, std::vector<int> > ILindex_;
111 
112  std::map<std::string, int> layerdiskmap_;
113  };
114 }; // namespace trklet
115 
116 #endif
trklet::Globals::layerdiskmap_
std::map< std::string, int > layerdiskmap_
Definition: Globals.h:112
trklet::Globals::phiCorr
VMRouterPhiCorrTable *& phiCorr(unsigned int layer)
Definition: Globals.h:44
trklet::Globals::Globals
Globals(Settings const &settings)
Definition: Globals.cc:14
trklet::Globals::ITC_L2L3
IMATH_TrackletCalculator * ITC_L2L3()
Definition: Globals.h:53
trklet::Globals::ITC_L1B1_
std::unique_ptr< IMATH_TrackletCalculatorOverlap > ITC_L1B1_
Definition: Globals.h:92
trklet::Globals::ITC_B3B4_
std::unique_ptr< IMATH_TrackletCalculatorDisk > ITC_B3B4_
Definition: Globals.h:88
trklet::Globals::ITC_L2B1_
std::unique_ptr< IMATH_TrackletCalculatorOverlap > ITC_L2B1_
Definition: Globals.h:93
trklet::Globals::ILindex
std::map< std::string, std::vector< int > > & ILindex()
Definition: Globals.h:48
trklet::Globals::ITC_F1F2_
std::unique_ptr< IMATH_TrackletCalculatorDisk > ITC_F1F2_
Definition: Globals.h:85
trklet::Globals::ITC_L2L3_
std::unique_ptr< IMATH_TrackletCalculator > ITC_L2L3_
Definition: Globals.h:81
trklet::Settings
Definition: Settings.h:31
trklet::Globals::ITC_L1F1_
std::unique_ptr< IMATH_TrackletCalculatorOverlap > ITC_L1F1_
Definition: Globals.h:90
trklet::TrackDerTable
Definition: TrackDerTable.h:18
trklet::Globals::ITC_L3L4_
std::unique_ptr< IMATH_TrackletCalculator > ITC_L3L4_
Definition: Globals.h:82
trklet::IMATH_TrackletCalculatorDisk
Definition: IMATH_TrackletCalculatorDisk.h:19
trklet::Globals::ITC_B1B2
IMATH_TrackletCalculatorDisk * ITC_B1B2()
Definition: Globals.h:59
trklet::Globals
Definition: Globals.h:32
trklet::Globals::trackDerTable_
TrackDerTable * trackDerTable_
Definition: Globals.h:99
trklet::HistBase
Definition: HistBase.h:16
trklet::Globals::ITC_L1F1
IMATH_TrackletCalculatorOverlap * ITC_L1F1()
Definition: Globals.h:62
trklet::Globals::ITC_L2B1
IMATH_TrackletCalculatorOverlap * ITC_L2B1()
Definition: Globals.h:65
trklet::Globals::ITC_B1B2_
std::unique_ptr< IMATH_TrackletCalculatorDisk > ITC_B1B2_
Definition: Globals.h:87
trklet::IMATH_TrackletCalculatorOverlap
Definition: IMATH_TrackletCalculatorOverlap.h:19
trklet::Globals::ILindex_
std::map< std::string, std::vector< int > > ILindex_
Definition: Globals.h:110
trklet::Globals::ITC_F3F4
IMATH_TrackletCalculatorDisk * ITC_F3F4()
Definition: Globals.h:58
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
trklet::Globals::imathGlobals_
std::unique_ptr< imathGlobals > imathGlobals_
Definition: Globals.h:77
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::Globals::theHistBase_
HistBase * theHistBase_
Definition: Globals.h:97
trklet::Globals::ITC_L2F1_
std::unique_ptr< IMATH_TrackletCalculatorOverlap > ITC_L2F1_
Definition: Globals.h:91
trklet::Globals::ITC_L5L6_
std::unique_ptr< IMATH_TrackletCalculator > ITC_L5L6_
Definition: Globals.h:83
trklet::Globals::ITC_L1L2
IMATH_TrackletCalculator * ITC_L1L2()
Definition: Globals.h:52
trklet::Globals::ITC_F3F4_
std::unique_ptr< IMATH_TrackletCalculatorDisk > ITC_F3F4_
Definition: Globals.h:86
trklet::SLHCEvent
Definition: SLHCEvent.h:54
trklet::Globals::ITC_F1F2
IMATH_TrackletCalculatorDisk * ITC_F1F2()
Definition: Globals.h:57
trklet
Definition: AllProjectionsMemory.h:9
trklet::Globals::ITC_L5L6
IMATH_TrackletCalculator * ITC_L5L6()
Definition: Globals.h:55
trklet::Globals::ITC_B3B4
IMATH_TrackletCalculatorDisk * ITC_B3B4()
Definition: Globals.h:60
trklet::Globals::projectionRouterBendTable
ProjectionRouterBendTable *& projectionRouterBendTable()
Definition: Globals.h:46
alignmentValidation.fname
string fname
main script
Definition: alignmentValidation.py:959
trklet::Globals::ofstreams_
std::unordered_map< std::string, std::ofstream * > ofstreams_
Definition: Globals.h:75
trklet::Globals::thePhiCorr_
std::array< VMRouterPhiCorrTable *, 6 > thePhiCorr_
Definition: Globals.h:108
trklet::Globals::layerdiskmap
std::map< std::string, int > & layerdiskmap()
Definition: Globals.h:50
trklet::Globals::ITC_L1B1
IMATH_TrackletCalculatorOverlap * ITC_L1B1()
Definition: Globals.h:63
trklet::Globals::ofstream
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
Settings.h
trklet::Globals::event
SLHCEvent *& event()
Definition: Globals.h:38
trklet::Globals::trackDerTable
TrackDerTable *& trackDerTable()
Definition: Globals.h:42
trklet::Globals::~Globals
~Globals()
Definition: Globals.cc:37
trklet::Globals::ITC_L3L4
IMATH_TrackletCalculator * ITC_L3L4()
Definition: Globals.h:54
trklet::IMATH_TrackletCalculator
Definition: IMATH_TrackletCalculator.h:20
trklet::VMRouterPhiCorrTable
Definition: VMRouterPhiCorrTable.h:16
trklet::Globals::ITC_L2F1
IMATH_TrackletCalculatorOverlap * ITC_L2F1()
Definition: Globals.h:64
trklet::Globals::theEvent_
SLHCEvent * theEvent_
Definition: Globals.h:95
KFParamsComb.h
trklet::Globals::histograms
HistBase *& histograms()
Definition: Globals.h:40
trklet::Globals::ITC_L1L2_
std::unique_ptr< IMATH_TrackletCalculator > ITC_L1L2_
Definition: Globals.h:80
trklet::Globals::projectionRouterBendTable_
ProjectionRouterBendTable * projectionRouterBendTable_
Definition: Globals.h:101
trklet::ProjectionRouterBendTable
Definition: ProjectionRouterBendTable.h:16