diff --git a/RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py b/RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py index 82616a182732d..bf8b85bf54ad6 100644 --- a/RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py @@ -28,6 +28,81 @@ hiSecondPixelTripletSeedLayers.FPix.skipClusters = cms.InputTag('hiSecondPixelTripletClusters') # SEEDS +from RecoPixelVertexing.PixelTriplets.PixelTripletHLTGenerator_cfi import * +from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * +from RecoHI.HiTracking.HIPixelTrackFilter_cfi import * +from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * +hiSecondPixelTracks = cms.EDProducer("PixelTrackProducer", + + passLabel = cms.string('Pixel primary tracks with vertex constraint'), + + # Region + RegionFactoryPSet = cms.PSet( + ComponentName = cms.string("GlobalTrackingRegionWithVerticesProducer"), + RegionPSet = cms.PSet( + precise = cms.bool(True), + beamSpot = cms.InputTag("offlineBeamSpot"), + useFixedError = cms.bool(False), + nSigmaZ = cms.double(4.0), + sigmaZVertex = cms.double(4.0), + fixedError = cms.double(0.2), + VertexCollection = cms.InputTag("hiSelectedVertex"), + ptMin = cms.double(0.4), + useFoundVertices = cms.bool(True), + originRadius = cms.double(0.02) + ) + ), + + # Ordered Hits + OrderedHitsFactoryPSet = cms.PSet( + ComponentName = cms.string( "StandardHitTripletGenerator" ), + SeedingLayers = cms.InputTag( "PixelLayerTriplets" ), + GeneratorPSet = cms.PSet( + PixelTripletHLTGenerator + ) + ), + + # Fitter + FitterPSet = cms.PSet( + ComponentName = cms.string('PixelFitterByHelixProjections'), + TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelTriplets') + ), + + # Filter + useFilterWithES = cms.bool( True ), + FilterPSet = cms.PSet( + nSigmaLipMaxTolerance = cms.double(4.0), + chi2 = cms.double(1000.0), + ComponentName = cms.string('HIPixelTrackFilter'), + nSigmaTipMaxTolerance = cms.double(4.0), + clusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache"), + VertexCollection = cms.InputTag("hiSelectedVertex"), + useClusterShape = cms.bool(False), + lipMax = cms.double(0), + tipMax = cms.double(0), + ptMin = cms.double(0.4) + ), + + # Cleaner + CleanerPSet = cms.PSet( + ComponentName = cms.string( "TrackCleaner" ) + ) +) + +hiSecondPixelTracks.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = cms.uint32(5000000) +hiSecondPixelTracks.OrderedHitsFactoryPSet.SeedingLayers = cms.InputTag('hiSecondPixelTripletSeedLayers') + +hiSecondPixelTracks.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor + + + +import RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi +hiSecondPixelTrackSeeds = RecoPixelVertexing.PixelLowPtUtilities.TrackSeeds_cfi.pixelTrackSeeds.clone( + InputCollection = 'hiSecondPixelTracks' + ) + + + import RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock hiSecondPixelTripletSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone( @@ -89,7 +164,7 @@ # MAKING OF TRACK CANDIDATES import RecoTracker.CkfPattern.CkfTrackCandidates_cfi hiSecondPixelTripletTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone( - src = cms.InputTag('hiSecondPixelTripletSeeds'), + src = cms.InputTag('hiSecondPixelTrackSeeds'), ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput numHitsForSeedCleaner = cms.int32(50), onlyPixelHitsForSeedCleaner = cms.bool(True), @@ -144,7 +219,7 @@ hiSecondPixelTripletStep = cms.Sequence(hiSecondPixelTripletClusters* hiSecondPixelTripletSeedLayers* - hiSecondPixelTripletSeeds* + hiSecondPixelTracks*hiSecondPixelTrackSeeds* hiSecondPixelTripletTrackCandidates* hiSecondPixelTripletGlobalPrimTracks* hiSecondPixelTripletStepSelector diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h b/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h index e76276fdbac0a..e324779f1c578 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h +++ b/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilter.h @@ -6,7 +6,7 @@ namespace edm { class Event; class EventSetup; class ConsumesCollector;} class TrackingRecHit; #include - +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" class PixelTrackFilter { public: @@ -15,5 +15,6 @@ class PixelTrackFilter { virtual void update(const edm::Event& ev, const edm::EventSetup& es) = 0; virtual bool operator()(const reco::Track*) const {return false;} virtual bool operator()(const reco::Track*, const Hits&) const {return false;} + virtual bool operator()(const reco::Track*, const Hits&, const TrackerTopology *tTopo) const {return false;} }; #endif diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h b/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h index afa311b5b0f8a..17a94d02661d8 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h +++ b/RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h @@ -36,6 +36,7 @@ class PixelTrackReconstruction { std::unique_ptr theGenerator; std::unique_ptr theRegionProducer; std::unique_ptr theMerger_; + bool useClusterShape; }; #endif diff --git a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackReconstruction.cc b/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackReconstruction.cc index 21d19832d7ac9..8e042b011460a 100644 --- a/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackReconstruction.cc +++ b/RecoPixelVertexing/PixelTrackFitting/src/PixelTrackReconstruction.cc @@ -56,6 +56,7 @@ PixelTrackReconstruction::PixelTrackReconstruction(const ParameterSet& cfg, if(theConfig.exists("useFilterWithES")) { edm::LogInfo("Obsolete") << "useFilterWithES parameter is obsolete and can be removed"; } + useClusterShape = filterPSet.exists("useClusterShape"); } ParameterSet orderedPSet = @@ -129,10 +130,12 @@ void PixelTrackReconstruction::run(TracksWithTTRHs& tracks, edm::Event& ev, cons reco::Track* track = theFitter->run( ev, es, hits, region); if (!track) continue; - // decide if track should be skipped according to filter - if (theFilter && !(*theFilter)(track, hits) ) { - delete track; - continue; + if (theFilter) { + if ((useClusterShape && !(*theFilter)(track, hits, tTopo)) || + (!useClusterShape && !(*theFilter)(track, hits))) { + delete track; + continue; + } } // add tracks