Skip to content

Commit

Permalink
Merge pull request #28257 from kpedro88/FastDeDxContent_1100pre10
Browse files Browse the repository at this point in the history
Include dedx collections in fastsim output
  • Loading branch information
cmsbuild committed Oct 27, 2019
2 parents 796acec + 3ffdf28 commit 5723015
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Expand Up @@ -118,8 +118,8 @@ void FastTrackDeDxProducer::fillDescriptions(edm::ConfigurationDescriptions& des
desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
desc.add<bool>("UsePixel", false);
desc.add<bool>("UseStrip", true);
desc.add<double>("MeVperADCPixel", 3.61e-06 * 265);
desc.add<double>("MeVperADCStrip", 3.61e-06);
desc.add<double>("MeVperADCStrip", 3.61e-06 * 265);
desc.add<double>("MeVperADCPixel", 3.61e-06);
desc.add<bool>("ShapeTest", true);
desc.add<bool>("UseCalibration", false);
desc.add<string>("calibrationPath", "");
Expand Down Expand Up @@ -249,8 +249,7 @@ void FastTrackDeDxProducer::processHit(const FastTrackerRecHit& recHit,
auto const& thit = static_cast<BaseTrackerRecHit const&>(recHit);
if (!thit.isValid())
return;
auto const& clus = thit.firstClusterRef();
if (!clus.isValid())
if (!thit.hasPositionAndError())
return;

if (recHit.isPixel()) {
Expand Down
3 changes: 1 addition & 2 deletions RecoTracker/Configuration/python/RecoTracker_cff.py
Expand Up @@ -38,5 +38,4 @@
trackingGlobalReco = cms.Sequence(trackingGlobalRecoTask)

from Configuration.Eras.Modifier_fastSim_cff import fastSim
_fastSim_trackingGlobalReco = cms.Sequence(trackExtrapolator)
fastSim.toReplaceWith(trackingGlobalReco,_fastSim_trackingGlobalReco)
fastSim.toReplaceWith(trackingGlobalRecoTask, cms.Task(doAlldEdXEstimatorsTask, trackExtrapolator))
16 changes: 16 additions & 0 deletions RecoTracker/DeDx/python/dedxEstimators_cff.py
Expand Up @@ -46,6 +46,20 @@
calibrationPath = cms.string(""),
)

from Configuration.Eras.Modifier_fastSim_cff import fastSim

# explicit python dependency
import FastSimulation.SimplifiedGeometryPropagator.FastTrackDeDxProducer_cfi

# do this before defining dedxPixelHarmonic2 so it automatically comes out right
fastSim.toReplaceWith(dedxHarmonic2,
FastSimulation.SimplifiedGeometryPropagator.FastTrackDeDxProducer_cfi.FastTrackDeDxProducer.clone(
ShapeTest = False,
simHit2RecHitMap = cms.InputTag("fastMatchedTrackerRecHits","simHit2RecHitMap"),
simHits = cms.InputTag("fastSimProducer","TrackerHits"),
)
)

dedxPixelHarmonic2 = dedxHarmonic2.clone(UseStrip = False, UsePixel = True)

dedxPixelAndStripHarmonic2T085 = dedxHarmonic2.clone(
Expand Down Expand Up @@ -78,3 +92,5 @@

doAlldEdXEstimatorsTask = cms.Task(dedxTruncated40 , dedxHarmonic2 , dedxPixelHarmonic2 , dedxPixelAndStripHarmonic2T085 , dedxHitInfo)
doAlldEdXEstimators = cms.Sequence(doAlldEdXEstimatorsTask)

fastSim.toReplaceWith(doAlldEdXEstimatorsTask, cms.Task(dedxHarmonic2, dedxPixelHarmonic2))

0 comments on commit 5723015

Please sign in to comment.