#include <LatencyTask.h>
Public Member Functions | |
LatencyTask (DQMStore *, const FedChannelConnection &) | |
virtual | ~LatencyTask () |
Private Member Functions | |
virtual void | book () |
virtual void | fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) |
virtual void | update () |
Private Attributes | |
HistoSet | clusterPartition_ |
int | firstReading_ |
HistoSet | timingPartition_ |
Static Private Attributes | |
static HistoSet | cluster_ |
static HistoSet | timing_ |
Definition at line 11 of file LatencyTask.h.
LatencyTask::LatencyTask | ( | DQMStore * | dqm, |
const FedChannelConnection & | conn | ||
) |
Definition at line 19 of file LatencyTask.cc.
References LogDebug.
: CommissioningTask( dqm, conn, "LatencyTask" ),firstReading_(-1) { LogDebug("Commissioning") << "[LatencyTask::LatencyTask] Constructing object..."; }
LatencyTask::~LatencyTask | ( | ) | [virtual] |
Definition at line 28 of file LatencyTask.cc.
References LogDebug.
{ LogDebug("Commissioning") << "[LatencyTask::LatencyTask] Destructing object..."; }
void LatencyTask::book | ( | ) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 34 of file LatencyTask.cc.
References sistrip::APV_LATENCY, cluster_, sistrip::extrainfo::clusterCharge_, clusterPartition_, CommissioningTask::connection(), sistrip::DET_KEY, CommissioningTask::dqm(), sistrip::EXPERT_HISTO, HIGHBIN, CommissioningTask::HistoSet::histo(), CommissioningTask::HistoSet::isProfile_, SiStripKey::key(), LogDebug, LOWBIN, NBINS, sistrip::extrainfo::occupancy_, sistrip::PARTITION, SiStripKey::path(), DQMStore::pwd(), DQMStore::setCurrentFolder(), timing_, timingPartition_, indexGen::title, sistripsummary::TRACKER, CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.
{ LogDebug("Commissioning") << "[LatencyTask::book]"; std::string title; int nBins = NBINS; SiStripDetKey detkeytracker((uint32_t) 0); SiStripDetKey detkeypartition((uint16_t) (connection().fecCrate())); // see if the global timing histogram is already booked if (timing_.histo()) { // if already booked, use it LogDebug("Commissioning") << "[LatencyTask::book] using existing histogram."; } else { // make a new histo on the tracker level if not existing yet LogDebug("Commissioning") << "[LatencyTask::book] booking a new histogram in " << dqm()->pwd(); // construct the histo title title = SiStripHistoTitle( sistrip::EXPERT_HISTO, sistrip::APV_LATENCY, sistrip::DET_KEY, detkeytracker.key(), sistrip::TRACKER, 0, sistrip::extrainfo::clusterCharge_ ).title(); dqm()->setCurrentFolder( detkeytracker.path() ); timing_.histo( dqm()->bookProfile( title, title, // name and title nBins, LOWBIN, HIGHBIN, // binning + range 100, 0., -1., "s" ) ); // Y range : automatic timing_.vNumOfEntries_.resize(nBins,0); timing_.vSumOfContents_.resize(nBins,0); timing_.vSumOfSquares_.resize(nBins,0); } // make a new histo on the partition level if not existing yet LogDebug("Commissioning") << "[LatencyTask::book] booking a new histogram in " << dqm()->pwd(); // histo title title = SiStripHistoTitle( sistrip::EXPERT_HISTO, sistrip::APV_LATENCY, sistrip::DET_KEY, detkeypartition.key(), sistrip::PARTITION, 0, sistrip::extrainfo::clusterCharge_ ).title(); dqm()->setCurrentFolder( detkeypartition.path() ); timingPartition_.histo( dqm()->bookProfile( title, title, // name and title nBins, LOWBIN, HIGHBIN, // binning + range 100, 0., -1., "s" ) ); // Y range : automatic timingPartition_.vNumOfEntries_.resize(nBins,0); timingPartition_.vSumOfContents_.resize(nBins,0); timingPartition_.vSumOfSquares_.resize(nBins,0); // see if the global cluster histogram is already booked if (cluster_.histo()) { // if already booked, use it LogDebug("Commissioning") << "[LatencyTask::book] using existing histogram."; } else { // make a new histo on the tracker level if not existing yet LogDebug("Commissioning") << "[LatencyTask::book] booking a new histogram in " << dqm()->pwd(); // construct the histo title title = SiStripHistoTitle( sistrip::EXPERT_HISTO, sistrip::APV_LATENCY, sistrip::DET_KEY, detkeytracker.key(), sistrip::TRACKER, 0, sistrip::extrainfo::occupancy_).title(); dqm()->setCurrentFolder( detkeytracker.path() ); cluster_.histo( dqm()->book1D( title, title, // name and title nBins, LOWBIN, HIGHBIN )); // binning + range cluster_.isProfile_ = false; cluster_.vNumOfEntries_.resize(nBins,0); cluster_.vSumOfContents_.resize(nBins,0); cluster_.vSumOfSquares_.resize(nBins,0); } // make a new histo on the partition level if not existing yet LogDebug("Commissioning") << "[LatencyTask::book] booking a new histogram in " << dqm()->pwd(); // histo title title = SiStripHistoTitle( sistrip::EXPERT_HISTO, sistrip::APV_LATENCY, sistrip::DET_KEY, detkeypartition.key(), sistrip::PARTITION, 0, sistrip::extrainfo::occupancy_ ).title(); dqm()->setCurrentFolder( detkeypartition.path() ); clusterPartition_.histo( dqm()->book1D( title, title, // name and title nBins, LOWBIN, HIGHBIN ) ); // binning + range clusterPartition_.isProfile_ = false; clusterPartition_.vNumOfEntries_.resize(nBins,0); clusterPartition_.vSumOfContents_.resize(nBins,0); clusterPartition_.vSumOfSquares_.resize(nBins,0); LogDebug("Commissioning") << "[LatencyTask::book] done"; }
void LatencyTask::fill | ( | const SiStripEventSummary & | summary, |
const edm::DetSet< SiStripRawDigi > & | digis | ||
) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 129 of file LatencyTask.cc.
References newFWLiteAna::bin, cluster_, clusterPartition_, edm::DetSet< T >::data, firstReading_, HIGHBIN, LogDebug, LOWBIN, NBINS, strip(), summarizeEdmComparisonLogfiles::summary, timing_, timingPartition_, and CommissioningTask::updateHistoSet().
{ LogDebug("Commissioning") << "[LatencyTask::fill]"; // retrieve the delay from the EventSummary int32_t delay = static_cast<int32_t>( const_cast<SiStripEventSummary&>(summary).latency() ); if(firstReading_==-1) firstReading_ = delay; float correctedDelay = 0.; LogDebug("Commissioning") << "[LatencyTask::fill]; the delay is " << delay; // loop on the strips to find the (maybe) non-zero digi unsigned int nclusters = 0; for(unsigned int strip=0;strip<digis.data.size();strip++) { if(digis.data[strip].adc()!=0) { // count the "cluster" ++nclusters; // no TOF correction is applied. // 2 reasons: the effect is a priori to thin to be seen with 25ns steps // and it biases the result by one clock due to the 25bins in the HistoSet correctedDelay = delay*(-25.); // no TOF correction is applied. // compute the bin int bin = int((correctedDelay-LOWBIN)/((HIGHBIN-LOWBIN)/NBINS)); LogDebug("Commissioning") << "[LatencyTask::fill]; using a hit with value " << ( digis.data[strip].adc()&0xff ) << " at corrected delay of " << correctedDelay << " in bin " << bin ; updateHistoSet( timing_,bin,digis.data[strip].adc()&0xff); LogDebug("Commissioning") << "HistoSet timing Updated " << strip << " " << digis.data.size(); updateHistoSet( timingPartition_,bin,digis.data[strip].adc()&0xff); LogDebug("Commissioning") << "HistoSet timingPartition Updated " << strip << " " << digis.data.size(); } } // set the occupancy int bin = int((delay*(-25.)-LOWBIN)/((HIGHBIN-LOWBIN)/NBINS)); LogDebug("Commissioning") << "[LatencyTask::fill]; occupancy is " << nclusters; updateHistoSet( cluster_,bin,nclusters ); updateHistoSet( clusterPartition_,bin,nclusters ); }
void LatencyTask::update | ( | void | ) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 167 of file LatencyTask.cc.
References cluster_, clusterPartition_, LogDebug, timing_, timingPartition_, and CommissioningTask::updateHistoSet().
{ LogDebug("Commissioning") << "[LatencyTask::update]"; updateHistoSet( timing_ ); updateHistoSet( timingPartition_ ); updateHistoSet( cluster_ ); updateHistoSet( clusterPartition_ ); }
CommissioningTask::HistoSet LatencyTask::cluster_ [static, private] |
Definition at line 26 of file LatencyTask.h.
HistoSet LatencyTask::clusterPartition_ [private] |
Definition at line 28 of file LatencyTask.h.
int LatencyTask::firstReading_ [private] |
Definition at line 29 of file LatencyTask.h.
Referenced by fill().
CommissioningTask::HistoSet LatencyTask::timing_ [static, private] |
Definition at line 25 of file LatencyTask.h.
HistoSet LatencyTask::timingPartition_ [private] |
Definition at line 27 of file LatencyTask.h.