Skip to content

Commit

Permalink
introduce fillDescriptions for SeedCombiner, clean up configuration i…
Browse files Browse the repository at this point in the history
…n RecoTrackerP5_cff and customize HLT menu
  • Loading branch information
mmusich committed Nov 11, 2024
1 parent 76acd21 commit ab12932
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
11 changes: 9 additions & 2 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,20 @@ def customiseForOffline(process):

return process

def customiseForXXXX(process):
def customiseHLTFor46647(process):
for prod in producers_by_type(process, 'CtfSpecialSeedGenerator'):
if hasattr(prod, "DontCountDetsAboveNClusters"):
value = prod.DontCountDetsAboveNClusters.value()
delattr(prod, "DontCountDetsAboveNClusters")
# Replace it with cms.uint32
prod.DontCountDetsAboveNClusters = cms.uint32(value)

for prod in producers_by_type(process, 'SeedCombiner'):
if hasattr(prod, "PairCollection"):
delattr(prod, "PairCollection")
if hasattr(prod, "TripletCollection"):
delattr(prod, "TripletCollection")

return process

# CMSSW version specific customizations
Expand All @@ -65,6 +72,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
# add call to action function in proper order: newest last!
# process = customiseFor12718(process)

process = customiseForXXXX(process)
process = customiseHLTFor46647(process)

return process
5 changes: 1 addition & 4 deletions RecoTracker/Configuration/python/RecoTrackerP5_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
from RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cff import *
combinedP5SeedsForCTF = RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi.globalCombinedSeeds.clone(
seedCollections = ['combinatorialcosmicseedfinderP5',
'simpleCosmicBONSeeds'],
#backward compatibility 2.2/3.1
PairCollection = cms.InputTag('combinatorialcosmicseedfinderP5'),
TripletCollection = cms.InputTag('simpleCosmicBONSeeds')
'simpleCosmicBONSeeds']
)

from RecoTracker.CkfPattern.CkfTrackCandidatesP5_cff import *
Expand Down
9 changes: 7 additions & 2 deletions RecoTracker/TkSeedGenerator/plugins/SeedCombiner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ SeedCombiner::SeedCombiner(const edm::ParameterSet& cfg) {
}
}

SeedCombiner::~SeedCombiner() {}

void SeedCombiner::produce(edm::Event& ev, const edm::EventSetup& es) {
// Read inputs, and count total seeds
size_t ninputs = inputCollections_.size();
Expand Down Expand Up @@ -85,3 +83,10 @@ void SeedCombiner::produce(edm::Event& ev, const edm::EventSetup& es) {
// Save result into the event
ev.put(std::move(result));
}

void SeedCombiner::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<std::vector<edm::InputTag> >("seedCollections", {});
desc.addOptional<std::vector<edm::InputTag> >("clusterRemovalInfos", {});
descriptions.addWithDefaultLabel(desc);
}
10 changes: 7 additions & 3 deletions RecoTracker/TkSeedGenerator/plugins/SeedCombiner.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
#define RecoTracker_TkSeedGenerator_SeedCombiner_H

#include <vector>
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
#include "DataFormats/TrackerRecHit2D/interface/ClusterRemovalInfo.h"
#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Utilities/interface/Visibility.h"

Expand All @@ -17,7 +19,9 @@ namespace edm {
class dso_hidden SeedCombiner : public edm::stream::EDProducer<> {
public:
SeedCombiner(const edm::ParameterSet& cfg);
~SeedCombiner() override;
~SeedCombiner() override = default;

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

void produce(edm::Event& ev, const edm::EventSetup& es) override;

Expand Down

0 comments on commit ab12932

Please sign in to comment.