test
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 ) {
8 
9  if (hits->find(thisDet) != hits->end())
10  hit.push_back( hits->find(thisDet) );
11  }
12 
13  void find(edm::Handle<HBHERecHitCollection>& hits, DetId thisDet, std::vector<HBHERecHitCollection::const_iterator>& hit, bool ) {
14 
15  if (hits->find(thisDet) != hits->end())
16  hit.push_back( hits->find(thisDet) );
17  }
18 
19  void find(edm::Handle<edm::PCaloHitContainer>& hits, DetId thisDet, std::vector<edm::PCaloHitContainer::const_iterator>& hit, bool ) {
20 
21  edm::PCaloHitContainer::const_iterator ihit;
22  for (ihit=hits->begin(); ihit!=hits->end(); ihit++) {
23  DetId detId(ihit->id());
24  if (detId == thisDet) {
25  hit.push_back(ihit);
26  }
27  }
28  }
29 }
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