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 setAXOL1TLModelVersion (std::string axol1tlModelVersion)
 
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
 
std::string m_axol1tlModelVersion = "NULL"
 
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:230
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:236
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:231
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:232
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:224
unsigned int m_currentLumi
Definition: GlobalBoard.h:257
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:217
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
unsigned int m_boardEventCount
Definition: GlobalBoard.h:272
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:235
void reset()
reset the content of a GlobalAlgBlk
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:221
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:234
std::vector< std::vector< PrescaleCounter > > m_prescaleCounterAlgoTrig
Definition: GlobalBoard.h:308
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:237
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:233

◆ ~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:230
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:236
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:231
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:232
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:235
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:234
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:237
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:233

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 1133 of file GlobalBoard.cc.

References LogDebug.

1137  {
1138  if (m_verbosity) {
1139  LogDebug("L1TGlobal") << "\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent;
1140  }
1141 
1142  // Set header information
1143  m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1144  m_uGtAlgBlk.setPreScColumn(prescaleSet);
1145  m_uGtAlgBlk.setL1MenuUUID(menuUUID);
1146  m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
1147 
1151 
1152  uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1153 }
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:261
void setFinalOR(bool fOR)
Definition: GlobalAlgBlk.h:60
void setFinalORVeto(bool fOR)
Definition: GlobalAlgBlk.h:58
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
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:249

◆ 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:232

◆ 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:235

◆ 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:236

◆ 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:237

◆ 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:234

◆ 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:230

◆ 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:231

◆ 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:233

◆ 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:250

◆ 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 120 of file GlobalBoard.cc.

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

127  {
129  setBxLast(bxLast);
130 
139 
140  m_uGtAlgBlk.reset();
141 
142  LogDebug("L1TGlobal") << "\t Initializing Board with bxFirst = " << m_bxFirst_ << ", bxLast = " << m_bxLast_;
143 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:230
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:236
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:231
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:232
void setBxLast(int bx)
Definition: GlobalBoard.cc:113
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:235
void reset()
reset the content of a GlobalAlgBlk
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:234
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:237
void setBxFirst(int bx)
Definition: GlobalBoard.cc:111
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:233
#define LogDebug(id)

◆ prescaleCounters()

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

Definition at line 1209 of file GlobalBoard.cc.

References MillePedeFileConverter_cfg::out.

1210  {
1211  std::vector<PrescaleCounter> out;
1212  out.reserve(prescaleFactorsAlgoTrig.size());
1213  for (size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1214  out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1215  }
1216  return out;
1217 }

◆ prescaleCountersWithSemirandomInitialCounter()

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

Definition at line 1220 of file GlobalBoard.cc.

References iEvent, and MillePedeFileConverter_cfg::out.

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

◆ printGmtData()

void GlobalBoard::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 1201 of file GlobalBoard.cc.

References LogTrace.

1201  {
1202  LogTrace("L1TGlobal") << "\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent;
1203 
1204  int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1205  LogTrace("L1TGlobal") << "Number of GMT muons = " << nrL1Mu << "\n";
1206 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:230
#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 146 of file GlobalBoard.cc.

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

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

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

466  {
467  if (m_verbosity) {
468  LogDebug("L1TGlobal") << "\n**** GlobalBoard receiving external data = ";
469  //<< "\n from input tag " << muInputTag << "\n"
470  }
471 
472  resetExternal();
473 
474  // get data from Global Muon Trigger
475  if (receiveExt) {
477  iEvent.getByToken(extInputToken, extData);
478 
479  if (!extData.isValid()) {
480  if (m_verbosity) {
481  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<GlobalExtBlk> collection"
482  << "\nrequested in configuration, but not found in the event.\n";
483  }
484  } else {
485  // bx in muon data
486  for (int i = extData->getFirstBX(); i <= extData->getLastBX(); ++i) {
487  // Prevent from pushing back bx that is outside of allowed range
488  if (i < m_bxFirst_ || i > m_bxLast_)
489  continue;
490 
491  //Loop over ext in this bx
492  for (std::vector<GlobalExtBlk>::const_iterator ext = extData->begin(i); ext != extData->end(i); ++ext) {
493  (*m_candL1External).push_back(i, &(*ext));
494  } //end loop over ext in bx
495  } //end loop over bx
496  } //end if over valid ext data
497  } //end if ReceiveExt data
498 }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:261
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 353 of file GlobalBoard.cc.

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

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

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

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

1156  {
1157  resetMu();
1158  resetMuonShower();
1159  resetCalo();
1160  resetExternal();
1161 
1162  m_uGtAlgBlk.reset();
1163 
1164  m_gtlDecisionWord.reset();
1165  m_gtlAlgorithmOR.reset();
1166 }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
void reset()
reset the content of a GlobalAlgBlk
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249

◆ resetCalo()

void GlobalBoard::resetCalo ( )

Definition at line 1181 of file GlobalBoard.cc.

1181  {
1182  m_candL1EG->clear();
1183  m_candL1Tau->clear();
1184  m_candL1Jet->clear();
1185  m_candL1EtSum->clear();
1187 
1193 }
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:236
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:232
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:235
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:234
void clear()
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:233

◆ resetExternal()

void GlobalBoard::resetExternal ( )

Definition at line 1195 of file GlobalBoard.cc.

1195  {
1198 }
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:237
void clear()
void setBXRange(int bxFirst, int bxLast)

◆ resetMu()

void GlobalBoard::resetMu ( )

Definition at line 1169 of file GlobalBoard.cc.

1169  {
1170  m_candL1Mu->clear();
1172 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:230
void clear()
void setBXRange(int bxFirst, int bxLast)

◆ resetMuonShower()

void GlobalBoard::resetMuonShower ( )

Definition at line 1175 of file GlobalBoard.cc.

1175  {
1178 }
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:231
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 1012 of file GlobalBoard.cc.

References iEvent, LogDebug, and or.

1020  {
1021  if (m_verbosity) {
1022  LogDebug("L1TGlobal") << "\n**** GlobalBoard apply Final Decision Logic ";
1023  }
1024 
1025  // update and clear prescales at the beginning of the luminosity segment
1026  if (m_prescaleCounterAlgoTrig.empty() or
1027  (m_currentLumi != iEvent.luminosityBlock() and m_resetPSCountersEachLumiSec)) {
1028  m_prescaleCounterAlgoTrig.clear();
1029  m_prescaleCounterAlgoTrig.reserve(totalBxInEvent);
1030  auto const& prescaleCountersAlgoTrig =
1032  : prescaleCounters(prescaleFactorsAlgoTrig);
1033  for (int iBxInEvent = 0; iBxInEvent < totalBxInEvent; ++iBxInEvent) {
1034  m_prescaleCounterAlgoTrig.push_back(prescaleCountersAlgoTrig);
1035  }
1036 
1037  m_currentLumi = iEvent.luminosityBlock();
1038  }
1039 
1040  // Copy Algorithm bits to Prescaled word
1041  // Prescaling and Masking done below if requested.
1043 
1044  // -------------------------------------------
1045  // Apply Prescales or skip if turned off
1046  // -------------------------------------------
1047  if (!algorithmTriggersUnprescaled) {
1048  // iBxInEvent is ... -2 -1 0 1 2 ... while counters are 0 1 2 3 4 ...
1049  int const inBxInEvent = totalBxInEvent / 2 + iBxInEvent;
1050 
1051  bool temp_algPrescaledOr = false;
1052  bool alreadyReported = false;
1053  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1054  bool const bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
1055  if (bitValue) {
1056  // Make sure algo bit in range, warn otherwise
1057  if (iBit < prescaleFactorsAlgoTrig.size()) {
1058  if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
1059  bool const triggered = m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit).accept();
1060  if (triggered) {
1061  temp_algPrescaledOr = true;
1062  } else {
1063  // change bit to false in prescaled word and final decision word
1064  m_uGtAlgBlk.setAlgoDecisionInterm(iBit, false);
1065  } //if Prescale counter reached zero
1066  } //if prescale factor is not 1 (ie. no prescale)
1067  else {
1068  temp_algPrescaledOr = true;
1069  }
1070  } // require bit in range
1071  else if (!alreadyReported) {
1072  alreadyReported = true;
1073  edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent;
1074  }
1075  } //if algo bit is set true
1076  } //loop over alg bits
1077 
1078  m_algPrescaledOr = temp_algPrescaledOr; //temp
1079 
1080  } else {
1081  // Since not Prescaling just take OR of Initial Work
1083 
1084  } //if we are going to apply prescales.
1085 
1086  // Copy Algorithm bits fron Prescaled word to Final Word
1087  // Masking done below if requested.
1089 
1090  if (!algorithmTriggersUnmasked) {
1091  bool temp_algFinalOr = false;
1092  bool alreadyReported = false;
1093  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1094  const bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);
1095 
1096  if (bitValue) {
1097  //bool isMasked = ( triggerMaskAlgoTrig.at(iBit) == 0 );
1098  bool isMasked = false;
1099  if (iBit < triggerMaskAlgoTrig.size())
1100  isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
1101  else if (!alreadyReported) {
1102  alreadyReported = true;
1103  edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent;
1104  }
1105 
1106  bool const passMask = (bitValue && !isMasked);
1107 
1108  if (passMask)
1109  temp_algFinalOr = true;
1110  else
1111  m_uGtAlgBlk.setAlgoDecisionFinal(iBit, false);
1112 
1113  // Check if veto mask is true, if it is, set the event veto flag.
1114  if (triggerMaskVetoAlgoTrig.at(iBit) == 1)
1115  m_algFinalOrVeto = true;
1116  }
1117  }
1118 
1119  m_algIntermOr = temp_algFinalOr;
1120 
1121  } else {
1123 
1124  }
1125 
1126  // --------------------------
1127  // Set FinalOR for this board
1128  // --------------------------
1130 }
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:282
unsigned int m_currentLumi
Definition: GlobalBoard.h:257
static std::vector< PrescaleCounter > prescaleCounters(std::vector< double > const &prescaleFactorsAlgoTrig)
int m_verbosity
verbosity level
Definition: GlobalBoard.h:261
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:308
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
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:279
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 501 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::EnergySumCondition::print(), l1t::EnergySumZdcCondition::print(), l1t::MuCondition::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::AXOL1TLCondition::setModelVersion(), l1t::CorrCondition::setScales(), l1t::CorrThreeBodyCondition::setScales(), l1t::CorrWithOverlapRemovalCondition::setScales(), l1t::ConditionEvaluation::setVerbosity(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalObjectMap::swapCombinationVector(), GlobalObjectMap::swapObjectTypeVector(), and GlobalObjectMap::swapOperandTokenVector().

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

◆ setAXOL1TLModelVersion()

void GlobalBoard::setAXOL1TLModelVersion ( std::string  axol1tlModelVersion)

Definition at line 116 of file GlobalBoard.cc.

116  {
117  m_axol1tlModelVersion = axol1tlModelVersion;
118 }
std::string m_axol1tlModelVersion
Definition: GlobalBoard.h:247

◆ 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 210 of file GlobalBoard.h.

References m_verbosity, and verbosity.

210 { m_verbosity = verbosity; }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:261
const int verbosity

Member Data Documentation

◆ m_algFinalOr

bool l1t::GlobalBoard::m_algFinalOr
private

Definition at line 268 of file GlobalBoard.h.

◆ m_algFinalOrVeto

bool l1t::GlobalBoard::m_algFinalOrVeto
private

Definition at line 269 of file GlobalBoard.h.

◆ m_algInitialOr

bool l1t::GlobalBoard::m_algInitialOr
private

Definition at line 265 of file GlobalBoard.h.

◆ m_algIntermOr

bool l1t::GlobalBoard::m_algIntermOr
private

Definition at line 266 of file GlobalBoard.h.

◆ m_algPrescaledOr

bool l1t::GlobalBoard::m_algPrescaledOr
private

Definition at line 267 of file GlobalBoard.h.

◆ m_axol1tlModelVersion

std::string l1t::GlobalBoard::m_axol1tlModelVersion = "NULL"
private

Definition at line 247 of file GlobalBoard.h.

◆ m_boardEventCount

unsigned int l1t::GlobalBoard::m_boardEventCount
private

Definition at line 272 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_bxFirst_

int l1t::GlobalBoard::m_bxFirst_
private

Definition at line 244 of file GlobalBoard.h.

◆ m_bxLast_

int l1t::GlobalBoard::m_bxLast_
private

Definition at line 245 of file GlobalBoard.h.

◆ m_candL1EG

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

Definition at line 232 of file GlobalBoard.h.

Referenced by getCandL1EG().

◆ m_candL1EtSum

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

Definition at line 235 of file GlobalBoard.h.

Referenced by getCandL1EtSum().

◆ m_candL1EtSumZdc

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

Definition at line 236 of file GlobalBoard.h.

Referenced by getCandL1EtSumZdc().

◆ m_candL1External

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

Definition at line 237 of file GlobalBoard.h.

Referenced by getCandL1External().

◆ m_candL1Jet

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

Definition at line 234 of file GlobalBoard.h.

Referenced by getCandL1Jet().

◆ m_candL1Mu

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

Definition at line 230 of file GlobalBoard.h.

Referenced by getCandL1Mu().

◆ m_candL1MuShower

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

Definition at line 231 of file GlobalBoard.h.

Referenced by getCandL1MuShower().

◆ m_candL1Tau

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

Definition at line 233 of file GlobalBoard.h.

Referenced by getCandL1Tau().

◆ m_conditionResultMaps

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

Definition at line 255 of file GlobalBoard.h.

◆ m_currentLumi

unsigned int l1t::GlobalBoard::m_currentLumi
private

Definition at line 257 of file GlobalBoard.h.

◆ m_gtlAlgorithmOR

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

Definition at line 249 of file GlobalBoard.h.

Referenced by getAlgorithmOR(), and GlobalBoard().

◆ m_gtlDecisionWord

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

Definition at line 250 of file GlobalBoard.h.

Referenced by getDecisionWord(), and GlobalBoard().

◆ m_isDebugEnabled

bool l1t::GlobalBoard::m_isDebugEnabled
private

Definition at line 262 of file GlobalBoard.h.

◆ m_l1CaloGeometry

const L1CaloGeometry* l1t::GlobalBoard::m_l1CaloGeometry
private

Definition at line 220 of file GlobalBoard.h.

◆ m_l1CaloGeometryCacheID

unsigned long long l1t::GlobalBoard::m_l1CaloGeometryCacheID
private

Definition at line 221 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_l1GtMenu

const TriggerMenu* l1t::GlobalBoard::m_l1GtMenu
private

Definition at line 216 of file GlobalBoard.h.

◆ m_l1GtMenuCacheID

unsigned long long l1t::GlobalBoard::m_l1GtMenuCacheID
private

Definition at line 217 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_l1MuTriggerScales

const L1MuTriggerScales* l1t::GlobalBoard::m_l1MuTriggerScales
private

Definition at line 223 of file GlobalBoard.h.

◆ m_l1MuTriggerScalesCacheID

unsigned long long l1t::GlobalBoard::m_l1MuTriggerScalesCacheID
private

Definition at line 224 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_prescaleCounterAlgoTrig

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

Definition at line 308 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_resetPSCountersEachLumiSec

bool l1t::GlobalBoard::m_resetPSCountersEachLumiSec = false
private

Definition at line 279 of file GlobalBoard.h.

Referenced by setResetPSCountersEachLumiSec().

◆ m_semiRandomInitialPSCounters

bool l1t::GlobalBoard::m_semiRandomInitialPSCounters = false
private

Definition at line 282 of file GlobalBoard.h.

Referenced by setSemiRandomInitialPSCounters().

◆ m_singlestep

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

Definition at line 287 of file GlobalBoard.h.

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

◆ m_uGtAlgBlk

GlobalAlgBlk l1t::GlobalBoard::m_uGtAlgBlk
private

Definition at line 252 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_uGtBoardNumber

int l1t::GlobalBoard::m_uGtBoardNumber
private

Definition at line 275 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_uGtFinalBoard

bool l1t::GlobalBoard::m_uGtFinalBoard
private

Definition at line 276 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_verbosity

int l1t::GlobalBoard::m_verbosity
private

verbosity level

Definition at line 261 of file GlobalBoard.h.

Referenced by setVerbosity().