CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FindCaloHit.cc
Go to the documentation of this file.
3 #include <iostream>
4 
5 namespace spr {
6 
7  void find(edm::Handle<EcalRecHitCollection>& hits, DetId thisDet, std::vector<EcalRecHitCollection::const_iterator>& hit, bool debug) {
8 
9  hit.push_back( hits->find(thisDet) );
10  }
11 
12  void find(edm::Handle<HBHERecHitCollection>& hits, DetId thisDet, std::vector<HBHERecHitCollection::const_iterator>& hit, bool debug) {
13 
14  hit.push_back( hits->find(thisDet) );
15  }
16 
17  void find(edm::Handle<edm::PCaloHitContainer>& hits, DetId thisDet, std::vector<edm::PCaloHitContainer::const_iterator>& hit, bool debug) {
18 
19  edm::PCaloHitContainer::const_iterator ihit;
20  for (ihit=hits->begin(); ihit!=hits->end(); ihit++) {
21  DetId detId(ihit->id());
22  if (detId == thisDet) {
23  hit.push_back(ihit);
24  }
25  }
26  }
27 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
Definition: DetId.h:18
#define debug
Definition: HDRShower.cc:19