#include <EcalTimeMapDigitizer.h>
Definition at line 19 of file EcalTimeMapDigitizer.h.
Definition at line 28 of file EcalTimeMapDigitizer.cc.
References cms::cuda::assert(), gather_cfg::cout, DetId::det(), EBDetId::detIdFromDenseIndex(), EEDetId::detIdFromDenseIndex(), EcalBarrel, EcalEndcap, mps_fire::i, EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, m_maxBunch, m_minBunch, m_subDet, m_vSam, findQualityFiles::size, and DetId::subdetId().
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()
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)
Log< level::Info, false > LogInfo
static const int m_minBunch
tuple size
Write out results.
EcalTimeMapDigitizer::~EcalTimeMapDigitizer |
( |
| ) |
|
|
virtual |
void EcalTimeMapDigitizer::add |
( |
const std::vector< PCaloHit > & |
hits, |
|
|
int |
bunchCrossing |
|
) |
| |
Definition at line 76 of file EcalTimeMapDigitizer.cc.
References EcalTimeMapDigitizer::time_average::average_time, gather_cfg::cout, findSignal(), edm::isNotFinite(), PCaloHit::kEcalDepthMask, PCaloHit::kEcalDepthOffset, m_maxBunch, m_minBunch, m_timeLayerId, MIN_ENERGY_THRESHOLD, EcalTimeMapDigitizer::time_average::nhits, mps_fire::result, timeOfFlight(), and EcalTimeMapDigitizer::time_average::tot_energy.
Referenced by EcalTimeDigiProducer::accumulateCaloHits(), and counter.Counter::register().
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"
static const int m_maxBunch
constexpr bool isNotFinite(T x)
static const int kEcalDepthMask
static const int kEcalDepthOffset
static const int m_minBunch
TimeSamples * findSignal(const DetId &detId)
double timeOfFlight(const DetId &detId, int layer) const
static const float MIN_ENERGY_THRESHOLD
void EcalTimeMapDigitizer::blankOutUsedSamples |
( |
| ) |
|
void EcalTimeMapDigitizer::finalizeHits |
( |
| ) |
|
Definition at line 141 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().
146 for (
unsigned int i(0);
i !=
size; ++
i) {
147 #ifdef ecal_time_debug
151 #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]
tuple size
Write out results.
int EcalTimeMapDigitizer::getTimeLayerId |
( |
| ) |
|
|
inline |
void EcalTimeMapDigitizer::initializeMap |
( |
| ) |
|
int EcalTimeMapDigitizer::maxBunch |
( |
| ) |
const |
int EcalTimeMapDigitizer::minBunch |
( |
| ) |
const |
Definition at line 168 of file EcalTimeMapDigitizer.cc.
References EcalTimeMapDigitizer::time_average::average_time, edm::SortedCollection< T, SORT >::back(), gather_cfg::cout, finalizeHits(), mps_fire::i, dqmiolumiharvest::j, m_index, m_minBunch, EcalTimeMapDigitizer::time_average::nhits, edm::SortedCollection< T, SORT >::push_back(), edm::SortedCollection< T, SORT >::reserve(), edm::SortedCollection< T, SORT >::size(), EcalTimeMapDigitizer::time_average::time_average_capacity, and vSamAll().
Referenced by EcalTimeDigiProducer::finalizeEvent().
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
214 std::cout <<
"digi " << output.
back().id().rawId() <<
"\t" << output.
back().size();
215 if (output.
back().sampleOfInterest() > 0)
216 std::cout <<
"\tBX0 time " << output.
back().sample(output.
back().sampleOfInterest()) << std::endl;
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;
void push_back(T const &t)
unsigned int nhits[time_average_capacity]
TimeSamples * vSamAll(unsigned int i)
static const unsigned short time_average_capacity
static const int m_minBunch
float average_time[time_average_capacity]
void reserve(size_type n)
const_reference back() const
unsigned int EcalTimeMapDigitizer::samplesSize |
( |
| ) |
const |
|
private |
unsigned int EcalTimeMapDigitizer::samplesSizeAll |
( |
| ) |
const |
|
private |
void EcalTimeMapDigitizer::setTimeLayerId |
( |
const int & |
layerId | ) |
|
|
inline |
double EcalTimeMapDigitizer::timeOfFlight |
( |
const DetId & |
detId, |
|
|
int |
layer |
|
) |
| const |
|
private |
const int EcalTimeMapDigitizer::BUNCHSPACE = 25 |
|
staticprivate |
VecInd EcalTimeMapDigitizer::m_index |
|
private |
const int EcalTimeMapDigitizer::m_maxBunch = 5 |
|
staticprivate |
const int EcalTimeMapDigitizer::m_minBunch = -4 |
|
staticprivate |
int EcalTimeMapDigitizer::m_timeLayerId |
|
private |
const float EcalTimeMapDigitizer::MIN_ENERGY_THRESHOLD |
|
staticprivate |