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 float getCICADAScore () const
 
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 edm::EDGetTokenT< BXVector< float >> &, const bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, const bool receiveEtSums, const bool receiveEtSumsZdc, const bool receiveCICADA)
 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 setCICADAScore (float val)
 
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
 
float m_cicadaScore = 0.0
 
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 69 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().

71  m_candL1MuShower(new BXVector<std::shared_ptr<l1t::MuonShower>>),
78  m_currentLumi(0),
81 
82  m_gtlAlgorithmOR.reset();
83  m_gtlDecisionWord.reset();
84 
86 
87  // Initialize cached IDs
88  m_l1GtMenuCacheID = 0ULL;
91 
92  // Counter for number of events board sees
94 
95  // A single uGT GlobalBoard is taken into account in the emulator
96  m_uGtBoardNumber = 0;
97  m_uGtFinalBoard = true;
98 }
bool isDebugEnabled()
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:240
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:235
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:236
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:228
unsigned int m_currentLumi
Definition: GlobalBoard.h:261
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:221
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:254
unsigned int m_boardEventCount
Definition: GlobalBoard.h:276
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:239
void reset()
reset the content of a GlobalAlgBlk
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:225
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:238
std::vector< std::vector< PrescaleCounter > > m_prescaleCounterAlgoTrig
Definition: GlobalBoard.h:312
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:256
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:241
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:253
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:237

◆ ~GlobalBoard()

GlobalBoard::~GlobalBoard ( )
virtual

Definition at line 101 of file GlobalBoard.cc.

101  {
102  delete m_candL1Mu;
103  delete m_candL1MuShower;
104  delete m_candL1EG;
105  delete m_candL1Tau;
106  delete m_candL1Jet;
107  delete m_candL1EtSum;
108  delete m_candL1EtSumZdc;
109  delete m_candL1External;
110 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:240
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:235
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:236
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:239
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:238
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:241
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:237

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

References LogDebug.

1172  {
1173  if (m_verbosity) {
1174  LogDebug("L1TGlobal") << "\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent;
1175  }
1176 
1177  // Set header information
1178  m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1179  m_uGtAlgBlk.setPreScColumn(prescaleSet);
1180  m_uGtAlgBlk.setL1MenuUUID(menuUUID);
1181  m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
1182 
1186 
1187  uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1188 }
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:265
void setFinalOR(bool fOR)
Definition: GlobalAlgBlk.h:60
void setFinalORVeto(bool fOR)
Definition: GlobalAlgBlk.h:58
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:256
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 151 of file GlobalBoard.h.

References m_gtlAlgorithmOR.

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

◆ getCandL1EG()

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

pointer to EG data list

Definition at line 160 of file GlobalBoard.h.

References m_candL1EG.

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

◆ getCandL1EtSum()

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

pointer to EtSum data list

Definition at line 169 of file GlobalBoard.h.

References m_candL1EtSum.

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

◆ getCandL1EtSumZdc()

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

pointer to ZDC EtSum data list

Definition at line 172 of file GlobalBoard.h.

References m_candL1EtSumZdc.

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

◆ getCandL1External()

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

pointer to External data list

Definition at line 175 of file GlobalBoard.h.

References m_candL1External.

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

◆ getCandL1Jet()

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

pointer to Jet data list

Definition at line 163 of file GlobalBoard.h.

References m_candL1Jet.

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

◆ getCandL1Mu()

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

return global muon trigger candidate

Definition at line 154 of file GlobalBoard.h.

References m_candL1Mu.

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

◆ getCandL1MuShower()

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

return global muon trigger candidate

Definition at line 157 of file GlobalBoard.h.

References m_candL1MuShower.

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

◆ getCandL1Tau()

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

pointer to Tau data list

Definition at line 166 of file GlobalBoard.h.

References m_candL1Tau.

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

◆ getCICADAScore()

const float l1t::GlobalBoard::getCICADAScore ( ) const
inline

Definition at line 177 of file GlobalBoard.h.

References m_cicadaScore.

177 { return m_cicadaScore; }

◆ getDecisionWord()

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

return decision

Definition at line 148 of file GlobalBoard.h.

References m_gtlDecisionWord.

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

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

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

124  {
126  setBxLast(bxLast);
127 
136 
137  m_uGtAlgBlk.reset();
138 
139  LogDebug("L1TGlobal") << "\t Initializing Board with bxFirst = " << m_bxFirst_ << ", bxLast = " << m_bxLast_;
140 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:240
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:235
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:236
void setBxLast(int bx)
Definition: GlobalBoard.cc:115
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:239
void reset()
reset the content of a GlobalAlgBlk
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:238
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:256
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:241
void setBxFirst(int bx)
Definition: GlobalBoard.cc:113
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:237
#define LogDebug(id)

◆ prescaleCounters()

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

Definition at line 1245 of file GlobalBoard.cc.

References MillePedeFileConverter_cfg::out.

1246  {
1247  std::vector<PrescaleCounter> out;
1248  out.reserve(prescaleFactorsAlgoTrig.size());
1249  for (size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1250  out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1251  }
1252  return out;
1253 }

◆ prescaleCountersWithSemirandomInitialCounter()

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

Definition at line 1256 of file GlobalBoard.cc.

References iEvent, and MillePedeFileConverter_cfg::out.

1257  {
1258  // pick a (semi)random number seeding based on run, lumi, event numbers,
1259  // this leads to different (semi)random numbers for different streams,
1260  // reminder: different streams have different initial event number
1261  std::srand(iEvent.id().run());
1262  std::srand(std::rand() + iEvent.id().luminosityBlock());
1263  std::srand(std::rand() + iEvent.id().event());
1264  int const semirandom = std::rand();
1265 
1266  std::vector<PrescaleCounter> out;
1267  out.reserve(prescaleFactorsAlgoTrig.size());
1268 
1269  for (size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1270  out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1271  // initialise trigger_counter to a (semi)random integer
1272  // between 0 and prescale_count - 1 (both inclusive)
1273  // (this only changes the behaviour of triggers with PS > 1)
1274  auto& prescaleCounter = out.back();
1275  if (prescaleCounter.prescale_count > 0) {
1276  prescaleCounter.trigger_counter = semirandom % prescaleCounter.prescale_count;
1277  }
1278  }
1279 
1280  return out;
1281 }
int iEvent
Definition: GenABIO.cc:224

◆ printGmtData()

void GlobalBoard::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 1237 of file GlobalBoard.cc.

References LogTrace.

1237  {
1238  LogTrace("L1TGlobal") << "\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent;
1239 
1240  int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1241  LogTrace("L1TGlobal") << "Number of GMT muons = " << nrL1Mu << "\n";
1242 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
#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 edm::EDGetTokenT< BXVector< float >> &  CICADAInputToken,
const bool  receiveEG,
const int  nrL1EG,
const bool  receiveTau,
const int  nrL1Tau,
const bool  receiveJet,
const int  nrL1Jet,
const bool  receiveEtSums,
const bool  receiveEtSumsZdc,
const bool  receiveCICADA 
)

receive data from Global Muon Trigger

Definition at line 143 of file GlobalBoard.cc.

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

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

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

488  {
489  if (m_verbosity) {
490  LogDebug("L1TGlobal") << "\n**** GlobalBoard receiving external data = ";
491  //<< "\n from input tag " << muInputTag << "\n"
492  }
493 
494  resetExternal();
495 
496  // get data from Global Muon Trigger
497  if (receiveExt) {
499  iEvent.getByToken(extInputToken, extData);
500 
501  if (!extData.isValid()) {
502  if (m_verbosity) {
503  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<GlobalExtBlk> collection"
504  << "\nrequested in configuration, but not found in the event.\n";
505  }
506  } else {
507  // bx in muon data
508  for (int i = extData->getFirstBX(); i <= extData->getLastBX(); ++i) {
509  // Prevent from pushing back bx that is outside of allowed range
510  if (i < m_bxFirst_ || i > m_bxLast_)
511  continue;
512 
513  //Loop over ext in this bx
514  for (std::vector<GlobalExtBlk>::const_iterator ext = extData->begin(i); ext != extData->end(i); ++ext) {
515  (*m_candL1External).push_back(i, &(*ext));
516  } //end loop over ext in bx
517  } //end loop over bx
518  } //end if over valid ext data
519  } //end if ReceiveExt data
520 }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:265
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 375 of file GlobalBoard.cc.

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

378  {
379  if (m_verbosity) {
380  LogDebug("L1TGlobal") << "\n**** GlobalBoard receiving muon data = ";
381  //<< "\n from input tag " << muInputTag << "\n"
382  }
383 
384  resetMu();
385 
386  // get data from Global Muon Trigger
387  if (receiveMu) {
389  iEvent.getByToken(muInputToken, muonData);
390 
391  if (!muonData.isValid()) {
392  if (m_verbosity) {
393  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<l1t::Muon> collection"
394  << "\nrequested in configuration, but not found in the event.\n";
395  }
396  } else {
397  // bx in muon data
398  for (int i = muonData->getFirstBX(); i <= muonData->getLastBX(); ++i) {
399  // Prevent from pushing back bx that is outside of allowed range
400  if (i < m_bxFirst_ || i > m_bxLast_)
401  continue;
402 
403  //Loop over Muons in this bx
404  int nObj = 0;
405  for (std::vector<l1t::Muon>::const_iterator mu = muonData->begin(i); mu != muonData->end(i); ++mu) {
406  if (nObj < nrL1Mu) {
407  (*m_candL1Mu).push_back(i, &(*mu));
408  } else {
409  edm::LogWarning("L1TGlobal") << " Too many Muons (" << nObj << ") for uGT Configuration maxMu =" << nrL1Mu;
410  }
411 
412  LogDebug("L1TGlobal") << "Muon Pt " << mu->hwPt() << " EtaAtVtx " << mu->hwEtaAtVtx() << " PhiAtVtx "
413  << mu->hwPhiAtVtx() << " Qual " << mu->hwQual() << " Iso " << mu->hwIso();
414  nObj++;
415  } //end loop over muons in bx
416  } //end loop over bx
417  } //end if over valid muon data
418  } //end if ReceiveMuon data
419 }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:265
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 422 of file GlobalBoard.cc.

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

425  {
426  // get data from Global Muon Trigger
427  if (receiveMuShower) {
429  iEvent.getByToken(muShowerInputToken, muonData);
430 
431  if (!muonData.isValid()) {
432  if (m_verbosity) {
433  edm::LogWarning("L1TGlobal") << "\nWarning: Input tag for the BXVector<l1t::MuonShower> collection"
434  << "\nrequested in configuration, but not found in the event.\n";
435  }
436  } else {
437  // Loop over bx in muon data
438  for (int i = muonData->getFirstBX(); i <= muonData->getLastBX(); ++i) {
439  // Prevent from pushing back bx that is outside of allowed range
440  if (i < m_bxFirst_ || i > m_bxLast_)
441  continue;
442 
443  // Loop over Muon Showers in this bx
444  int nObj = 0;
445  for (std::vector<l1t::MuonShower>::const_iterator mu = muonData->begin(i); mu != muonData->end(i); ++mu) {
446  if (nObj < nrL1MuShower) {
447  /* NOTE: here the single object is split up into 5 separate MuonShower objects
448  similarly to the description in the UTM library, where the conditions are four different objects.
449  */
450 
451  std::shared_ptr<l1t::MuonShower> musOneNominalInTime =
452  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
453  std::shared_ptr<l1t::MuonShower> musOneTightInTime =
454  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
455  std::shared_ptr<l1t::MuonShower> musTwoLooseDiffSectorsInTime =
456  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
457  std::shared_ptr<l1t::MuonShower> musOutOfTime0 =
458  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
459  std::shared_ptr<l1t::MuonShower> musOutOfTime1 =
460  std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
461 
462  musOneNominalInTime->setOneNominalInTime(mu->isOneNominalInTime());
463  musOneTightInTime->setOneTightInTime(mu->isOneTightInTime());
464  musTwoLooseDiffSectorsInTime->setTwoLooseDiffSectorsInTime(mu->isTwoLooseDiffSectorsInTime());
465  musOutOfTime0->setMusOutOfTime0(mu->musOutOfTime0());
466  musOutOfTime1->setMusOutOfTime1(mu->musOutOfTime1());
467 
468  (*m_candL1MuShower).push_back(i, musOneNominalInTime);
469  (*m_candL1MuShower).push_back(i, musOneTightInTime);
470  (*m_candL1MuShower).push_back(i, musTwoLooseDiffSectorsInTime);
471  (*m_candL1MuShower).push_back(i, musOutOfTime0);
472  (*m_candL1MuShower).push_back(i, musOutOfTime1);
473 
474  } else {
475  edm::LogWarning("L1TGlobal") << " Too many Muon Showers (" << nObj
476  << ") for uGT Configuration maxMuShower =" << nrL1MuShower;
477  }
478  nObj++;
479  } //end loop over muon showers in bx
480  } //end loop over bx
481  } //end if over valid muon shower data
482  } //end if ReceiveMuonShower data
483 }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:265
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 1191 of file GlobalBoard.cc.

1191  {
1192  resetMu();
1193  resetMuonShower();
1194  resetCalo();
1195  resetExternal();
1196 
1197  m_uGtAlgBlk.reset();
1198 
1199  m_gtlDecisionWord.reset();
1200  m_gtlAlgorithmOR.reset();
1201 }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:254
void reset()
reset the content of a GlobalAlgBlk
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:256
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:253

◆ resetCalo()

void GlobalBoard::resetCalo ( )

Definition at line 1216 of file GlobalBoard.cc.

1216  {
1217  m_candL1EG->clear();
1218  m_candL1Tau->clear();
1219  m_candL1Jet->clear();
1220  m_candL1EtSum->clear();
1222  m_cicadaScore = 0.0;
1223 
1229 }
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:240
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:236
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:239
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:238
void clear()
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:237

◆ resetExternal()

void GlobalBoard::resetExternal ( )

Definition at line 1231 of file GlobalBoard.cc.

1231  {
1234 }
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:241
void clear()
void setBXRange(int bxFirst, int bxLast)

◆ resetMu()

void GlobalBoard::resetMu ( )

Definition at line 1204 of file GlobalBoard.cc.

1204  {
1205  m_candL1Mu->clear();
1207 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
void clear()
void setBXRange(int bxFirst, int bxLast)

◆ resetMuonShower()

void GlobalBoard::resetMuonShower ( )

Definition at line 1210 of file GlobalBoard.cc.

1210  {
1213 }
BXVector< std::shared_ptr< l1t::MuonShower > > * m_candL1MuShower
Definition: GlobalBoard.h:235
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 1047 of file GlobalBoard.cc.

References iEvent, LogDebug, and or.

1055  {
1056  if (m_verbosity) {
1057  LogDebug("L1TGlobal") << "\n**** GlobalBoard apply Final Decision Logic ";
1058  }
1059 
1060  // update and clear prescales at the beginning of the luminosity segment
1061  if (m_prescaleCounterAlgoTrig.empty() or
1062  (m_currentLumi != iEvent.luminosityBlock() and m_resetPSCountersEachLumiSec)) {
1063  m_prescaleCounterAlgoTrig.clear();
1064  m_prescaleCounterAlgoTrig.reserve(totalBxInEvent);
1065  auto const& prescaleCountersAlgoTrig =
1067  : prescaleCounters(prescaleFactorsAlgoTrig);
1068  for (int iBxInEvent = 0; iBxInEvent < totalBxInEvent; ++iBxInEvent) {
1069  m_prescaleCounterAlgoTrig.push_back(prescaleCountersAlgoTrig);
1070  }
1071 
1072  m_currentLumi = iEvent.luminosityBlock();
1073  }
1074 
1075  // Copy Algorithm bits to Prescaled word
1076  // Prescaling and Masking done below if requested.
1078 
1079  // -------------------------------------------
1080  // Apply Prescales or skip if turned off
1081  // -------------------------------------------
1082  if (!algorithmTriggersUnprescaled) {
1083  // iBxInEvent is ... -2 -1 0 1 2 ... while counters are 0 1 2 3 4 ...
1084  int const inBxInEvent = totalBxInEvent / 2 + iBxInEvent;
1085 
1086  bool temp_algPrescaledOr = false;
1087  bool alreadyReported = false;
1088  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1089  bool const bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
1090  if (bitValue) {
1091  // Make sure algo bit in range, warn otherwise
1092  if (iBit < prescaleFactorsAlgoTrig.size()) {
1093  if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
1094  bool const triggered = m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit).accept();
1095  if (triggered) {
1096  temp_algPrescaledOr = true;
1097  } else {
1098  // change bit to false in prescaled word and final decision word
1099  m_uGtAlgBlk.setAlgoDecisionInterm(iBit, false);
1100  } //if Prescale counter reached zero
1101  } //if prescale factor is not 1 (ie. no prescale)
1102  else {
1103  temp_algPrescaledOr = true;
1104  }
1105  } // require bit in range
1106  else if (!alreadyReported) {
1107  alreadyReported = true;
1108  edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent;
1109  }
1110  } //if algo bit is set true
1111  } //loop over alg bits
1112 
1113  m_algPrescaledOr = temp_algPrescaledOr; //temp
1114 
1115  } else {
1116  // Since not Prescaling just take OR of Initial Work
1118 
1119  } //if we are going to apply prescales.
1120 
1121  // Copy Algorithm bits fron Prescaled word to Final Word
1122  // Masking done below if requested.
1124 
1125  if (!algorithmTriggersUnmasked) {
1126  bool temp_algFinalOr = false;
1127  bool alreadyReported = false;
1128  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1129  const bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);
1130 
1131  if (bitValue) {
1132  //bool isMasked = ( triggerMaskAlgoTrig.at(iBit) == 0 );
1133  bool isMasked = false;
1134  if (iBit < triggerMaskAlgoTrig.size())
1135  isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
1136  else if (!alreadyReported) {
1137  alreadyReported = true;
1138  edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent;
1139  }
1140 
1141  bool const passMask = (bitValue && !isMasked);
1142 
1143  if (passMask)
1144  temp_algFinalOr = true;
1145  else
1146  m_uGtAlgBlk.setAlgoDecisionFinal(iBit, false);
1147 
1148  // Check if veto mask is true, if it is, set the event veto flag.
1149  if (triggerMaskVetoAlgoTrig.at(iBit) == 1)
1150  m_algFinalOrVeto = true;
1151  }
1152  }
1153 
1154  m_algIntermOr = temp_algFinalOr;
1155 
1156  } else {
1158 
1159  }
1160 
1161  // --------------------------
1162  // Set FinalOR for this board
1163  // --------------------------
1165 }
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:286
unsigned int m_currentLumi
Definition: GlobalBoard.h:261
static std::vector< PrescaleCounter > prescaleCounters(std::vector< double > const &prescaleFactorsAlgoTrig)
int m_verbosity
verbosity level
Definition: GlobalBoard.h:265
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:312
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:256
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:283
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 523 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::CondCICADA, 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::CICADACondition::print(), l1t::AXOL1TLCondition::print(), l1t::MuonShowerCondition::print(), l1t::ExternalCondition::print(), l1t::EnergySumCondition::print(), l1t::EnergySumZdcCondition::print(), l1t::MuCondition::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().

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

◆ setBxFirst()

void GlobalBoard::setBxFirst ( int  bx)

Definition at line 113 of file GlobalBoard.cc.

References nano_mu_digi_cff::bx.

◆ setBxLast()

void GlobalBoard::setBxLast ( int  bx)

Definition at line 115 of file GlobalBoard.cc.

References nano_mu_digi_cff::bx.

◆ setCICADAScore()

void l1t::GlobalBoard::setCICADAScore ( float  val)
inline

Definition at line 211 of file GlobalBoard.h.

References m_cicadaScore, and heppy_batch::val.

◆ setResetPSCountersEachLumiSec()

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

Definition at line 208 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 214 of file GlobalBoard.h.

References m_verbosity, and verbosity.

214 { m_verbosity = verbosity; }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:265
const int verbosity

Member Data Documentation

◆ m_algFinalOr

bool l1t::GlobalBoard::m_algFinalOr
private

Definition at line 272 of file GlobalBoard.h.

◆ m_algFinalOrVeto

bool l1t::GlobalBoard::m_algFinalOrVeto
private

Definition at line 273 of file GlobalBoard.h.

◆ m_algInitialOr

bool l1t::GlobalBoard::m_algInitialOr
private

Definition at line 269 of file GlobalBoard.h.

◆ m_algIntermOr

bool l1t::GlobalBoard::m_algIntermOr
private

Definition at line 270 of file GlobalBoard.h.

◆ m_algPrescaledOr

bool l1t::GlobalBoard::m_algPrescaledOr
private

Definition at line 271 of file GlobalBoard.h.

◆ m_boardEventCount

unsigned int l1t::GlobalBoard::m_boardEventCount
private

Definition at line 276 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_bxFirst_

int l1t::GlobalBoard::m_bxFirst_
private

Definition at line 248 of file GlobalBoard.h.

◆ m_bxLast_

int l1t::GlobalBoard::m_bxLast_
private

Definition at line 249 of file GlobalBoard.h.

◆ m_candL1EG

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

Definition at line 236 of file GlobalBoard.h.

Referenced by getCandL1EG().

◆ m_candL1EtSum

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

Definition at line 239 of file GlobalBoard.h.

Referenced by getCandL1EtSum().

◆ m_candL1EtSumZdc

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

Definition at line 240 of file GlobalBoard.h.

Referenced by getCandL1EtSumZdc().

◆ m_candL1External

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

Definition at line 241 of file GlobalBoard.h.

Referenced by getCandL1External().

◆ m_candL1Jet

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

Definition at line 238 of file GlobalBoard.h.

Referenced by getCandL1Jet().

◆ m_candL1Mu

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

Definition at line 234 of file GlobalBoard.h.

Referenced by getCandL1Mu().

◆ m_candL1MuShower

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

Definition at line 235 of file GlobalBoard.h.

Referenced by getCandL1MuShower().

◆ m_candL1Tau

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

Definition at line 237 of file GlobalBoard.h.

Referenced by getCandL1Tau().

◆ m_cicadaScore

float l1t::GlobalBoard::m_cicadaScore = 0.0
private

Definition at line 251 of file GlobalBoard.h.

Referenced by getCICADAScore(), and setCICADAScore().

◆ m_conditionResultMaps

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

Definition at line 259 of file GlobalBoard.h.

◆ m_currentLumi

unsigned int l1t::GlobalBoard::m_currentLumi
private

Definition at line 261 of file GlobalBoard.h.

◆ m_gtlAlgorithmOR

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

Definition at line 253 of file GlobalBoard.h.

Referenced by getAlgorithmOR(), and GlobalBoard().

◆ m_gtlDecisionWord

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

Definition at line 254 of file GlobalBoard.h.

Referenced by getDecisionWord(), and GlobalBoard().

◆ m_isDebugEnabled

bool l1t::GlobalBoard::m_isDebugEnabled
private

Definition at line 266 of file GlobalBoard.h.

◆ m_l1CaloGeometry

const L1CaloGeometry* l1t::GlobalBoard::m_l1CaloGeometry
private

Definition at line 224 of file GlobalBoard.h.

◆ m_l1CaloGeometryCacheID

unsigned long long l1t::GlobalBoard::m_l1CaloGeometryCacheID
private

Definition at line 225 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_l1GtMenu

const TriggerMenu* l1t::GlobalBoard::m_l1GtMenu
private

Definition at line 220 of file GlobalBoard.h.

◆ m_l1GtMenuCacheID

unsigned long long l1t::GlobalBoard::m_l1GtMenuCacheID
private

Definition at line 221 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_l1MuTriggerScales

const L1MuTriggerScales* l1t::GlobalBoard::m_l1MuTriggerScales
private

Definition at line 227 of file GlobalBoard.h.

◆ m_l1MuTriggerScalesCacheID

unsigned long long l1t::GlobalBoard::m_l1MuTriggerScalesCacheID
private

Definition at line 228 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_prescaleCounterAlgoTrig

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

Definition at line 312 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_resetPSCountersEachLumiSec

bool l1t::GlobalBoard::m_resetPSCountersEachLumiSec = false
private

Definition at line 283 of file GlobalBoard.h.

Referenced by setResetPSCountersEachLumiSec().

◆ m_semiRandomInitialPSCounters

bool l1t::GlobalBoard::m_semiRandomInitialPSCounters = false
private

Definition at line 286 of file GlobalBoard.h.

Referenced by setSemiRandomInitialPSCounters().

◆ m_singlestep

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

Definition at line 291 of file GlobalBoard.h.

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

◆ m_uGtAlgBlk

GlobalAlgBlk l1t::GlobalBoard::m_uGtAlgBlk
private

Definition at line 256 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_uGtBoardNumber

int l1t::GlobalBoard::m_uGtBoardNumber
private

Definition at line 279 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_uGtFinalBoard

bool l1t::GlobalBoard::m_uGtFinalBoard
private

Definition at line 280 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_verbosity

int l1t::GlobalBoard::m_verbosity
private

verbosity level

Definition at line 265 of file GlobalBoard.h.

Referenced by setVerbosity().