|
|
Go to the documentation of this file.
63 m_l1GtUtils(
pset, consumesCollector(),
false, *this) {
69 m_verbose =
pset.getUntrackedParameter<
bool>(
"verbose",
false);
97 if (CatMu.getParameter<
bool>(
"monitor")) {
102 if (CatEG.getParameter<
bool>(
"monitor")) {
107 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
112 if (CatJet.getParameter<
bool>(
"monitor")) {
117 if (CatCenJet.getParameter<
bool>(
"monitor")) {
122 if (CatForJet.getParameter<
bool>(
"monitor")) {
127 if (CatTauJet.getParameter<
bool>(
"monitor")) {
132 if (CatETM.getParameter<
bool>(
"monitor")) {
137 if (CatETT.getParameter<
bool>(
"monitor")) {
142 if (CatHTM.getParameter<
bool>(
"monitor")) {
147 if (CatHTT.getParameter<
bool>(
"monitor")) {
168 if (CatMu.getParameter<
bool>(
"monitor")) {
171 if (CatEG.getParameter<
bool>(
"monitor")) {
174 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
177 if (CatJet.getParameter<
bool>(
"monitor")) {
180 if (CatCenJet.getParameter<
bool>(
"monitor")) {
183 if (CatForJet.getParameter<
bool>(
"monitor")) {
186 if (CatTauJet.getParameter<
bool>(
"monitor")) {
189 if (CatETM.getParameter<
bool>(
"monitor")) {
192 if (CatETT.getParameter<
bool>(
"monitor")) {
195 if (CatHTM.getParameter<
bool>(
"monitor")) {
198 if (CatHTT.getParameter<
bool>(
"monitor")) {
205 if (CatBPTX.getParameter<
bool>(
"monitor")) {
209 if (CatMu.getParameter<
bool>(
"monitor")) {
218 if (CatEG.getParameter<
bool>(
"monitor")) {
227 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
236 if (CatJet.getParameter<
bool>(
"monitor")) {
245 if (CatCenJet.getParameter<
bool>(
"monitor")) {
246 m_algoAutoSelect[
"CenJet"] = CatCenJet.getParameter<
bool>(
"doAutoSelection");
254 if (CatForJet.getParameter<
bool>(
"monitor")) {
255 m_algoAutoSelect[
"CatForJet"] = CatForJet.getParameter<
bool>(
"doAutoSelection");
263 if (CatTauJet.getParameter<
bool>(
"monitor")) {
264 m_algoAutoSelect[
"TauJet"] = CatTauJet.getParameter<
bool>(
"doAutoSelection");
272 if (CatETM.getParameter<
bool>(
"monitor")) {
281 if (CatETT.getParameter<
bool>(
"monitor")) {
290 if (CatHTM.getParameter<
bool>(
"monitor")) {
299 if (CatHTT.getParameter<
bool>(
"monitor")) {
322 cout <<
"[L1TSync_Offline] Called beginRun." << endl;
337 for (
const auto&
algo :
menu.gtAlgorithmAliasMap()) {
365 "WARNING_DB_INCORRECT_NBUNCHES");
372 string tCategory = (*i).first;
373 string tTrigger = (*i).second;
382 tCategory,
"min #Delta(" + tTrigger +
",Bunch)", maxNbins, -0.5,
double(maxNbins) - 0.5, 5, -2.5, 2.5);
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) {
std::map< std::string, bool > m_algoAutoSelect
bool bxConfig(unsigned iBx)
std::map< TString, int > m_algoBit
~L1TSync_Offline() override
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
virtual void setCurrentFolder(std::string const &fullpath)
std::map< TString, MonitorElement * > m_algoVsBunchStructure
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_menuToken
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
std::vector< bool > beam2
std::map< TString, unsigned int > m_certFirstLS
std::map< std::string, std::string > m_selectedTriggers
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
L1TBeamConfiguration m_beamConfig
std::shared_ptr< ltso::LSValid > globalBeginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) const final
std::vector< bool > beam1
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
std::map< TString, unsigned int > m_certLastLS
void getBeamConfOffline(const edm::Event &)
L1TMenuHelper::Tokens m_helperTokens
L1TSync_Offline(const edm::ParameterSet &ps)
MonitorElement * m_ErrorMonitor
const cms_uint32_t lhcFillNumber() const
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void retrieveL1EventSetup(const edm::EventSetup &, bool isRun=true)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
BeginRun.
bool getData(T &iHolder) const
std::map< TString, MonitorElement * > m_algoCertification
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
edm::ParameterSet m_parameters
Abs< T >::type abs(const T &t)
const cms_uint16_t beamMode() const
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())