Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-07 22:33:27

0001 // Globals: holds "global" variables such as the IMATH_TrackletCalculators
0002 #ifndef L1Trigger_TrackFindingTracklet_interface_Globals_h
0003 #define L1Trigger_TrackFindingTracklet_interface_Globals_h
0004 
0005 #include <memory>
0006 #include <map>
0007 #include <string>
0008 #include <vector>
0009 #include <array>
0010 #include <fstream>
0011 #include <unordered_map>
0012 
0013 #ifdef USEHYBRID
0014 #include "L1Trigger/TrackFindingTMTT/interface/KFParamsComb.h"
0015 #include "L1Trigger/TrackFindingTMTT/interface/Settings.h"
0016 #endif
0017 
0018 namespace trklet {
0019 
0020   class TrackDerTable;
0021   class SLHCEvent;
0022   class HistBase;
0023   class Settings;
0024   class TrackletLUT;
0025   struct imathGlobals;
0026   class IMATH_TrackletCalculator;
0027   class IMATH_TrackletCalculatorDisk;
0028   class IMATH_TrackletCalculatorOverlap;
0029 
0030   class Globals {
0031   public:
0032     Globals(Settings const& settings);
0033 
0034     ~Globals();
0035 
0036     SLHCEvent*& event() { return theEvent_; }
0037 
0038     HistBase*& histograms() { return theHistBase_; }
0039 
0040     TrackDerTable*& trackDerTable() { return trackDerTable_; }
0041 
0042     TrackletLUT*& phiCorr(unsigned int layer) { return thePhiCorr_[layer]; }
0043 
0044     std::map<std::string, std::vector<int> >& ILindex() { return ILindex_; }
0045 
0046     std::map<std::string, int>& layerdiskmap() { return layerdiskmap_; }
0047 
0048     IMATH_TrackletCalculator* ITC_L1L2() { return ITC_L1L2_.get(); }
0049     IMATH_TrackletCalculator* ITC_L2L3() { return ITC_L2L3_.get(); }
0050     IMATH_TrackletCalculator* ITC_L3L4() { return ITC_L3L4_.get(); }
0051     IMATH_TrackletCalculator* ITC_L5L6() { return ITC_L5L6_.get(); }
0052 
0053     IMATH_TrackletCalculatorDisk* ITC_F1F2() { return ITC_F1F2_.get(); }
0054     IMATH_TrackletCalculatorDisk* ITC_F3F4() { return ITC_F3F4_.get(); }
0055     IMATH_TrackletCalculatorDisk* ITC_B1B2() { return ITC_B1B2_.get(); }
0056     IMATH_TrackletCalculatorDisk* ITC_B3B4() { return ITC_B3B4_.get(); }
0057 
0058     IMATH_TrackletCalculatorOverlap* ITC_L1F1() { return ITC_L1F1_.get(); }
0059     IMATH_TrackletCalculatorOverlap* ITC_L1B1() { return ITC_L1B1_.get(); }
0060     IMATH_TrackletCalculatorOverlap* ITC_L2F1() { return ITC_L2F1_.get(); }
0061     IMATH_TrackletCalculatorOverlap* ITC_L2B1() { return ITC_L2B1_.get(); }
0062 
0063     std::ofstream& ofstream(std::string fname);
0064 
0065 #ifdef USEHYBRID
0066     std::unique_ptr<tmtt::Settings>& tmttSettings() { return tmttSettings_; }
0067     std::unique_ptr<tmtt::KFParamsComb>& tmttKFParamsComb() { return tmttKFParamsComb_; }
0068 #endif
0069 
0070   private:
0071     std::unordered_map<std::string, std::ofstream*> ofstreams_;
0072 
0073     std::unique_ptr<imathGlobals> imathGlobals_;
0074 
0075     // tracklet calculators
0076     std::unique_ptr<IMATH_TrackletCalculator> ITC_L1L2_;
0077     std::unique_ptr<IMATH_TrackletCalculator> ITC_L2L3_;
0078     std::unique_ptr<IMATH_TrackletCalculator> ITC_L3L4_;
0079     std::unique_ptr<IMATH_TrackletCalculator> ITC_L5L6_;
0080 
0081     std::unique_ptr<IMATH_TrackletCalculatorDisk> ITC_F1F2_;
0082     std::unique_ptr<IMATH_TrackletCalculatorDisk> ITC_F3F4_;
0083     std::unique_ptr<IMATH_TrackletCalculatorDisk> ITC_B1B2_;
0084     std::unique_ptr<IMATH_TrackletCalculatorDisk> ITC_B3B4_;
0085 
0086     std::unique_ptr<IMATH_TrackletCalculatorOverlap> ITC_L1F1_;
0087     std::unique_ptr<IMATH_TrackletCalculatorOverlap> ITC_L2F1_;
0088     std::unique_ptr<IMATH_TrackletCalculatorOverlap> ITC_L1B1_;
0089     std::unique_ptr<IMATH_TrackletCalculatorOverlap> ITC_L2B1_;
0090 
0091     SLHCEvent* theEvent_{nullptr};
0092 
0093     HistBase* theHistBase_{nullptr};
0094 
0095     TrackDerTable* trackDerTable_{nullptr};
0096 
0097 #ifdef USEHYBRID
0098     std::unique_ptr<tmtt::Settings> tmttSettings_;
0099     std::unique_ptr<tmtt::KFParamsComb> tmttKFParamsComb_;
0100 #endif
0101 
0102     std::array<TrackletLUT*, 6> thePhiCorr_{{nullptr, nullptr, nullptr, nullptr, nullptr, nullptr}};
0103 
0104     std::map<std::string, std::vector<int> > ILindex_;
0105 
0106     std::map<std::string, int> layerdiskmap_;
0107   };
0108 };  // namespace trklet
0109 
0110 #endif