#include <EcalTimeMapDigitizer.h>
Definition at line 19 of file EcalTimeMapDigitizer.h.
Definition at line 27 of file EcalTimeMapDigitizer.cc.
References assert(), gather_cfg::cout, DetId::det(), EBDetId::detIdFromDenseIndex(), EEDetId::detIdFromDenseIndex(), EcalBarrel, EcalEndcap, i, EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, m_maxBunch, m_minBunch, m_subDet, m_vSam, findQualityFiles::size, and DetId::subdetId().
57 edm::LogError(
"TimeDigiError") <<
"[EcalTimeMapDigitizer]::ERROR::This subdetector " << myDet <<
" is not implemented";
65 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
73 edm::LogInfo(
"TimeDigiInfo") <<
"[EcalTimeDigitizer]::Subdetector " <<
m_subDet <<
"::Reserved size for time digis " <<
m_vSam.size();
75 #ifdef ecal_time_debug
76 std::cout <<
"[EcalTimeDigitizer]::Subdetector " <<
m_subDet <<
"::Reserved size for time digis " <<
m_vSam.size() << std::endl;
static EEDetId detIdFromDenseIndex(uint32_t din)
static const int m_maxBunch
const CaloSubdetectorGeometry * m_geometry
std::vector< TimeSamples > m_vSam
static EBDetId detIdFromDenseIndex(uint32_t di)
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 86 of file EcalTimeMapDigitizer.cc.
References EcalTimeMapDigitizer::time_average::average_time, gather_cfg::cout, findSignal(), edm::isNotFinite(), 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().
89 for(std::vector<PCaloHit>::const_iterator it = hits.begin(), itEnd = hits.end(); it != itEnd; ++it) {
102 const DetId detId ( (*it).id() ) ;
104 double time = (*it).time();
116 #ifdef ecal_time_debug
static const int m_maxBunch
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 162 of file EcalTimeMapDigitizer.cc.
References EcalTimeMapDigitizer::time_average::average_time, EcalTimeMapDigitizer::time_average::calculateAverage(), gather_cfg::cout, i, 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 )
170 #ifdef ecal_time_debug
174 #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 195 of file EcalTimeMapDigitizer.cc.
References EcalTimeMapDigitizer::time_average::average_time, edm::SortedCollection< T, SORT >::back(), gather_cfg::cout, finalizeHits(), i, 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().
197 #ifdef ecal_time_debug
198 std::cout <<
"[EcalTimeMapDigitizer]::Finalizing hits and fill output collection" << std::endl;
205 const unsigned int ssize (
m_index.size() ) ;
209 for(
unsigned int i ( 0 ) ;
i != ssize ; ++
i )
212 #ifdef ecal_time_debug
213 std::cout <<
"----- in digi loop " <<
i << std::endl;
218 unsigned int nTimeHits=0;
231 output.
back().setSize(nTimeHits);
233 for (
unsigned int j ( 0 ) ;
j != nTimeHits; ++
j )
235 output.
back().setSample(
j,timeHits[
j]);
238 #ifdef ecal_time_debug
239 std::cout <<
"setting interesting sample " << j << std::endl;
241 output.
back().setSampleOfInterest(j);
245 #ifdef ecal_time_debug
246 std::cout <<
"digi " << output.
back().id().rawId() <<
"\t" << output.
back().size();
247 if (output.
back().sampleOfInterest()>0)
248 std::cout <<
"\tBX0 time " << output.
back().sample(output.
back().sampleOfInterest()) << std::endl;
250 std::cout <<
"\tNo in time hits" << std::endl;
253 #ifdef ecal_time_debug
254 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 =5e-5 |
|
staticprivate |