/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Calibration/IsolatedParticles/src/FindCaloHit.cc
47 строк
1 KB
Cms Build
Clang-Format
16 май 2019, 00:01
16 май 2019, 00:01
92500ad
Код
Авторство
О чём код?
#include "Calibration/IsolatedParticles/interface/FindCaloHit.h" #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" #include <iostream> namespace spr { std::vector<std::vector<PCaloHit>::const_iterator> findHit(std::vector<PCaloHit>& hits, DetId thisDet, bool) { std::vector<std::vector<PCaloHit>::const_iterator> hit; std::vector<PCaloHit>::const_iterator ihit; for (ihit = hits.begin(); ihit != hits.end(); ihit++) { DetId detId(ihit->id()); if (detId == thisDet) { hit.push_back(ihit); } } return hit; } void find(edm::Handle<EcalRecHitCollection>& hits, DetId thisDet, std::vector<EcalRecHitCollection::const_iterator>& hit, bool) { if (hits->find(thisDet) != hits->end()) hit.push_back(hits->find(thisDet)); } void find(edm::Handle<HBHERecHitCollection>& hits, DetId thisDet, std::vector<HBHERecHitCollection::const_iterator>& hit, bool) { if (hits->find(thisDet) != hits->end()) hit.push_back(hits->find(thisDet)); } void find(edm::Handle<edm::PCaloHitContainer>& hits, DetId thisDet, std::vector<edm::PCaloHitContainer::const_iterator>& hit, bool) { edm::PCaloHitContainer::const_iterator ihit; for (ihit = hits->begin(); ihit != hits->end(); ihit++) { DetId detId(ihit->id()); if (detId == thisDet) { hit.push_back(ihit); } } } } // namespace spr