53 peds_[0].isProfile_ =
true;
71 peds_[1].isProfile_ =
true;
92 for (uint16_t iapv = 0; iapv < 2; iapv++) {
103 cm_[iapv].isProfile_ =
false;
105 cm_[iapv].vNumOfEntries_.resize(
nbins, 0);
106 cm_[iapv].vNumOfEntries_.resize(
nbins, 0);
167 <<
" Unexpected number of digis (" << digis.
data.size()
168 <<
") wrt number of histogram bins (" <<
nBins_ <<
")!";
173 for (uint16_t ibin = 0; ibin <
bins; ibin++) {
179 uint16_t
nbins =
peds_[0].vNumOfEntries_.size();
184 uint16_t napvs =
nbins / 128;
185 std::vector<uint32_t> cm;
189 std::vector<uint16_t>
adc;
190 for (uint16_t iapv = 0; iapv < napvs; iapv++) {
194 for (uint16_t ibin = 0; ibin < 128; ibin++) {
195 if ((iapv * 128) + ibin <
nbins) {
196 adc.push_back(digis.
data[(iapv * 128) + ibin].adc());
201 uint16_t
index =
adc.size() % 2 ?
adc.size() / 2 :
adc.size() / 2 - 1;
203 cm[iapv] =
static_cast<uint32_t
>(
adc[
index]);
207 for (uint16_t ibin = 0; ibin <
nbins; ibin++) {
208 float digiVal = digis.
data[ibin].adc();
210 float diff = digiVal -
static_cast<float>(cm[ibin / 128]);
214 if (cm.size() <
cm_.size()) {
216 <<
" Fewer CM values than expected: " << cm.size();
238 <<
" Unexpected number of digis (" << digis.
data.size()
239 <<
") wrt number of histogram bins (" <<
nBins_ <<
")!";
244 for (uint16_t ibin = 0; ibin <
bins; ibin++) {
250 uint16_t
nbins =
peds_[0].vNumOfEntries_.size();
255 uint16_t napvs =
nbins / 128;
256 std::vector<uint32_t> cm;
260 std::vector<uint16_t>
adc;
261 for (uint16_t iapv = 0; iapv < napvs; iapv++) {
264 for (uint16_t ibin = 0; ibin < 128; ibin++) {
265 if ((iapv * 128) + ibin <
nbins) {
266 adc.push_back(digis.
data[(iapv * 128) + ibin].adc());
270 uint16_t
index =
adc.size() % 2 ?
adc.size() / 2 :
adc.size() / 2 - 1;
272 cm[iapv] =
static_cast<uint32_t
>(
adc[
index]);
277 for (uint16_t ibin = 0; ibin <
nbins; ibin++) {
278 float digiVal = digis.
data[ibin].adc();
280 float diff = digiVal -
static_cast<float>(cm[ibin / 128]);
284 if (cm.size() <
cm_.size()) {
286 <<
" Fewer CM values than expected: " << cm.size();
293 for (uint16_t ibin = 0; ibin <
bins; ibin++) {
298 std::vector<uint32_t> adcHeader_high;
299 std::vector<uint32_t> adcHeader_low;
301 float threshold_high = (digisAlt.
data[286].adc() + digisAlt.
data[287].adc()) / 4;
302 float threshold_low = 100;
303 int minNumberForHeader = 4;
304 bool goodHeaderFound =
false;
305 int nConsecutiveHigh = 0;
306 adcHeader_high.clear();
307 adcHeader_high.reserve(30);
308 adcHeader_low.clear();
309 adcHeader_low.reserve(30);
311 for (uint16_t ibin = 6; ibin < 11; ibin++) {
312 if (digisAlt.
data[ibin].adc() > threshold_high) {
317 if (nConsecutiveHigh > minNumberForHeader)
318 goodHeaderFound =
true;
319 if (goodHeaderFound ==
false)
321 for (uint16_t ibin = 0; ibin < 30; ibin++) {
322 if (digisAlt.
data[ibin].adc() > threshold_high &&
324 adcHeader_high.push_back(digisAlt.
data[ibin].adc());
326 if (digisAlt.
data[ibin].adc() < threshold_low && goodHeaderFound) {
327 adcHeader_low.push_back(digisAlt.
data[ibin].adc());
330 if (adcHeader_low.empty() || adcHeader_high.empty()) {
333 for (uint16_t
i = 0;
i < adcHeader_low.size();
i++) {
336 for (uint16_t
i = 0;
i < adcHeader_high.size();
i++) {
347 const std::vector<uint16_t>& stripOnCluster) {
357 <<
" Unexpected number of digis (" << digis.
data.size()
358 <<
") wrt number of histogram bins (" <<
nBins_ <<
")!";
363 for (uint16_t ibin = 0; ibin <
bins; ibin++) {
368 uint16_t
nbins =
peds_[0].vNumOfEntries_.size();
372 uint16_t napvs =
nbins / 128;
373 std::vector<uint32_t> cm;
376 std::vector<uint16_t>
adc;
377 for (uint16_t iapv = 0; iapv < napvs; iapv++) {
380 for (uint16_t ibin = 0; ibin < 128; ibin++) {
381 if ((iapv * 128) + ibin <
nbins) {
382 if (
std::find(stripOnCluster.begin(), stripOnCluster.end(), (iapv * 128) + ibin) ==
383 stripOnCluster.end())
384 adc.push_back(digis.
data[(iapv * 128) + ibin].adc());
388 uint16_t
index =
adc.size() % 2 ?
adc.size() / 2 :
adc.size() / 2 - 1;
390 cm[iapv] =
static_cast<uint32_t
>(
adc[
index]);
395 for (uint16_t ibin = 0; ibin <
nbins; ibin++) {
396 if (
std::find(stripOnCluster.begin(), stripOnCluster.end(), ibin) != stripOnCluster.end()) {
399 float digiVal = digis.
data[ibin].adc();
401 float diff = digiVal -
static_cast<float>(cm[ibin / 128]);
405 if (cm.size() <
cm_.size()) {
407 <<
" Fewer CM values than expected: " << cm.size();
414 for (uint16_t ibin = 0; ibin <
bins; ibin++) {
418 std::vector<uint32_t> adcHeader_high;
419 std::vector<uint32_t> adcHeader_low;
421 float threshold_high = (digisAlt.
data[286].adc() + digisAlt.
data[287].adc()) / 4;
422 float threshold_low = 120;
423 int minNumberForHeader = 4;
424 bool goodHeaderFound =
false;
425 int nConsecutiveHigh = 0;
426 adcHeader_high.clear();
427 adcHeader_high.reserve(30);
428 adcHeader_low.clear();
429 adcHeader_low.reserve(30);
431 for (uint16_t ibin = 6; ibin < 11; ibin++) {
432 if (digisAlt.
data[ibin].adc() > threshold_high) {
437 if (nConsecutiveHigh > minNumberForHeader)
438 goodHeaderFound =
true;
439 if (goodHeaderFound ==
false)
441 for (uint16_t ibin = 0; ibin < 30; ibin++) {
442 if (digisAlt.
data[ibin].adc() > threshold_high &&
444 adcHeader_high.push_back(digisAlt.
data[ibin].adc());
446 if (digisAlt.
data[ibin].adc() < threshold_low && goodHeaderFound) {
447 adcHeader_low.push_back(digisAlt.
data[ibin].adc());
450 if (adcHeader_low.empty() || adcHeader_high.empty()) {
453 for (uint16_t
i = 0;
i < adcHeader_low.size();
i++) {
456 for (uint16_t
i = 0;
i < adcHeader_high.size();
i++) {
470 for (uint16_t
ii = 0;
ii <
peds_[1].vNumOfEntries_.size(); ++
ii) {
473 float entries =
peds_[1].vNumOfEntries_[
ii];
479 float noise = spread;
std::vector< float > vNumOfEntries_
T getParameter(std::string const &) const
edm::ParameterSet parameters_
parameters useful for the spy
Utility class that holds histogram title.
DaqScopeModeTask(DQMStore *, const FedChannelConnection &, const edm::ParameterSet &)
static const char mlDqmSource_[]
std::vector< float > vSumOfContents_
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
std::vector< HistoSet > peds_
const uint32_t & fillCntr() const
Class containning control, module, detector and connection information, at the level of a FED channel...
void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
static void setBinContent(TProfile *const profile, const uint32_t &bin, const double &entries, const double &mean, const double &spread)
const uint32_t & fedKey() const
std::vector< HistoSet > cm_
DQMStore *const dqm() const
int extract(std::vector< int > *output, const std::string &dati)
~DaqScopeModeTask() override
void histo(MonitorElement *)
std::vector< double > vSumOfSquares_
const uint32_t & updateFreq() const
const std::string & title() const
const FedChannelConnection & connection() const
Log< level::Warning, false > LogWarning
uint16_t *__restrict__ uint16_t const *__restrict__ adc