CMS 3D CMS Logo

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

#include <GlobalBoard.h>

Classes

struct  PrescaleCounter
 

Public Member Functions

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

Static Private Member Functions

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

Private Attributes

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

Static Private Attributes

static constexpr size_t m_singlestep = 100
 

Detailed Description

Definition at line 56 of file GlobalBoard.h.

Constructor & Destructor Documentation

◆ GlobalBoard()

GlobalBoard::GlobalBoard ( )

Definition at line 65 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().

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

◆ ~GlobalBoard()

GlobalBoard::~GlobalBoard ( )
virtual

Definition at line 97 of file GlobalBoard.cc.

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

Member Function Documentation

◆ fillAlgRecord()

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

Fill the Daq Records.

Definition at line 1106 of file GlobalBoard.cc.

References LogDebug.

1110  {
1111  if (m_verbosity) {
1112  LogDebug("L1TGlobal") << "\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent;
1113  }
1114 
1115  // Set header information
1116  m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1117  m_uGtAlgBlk.setPreScColumn(prescaleSet);
1118  m_uGtAlgBlk.setL1MenuUUID(menuUUID);
1119  m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
1120 
1124 
1125  uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1126 }
void setL1MenuUUID(int uuid)
set simple members
Definition: GlobalAlgBlk.h:55
void setFinalORPreVeto(bool fOR)
Definition: GlobalAlgBlk.h:59
void setbxInEventNr(int bxNr)
Definition: GlobalAlgBlk.h:57
int m_verbosity
verbosity level
Definition: GlobalBoard.h:257
void setFinalOR(bool fOR)
Definition: GlobalAlgBlk.h:60
void setFinalORVeto(bool fOR)
Definition: GlobalAlgBlk.h:58
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:248
void setL1FirmwareUUID(int fuuid)
Definition: GlobalAlgBlk.h:56
void setPreScColumn(int psC)
Definition: GlobalAlgBlk.h:61
#define LogDebug(id)

◆ getAlgorithmOR()

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

return algorithm OR decision

Definition at line 149 of file GlobalBoard.h.

References m_gtlAlgorithmOR.

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

◆ getCandL1EG()

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

pointer to EG data list

Definition at line 158 of file GlobalBoard.h.

References m_candL1EG.

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

◆ getCandL1EtSum()

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

pointer to EtSum data list

Definition at line 167 of file GlobalBoard.h.

References m_candL1EtSum.

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

◆ getCandL1EtSumZdc()

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

pointer to ZDC EtSum data list

Definition at line 170 of file GlobalBoard.h.

References m_candL1EtSumZdc.

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

◆ getCandL1External()

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

pointer to External data list

Definition at line 173 of file GlobalBoard.h.

References m_candL1External.

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

◆ getCandL1Jet()

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

pointer to Jet data list

Definition at line 161 of file GlobalBoard.h.

References m_candL1Jet.

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

◆ getCandL1Mu()

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

return global muon trigger candidate

Definition at line 152 of file GlobalBoard.h.

References m_candL1Mu.

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

◆ getCandL1MuShower()

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

return global muon trigger candidate

Definition at line 155 of file GlobalBoard.h.

References m_candL1MuShower.

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

◆ getCandL1Tau()

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

pointer to Tau data list

Definition at line 164 of file GlobalBoard.h.

References m_candL1Tau.

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

◆ getDecisionWord()

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

return decision

Definition at line 146 of file GlobalBoard.h.

References m_gtlDecisionWord.

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

◆ init()

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

initialize the class (mainly reserve)

Definition at line 113 of file GlobalBoard.cc.

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

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

◆ prescaleCounters()

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

Definition at line 1182 of file GlobalBoard.cc.

References MillePedeFileConverter_cfg::out.

1183  {
1184  std::vector<PrescaleCounter> out;
1185  out.reserve(prescaleFactorsAlgoTrig.size());
1186  for (size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1187  out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1188  }
1189  return out;
1190 }

◆ prescaleCountersWithSemirandomInitialCounter()

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

Definition at line 1193 of file GlobalBoard.cc.

References iEvent, and MillePedeFileConverter_cfg::out.

1194  {
1195  // pick a (semi)random number seeding based on run, lumi, event numbers,
1196  // this leads to different (semi)random numbers for different streams,
1197  // reminder: different streams have different initial event number
1198  std::srand(iEvent.id().run());
1199  std::srand(std::rand() + iEvent.id().luminosityBlock());
1200  std::srand(std::rand() + iEvent.id().event());
1201  int const semirandom = std::rand();
1202 
1203  std::vector<PrescaleCounter> out;
1204  out.reserve(prescaleFactorsAlgoTrig.size());
1205 
1206  for (size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1207  out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1208  // initialise trigger_counter to a (semi)random integer
1209  // between 0 and prescale_count - 1 (both inclusive)
1210  // (this only changes the behaviour of triggers with PS > 1)
1211  auto& prescaleCounter = out.back();
1212  if (prescaleCounter.prescale_count > 0) {
1213  prescaleCounter.trigger_counter = semirandom % prescaleCounter.prescale_count;
1214  }
1215  }
1216 
1217  return out;
1218 }
int iEvent
Definition: GenABIO.cc:224

◆ printGmtData()

void GlobalBoard::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 1174 of file GlobalBoard.cc.

References LogTrace.

1174  {
1175  LogTrace("L1TGlobal") << "\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent;
1176 
1177  int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1178  LogTrace("L1TGlobal") << "Number of GMT muons = " << nrL1Mu << "\n";
1179 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:228
#define LogTrace(id)
unsigned size(int bx) const

◆ receiveCaloObjectData()

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

receive data from Global Muon Trigger

Definition at line 139 of file GlobalBoard.cc.

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

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

◆ receiveExternalData()

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

Definition at line 457 of file GlobalBoard.cc.

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

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

◆ receiveMuonObjectData()

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

Definition at line 346 of file GlobalBoard.cc.

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

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

◆ receiveMuonShowerObjectData()

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

Definition at line 393 of file GlobalBoard.cc.

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

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

◆ reset()

void GlobalBoard::reset ( void  )

clear uGT

Definition at line 1129 of file GlobalBoard.cc.

1129  {
1130  resetMu();
1131  resetMuonShower();
1132  resetCalo();
1133  resetExternal();
1134 
1135  m_uGtAlgBlk.reset();
1136 
1137  m_gtlDecisionWord.reset();
1138  m_gtlAlgorithmOR.reset();
1139 }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:246
void reset()
reset the content of a GlobalAlgBlk
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:248
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:245

◆ resetCalo()

void GlobalBoard::resetCalo ( )

Definition at line 1154 of file GlobalBoard.cc.

1154  {
1155  m_candL1EG->clear();
1156  m_candL1Tau->clear();
1157  m_candL1Jet->clear();
1158  m_candL1EtSum->clear();
1160 
1166 }
BXVector< const l1t::EtSum * > * m_candL1EtSumZdc
Definition: GlobalBoard.h:234
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:230
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:233
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:232
void clear()
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:231

◆ resetExternal()

void GlobalBoard::resetExternal ( )

Definition at line 1168 of file GlobalBoard.cc.

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

◆ resetMu()

void GlobalBoard::resetMu ( )

Definition at line 1142 of file GlobalBoard.cc.

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

◆ resetMuonShower()

void GlobalBoard::resetMuonShower ( )

Definition at line 1148 of file GlobalBoard.cc.

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

◆ runFDL()

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

run the uGT FDL (Apply Prescales and Veto)

if we are masking.

Definition at line 985 of file GlobalBoard.cc.

References iEvent, LogDebug, and or.

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

◆ runGTL()

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

run the uGT GTL (Conditions and Algorithms)

Definition at line 494 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::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::MuonShowerCondition::print(), l1t::EnergySumCondition::print(), l1t::MuCondition::print(), l1t::EnergySumZdcCondition::print(), l1t::ExternalCondition::print(), l1t::CorrCondition::print(), l1t::CaloCondition::print(), l1t::CorrThreeBodyCondition::print(), l1t::CorrWithOverlapRemovalCondition::print(), l1t::AlgorithmEvaluation::print(), GlobalObjectMap::print(), GlobalObjectMap::setAlgoBitNumber(), GlobalObjectMap::setAlgoGtlResult(), GlobalObjectMap::setAlgoName(), l1t::CorrCondition::setScales(), l1t::CorrThreeBodyCondition::setScales(), l1t::CorrWithOverlapRemovalCondition::setScales(), l1t::ConditionEvaluation::setVerbosity(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalObjectMap::swapCombinationVector(), GlobalObjectMap::swapObjectTypeVector(), and GlobalObjectMap::swapOperandTokenVector().

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

◆ setBxFirst()

void GlobalBoard::setBxFirst ( int  bx)

Definition at line 109 of file GlobalBoard.cc.

References nano_mu_digi_cff::bx.

◆ setBxLast()

void GlobalBoard::setBxLast ( int  bx)

Definition at line 111 of file GlobalBoard.cc.

References nano_mu_digi_cff::bx.

◆ setResetPSCountersEachLumiSec()

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

Definition at line 204 of file GlobalBoard.h.

References m_resetPSCountersEachLumiSec, and heppy_batch::val.

◆ setSemiRandomInitialPSCounters()

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

◆ setVerbosity()

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

Definition at line 208 of file GlobalBoard.h.

References m_verbosity, and verbosity.

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

Member Data Documentation

◆ m_algFinalOr

bool l1t::GlobalBoard::m_algFinalOr
private

Definition at line 264 of file GlobalBoard.h.

◆ m_algFinalOrVeto

bool l1t::GlobalBoard::m_algFinalOrVeto
private

Definition at line 265 of file GlobalBoard.h.

◆ m_algInitialOr

bool l1t::GlobalBoard::m_algInitialOr
private

Definition at line 261 of file GlobalBoard.h.

◆ m_algIntermOr

bool l1t::GlobalBoard::m_algIntermOr
private

Definition at line 262 of file GlobalBoard.h.

◆ m_algPrescaledOr

bool l1t::GlobalBoard::m_algPrescaledOr
private

Definition at line 263 of file GlobalBoard.h.

◆ m_boardEventCount

unsigned int l1t::GlobalBoard::m_boardEventCount
private

Definition at line 268 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_bxFirst_

int l1t::GlobalBoard::m_bxFirst_
private

Definition at line 242 of file GlobalBoard.h.

◆ m_bxLast_

int l1t::GlobalBoard::m_bxLast_
private

Definition at line 243 of file GlobalBoard.h.

◆ m_candL1EG

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

Definition at line 230 of file GlobalBoard.h.

Referenced by getCandL1EG().

◆ m_candL1EtSum

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

Definition at line 233 of file GlobalBoard.h.

Referenced by getCandL1EtSum().

◆ m_candL1EtSumZdc

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

Definition at line 234 of file GlobalBoard.h.

Referenced by getCandL1EtSumZdc().

◆ m_candL1External

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

Definition at line 235 of file GlobalBoard.h.

Referenced by getCandL1External().

◆ m_candL1Jet

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

Definition at line 232 of file GlobalBoard.h.

Referenced by getCandL1Jet().

◆ m_candL1Mu

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

Definition at line 228 of file GlobalBoard.h.

Referenced by getCandL1Mu().

◆ m_candL1MuShower

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

Definition at line 229 of file GlobalBoard.h.

Referenced by getCandL1MuShower().

◆ m_candL1Tau

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

Definition at line 231 of file GlobalBoard.h.

Referenced by getCandL1Tau().

◆ m_conditionResultMaps

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

Definition at line 251 of file GlobalBoard.h.

◆ m_currentLumi

unsigned int l1t::GlobalBoard::m_currentLumi
private

Definition at line 253 of file GlobalBoard.h.

◆ m_gtlAlgorithmOR

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

Definition at line 245 of file GlobalBoard.h.

Referenced by getAlgorithmOR(), and GlobalBoard().

◆ m_gtlDecisionWord

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

Definition at line 246 of file GlobalBoard.h.

Referenced by getDecisionWord(), and GlobalBoard().

◆ m_isDebugEnabled

bool l1t::GlobalBoard::m_isDebugEnabled
private

Definition at line 258 of file GlobalBoard.h.

◆ m_l1CaloGeometry

const L1CaloGeometry* l1t::GlobalBoard::m_l1CaloGeometry
private

Definition at line 218 of file GlobalBoard.h.

◆ m_l1CaloGeometryCacheID

unsigned long long l1t::GlobalBoard::m_l1CaloGeometryCacheID
private

Definition at line 219 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_l1GtMenu

const TriggerMenu* l1t::GlobalBoard::m_l1GtMenu
private

Definition at line 214 of file GlobalBoard.h.

◆ m_l1GtMenuCacheID

unsigned long long l1t::GlobalBoard::m_l1GtMenuCacheID
private

Definition at line 215 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_l1MuTriggerScales

const L1MuTriggerScales* l1t::GlobalBoard::m_l1MuTriggerScales
private

Definition at line 221 of file GlobalBoard.h.

◆ m_l1MuTriggerScalesCacheID

unsigned long long l1t::GlobalBoard::m_l1MuTriggerScalesCacheID
private

Definition at line 222 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_prescaleCounterAlgoTrig

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

Definition at line 304 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_resetPSCountersEachLumiSec

bool l1t::GlobalBoard::m_resetPSCountersEachLumiSec = false
private

Definition at line 275 of file GlobalBoard.h.

Referenced by setResetPSCountersEachLumiSec().

◆ m_semiRandomInitialPSCounters

bool l1t::GlobalBoard::m_semiRandomInitialPSCounters = false
private

Definition at line 278 of file GlobalBoard.h.

Referenced by setSemiRandomInitialPSCounters().

◆ m_singlestep

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

Definition at line 283 of file GlobalBoard.h.

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

◆ m_uGtAlgBlk

GlobalAlgBlk l1t::GlobalBoard::m_uGtAlgBlk
private

Definition at line 248 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_uGtBoardNumber

int l1t::GlobalBoard::m_uGtBoardNumber
private

Definition at line 271 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_uGtFinalBoard

bool l1t::GlobalBoard::m_uGtFinalBoard
private

Definition at line 272 of file GlobalBoard.h.

Referenced by GlobalBoard().

◆ m_verbosity

int l1t::GlobalBoard::m_verbosity
private

verbosity level

Definition at line 257 of file GlobalBoard.h.

Referenced by setVerbosity().