-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Phase2 MuonHLTSeed MVA Classifier CMSSW_13_3_X #42745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cmsbuild
merged 1 commit into
cms-sw:master
from
swkim95:MuonHLTSeedMVA_Phase2_1330pre2
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...figuration/python/HLT_75e33/modules/hltIter2Phase2L3FromL1TkMuonPixelSeedsFiltered_cfi.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| hltIter2Phase2L3FromL1TkMuonPixelSeedsFiltered = cms.EDProducer("MuonHLTSeedMVAClassifierPhase2", | ||
| src = cms.InputTag("hltIter2Phase2L3FromL1TkMuonPixelSeeds"), | ||
| L1TkMu = cms.InputTag("l1tTkMuonsGmt"), | ||
| mvaFile_B_0 = cms.FileInPath("RecoMuon/TrackerSeedGenerator/data/xgb_Phase2_Iter2FromL1_barrel_v0.xml"), | ||
| mvaFile_E_0 = cms.FileInPath("RecoMuon/TrackerSeedGenerator/data/xgb_Phase2_Iter2FromL1_endcap_v0.xml"), | ||
| mvaScaleMean_B = cms.vdouble(0.00033113700731766336, 1.6825601468762878e-06, 1.790932122524803e-06, 0.010534608406382916, 0.005969459957330139, 0.0009605022254971113, 0.04384189672781466, 7.846741237608237e-05, 0.40725050850004824, 0.41125151617410227, 0.39815551065544846), | ||
| mvaScaleStd_B = cms.vdouble(0.0006042948363798624, 2.445644111872427e-06, 3.454992543447134e-06, 0.09401581628887255, 0.7978806947573766, 0.4932933044535928, 0.04180518265631776, 0.058296511682094855, 0.4071857009373577, 0.41337782307392973, 0.4101160349549534), | ||
| mvaScaleMean_E = cms.vdouble(0.00022658482374555603, 5.358921973784045e-07, 1.010003713549798e-06, 0.0007886873612224615, 0.001197730548842408, -0.0030252353426003594, 0.07151944804171254, -0.0006940626775109026, 0.20535152195939896, 0.2966816533783824, 0.28798220230180455), | ||
| mvaScaleStd_E = cms.vdouble(0.0003857726789049956, 1.4853721474087994e-06, 6.982997036736564e-06, 0.04071340757666084, 0.5897606560095399, 0.33052121398064654, 0.05589386786541949, 0.08806273533388546, 0.3254586902665612, 0.3293354496231377, 0.3179899794578072), | ||
| doSort = cms.bool(True), | ||
| nSeedsMax_B = cms.int32(20), | ||
| nSeedsMax_E = cms.int32(20), | ||
| etaEdge = cms.double(1.2), | ||
| mvaCut_B = cms.double(0.), | ||
| mvaCut_E = cms.double(0.), | ||
| baseScore = cms.double(0.5) | ||
| ) | ||
rappoccio marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,60 @@ | ||
| <use name="CommonTools/MVAUtils"/> | ||
| <use name="CommonTools/Utils"/> | ||
| <use name="CommonTools/UtilAlgos"/> | ||
| <use name="DataFormats/BeamSpot"/> | ||
| <use name="DataFormats/Common"/> | ||
| <use name="DataFormats/GeometryCommonDetAlgo"/> | ||
| <use name="DataFormats/GeometryVector"/> | ||
| <use name="DataFormats/L1Trigger"/> | ||
| <use name="DataFormats/L1GlobalMuonTrigger"/> | ||
| <use name="DataFormats/MuonReco"/> | ||
| <use name="DataFormats/TrackReco"/> | ||
| <use name="DataFormats/TrackerRecHit2D"/> | ||
| <use name="DataFormats/TrackingRecHit"/> | ||
| <use name="DataFormats/TrajectorySeed"/> | ||
| <use name="DataFormats/TrajectoryState"/> | ||
| <use name="DataFormats/TrackerCommon"/> | ||
| <use name="DataFormats/RecoCandidate"/> | ||
| <use name="DataFormats/SiPixelDetId"/> | ||
| <use name="DataFormats/Phase2TrackerDigi"/> | ||
| <use name="DataFormats/L1TrackTrigger"/> | ||
| <use name="DataFormats/L1TCorrelator"/> | ||
| <use name="DataFormats/L1TMuonPhase2"/> | ||
| <use name="FWCore/Framework"/> | ||
| <use name="FWCore/Utilities"/> | ||
| <use name="FWCore/MessageLogger"/> | ||
| <use name="FWCore/ParameterSet"/> | ||
| <use name="FWCore/PluginManager"/> | ||
| <use name="Geometry/Records"/> | ||
| <use name="Geometry/TrackerGeometryBuilder"/> | ||
| <use name="Geometry/TrackerNumberingBuilder"/> | ||
| <use name="Geometry/CommonDetUnit"/> | ||
| <use name="Geometry/CommonTopologies"/> | ||
| <use name="MagneticField/Engine"/> | ||
| <use name="MagneticField/Records"/> | ||
| <use name="RecoMuon/DetLayers"/> | ||
| <use name="RecoMuon/TrackingTools"/> | ||
| <use name="RecoMuon/Records"/> | ||
| <use name="RecoTracker/PixelTrackFitting"/> | ||
| <use name="RecoTracker/TkMSParametrization"/> | ||
| <use name="RecoTracker/TkDetLayers"/> | ||
| <use name="RecoTracker/TkSeedingLayers"/> | ||
| <use name="RecoTracker/TkTrackingRegions"/> | ||
| <use name="RecoTracker/TransientTrackingRecHit"/> | ||
| <use name="SimTracker/Common"/> | ||
| <use name="SimTracker/TrackAssociation"/> | ||
| <use name="SimTracker/TrackerHitAssociation"/> | ||
| <use name="SimTracker/TrackTriggerAssociation"/> | ||
| <use name="SimDataFormats/Associations"/> | ||
| <use name="SimDataFormats/TrackingAnalysis"/> | ||
| <use name="SimGeneral/TrackingAnalysis"/> | ||
| <use name="TrackingTools/GeomPropagators"/> | ||
| <use name="TrackingTools/PatternTools"/> | ||
| <use name="TrackingTools/Records"/> | ||
| <use name="TrackingTools/TrajectoryState"/> | ||
| <use name="TrackingTools/TransientTrackingRecHit"/> | ||
| <use name="TrackingTools/TrackAssociator"/> | ||
| <use name="TrackPropagation/SteppingHelixPropagator"/> | ||
| <export> | ||
| <lib name="1"/> | ||
| </export> |
88 changes: 88 additions & 0 deletions
88
RecoMuon/TrackerSeedGenerator/interface/SeedMvaEstimatorPhase2.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| #ifndef RecoMuon_TrackerSeedGenerator_SeedMvaEstimatorPhase2_h | ||
| #define RecoMuon_TrackerSeedGenerator_SeedMvaEstimatorPhase2_h | ||
|
|
||
| #include "FWCore/Framework/interface/ConsumesCollector.h" | ||
| #include "FWCore/Framework/interface/ESHandle.h" | ||
| #include "FWCore/Framework/interface/EventSetup.h" | ||
| #include "FWCore/Utilities/interface/ESGetToken.h" | ||
| #include "FWCore/Utilities/interface/ESInputTag.h" | ||
| #include "DataFormats/Common/interface/Handle.h" | ||
| #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" | ||
| #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h" | ||
| #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" | ||
| #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h" | ||
| #include "DataFormats/TrajectoryState/interface/PTrajectoryStateOnDet.h" | ||
| #include "DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h" | ||
| #include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" | ||
| #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h" | ||
| #include "DataFormats/L1TCorrelator/interface/TkMuon.h" | ||
| #include "DataFormats/L1TCorrelator/interface/TkMuonFwd.h" | ||
| #include "DataFormats/L1TMuonPhase2/interface/TrackerMuon.h" | ||
| #include "TrackingTools/GeomPropagators/interface/Propagator.h" | ||
| #include "TrackingTools/Records/interface/TrackingComponentsRecord.h" | ||
| #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h" | ||
| #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h" | ||
| #include "RecoTracker/TkDetLayers/interface/GeometricSearchTrackerBuilder.h" | ||
| #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h" | ||
| #include "Geometry/Records/interface/IdealGeometryRecord.h" | ||
| #include "Geometry/Records/interface/TrackerTopologyRcd.h" | ||
|
|
||
| #include <memory> | ||
| #include <string> | ||
|
|
||
| typedef pair<const DetLayer*, TrajectoryStateOnSurface> LayerTSOS; | ||
| typedef pair<const DetLayer*, const TrackingRecHit*> LayerHit; | ||
|
|
||
| class GBRForest; | ||
|
|
||
| namespace edm { | ||
| class FileInPath; | ||
| } | ||
|
|
||
| class SeedMvaEstimatorPhase2 { | ||
| public: | ||
| SeedMvaEstimatorPhase2(const edm::FileInPath& weightsfile, | ||
| const std::vector<double>& scale_mean, | ||
| const std::vector<double>& scale_std); | ||
| ~SeedMvaEstimatorPhase2(); | ||
rappoccio marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| double computeMva(const TrajectorySeed&, | ||
| const GlobalVector&, | ||
| const GlobalPoint&, | ||
| const edm::Handle<l1t::TrackerMuonCollection>&, | ||
| const edm::ESHandle<MagneticField>&, | ||
| const Propagator&, | ||
| const GeometricSearchTracker&) const; | ||
|
|
||
| private: | ||
| std::unique_ptr<const GBRForest> gbrForest_; | ||
| const std::vector<double> scale_mean_; | ||
| const std::vector<double> scale_std_; | ||
|
|
||
| vector<LayerTSOS> getTsosOnPixels(const TTTrack<Ref_Phase2TrackerDigi_>&, | ||
| const edm::ESHandle<MagneticField>&, | ||
| const Propagator&, | ||
| const GeometricSearchTracker&) const; | ||
|
|
||
| vector<pair<LayerHit, LayerTSOS> > getHitTsosPairs(const TrajectorySeed&, | ||
| const edm::Handle<l1t::TrackerMuonCollection>&, | ||
| const edm::ESHandle<MagneticField>&, | ||
| const Propagator&, | ||
| const GeometricSearchTracker&) const; | ||
|
|
||
| void getL1TTVariables(const TrajectorySeed&, | ||
| const GlobalVector&, | ||
| const GlobalPoint&, | ||
| const edm::Handle<l1t::TrackerMuonCollection>&, | ||
| float&, | ||
| float&) const; | ||
| void getHitL1TkVariables(const TrajectorySeed&, | ||
| const edm::Handle<l1t::TrackerMuonCollection>&, | ||
| const edm::ESHandle<MagneticField>&, | ||
| const Propagator&, | ||
| const GeometricSearchTracker&, | ||
| float&, | ||
| float&, | ||
| float&) const; | ||
| }; | ||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.