Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:00:49

0001 #ifndef FastSimulation_Muons_FastTSGFromL2Muon_H
0002 #define FastSimulation_Muons_FastTSGFromL2Muon_H
0003 
0004 #include "FWCore/Framework/interface/stream/EDProducer.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0007 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0008 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0009 
0010 #include <vector>
0011 namespace edm {
0012   class ParameterSet;
0013   class Event;
0014   class EventSetup;
0015 }  // namespace edm
0016 
0017 class MuonServiceProxy;
0018 class MuonTrackingRegionBuilder;
0019 class RectangularEtaPhiTrackingRegion;
0020 class SimTrack;
0021 
0022 //
0023 // generate seeds corresponding to L2 muons
0024 //
0025 
0026 class FastTSGFromL2Muon : public edm::stream::EDProducer<> {
0027 public:
0028   FastTSGFromL2Muon(const edm::ParameterSet& cfg);
0029   ~FastTSGFromL2Muon() override = default;
0030   void beginRun(edm::Run const& run, edm::EventSetup const& es) override;
0031   void produce(edm::Event& ev, const edm::EventSetup& es) override;
0032 
0033 private:
0034   bool clean(reco::TrackRef muRef,
0035              RectangularEtaPhiTrackingRegion* region,
0036              const BasicTrajectorySeed* aSeed,
0037              const SimTrack& theSimTrack);
0038 
0039 private:
0040   const double thePtCut;
0041   const edm::InputTag theL2CollectionLabel;
0042   const std::vector<edm::InputTag> theSeedCollectionLabels;
0043   const edm::InputTag theSimTrackCollectionLabel;
0044 
0045   const edm::EDGetTokenT<edm::SimTrackContainer> simTrackToken_;
0046   const edm::EDGetTokenT<reco::TrackCollection> l2TrackToken_;
0047   std::vector<edm::EDGetTokenT<edm::View<TrajectorySeed> > > seedToken_;
0048 
0049   MuonServiceProxy* theService;
0050   std::unique_ptr<MuonTrackingRegionBuilder> theRegionBuilder;
0051 };
0052 #endif