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;
57 std::vector<Handle<TrajectorySeedCollection > > seedCollections(ninputs);
58 for (
size_t i = 0; i < ninputs; ++
i) {
60 nseeds += seedCollections[
i]->size();
65 result->reserve( nseeds );
68 unsigned int iSC=0,iSC_max=seedCollections.size();
69 for (;iSC!=iSC_max;++iSC){
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());
86 std::move(newRecHitContainer),
91 result->insert(result->end(), collection->begin(), collection->end());
SeedCombiner(const edm::ParameterSet &cfg)
T getParameter(std::string const &) const
std::vector< edm::InputTag > clusterRemovalInfos_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void reKey(TrackingRecHit *hit) const
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 >
std::vector< TrajectorySeed > TrajectorySeedCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
recHitContainer::const_iterator const_iterator
std::vector< edm::EDGetTokenT< reco::ClusterRemovalInfo > > clusterRemovalTokens_
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > inputCollections_
virtual void produce(edm::Event &ev, const edm::EventSetup &es) override