Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-31 04:19:51

0001 #ifndef RecoMuon_TrackerSeedGenerator_SeedMvaEstimator_h
0002 #define RecoMuon_TrackerSeedGenerator_SeedMvaEstimator_h
0003 
0004 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0005 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0006 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0007 #include "DataFormats/TrajectoryState/interface/PTrajectoryStateOnDet.h"
0008 #include "DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h"
0009 
0010 #include "DataFormats/L1Trigger/interface/Muon.h"
0011 
0012 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
0013 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
0014 
0015 #include <memory>
0016 
0017 class GBRForest;
0018 
0019 namespace edm {
0020   class FileInPath;
0021 }
0022 
0023 namespace {
0024   enum inputIndexes {
0025     kTsosErr0,       // 0
0026     kTsosErr2,       // 1
0027     kTsosErr5,       // 2
0028     kTsosDxdz,       // 3
0029     kTsosDydz,       // 4
0030     kTsosQbp,        // 5
0031     kDRdRL1SeedP,    // 6
0032     kDPhidRL1SeedP,  // 7
0033     kLastL1,         // 8
0034 
0035     kDRdRL2SeedP = 8,  // 8
0036     kDPhidRL2SeedP,    // 9
0037     kLastL2,           // 10
0038   };
0039 }  // namespace
0040 
0041 class SeedMvaEstimator {
0042 public:
0043   SeedMvaEstimator(const edm::FileInPath& weightsfile,
0044                    const std::vector<double>& scale_mean,
0045                    const std::vector<double>& scale_std,
0046                    const bool isFromL1,
0047                    const int minL1Qual);
0048   ~SeedMvaEstimator();
0049 
0050   double computeMva(const TrajectorySeed&,
0051                     const GlobalVector&,
0052                     const l1t::MuonBxCollection&,
0053                     const reco::RecoChargedCandidateCollection&) const;
0054 
0055 private:
0056   std::unique_ptr<const GBRForest> gbrForest_;
0057   const std::vector<float> scale_mean_;
0058   std::vector<float> scale_istd_;
0059   const bool isFromL1_;
0060   const int minL1Qual_;
0061 
0062   void getL1MuonVariables(const GlobalVector&, const l1t::MuonBxCollection&, float&, float&) const;
0063   void getL2MuonVariables(const GlobalVector&, const reco::RecoChargedCandidateCollection&, float&, float&) const;
0064 };
0065 #endif