#include <EcalTimeMapDigitizer.h>
Definition at line 20 of file EcalTimeMapDigitizer.h.
◆ Digi
◆ TimeSamples
◆ VecInd
◆ EcalTimeMapDigitizer()
Definition at line 29 of file EcalTimeMapDigitizer.cc.
References cms::cuda::assert(), gather_cfg::cout, EBDetId::detIdFromDenseIndex(), EEDetId::detIdFromDenseIndex(), EcalBarrel, EcalEndcap, mps_fire::i, EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, m_index, m_maxBunch, m_minBunch, m_subDet, m_vSam, and findQualityFiles::size.
42 unsigned int size = 0;
50 edm::LogError(
"TimeDigiError") <<
"[EcalTimeMapDigitizer]::ERROR::This subdetector " << myDet
51 <<
" is not implemented";
59 for (
unsigned int i(0);
i !=
size; ++
i) {
69 edm::LogInfo(
"TimeDigiInfo") <<
"[EcalTimeDigitizer]::Subdetector " <<
m_subDet <<
"::Reserved size for time digis " 72 #ifdef ecal_time_debug 73 std::cout <<
"[EcalTimeDigitizer]::Subdetector " <<
m_subDet <<
"::Reserved size for time digis " <<
m_vSam.size()
static EEDetId detIdFromDenseIndex(uint32_t din)
static const int m_maxBunch
const CaloSubdetectorGeometry * m_geometry
Log< level::Error, false > LogError
std::vector< TimeSamples > m_vSam
static EBDetId detIdFromDenseIndex(uint32_t di)
ComponentShapeCollection * m_ComponentShapes
Log< level::Info, false > LogInfo
static const int m_minBunch
◆ ~EcalTimeMapDigitizer()
EcalTimeMapDigitizer::~EcalTimeMapDigitizer |
( |
| ) |
|
|
virtual |
◆ add()
void EcalTimeMapDigitizer::add |
( |
const std::vector< PCaloHit > & |
hits, |
|
|
int |
bunchCrossing |
|
) |
| |
Definition at line 80 of file EcalTimeMapDigitizer.cc.
References ComponentShapeCollection::at(), newFWLiteAna::bin, gather_cfg::cout, hcalRecHitTable_cff::detId, findSignal(), hfClusterShapes_cfi::hits, edm::isNotFinite(), m_ComponentShapes, m_maxBunch, m_minBunch, m_timeLayerId, ComponentShapeCollection::maxDepthBin(), MIN_ENERGY_THRESHOLD, mps_fire::result, shapes(), hcalRecHitTable_cff::time, timeOfFlight(), and ComponentShapeCollection::toDepthBin().
Referenced by EcalTimeDigiProducer::accumulateCaloHits(), and counter.Counter::register().
82 for (std::vector<PCaloHit>::const_iterator it =
hits.begin(), itEnd =
hits.end(); it != itEnd; ++it) {
97 double time = (*it).time();
110 (*(
shapes()->
at((*it).depth())))(binTime - jitter - 25 * (bunchCrossing -
m_minBunch)) * (*it).energy();
112 #ifdef waveform_debug 117 binTime +=
result.waveform_granularity;
130 #ifdef ecal_time_debug 131 std::cout << (*it).id() <<
"\t" << (*it).depth() <<
"\t" << jitter <<
"\t" << (*it).energy() <<
"\t"
static const int m_maxBunch
constexpr bool isNotFinite(T x)
const ComponentShapeCollection * shapes() const
double timeOfFlight(const DetId &detId, int layer) const
ComponentShapeCollection * m_ComponentShapes
static const int m_minBunch
static int toDepthBin(int index)
TimeSamples * findSignal(const DetId &detId)
const std::shared_ptr< ComponentShape > at(int depthIndex) const
static const float MIN_ENERGY_THRESHOLD
◆ blankOutUsedSamples()
void EcalTimeMapDigitizer::blankOutUsedSamples |
( |
| ) |
|
◆ finalizeHits()
void EcalTimeMapDigitizer::finalizeHits |
( |
| ) |
|
Definition at line 163 of file EcalTimeMapDigitizer.cc.
References EcalTimeMapDigitizer::time_average::average_time, EcalTimeMapDigitizer::time_average::calculateAverage(), gather_cfg::cout, mps_fire::i, dqmiolumiharvest::j, m_index, EcalTimeMapDigitizer::time_average::nhits, findQualityFiles::size, EcalTimeMapDigitizer::time_average::time_average_capacity, EcalTimeMapDigitizer::time_average::tot_energy, and vSamAll().
Referenced by run().
168 for (
unsigned int i(0);
i !=
size; ++
i) {
169 #ifdef ecal_time_debug 173 #ifdef ecal_time_debug
unsigned int nhits[time_average_capacity]
TimeSamples * vSamAll(unsigned int i)
static const unsigned short time_average_capacity
float average_time[time_average_capacity]
float tot_energy[time_average_capacity]
◆ findSignal()
◆ getTimeLayerId()
int EcalTimeMapDigitizer::getTimeLayerId |
( |
| ) |
|
|
inline |
◆ index() [1/2]
◆ index() [2/2]
◆ initializeMap()
void EcalTimeMapDigitizer::initializeMap |
( |
| ) |
|
◆ maxBunch()
int EcalTimeMapDigitizer::maxBunch |
( |
| ) |
const |
◆ minBunch()
int EcalTimeMapDigitizer::minBunch |
( |
| ) |
const |
◆ operator[]() [1/2]
◆ operator[]() [2/2]
◆ run()
Definition at line 201 of file EcalTimeMapDigitizer.cc.
References EcalTimeMapDigitizer::time_average::average_time, gather_cfg::cout, finalizeHits(), mps_fire::i, dqmiolumiharvest::j, m_ComponentShapes, m_index, m_minBunch, nhits, convertSQLitetoXML_cfg::output, EcalTimeMapDigitizer::time_average::time_average_capacity, and vSamAll().
Referenced by EcalTimeDigiProducer::finalizeEvent().
202 #ifdef ecal_time_debug 203 std::cout <<
"[EcalTimeMapDigitizer]::Finalizing hits and fill output collection" << std::endl;
210 const unsigned int ssize(
m_index.size());
214 for (
unsigned int i(0);
i != ssize; ++
i) {
215 #ifdef ecal_time_debug 216 std::cout <<
"----- in digi loop " <<
i << std::endl;
223 unsigned int nTimeHits = 0;
225 float timeHits[nTimeHitsMax];
226 unsigned int timeBX[nTimeHitsMax];
228 for (
unsigned int j(0);
j != nTimeHitsMax; ++
j)
237 output.back().setSize(nTimeHits);
239 for (
unsigned int j(0);
j != nTimeHits; ++
j)
241 output.back().setSample(
j, timeHits[
j]);
242 if (timeBX[
j] == 0) {
243 #ifdef ecal_time_debug 244 std::cout <<
"setting interesting sample " <<
j << std::endl;
246 output.back().setSampleOfInterest(
j);
250 #ifdef ecal_time_debug 252 if (
output.back().sampleOfInterest() > 0)
255 std::cout <<
"\tNo in time hits" << std::endl;
258 #ifdef ecal_time_debug 259 std::cout <<
"[EcalTimeMapDigitizer]::Output collection size " <<
output.size() << std::endl;
ComponentShapeCollection * m_ComponentShapes
TimeSamples * vSamAll(unsigned int i)
static const unsigned short time_average_capacity
static const int m_minBunch
float average_time[time_average_capacity]
◆ samplesSize()
unsigned int EcalTimeMapDigitizer::samplesSize |
( |
| ) |
const |
|
private |
◆ samplesSizeAll()
unsigned int EcalTimeMapDigitizer::samplesSizeAll |
( |
| ) |
const |
|
private |
◆ setEventSetup()
void EcalTimeMapDigitizer::setEventSetup |
( |
const edm::EventSetup & |
eventSetup | ) |
|
◆ setGeometry()
◆ setTimeLayerId()
void EcalTimeMapDigitizer::setTimeLayerId |
( |
const int & |
layerId | ) |
|
|
inline |
◆ shapes()
◆ subdetector()
◆ timeOfFlight()
double EcalTimeMapDigitizer::timeOfFlight |
( |
const DetId & |
detId, |
|
|
int |
layer |
|
) |
| const |
|
private |
◆ vSam()
◆ vSamAll() [1/2]
◆ vSamAll() [2/2]
◆ BUNCHSPACE
const int EcalTimeMapDigitizer::BUNCHSPACE = 25 |
|
staticprivate |
◆ m_ComponentShapes
◆ m_geometry
◆ m_index
VecInd EcalTimeMapDigitizer::m_index |
|
private |
◆ m_maxBunch
const int EcalTimeMapDigitizer::m_maxBunch = 5 |
|
staticprivate |
◆ m_minBunch
const int EcalTimeMapDigitizer::m_minBunch = -4 |
|
staticprivate |
◆ m_subDet
◆ m_timeLayerId
int EcalTimeMapDigitizer::m_timeLayerId |
|
private |
◆ m_vSam
◆ MIN_ENERGY_THRESHOLD
const float EcalTimeMapDigitizer::MIN_ENERGY_THRESHOLD |
|
staticprivate |