24 LogInfo(
"ElectronSeedMerger")<<
"Electron SeedMerger started ";
30 produces<ElectronSeedCollection>();
53 auto output = std::make_unique<ElectronSeedCollection>();
66 vector<bool> TSeedMatched;
67 for (
unsigned int it=0;it<TSeed.size();it++){
68 TSeedMatched.push_back(
false);
73 ElectronSeedCollection::const_iterator e_beg= ESeed.begin();
74 ElectronSeedCollection::const_iterator e_end= ESeed.end();
75 for (;e_beg!=e_end;++e_beg){
78 bool AlreadyMatched =
false;
81 for (
unsigned int it=0;it<TSeed.size();it++){
82 if (AlreadyMatched)
continue;
89 unsigned int hitShared=0;
90 unsigned int hitSeed=0;
91 for (;eh!=eh_end;++eh){
93 if (!eh->isValid())
continue;
98 for (;th!=th_end;++th){
99 if (!th->isValid())
continue;
106 if (Shared) hitShared++;
108 if (hitShared==hitSeed){
110 TSeedMatched[it]=
true;
113 if ( hitShared == (hitSeed-1)){
118 output->push_back(NewSeed);
122 for (
unsigned int it=0;it<TSeed.size();it++){
123 if (!TSeedMatched[it])
output->push_back(TSeed[it]);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ElectronSeedMerger(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setCtfTrack(const CtfTrackRef &)
Set additional info.
virtual void produce(edm::Event &, const edm::EventSetup &) override
recHitContainer::const_iterator const_iterator
edm::EDGetTokenT< reco::ElectronSeedCollection > ecalSeedToken_
SEED COLLECTIONS.
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
T const * product() const
edm::EDGetTokenT< reco::ElectronSeedCollection > tkSeedToken_