CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/Calibration/IsolatedParticles/src/FindCaloHit.cc

Go to the documentation of this file.
00001 #include "Calibration/IsolatedParticles/interface/FindCaloHit.h"
00002 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00003 #include <iostream>
00004 
00005 namespace spr {
00006 
00007   void find(edm::Handle<EcalRecHitCollection>& hits, DetId thisDet, std::vector<EcalRecHitCollection::const_iterator>& hit, bool debug) {
00008 
00009     hit.push_back( hits->find(thisDet) );
00010   }
00011 
00012   void find(edm::Handle<HBHERecHitCollection>& hits, DetId thisDet, std::vector<HBHERecHitCollection::const_iterator>& hit, bool debug) {
00013 
00014     hit.push_back( hits->find(thisDet) );
00015   }
00016 
00017   void find(edm::Handle<edm::PCaloHitContainer>& hits, DetId thisDet, std::vector<edm::PCaloHitContainer::const_iterator>& hit, bool debug) {
00018 
00019     edm::PCaloHitContainer::const_iterator ihit;
00020     for (ihit=hits->begin(); ihit!=hits->end(); ihit++) {
00021       DetId detId(ihit->id());
00022       if (detId == thisDet) {
00023         hit.push_back(ihit);
00024       }
00025     }
00026   }
00027 }