55 virtual void endJob() ;
78 _inSeeds(iConfig.getParameter< edm::InputTag > (
"inSeeds")),
79 _inPreId(iConfig.getParameter< edm::InputTag > (
"inPreId")),
80 _targetTracks(iConfig.getParameter< edm::InputTag > (
"targetTracks"))
85 produces<ElectronSeedCollection>(
preidgsf_);
111 using namespace reco;
125 for (PreIdCollection::const_iterator it = hPreId->begin(); it!=hPreId->end(); ++ it){
127 TrackRef currentTrRef = it->trackRef();
129 std::cout <<
"XXXX whoops! Org track ref empty!!" << std::endl;
131 output_preidinfo->push_back(newPreId);
134 size_t newIndex = -1;
136 for (
size_t i=0;
i<hTargetTracks->size();++
i){
138 if (
deltaR( currentTrRef->momentum(), hTargetTracks->at(
i).momentum()) < 0.001){
145 TrackRef trackRef(hTargetTracks, newIndex);
147 output_preidinfo->push_back(newPreId);
149 std::cout <<
"XXXX whoops! Cannot set track ref!!" << std::endl;
155 for (ElectronSeedCollection::const_iterator it = hElectronSeeds->begin(); it!=hElectronSeeds->end(); ++ it){
157 TrackRef currentTrRef = it->ctfTrack ();
159 std::cout <<
"XXXX whoops! Org track ref empty!!" << std::endl;
161 output_preid->push_back(newSeed);
164 size_t newIndex = -1;
166 for (
size_t i=0;
i<hTargetTracks->size();++
i){
168 if (
deltaR( currentTrRef->momentum(), hTargetTracks->at(
i).momentum()) < 0.001){
175 TrackRef trackRef(hTargetTracks, newIndex);
177 output_preid->push_back(newSeed);
179 std::cout <<
"XXXX whoops! Cannot set track ref!!" << std::endl;
T getParameter(std::string const &) const
std::vector< reco::PreId > PreIdCollection
~ElectronSeedTrackRefUpdater()
#define DEFINE_FWK_MODULE(type)
ElectronSeedTrackRefUpdater(const edm::ParameterSet &)
void setCtfTrack(const CtfTrackRef &)
Set additional info.
void setTrack(reco::TrackRef trackref)
virtual void produce(edm::Event &, const edm::EventSetup &)
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.
edm::InputTag _targetTracks
double deltaR(double eta1, double eta2, double phi1, double phi2)