CMS 3D CMS Logo

FindCaloHit.cc
Go to the documentation of this file.
3 #include <iostream>
4 
5 namespace spr {
6 
7  std::vector<std::vector<PCaloHit>::const_iterator> findHit(std::vector<PCaloHit>& hits, DetId thisDet, bool) {
8  std::vector<std::vector<PCaloHit>::const_iterator> hit;
9  std::vector<PCaloHit>::const_iterator ihit;
10  for (ihit = hits.begin(); ihit != hits.end(); ihit++) {
11  DetId detId(ihit->id());
12  if (detId == thisDet) {
13  hit.push_back(ihit);
14  }
15  }
16  return hit;
17  }
18 
20  DetId thisDet,
21  std::vector<EcalRecHitCollection::const_iterator>& hit,
22  bool) {
23  if (hits->find(thisDet) != hits->end())
24  hit.push_back(hits->find(thisDet));
25  }
26 
28  DetId thisDet,
29  std::vector<HBHERecHitCollection::const_iterator>& hit,
30  bool) {
31  if (hits->find(thisDet) != hits->end())
32  hit.push_back(hits->find(thisDet));
33  }
34 
36  DetId thisDet,
37  std::vector<edm::PCaloHitContainer::const_iterator>& hit,
38  bool) {
39  edm::PCaloHitContainer::const_iterator ihit;
40  for (ihit = hits->begin(); ihit != hits->end(); ihit++) {
41  DetId detId(ihit->id());
42  if (detId == thisDet) {
43  hit.push_back(ihit);
44  }
45  }
46  }
47 } // namespace spr
spr
Definition: CaloConstants.h:6
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle
Definition: AssociativeIterator.h:50
DetId
Definition: DetId.h:17
FindCaloHit.h
EcalSubdetector.h
spr::findHit
std::vector< typename T::const_iterator > findHit(edm::Handle< T > &hits, DetId thisDet, bool debug=false)
hit
Definition: SiStripHitEffFromCalibTree.cc:88