CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
l1t::GlobalBoard Class Reference

#include <GlobalBoard.h>

Classes

struct  PrescaleCounter
 

Public Member Functions

void fillAlgRecord (int iBxInEvent, std::unique_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, int prescaleSet, int menuUUID, int firmwareUUID)
 Fill the Daq Records. More...
 
const std::bitset< GlobalAlgBlk::maxPhysicsTriggers > & getAlgorithmOR () const
 return algorithm OR decision More...
 
const BXVector< const l1t::L1Candidate * > * getCandL1EG () const
 pointer to EG data list More...
 
const BXVector< const l1t::EtSum * > * getCandL1EtSum () const
 pointer to EtSum data list More...
 
const BXVector< const l1t::EtSum * > * getCandL1EtSumZdc () const
 pointer to ZDC EtSum data list More...
 
const BXVector< const GlobalExtBlk * > * getCandL1External () const
 pointer to External data list More...
 
const BXVector< const l1t::L1Candidate * > * getCandL1Jet () const
 pointer to Jet data list More...
 
const BXVector< const l1t::Muon * > * getCandL1Mu () const
 return global muon trigger candidate More...
 
const BXVector< std::shared_ptr< l1t::MuonShower > > * getCandL1MuShower () const
 return global muon trigger candidate More...
 
const BXVector< const l1t::L1Candidate * > * getCandL1Tau () const
 pointer to Tau data list More...
 
const std::bitset< GlobalAlgBlk::maxPhysicsTriggers > & getDecisionWord () const
 return decision More...
 
 GlobalBoard ()
 
void init (const int numberPhysTriggers, const int nrL1Mu, const int nrL1MuShower, const int nrL1EG, const int nrL1Tau, const int nrL1Jet, int bxFirst, int bxLast)
 initialize the class (mainly reserve) More...
 
void printGmtData (const int iBxInEvent) const
 print received Muon dataWord More...
 
void receiveCaloObjectData (const edm::Event &, const edm::EDGetTokenT< BXVector< l1t::EGamma >> &, const edm::EDGetTokenT< BXVector< l1t::Tau >> &, const edm::EDGetTokenT< BXVector< l1t::Jet >> &, const edm::EDGetTokenT< BXVector< l1t::EtSum >> &, const edm::EDGetTokenT< BXVector< l1t::EtSum >> &, const bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, const bool receiveEtSums, const bool receiveEtSumsZdc)
 receive data from Global Muon Trigger More...
 
void receiveExternalData (const edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk >> &, const bool receiveExt)
 
void receiveMuonObjectData (const edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon >> &, const bool receiveMu, const int nrL1Mu)
 
void receiveMuonShowerObjectData (const edm::Event &, const edm::EDGetTokenT< BXVector< l1t::MuonShower >> &, const bool receiveMuShower, const int nrL1MuShower)
 
void reset ()
 clear uGT More...
 
void resetCalo ()
 
void resetExternal ()
 
void resetMu ()
 
void resetMuonShower ()
 
void runFDL (const edm::Event &iEvent, const int iBxInEvent, const int totalBxInEvent, const unsigned int numberPhysTriggers, const std::vector< double > &prescaleFactorsAlgoTrig, const std::vector< unsigned int > &triggerMaskAlgoTrig, const std::vector< int > &triggerMaskVetoAlgoTrig, const bool algorithmTriggersUnprescaled, const bool algorithmTriggersUnmasked)
 run the uGT FDL (Apply Prescales and Veto) More...
 
void runGTL (const edm::Event &iEvent, const edm::EventSetup &evSetup, const TriggerMenu *m_l1GtMenu, const bool produceL1GtObjectMapRecord, const int iBxInEvent, std::unique_ptr< GlobalObjectMapRecord > &gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1MuShower, const int nrL1EG, const int nrL1Tau, const int nrL1Jet)
 run the uGT GTL (Conditions and Algorithms) More...
 
void setBxFirst (int bx)
 
void setBxLast (int bx)
 
void setResetPSCountersEachLumiSec (bool val)
 
void setSemiRandomInitialPSCounters (bool val)
 
void setVerbosity (const int verbosity)
 
virtual ~GlobalBoard ()
 

Static Private Member Functions

static std::vector< PrescaleCounterprescaleCounters (std::vector< double > const &prescaleFactorsAlgoTrig)
 
static std::vector< PrescaleCounterprescaleCountersWithSemirandomInitialCounter (std::vector< double > const &prescaleFactorsAlgoTrig, edm::Event const &iEvent)
 

Private Attributes

bool m_algFinalOr
 
bool m_algFinalOrVeto
 
bool m_algInitialOr
 
bool m_algIntermOr
 
bool m_algPrescaledOr
 
unsigned int m_boardEventCount
 
int m_bxFirst_
 
int m_bxLast_
 
BXVector< const l1t::L1Candidate * > * m_candL1EG
 
BXVector< const l1t::EtSum * > * m_candL1EtSum
 
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
 
BXVector< const GlobalExtBlk * > * m_candL1External
 
BXVector< const l1t::L1Candidate * > * m_candL1Jet
 
BXVector< const l1t::Muon * > * m_candL1Mu
 
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
 
BXVector< const l1t::L1Candidate * > * m_candL1Tau
 
std::vector< AlgorithmEvaluation::ConditionEvaluationMapm_conditionResultMaps
 
unsigned int m_currentLumi
 
std::bitset< GlobalAlgBlk::maxPhysicsTriggersm_gtlAlgorithmOR
 
std::bitset< GlobalAlgBlk::maxPhysicsTriggersm_gtlDecisionWord
 
bool m_isDebugEnabled
 
const L1CaloGeometrym_l1CaloGeometry
 
unsigned long long m_l1CaloGeometryCacheID
 
const TriggerMenum_l1GtMenu
 
unsigned long long m_l1GtMenuCacheID
 
const L1MuTriggerScalesm_l1MuTriggerScales
 
unsigned long long m_l1MuTriggerScalesCacheID
 
std::vector< std::vector< PrescaleCounter > > m_prescaleCounterAlgoTrig
 
bool m_resetPSCountersEachLumiSec = false
 
bool m_semiRandomInitialPSCounters = false
 
GlobalAlgBlk m_uGtAlgBlk
 
int m_uGtBoardNumber
 
bool m_uGtFinalBoard
 
int m_verbosity
 verbosity level More...
 

Static Private Attributes

static constexpr size_t m_singlestep = 100
 

Detailed Description

Definition at line 56 of file GlobalBoard.h.

Constructor & Destructor Documentation

◆ GlobalBoard()

GlobalBoard::GlobalBoard ( )

Definition at line 67 of file GlobalBoard.cc.

References m_boardEventCount, m_gtlAlgorithmOR, m_gtlDecisionWord, m_l1CaloGeometryCacheID, m_l1GtMenuCacheID, m_l1MuTriggerScalesCacheID, m_prescaleCounterAlgoTrig, m_uGtAlgBlk, m_uGtBoardNumber, m_uGtFinalBoard, and GlobalAlgBlk::reset().

69  m_candL1MuShower(new BXVector<std::shared_ptr<l1t::MuonShower>>),
76  m_currentLumi(0),
79 
80  m_gtlAlgorithmOR.reset();
81  m_gtlDecisionWord.reset();
82 
84 
85  // Initialize cached IDs
86  m_l1GtMenuCacheID = 0ULL;
89 
90  // Counter for number of events board sees
92 
93  // A single uGT GlobalBoard is taken into account in the emulator
94  m_uGtBoardNumber = 0;
95  m_uGtFinalBoard = true;
96 }
bool isDebugEnabled()
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:228
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:234
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:229
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:230
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:222
unsigned int m_currentLumi
Definition: GlobalBoard.h:253
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:215
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:246
unsigned int m_boardEventCount
Definition: GlobalBoard.h:268
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:233
void reset()
reset the content of a GlobalAlgBlk
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:219
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:232
std::vector< std::vector< PrescaleCounter > > m_prescaleCounterAlgoTrig
Definition: GlobalBoard.h:304
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:248
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:235
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:245
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:231

◆ ~GlobalBoard()

GlobalBoard::~GlobalBoard ( )
virtual

Definition at line 99 of file GlobalBoard.cc.

99  {
100  delete m_candL1Mu;
101  delete m_candL1MuShower;
102  delete m_candL1EG;
103  delete m_candL1Tau;
104  delete m_candL1Jet;
105  delete m_candL1EtSum;
106  delete m_candL1EtSumZdc;
107  delete m_candL1External;
108 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:228
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:234
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:229
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:230
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:233
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:232
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:235
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:231

Member Function Documentation

◆ fillAlgRecord()

void GlobalBoard::fillAlgRecord ( int  iBxInEvent,
std::unique_ptr< GlobalAlgBlkBxCollection > &  uGtAlgRecord,
int  prescaleSet,
int  menuUUID,
int  firmwareUUID 
)

Fill the Daq Records.

Definition at line 1126 of file GlobalBoard.cc.

References LogDebug.

1130  {
1131  if (m_verbosity) {
1132  LogDebug("L1TGlobal") << "\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent;
1133  }
1134 
1135  // Set header information
1136  m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1137  m_uGtAlgBlk.setPreScColumn(prescaleSet);
1138  m_uGtAlgBlk.setL1MenuUUID(menuUUID);
1139  m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
1140 
1144 
1145  uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1146 }
void setL1MenuUUID(int uuid)
set simple members
Definition: GlobalAlgBlk.h:55
void setFinalORPreVeto(bool fOR)
Definition: GlobalAlgBlk.h:59
void setbxInEventNr(int bxNr)
Definition: GlobalAlgBlk.h:57
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
void setFinalOR(bool fOR)
Definition: GlobalAlgBlk.h:60
void setFinalORVeto(bool fOR)
Definition: GlobalAlgBlk.h:58
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:248
void setL1FirmwareUUID(int fuuid)
Definition: GlobalAlgBlk.h:56
void setPreScColumn(int psC)
Definition: GlobalAlgBlk.h:61
#define LogDebug(id)

◆ getAlgorithmOR()

const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& l1t::GlobalBoard::getAlgorithmOR ( ) const
inline

return algorithm OR decision

Definition at line 149 of file GlobalBoard.h.

References m_gtlAlgorithmOR.

149 { return m_gtlAlgorithmOR; }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:245

◆ getCandL1EG()

const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1EG ( ) const
inline

pointer to EG data list

Definition at line 158 of file GlobalBoard.h.

References m_candL1EG.

158 { return m_candL1EG; }
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:230

◆ getCandL1EtSum()

const BXVector<const l1t::EtSum*>* l1t::GlobalBoard::getCandL1EtSum ( ) const
inline

pointer to EtSum data list

Definition at line 167 of file GlobalBoard.h.

References m_candL1EtSum.

167 { return m_candL1EtSum; }
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:233

◆ getCandL1EtSumZdc()

const BXVector<const l1t::EtSum*>* l1t::GlobalBoard::getCandL1EtSumZdc ( ) const
inline

pointer to ZDC EtSum data list

Definition at line 170 of file GlobalBoard.h.

References m_candL1EtSumZdc.

170 { return m_candL1EtSumZdc; }
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:234

◆ getCandL1External()

const BXVector<const GlobalExtBlk*>* l1t::GlobalBoard::getCandL1External ( ) const
inline

pointer to External data list

Definition at line 173 of file GlobalBoard.h.

References m_candL1External.

173 { return m_candL1External; }
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:235

◆ getCandL1Jet()

const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1Jet ( ) const
inline

pointer to Jet data list

Definition at line 161 of file GlobalBoard.h.

References m_candL1Jet.

161 { return m_candL1Jet; }
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:232

◆ getCandL1Mu()

const BXVector<const l1t::Muon*>* l1t::GlobalBoard::getCandL1Mu ( ) const
inline

return global muon trigger candidate

Definition at line 152 of file GlobalBoard.h.

References m_candL1Mu.

152 { return m_candL1Mu; }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:228

◆ getCandL1MuShower()

const BXVector<std::shared_ptr<l1t::MuonShower> >* l1t::GlobalBoard::getCandL1MuShower ( ) const
inline

return global muon trigger candidate

Definition at line 155 of file GlobalBoard.h.

References m_candL1MuShower.

155 { return m_candL1MuShower; }
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:229

◆ getCandL1Tau()

const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1Tau ( ) const
inline

pointer to Tau data list

Definition at line 164 of file GlobalBoard.h.

References m_candL1Tau.

164 { return m_candL1Tau; }
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:231

◆ getDecisionWord()

const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& l1t::GlobalBoard::getDecisionWord ( ) const
inline

return decision

Definition at line 146 of file GlobalBoard.h.

References m_gtlDecisionWord.

146 { return m_gtlDecisionWord; }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:246

◆ init()

void GlobalBoard::init ( const int  numberPhysTriggers,
const int  nrL1Mu,
const int  nrL1MuShower,
const int  nrL1EG,
const int  nrL1Tau,
const int  nrL1Jet,
int  bxFirst,
int  bxLast 
)

initialize the class (mainly reserve)

Definition at line 115 of file GlobalBoard.cc.

References simCaloStage2Layer1Digis_cfi::bxFirst, simCaloStage2Layer1Digis_cfi::bxLast, and LogDebug.

122  {
124  setBxLast(bxLast);
125 
134 
135  m_uGtAlgBlk.reset();
136 
137  LogDebug("L1TGlobal") << "\t Initializing Board with bxFirst = " << m_bxFirst_ << ", bxLast = " << m_bxLast_;
138 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:228
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:234
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:229
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:230
void setBxLast(int bx)
Definition: GlobalBoard.cc:113
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:233
void reset()
reset the content of a GlobalAlgBlk
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:232
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:248
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:235
void setBxFirst(int bx)
Definition: GlobalBoard.cc:111
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:231
#define LogDebug(id)

◆ prescaleCounters()

std::vector< l1t::GlobalBoard::PrescaleCounter > GlobalBoard::prescaleCounters ( std::vector< double > const &  prescaleFactorsAlgoTrig)
staticprivate

Definition at line 1202 of file GlobalBoard.cc.

References MillePedeFileConverter_cfg::out.

1203  {
1204  std::vector<PrescaleCounter> out;
1205  out.reserve(prescaleFactorsAlgoTrig.size());
1206  for (size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1207  out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1208  }
1209  return out;
1210 }

◆ prescaleCountersWithSemirandomInitialCounter()

std::vector< l1t::GlobalBoard::PrescaleCounter > GlobalBoard::prescaleCountersWithSemirandomInitialCounter ( std::vector< double > const &  prescaleFactorsAlgoTrig,
edm::Event const &  iEvent 
)
staticprivate

Definition at line 1213 of file GlobalBoard.cc.

References iEvent, and MillePedeFileConverter_cfg::out.

1214  {
1215  // pick a (semi)random number seeding based on run, lumi, event numbers,
1216  // this leads to different (semi)random numbers for different streams,
1217  // reminder: different streams have different initial event number
1218  std::srand(iEvent.id().run());
1219  std::srand(std::rand() + iEvent.id().luminosityBlock());
1220  std::srand(std::rand() + iEvent.id().event());
1221  int const semirandom = std::rand();
1222 
1223  std::vector<PrescaleCounter> out;
1224  out.reserve(prescaleFactorsAlgoTrig.size());
1225 
1226  for (size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1227  out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1228  // initialise trigger_counter to a (semi)random integer
1229  // between 0 and prescale_count - 1 (both inclusive)
1230  // (this only changes the behaviour of triggers with PS > 1)
1231  auto& prescaleCounter = out.back();
1232  if (prescaleCounter.prescale_count > 0) {
1233  prescaleCounter.trigger_counter = semirandom % prescaleCounter.prescale_count;
1234  }
1235  }
1236 
1237  return out;
1238 }
int iEvent
Definition: GenABIO.cc:224

◆ printGmtData()

void GlobalBoard::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 1194 of file GlobalBoard.cc.

References LogTrace.

1194  {
1195  LogTrace("L1TGlobal") << "\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent;
1196 
1197  int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1198  LogTrace("L1TGlobal") << "Number of GMT muons = " << nrL1Mu << "\n";
1199 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:228
#define LogTrace(id)
unsigned size(int bx) const

◆ receiveCaloObjectData()

void GlobalBoard::receiveCaloObjectData ( const edm::Event iEvent,
const edm::EDGetTokenT< BXVector< l1t::EGamma >> &  egInputToken,
const edm::EDGetTokenT< BXVector< l1t::Tau >> &  tauInputToken,
const edm::EDGetTokenT< BXVector< l1t::Jet >> &  jetInputToken,
const edm::EDGetTokenT< BXVector< l1t::EtSum >> &  sumInputToken,
const edm::EDGetTokenT< BXVector< l1t::EtSum >> &  sumZdcInputToken,
const bool  receiveEG,
const int  nrL1EG,
const bool  receiveTau,
const int  nrL1Tau,
const bool  receiveJet,
const int  nrL1Jet,
const bool  receiveEtSums,
const bool  receiveEtSumsZdc 
)

receive data from Global Muon Trigger

Definition at line 141 of file GlobalBoard.cc.

References mps_fire::i, iEvent, edm::HandleBase::isValid(), metsig::jet, LogDebug, LogTrace, and metsig::tau.

154  {
155  if (m_verbosity) {
156  LogDebug("L1TGlobal") << "\n**** Board receiving Calo Data ";
157  }
158 
159  resetCalo();
160 
161  // get data from Calorimeter
162  if (receiveEG) {
164  iEvent.getByToken(egInputToken, egData);
165 
166  if (!egData.isValid()) {
167  if (m_verbosity) {
168  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<l1t::EGamma> collection"
169  << "\nrequested in configuration, but not found in the event.\n";
170  }
171  } else {
172  // bx in EG data
173  for (int i = egData->getFirstBX(); i <= egData->getLastBX(); ++i) {
174  // Prevent from pushing back bx that is outside of allowed range
175  if (i < m_bxFirst_ || i > m_bxLast_)
176  continue;
177 
178  //Loop over EG in this bx
179  int nObj = 0;
180  for (std::vector<l1t::EGamma>::const_iterator eg = egData->begin(i); eg != egData->end(i); ++eg) {
181  if (nObj < nrL1EG) {
182  (*m_candL1EG).push_back(i, &(*eg));
183  } else {
184  edm::LogWarning("L1TGlobal") << " Too many EG (" << nObj << ") for uGT Configuration maxEG =" << nrL1EG;
185  }
186  LogDebug("L1TGlobal") << "EG Pt " << eg->hwPt() << " Eta " << eg->hwEta() << " Phi " << eg->hwPhi()
187  << " Qual " << eg->hwQual() << " Iso " << eg->hwIso();
188 
189  nObj++;
190  } //end loop over EG in bx
191  } //end loop over bx
192  } //end if over valid EG data
193  } //end if ReceiveEG data
194 
195  if (receiveTau) {
197  iEvent.getByToken(tauInputToken, tauData);
198 
199  if (!tauData.isValid()) {
200  if (m_verbosity) {
201  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<l1t::Tau> collection"
202  << "\nrequested in configuration, but not found in the event.\n";
203  }
204  } else {
205  // bx in tau data
206  for (int i = tauData->getFirstBX(); i <= tauData->getLastBX(); ++i) {
207  // Prevent from pushing back bx that is outside of allowed range
208  if (i < m_bxFirst_ || i > m_bxLast_)
209  continue;
210 
211  //Loop over tau in this bx
212  int nObj = 0;
213  for (std::vector<l1t::Tau>::const_iterator tau = tauData->begin(i); tau != tauData->end(i); ++tau) {
214  if (nObj < nrL1Tau) {
215  (*m_candL1Tau).push_back(i, &(*tau));
216  } else {
217  LogTrace("L1TGlobal") << " Too many Tau (" << nObj << ") for uGT Configuration maxTau =" << nrL1Tau;
218  }
219 
220  LogDebug("L1TGlobal") << "tau Pt " << tau->hwPt() << " Eta " << tau->hwEta() << " Phi " << tau->hwPhi()
221  << " Qual " << tau->hwQual() << " Iso " << tau->hwIso();
222  nObj++;
223 
224  } //end loop over tau in bx
225  } //end loop over bx
226  } //end if over valid tau data
227  } //end if ReceiveTau data
228 
229  if (receiveJet) {
231  iEvent.getByToken(jetInputToken, jetData);
232 
233  if (!jetData.isValid()) {
234  if (m_verbosity) {
235  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<l1t::Jet> collection"
236  << "\nrequested in configuration, but not found in the event.\n";
237  }
238  } else {
239  // bx in jet data
240  for (int i = jetData->getFirstBX(); i <= jetData->getLastBX(); ++i) {
241  // Prevent from pushing back bx that is outside of allowed range
242  if (i < m_bxFirst_ || i > m_bxLast_)
243  continue;
244 
245  //Loop over jet in this bx
246  int nObj = 0;
247  for (std::vector<l1t::Jet>::const_iterator jet = jetData->begin(i); jet != jetData->end(i); ++jet) {
248  if (nObj < nrL1Jet) {
249  (*m_candL1Jet).push_back(i, &(*jet));
250  } else {
251  edm::LogWarning("L1TGlobal") << " Too many Jets (" << nObj << ") for uGT Configuration maxJet =" << nrL1Jet;
252  }
253 
254  LogDebug("L1TGlobal") << "Jet Pt " << jet->hwPt() << " Eta " << jet->hwEta() << " Phi " << jet->hwPhi()
255  << " Qual " << jet->hwQual() << " Iso " << jet->hwIso();
256  nObj++;
257  } //end loop over jet in bx
258  } //end loop over bx
259  } //end if over valid jet data
260  } //end if ReceiveJet data
261 
262  if (receiveEtSums) {
264  iEvent.getByToken(sumInputToken, etSumData);
265 
266  if (!etSumData.isValid()) {
267  if (m_verbosity) {
268  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<l1t::EtSum> collection"
269  << "\nrequested in configuration, but not found in the event.\n";
270  }
271  } else {
272  for (int i = etSumData->getFirstBX(); i <= etSumData->getLastBX(); ++i) {
273  // Prevent from pushing back bx that is outside of allowed range
274  if (i < m_bxFirst_ || i > m_bxLast_)
275  continue;
276 
277  //Loop over EtSum objects in this bx
278  for (std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(i); etsum != etSumData->end(i); ++etsum) {
279  (*m_candL1EtSum).push_back(i, &(*etsum));
280 
281  /* In case we need to split these out
282  switch ( etsum->getType() ) {
283  case l1t::EtSum::EtSumType::kMissingEt:
284  {
285  //(*m_candETM).push_back(i,&(*etsum));
286  LogDebug("L1TGlobal") << "ETM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi();
287  }
288  break;
289  case l1t::EtSum::EtSumType::kMissingHt:
290  {
291  //(*m_candHTM).push_back(i,&(*etsum));
292  LogDebug("L1TGlobal") << "HTM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi();
293  }
294  break;
295  case l1t::EtSum::EtSumType::kTotalEt:
296  {
297  //(*m_candETT).push_back(i,&(*etsum));
298  LogDebug("L1TGlobal") << "ETT: Pt " << etsum->hwPt();
299  }
300  break;
301  case l1t::EtSum::EtSumType::kTotalHt:
302  {
303  //(*m_candHTT).push_back(i,&(*etsum));
304  LogDebug("L1TGlobal") << "HTT: Pt " << etsum->hwPt();
305  }
306  break;
307  case l1t::EtSum::EtSumType::kTowerCount:
308  {
309  //(*m_candTowerCount).push_back(i,&(*etsum));
310  LogDebug("L1TGlobal") << "TowerCount: " << etsum->hwPt();
311  }
312  break;
313  default:
314  LogDebug("L1TGlobal") << "Default encounted ";
315  break;
316  }
317 */
318 
319  } //end loop over EtSum objects in bx
320  } //end loop over Bx
321  }
322  }
323 
324  if (receiveEtSumsZdc) {
326  iEvent.getByToken(sumZdcInputToken, etSumData);
327 
328  if (!etSumData.isValid()) {
329  if (m_verbosity) {
330  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the ZDC Energy Sums collection"
331  << "\nrequested in configuration, but not found in the event.\n";
332  }
333  } else {
334  for (int i = etSumData->getFirstBX(); i <= etSumData->getLastBX(); ++i) {
335  // Prevent from pushing back bx that is outside of allowed range
336  if (i < m_bxFirst_ || i > m_bxLast_)
337  continue;
338 
339  for (std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(i); etsum != etSumData->end(i); ++etsum) {
340  (*m_candL1EtSumZdc).push_back(i, &(*etsum));
341  }
342  } //end loop over Bx
343  }
344  }
345 }
#define LogTrace(id)
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
int iEvent
Definition: GenABIO.cc:224
bool isValid() const
Definition: HandleBase.h:70
Log< level::Warning, false > LogWarning
#define LogDebug(id)

◆ receiveExternalData()

void GlobalBoard::receiveExternalData ( const edm::Event iEvent,
const edm::EDGetTokenT< BXVector< GlobalExtBlk >> &  extInputToken,
const bool  receiveExt 
)

Definition at line 459 of file GlobalBoard.cc.

References mps_fire::i, iEvent, edm::HandleBase::isValid(), and LogDebug.

461  {
462  if (m_verbosity) {
463  LogDebug("L1TGlobal") << "\n**** GlobalBoard receiving external data = ";
464  //<< "\n from input tag " << muInputTag << "\n"
465  }
466 
467  resetExternal();
468 
469  // get data from Global Muon Trigger
470  if (receiveExt) {
472  iEvent.getByToken(extInputToken, extData);
473 
474  if (!extData.isValid()) {
475  if (m_verbosity) {
476  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<GlobalExtBlk> collection"
477  << "\nrequested in configuration, but not found in the event.\n";
478  }
479  } else {
480  // bx in muon data
481  for (int i = extData->getFirstBX(); i <= extData->getLastBX(); ++i) {
482  // Prevent from pushing back bx that is outside of allowed range
483  if (i < m_bxFirst_ || i > m_bxLast_)
484  continue;
485 
486  //Loop over ext in this bx
487  for (std::vector<GlobalExtBlk>::const_iterator ext = extData->begin(i); ext != extData->end(i); ++ext) {
488  (*m_candL1External).push_back(i, &(*ext));
489  } //end loop over ext in bx
490  } //end loop over bx
491  } //end if over valid ext data
492  } //end if ReceiveExt data
493 }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
int iEvent
Definition: GenABIO.cc:224
bool isValid() const
Definition: HandleBase.h:70
Log< level::Warning, false > LogWarning
Definition: memstream.h:15
#define LogDebug(id)

◆ receiveMuonObjectData()

void GlobalBoard::receiveMuonObjectData ( const edm::Event iEvent,
const edm::EDGetTokenT< BXVector< l1t::Muon >> &  muInputToken,
const bool  receiveMu,
const int  nrL1Mu 
)

Definition at line 348 of file GlobalBoard.cc.

References mps_fire::i, iEvent, edm::HandleBase::isValid(), LogDebug, and amptDefaultParameters_cff::mu.

351  {
352  if (m_verbosity) {
353  LogDebug("L1TGlobal") << "\n**** GlobalBoard receiving muon data = ";
354  //<< "\n from input tag " << muInputTag << "\n"
355  }
356 
357  resetMu();
358 
359  // get data from Global Muon Trigger
360  if (receiveMu) {
362  iEvent.getByToken(muInputToken, muonData);
363 
364  if (!muonData.isValid()) {
365  if (m_verbosity) {
366  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<l1t::Muon> collection"
367  << "\nrequested in configuration, but not found in the event.\n";
368  }
369  } else {
370  // bx in muon data
371  for (int i = muonData->getFirstBX(); i <= muonData->getLastBX(); ++i) {
372  // Prevent from pushing back bx that is outside of allowed range
373  if (i < m_bxFirst_ || i > m_bxLast_)
374  continue;
375 
376  //Loop over Muons in this bx
377  int nObj = 0;
378  for (std::vector<l1t::Muon>::const_iterator mu = muonData->begin(i); mu != muonData->end(i); ++mu) {
379  if (nObj < nrL1Mu) {
380  (*m_candL1Mu).push_back(i, &(*mu));
381  } else {
382  edm::LogWarning("L1TGlobal") << " Too many Muons (" << nObj << ") for uGT Configuration maxMu =" << nrL1Mu;
383  }
384 
385  LogDebug("L1TGlobal") << "Muon Pt " << mu->hwPt() << " EtaAtVtx " << mu->hwEtaAtVtx() << " PhiAtVtx "
386  << mu->hwPhiAtVtx() << " Qual " << mu->hwQual() << " Iso " << mu->hwIso();
387  nObj++;
388  } //end loop over muons in bx
389  } //end loop over bx
390  } //end if over valid muon data
391  } //end if ReceiveMuon data
392 }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
int iEvent
Definition: GenABIO.cc:224
bool isValid() const
Definition: HandleBase.h:70
Log< level::Warning, false > LogWarning
#define LogDebug(id)

◆ receiveMuonShowerObjectData()

void GlobalBoard::receiveMuonShowerObjectData ( const edm::Event iEvent,
const edm::EDGetTokenT< BXVector< l1t::MuonShower >> &  muShowerInputToken,
const bool  receiveMuShower,
const int  nrL1MuShower 
)

Definition at line 395 of file GlobalBoard.cc.

References mps_fire::i, iEvent, edm::HandleBase::isValid(), and amptDefaultParameters_cff::mu.

398  {
399  // get data from Global Muon Trigger
400  if (receiveMuShower) {
402  iEvent.getByToken(muShowerInputToken, muonData);
403 
404  if (!muonData.isValid()) {
405  if (m_verbosity) {
406  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<l1t::MuonShower> collection"
407  << "\nrequested in configuration, but not found in the event.\n";
408  }
409  } else {
410  // Loop over bx in muon data
411  for (int i = muonData->getFirstBX(); i <= muonData->getLastBX(); ++i) {
412  // Prevent from pushing back bx that is outside of allowed range
413  if (i < m_bxFirst_ || i > m_bxLast_)
414  continue;
415 
416  // Loop over Muon Showers in this bx
417  int nObj = 0;
418  for (std::vector<l1t::MuonShower>::const_iterator mu = muonData->begin(i); mu != muonData->end(i); ++mu) {
419  if (nObj < nrL1MuShower) {
420  /* NOTE: here the single object is split up into 5 separate MuonShower objects
421  similarly to the description in the UTM library, where the conditions are four different objects.
422  */
423 
424  std::shared_ptr<l1t::MuonShower> musOneNominalInTime =
425  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
426  std::shared_ptr<l1t::MuonShower> musOneTightInTime =
427  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
428  std::shared_ptr<l1t::MuonShower> musTwoLooseDiffSectorsInTime =
429  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
430  std::shared_ptr<l1t::MuonShower> musOutOfTime0 =
431  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
432  std::shared_ptr<l1t::MuonShower> musOutOfTime1 =
433  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
434 
435  musOneNominalInTime->setOneNominalInTime(mu->isOneNominalInTime());
436  musOneTightInTime->setOneTightInTime(mu->isOneTightInTime());
437  musTwoLooseDiffSectorsInTime->setTwoLooseDiffSectorsInTime(mu->isTwoLooseDiffSectorsInTime());
438  musOutOfTime0->setMusOutOfTime0(mu->musOutOfTime0());
439  musOutOfTime1->setMusOutOfTime1(mu->musOutOfTime1());
440 
441  (*m_candL1MuShower).push_back(i, musOneNominalInTime);
442  (*m_candL1MuShower).push_back(i, musOneTightInTime);
443  (*m_candL1MuShower).push_back(i, musTwoLooseDiffSectorsInTime);
444  (*m_candL1MuShower).push_back(i, musOutOfTime0);
445  (*m_candL1MuShower).push_back(i, musOutOfTime1);
446 
447  } else {
448  edm::LogWarning("L1TGlobal") << " Too many Muon Showers (" << nObj
449  << ") for uGT Configuration maxMuShower =" << nrL1MuShower;
450  }
451  nObj++;
452  } //end loop over muon showers in bx
453  } //end loop over bx
454  } //end if over valid muon shower data
455  } //end if ReceiveMuonShower data
456 }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
int iEvent
Definition: GenABIO.cc:224
bool isValid() const
Definition: HandleBase.h:70
Log< level::Warning, false > LogWarning

◆ reset()

void GlobalBoard::reset ( void  )

clear uGT

Definition at line 1149 of file GlobalBoard.cc.

1149  {
1150  resetMu();
1151  resetMuonShower();
1152  resetCalo();
1153  resetExternal();
1154 
1155  m_uGtAlgBlk.reset();
1156 
1157  m_gtlDecisionWord.reset();
1158  m_gtlAlgorithmOR.reset();
1159 }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:246
void reset()
reset the content of a GlobalAlgBlk
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:248
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:245

◆ resetCalo()

void GlobalBoard::resetCalo ( )

Definition at line 1174 of file GlobalBoard.cc.

1174  {
1175  m_candL1EG->clear();
1176  m_candL1Tau->clear();
1177  m_candL1Jet->clear();
1178  m_candL1EtSum->clear();
1180 
1186 }
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:234
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:230
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:233
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:232
void clear()
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:231

◆ resetExternal()

void GlobalBoard::resetExternal ( )

Definition at line 1188 of file GlobalBoard.cc.

1188  {
1191 }
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:235
void clear()
void setBXRange(int bxFirst, int bxLast)

◆ resetMu()

void GlobalBoard::resetMu ( )

Definition at line 1162 of file GlobalBoard.cc.

1162  {
1163  m_candL1Mu->clear();
1165 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:228
void clear()
void setBXRange(int bxFirst, int bxLast)

◆ resetMuonShower()

void GlobalBoard::resetMuonShower ( )

Definition at line 1168 of file GlobalBoard.cc.

1168  {
1171 }
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:229
void clear()
void setBXRange(int bxFirst, int bxLast)

◆ runFDL()

void GlobalBoard::runFDL ( const edm::Event iEvent,
const int  iBxInEvent,
const int  totalBxInEvent,
const unsigned int  numberPhysTriggers,
const std::vector< double > &  prescaleFactorsAlgoTrig,
const std::vector< unsigned int > &  triggerMaskAlgoTrig,
const std::vector< int > &  triggerMaskVetoAlgoTrig,
const bool  algorithmTriggersUnprescaled,
const bool  algorithmTriggersUnmasked 
)

run the uGT FDL (Apply Prescales and Veto)

if we are masking.

Definition at line 1005 of file GlobalBoard.cc.

References iEvent, LogDebug, and or.

1013  {
1014  if (m_verbosity) {
1015  LogDebug("L1TGlobal") << "\n**** GlobalBoard apply Final Decision Logic ";
1016  }
1017 
1018  // update and clear prescales at the beginning of the luminosity segment
1019  if (m_prescaleCounterAlgoTrig.empty() or
1020  (m_currentLumi != iEvent.luminosityBlock() and m_resetPSCountersEachLumiSec)) {
1021  m_prescaleCounterAlgoTrig.clear();
1022  m_prescaleCounterAlgoTrig.reserve(totalBxInEvent);
1023  auto const& prescaleCountersAlgoTrig =
1025  : prescaleCounters(prescaleFactorsAlgoTrig);
1026  for (int iBxInEvent = 0; iBxInEvent < totalBxInEvent; ++iBxInEvent) {
1027  m_prescaleCounterAlgoTrig.push_back(prescaleCountersAlgoTrig);
1028  }
1029 
1030  m_currentLumi = iEvent.luminosityBlock();
1031  }
1032 
1033  // Copy Algorithm bits to Prescaled word
1034  // Prescaling and Masking done below if requested.
1036 
1037  // -------------------------------------------
1038  // Apply Prescales or skip if turned off
1039  // -------------------------------------------
1040  if (!algorithmTriggersUnprescaled) {
1041  // iBxInEvent is ... -2 -1 0 1 2 ... while counters are 0 1 2 3 4 ...
1042  int const inBxInEvent = totalBxInEvent / 2 + iBxInEvent;
1043 
1044  bool temp_algPrescaledOr = false;
1045  bool alreadyReported = false;
1046  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1047  bool const bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
1048  if (bitValue) {
1049  // Make sure algo bit in range, warn otherwise
1050  if (iBit < prescaleFactorsAlgoTrig.size()) {
1051  if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
1052  bool const triggered = m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit).accept();
1053  if (triggered) {
1054  temp_algPrescaledOr = true;
1055  } else {
1056  // change bit to false in prescaled word and final decision word
1057  m_uGtAlgBlk.setAlgoDecisionInterm(iBit, false);
1058  } //if Prescale counter reached zero
1059  } //if prescale factor is not 1 (ie. no prescale)
1060  else {
1061  temp_algPrescaledOr = true;
1062  }
1063  } // require bit in range
1064  else if (!alreadyReported) {
1065  alreadyReported = true;
1066  edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent;
1067  }
1068  } //if algo bit is set true
1069  } //loop over alg bits
1070 
1071  m_algPrescaledOr = temp_algPrescaledOr; //temp
1072 
1073  } else {
1074  // Since not Prescaling just take OR of Initial Work
1076 
1077  } //if we are going to apply prescales.
1078 
1079  // Copy Algorithm bits fron Prescaled word to Final Word
1080  // Masking done below if requested.
1082 
1083  if (!algorithmTriggersUnmasked) {
1084  bool temp_algFinalOr = false;
1085  bool alreadyReported = false;
1086  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1087  const bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);
1088 
1089  if (bitValue) {
1090  //bool isMasked = ( triggerMaskAlgoTrig.at(iBit) == 0 );
1091  bool isMasked = false;
1092  if (iBit < triggerMaskAlgoTrig.size())
1093  isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
1094  else if (!alreadyReported) {
1095  alreadyReported = true;
1096  edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent;
1097  }
1098 
1099  bool const passMask = (bitValue && !isMasked);
1100 
1101  if (passMask)
1102  temp_algFinalOr = true;
1103  else
1104  m_uGtAlgBlk.setAlgoDecisionFinal(iBit, false);
1105 
1106  // Check if veto mask is true, if it is, set the event veto flag.
1107  if (triggerMaskVetoAlgoTrig.at(iBit) == 1)
1108  m_algFinalOrVeto = true;
1109  }
1110  }
1111 
1112  m_algIntermOr = temp_algFinalOr;
1113 
1114  } else {
1116 
1117  }
1118 
1119  // --------------------------
1120  // Set FinalOR for this board
1121  // --------------------------
1123 }
void copyIntermToFinal()
Definition: GlobalAlgBlk.h:74
static std::vector< PrescaleCounter > prescaleCountersWithSemirandomInitialCounter(std::vector< double > const &prescaleFactorsAlgoTrig, edm::Event const &iEvent)
void copyInitialToInterm()
Copy vectors words.
Definition: GlobalAlgBlk.h:73
bool m_semiRandomInitialPSCounters
Definition: GlobalBoard.h:278
unsigned int m_currentLumi
Definition: GlobalBoard.h:253
static std::vector< PrescaleCounter > prescaleCounters(std::vector< double > const &prescaleFactorsAlgoTrig)
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
int iEvent
Definition: GenABIO.cc:224
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
void setAlgoDecisionInterm(unsigned int bit, bool val)
Definition: GlobalAlgBlk.cc:84
std::vector< std::vector< PrescaleCounter > > m_prescaleCounterAlgoTrig
Definition: GlobalBoard.h:304
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:248
std::vector< bool > const & getAlgoDecisionInterm() const
Definition: GlobalAlgBlk.h:83
std::vector< bool > const & getAlgoDecisionInitial() const
Get decision bits.
Definition: GlobalAlgBlk.h:82
Log< level::Warning, false > LogWarning
bool m_resetPSCountersEachLumiSec
Definition: GlobalBoard.h:275
void setAlgoDecisionFinal(unsigned int bit, bool val)
Definition: GlobalAlgBlk.cc:94
#define LogDebug(id)

◆ runGTL()

void GlobalBoard::runGTL ( const edm::Event iEvent,
const edm::EventSetup evSetup,
const TriggerMenu m_l1GtMenu,
const bool  produceL1GtObjectMapRecord,
const int  iBxInEvent,
std::unique_ptr< GlobalObjectMapRecord > &  gtObjectMapRecord,
const unsigned int  numberPhysTriggers,
const int  nrL1Mu,
const int  nrL1MuShower,
const int  nrL1EG,
const int  nrL1Tau,
const int  nrL1Jet 
)

run the uGT GTL (Conditions and Algorithms)

Definition at line 496 of file GlobalBoard.cc.

References CorrelationThreeBodyTemplate::cond0Category(), CorrelationTemplate::cond0Category(), CorrelationWithOverlapRemovalTemplate::cond0Category(), CorrelationThreeBodyTemplate::cond0Index(), CorrelationTemplate::cond0Index(), CorrelationWithOverlapRemovalTemplate::cond0Index(), CorrelationThreeBodyTemplate::cond1Category(), CorrelationTemplate::cond1Category(), CorrelationWithOverlapRemovalTemplate::cond1Category(), CorrelationThreeBodyTemplate::cond1Index(), CorrelationTemplate::cond1Index(), CorrelationWithOverlapRemovalTemplate::cond1Index(), CorrelationThreeBodyTemplate::cond2Category(), CorrelationWithOverlapRemovalTemplate::cond2Category(), CorrelationThreeBodyTemplate::cond2Index(), CorrelationWithOverlapRemovalTemplate::cond2Index(), l1t::CondAXOL1TL, l1t::CondCalo, l1t::CondCorrelation, l1t::CondCorrelationThreeBody, l1t::CondCorrelationWithOverlapRemoval, l1t::CondEnergySum, l1t::CondEnergySumZdc, l1t::CondExternal, l1t::CondMuon, l1t::CondMuonShower, l1t::CondNull, TriggerMenu::corCaloTemplate(), TriggerMenu::corEnergySumTemplate(), TriggerMenu::corMuonTemplate(), l1t::AlgorithmEvaluation::evaluateAlgorithm(), l1t::ConditionEvaluation::evaluateConditionStoreResult(), newFWLiteAna::found, l1t::GlobalScales::getScalesName(), l1t::AlgorithmEvaluation::gtAlgoCombinationVector(), l1t::AlgorithmEvaluation::gtAlgoResult(), TriggerMenu::gtAlgorithmMap(), TriggerMenu::gtConditionMap(), TriggerMenu::gtScales(), LogDebug, LogTrace, l1t::AlgorithmEvaluation::operandTokenVector(), CalibrationSummaryClient_cfi::otype, print(), l1t::AXOL1TLCondition::print(), l1t::MuonShowerCondition::print(), l1t::MuCondition::print(), l1t::EnergySumCondition::print(), l1t::EnergySumZdcCondition::print(), l1t::ExternalCondition::print(), l1t::CorrCondition::print(), l1t::CaloCondition::print(), l1t::CorrThreeBodyCondition::print(), l1t::CorrWithOverlapRemovalCondition::print(), l1t::AlgorithmEvaluation::print(), GlobalObjectMap::print(), GlobalObjectMap::setAlgoBitNumber(), GlobalObjectMap::setAlgoGtlResult(), GlobalObjectMap::setAlgoName(), l1t::CorrCondition::setScales(), l1t::CorrThreeBodyCondition::setScales(), l1t::CorrWithOverlapRemovalCondition::setScales(), l1t::ConditionEvaluation::setVerbosity(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalObjectMap::swapCombinationVector(), GlobalObjectMap::swapObjectTypeVector(), and GlobalObjectMap::swapOperandTokenVector().

507  {
508  const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->gtConditionMap();
509  const AlgorithmMap& algorithmMap = m_l1GtMenu->gtAlgorithmMap();
510  const GlobalScales& gtScales = m_l1GtMenu->gtScales();
511  const std::string scaleSetName = gtScales.getScalesName();
512  LogDebug("L1TGlobal") << " L1 Menu Scales -- Set Name: " << scaleSetName;
513 
514  // Reset AlgBlk for this bx
515  m_uGtAlgBlk.reset();
516  m_algInitialOr = false;
517  m_algPrescaledOr = false;
518  m_algIntermOr = false;
519  m_algFinalOr = false;
520  m_algFinalOrVeto = false;
521 
522  const std::vector<std::vector<MuonTemplate>>& corrMuon = m_l1GtMenu->corMuonTemplate();
523 
524  const std::vector<std::vector<CaloTemplate>>& corrCalo = m_l1GtMenu->corCaloTemplate();
525 
526  const std::vector<std::vector<EnergySumTemplate>>& corrEnergySum = m_l1GtMenu->corEnergySumTemplate();
527 
528  LogDebug("L1TGlobal") << "Size corrMuon " << corrMuon.size() << "\nSize corrCalo " << corrCalo.size()
529  << "\nSize corrSums " << corrEnergySum.size();
530 
531  // -----------------------------------------------------
532  // Loop over condition maps (one map per condition chip),
533  // then loop over conditions in the map and
534  // save the results in temporary maps
535  // -----------------------------------------------------
536  // never happens in production but at first event...
537  if (m_conditionResultMaps.size() != conditionMap.size()) {
538  m_conditionResultMaps.clear();
539  m_conditionResultMaps.resize(conditionMap.size());
540  }
541 
542  int iChip = -1;
543 
544  for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
545  itCondOnChip != conditionMap.end();
546  itCondOnChip++) {
547  iChip++;
548 
550 
551  for (CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
552  // evaluate condition
553  switch ((itCond->second)->condCategory()) {
554  case CondMuon: {
555  // BLW Not sure what to do with this for now
556  const int ifMuEtaNumberBits = 0;
557 
558  MuCondition* muCondition = new MuCondition(itCond->second, this, nrL1Mu, ifMuEtaNumberBits);
559 
560  muCondition->setVerbosity(m_verbosity);
561 
562  muCondition->evaluateConditionStoreResult(iBxInEvent);
563 
564  cMapResults[itCond->first] = muCondition;
565 
566  if (m_verbosity && m_isDebugEnabled) {
567  std::ostringstream myCout;
568  muCondition->print(myCout);
569 
570  LogTrace("L1TGlobal") << myCout.str();
571  }
572  //delete muCondition;
573 
574  } break;
575  case CondMuonShower: {
576  MuonShowerCondition* muShowerCondition = new MuonShowerCondition(itCond->second, this, nrL1MuShower);
577 
578  muShowerCondition->setVerbosity(m_verbosity);
579 
580  muShowerCondition->evaluateConditionStoreResult(iBxInEvent);
581 
582  cMapResults[itCond->first] = muShowerCondition;
583 
584  if (m_verbosity && m_isDebugEnabled) {
585  std::ostringstream myCout;
586  muShowerCondition->print(myCout);
587 
588  edm::LogWarning("L1TGlobal") << "MuonShowerCondition " << myCout.str();
589  }
590  //delete muShowerCondition;
591 
592  } break;
593  case CondCalo: {
594  // BLW Not sure w hat to do with this for now
595  const int ifCaloEtaNumberBits = 0;
596 
597  CaloCondition* caloCondition =
598  new CaloCondition(itCond->second, this, nrL1EG, nrL1Jet, nrL1Tau, ifCaloEtaNumberBits);
599 
600  caloCondition->setVerbosity(m_verbosity);
601 
602  caloCondition->evaluateConditionStoreResult(iBxInEvent);
603 
604  cMapResults[itCond->first] = caloCondition;
605 
606  if (m_verbosity && m_isDebugEnabled) {
607  std::ostringstream myCout;
608  caloCondition->print(myCout);
609 
610  LogTrace("L1TGlobal") << myCout.str();
611  }
612  // delete caloCondition;
613 
614  } break;
615  case CondEnergySum: {
616  EnergySumCondition* eSumCondition = new EnergySumCondition(itCond->second, this);
617 
618  eSumCondition->setVerbosity(m_verbosity);
619  eSumCondition->evaluateConditionStoreResult(iBxInEvent);
620 
621  cMapResults[itCond->first] = eSumCondition;
622 
623  if (m_verbosity && m_isDebugEnabled) {
624  std::ostringstream myCout;
625  eSumCondition->print(myCout);
626 
627  LogTrace("L1TGlobal") << myCout.str();
628  }
629  // delete eSumCondition;
630 
631  } break;
632  case CondEnergySumZdc: {
633  EnergySumZdcCondition* eSumZdcCondition = new EnergySumZdcCondition(itCond->second, this);
634 
635  eSumZdcCondition->setVerbosity(m_verbosity);
636  eSumZdcCondition->evaluateConditionStoreResult(iBxInEvent);
637 
638  cMapResults[itCond->first] = eSumZdcCondition;
639 
640  if (m_verbosity && m_isDebugEnabled) {
641  std::ostringstream myCout;
642  eSumZdcCondition->print(myCout);
643 
644  LogTrace("L1TGlobal") << myCout.str();
645  }
646  // delete eSumZdcCondition;
647 
648  } break;
649  case CondAXOL1TL: {
650  AXOL1TLCondition* axol1tlCondition = new AXOL1TLCondition(itCond->second, this);
651 
652  axol1tlCondition->setVerbosity(m_verbosity);
653 
654  axol1tlCondition->evaluateConditionStoreResult(iBxInEvent);
655 
656  cMapResults[itCond->first] = axol1tlCondition;
657 
658  if (m_verbosity && m_isDebugEnabled) {
659  std::ostringstream myCout;
660  axol1tlCondition->print(myCout);
661 
662  edm::LogWarning("L1TGlobal") << "axol1tlCondition " << myCout.str();
663  }
664  //delete axol1tlCCondition;
665 
666  } break;
667 
668  case CondExternal: {
669  ExternalCondition* extCondition = new ExternalCondition(itCond->second, this);
670 
671  extCondition->setVerbosity(m_verbosity);
672  extCondition->evaluateConditionStoreResult(iBxInEvent);
673 
674  cMapResults[itCond->first] = extCondition;
675 
676  if (m_verbosity && m_isDebugEnabled) {
677  std::ostringstream myCout;
678  extCondition->print(myCout);
679 
680  LogTrace("L1TGlobal") << myCout.str();
681  }
682  // delete extCondition;
683 
684  } break;
685  case CondCorrelation: {
686  // get first the subconditions
687  const CorrelationTemplate* corrTemplate = static_cast<const CorrelationTemplate*>(itCond->second);
688  const GtConditionCategory cond0Categ = corrTemplate->cond0Category();
689  const GtConditionCategory cond1Categ = corrTemplate->cond1Category();
690  const int cond0Ind = corrTemplate->cond0Index();
691  const int cond1Ind = corrTemplate->cond1Index();
692 
693  const GlobalCondition* cond0Condition = nullptr;
694  const GlobalCondition* cond1Condition = nullptr;
695 
696  // maximum number of objects received for evaluation of l1t::Type1s condition
697  int cond0NrL1Objects = 0;
698  int cond1NrL1Objects = 0;
699  LogDebug("L1TGlobal") << " cond0NrL1Objects" << cond0NrL1Objects << " cond1NrL1Objects "
700  << cond1NrL1Objects;
701 
702  switch (cond0Categ) {
703  case CondMuon: {
704  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
705  } break;
706  case CondCalo: {
707  cond0Condition = &((corrCalo[iChip])[cond0Ind]);
708  } break;
709  case CondEnergySum: {
710  cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
711  } break;
712  default: {
713  // do nothing, should not arrive here
714  } break;
715  }
716 
717  switch (cond1Categ) {
718  case CondMuon: {
719  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
720  } break;
721  case CondCalo: {
722  cond1Condition = &((corrCalo[iChip])[cond1Ind]);
723  } break;
724  case CondEnergySum: {
725  cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
726  } break;
727  default: {
728  // do nothing, should not arrive here
729  } break;
730  }
731 
732  CorrCondition* correlationCond = new CorrCondition(itCond->second, cond0Condition, cond1Condition, this);
733 
734  correlationCond->setVerbosity(m_verbosity);
735  correlationCond->setScales(&gtScales);
736  correlationCond->evaluateConditionStoreResult(iBxInEvent);
737 
738  cMapResults[itCond->first] = correlationCond;
739 
740  if (m_verbosity && m_isDebugEnabled) {
741  std::ostringstream myCout;
742  correlationCond->print(myCout);
743 
744  LogTrace("L1TGlobal") << myCout.str();
745  }
746 
747  // delete correlationCond;
748 
749  } break;
751  // get first the subconditions
752  const CorrelationThreeBodyTemplate* corrTemplate =
753  static_cast<const CorrelationThreeBodyTemplate*>(itCond->second);
754  const GtConditionCategory cond0Categ = corrTemplate->cond0Category();
755  const GtConditionCategory cond1Categ = corrTemplate->cond1Category();
756  const GtConditionCategory cond2Categ = corrTemplate->cond2Category();
757  const int cond0Ind = corrTemplate->cond0Index();
758  const int cond1Ind = corrTemplate->cond1Index();
759  const int cond2Ind = corrTemplate->cond2Index();
760 
761  const GlobalCondition* cond0Condition = nullptr;
762  const GlobalCondition* cond1Condition = nullptr;
763  const GlobalCondition* cond2Condition = nullptr;
764 
765  // maximum number of objects received for evaluation of l1t::Type1s condition
766  int cond0NrL1Objects = 0;
767  int cond1NrL1Objects = 0;
768  int cond2NrL1Objects = 0;
769  LogDebug("L1TGlobal") << " cond0NrL1Objects " << cond0NrL1Objects << " cond1NrL1Objects "
770  << cond1NrL1Objects << " cond2NrL1Objects " << cond2NrL1Objects;
771  if (cond0Categ == CondMuon) {
772  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
773  } else {
774  LogDebug("L1TGlobal") << "No muon0 to evaluate three-body correlation condition";
775  }
776  if (cond1Categ == CondMuon) {
777  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
778  } else {
779  LogDebug("L1TGlobal") << "No muon1 to evaluate three-body correlation condition";
780  }
781  if (cond2Categ == CondMuon) {
782  cond2Condition = &((corrMuon[iChip])[cond2Ind]);
783  } else {
784  LogDebug("L1TGlobal") << "No muon2 to evaluate three-body correlation condition";
785  }
786 
787  CorrThreeBodyCondition* correlationThreeBodyCond =
788  new CorrThreeBodyCondition(itCond->second, cond0Condition, cond1Condition, cond2Condition, this);
789 
790  correlationThreeBodyCond->setVerbosity(m_verbosity);
791  correlationThreeBodyCond->setScales(&gtScales);
792  correlationThreeBodyCond->evaluateConditionStoreResult(iBxInEvent);
793  cMapResults[itCond->first] = correlationThreeBodyCond;
794 
795  if (m_verbosity && m_isDebugEnabled) {
796  std::ostringstream myCout;
797  correlationThreeBodyCond->print(myCout);
798 
799  LogTrace("L1TGlobal") << myCout.str();
800  }
801  // delete correlationThreeBodyCond;
802  } break;
803 
805  // get first the subconditions
806  const CorrelationWithOverlapRemovalTemplate* corrTemplate =
807  static_cast<const CorrelationWithOverlapRemovalTemplate*>(itCond->second);
808  const GtConditionCategory cond0Categ = corrTemplate->cond0Category();
809  const GtConditionCategory cond1Categ = corrTemplate->cond1Category();
810  const GtConditionCategory cond2Categ = corrTemplate->cond2Category();
811  const int cond0Ind = corrTemplate->cond0Index();
812  const int cond1Ind = corrTemplate->cond1Index();
813  const int cond2Ind = corrTemplate->cond2Index();
814 
815  const GlobalCondition* cond0Condition = nullptr;
816  const GlobalCondition* cond1Condition = nullptr;
817  const GlobalCondition* cond2Condition = nullptr;
818 
819  // maximum number of objects received for evaluation of l1t::Type1s condition
820  int cond0NrL1Objects = 0;
821  int cond1NrL1Objects = 0;
822  int cond2NrL1Objects = 0;
823  LogDebug("L1TGlobal") << " cond0NrL1Objects" << cond0NrL1Objects << " cond1NrL1Objects " << cond1NrL1Objects
824  << " cond2NrL1Objects " << cond2NrL1Objects;
825 
826  switch (cond0Categ) {
827  case CondMuon: {
828  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
829  } break;
830  case CondCalo: {
831  cond0Condition = &((corrCalo[iChip])[cond0Ind]);
832  } break;
833  case CondEnergySum: {
834  cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
835  } break;
836  default: {
837  // do nothing, should not arrive here
838  } break;
839  }
840 
841  switch (cond1Categ) {
842  case CondMuon: {
843  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
844  } break;
845  case CondCalo: {
846  cond1Condition = &((corrCalo[iChip])[cond1Ind]);
847  } break;
848  case CondEnergySum: {
849  cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
850  } break;
851  default: {
852  // do nothing, should not arrive here
853  } break;
854  }
855 
856  switch (cond2Categ) {
857  case CondMuon: {
858  cond2Condition = &((corrMuon[iChip])[cond2Ind]);
859  } break;
860  case CondCalo: {
861  cond2Condition = &((corrCalo[iChip])[cond2Ind]);
862  } break;
863  case CondEnergySum: {
864  cond2Condition = &((corrEnergySum[iChip])[cond2Ind]);
865  } break;
866  default: {
867  // do nothing, should not arrive here
868  } break;
869  }
870 
871  CorrWithOverlapRemovalCondition* correlationCondWOR =
872  new CorrWithOverlapRemovalCondition(itCond->second, cond0Condition, cond1Condition, cond2Condition, this);
873 
874  correlationCondWOR->setVerbosity(m_verbosity);
875  correlationCondWOR->setScales(&gtScales);
876  correlationCondWOR->evaluateConditionStoreResult(iBxInEvent);
877 
878  cMapResults[itCond->first] = correlationCondWOR;
879 
880  if (m_verbosity && m_isDebugEnabled) {
881  std::ostringstream myCout;
882  correlationCondWOR->print(myCout);
883 
884  LogTrace("L1TGlobal") << myCout.str();
885  }
886 
887  // delete correlationCondWOR;
888 
889  } break;
890  case CondNull: {
891  // do nothing
892 
893  } break;
894  default: {
895  // do nothing
896 
897  } break;
898  }
899  }
900  }
901 
902  // -----------------------
903  // Loop over algorithm map
904  // -----------------------
905  // Empty vector for object maps - filled during loop
906  std::vector<GlobalObjectMap> objMapVec;
907  if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
908  objMapVec.reserve(numberPhysTriggers);
909 
910  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
911  AlgorithmEvaluation gtAlg(itAlgo->second);
912  gtAlg.evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
913 
914  int algBitNumber = (itAlgo->second).algoBitNumber();
915  bool algResult = gtAlg.gtAlgoResult();
916 
917  LogDebug("L1TGlobal") << " ===> for iBxInEvent = " << iBxInEvent << ":\t algBitName = " << itAlgo->first
918  << ",\t algBitNumber = " << algBitNumber << ",\t algResult = " << algResult;
919 
920  if (algResult) {
921  // m_gtlAlgorithmOR.set(algBitNumber);
922  m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber, algResult);
923  m_algInitialOr = true;
924  }
925 
926  if (m_verbosity && m_isDebugEnabled) {
927  std::ostringstream myCout;
928  (itAlgo->second).print(myCout);
929  gtAlg.print(myCout);
930 
931  LogTrace("L1TGlobal") << myCout.str();
932  }
933 
934  // object maps only for BxInEvent = 0
935  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
936  std::vector<L1TObjectTypeInCond> otypes;
937  for (auto iop = gtAlg.operandTokenVector().begin(); iop != gtAlg.operandTokenVector().end(); ++iop) {
938  //cout << "INFO: operand name: " << iop->tokenName << "\n";
939  int found = 0;
941  for (auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
942  auto match = imap->find(iop->tokenName);
943 
944  if (match != imap->end()) {
945  found = 1;
946  //cout << "DEBUG: found match for " << iop->tokenName << " at " << match->first << "\n";
947 
948  otype = match->second->objectType();
949 
950  for (auto itype = otype.begin(); itype != otype.end(); itype++) {
951  //cout << "type: " << *itype << "\n";
952  }
953  }
954  }
955  if (!found) {
956  edm::LogWarning("L1TGlobal") << "\n Failed to find match for operand token " << iop->tokenName << "\n";
957  } else {
958  otypes.push_back(otype);
959  }
960  }
961 
962  // set object map
963  GlobalObjectMap objMap;
964 
965  objMap.setAlgoName(itAlgo->first);
966  objMap.setAlgoBitNumber(algBitNumber);
967  objMap.setAlgoGtlResult(algResult);
968  objMap.swapOperandTokenVector(gtAlg.operandTokenVector());
969  objMap.swapCombinationVector(gtAlg.gtAlgoCombinationVector());
970  // gtAlg is empty now...
971  objMap.swapObjectTypeVector(otypes);
972 
973  if (m_verbosity && m_isDebugEnabled) {
974  std::ostringstream myCout1;
975  objMap.print(myCout1);
976 
977  LogTrace("L1TGlobal") << myCout1.str();
978  }
979 
980  objMapVec.push_back(objMap);
981  }
982  }
983 
984  // object maps only for BxInEvent = 0
985  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
986  gtObjectMapRecord->swapGtObjectMap(objMapVec);
987  }
988 
989  // loop over condition maps (one map per condition chip)
990  // then loop over conditions in the map
991  // delete the conditions created with new, zero pointer, do not clear map, keep the vector as is...
992  for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip = m_conditionResultMaps.begin();
993  itCondOnChip != m_conditionResultMaps.end();
994  itCondOnChip++) {
995  for (AlgorithmEvaluation::ItEvalMap itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
996  delete itCond->second;
997  itCond->second = nullptr;
998  }
999  }
1000 }
void setAlgoBitNumber(int algoBitNumberValue)
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
const l1t::GlobalScales & gtScales() const
get the scales
Definition: TriggerMenu.h:208
std::vector< l1t::GlobalObject > L1TObjectTypeInCond
void swapOperandTokenVector(std::vector< GlobalLogicParser::OperandToken > &operandTokenVectorValue)
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
Definition: TriggerMenu.h:185
void setAlgoDecisionInitial(unsigned int bit, bool val)
Set decision bits.
Definition: GlobalAlgBlk.cc:73
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
const l1t::AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: TriggerMenu.h:198
const int cond1Index() const
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
Definition: TriggerMenu.h:180
const l1t::GtConditionCategory cond1Category() const
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
void print(std::ostream &myCout) const
print the full object map
const l1t::GtConditionCategory cond1Category() const
void swapObjectTypeVector(std::vector< L1TObjectTypeInCond > &objectTypeVectorValue)
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
ConditionEvaluationMap::iterator ItEvalMap
#define LogTrace(id)
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
const l1t::GtConditionCategory cond2Category() const
GtConditionCategory
condition categories
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
const l1t::GtConditionCategory cond0Category() const
get / set the category of the thre sub-conditions
const l1t::GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
void reset()
reset the content of a GlobalAlgBlk
const TriggerMenu * m_l1GtMenu
Definition: GlobalBoard.h:214
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
const l1t::GtConditionCategory cond1Category() const
void setAlgoGtlResult(bool algoGtlResultValue)
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:248
void setAlgoName(const std::string &algoNameValue)
const std::vector< l1t::ConditionMap > & gtConditionMap() const
get / set / build the condition maps
Definition: TriggerMenu.h:83
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
Definition: TriggerMenu.h:191
const int cond0Index() const
get / set the index of the three subconditions in the cor* vector from menu
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::unordered_map< std::string, ConditionEvaluation * > ConditionEvaluationMap
copy constructor
const l1t::GtConditionCategory cond0Category() const
get / set the category of the three subconditions
Log< level::Warning, false > LogWarning
const l1t::GtConditionCategory cond2Category() const
#define LogDebug(id)
std::vector< AlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: GlobalBoard.h:251

◆ setBxFirst()

void GlobalBoard::setBxFirst ( int  bx)

Definition at line 111 of file GlobalBoard.cc.

References nano_mu_digi_cff::bx.

◆ setBxLast()

void GlobalBoard::setBxLast ( int  bx)

Definition at line 113 of file GlobalBoard.cc.

References nano_mu_digi_cff::bx.

◆ setResetPSCountersEachLumiSec()

void l1t::GlobalBoard::setResetPSCountersEachLumiSec ( bool  val)
inline

Definition at line 204 of file GlobalBoard.h.

References m_resetPSCountersEachLumiSec, and heppy_batch::val.

◆ setSemiRandomInitialPSCounters()

void l1t::GlobalBoard::setSemiRandomInitialPSCounters ( bool  val)
inline

◆ setVerbosity()

void l1t::GlobalBoard::setVerbosity ( const int  verbosity)
inline

Definition at line 208 of file GlobalBoard.h.

References m_verbosity, and verbosity.

208 { m_verbosity = verbosity; }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
const int verbosity

Member Data Documentation

◆ m_algFinalOr

bool l1t::GlobalBoard::m_algFinalOr
private

Definition at line 264 of file GlobalBoard.h.

◆ m_algFinalOrVeto

bool l1t::GlobalBoard::m_algFinalOrVeto
private

Definition at line 265 of file GlobalBoard.h.

◆ m_algInitialOr

bool l1t::GlobalBoard::m_algInitialOr
private

Definition at line 261 of file GlobalBoard.h.

◆ m_algIntermOr

bool l1t::GlobalBoard::m_algIntermOr
private

Definition at line 262 of file GlobalBoard.h.

◆ m_algPrescaledOr

bool l1t::GlobalBoard::m_algPrescaledOr
private

Definition at line 263 of file GlobalBoard.h.

◆ m_boardEventCount

unsigned int l1t::GlobalBoard::m_boardEventCount
private

Definition at line 268 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_bxFirst_

int l1t::GlobalBoard::m_bxFirst_
private

Definition at line 242 of file GlobalBoard.h.

◆ m_bxLast_

int l1t::GlobalBoard::m_bxLast_
private

Definition at line 243 of file GlobalBoard.h.

◆ m_candL1EG

BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::m_candL1EG
private

Definition at line 230 of file GlobalBoard.h.

Referenced by getCandL1EG().

◆ m_candL1EtSum

BXVector<const l1t::EtSum*>* l1t::GlobalBoard::m_candL1EtSum
private

Definition at line 233 of file GlobalBoard.h.

Referenced by getCandL1EtSum().

◆ m_candL1EtSumZdc

BXVector<const l1t::EtSum*>* l1t::GlobalBoard::m_candL1EtSumZdc
private

Definition at line 234 of file GlobalBoard.h.

Referenced by getCandL1EtSumZdc().

◆ m_candL1External

BXVector<const GlobalExtBlk*>* l1t::GlobalBoard::m_candL1External
private

Definition at line 235 of file GlobalBoard.h.

Referenced by getCandL1External().

◆ m_candL1Jet

BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::m_candL1Jet
private

Definition at line 232 of file GlobalBoard.h.

Referenced by getCandL1Jet().

◆ m_candL1Mu

BXVector<const l1t::Muon*>* l1t::GlobalBoard::m_candL1Mu
private

Definition at line 228 of file GlobalBoard.h.

Referenced by getCandL1Mu().

◆ m_candL1MuShower

BXVector<std::shared_ptr<l1t::MuonShower> >* l1t::GlobalBoard::m_candL1MuShower
private

Definition at line 229 of file GlobalBoard.h.

Referenced by getCandL1MuShower().

◆ m_candL1Tau

BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::m_candL1Tau
private

Definition at line 231 of file GlobalBoard.h.

Referenced by getCandL1Tau().

◆ m_conditionResultMaps

std::vector<AlgorithmEvaluation::ConditionEvaluationMap> l1t::GlobalBoard::m_conditionResultMaps
private

Definition at line 251 of file GlobalBoard.h.

◆ m_currentLumi

unsigned int l1t::GlobalBoard::m_currentLumi
private

Definition at line 253 of file GlobalBoard.h.

◆ m_gtlAlgorithmOR

std::bitset<GlobalAlgBlk::maxPhysicsTriggers> l1t::GlobalBoard::m_gtlAlgorithmOR
private

Definition at line 245 of file GlobalBoard.h.

Referenced by getAlgorithmOR(), and GlobalBoard().

◆ m_gtlDecisionWord

std::bitset<GlobalAlgBlk::maxPhysicsTriggers> l1t::GlobalBoard::m_gtlDecisionWord
private

Definition at line 246 of file GlobalBoard.h.

Referenced by getDecisionWord(), and GlobalBoard().

◆ m_isDebugEnabled

bool l1t::GlobalBoard::m_isDebugEnabled
private

Definition at line 258 of file GlobalBoard.h.

◆ m_l1CaloGeometry

const L1CaloGeometry* l1t::GlobalBoard::m_l1CaloGeometry
private

Definition at line 218 of file GlobalBoard.h.

◆ m_l1CaloGeometryCacheID

unsigned long long l1t::GlobalBoard::m_l1CaloGeometryCacheID
private

Definition at line 219 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_l1GtMenu

const TriggerMenu* l1t::GlobalBoard::m_l1GtMenu
private

Definition at line 214 of file GlobalBoard.h.

◆ m_l1GtMenuCacheID

unsigned long long l1t::GlobalBoard::m_l1GtMenuCacheID
private

Definition at line 215 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_l1MuTriggerScales

const L1MuTriggerScales* l1t::GlobalBoard::m_l1MuTriggerScales
private

Definition at line 221 of file GlobalBoard.h.

◆ m_l1MuTriggerScalesCacheID

unsigned long long l1t::GlobalBoard::m_l1MuTriggerScalesCacheID
private

Definition at line 222 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_prescaleCounterAlgoTrig

std::vector<std::vector<PrescaleCounter> > l1t::GlobalBoard::m_prescaleCounterAlgoTrig
private

Definition at line 304 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_resetPSCountersEachLumiSec

bool l1t::GlobalBoard::m_resetPSCountersEachLumiSec = false
private

Definition at line 275 of file GlobalBoard.h.

Referenced by setResetPSCountersEachLumiSec().

◆ m_semiRandomInitialPSCounters

bool l1t::GlobalBoard::m_semiRandomInitialPSCounters = false
private

Definition at line 278 of file GlobalBoard.h.

Referenced by setSemiRandomInitialPSCounters().

◆ m_singlestep

constexpr size_t l1t::GlobalBoard::m_singlestep = 100
staticprivate

Definition at line 283 of file GlobalBoard.h.

Referenced by l1t::GlobalBoard::PrescaleCounter::PrescaleCounter().

◆ m_uGtAlgBlk

GlobalAlgBlk l1t::GlobalBoard::m_uGtAlgBlk
private

Definition at line 248 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_uGtBoardNumber

int l1t::GlobalBoard::m_uGtBoardNumber
private

Definition at line 271 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_uGtFinalBoard

bool l1t::GlobalBoard::m_uGtFinalBoard
private

Definition at line 272 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_verbosity

int l1t::GlobalBoard::m_verbosity
private

verbosity level

Definition at line 257 of file GlobalBoard.h.

Referenced by setVerbosity().