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