Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:57

0001 #ifndef RecoMuon_L2MuonSeedGenerator_L2MuonSeedGeneratorFromL1T_H
0002 #define RecoMuon_L2MuonSeedGenerator_L2MuonSeedGeneratorFromL1T_H
0003 
0004 //-------------------------------------------------
0005 //
0006 /**  \class L2MuonSeedGeneratorFromL1T
0007  * 
0008  *   L2 muon seed generator:
0009  *   Transform the L1 informations in seeds for the
0010  *   L2 muon reconstruction
0011  *
0012  *
0013  *
0014  *   \author  A.Everett, R.Bellan
0015  *
0016  *    ORCA's author: N. Neumeister 
0017  *
0018  *    Modified by M.Oh
0019  */
0020 //L2MuonSeedGeneratorFromL1T
0021 //--------------------------------------------------
0022 
0023 #include "FWCore/Framework/interface/stream/EDProducer.h"
0024 #include "FWCore/Utilities/interface/InputTag.h"
0025 
0026 // Data Formats
0027 #include "DataFormats/MuonSeed/interface/L2MuonTrajectorySeed.h"
0028 #include "DataFormats/MuonSeed/interface/L2MuonTrajectorySeedCollection.h"
0029 #include "DataFormats/TrajectoryState/interface/PTrajectoryStateOnDet.h"
0030 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0031 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
0032 #include "DataFormats/Common/interface/Handle.h"
0033 #include "DataFormats/GeometrySurface/interface/BoundCylinder.h"
0034 #include "DataFormats/Math/interface/deltaR.h"
0035 #include "DataFormats/L1Trigger/interface/Muon.h"
0036 
0037 #include "CLHEP/Vector/ThreeVector.h"
0038 
0039 #include "Geometry/CommonDetUnit/interface/GeomDetEnumerators.h"
0040 
0041 class MuonServiceProxy;
0042 class MeasurementEstimator;
0043 class TrajectorySeed;
0044 class TrajectoryStateOnSurface;
0045 
0046 namespace edm {
0047   class ParameterSet;
0048   class Event;
0049   class EventSetup;
0050 }  // namespace edm
0051 
0052 class L2MuonSeedGeneratorFromL1T : public edm::stream::EDProducer<> {
0053 public:
0054   /// Constructor
0055   explicit L2MuonSeedGeneratorFromL1T(const edm::ParameterSet &);
0056 
0057   /// Destructor
0058   ~L2MuonSeedGeneratorFromL1T() override;
0059 
0060   static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
0061   void produce(edm::Event &, const edm::EventSetup &) override;
0062 
0063 private:
0064   edm::InputTag theSource;
0065   edm::InputTag theL1GMTReadoutCollection;
0066   edm::InputTag theOfflineSeedLabel;
0067   std::string thePropagatorName;
0068 
0069   edm::EDGetTokenT<l1t::MuonBxCollection> muCollToken_;
0070   edm::EDGetTokenT<edm::View<TrajectorySeed> > offlineSeedToken_;
0071 
0072   const double theL1MinPt;
0073   const double theL1MaxEta;
0074   const unsigned theL1MinQuality;
0075   const double theMinPtBarrel;
0076   const double theMinPtEndcap;
0077   const bool useOfflineSeed;
0078   const bool useUnassociatedL1;
0079   std::vector<double> matchingDR;
0080   std::vector<double> etaBins;
0081 
0082   /// use central bx only muons
0083   bool centralBxOnly_;
0084   const unsigned matchType;
0085   const unsigned sortType;
0086 
0087   /// the event setup proxy, it takes care the services update
0088   MuonServiceProxy *theService;
0089 
0090   MeasurementEstimator *theEstimator;
0091 
0092   const TrajectorySeed *associateOfflineSeedToL1(edm::Handle<edm::View<TrajectorySeed> > &,
0093                                                  std::vector<int> &,
0094                                                  TrajectoryStateOnSurface &,
0095                                                  double);
0096 
0097   bool isAssociateOfflineSeedToL1(edm::Handle<edm::View<TrajectorySeed> > &,
0098                                   std::vector<std::vector<double> > &,
0099                                   TrajectoryStateOnSurface &,
0100                                   unsigned int,
0101                                   std::vector<std::vector<const TrajectorySeed *> > &,
0102                                   double);
0103 };
0104 
0105 #endif