-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use reco::MuonToTrackingParticleAssociator instead of MuonToSimAssoci…
…atorBase MuonToSimAssociatorBase is an EventSetup object which uses the edm::Event to get data. This is a problem for consumes. So instead we nw use the reco::MuonToTrackingParticleAssociator which does the same work but is an edm::Event product which already contains the data it needs from the event.
- Loading branch information
Showing
11 changed files
with
116 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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 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 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,6 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from SimMuon.MCTruth.MuonAssociatorByHits_cfi import muonAssociatorByHitsCommonParameters | ||
muonAssociatorByHitsHelper = cms.EDProducer("MuonToTrackingParticleAssociatorEDProducer", | ||
muonAssociatorByHitsCommonParameters | ||
) |
20 changes: 20 additions & 0 deletions
20
SimMuon/MCTruth/python/muonAssociatorByHitsNoSimHitsHelper_cfi.py
This file contains 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,20 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
## muonAssociatorByHits using only digiSimLinks (and TrackingParticles), | ||
## not accessing the PSimHits directly. Useful if you run on RECOSIM without RAWSIM | ||
|
||
from SimMuon.MCTruth.MuonAssociatorByHits_cfi import muonAssociatorByHitsCommonParameters | ||
muonAssociatorByHitsNoSimHitsHelper = cms.EDProducer("MuonToTrackingParticleAssociatorEDProducer", | ||
muonAssociatorByHitsCommonParameters | ||
) | ||
# don't read simhits, they're not there | ||
muonAssociatorByHitsNoSimHitsHelper.CSCsimHitsTag = "" | ||
muonAssociatorByHitsNoSimHitsHelper.RPCsimhitsTag = "" | ||
muonAssociatorByHitsNoSimHitsHelper.DTsimhitsTag = "" | ||
|
||
### The following is useful when running only on RECO | ||
# don't normalize on the total number of hits (which is unknown, if I don't have simHits) | ||
muonAssociatorByHitsNoSimHitsHelper.AbsoluteNumberOfHits_muon = True | ||
muonAssociatorByHitsNoSimHitsHelper.AbsoluteNumberOfHits_track = True | ||
# use only muon system | ||
muonAssociatorByHitsNoSimHitsHelper.UseTracker = False |
This file contains 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 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 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 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.