55 virtual void endJob() ;
81 _inSeeds1(iConfig.getParameter< edm::
InputTag > (
"inSeeds1")),
82 _inPreId1(iConfig.getParameter< edm::
InputTag > (
"inPreId1")),
83 _inSeeds2(iConfig.getParameter< edm::
InputTag > (
"inSeeds2")),
84 _inPreId2(iConfig.getParameter< edm::
InputTag > (
"inPreId2")),
85 _targetTracks(iConfig.getParameter< edm::
InputTag > (
"targetTracks"))
90 produces<ElectronSeedCollection>(
preidgsf_);
116 using namespace reco;
129 std::vector< edm::Handle< ElectronSeedCollection > > colsSeed;
130 colsSeed.push_back(hSeeds1);
131 colsSeed.push_back(hSeeds2);
139 std::vector< edm::Handle< PreIdCollection > > colsPreId;
140 colsPreId.push_back(hPreId1);
141 colsPreId.push_back(hPreId2);
145 itCols!=colsPreId.end();
148 for (PreIdCollection::const_iterator it = (*itCols)->begin(); it!=(*itCols)->end(); ++ it){
150 TrackRef currentTrRef = it->trackRef();
152 std::cout <<
"XXXX whoops! Org track ref empty!!" << std::endl;
154 output_preidinfo->push_back(newPreId);
157 size_t newIndex = -1;
159 for (
size_t i=0;
i<hTargetTracks->size();++
i){
161 if (
deltaR( currentTrRef->momentum(), hTargetTracks->at(
i).momentum()) < 0.001){
168 TrackRef trackRef(hTargetTracks, newIndex);
171 std::cout <<
"XXXX whoops! Cannot set track ref!!" << std::endl;
173 output_preidinfo->push_back(newPreId);
179 itCols!=colsSeed.end();
182 for (ElectronSeedCollection::const_iterator it = (*itCols)->begin(); it!=(*itCols)->end(); ++ it){
184 TrackRef currentTrRef = it->ctfTrack ();
186 std::cout <<
"XXXX whoops! Org track ref empty!!" << std::endl;
188 output_preid->push_back(newSeed);
191 size_t newIndex = -1;
193 for (
size_t i=0;
i<hTargetTracks->size();++
i){
195 if (
deltaR( currentTrRef->momentum(), hTargetTracks->at(
i).momentum()) < 0.001){
202 TrackRef trackRef(hTargetTracks, newIndex);
205 std::cout <<
"XXXX whoops! Cannot set track ref!!" << std::endl;
207 output_preid->push_back(newSeed);
edm::InputTag _targetTracks
T getParameter(std::string const &) const
std::vector< reco::PreId > PreIdCollection
#define DEFINE_FWK_MODULE(type)
void setCtfTrack(const CtfTrackRef &)
Set additional info.
void setTrack(reco::TrackRef trackref)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool isNull() const
Checks for null.
double deltaR(double eta1, double eta2, double phi1, double phi2)
ElectronSeedTrackRefUpdaterAndMerger(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &)
~ElectronSeedTrackRefUpdaterAndMerger()