335 edm::LogInfo(
"L1TGT") <<
"L1TGT: analyze...." << std::endl;
342 long long int orbitTcs = -1;
343 int orbitEvmFdl = -1;
349 const int lsNumber =
iEvent.luminosityBlock();
355 if (!gtEvmReadoutRecord.
isValid()) {
356 edm::LogInfo(
"L1TGT") <<
"can't find L1GlobalTriggerEvmReadoutRecord";
363 gtfeEvmBx = gtfeEvmWord.
bxNr();
371 tcsBx = tcsWord.
bxNr();
384 static_cast<double>(tcsWord.
eventNr()) / static_cast<double>(tcsWord.
partTrigNr()));
404 edm::LogInfo(
"L1TGT") <<
" check mode = " <<
beam <<
" momentum " << momentum <<
" int2 " << intensity2
409 uint64_t gpshi = (gpsr >> 32) & 0xffffffff;
411 uint64_t gps = gpshi * 1000000 + gpslo;
414 Long64_t delorb = orbitTcs -
preOrb_;
415 Long64_t delgps = gps -
preGps_;
419 freq = ((Double_t)(delorb)) * 3564. / ((Double_t)(delgps));
428 edm::LogInfo(
"L1TGT") <<
" preOrb_ = " <<
preOrb_ <<
" orbitTcs=" << orbitTcs <<
" delorb=" << delorb
430 <<
" delgps=" << delgps <<
" freq=" << freq << std::endl;
443 orbitEvmFdl = fdlWord.
orbitNr();
447 if ((orbitTcs >= 0) && (orbitEvmFdl >= 0)) {
448 int diffOrbit =
static_cast<float>(orbitTcs - orbitEvmFdl);
449 edm::LogInfo(
"L1TGT") <<
"\n orbitTcs = " << orbitTcs <<
" orbitEvmFdl = " << orbitEvmFdl
450 <<
" diffOrbit = " << diffOrbit <<
" orbitEvent = " <<
iEvent.orbitNumber() << std::endl;
467 }
else if (orbitEvmFdl >= 0) {
478 if ((lsTcs >= 0) && (lsEvmFdl >= 0)) {
479 int diffLs =
static_cast<float>(lsTcs - lsEvmFdl);
480 edm::LogInfo(
"L1TGT") <<
"\n lsTcs = " << lsTcs <<
" lsEvmFdl = " << lsEvmFdl <<
" diffLs = " << diffLs
481 <<
" lsEvent = " << lsNumber << std::endl;
498 }
else if (lsEvmFdl >= 0) {
519 if (!gtReadoutRecord.
isValid()) {
520 edm::LogInfo(
"L1TGT") <<
"can't find L1GlobalTriggerReadoutRecord";
524 if (gtReadoutRecord.
isValid()) {
525 unsigned int NmaxL1AlgoBit = gtReadoutRecord->
decisionWord().size();
531 const std::vector<L1GtFdlWord>& m_gtFdlWord(gtReadoutRecord->
gtFdlVector());
532 int numberBxInEvent = m_gtFdlWord.size();
533 int minBxInEvent = (numberBxInEvent + 1) / 2 - numberBxInEvent;
535 for (
unsigned int iBit = 0; iBit < NmaxL1AlgoBit; ++iBit) {
536 bool accept = dWord[iBit];
547 for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
549 bool accept = dWordBX[iBit];
564 for (
unsigned int iBit = 0; iBit < NmaxL1TechBit; ++iBit) {
565 bool accept = technicalTriggerWordBeforeMask[iBit];
575 for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
576 const DecisionWord dWordBX = (*itBx).gtTechnicalTriggerWord();
577 bool accept = dWordBX[iBit];
587 int fdlBx[2] = {-1, -1};
588 int psbBx[2][7] = {{-1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1}};
593 gtfeBx = gtfeWord.
bxNr();
603 if (gmtReadoutCollection.
isValid()) {
611 fdlBx[0] = fdlWord.
bxNr();
619 DecisionWord::const_iterator GTdbitItr;
621 for (GTdbitItr = gtDecisionWord.begin(); GTdbitItr != gtDecisionWord.end(); GTdbitItr++) {
626 DecisionWord::const_iterator GTdbitItr1;
627 for (GTdbitItr1 = gtDecisionWord.begin(); GTdbitItr1 != gtDecisionWord.end(); GTdbitItr1++) {
633 TechnicalTriggerWord::const_iterator GTtbitItr1;
634 for (GTtbitItr1 = gtTTWord.begin(); GTtbitItr1 != gtTTWord.end(); GTtbitItr1++) {
644 TechnicalTriggerWord::const_iterator GTtbitItr;
646 for (GTtbitItr = gtTTWord.begin(); GTtbitItr != gtTTWord.end(); GTtbitItr++) {
651 TechnicalTriggerWord::const_iterator GTtbitItr1;
652 for (GTtbitItr1 = gtTTWord.begin(); GTtbitItr1 != gtTTWord.end(); GTtbitItr1++) {
673 std::pair<int, int> pairLsPfi = std::make_pair(lsNumber, pfIndexAlgoTrig);
685 int psbID[7] = {0xbb09, 0xbb0d, 0xbb0e, 0xbb0f, 0xbb13, 0xbb14, 0xbb15};
686 for (
int i = 0;
i < 7;
i++) {
687 if (
isActive(gtfeActiveBoards, ibit)) {
689 psbBx[0][
i] = psbWord.
bxNr();
700 for (
int i = 0;
i < 2;
i++) {
704 for (
int j = 0;
j < 7;
j++) {
705 for (
int i = 0;
i < 2;
i++) {
706 if (psbBx[
i][
j] > -1)
MonitorElement * m_monL1PrescaleFactorSet
const cms_uint32_t orbitNr() const
get/set orbit number
MonitorElement * h_L1AlgoBX1
MonitorElement * gpsfreqwide
const cms_uint16_t gtPrescaleFactorIndexAlgo() const
const cms_uint16_t beamMode() const
std::map< std::string, bool > l1TriggerDecision
const cms_uint64_t orbitNr() const
get/set orbit number since start of run
MonitorElement * m_monLsNrDiffTcsFdlEvmLs
const L1GtFdlWord gtFdlWord(int bxInEvent) const
get / set FDL word (record) in the GT readout record
std::vector< std::pair< int, int > >::const_iterator CItVecPair
const cms_uint32_t setupVersion() const
get/set setup version
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
const cms_uint16_t luminositySegmentNr() const
get/set luminosity segment number
const DecisionWord & decisionWord(int bxInEventValue) const
const L1GtfeWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
MonitorElement * BST_intensityBeam1
static const int MaxOrbitNrDiffTcsFdlEvm
MonitorElement * algo_bits_corr
bool verbose_
verbosity switch
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
const cms_uint16_t localBxNr() const
get/set local bunch cross number of the actual bx
MonitorElement * BST_beamMode
MonitorElement * BST_MasterStatus
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the TCS chip
const cms_uint16_t bxNr() const
get/set bunch cross number of the actual bx
MonitorElement * BST_intensityBeam2
MonitorElement * h_L1TechBX
const cms_uint16_t bstMasterStatus() const
MonitorElement * event_number
Container::value_type value_type
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
const cms_uint32_t eventNr() const
get/set event number since last L1 reset generated in TCS chip
const cms_uint32_t turnCountNumber() const
MonitorElement * h_L1AlgoBX3
const cms_uint32_t lhcFillNumber() const
std::vector< bool > DecisionWord
typedefs
static const int MaxLsNrDiffTcsFdlEvm
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmSource_
input tag for L1 GT EVM readout record
MonitorElement * orbit_lumi
MonitorElement * h_L1AlgoBX4
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
int getBxNr() const
get counters
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
MonitorElement * algo_bits_lumi
MonitorElement * m_monLsNrDiffTcsFdlEvm
std::string algoBitToName[128]
const cms_uint16_t lumiSegmentNr() const
get/set luminosity segment number of the actual bx
MonitorElement * algo_bits
Log< level::Info, false > LogInfo
MonitorElement * event_type
MonitorElement * m_monOrbitNrDiffTcsFdlEvmLs
MonitorElement * dbx_module
const cms_uint64_t gpsTime() const
LHC-BOB-ES-0001 (EDMS 638899)
unsigned long long uint64_t
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the GTFE board
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
MonitorElement * tt_bits_corr
bool isActive(int word, int bit)
book all histograms for the module
const cms_uint16_t beamMomentum() const
const cms_uint16_t bxNr() const
get/set BxNr - bunch cross number of the actual bx
MonitorElement * gpsfreqlum
int m_nrEvJob
number of events processed
const cms_uint32_t partTrigNr() const
get/set total number of L1A sent since start of the run to this DAQ partition
const L1TcsWord tcsWord() const
get / set TCS word (record) in the GT readout record
const cms_uint16_t localBxNr() const
get/set local bunch cross number of the actual bx
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtSource_L1GT_
input parameters
MonitorElement * h_L1AlgoBX2
std::map< std::string, bool >::iterator trig_iter
MonitorElement * trigger_number
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
L1MuGMTReadoutRecord const & getRecord(int bx=0) const
const cms_uint32_t totalIntensityBeam2() const
MonitorElement * BST_beamMomentum
MonitorElement * BST_lhcFillNumber
MonitorElement * setupversion_lumi
const cms_uint16_t activeBoards() const
get/set boards contributing to EVM respectively DAQ record
MonitorElement * BST_turnCountNumber
std::map< std::string, bool > l1TechTriggerDecision
MonitorElement * event_lumi
MonitorElement * tt_bits_lumi
MonitorElement * trigger_lumi
MonitorElement * evnum_trignum_lumi
const cms_uint32_t totalIntensityBeam1() const
const cms_uint16_t triggerType() const
get/set trigger type, identical with event type in CMS header
MonitorElement * algo_tt_bits_corr
std::string techBitToName[64]
MonitorElement * m_monOrbitNrDiffTcsFdlEvm
edm::EDGetTokenT< L1MuGMTReadoutCollection > gtSource_L1MuGMT_