Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions RecoTracker/DeDx/plugins/DeDxHitInfoProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class DeDxHitInfoProducer : public edm::stream::EDProducer<> {
const std::string calibrationPath_;
const bool useCalibration_;
const bool doShapeTest_;
const bool usePixelShape_;

const unsigned int lowPtTracksPrescalePass_, lowPtTracksPrescaleFail_;
GenericTruncatedAverageDeDxEstimator lowPtTracksEstimator_;
Expand Down Expand Up @@ -114,6 +115,7 @@ DeDxHitInfoProducer::DeDxHitInfoProducer(const edm::ParameterSet& iConfig)
calibrationPath_(iConfig.getParameter<string>("calibrationPath")),
useCalibration_(iConfig.getParameter<bool>("useCalibration")),
doShapeTest_(iConfig.getParameter<bool>("shapeTest")),
usePixelShape_(not iConfig.getParameter<edm::InputTag>("clusterShapeCache").label().empty()),
lowPtTracksPrescalePass_(iConfig.getParameter<uint32_t>("lowPtTracksPrescalePass")),
lowPtTracksPrescaleFail_(iConfig.getParameter<uint32_t>("lowPtTracksPrescaleFail")),
lowPtTracksEstimator_(iConfig.getParameter<edm::ParameterSet>("lowPtTracksEstimatorParameters")),
Expand Down Expand Up @@ -150,7 +152,8 @@ void DeDxHitInfoProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSe
const TrackCollection& trackCollection(*trackCollectionHandle.product());

clShape_ = iSetup.getHandle(clShapeToken_);
pixShapeCache_ = iEvent.getHandle(pixShapeCacheToken_);
if (usePixelShape_)
pixShapeCache_ = iEvent.getHandle(pixShapeCacheToken_);

// creates the output collection
auto resultdedxHitColl = std::make_unique<reco::DeDxHitInfoCollection>();
Expand Down Expand Up @@ -306,7 +309,7 @@ void DeDxHitInfoProducer::processHit(const TrackingRecHit* recHit,
ClusterShape().determineShape(pixelDet, clus.pixelCluster(), data);
if (data.isComplete)
type |= (1 << reco::DeDxHitInfo::Complete);
if (clShape_->isCompatible(pixelRecHit, trackDirection, *pixShapeCache_))
if (usePixelShape_ && clShape_->isCompatible(pixelRecHit, trackDirection, *pixShapeCache_))
type |= (1 << reco::DeDxHitInfo::Compatible);
if (data.isComplete && data.isStraight && data.hasBigPixelsOnlyInside)
type |= (1 << reco::DeDxHitInfo::Calibration);
Expand Down
1 change: 1 addition & 0 deletions TauAnalysis/MCEmbeddingTools/python/customisers.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ def performMCMatching(process, names, postfix, outputModules):
process.ak4CaloJetsForTrk.srcPVs = cms.InputTag(
"firstStepPrimaryVertices", "", dataTier
)
process.dedxHitInfo.clusterShapeCache = cms.InputTag("")

# process.muons.FillDetectorBasedIsolation = cms.bool(False)
# process.muons.FillSelectorMaps = cms.bool(False)
Expand Down