Skip to content

Commit

Permalink
add fillPSetDescription to CkfTrackCandidateMakerBase and propagate i…
Browse files Browse the repository at this point in the history
…t to CkfTrackCandidateMaker
  • Loading branch information
mmusich committed Sep 23, 2021
1 parent a346606 commit 91e9881
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 32 deletions.
3 changes: 3 additions & 0 deletions RecoTracker/CkfPattern/interface/CkfTrackCandidateMakerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "FWCore/Framework/interface/ConsumesCollector.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"

#include "TrackingTools/PatternTools/interface/TrajectoryBuilder.h"
#include "RecoTracker/CkfPattern/interface/BaseCkfTrajectoryBuilder.h"
Expand Down Expand Up @@ -42,6 +43,8 @@ namespace cms {

virtual void produceBase(edm::Event& e, const edm::EventSetup& es);

static void fillPSetDescription(edm::ParameterSetDescription& desc);

protected:
bool theTrackCandidateOutput;
bool theTrajectoryOutput;
Expand Down
7 changes: 7 additions & 0 deletions RecoTracker/CkfPattern/plugins/CkfTrackCandidateMaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ namespace cms {

~CkfTrackCandidateMaker() override { ; }

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.setComment("Make Ckf track candidates");
CkfTrackCandidateMakerBase::fillPSetDescription(desc);
descriptions.addWithDefaultLabel(desc);
}

void beginRun(edm::Run const& r, edm::EventSetup const& es) override { beginRunBase(r, es); }

void produce(edm::Event& e, const edm::EventSetup& es) override { produceBase(e, es); }
Expand Down
35 changes: 3 additions & 32 deletions RecoTracker/CkfPattern/python/CkfTrackCandidates_cfi.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,7 @@
import FWCore.ParameterSet.Config as cms

ckfTrackCandidates = cms.EDProducer("CkfTrackCandidateMaker",
# During tracking, eliminate seeds used by an already found track
RedundantSeedCleaner = cms.string('CachingSeedCleanerBySharedInput'),
# Decide how to eliminate tracks sharing hits at end of tracking phase
TrajectoryCleaner = cms.string('TrajectoryCleanerBySharedHits'),
# Run cleaning after in-out tracking in addition to at end of tracking ?
cleanTrajectoryAfterInOut = cms.bool(True),
reverseTrajectories =cms.bool(False),
# Split matched strip tracker hits into mono/stereo components.
useHitsSplitting = cms.bool(True),
# After in-out tracking, do out-in tracking through the seeding
# region and then further in.
doSeedingRegionRebuilding = cms.bool(True),
# SeedProducer = cms.string('globalMixedSeeds'),
# SeedLabel = cms.string(''),
maxNSeeds = cms.uint32(500000),
maxSeedsBeforeCleaning = cms.uint32(5000),
# SeedProducer:SeedLabel descoped to src
src = cms.InputTag('globalMixedSeeds'),
SimpleMagneticField = cms.string(''),
# SimpleMagneticField = cms.string('ParabolicMf'), # parabolic magnetic field
NavigationSchool = cms.string('SimpleNavigationSchool'),
TrajectoryBuilder = cms.string('GroupedCkfTrajectoryBuilder'),
TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('GroupedCkfTrajectoryBuilder')),
TransientInitialStateEstimatorParameters = cms.PSet(
propagatorAlongTISE = cms.string('PropagatorWithMaterial'),
propagatorOppositeTISE = cms.string('PropagatorWithMaterialOpposite'),
# propagatorAlongTISE = cms.string('PropagatorWithMaterialParabolicMf'), # parabolic magnetic field
# propagatorOppositeTISE = cms.string('PropagatorWithMaterialParabolicMfOpposite'), # parabolic magnetic field
numberMeasurementsForFit = cms.int32(4)
),
MeasurementTrackerEvent = cms.InputTag("MeasurementTrackerEvent"),
import RecoTracker.CkfPattern.ckfTrackCandidateMaker_cfi as _mod
ckfTrackCandidates = _mod.ckfTrackCandidateMaker.clone(
TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('GroupedCkfTrajectoryBuilder'))
)

28 changes: 28 additions & 0 deletions RecoTracker/CkfPattern/src/CkfTrackCandidateMakerBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -540,4 +540,32 @@ namespace cms {
e.put(std::move(outputSeedStopInfos));
}

void CkfTrackCandidateMakerBase::fillPSetDescription(edm::ParameterSetDescription& desc) {
desc.add<bool>("cleanTrajectoryAfterInOut", true);
desc.add<bool>("doSeedingRegionRebuilding", true);
desc.add<bool>("onlyPixelHitsForSeedCleaner", false);
desc.add<bool>("reverseTrajectories", false);
desc.add<bool>("useHitsSplitting", true);
desc.add<edm::InputTag>("MeasurementTrackerEvent", edm::InputTag("MeasurementTrackerEvent"));
desc.add<edm::InputTag>("clustersToSkip", edm::InputTag(""));
desc.add<edm::InputTag>("phase2clustersToSkip", edm::InputTag(""));
desc.add<edm::InputTag>("src", edm::InputTag("globalMixedSeeds"));

edm::ParameterSetDescription psd0;
desc.add<edm::ParameterSetDescription>("TrajectoryBuilderPSet", psd0);

edm::ParameterSetDescription psd1;
psd1.add<std::string>("propagatorAlongTISE", "PropagatorWithMaterial");
psd1.add<std::string>("propagatorOppositeTISE", "PropagatorWithMaterialOpposite");
psd1.add<int>("numberMeasurementsForFit", 4);
desc.add<edm::ParameterSetDescription>("TransientInitialStateEstimatorParameters", psd1);

desc.add<int>("numHitsForSeedCleaner", 4);
desc.add<std::string>("NavigationSchool", "SimpleNavigationSchool");
desc.add<std::string>("RedundantSeedCleaner", "CachingSeedCleanerBySharedInput");
desc.add<std::string>("TrajectoryCleaner", "TrajectoryCleanerBySharedHits");
desc.add<unsigned int>("maxNSeeds", 500000);
desc.add<unsigned int>("maxSeedsBeforeCleaning", 5000);
}

} // namespace cms

0 comments on commit 91e9881

Please sign in to comment.