44 const double NORBITS_PER_LS = 262144.;
51 show_mechanical_structure_view(
true),
52 show_readout_view(
false),
53 show_control_view(
false),
54 select_all_detectors(
true),
55 reset_each_run(
false),
216 edm::LogInfo(
"SiStripMonitorDigi") <<
"SiStripMonitorDigi::bookHistograms: "
217 <<
" Creating MEs for new Cabling ";
221 edm::LogInfo(
"SiStripMonitorDigi") <<
"SiStripMonitorDigi::bookHistograms: "
222 <<
" Resetting MEs ";
223 for (std::map<uint32_t, ModMEs>::const_iterator idet =
DigiMEs.begin(); idet !=
DigiMEs.end(); idet++) {
253 std::vector<int> FedsInIds = sumFED->
m_fed_in;
254 for (
unsigned int it = 0; it < FedsInIds.size(); ++it) {
255 int fedID = FedsInIds[it];
258 if (fedID >= 50 && fedID <= 133)
260 if (fedID >= 134 && fedID <= 148)
262 if (fedID >= 149 && fedID <= 163)
264 if (fedID >= 164 && fedID <= 259)
266 if (fedID >= 260 && fedID <= 355)
268 if (fedID >= 356 && fedID <= 489)
279 bool isStableBeams =
false;
280 return std::make_shared<bool>(isStableBeams);
286 const bool isStableBeams = luminosityBlockCache(lb.
index());
293 int nFeds[6] = {96, 96, 84, 15, 15, 134};
297 for (
int ibin = 1; ibin < 7; ibin++) {
307 (
float)nFedsConnected[ibin - 1] / nFeds[ibin - 1] > 0.5 &&
value < 50.) {
328 std::vector<uint32_t> activeDets;
333 for (std::vector<uint32_t>::iterator idets = activeDets.begin(); idets != activeDets.end(); idets++) {
335 activeDets.erase(idets);
349 std::make_unique<TkHistoMap>(tkDetMap, ibooker,
topFolderName_,
"TkHMap_NStripApvShots", 0.0,
true);
352 std::make_unique<TkHistoMap>(tkDetMap, ibooker,
topFolderName_,
"TkHMap_MedianChargeApvShots", 0.0,
true);
354 std::vector<uint32_t> tibDetIds;
357 edm::LogInfo(
"SiStripTkDQM|SiStripMonitorDigi") <<
"nr. of activeDets: " << activeDets.size();
358 for (std::vector<uint32_t>::const_iterator detid_iterator = activeDets.begin(); detid_iterator != activeDets.end();
360 uint32_t detid = (*detid_iterator);
379 DigiMEs.insert(std::make_pair(detid, local_modmes));
388 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(
label);
391 int32_t lnumber = det_layer_pair.second;
392 std::vector<uint32_t> layerDetIds;
393 if (det_layer_pair.first ==
"TIB") {
395 }
else if (det_layer_pair.first ==
"TOB") {
397 }
else if (det_layer_pair.first ==
"TID" && lnumber > 0) {
399 }
else if (det_layer_pair.first ==
"TID" && lnumber < 0) {
401 }
else if (det_layer_pair.first ==
"TEC" && lnumber > 0) {
403 }
else if (det_layer_pair.first ==
"TEC" && lnumber < 0) {
428 const char*
HistoName =
"Summary Mean Apv shots for SubDets";
442 const char*
HistoName =
"NApv_Shots_vs_Time";
461 const char*
HistoName =
"Number_of_Strips_in_Apv_Shots";
473 const char*
HistoName =
"Number_of_Apv_Shots";
486 const char*
HistoName =
"Apv_Shots_Charge_Median";
499 const char*
HistoName =
"Apv_Shots_Apv_Number";
511 const char*
HistoName =
"NumberOfDigisinFED_v_FEDID";
533 std::stringstream
ss;
539 const char*
HistoName =
"NumberOfDigisInLastLS";
557 Parameters.getParameter<int32_t>(
"Nbins") + 1,
593 std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > >::const_iterator iToken =
599 iEvent.getByToken(*iToken, digi_handle);
607 iSubdet->second.totNDigis = 0;
608 iSubdet->second.SubDetApvShots.clear();
611 std::map<int, int> FEDID_v_digisum;
618 std::vector<uint32_t> layer_dets = iterLayer->second;
619 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(layer_label);
627 local_layermes = iLayerME->second;
629 int largest_adc_layer = 0;
630 int smallest_adc_layer = 99999;
639 for (std::vector<uint32_t>::const_iterator iterDets = layer_dets.begin(); iterDets != layer_dets.end();
644 uint32_t detid = (*iterDets);
647 if (subdet_label.empty())
652 std::map<uint32_t, ModMEs>::iterator
pos =
DigiMEs.find(detid);
671 int good_fcc_index = -999;
672 for (
unsigned int x = 0;
x < fedConnections.size();
x++) {
673 if (fedConnections[
x] !=
nullptr) {
678 if (fedConnections[good_fcc_index] !=
nullptr) {
679 int temp_fedid = fedConnections[good_fcc_index]->fedId();
680 if (FEDID_v_digisum.find(temp_fedid) != FEDID_v_digisum.end()) {
681 if (ndigi_det < 1000 && ndigi_det > 0) {
682 FEDID_v_digisum[temp_fedid] = FEDID_v_digisum.find(temp_fedid)->second + ndigi_det;
685 if (ndigi_det < 1000 && ndigi_det > 0) {
686 FEDID_v_digisum[temp_fedid] = ndigi_det;
691 <<
"SiStripMonitorDigi::analyze WARNING! no good connections for detid = " << detid << std::endl;
696 const std::vector<APVShot>& shots = theShotFinder.
getShots();
720 ndigi_layer += ndigi_det;
723 int largest_adc = (digi_detset.
data.begin())->
adc();
724 int smallest_adc = (digi_detset.
data.begin())->
adc();
727 float det_occupancy = 0.0;
730 digiIter != digi_detset.
data.end();
732 int this_adc = digiIter->adc();
737 if (this_adc > largest_adc)
738 largest_adc = this_adc;
739 if (this_adc < smallest_adc)
740 smallest_adc = this_adc;
747 (local_modmes.
DigiADCs)->Fill(static_cast<float>(this_adc));
763 if (nstrips > 0 && det_occupancy > 0) {
764 det_occupancy = det_occupancy / nstrips;
774 if (largest_adc > largest_adc_layer)
775 largest_adc_layer = largest_adc;
776 if (smallest_adc < smallest_adc_layer)
777 smallest_adc_layer = smallest_adc;
805 std::map<std::string, SubDetMEs>::iterator iSubdet =
SubDetMEsMap.find(subdet_label);
807 iSubdet->second.totNDigis += ndigi_layer;
812 bool& isStableBeams = *luminosityBlockCache(
iEvent.getLuminosityBlock().index());
823 edm::LogInfo(
"DQMProvInfo") <<
" gtfeEvmWord inaccessible";
826 if (gtfeEvmExtWord.
beamMode() == 11)
827 isStableBeams =
true;
832 if (strcmp(it->first.c_str(),
"TEC__MINUS") == 0) {
834 }
else if (strcmp(it->first.c_str(),
"TEC__PLUS") == 0) {
836 }
else if (strcmp(it->first.c_str(),
"TIB") == 0) {
838 }
else if (strcmp(it->first.c_str(),
"TID__MINUS") == 0) {
840 }
else if (strcmp(it->first.c_str(),
"TID__PLUS") == 0) {
842 }
else if (strcmp(it->first.c_str(),
"TOB") == 0) {
848 if (strcmp(it->first.c_str(),
"TEC__MINUS") == 0) {
850 }
else if (strcmp(it->first.c_str(),
"TEC__PLUS") == 0) {
852 }
else if (strcmp(it->first.c_str(),
"TIB") == 0) {
854 }
else if (strcmp(it->first.c_str(),
"TID__MINUS") == 0) {
856 }
else if (strcmp(it->first.c_str(),
"TID__PLUS") == 0) {
858 }
else if (strcmp(it->first.c_str(),
"TOB") == 0) {
876 for (
uint i = 0;
i < ShotsSize;
906 std::map<int, int>::iterator it;
907 for (it = FEDID_v_digisum.begin(); it != FEDID_v_digisum.end(); it++) {
928 subdetmes = it->second;
931 long long tbx_corr = tbx;
938 tbx_corr -= the_phase;
949 std::map<uint32_t, ModMEs>::iterator
pos =
DigiMEs.find(idet);
967 const char* ParameterSetLabel,
985 me->setAxisTitle(
"Lumisection", 1);
987 me->setCanExtend(TH1::kAllAxes);
993 const char* ParameterSetLabel,
1020 hid = hidmanager.
createHistoId(
"NumberOfDigis",
"det", detid);
1028 hid = hidmanager.
createHistoId(
"NumberOfDigisPerStrip",
"det", detid);
1036 hid = hidmanager.
createHistoId(
"ADCsHottestStrip",
"det", detid);
1043 hid = hidmanager.
createHistoId(
"ADCsCoolestStrip",
"det", detid);
1057 hid = hidmanager.
createHistoId(
"StripOccupancy",
"det", detid);
1068 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(
label);
1102 "TH1ADCsHottestStrip",
1107 "TH1ADCsHottestStrip",
1115 "TH1ADCsCoolestStrip",
1120 "TH1ADCsCoolestStrip",
1137 "TH1StripOccupancy",
1142 "TH1StripOccupancy",
1219 double h2ymax = 9999.0;
1220 double yfact =
Parameters.getParameter<
double>(
"yfactor");
1221 if (
label.find(
"TIB") != std::string::npos)
1222 h2ymax = (6984. * 256.) * yfact;
1223 else if (
label.find(
"TID") != std::string::npos)
1224 h2ymax = (2208. * 256.) * yfact;
1225 else if (
label.find(
"TOB") != std::string::npos)
1226 h2ymax = (12906. * 256.) * yfact;
1227 else if (
label.find(
"TEC") != std::string::npos)
1228 h2ymax = (7552. * 2. * 256.) * yfact;
1329 std::vector<APVShot>& subdetShots) {
1330 for (
uint i = 0;
i < moduleShots.size();
i++) {
1331 subdetShots.push_back(moduleShots[
i]);
1336 for (
uint i = 0;
i < shots.size();
i++) {