39 #include "CLHEP/Units/GlobalPhysicalConstants.h"
40 #include "CLHEP/Units/GlobalSystemOfUnits.h"
49 caloGeometry_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
91 LogDebug(
"EcalRecHitDebug") <<
"total # EB rechits to be re-calibrated: " <<
EBRecHits->size();
99 LogDebug(
"EcalRecHitDebug") <<
"total # EE uncalibrated rechits to be re-calibrated: " <<
EERecHits->size();
112 ebTimeDigis = pEBTimeDigis.
product();
113 edm::LogInfo(
"EcalDetailedTimeRecHitInfo") <<
"total # ebTimeDigis: " << ebTimeDigis->
size();
119 eeTimeDigis = pEETimeDigis.
product();
120 edm::LogInfo(
"EcalDetailedTimeRecHitInfo") <<
"total # eeTimeDigis: " << eeTimeDigis->
size();
126 std::unique_ptr<GlobalPoint>
vertex;
137 if (!(*VertexHandle).empty())
140 vertex = std::make_unique<GlobalPoint>(myVertex->
x(), myVertex->
y(), myVertex->
z());
149 if (!(*VertexHandle).empty())
151 assert((*VertexHandle)[0].vertexId() == 0);
152 const SimVertex* myVertex = &(*VertexHandle)[0];
153 vertex = std::make_unique<GlobalPoint>(
165 if (timeDigi != ebTimeDigis->
end()) {
166 if (timeDigi->sampleOfInterest() >= 0) {
167 float myTime = (*timeDigi)[timeDigi->sampleOfInterest()];
177 EBDetailedTimeRecHits->push_back(aHit);
186 if (timeDigi != eeTimeDigis->
end()) {
187 if (timeDigi->sampleOfInterest() >= 0) {
188 float myTime = (*timeDigi)[timeDigi->sampleOfInterest()];
197 EEDetailedTimeRecHits->push_back(aHit);
201 LogInfo(
"EcalDetailedTimeRecHitInfo") <<
"total # EB rechits: " << EBDetailedTimeRecHits->size();
202 LogInfo(
"EcalDetailedTimeRecHitInfo") <<
"total # EE rechits: " << EEDetailedTimeRecHits->size();
210 assert(
nullptr != cellGeometry);
212 cellGeometry->getPosition(
double(
layer) + 0.5);
214 return (layerPos.
mag() * cm - tofVector.
mag() * cm) / (
float)c_light;