67 m_verbose =
pset.getUntrackedParameter<
bool>(
"verbose",
false);
95 if (CatMu.getParameter<
bool>(
"monitor")) {
100 if (CatEG.getParameter<
bool>(
"monitor")) {
105 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
110 if (CatJet.getParameter<
bool>(
"monitor")) {
115 if (CatCenJet.getParameter<
bool>(
"monitor")) {
120 if (CatForJet.getParameter<
bool>(
"monitor")) {
125 if (CatTauJet.getParameter<
bool>(
"monitor")) {
130 if (CatETM.getParameter<
bool>(
"monitor")) {
135 if (CatETT.getParameter<
bool>(
"monitor")) {
140 if (CatHTM.getParameter<
bool>(
"monitor")) {
145 if (CatHTT.getParameter<
bool>(
"monitor")) {
166 if (CatMu.getParameter<
bool>(
"monitor")) {
169 if (CatEG.getParameter<
bool>(
"monitor")) {
172 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
175 if (CatJet.getParameter<
bool>(
"monitor")) {
178 if (CatCenJet.getParameter<
bool>(
"monitor")) {
181 if (CatForJet.getParameter<
bool>(
"monitor")) {
184 if (CatTauJet.getParameter<
bool>(
"monitor")) {
187 if (CatETM.getParameter<
bool>(
"monitor")) {
190 if (CatETT.getParameter<
bool>(
"monitor")) {
193 if (CatHTM.getParameter<
bool>(
"monitor")) {
196 if (CatHTT.getParameter<
bool>(
"monitor")) {
203 if (CatBPTX.getParameter<
bool>(
"monitor")) {
207 if (CatMu.getParameter<
bool>(
"monitor")) {
216 if (CatEG.getParameter<
bool>(
"monitor")) {
225 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
234 if (CatJet.getParameter<
bool>(
"monitor")) {
243 if (CatCenJet.getParameter<
bool>(
"monitor")) {
244 m_algoAutoSelect[
"CenJet"] = CatCenJet.getParameter<
bool>(
"doAutoSelection");
252 if (CatForJet.getParameter<
bool>(
"monitor")) {
253 m_algoAutoSelect[
"CatForJet"] = CatForJet.getParameter<
bool>(
"doAutoSelection");
261 if (CatTauJet.getParameter<
bool>(
"monitor")) {
262 m_algoAutoSelect[
"TauJet"] = CatTauJet.getParameter<
bool>(
"doAutoSelection");
270 if (CatETM.getParameter<
bool>(
"monitor")) {
279 if (CatETT.getParameter<
bool>(
"monitor")) {
288 if (CatHTM.getParameter<
bool>(
"monitor")) {
297 if (CatHTT.getParameter<
bool>(
"monitor")) {
320 cout <<
"[L1TSync_Offline] Called beginRun." << endl;
359 ibooker.setCurrentFolder(
"L1T/L1TSync");
360 m_ErrorMonitor = ibooker.book1D(
"ErrorMonitor",
"ErrorMonitor", 7, 0, 7);
365 "WARNING_DB_INCORRECT_NBUNCHES");
372 string tCategory = (*i).first;
373 string tTrigger = (*i).second;
380 ibooker.setCurrentFolder(
"L1T/L1TSync/AlgoVsBunchStructure/");
382 tCategory,
"min #Delta(" + tTrigger +
",Bunch)", maxNbins, -0.5,
double(maxNbins) - 0.5, 5, -2.5, 2.5);
385 ibooker.setCurrentFolder(
"L1T/L1TSync/Certification/");
387 ibooker.book1D(tCategory,
"fraction of in sync: " + tTrigger, maxNbins, -0.5,
double(maxNbins) - 0.5);
398 cout <<
"[L1TSync_Offline] Called beginLuminosityBlock." << endl;
401 return std::make_shared<ltso::LSValid>();
407 cout <<
"[L1TSync_Offline] Called analyze." << endl;
411 auto& currentLSValid = luminosityBlockCache(
iEvent.getLuminosityBlock().index())->lsIsValid;
412 if (currentLSValid) {
414 cout <<
"[L1TSync_Offline] -> currentLSValid=" << currentLSValid << endl;
422 if (gtEvmReadoutRecord.
isValid()) {
424 unsigned int lhcBeamMode = gtfeEvmWord.
beamMode();
441 if (lhcBeamMode !=
STABLE) {
442 currentLSValid =
false;
444 cout <<
"[L1TSync_Offline] -> currentLSValid=" << currentLSValid <<
"because beams mode not stable, being "
445 << lhcBeamMode << endl;
455 cout <<
"[L1TSync_Offline] -> currentLSValid=" << currentLSValid << endl;
471 if (gtReadoutRecordData.
isValid()) {
472 const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->
gtFdlVector();
476 string tTrigger = (*i).second;
479 if (tTrigger !=
"Undefined" && tTrigger !=
"Undefined (Wrong Name)") {
480 bool beamSingleConfig =
false;
481 bool firedAlgo =
false;
482 unsigned int eventBx = ~0;
485 for (
unsigned int a = 0;
a < gtFdlVectorData.size();
a++) {
487 if (gtFdlVectorData[
a].bxInEvent() == 0) {
488 eventBx = gtFdlVectorData[
a].localBxNr();
489 if (gtFdlVectorData[
a].gtDecisionWord()[
m_algoBit[tTrigger]]) {
498 beamSingleConfig =
true;
501 beamSingleConfig =
true;
508 if (firedAlgo && !beamSingleConfig) {
509 int DifAlgoVsBunchStructure = 9999;
511 for (
unsigned int a = 0;
a < gtFdlVectorData.size();
a++) {
512 int bxFDL = gtFdlVectorData[
a].localBxNr();
513 int bxInEvent = gtFdlVectorData[
a].bxInEvent();
516 DifAlgoVsBunchStructure = -1 * bxInEvent;
562 bool firedAlgo =
false;
570 if (gtReadoutRecordData.
isValid()) {
571 const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->
gtFdlVector();
573 for (
unsigned int a = 0;
a < gtFdlVectorData.size();
a++) {
575 if (gtFdlVectorData[
a].bxInEvent() == 0) {