Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix for pixel clustershape filter, and, change HI tracking low-pt seeding from triplet to track #6376

Merged
merged 2 commits into from Nov 14, 2014
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe forward declare it?


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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also the value of useClusterShape parameter be checked (in addition of its existence)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is just tells you whether the class inherits from
clusterShapeTrackFilter or not.
If it does, it should use the 3 parameter version of the operator(),
whether or not the parameter is set to True.
There is certainly a more elegant solution, but this was the minimally
invasive approach.

On 11/13/14 3:52 PM, Matti Kortelainen wrote:

In 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");

Should also the value of useClusterShape parameter be checked (in
addition of its existence)?


Reply to this email directly or view it on GitHub
https://github.com/cms-sw/cmssw/pull/6376/files#r20295348.


Matthew Nguyen
Chargé de Recherche
LLR-Ecole Polytechnique
91128 Palaiseau FRANCE

+33 1 69 33 55 65

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right, and the filter itself checks the value. Got it, thanks.

}

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