40 #include "CLHEP/Units/GlobalPhysicalConstants.h"
41 #include "CLHEP/Units/GlobalSystemOfUnits.h"
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())
149 if (!(*VertexHandle).empty())
151 assert((*VertexHandle)[0].vertexId() == 0);
152 const SimVertex* myVertex = &(*VertexHandle)[0];
164 if (timeDigi != ebTimeDigis->
end()) {
165 if (timeDigi->sampleOfInterest() >= 0) {
166 float myTime = (*timeDigi)[timeDigi->sampleOfInterest()];
176 EBDetailedTimeRecHits->push_back(aHit);
185 if (timeDigi != eeTimeDigis->
end()) {
186 if (timeDigi->sampleOfInterest() >= 0) {
187 float myTime = (*timeDigi)[timeDigi->sampleOfInterest()];
196 EEDetailedTimeRecHits->push_back(aHit);
200 LogInfo(
"EcalDetailedTimeRecHitInfo") <<
"total # EB rechits: " << EBDetailedTimeRecHits->size();
201 LogInfo(
"EcalDetailedTimeRecHitInfo") <<
"total # EE rechits: " << EEDetailedTimeRecHits->size();
209 assert(
nullptr != cellGeometry);
211 cellGeometry->getPosition(
double(layer) + 0.5);
213 return (layerPos.
mag() * cm - tofVector.
mag() * cm) / (
float)c_light;