Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:15

0001 #ifndef RecoMuon_TrackerSeedGenerator_SeedMvaEstimatorPhase2_h
0002 #define RecoMuon_TrackerSeedGenerator_SeedMvaEstimatorPhase2_h
0003 
0004 #include "FWCore/Framework/interface/ConsumesCollector.h"
0005 #include "FWCore/Framework/interface/ESHandle.h"
0006 #include "FWCore/Framework/interface/EventSetup.h"
0007 #include "FWCore/Utilities/interface/ESGetToken.h"
0008 #include "FWCore/Utilities/interface/ESInputTag.h"
0009 #include "DataFormats/Common/interface/Handle.h"
0010 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0011 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0012 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0013 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0014 #include "DataFormats/TrajectoryState/interface/PTrajectoryStateOnDet.h"
0015 #include "DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h"
0016 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
0017 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
0018 #include "DataFormats/L1TCorrelator/interface/TkMuon.h"
0019 #include "DataFormats/L1TCorrelator/interface/TkMuonFwd.h"
0020 #include "DataFormats/L1TMuonPhase2/interface/TrackerMuon.h"
0021 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0022 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0023 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0024 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
0025 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTrackerBuilder.h"
0026 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
0027 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0028 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0029 
0030 #include <memory>
0031 #include <string>
0032 
0033 typedef pair<const DetLayer*, TrajectoryStateOnSurface> LayerTSOS;
0034 typedef pair<const DetLayer*, const TrackingRecHit*> LayerHit;
0035 
0036 class GBRForest;
0037 
0038 namespace edm {
0039   class FileInPath;
0040 }
0041 
0042 class SeedMvaEstimatorPhase2 {
0043 public:
0044   SeedMvaEstimatorPhase2(const edm::FileInPath& weightsfile,
0045                          const std::vector<double>& scale_mean,
0046                          const std::vector<double>& scale_std);
0047   ~SeedMvaEstimatorPhase2();
0048 
0049   double computeMva(const TrajectorySeed&,
0050                     const GlobalVector&,
0051                     const GlobalPoint&,
0052                     const edm::Handle<l1t::TrackerMuonCollection>&,
0053                     const edm::ESHandle<MagneticField>&,
0054                     const Propagator&,
0055                     const GeometricSearchTracker&) const;
0056 
0057 private:
0058   std::unique_ptr<const GBRForest> gbrForest_;
0059   const std::vector<double> scale_mean_;
0060   const std::vector<double> scale_std_;
0061 
0062   vector<LayerTSOS> getTsosOnPixels(const TTTrack<Ref_Phase2TrackerDigi_>&,
0063                                     const edm::ESHandle<MagneticField>&,
0064                                     const Propagator&,
0065                                     const GeometricSearchTracker&) const;
0066 
0067   vector<pair<LayerHit, LayerTSOS> > getHitTsosPairs(const TrajectorySeed&,
0068                                                      const edm::Handle<l1t::TrackerMuonCollection>&,
0069                                                      const edm::ESHandle<MagneticField>&,
0070                                                      const Propagator&,
0071                                                      const GeometricSearchTracker&) const;
0072 
0073   void getL1TTVariables(const TrajectorySeed&,
0074                         const GlobalVector&,
0075                         const GlobalPoint&,
0076                         const edm::Handle<l1t::TrackerMuonCollection>&,
0077                         float&,
0078                         float&) const;
0079   void getHitL1TkVariables(const TrajectorySeed&,
0080                            const edm::Handle<l1t::TrackerMuonCollection>&,
0081                            const edm::ESHandle<MagneticField>&,
0082                            const Propagator&,
0083                            const GeometricSearchTracker&,
0084                            float&,
0085                            float&,
0086                            float&) const;
0087 };
0088 #endif