Skip to content

Commit

Permalink
Merge pull request #6376 from istaslis/CMSSW_7_3_X-low-pt-fix
Browse files Browse the repository at this point in the history
bugfix for pixel clustershape filter, and, change HI tracking low-pt seeding from triplet to track
  • Loading branch information
cmsbuild committed Nov 14, 2014
2 parents dd7eea0 + f7013cc commit 4570ab0
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 7 deletions.
79 changes: 77 additions & 2 deletions RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py
Expand Up @@ -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(
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -144,7 +219,7 @@

hiSecondPixelTripletStep = cms.Sequence(hiSecondPixelTripletClusters*
hiSecondPixelTripletSeedLayers*
hiSecondPixelTripletSeeds*
hiSecondPixelTracks*hiSecondPixelTrackSeeds*
hiSecondPixelTripletTrackCandidates*
hiSecondPixelTripletGlobalPrimTracks*
hiSecondPixelTripletStepSelector
Expand Down
Expand Up @@ -6,7 +6,7 @@ namespace edm { class Event; class EventSetup; class ConsumesCollector;}
class TrackingRecHit;

#include <vector>

#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"

class PixelTrackFilter {
public:
Expand All @@ -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
Expand Up @@ -36,6 +36,7 @@ class PixelTrackReconstruction {
std::unique_ptr<OrderedHitsGenerator> theGenerator;
std::unique_ptr<TrackingRegionProducer> theRegionProducer;
std::unique_ptr<QuadrupletSeedMerger> theMerger_;
bool useClusterShape;
};
#endif

Expand Up @@ -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 =
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4570ab0

Please sign in to comment.