CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
l1t::GlobalBoard Class Reference

#include <GlobalBoard.h>

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 Tau data list More...
 
const BXVector< const
GlobalExtBlk * > * 
getCandL1External () const
 pointer to Tau 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< 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 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 (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 bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, const bool receiveEtSums)
 receive data from Global Muon Trigger More...
 
void receiveExternalData (edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk > > &, const bool receiveExt)
 
void receiveMuonObjectData (edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon > > &, const bool receiveMu, const int nrL1Mu)
 
void reset ()
 clear uGT More...
 
void resetCalo ()
 
void resetExternal ()
 
void resetMu ()
 
void runFDL (edm::Event &iEvent, const int iBxInEvent, const int totalBxInEvent, const unsigned int numberPhysTriggers, const std::vector< int > &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 (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 nrL1EG, const int nrL1Tau, const int nrL1Jet)
 run the uGT GTL (Conditions and Algorithms) More...
 
void setBxFirst (int bx)
 
void setBxLast (int bx)
 
void setVerbosity (const int verbosity)
 
virtual ~GlobalBoard ()
 

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 GlobalExtBlk * > * m_candL1External
 
BXVector< const
l1t::L1Candidate * > * 
m_candL1Jet
 
BXVector< const l1t::Muon * > * m_candL1Mu
 
BXVector< const
l1t::L1Candidate * > * 
m_candL1Tau
 
std::vector
< AlgorithmEvaluation::ConditionEvaluationMap
m_conditionResultMaps
 
bool m_firstEv
 
bool m_firstEvLumiSegment
 
std::bitset
< GlobalAlgBlk::maxPhysicsTriggers
m_gtlAlgorithmOR
 
std::bitset
< GlobalAlgBlk::maxPhysicsTriggers
m_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< int > > m_prescaleCounterAlgoTrig
 prescale counters: NumberPhysTriggers counters per bunch cross in event More...
 
GlobalAlgBlk m_uGtAlgBlk
 
int m_uGtBoardNumber
 
bool m_uGtFinalBoard
 
int m_verbosity
 verbosity level More...
 

Detailed Description

Definition at line 52 of file GlobalBoard.h.

Constructor & Destructor Documentation

GlobalBoard::GlobalBoard ( )

Definition at line 58 of file GlobalBoard.cc.

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

58  :
65  m_firstEv(true),
68 {
69 
71 
72  m_gtlAlgorithmOR.reset();
73  m_gtlDecisionWord.reset();
74 
75  // initialize cached IDs
76  m_l1GtMenuCacheID = 0ULL;
79 
80  // Counter for number of events board sees
82 
83  // Need to expand use with more than one uGt GlobalBoard for now assume 1
84  m_uGtBoardNumber = 0;
85  m_uGtFinalBoard = true;
86 
87 
88 }
bool isDebugEnabled()
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:227
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:220
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
unsigned int m_boardEventCount
Definition: GlobalBoard.h:278
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
void reset()
reset the content of a GlobalAlgBlk
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:224
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
bool m_firstEvLumiSegment
Definition: GlobalBoard.h:261
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
GlobalBoard::~GlobalBoard ( )
virtual

Definition at line 91 of file GlobalBoard.cc.

91  {
92 
93  //reset(); //why would we need a reset?
94  delete m_candL1Mu;
95  delete m_candL1EG;
96  delete m_candL1Tau;
97  delete m_candL1Jet;
98  delete m_candL1EtSum;
99  delete m_candL1External;
100 
101 // delete m_gtEtaPhiConversions;
102 
103 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236

Member Function Documentation

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

Fill the Daq Records.

Definition at line 979 of file GlobalBoard.cc.

References LogDebug.

985 {
986 
987  if (m_verbosity) {
988  LogDebug("L1TGlobal")
989  << "\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent
990  << std::endl;
991 
992  }
993 
994 // Set header information
995  m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
996  m_uGtAlgBlk.setPreScColumn(prescaleSet);
997  m_uGtAlgBlk.setL1MenuUUID(menuUUID);
998  m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
999 
1003 
1004 
1005  uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1006 
1007 }
#define LogDebug(id)
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:266
void setFinalOR(bool fOR)
Definition: GlobalAlgBlk.h:60
void setFinalORVeto(bool fOR)
Definition: GlobalAlgBlk.h:58
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
void setL1FirmwareUUID(int fuuid)
Definition: GlobalAlgBlk.h:56
void setPreScColumn(int psC)
Definition: GlobalAlgBlk.h:61
const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& l1t::GlobalBoard::getAlgorithmOR ( ) const
inline

return algorithm OR decision

Definition at line 137 of file GlobalBoard.h.

References m_gtlAlgorithmOR.

138  {
139  return m_gtlAlgorithmOR;
140  }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249
const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1EG ( ) const
inline

pointer to EG data list

Definition at line 149 of file GlobalBoard.h.

References m_candL1EG.

150  {
151  return m_candL1EG;
152  }
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
const BXVector<const l1t::EtSum*>* l1t::GlobalBoard::getCandL1EtSum ( ) const
inline

pointer to Tau data list

Definition at line 168 of file GlobalBoard.h.

References m_candL1EtSum.

169  {
170  return m_candL1EtSum;
171  }
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
const BXVector<const GlobalExtBlk*>* l1t::GlobalBoard::getCandL1External ( ) const
inline

pointer to Tau data list

Definition at line 174 of file GlobalBoard.h.

References m_candL1External.

175  {
176  return m_candL1External;
177  }
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1Jet ( ) const
inline

pointer to Jet data list

Definition at line 155 of file GlobalBoard.h.

References m_candL1Jet.

156  {
157  return m_candL1Jet;
158  }
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
const BXVector<const l1t::Muon*>* l1t::GlobalBoard::getCandL1Mu ( ) const
inline

return global muon trigger candidate

Definition at line 143 of file GlobalBoard.h.

References m_candL1Mu.

144  {
145  return m_candL1Mu;
146  }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1Tau ( ) const
inline

pointer to Tau data list

Definition at line 162 of file GlobalBoard.h.

References m_candL1Tau.

163  {
164  return m_candL1Tau;
165  }
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& l1t::GlobalBoard::getDecisionWord ( ) const
inline

return decision

Definition at line 131 of file GlobalBoard.h.

References m_gtlDecisionWord.

132  {
133  return m_gtlDecisionWord;
134  }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
void GlobalBoard::init ( const int  numberPhysTriggers,
const int  nrL1Mu,
const int  nrL1EG,
const int  nrL1Tau,
const int  nrL1Jet,
int  bxFirst,
int  bxLast 
)

initialize the class (mainly reserve)

Definition at line 118 of file GlobalBoard.cc.

References LogDebug.

119  {
120 
121  setBxFirst(bxFirst);
122  setBxLast(bxLast);
123 
124  m_candL1Mu->setBXRange( m_bxFirst_, m_bxLast_ );
125  m_candL1EG->setBXRange( m_bxFirst_, m_bxLast_ );
126  m_candL1Tau->setBXRange( m_bxFirst_, m_bxLast_ );
127  m_candL1Jet->setBXRange( m_bxFirst_, m_bxLast_ );
128  m_candL1EtSum->setBXRange( m_bxFirst_, m_bxLast_ );
130 
131  m_uGtAlgBlk.reset();
132 
133  LogDebug("L1TGlobal") << "\t Initializing Board with bxFirst = " << m_bxFirst_ << ", bxLast = " << m_bxLast_ << std::endl;
134 
135 
136 }
#define LogDebug(id)
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
void setBxLast(int bx)
Definition: GlobalBoard.cc:112
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
void reset()
reset the content of a GlobalAlgBlk
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
void setBxFirst(int bx)
Definition: GlobalBoard.cc:106
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
void GlobalBoard::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 1058 of file GlobalBoard.cc.

References LogTrace.

1058  {
1059 
1060  LogTrace("L1TGlobal")
1061  << "\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = "
1062  << iBxInEvent << std::endl;
1063 
1064  int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1065  LogTrace("L1TGlobal")
1066  << "Number of GMT muons = " << nrL1Mu << "\n"
1067  << std::endl;
1068 
1069  LogTrace("L1TGlobal") << std::endl;
1070 
1071 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
#define LogTrace(id)
void GlobalBoard::receiveCaloObjectData ( 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 bool  receiveEG,
const int  nrL1EG,
const bool  receiveTau,
const int  nrL1Tau,
const bool  receiveJet,
const int  nrL1Jet,
const bool  receiveEtSums 
)

receive data from Global Muon Trigger

Definition at line 141 of file GlobalBoard.cc.

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

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

Definition at line 410 of file GlobalBoard.cc.

References edm::Event::getByToken(), i, edm::HandleBase::isValid(), and LogDebug.

412  {
413 
414  if (m_verbosity) {
415  LogDebug("L1TGlobal")
416  << "\n**** GlobalBoard receiving external data = "
417  //<< "\n from input tag " << muInputTag << "\n"
418  << std::endl;
419  }
420 
421  resetExternal();
422 
423  // get data from Global Muon Trigger
424  if (receiveExt) {
426  iEvent.getByToken(extInputToken, extData);
427 
428  if (!extData.isValid()) {
429  if (m_verbosity) {
430  edm::LogWarning("L1TGlobal")
431  << "\nWarning: BXVector<GlobalExtBlk> with input tag "
432  //<< muInputTag
433  << "\nrequested in configuration, but not found in the event.\n"
434  << std::endl;
435  }
436  } else {
437  // bx in muon data
438  for(int i = extData->getFirstBX(); i <= extData->getLastBX(); ++i) {
439 
440  // Prevent from pushing back bx that is outside of allowed range
441  if( i < m_bxFirst_ || i > m_bxLast_ ) continue;
442 
443  //Loop over ext in this bx
444  for(std::vector<GlobalExtBlk>::const_iterator ext = extData->begin(i); ext != extData->end(i); ++ext) {
445 
446  (*m_candL1External).push_back(i,&(*ext));
447  } //end loop over ext in bx
448  } //end loop over bx
449 
450  } //end if over valid ext data
451 
452  } //end if ReveiveExt data
453 
454 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
bool isValid() const
Definition: HandleBase.h:75
void GlobalBoard::receiveMuonObjectData ( edm::Event iEvent,
const edm::EDGetTokenT< BXVector< l1t::Muon > > &  muInputToken,
const bool  receiveMu,
const int  nrL1Mu 
)

Definition at line 354 of file GlobalBoard.cc.

References edm::Event::getByToken(), i, edm::HandleBase::isValid(), LogDebug, and RPCpg::mu.

356  {
357 
358  if (m_verbosity) {
359  LogDebug("L1TGlobal")
360  << "\n**** GlobalBoard receiving muon data = "
361  //<< "\n from input tag " << muInputTag << "\n"
362  << std::endl;
363  }
364 
365  resetMu();
366 
367  // get data from Global Muon Trigger
368  if (receiveMu) {
370  iEvent.getByToken(muInputToken, muonData);
371 
372  if (!muonData.isValid()) {
373  if (m_verbosity) {
374  edm::LogWarning("L1TGlobal")
375  << "\nWarning: BXVector<l1t::Muon> with input tag "
376  //<< muInputTag
377  << "\nrequested in configuration, but not found in the event.\n"
378  << std::endl;
379  }
380  } else {
381  // bx in muon data
382  for(int i = muonData->getFirstBX(); i <= muonData->getLastBX(); ++i) {
383 
384  // Prevent from pushing back bx that is outside of allowed range
385  if( i < m_bxFirst_ || i > m_bxLast_ ) continue;
386 
387  //Loop over Muons in this bx
388  int nObj = 0;
389  for(std::vector<l1t::Muon>::const_iterator mu = muonData->begin(i); mu != muonData->end(i); ++mu) {
390 
391  if(nObj<nrL1Mu) {
392  (*m_candL1Mu).push_back(i,&(*mu));
393  } else {
394  edm::LogWarning("L1TGlobal") << " Too many Muons ("<<nObj<<") for uGT Configuration maxMu =" <<nrL1Mu << std::endl;
395  }
396 
397  LogDebug("L1TGlobal") << "Muon Pt " << mu->hwPt() << " Eta " << mu->hwEta() << " Phi " << mu->hwPhi() << " Qual " << mu->hwQual() <<" Iso " << mu->hwIso() << std::endl;
398  nObj++;
399  } //end loop over muons in bx
400  } //end loop over bx
401 
402  } //end if over valid muon data
403 
404  } //end if ReveiveMuon data
405 
406 
407 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
const int mu
Definition: Constants.h:22
bool isValid() const
Definition: HandleBase.h:75
void GlobalBoard::reset ( void  )

clear uGT

Definition at line 1011 of file GlobalBoard.cc.

1011  {
1012 
1013  resetMu();
1014  resetCalo();
1015  resetExternal();
1016 
1017  m_uGtAlgBlk.reset();
1018 
1019  m_gtlDecisionWord.reset();
1020  m_gtlAlgorithmOR.reset();
1021 
1022 
1023 
1024 }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
void reset()
reset the content of a GlobalAlgBlk
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249
void GlobalBoard::resetCalo ( )

Definition at line 1035 of file GlobalBoard.cc.

1035  {
1036 
1037  m_candL1EG->clear();
1038  m_candL1Tau->clear();
1039  m_candL1Jet->clear();
1040  m_candL1EtSum->clear();
1041 
1042  m_candL1EG->setBXRange( m_bxFirst_, m_bxLast_ );
1043  m_candL1Tau->setBXRange( m_bxFirst_, m_bxLast_ );
1044  m_candL1Jet->setBXRange( m_bxFirst_, m_bxLast_ );
1045  m_candL1EtSum->setBXRange( m_bxFirst_, m_bxLast_ );
1046 
1047 }
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
void GlobalBoard::resetExternal ( )

Definition at line 1049 of file GlobalBoard.cc.

1049  {
1050 
1053 
1054 }
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
void clear()
void setBXRange(int bxFirst, int bxLast)
void GlobalBoard::resetMu ( )

Definition at line 1027 of file GlobalBoard.cc.

1027  {
1028 
1029  m_candL1Mu->clear();
1030  m_candL1Mu->setBXRange( m_bxFirst_, m_bxLast_ );
1031 
1032 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
void GlobalBoard::runFDL ( edm::Event iEvent,
const int  iBxInEvent,
const int  totalBxInEvent,
const unsigned int  numberPhysTriggers,
const std::vector< int > &  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 830 of file GlobalBoard.cc.

References LogDebug.

838  {
839 
840 
841  if (m_verbosity) {
842  LogDebug("L1TGlobal")
843  << "\n**** GlobalBoard apply Final Decision Logic "
844  << std::endl;
845 
846  }
847 
848 
849  // prescale counters are reset at the beginning of the luminosity segment
850  if( m_firstEv ){
851  // prescale counters: numberPhysTriggers counters per bunch cross
852  m_prescaleCounterAlgoTrig.reserve(numberPhysTriggers*totalBxInEvent);
853 
854  for( int iBxInEvent = 0; iBxInEvent <= totalBxInEvent; ++iBxInEvent ){
855  m_prescaleCounterAlgoTrig.push_back(prescaleFactorsAlgoTrig);
856  }
857  m_firstEv = false;
858  }
859 
860  // TODO FIXME find the beginning of the luminosity segment
861  if( m_firstEvLumiSegment ){
862 
864  for( int iBxInEvent = 0; iBxInEvent <= totalBxInEvent; ++iBxInEvent ){
865  m_prescaleCounterAlgoTrig.push_back(prescaleFactorsAlgoTrig);
866  }
867 
868  m_firstEvLumiSegment = false;
869  }
870 
871  // Copy Algorithm bits to Prescaled word
872  // Prescaling and Masking done below if requested.
874 
875 
876  // -------------------------------------------
877  // Apply Prescales or skip if turned off
878  // -------------------------------------------
879  if( !algorithmTriggersUnprescaled ){
880 
881  // iBxInEvent is ... -2 -1 0 1 2 ... while counters are 0 1 2 3 4 ...
882  int inBxInEvent = totalBxInEvent/2 + iBxInEvent;
883 
884  bool temp_algPrescaledOr = false;
885  for( unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit ){
886 
887  bool bitValue = m_uGtAlgBlk.getAlgoDecisionInitial( iBit );
888  if( bitValue ){
889  // Make sure algo bit in range, warn otherwise
890  if( iBit < prescaleFactorsAlgoTrig.size() ){
891  if( prescaleFactorsAlgoTrig.at(iBit) != 1 ){
892 
893  (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit))--;
894  if( m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) == 0 ){
895 
896  // bit already true in algoDecisionWord, just reset counter
897  m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) = prescaleFactorsAlgoTrig.at(iBit);
898  temp_algPrescaledOr = true;
899  }
900  else {
901 
902  // change bit to false in prescaled word and final decision word
904 
905  } //if Prescale counter reached zero
906  } //if prescale factor is not 1 (ie. no prescale)
907  else {
908 
909  temp_algPrescaledOr = true;
910  }
911  } // require bit in range
912  else{
913  edm::LogWarning("L1TGlobal")
914  << "\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() "
915  << std::endl;
916  }
917  } //if algo bit is set true
918  } //loop over alg bits
919 
920  m_algPrescaledOr = temp_algPrescaledOr; //temp
921 
922  }
923  else {
924  // Since not Prescaling just take OR of Initial Work
926 
927  }//if we are going to apply prescales.
928 
929 
930  // Copy Algorithm bits fron Prescaled word to Final Word
931  // Masking done below if requested.
933 
934  if( !algorithmTriggersUnmasked ){
935 
936  bool temp_algFinalOr = false;
937  for( unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit ){
938 
939  bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm( iBit );
940 
941  if( bitValue ){
942  //bool isMasked = ( triggerMaskAlgoTrig.at(iBit) == 0 );
943  bool isMasked = false;
944  if( iBit < triggerMaskAlgoTrig.size() ) isMasked = ( triggerMaskAlgoTrig.at(iBit) == 0 );
945  else{
946  edm::LogWarning("L1TGlobal")
947  << "\nWarning: algoBit >= triggerMaskAlgoTrig.size() "
948  << std::endl;
949  }
950 
951  bool passMask = ( bitValue && !isMasked );
952 
953  if( passMask ) temp_algFinalOr = true;
954  else m_uGtAlgBlk.setAlgoDecisionFinal(iBit,false);
955 
956  // Check if veto mask is true, if it is, set the event veto flag.
957  if ( triggerMaskVetoAlgoTrig.at(iBit) == 1 ) m_algFinalOrVeto = true;
958 
959  }
960  }
961 
962  m_algIntermOr = temp_algFinalOr;
963 
964  }
965  else {
966 
968 
969  }
970 
971 // Set FinalOR for this board
973 
974 
975 
976 }
#define LogDebug(id)
std::vector< bool > const & getAlgoDecisionInitial() const
Get decision bits.
Definition: GlobalAlgBlk.h:82
void copyIntermToFinal()
Definition: GlobalAlgBlk.h:74
void copyInitialToInterm()
Copy vectors words.
Definition: GlobalAlgBlk.h:73
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
std::vector< std::vector< int > > m_prescaleCounterAlgoTrig
prescale counters: NumberPhysTriggers counters per bunch cross in event
Definition: GlobalBoard.h:258
void setAlgoDecisionInterm(unsigned int bit, bool val)
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
bool m_firstEvLumiSegment
Definition: GlobalBoard.h:261
std::vector< bool > const & getAlgoDecisionInterm() const
Definition: GlobalAlgBlk.h:85
void setAlgoDecisionFinal(unsigned int bit, bool val)
void GlobalBoard::runGTL ( 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  nrL1EG,
const int  nrL1Tau,
const int  nrL1Jet 
)

run the uGT GTL (Conditions and Algorithms)

DMP Start debugging here

Definition at line 458 of file GlobalBoard.cc.

References CorrelationTemplate::cond0Category(), CorrelationTemplate::cond0Index(), CorrelationTemplate::cond1Category(), CorrelationTemplate::cond1Index(), l1t::CondCalo, l1t::CondCorrelation, l1t::CondEnergySum, l1t::CondExternal, l1t::CondMuon, 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, match(), l1t::AlgorithmEvaluation::operandTokenVector(), reco::print(), l1t::ExternalCondition::print(), l1t::EnergySumCondition::print(), l1t::MuCondition::print(), l1t::CaloCondition::print(), l1t::CorrCondition::print(), l1t::AlgorithmEvaluation::print(), GlobalObjectMap::print(), GlobalObjectMap::setAlgoBitNumber(), GlobalObjectMap::setAlgoGtlResult(), GlobalObjectMap::setAlgoName(), l1t::CorrCondition::setScales(), l1t::ConditionEvaluation::setVerbosity(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalObjectMap::swapCombinationVector(), GlobalObjectMap::swapObjectTypeVector(), and GlobalObjectMap::swapOperandTokenVector().

467  {
468 
469  const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->gtConditionMap();
470  const AlgorithmMap& algorithmMap = m_l1GtMenu->gtAlgorithmMap();
471  const GlobalScales& gtScales = m_l1GtMenu->gtScales();
472  const std::string scaleSetName = gtScales.getScalesName();
473  LogDebug("L1TGlobal") << " L1 Menu Scales -- Set Name: " << scaleSetName << std::endl;
474 
475  // Reset AlgBlk for this bx
476  m_uGtAlgBlk.reset();
477  m_algInitialOr=false;
478  m_algPrescaledOr=false;
479  m_algIntermOr=false;
480  m_algFinalOr=false;
481  m_algFinalOrVeto=false;
482 
483 
484  const std::vector<std::vector<MuonTemplate> >& corrMuon =
485  m_l1GtMenu->corMuonTemplate();
486 
487  // Comment out for now
488  const std::vector<std::vector<CaloTemplate> >& corrCalo =
489  m_l1GtMenu->corCaloTemplate();
490 
491  const std::vector<std::vector<EnergySumTemplate> >& corrEnergySum =
492  m_l1GtMenu->corEnergySumTemplate();
493 
494  LogDebug("L1TGlobal") << "Size corrMuon " << corrMuon.size()
495  << "\nSize corrCalo " << corrCalo.size()
496  << "\nSize corrSums " << corrEnergySum.size() << std::endl;
497 
498 
499  // loop over condition maps (one map per condition chip)
500  // then loop over conditions in the map
501  // save the results in temporary maps
502 
503  // never happens in production but at first event...
504  if (m_conditionResultMaps.size() != conditionMap.size()) {
505  m_conditionResultMaps.clear();
506  m_conditionResultMaps.resize(conditionMap.size());
507  }
508 
509  int iChip = -1;
510 
511  for (std::vector<ConditionMap>::const_iterator
512  itCondOnChip = conditionMap.begin(); itCondOnChip != conditionMap.end(); itCondOnChip++) {
513 
514  iChip++;
515 
517  m_conditionResultMaps[iChip];
518 
519 
520 
521  for (CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
522 
523  // evaluate condition
524  switch ((itCond->second)->condCategory()) {
525  case CondMuon: {
526 
527  // BLW Not sure what to do with this for now
528  const int ifMuEtaNumberBits = 0;
529 
530  MuCondition* muCondition = new MuCondition(itCond->second, this,
531  nrL1Mu, ifMuEtaNumberBits);
532 
533  muCondition->setVerbosity(m_verbosity);
534 
535  muCondition->evaluateConditionStoreResult(iBxInEvent);
536 
537  // BLW COmment out for now
538  cMapResults[itCond->first] = muCondition;
539 
540  if (m_verbosity && m_isDebugEnabled) {
541  std::ostringstream myCout;
542  muCondition->print(myCout);
543 
544  LogTrace("L1TGlobal") << myCout.str() << std::endl;
545  }
546  //delete muCondition;
547 
548  }
549  break;
550  case CondCalo: {
551 
552  // BLW Not sure w hat to do with this for now
553  const int ifCaloEtaNumberBits = 0;
554 
555  CaloCondition* caloCondition = new CaloCondition(
556  itCond->second, this,
557  nrL1EG,
558  nrL1Jet,
559  nrL1Tau,
560  ifCaloEtaNumberBits);
561 
562  caloCondition->setVerbosity(m_verbosity);
563 
564  caloCondition->evaluateConditionStoreResult(iBxInEvent);
565 
566 
567  cMapResults[itCond->first] = caloCondition;
568 
569  if (m_verbosity && m_isDebugEnabled) {
570  std::ostringstream myCout;
571  caloCondition->print(myCout);
572 
573  LogTrace("L1TGlobal") << myCout.str() << std::endl;
574  }
575  // delete caloCondition;
576 
577  }
578  break;
579  case CondEnergySum: {
580 
581  EnergySumCondition* eSumCondition = new EnergySumCondition(
582  itCond->second, this);
583 
584  eSumCondition->setVerbosity(m_verbosity);
585  eSumCondition->evaluateConditionStoreResult(iBxInEvent);
586 
587  cMapResults[itCond->first] = eSumCondition;
588 
589  if (m_verbosity && m_isDebugEnabled) {
590  std::ostringstream myCout;
591  eSumCondition->print(myCout);
592 
593  LogTrace("L1TGlobal") << myCout.str() << std::endl;
594  }
595  // delete eSumCondition;
596 
597  }
598  break;
599 
600  case CondExternal: {
601 
602  ExternalCondition* extCondition = new ExternalCondition(
603  itCond->second, this);
604 
605  extCondition->setVerbosity(m_verbosity);
606  extCondition->evaluateConditionStoreResult(iBxInEvent);
607 
608  cMapResults[itCond->first] = extCondition;
609 
610  if (m_verbosity && m_isDebugEnabled) {
611  std::ostringstream myCout;
612  extCondition->print(myCout);
613 
614  LogTrace("L1TGlobal") << myCout.str() << std::endl;
615  }
616  // delete extCondition;
617 
618 
619  }
620  break;
621  case CondCorrelation: {
622 
623 
624 
625 
626  // get first the sub-conditions
627  const CorrelationTemplate* corrTemplate =
628  static_cast<const CorrelationTemplate*>(itCond->second);
629  const GtConditionCategory cond0Categ = corrTemplate->cond0Category();
630  const GtConditionCategory cond1Categ = corrTemplate->cond1Category();
631  const int cond0Ind = corrTemplate->cond0Index();
632  const int cond1Ind = corrTemplate->cond1Index();
633 
634  const GlobalCondition* cond0Condition = 0;
635  const GlobalCondition* cond1Condition = 0;
636 
637  // maximum number of objects received for evaluation of l1t::Type1s condition
638  int cond0NrL1Objects = 0;
639  int cond1NrL1Objects = 0;
640  LogDebug("L1TGlobal") << " cond0NrL1Objects" << cond0NrL1Objects << " cond1NrL1Objects " << cond1NrL1Objects << std::endl;
641 
642 
643  switch (cond0Categ) {
644  case CondMuon: {
645  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
646  }
647  break;
648  case CondCalo: {
649  cond0Condition = &((corrCalo[iChip])[cond0Ind]);
650  }
651  break;
652  case CondEnergySum: {
653  cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
654  }
655  break;
656  default: {
657  // do nothing, should not arrive here
658  }
659  break;
660  }
661 
662  switch (cond1Categ) {
663  case CondMuon: {
664  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
665  }
666  break;
667  case CondCalo: {
668  cond1Condition = &((corrCalo[iChip])[cond1Ind]);
669  }
670  break;
671  case CondEnergySum: {
672  cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
673  }
674  break;
675  default: {
676  // do nothing, should not arrive here
677  }
678  break;
679  }
680 
681  CorrCondition* correlationCond =
682  new CorrCondition(itCond->second, cond0Condition, cond1Condition, this);
683 
684  correlationCond->setVerbosity(m_verbosity);
685  correlationCond->setScales(&gtScales);
686  correlationCond->evaluateConditionStoreResult(iBxInEvent);
687 
688  cMapResults[itCond->first] = correlationCond;
689 
690  if (m_verbosity && m_isDebugEnabled) {
691  std::ostringstream myCout;
692  correlationCond->print(myCout);
693 
694  LogTrace("L1TGlobal") << myCout.str() << std::endl;
695  }
696 
697  // delete correlationCond;
698 
699 
700  }
701  break;
702  case CondNull: {
703 
704  // do nothing
705 
706  }
707  break;
708  default: {
709  // do nothing
710 
711  }
712  break;
713  }
714 
715  }
716 
717  }
718 
719  // loop over algorithm map
721  // empty vector for object maps - filled during loop
722  std::vector<GlobalObjectMap> objMapVec;
723  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) objMapVec.reserve(numberPhysTriggers);
724 
725  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
726  AlgorithmEvaluation gtAlg(itAlgo->second);
727  gtAlg.evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
728 
729  int algBitNumber = (itAlgo->second).algoBitNumber();
730  bool algResult = gtAlg.gtAlgoResult();
731 
732  LogDebug("L1TGlobal") << " ===> for iBxInEvent = " << iBxInEvent << ":\t algBitName = " << itAlgo->first << ",\t algBitNumber = " << algBitNumber << ",\t algResult = " << algResult << std::endl;
733 
734  if (algResult) {
735 // m_gtlAlgorithmOR.set(algBitNumber);
736  m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber,algResult);
737  m_algInitialOr = true;
738  }
739 
740  if (m_verbosity && m_isDebugEnabled) {
741  std::ostringstream myCout;
742  ( itAlgo->second ).print(myCout);
743  gtAlg.print(myCout);
744 
745  LogTrace("L1TGlobal") << myCout.str() << std::endl;
746  }
747 
748 
749  // object maps only for BxInEvent = 0
750  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
751 
752  std::vector<ObjectTypeInCond> otypes;
753  for (auto iop = gtAlg.operandTokenVector().begin(); iop != gtAlg.operandTokenVector().end(); ++iop){
754  //cout << "INFO: operand name: " << iop->tokenName << "\n";
755  int myChip = -1;
756  int found =0;
757  ObjectTypeInCond otype;
758  for (auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
759  myChip++;
760  auto match = imap->find(iop->tokenName);
761 
762  if (match != imap->end()){
763  found = 1;
764  //cout << "DEBUG: found match for " << iop->tokenName << " at " << match->first << "\n";
765 
766  otype = match->second->objectType();
767 
768  for (auto itype = otype.begin(); itype != otype.end() ; itype++){
769  //cout << "type: " << *itype << "\n";
770  }
771  }
772  }
773  if (!found){
774  edm::LogWarning("L1TGlobal") << "\n Failed to find match for operand token " << iop->tokenName << "\n";
775  } else {
776  otypes.push_back(otype);
777  }
778  }
779 
780  // set object map
781  GlobalObjectMap objMap;
782 
783  objMap.setAlgoName(itAlgo->first);
784  objMap.setAlgoBitNumber(algBitNumber);
785  objMap.setAlgoGtlResult(algResult);
786  objMap.swapOperandTokenVector(gtAlg.operandTokenVector());
787  objMap.swapCombinationVector(gtAlg.gtAlgoCombinationVector());
788  // gtAlg is empty now...
789  objMap.swapObjectTypeVector(otypes);
790 
791  if (m_verbosity && m_isDebugEnabled) {
792  std::ostringstream myCout1;
793  objMap.print(myCout1);
794 
795  LogTrace("L1TGlobal") << myCout1.str() << std::endl;
796  }
797 
798  objMapVec.push_back(objMap);
799 
800  }
801 
802 
803  }
804 
805  // object maps only for BxInEvent = 0
806  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
807  gtObjectMapRecord->swapGtObjectMap(objMapVec);
808  }
809 
810  // loop over condition maps (one map per condition chip)
811  // then loop over conditions in the map
812  // delete the conditions created with new, zero pointer, do not clear map, keep the vector as is...
813  for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator
814  itCondOnChip = m_conditionResultMaps.begin();
815  itCondOnChip != m_conditionResultMaps.end(); itCondOnChip++) {
816 
818  itCond = itCondOnChip->begin();
819  itCond != itCondOnChip->end(); itCond++) {
820 
821  delete itCond->second;
822  itCond->second = 0;
823  }
824  }
825 
826 }
#define LogDebug(id)
void setAlgoBitNumber(int algoBitNumberValue)
void swapOperandTokenVector(std::vector< GlobalLogicParser::OperandToken > &operandTokenVectorValue)
const l1t::GlobalScales & gtScales() const
get the scales
Definition: TriggerMenu.h:205
void setAlgoDecisionInitial(unsigned int bit, bool val)
Set decision bits.
Definition: GlobalAlgBlk.cc:88
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:10
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
const l1t::GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
__gnu_cxx::hash_map< std::string, ConditionEvaluation * > ConditionEvaluationMap
copy constructor
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
Definition: TriggerMenu.h:180
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
ConditionEvaluationMap::iterator ItEvalMap
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
Definition: TriggerMenu.h:171
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
GtConditionCategory
condition categories
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
void print(std::ostream &myCout) const
print the full object map
const l1t::GtConditionCategory cond1Category() const
void reset()
reset the content of a GlobalAlgBlk
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
void setAlgoGtlResult(bool algoGtlResultValue)
const l1t::AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: TriggerMenu.h:190
const int cond1Index() const
const std::vector< l1t::ConditionMap > & gtConditionMap() const
get / set / build the condition maps
Definition: TriggerMenu.h:76
#define LogTrace(id)
std::vector< L1GtObject > ObjectTypeInCond
void swapObjectTypeVector(std::vector< ObjectTypeInCond > &objectTypeVectorValue)
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
void setAlgoName(const std::string &algoNameValue)
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
Definition: TriggerMenu.h:164
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::vector< AlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: GlobalBoard.h:255
void GlobalBoard::setBxFirst ( int  bx)

Definition at line 106 of file GlobalBoard.cc.

106  {
107 
108  m_bxFirst_ = bx;
109 
110 }
void GlobalBoard::setBxLast ( int  bx)

Definition at line 112 of file GlobalBoard.cc.

112  {
113 
114  m_bxLast_ = bx;
115 
116 }
void l1t::GlobalBoard::setVerbosity ( const int  verbosity)
inline

Definition at line 210 of file GlobalBoard.h.

References m_verbosity, and HLT_FULL_cff::verbosity.

210  {
212  }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266

Member Data Documentation

bool l1t::GlobalBoard::m_algFinalOr
private

Definition at line 273 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_algFinalOrVeto
private

Definition at line 274 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_algInitialOr
private

Definition at line 270 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_algIntermOr
private

Definition at line 271 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_algPrescaledOr
private

Definition at line 272 of file GlobalBoard.h.

unsigned int l1t::GlobalBoard::m_boardEventCount
private

Definition at line 278 of file GlobalBoard.h.

Referenced by GlobalBoard().

int l1t::GlobalBoard::m_bxFirst_
private

Definition at line 246 of file GlobalBoard.h.

int l1t::GlobalBoard::m_bxLast_
private

Definition at line 247 of file GlobalBoard.h.

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

Definition at line 235 of file GlobalBoard.h.

Referenced by getCandL1EG().

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

Definition at line 238 of file GlobalBoard.h.

Referenced by getCandL1EtSum().

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

Definition at line 239 of file GlobalBoard.h.

Referenced by getCandL1External().

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

Definition at line 237 of file GlobalBoard.h.

Referenced by getCandL1Jet().

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

Definition at line 234 of file GlobalBoard.h.

Referenced by getCandL1Mu().

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

Definition at line 236 of file GlobalBoard.h.

Referenced by getCandL1Tau().

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

Definition at line 255 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_firstEv
private

Definition at line 260 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_firstEvLumiSegment
private

Definition at line 261 of file GlobalBoard.h.

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

Definition at line 249 of file GlobalBoard.h.

Referenced by getAlgorithmOR(), and GlobalBoard().

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

Definition at line 250 of file GlobalBoard.h.

Referenced by getDecisionWord(), and GlobalBoard().

bool l1t::GlobalBoard::m_isDebugEnabled
private

Definition at line 267 of file GlobalBoard.h.

const L1CaloGeometry* l1t::GlobalBoard::m_l1CaloGeometry
private

Definition at line 223 of file GlobalBoard.h.

unsigned long long l1t::GlobalBoard::m_l1CaloGeometryCacheID
private

Definition at line 224 of file GlobalBoard.h.

Referenced by GlobalBoard().

const TriggerMenu* l1t::GlobalBoard::m_l1GtMenu
private

Definition at line 219 of file GlobalBoard.h.

unsigned long long l1t::GlobalBoard::m_l1GtMenuCacheID
private

Definition at line 220 of file GlobalBoard.h.

Referenced by GlobalBoard().

const L1MuTriggerScales* l1t::GlobalBoard::m_l1MuTriggerScales
private

Definition at line 226 of file GlobalBoard.h.

unsigned long long l1t::GlobalBoard::m_l1MuTriggerScalesCacheID
private

Definition at line 227 of file GlobalBoard.h.

Referenced by GlobalBoard().

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

prescale counters: NumberPhysTriggers counters per bunch cross in event

Definition at line 258 of file GlobalBoard.h.

GlobalAlgBlk l1t::GlobalBoard::m_uGtAlgBlk
private

Definition at line 252 of file GlobalBoard.h.

Referenced by GlobalBoard().

int l1t::GlobalBoard::m_uGtBoardNumber
private

Definition at line 281 of file GlobalBoard.h.

Referenced by GlobalBoard().

bool l1t::GlobalBoard::m_uGtFinalBoard
private

Definition at line 282 of file GlobalBoard.h.

Referenced by GlobalBoard().

int l1t::GlobalBoard::m_verbosity
private

verbosity level

Definition at line 266 of file GlobalBoard.h.

Referenced by setVerbosity().