Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:47

0001 #ifndef L1Trigger_TrackFindingTMTT_ConverterToTTTrack_h
0002 #define L1Trigger_TrackFindingTMTT_ConverterToTTTrack_h
0003 
0004 #include "L1Trigger/TrackFindingTMTT/interface/Settings.h"
0005 #include "L1Trigger/TrackFindingTMTT/interface/L1track3D.h"
0006 #include "L1Trigger/TrackFindingTMTT/interface/L1fittedTrack.h"
0007 
0008 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0009 
0010 //=== Convert non-persistent L1 track collection to the official persistent CMSSW EDM TTTrack format.
0011 //=== Works for both L1track3D and for L1fittedTrk objects.
0012 
0013 namespace tmtt {
0014 
0015   typedef edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_> > TTStubDetSetVec;
0016   typedef edm::Ref<TTStubDetSetVec, TTStub<Ref_Phase2TrackerDigi_> > TTStubRef;
0017 
0018   class ConverterToTTTrack {
0019   public:
0020     // Initialize constants.
0021     ConverterToTTTrack(const Settings* settings) : settings_(settings), invPtToInvR_(settings->invPtToInvR()) {}
0022 
0023     // Convert L1fittedTrack or L1track3D (track candidates after/before fit) to TTTrack format.
0024     TTTrack<Ref_Phase2TrackerDigi_> makeTTTrack(const L1trackBase* trk,
0025                                                 unsigned int iPhiSec,
0026                                                 unsigned int iEtaReg) const;
0027 
0028   private:
0029     // Get references to stubs on track. (Works for either L1track3D or L1fittedTrack).
0030     std::vector<TTStubRef> stubRefs(const L1trackBase* trk) const;
0031 
0032   private:
0033     const Settings* settings_;  // Configuration parameters.
0034     float invPtToInvR_;         // converts 1/Pt to 1/radius_of_curvature
0035   };
0036 
0037 }  // namespace tmtt
0038 #endif