|
|
Go to the documentation of this file.
18 #include "CLHEP/Units/GlobalPhysicalConstants.h"
19 #include "CLHEP/Units/GlobalSystemOfUnits.h"
40 unsigned int size = 0;
51 edm::LogError(
"TimeDigiError") <<
"[EcalTimeMapDigitizer]::ERROR::This subdetector " << myDet
52 <<
" is not implemented";
59 for (
unsigned int i(0);
i !=
size; ++
i) {
65 edm::LogInfo(
"TimeDigiInfo") <<
"[EcalTimeDigitizer]::Subdetector " <<
m_subDet <<
"::Reserved size for time digis "
68 #ifdef ecal_time_debug
69 std::cout <<
"[EcalTimeDigitizer]::Subdetector " <<
m_subDet <<
"::Reserved size for time digis " <<
m_vSam.size()
78 for (std::vector<PCaloHit>::const_iterator it =
hits.begin(), itEnd =
hits.end(); it != itEnd; ++it) {
93 const DetId detId((*it).id());
95 double time = (*it).time();
107 #ifdef ecal_time_debug
108 std::cout << (*it).id() <<
"\t" << (*it).depth() <<
"\t" << jitter <<
"\t" << (*it).energy() <<
"\t"
130 for (
unsigned int i(0);
i !=
size; ++
i) {
131 #ifdef ecal_time_debug
146 for (
unsigned int i(0);
i !=
size; ++
i) {
147 #ifdef ecal_time_debug
151 #ifdef ecal_time_debug
162 #ifdef ecal_time_debug
163 std::cout <<
"[EcalTimeMapDigitizer]::Zeroing the used samples" << std::endl;
169 #ifdef ecal_time_debug
170 std::cout <<
"[EcalTimeMapDigitizer]::Finalizing hits and fill output collection" << std::endl;
177 const unsigned int ssize(
m_index.size());
181 for (
unsigned int i(0);
i != ssize; ++
i) {
182 #ifdef ecal_time_debug
183 std::cout <<
"----- in digi loop " <<
i << std::endl;
188 unsigned int nTimeHits = 0;
200 output.back().setSize(nTimeHits);
202 for (
unsigned int j(0);
j != nTimeHits; ++
j)
204 output.back().setSample(
j, timeHits[
j]);
205 if (timeBX[
j] == 0) {
206 #ifdef ecal_time_debug
207 std::cout <<
"setting interesting sample " <<
j << std::endl;
209 output.back().setSampleOfInterest(
j);
213 #ifdef ecal_time_debug
215 if (
output.back().sampleOfInterest() > 0)
218 std::cout <<
"\tNo in time hits" << std::endl;
221 #ifdef ecal_time_debug
222 std::cout <<
"[EcalTimeMapDigitizer]::Output collection size " <<
output.size() << std::endl;
229 assert(
nullptr != cellGeometry);
231 (cellGeometry)->getPosition(
double(layer) + 0.5);
232 return layerPos.
mag() * cm / c_light;
static const float MIN_ENERGY_THRESHOLD
ESHandle< TrackerGeometry > geometry
static const int m_maxBunch
void run(EcalTimeDigiCollection &output)
constexpr bool isNotFinite(T x)
constexpr Detector det() const
get the detector field from this detid
static const int kEcalDepthOffset
std::vector< TimeSamples > m_vSam
void setGeometry(const CaloSubdetectorGeometry *geometry)
TimeSamples * vSamAll(unsigned int i)
static EEDetId detIdFromDenseIndex(uint32_t din)
float tot_energy[time_average_capacity]
void add(const std::vector< PCaloHit > &hits, int bunchCrossing)
unsigned int samplesSizeAll() const
float average_time[time_average_capacity]
const TimeSamples * operator[](unsigned int i) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
EcalTimeMapDigitizer(EcalSubdetector myDet)
static EBDetId detIdFromDenseIndex(uint32_t di)
unsigned int samplesSize() const
double timeOfFlight(const DetId &detId, int layer) const
void blankOutUsedSamples()
unsigned int nhits[time_average_capacity]
virtual ~EcalTimeMapDigitizer()
std::vector< unsigned int > VecInd
TimeSamples * vSam(unsigned int i)
static const int kEcalDepthMask
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
static const int m_minBunch
TimeSamples * findSignal(const DetId &detId)
static const unsigned short time_average_capacity
const CaloSubdetectorGeometry * m_geometry