Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:12

0001 #ifndef __L1Trigger_VertexFinder_VertexProducer_h__
0002 #define __L1Trigger_VertexFinder_VertexProducer_h__
0003 
0004 #include "DataFormats/Common/interface/Ptr.h"
0005 #include "DataFormats/Common/interface/RefToPtr.h"
0006 #include "DataFormats/L1Trigger/interface/Vertex.h"
0007 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0008 #include "DataFormats/L1Trigger/interface/VertexWord.h"
0009 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0010 #include "FWCore/Framework/interface/global/EDProducer.h"
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/Framework/interface/EventSetup.h"
0013 #include "FWCore/Framework/interface/MakerMacros.h"
0014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0017 #include "L1Trigger/VertexFinder/interface/AlgoSettings.h"
0018 #include "L1Trigger/VertexFinder/interface/RecoVertex.h"
0019 #include "L1Trigger/VertexFinder/interface/VertexFinder.h"
0020 #include "PhysicsTools/TensorFlow/interface/TensorFlow.h"
0021 
0022 #include <iostream>
0023 #include <map>
0024 #include <set>
0025 #include <string>
0026 #include <vector>
0027 
0028 namespace l1tVertexFinder {
0029   class AlgoSettings;
0030 }
0031 
0032 class VertexProducer : public edm::global::EDProducer<> {
0033 public:
0034   explicit VertexProducer(const edm::ParameterSet&);
0035   ~VertexProducer() override {}
0036 
0037 private:
0038   typedef TTTrack<Ref_Phase2TrackerDigi_> TTTrackType;
0039   typedef std::vector<TTTrackType> TTTrackCollectionType;
0040   typedef edm::RefVector<TTTrackCollectionType> TTTrackRefCollectionType;
0041   typedef edm::View<TTTrackType> TTTrackCollectionView;
0042 
0043   void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0044 
0045 private:
0046   const edm::EDGetTokenT<TTTrackRefCollectionType> l1TracksToken_;
0047   const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken;
0048   const std::string outputCollectionName_;
0049 
0050   tensorflow::GraphDef* TrkWGraph_;
0051   tensorflow::Session* TrkWSesh_;
0052   tensorflow::GraphDef* PattRecGraph_;
0053   tensorflow::Session* PattRecSesh_;
0054 
0055   l1tVertexFinder::AlgoSettings settings_;
0056 };
0057 
0058 #endif