32 cfg.
getParameter<std::vector<edm::InputTag> >(
"seedCollections"),
33 [
this](
edm::InputTag const &
tag) { return consumes<TrajectorySeedCollection>(tag); } );
34 produces<TrajectorySeedCollection>();
36 if (cfg.
exists(
"clusterRemovalInfos")){
37 clusterRemovalInfos_=cfg.
getParameter<std::vector<edm::InputTag> >(
"clusterRemovalInfos");
38 clusterRemovalTokens_.resize(clusterRemovalInfos_.size());
39 for (
unsigned int i=0;
i<clusterRemovalInfos_.size();++
i)
41 clusterRemovalTokens_[
i] = consumes<reco::ClusterRemovalInfo>(clusterRemovalInfos_[
i]);
42 if (clusterRemovalInfos_.size()!=0 && clusterRemovalInfos_.size()==inputCollections_.size()) reKeing_=
true;
55 size_t ninputs = inputCollections_.size();
57 std::vector<Handle<TrajectorySeedCollection > >
seedCollections(ninputs);
58 for (
size_t i = 0;
i < ninputs; ++
i) {
59 ev.
getByToken(inputCollections_[
i], seedCollections[i]);
60 nseeds += seedCollections[
i]->size();
64 auto result = std::make_unique<TrajectorySeedCollection>();
68 unsigned int iSC=0,iSC_max=seedCollections.size();
69 for (;iSC!=iSC_max;++iSC){
71 if (reKeing_ && !(clusterRemovalInfos_[iSC]==
edm::InputTag(
""))){
74 for (TrajectorySeedCollection::const_iterator iS=collection->begin();
75 iS!=collection->end();++iS){
77 newRecHitContainer.
reserve(iS->nHits());
81 for (;iH!=iH_end;++iH){
83 refSetter.
reKey(&newRecHitContainer.
back());
91 result->insert(
result->end(), collection->begin(), collection->end());
SeedCombiner(const edm::ParameterSet &cfg)
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void reKey(TrackingRecHit *hit) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
recHitContainer::const_iterator const_iterator
virtual void produce(edm::Event &ev, const edm::EventSetup &es) override