/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SimDataFormats/CaloHit/src/PCaloHit.cc
24 строки
922 B
Matti Kortelainen
Move stored types in io_v1 namespace, reset class versions to 3
22 май 2026, 18:18
22 май 2026, 18:18
909f324
Код
Авторство
О чём код?
#include "SimDataFormats/CaloHit/interface/PCaloHit.h" #include <iostream> namespace io_v1 { PCaloHit::PCaloHit(float eEM, float eHad, float t, int i, uint16_t d) : myTime(t), myItra(i), myDepth(d) { myEnergy = eEM + eHad; myEMFraction = (myEnergy <= 0.f ? 1.f : eEM / myEnergy); } PCaloHit::PCaloHit(unsigned int id, float eEM, float eHad, float t, int i, uint16_t d) : myTime(t), myItra(i), detId(id), myDepth(d) { myEnergy = eEM + eHad; myEMFraction = (myEnergy <= 0.f ? 1.f : eEM / myEnergy); } std::ostream& operator<<(std::ostream& o, const PCaloHit& hit) { o << "0x" << std::hex << hit.id() << std::dec << ": Energy (EM) " << hit.energyEM() << " GeV " << ": Energy (Had) " << hit.energyHad() << " GeV " << " Tof " << hit.time() << " ns " << " Geant track #" << hit.geantTrackId() << " Encoded depth " << hit.depth(); return o; } } // namespace io_v1