62 m_l1GtUtils(pset, consumesCollector(),
false, *this) {
75 bool forceGlobalParameters = Categories.
getParameter<
bool>(
"forceGlobalParameters");
76 bool doGlobalAutoSelection = Categories.getParameter<
bool>(
"doGlobalAutoSelection");
93 if(forceGlobalParameters){
97 if(doGlobalAutoSelection){
127 if(CatMu .getParameter<bool>(
"monitor")){
m_selectedTriggers[
"Mu"] = CatMu .getParameter<
string>(
"algo");}
128 if(CatEG .getParameter<bool>(
"monitor")){
m_selectedTriggers[
"EG"] = CatEG .getParameter<
string>(
"algo");}
129 if(CatIsoEG .getParameter<bool>(
"monitor")){
m_selectedTriggers[
"IsoEG"] = CatIsoEG .getParameter<
string>(
"algo");}
130 if(CatJet .getParameter<bool>(
"monitor")){
m_selectedTriggers[
"Jet"] = CatJet .getParameter<
string>(
"algo");}
131 if(CatCenJet.getParameter<
bool>(
"monitor")){
m_selectedTriggers[
"CenJet"] = CatCenJet.getParameter<
string>(
"algo");}
132 if(CatForJet.getParameter<
bool>(
"monitor")){
m_selectedTriggers[
"CatForJet"] = CatForJet.getParameter<
string>(
"algo");}
133 if(CatTauJet.getParameter<
bool>(
"monitor")){
m_selectedTriggers[
"TauJet"] = CatTauJet.getParameter<
string>(
"algo");}
134 if(CatETM .getParameter<bool>(
"monitor")){
m_selectedTriggers[
"ETM"] = CatETM .getParameter<
string>(
"algo");}
135 if(CatETT .getParameter<bool>(
"monitor")){
m_selectedTriggers[
"ETT"] = CatETT .getParameter<
string>(
"algo");}
136 if(CatHTM .getParameter<bool>(
"monitor")){
m_selectedTriggers[
"HTM"] = CatHTM .getParameter<
string>(
"algo");}
137 if(CatHTT .getParameter<bool>(
"monitor")){
m_selectedTriggers[
"HTT"] = CatHTT .getParameter<
string>(
"algo");}
144 if(CatBPTX.getParameter<
bool>(
"monitor")){
148 if(CatMu.getParameter<
bool>(
"monitor")){
153 if(CatEG.getParameter<
bool>(
"monitor")){
158 if(CatIsoEG.getParameter<
bool>(
"monitor")){
163 if(CatJet.getParameter<
bool>(
"monitor")){
168 if(CatCenJet.getParameter<
bool>(
"monitor")){
169 m_algoAutoSelect[
"CenJet"] = CatCenJet.getParameter<
bool>(
"doAutoSelection");
173 if(CatForJet.getParameter<
bool>(
"monitor")){
174 m_algoAutoSelect[
"CatForJet"] = CatForJet.getParameter<
bool>(
"doAutoSelection");
178 if(CatTauJet.getParameter<
bool>(
"monitor")){
179 m_algoAutoSelect[
"TauJet"] = CatTauJet.getParameter<
bool>(
"doAutoSelection");
183 if(CatETM.getParameter<
bool>(
"monitor")){
188 if(CatETT.getParameter<
bool>(
"monitor")){
193 if(CatHTM.getParameter<
bool>(
"monitor")){
198 if(CatHTT.getParameter<
bool>(
"monitor")){
229 if (
m_verbose){
cout <<
"[L1TSync_Offline] Called beginRun." << endl;}
281 string tCategory = (*i).first;
282 string tTrigger = (*i).second;
290 m_algoVsBunchStructure[tTrigger] = ibooker.
book2D(tCategory,
"min #Delta("+tTrigger+
",Bunch)",maxNbins,-0.5,
double(maxNbins)-0.5,5,-2.5,2.5);
294 m_algoCertification[tTrigger] = ibooker.
book1D(tCategory,
"fraction of in sync: "+tTrigger,maxNbins,-0.5,
double(maxNbins)-0.5);
305 if (
m_verbose){
cout <<
"[L1TSync_Offline] Called beginLuminosityBlock." << endl;}
315 if(
m_verbose){
cout <<
"[L1TSync_Offline] Called analyze." << endl;}
327 if(gtEvmReadoutRecord.
isValid()){
329 const L1GtfeExtWord& gtfeEvmWord = gtEvmReadoutRecord->gtfeWord();
330 unsigned int lhcBeamMode = gtfeEvmWord.
beamMode();
352 if(
m_verbose){
cout <<
"[L1TSync_Offline] -> m_currentLSValid=" <<
m_currentLSValid <<
"because beams mode not stable, being " << lhcBeamMode << endl;}
376 if(gtReadoutRecordData.
isValid()){
378 const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->gtFdlVector();
383 string tTrigger = (*i).second;
386 if(tTrigger !=
"Undefined" && tTrigger !=
"Undefined (Wrong Name)"){
388 bool beamSingleConfig =
false;
389 bool firedAlgo =
false;
390 unsigned int eventBx = ~0;
393 for(
unsigned int a=0 ;
a<gtFdlVectorData.size() ;
a++){
396 if(gtFdlVectorData[
a].bxInEvent() == 0){
397 eventBx = gtFdlVectorData[
a].localBxNr();
398 if(gtFdlVectorData[
a].gtDecisionWord()[
m_algoBit[tTrigger] ]){firedAlgo =
true;}
411 if(firedAlgo && !beamSingleConfig){
413 int DifAlgoVsBunchStructure = 9999;
415 for(
unsigned int a=0 ;
a<gtFdlVectorData.size() ;
a++){
417 int bxFDL = gtFdlVectorData[
a].localBxNr();
418 int bxInEvent = gtFdlVectorData[
a].bxInEvent();
421 DifAlgoVsBunchStructure = -1*bxInEvent;
474 bool firedAlgo =
false;
482 if(gtReadoutRecordData.
isValid()){
484 const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->gtFdlVector();
486 for(
unsigned int a=0 ;
a<gtFdlVectorData.size() ;
a++){
488 if(gtFdlVectorData[
a].bxInEvent() == 0){
T getParameter(std::string const &) const
void getBeamConfOffline(const edm::Event &)
T getUntrackedParameter(std::string const &, T const &) const
std::map< TString, unsigned int > m_certLastLS
MonitorElement * m_ErrorMonitor
L1TSync_Offline(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::map< std::string, std::string > m_selectedTriggers
#define DEFINE_FWK_MODULE(type)
std::map< TString, unsigned int > m_certFirstLS
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)
virtual void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
BeginRun.
virtual void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
edm::ParameterSet m_parameters
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
std::map< TString, int > m_algoBit
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
bool bxConfig(unsigned iBx)
std::vector< bool > beam2
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
const cms_uint32_t lhcFillNumber() const
T const * product() const
virtual ~L1TSync_Offline()
void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
std::map< TString, MonitorElement * > m_algoCertification
volatile std::atomic< bool > shutdown_flag false
std::map< std::string, bool > m_algoAutoSelect
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
std::vector< bool > beam1
const cms_uint16_t beamMode() const
L1TBeamConfiguration m_beamConfig
std::map< TString, MonitorElement * > m_algoVsBunchStructure