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::GtBoard Class Reference

#include <GtBoard.h>

Public Member Functions

void fillAlgRecord (int iBxInEvent, std::auto_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, cms_uint64_t orbNr, int bxNr)
 Fill the Daq Records. More...
 
void fillExtRecord (int iBxInEvent, std::auto_ptr< GlobalExtBlkBxCollection > &uGtExtRecord, cms_uint64_t orbNr, int bxNr)
 
const std::bitset
< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > & 
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
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
< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > & 
getDecisionWord () const
 return decision More...
 
 GtBoard ()
 
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::InputTag &, 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 receiveMuonObjectData (edm::Event &, const edm::InputTag &, const bool receiveMu, const int nrL1Mu)
 
void reset ()
 clear uGT More...
 
void resetCalo ()
 
void resetMu ()
 
void runFDL (edm::Event &iEvent, const int iBxInEvent, 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 bool produceL1GtObjectMapRecord, const int iBxInEvent, std::auto_ptr< L1GlobalTriggerObjectMapRecord > &gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet, const int nrL1JetCounts)
 run the uGT GTL (Conditions and Algorithms) More...
 
void setBxFirst (int bx)
 
void setBxLast (int bx)
 
void setVerbosity (const int verbosity)
 
virtual ~GtBoard ()
 

Private Attributes

bool m_algFinalOr
 
bool m_algInitialOr
 
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::L1Candidate * > * 
m_candL1Jet
 
BXVector< const l1t::Muon * > * m_candL1Mu
 
BXVector< const
l1t::L1Candidate * > * 
m_candL1Tau
 
std::vector
< AlgorithmEvaluation::ConditionEvaluationMap
m_conditionResultMaps
 
L1GtEtaPhiConversionsm_gtEtaPhiConversions
 
std::bitset
< L1GlobalTriggerReadoutSetup::NumberPhysTriggers
m_gtlAlgorithmOR
 
std::bitset
< L1GlobalTriggerReadoutSetup::NumberPhysTriggers
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
 
GlobalAlgBlk m_uGtAlgBlk
 
int m_uGtBoardNumber
 
GlobalExtBlk m_uGtExtBlk
 
bool m_uGtFinalBoard
 
int m_verbosity
 verbosity level More...
 

Detailed Description

Definition at line 53 of file GtBoard.h.

Constructor & Destructor Documentation

GtBoard::GtBoard ( )

Definition at line 85 of file GtBoard.cc.

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

85  :
92 {
93 
96 
97  m_gtlAlgorithmOR.reset();
98  m_gtlDecisionWord.reset();
99 
100  // initialize cached IDs
101  m_l1GtMenuCacheID = 0ULL;
104 
105  // Counter for number of events board sees
107 
108  // Need to expand use with more than one uGt GtBoard for now assume 1
109  m_uGtBoardNumber = 0;
110  m_uGtFinalBoard = true;
111 
112 /* Do we need this?
113  // pointer to conversion - actually done in the event loop (cached)
114  m_gtEtaPhiConversions = new L1GtEtaPhiConversions();
115  m_gtEtaPhiConversions->setVerbosity(m_verbosity);
116 */
117 
118 }
GlobalExtBlk m_uGtExtBlk
Definition: GtBoard.h:242
bool isDebugEnabled()
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlAlgorithmOR
Definition: GtBoard.h:238
GlobalAlgBlk m_uGtAlgBlk
Definition: GtBoard.h:241
void reset()
reset the content of a GlobalExtBlk
Definition: GlobalExtBlk.cc:92
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GtBoard.h:224
bool m_uGtFinalBoard
Definition: GtBoard.h:264
unsigned int m_boardEventCount
Definition: GtBoard.h:260
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlDecisionWord
Definition: GtBoard.h:239
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GtBoard.h:217
bool m_isDebugEnabled
Definition: GtBoard.h:252
void reset()
reset the content of a GlobalAlgBlk
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GtBoard.h:228
unsigned long long m_l1GtMenuCacheID
Definition: GtBoard.h:210
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GtBoard.h:225
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GtBoard.h:226
int m_uGtBoardNumber
Definition: GtBoard.h:263
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GtBoard.h:227
unsigned long long m_l1CaloGeometryCacheID
Definition: GtBoard.h:214
GtBoard::~GtBoard ( )
virtual

Definition at line 121 of file GtBoard.cc.

References reset().

121  {
122 
123  reset();
124  delete m_candL1Mu;
125  delete m_candL1EG;
126  delete m_candL1Tau;
127  delete m_candL1Jet;
128  delete m_candL1EtSum;
129 
130 // delete m_gtEtaPhiConversions;
131 
132 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GtBoard.h:224
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GtBoard.h:228
void reset()
clear uGT
Definition: GtBoard.cc:1051
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GtBoard.h:225
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GtBoard.h:226
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GtBoard.h:227

Member Function Documentation

void GtBoard::fillAlgRecord ( int  iBxInEvent,
std::auto_ptr< GlobalAlgBlkBxCollection > &  uGtAlgRecord,
cms_uint64_t  orbNr,
int  bxNr 
)

Fill the Daq Records.

Definition at line 993 of file GtBoard.cc.

References LogDebug.

998 {
999 
1000  if (m_verbosity) {
1001  LogDebug("l1t|Global")
1002  << "\n**** GtBoard fill DAQ Records for bx= " << iBxInEvent
1003  << std::endl;
1004 
1005  }
1006 
1007 // Set header information
1008  m_uGtAlgBlk.setOrbitNr((unsigned int)(orbNr & 0xFFFFFFFF));
1009  m_uGtAlgBlk.setbxNr((bxNr & 0xFFFF));
1010  m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1011 
1012 // Set the header information and Final OR
1013  int finalOR = 0x0;
1014  if(m_algFinalOr) finalOR = (finalOR | 0x2);
1015  if(m_uGtFinalBoard) {
1016  finalOR = (finalOR | 0x8);
1017  if( (finalOR >>1) & 0x1 ) finalOR = (finalOR | 0x1);
1018  }
1019  m_uGtAlgBlk.setFinalOR(finalOR);
1020 
1021 
1022  uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1023 
1024 }
#define LogDebug(id)
void setFinalOR(int fOR)
Definition: GlobalAlgBlk.h:57
int m_verbosity
verbosity level
Definition: GtBoard.h:251
GlobalAlgBlk m_uGtAlgBlk
Definition: GtBoard.h:241
void setbxInEventNr(int bxNr)
Definition: GlobalAlgBlk.h:56
bool m_uGtFinalBoard
Definition: GtBoard.h:264
bool m_algFinalOr
Definition: GtBoard.h:257
void setbxNr(int bxNr)
Definition: GlobalAlgBlk.h:55
void setOrbitNr(int orbNr)
set simple members
Definition: GlobalAlgBlk.h:54
void GtBoard::fillExtRecord ( int  iBxInEvent,
std::auto_ptr< GlobalExtBlkBxCollection > &  uGtExtRecord,
cms_uint64_t  orbNr,
int  bxNr 
)

Definition at line 1027 of file GtBoard.cc.

References LogDebug.

1032 {
1033 
1034  if (m_verbosity) {
1035  LogDebug("l1t|Global")
1036  << "\n**** Board fill DAQ Records for bx= " << iBxInEvent
1037  << std::endl;
1038 
1039  }
1040 // Set header information
1041  m_uGtExtBlk.setOrbitNr((unsigned int)(orbNr & 0xFFFFFFFF));
1042  m_uGtExtBlk.setbxNr((bxNr & 0xFFFF));
1043  m_uGtExtBlk.setbxInEventNr((iBxInEvent & 0xF));
1044 
1045  uGtExtRecord->push_back(iBxInEvent, m_uGtExtBlk);
1046 
1047 }
#define LogDebug(id)
GlobalExtBlk m_uGtExtBlk
Definition: GtBoard.h:242
int m_verbosity
verbosity level
Definition: GtBoard.h:251
void setbxInEventNr(int bxNr)
Definition: GlobalExtBlk.h:53
void setOrbitNr(int orbNr)
set simple members
Definition: GlobalExtBlk.h:51
void setbxNr(int bxNr)
Definition: GlobalExtBlk.h:52
const std::bitset<L1GlobalTriggerReadoutSetup::NumberPhysTriggers>& l1t::GtBoard::getAlgorithmOR ( ) const
inline

return algorithm OR decision

Definition at line 131 of file GtBoard.h.

References m_gtlAlgorithmOR.

132  {
133  return m_gtlAlgorithmOR;
134  }
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlAlgorithmOR
Definition: GtBoard.h:238
const BXVector<const l1t::L1Candidate*>* l1t::GtBoard::getCandL1EG ( ) const
inline

pointer to EG data list

Definition at line 143 of file GtBoard.h.

References m_candL1EG.

144  {
145  return m_candL1EG;
146  }
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GtBoard.h:225
const BXVector<const l1t::EtSum*>* l1t::GtBoard::getCandL1EtSum ( ) const
inline

pointer to Tau data list

Definition at line 162 of file GtBoard.h.

References m_candL1EtSum.

163  {
164  return m_candL1EtSum;
165  }
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GtBoard.h:228
const BXVector<const l1t::L1Candidate*>* l1t::GtBoard::getCandL1Jet ( ) const
inline

pointer to Jet data list

Definition at line 149 of file GtBoard.h.

References m_candL1Jet.

150  {
151  return m_candL1Jet;
152  }
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GtBoard.h:227
const BXVector<const l1t::Muon*>* l1t::GtBoard::getCandL1Mu ( ) const
inline

return global muon trigger candidate

Definition at line 137 of file GtBoard.h.

References m_candL1Mu.

138  {
139  return m_candL1Mu;
140  }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GtBoard.h:224
const BXVector<const l1t::L1Candidate*>* l1t::GtBoard::getCandL1Tau ( ) const
inline

pointer to Tau data list

Definition at line 156 of file GtBoard.h.

References m_candL1Tau.

157  {
158  return m_candL1Tau;
159  }
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GtBoard.h:226
const std::bitset<L1GlobalTriggerReadoutSetup::NumberPhysTriggers>& l1t::GtBoard::getDecisionWord ( ) const
inline

return decision

Definition at line 125 of file GtBoard.h.

References m_gtlDecisionWord.

126  {
127  return m_gtlDecisionWord;
128  }
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlDecisionWord
Definition: GtBoard.h:239
void GtBoard::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 147 of file GtBoard.cc.

References LogDebug.

148  {
149 
151  setBxLast(bxLast);
152 
153  m_candL1Mu->setBXRange( m_bxFirst_, m_bxLast_ );
154  m_candL1EG->setBXRange( m_bxFirst_, m_bxLast_ );
155  m_candL1Tau->setBXRange( m_bxFirst_, m_bxLast_ );
156  m_candL1Jet->setBXRange( m_bxFirst_, m_bxLast_ );
157  m_candL1EtSum->setBXRange( m_bxFirst_, m_bxLast_ );
158 
159  m_uGtAlgBlk.reset();
160  m_uGtExtBlk.reset();
161 
162  LogDebug("l1t|Global") << "\t Initializing Board with bxFirst = " << m_bxFirst_ << ", bxLast = " << m_bxLast_ << std::endl;
163 
164  //m_candL1Mu->resizeAll(nrL1Mu);
165 
166  // FIXME move from bitset to std::vector<bool> to be able to use
167  // numberPhysTriggers from EventSetup
168 
169  //m_gtlAlgorithmOR.reserve(numberPhysTriggers);
170  //m_gtlAlgorithmOR.assign(numberPhysTriggers, false);
171 
172  //m_gtlDecisionWord.reserve(numberPhysTriggers);
173  //m_gtlDecisionWord.assign(numberPhysTriggers, false);
174 
175 }
#define LogDebug(id)
GlobalExtBlk m_uGtExtBlk
Definition: GtBoard.h:242
GlobalAlgBlk m_uGtAlgBlk
Definition: GtBoard.h:241
void reset()
reset the content of a GlobalExtBlk
Definition: GlobalExtBlk.cc:92
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GtBoard.h:224
int m_bxFirst_
Definition: GtBoard.h:235
void setBxLast(int bx)
Definition: GtBoard.cc:141
void reset()
reset the content of a GlobalAlgBlk
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GtBoard.h:228
void setBxFirst(int bx)
Definition: GtBoard.cc:135
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GtBoard.h:225
int m_bxLast_
Definition: GtBoard.h:236
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GtBoard.h:226
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GtBoard.h:227
void GtBoard::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 1090 of file GtBoard.cc.

References LogTrace.

1090  {
1091 
1092  LogTrace("l1t|Global")
1093  << "\nL1GlobalTrigger: GMT data received for BxInEvent = "
1094  << iBxInEvent << std::endl;
1095 
1096  int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1097  LogTrace("l1t|Global")
1098  << "Number of GMT muons = " << nrL1Mu << "\n"
1099  << std::endl;
1100 /*
1101  for (std::vector<const L1MuGMTCand*>::const_iterator iter =
1102  m_candL1Mu->begin(); iter != m_candL1Mu->end(); iter++) {
1103 
1104  LogTrace("l1t|Global") << *(*iter) << std::endl;
1105 
1106  }
1107 */
1108  LogTrace("l1t|Global") << std::endl;
1109 
1110 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GtBoard.h:224
#define LogTrace(id)
void GtBoard::receiveCaloObjectData ( edm::Event iEvent,
const edm::InputTag caloInputTag,
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 180 of file GtBoard.cc.

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

185  {
186 
187  if (m_verbosity) {
188  LogDebug("l1t|Global")
189  << "\n**** Board receiving Calo Data "
190  << "\n from input tag " << caloInputTag << "\n"
191  << std::endl;
192 
193  }
194 
195  resetCalo();
196 
197  // get data from Calorimeter
198  if (receiveEG) {
200  iEvent.getByLabel(caloInputTag, egData);
201 
202  if (!egData.isValid()) {
203  if (m_verbosity) {
204  edm::LogWarning("l1t|Global")
205  << "\nWarning: BXVector<l1t::EGamma> with input tag "
206  << caloInputTag
207  << "\nrequested in configuration, but not found in the event.\n"
208  << std::endl;
209  }
210  } else {
211  // bx in EG data
212  for(int i = egData->getFirstBX(); i <= egData->getLastBX(); ++i) {
213 
214  //Loop over EG in this bx
215  for(std::vector<l1t::EGamma>::const_iterator eg = egData->begin(i); eg != egData->end(i); ++eg) {
216 
217  (*m_candL1EG).push_back(i,&(*eg));
218  LogDebug("l1t|Global") << "EG Pt " << eg->hwPt() << " Eta " << eg->hwEta() << " Phi " << eg->hwPhi() << " Qual " << eg->hwQual() <<" Iso " << eg->hwIso() << std::endl;
219  } //end loop over EG in bx
220  } //end loop over bx
221 
222  } //end if over valid EG data
223 
224  } //end if ReveiveEG data
225 
226 
227  if (receiveTau) {
229  iEvent.getByLabel(caloInputTag, tauData);
230 
231  if (!tauData.isValid()) {
232  if (m_verbosity) {
233  edm::LogWarning("l1t|Global")
234  << "\nWarning: BXVector<l1t::Tau> with input tag "
235  << caloInputTag
236  << "\nrequested in configuration, but not found in the event.\n"
237  << std::endl;
238  }
239  } else {
240  // bx in tau data
241  for(int i = tauData->getFirstBX(); i <= tauData->getLastBX(); ++i) {
242 
243  //Loop over tau in this bx
244  for(std::vector<l1t::Tau>::const_iterator tau = tauData->begin(i); tau != tauData->end(i); ++tau) {
245 
246  (*m_candL1Tau).push_back(i,&(*tau));
247  LogDebug("l1t|Global") << "tau Pt " << tau->hwPt() << " Eta " << tau->hwEta() << " Phi " << tau->hwPhi() << " Qual " << tau->hwQual() <<" Iso " << tau->hwIso() << std::endl;
248  } //end loop over tau in bx
249  } //end loop over bx
250 
251  } //end if over valid tau data
252 
253  } //end if ReveiveTau data
254 
255 
256  if (receiveJet) {
258  iEvent.getByLabel(caloInputTag, jetData);
259 
260  if (!jetData.isValid()) {
261  if (m_verbosity) {
262  edm::LogWarning("l1t|Global")
263  << "\nWarning: BXVector<l1t::Jet> with input tag "
264  << caloInputTag
265  << "\nrequested in configuration, but not found in the event.\n"
266  << std::endl;
267  }
268  } else {
269  // bx in jet data
270  for(int i = jetData->getFirstBX(); i <= jetData->getLastBX(); ++i) {
271 
272  //Loop over jet in this bx
273  for(std::vector<l1t::Jet>::const_iterator jet = jetData->begin(i); jet != jetData->end(i); ++jet) {
274 
275  (*m_candL1Jet).push_back(i,&(*jet));
276  LogDebug("l1t|Global") << "Jet Pt " << jet->hwPt() << " Eta " << jet->hwEta() << " Phi " << jet->hwPhi() << " Qual " << jet->hwQual() <<" Iso " << jet->hwIso() << std::endl;
277  } //end loop over jet in bx
278  } //end loop over bx
279 
280  } //end if over valid jet data
281 
282  } //end if ReveiveJet data
283 
284 
285  if(receiveEtSums) {
287  iEvent.getByLabel(caloInputTag, etSumData);
288 
289  if(!etSumData.isValid()) {
290  if (m_verbosity) {
291  edm::LogWarning("l1t|Global")
292  << "\nWarning: BXVector<l1t::EtSum> with input tag "
293  << caloInputTag
294  << "\nrequested in configuration, but not found in the event.\n"
295  << std::endl;
296  }
297  } else {
298 
299  for(int i = etSumData->getFirstBX(); i <= etSumData->getLastBX(); ++i) {
300 
301  //Loop over jet in this bx
302  for(std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(i); etsum != etSumData->end(i); ++etsum) {
303 
304  (*m_candL1EtSum).push_back(i,&(*etsum));
305 
306 /* In case we need to split these out
307  switch ( etsum->getType() ) {
308  case l1t::EtSum::EtSumType::kMissingEt:
309  (*m_candETM).push_back(i,&(*etsum));
310  LogDebug("l1t|Global") << "ETM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi() << std::endl;
311  break;
312  case l1t::EtSum::EtSumType::kMissingHt:
313  (*m_candHTM.push_back(i,&(*etsum);
314  LogDebug("l1t|Global") << "HTM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi() << std::endl;
315  break;
316  case l1t::EtSum::EtSumType::kTotalEt:
317  (*m_candETT.push_back(i,&(*etsum);
318  LogDebug("l1t|Global") << "ETT: Pt " << etsum->hwPt() << std::endl;
319  break;
320  case l1t::EtSum::EtSumType::kTotalHt:
321  (*m_candHTT.push_back(i,&(*etsum);
322  LogDebug("l1t|Global") << "HTT: Pt " << etsum->hwPt() << std::endl;
323  break;
324  }
325 */
326 
327  } //end loop over jet in bx
328  } //end loop over Bx
329 
330  }
331 
332 
333  }
334 
335 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
int m_verbosity
verbosity level
Definition: GtBoard.h:251
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
void resetCalo()
Definition: GtBoard.cc:1075
void GtBoard::receiveMuonObjectData ( edm::Event iEvent,
const edm::InputTag muInputTag,
const bool  receiveMu,
const int  nrL1Mu 
)

Definition at line 339 of file GtBoard.cc.

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

341  {
342 
343  if (m_verbosity) {
344  LogDebug("l1t|Global")
345  << "\n**** GtBoard receiving muon data = "
346  << "\n from input tag " << muInputTag << "\n"
347  << std::endl;
348  }
349 
350  resetMu();
351 
352  // get data from Global Muon Trigger
353  if (receiveMu) {
355  iEvent.getByLabel(muInputTag, muonData);
356 
357  if (!muonData.isValid()) {
358  if (m_verbosity) {
359  edm::LogWarning("l1t|Global")
360  << "\nWarning: BXVector<l1t::Muon> with input tag "
361  << muInputTag
362  << "\nrequested in configuration, but not found in the event.\n"
363  << std::endl;
364  }
365  } else {
366  // bx in muon data
367  for(int i = muonData->getFirstBX(); i <= muonData->getLastBX(); ++i) {
368 
369  //Loop over Muons in this bx
370  for(std::vector<l1t::Muon>::const_iterator mu = muonData->begin(i); mu != muonData->end(i); ++mu) {
371 
372  (*m_candL1Mu).push_back(i,&(*mu));
373  LogDebug("l1t|Global") << "Muon Pt " << mu->hwPt() << " Eta " << mu->hwEta() << " Phi " << mu->hwPhi() << " Qual " << mu->hwQual() <<" Iso " << mu->hwIso() << std::endl;
374  } //end loop over muons in bx
375  } //end loop over bx
376 
377  } //end if over valid muon data
378 
379  } //end if ReveiveMuon data
380 
381  if (m_verbosity && m_isDebugEnabled) {
382 // *** Needs fixing
383 // printGmtData(iBxInEvent);
384  }
385 
386 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
void resetMu()
Definition: GtBoard.cc:1067
int m_verbosity
verbosity level
Definition: GtBoard.h:251
bool m_isDebugEnabled
Definition: GtBoard.h:252
const int mu
Definition: Constants.h:22
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
void GtBoard::reset ( void  )

clear uGT

Definition at line 1051 of file GtBoard.cc.

1051  {
1052 
1053  resetMu();
1054  resetCalo();
1055 
1056  m_uGtAlgBlk.reset();
1057  m_uGtExtBlk.reset();
1058 
1059  m_gtlDecisionWord.reset();
1060  m_gtlAlgorithmOR.reset();
1061 
1062 
1063 
1064 }
GlobalExtBlk m_uGtExtBlk
Definition: GtBoard.h:242
void resetMu()
Definition: GtBoard.cc:1067
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlAlgorithmOR
Definition: GtBoard.h:238
GlobalAlgBlk m_uGtAlgBlk
Definition: GtBoard.h:241
void reset()
reset the content of a GlobalExtBlk
Definition: GlobalExtBlk.cc:92
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlDecisionWord
Definition: GtBoard.h:239
void reset()
reset the content of a GlobalAlgBlk
void resetCalo()
Definition: GtBoard.cc:1075
void GtBoard::resetCalo ( )

Definition at line 1075 of file GtBoard.cc.

1075  {
1076 
1077  m_candL1EG->clear();
1078  m_candL1Tau->clear();
1079  m_candL1Jet->clear();
1080  m_candL1EtSum->clear();
1081 
1082  m_candL1EG->setBXRange( m_bxFirst_, m_bxLast_ );
1083  m_candL1Tau->setBXRange( m_bxFirst_, m_bxLast_ );
1084  m_candL1Jet->setBXRange( m_bxFirst_, m_bxLast_ );
1085  m_candL1EtSum->setBXRange( m_bxFirst_, m_bxLast_ );
1086 
1087 }
int m_bxFirst_
Definition: GtBoard.h:235
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GtBoard.h:228
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GtBoard.h:225
int m_bxLast_
Definition: GtBoard.h:236
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GtBoard.h:226
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GtBoard.h:227
void GtBoard::resetMu ( )

Definition at line 1067 of file GtBoard.cc.

1067  {
1068 
1069  m_candL1Mu->clear();
1070  m_candL1Mu->setBXRange( m_bxFirst_, m_bxLast_ );
1071 
1072 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GtBoard.h:224
int m_bxFirst_
Definition: GtBoard.h:235
int m_bxLast_
Definition: GtBoard.h:236
void GtBoard::runFDL ( edm::Event iEvent,
const int  iBxInEvent,
const bool  algorithmTriggersUnprescaled,
const bool  algorithmTriggersUnmasked 
)

run the uGT FDL (Apply Prescales and Veto)

if we are masking.

Definition at line 898 of file GtBoard.cc.

References LogDebug.

901  {
902 
903 
904  if (m_verbosity) {
905  LogDebug("l1t|Global")
906  << "\n**** GtBoard apply Final Decision Logic "
907  << std::endl;
908 
909  }
910 
911 /* Nothing with prescales right now.
912  // prescale counters are reset at the beginning of the luminosity segment
913  if (m_firstEv) {
914 
915  m_firstEv = false;
916  }
917 
918  // TODO FIXME find the beginning of the luminosity segment
919  if (m_firstEvLumiSegment) {
920 
921  m_firstEvLumiSegment = false;
922 
923  }
924 */
925 
926  // Copy Algorithm bits to Prescaled word
927  // Prescaling and Masking done below if requested.
929 
930 
931  // -------------------------------------------
932  // Apply Prescales or skip if turned off
933  // -------------------------------------------
934  if (!algorithmTriggersUnprescaled){
935 /*
936  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
937 
938  if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
939 
940  bool bitValue = algoDecisionWord.at( iBit );
941  if (bitValue) {
942 
943  (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit))--;
944  if (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) == 0) {
945 
946  // bit already true in algoDecisionWord, just reset counter
947  m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) =
948  prescaleFactorsAlgoTrig.at(iBit);
949  } else {
950 
951  // change bit to false in prescaled word and final decision word
952  algoDecisionWord[iBit] = false;
953 
954  } //if Prescale counter reached zero
955  } //if algo bit is set true
956  } //if prescale factor is not 1 (ie. no prescale)
957  } //loop over alg bits
958 */
960 
961  } else {
962 
963  // Since not Prescaling just take OR of Initial Work
965 
966  }//if we are going to apply prescales.
967 
968 
969 
970  // Copy Algorithm bits fron Prescaled word to Final Word
971  // Masking done below if requested.
973 
974  if(!algorithmTriggersUnmasked) {
975 
976 
977 /*
978  masking the bits goes here.
979 */
981 
982  } else {
983 
985 
986  }
987 
988 
989 
990 }
#define LogDebug(id)
int m_verbosity
verbosity level
Definition: GtBoard.h:251
GlobalAlgBlk m_uGtAlgBlk
Definition: GtBoard.h:241
bool m_algFinalOr
Definition: GtBoard.h:257
void copyPrescaledToFinal()
Definition: GlobalAlgBlk.h:67
bool m_algInitialOr
Definition: GtBoard.h:255
void copyInitialToPrescaled()
Copy vectors words.
Definition: GlobalAlgBlk.h:66
bool m_algPrescaledOr
Definition: GtBoard.h:256
void GtBoard::runGTL ( edm::Event iEvent,
const edm::EventSetup evSetup,
const bool  produceL1GtObjectMapRecord,
const int  iBxInEvent,
std::auto_ptr< L1GlobalTriggerObjectMapRecord > &  gtObjectMapRecord,
const unsigned int  numberPhysTriggers,
const int  nrL1Mu,
const int  nrL1EG,
const int  nrL1Tau,
const int  nrL1Jet,
const int  nrL1JetCounts 
)

run the uGT GTL (Conditions and Algorithms)

DMP Start debugging here

Definition at line 389 of file GtBoard.cc.

References l1t::CondCalo, l1t::CondCorrelation, l1t::CondEnergySum, l1t::CondExternal, l1t::CondMuon, l1t::CondNull, l1t::AlgorithmEvaluation::evaluateAlgorithm(), l1t::ConditionEvaluation::evaluateConditionStoreResult(), edm::EventSetup::get(), l1t::AlgorithmEvaluation::gtAlgoCombinationVector(), l1t::AlgorithmEvaluation::gtAlgoResult(), l1CaloGeometry_cfi::l1CaloGeometry, LogDebug, LogTrace, l1t::AlgorithmEvaluation::operandTokenVector(), reco::print(), l1t::MuCondition::print(), l1t::CaloCondition::print(), L1GlobalTriggerObjectMap::print(), l1t::AlgorithmEvaluation::print(), edm::ESHandle< class >::product(), L1GlobalTriggerObjectMap::setAlgoBitNumber(), L1GlobalTriggerObjectMap::setAlgoGtlResult(), L1GlobalTriggerObjectMap::setAlgoName(), l1t::ConditionEvaluation::setVerbosity(), L1GlobalTriggerObjectMap::swapCombinationVector(), and L1GlobalTriggerObjectMap::swapOperandTokenVector().

399  {
400 
401 
402  // get / update the trigger menu from the EventSetup
403  // local cache & check on cacheIdentifier
404  unsigned long long l1GtMenuCacheID = evSetup.get<L1TGlobalTriggerMenuRcd>().cacheIdentifier();
405 
406  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
407 
409  evSetup.get< L1TGlobalTriggerMenuRcd>().get(l1GtMenu) ;
410  m_l1GtMenu = l1GtMenu.product();
411  (const_cast<TriggerMenu*>(m_l1GtMenu))->buildGtConditionMap();
412 
413  m_l1GtMenuCacheID = l1GtMenuCacheID;
414  }
415 
416  const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->gtConditionMap();
417  const AlgorithmMap& algorithmMap = m_l1GtMenu->gtAlgorithmMap();
418 
419  // Reset AlgBlk for this bx
420  m_uGtAlgBlk.reset();
421  m_uGtExtBlk.reset();
422  m_algInitialOr=false;
423  m_algPrescaledOr=false;
424  m_algFinalOr=false;
425 
426 
427  /*
428  const std::vector<std::vector<MuonTemplate> >& corrMuon =
429  m_l1GtMenu->corMuonTemplate();
430 
431  // Comment out for now
432  const std::vector<std::vector<CaloTemplate> >& corrCalo =
433  m_l1GtMenu->corCaloTemplate();
434 
435  const std::vector<std::vector<L1GtEnergySumTemplate> >& corrEnergySum =
436  m_l1GtMenu->corEnergySumTemplate();
437 
438  LogDebug("l1t|Global") << "Size corrMuon " << corrMuon.size()
439  << "\nSize corrCalo " << corrCalo.size()
440  << "\nSize corrSums " << corrEnergySum.size() << std::endl;
441  */
442 
443  // conversion needed for correlation conditions
444  // done in the condition loop when the first correlation template is in the menu
445  bool convertScale = false;
446 
447  // get / update the calorimeter geometry from the EventSetup
448  // local cache & check on cacheIdentifier
449  unsigned long long l1CaloGeometryCacheID =
450  evSetup.get<L1CaloGeometryRecord>().cacheIdentifier();
451 
452 
453  if (m_l1CaloGeometryCacheID != l1CaloGeometryCacheID) {
454 
456  evSetup.get<L1CaloGeometryRecord>().get(l1CaloGeometry) ;
457  m_l1CaloGeometry = l1CaloGeometry.product();
458 
459  m_l1CaloGeometryCacheID = l1CaloGeometryCacheID;
460  convertScale = true;
461 
462  }
463 
464  // get / update the eta and phi muon trigger scales from the EventSetup
465  // local cache & check on cacheIdentifier
466  unsigned long long l1MuTriggerScalesCacheID =
467  evSetup.get<L1MuTriggerScalesRcd>().cacheIdentifier();
468 
469  if (m_l1MuTriggerScalesCacheID != l1MuTriggerScalesCacheID) {
470 
471  edm::ESHandle< L1MuTriggerScales> l1MuTriggerScales;
472  evSetup.get< L1MuTriggerScalesRcd>().get(l1MuTriggerScales);
473  m_l1MuTriggerScales = l1MuTriggerScales.product();
474 
475  m_l1MuTriggerScalesCacheID = l1MuTriggerScalesCacheID;
476  convertScale = true;
477  }
478 
479  if (convertScale) {
480 
481 /* Comment out for now
482  m_gtEtaPhiConversions->setVerbosity(m_verbosity);
483  m_gtEtaPhiConversions->convertL1Scales(m_l1CaloGeometry,
484  m_l1MuTriggerScales, ifCaloEtaNumberBits, ifMuEtaNumberBits);
485 
486  // print the conversions if DEBUG and verbosity enabled
487 
488  if (m_verbosity && m_isDebugEnabled) {
489  std::ostringstream myCout;
490  m_gtEtaPhiConversions->print(myCout);
491 
492  LogTrace("l1t|Global") << myCout.str() << std::endl;
493  }
494 
495  // set convertScale to false to avoid executing the conversion
496  // more than once - in case the scales change it will be set to true
497  // in the cache check
498 */
499  convertScale = false;
500  }
501 
502 
503  // loop over condition maps (one map per condition chip)
504  // then loop over conditions in the map
505  // save the results in temporary maps
506 
507  // never happens in production but at first event...
508  if (m_conditionResultMaps.size() != conditionMap.size()) {
509  m_conditionResultMaps.clear();
510  m_conditionResultMaps.resize(conditionMap.size());
511  }
512 
513  int iChip = -1;
514 
515  for (std::vector<ConditionMap>::const_iterator
516  itCondOnChip = conditionMap.begin(); itCondOnChip != conditionMap.end(); itCondOnChip++) {
517 
518  iChip++;
519 
520 // blw was this commented out before?
521  //AlgorithmEvaluation::ConditionEvaluationMap cMapResults;
522  // AlgorithmEvaluation::ConditionEvaluationMap cMapResults((*itCondOnChip).size()); // hash map
523 
525  m_conditionResultMaps[iChip];
526 
527 
528 
529  for (CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
530 
531  // evaluate condition
532  switch ((itCond->second)->condCategory()) {
533  case CondMuon: {
534 
535  // BLW Not sure what to do with this for now
536  const int ifMuEtaNumberBits = 0;
537 
538  MuCondition* muCondition = new MuCondition(itCond->second, this,
539  nrL1Mu, ifMuEtaNumberBits);
540 
541  muCondition->setVerbosity(m_verbosity);
542  // BLW Comment out for now
543  // muCondition->setGtCorrParDeltaPhiNrBins(
544  // (m_gtEtaPhiConversions->gtObjectNrBinsPhi(Mu)) / 2
545  // + 1);
546  // BLW Need to pass the bx we are working on.
547  muCondition->evaluateConditionStoreResult(iBxInEvent);
548 
549  // BLW COmment out for now
550  cMapResults[itCond->first] = muCondition;
551 
552  if (m_verbosity && m_isDebugEnabled) {
553  std::ostringstream myCout;
554  muCondition->print(myCout);
555 
556  LogTrace("l1t|Global") << myCout.str() << std::endl;
557  }
558  //delete muCondition;
559 
560  }
561  break;
562  case CondCalo: {
563 
564  // BLW Not sure w hat to do with this for now
565  const int ifCaloEtaNumberBits = 0;
566 
567  CaloCondition* caloCondition = new CaloCondition(
568  itCond->second, this,
569  nrL1EG,
570  nrL1Jet,
571  nrL1Tau,
572  ifCaloEtaNumberBits);
573 
574  caloCondition->setVerbosity(m_verbosity);
575 
576  // BLW COmment out for Now
577  //caloCondition->setGtCorrParDeltaPhiNrBins(
578  // (m_gtEtaPhiConversions->gtObjectNrBinsPhi(
579  // ((itCond->second)->objectType())[0])) / 2
580  // + 1);
581  caloCondition->evaluateConditionStoreResult(iBxInEvent);
582 
583  // BLW Comment out for now
584  cMapResults[itCond->first] = caloCondition;
585 
586  if (m_verbosity && m_isDebugEnabled) {
587  std::ostringstream myCout;
588  caloCondition->print(myCout);
589 
590  LogTrace("l1t|Global") << myCout.str() << std::endl;
591  }
592  // delete caloCondition;
593 
594  }
595  break;
596  case CondEnergySum: {
597 
598 /* Don't access conditions for now
599  L1GtEnergySumCondition* eSumCondition = new L1GtEnergySumCondition(
600  itCond->second, this);
601 
602  eSumCondition->setVerbosity(m_verbosity);
603  eSumCondition->evaluateConditionStoreResult();
604 
605  cMapResults[itCond->first] = eSumCondition;
606 
607  if (m_verbosity && m_isDebugEnabled) {
608  std::ostringstream myCout;
609  eSumCondition->print(myCout);
610 
611  LogTrace("l1t|Global") << myCout.str() << std::endl;
612  }
613  // delete eSumCondition;
614 
615  }
616  break;
617  case CondJetCounts: {
618  L1GtJetCountsCondition* jcCondition = new L1GtJetCountsCondition(
619  itCond->second, this, nrL1JetCounts);
620 
621  jcCondition->setVerbosity(m_verbosity);
622  jcCondition->evaluateConditionStoreResult();
623 
624  cMapResults[itCond->first] = jcCondition;
625 
626  if (m_verbosity && m_isDebugEnabled) {
627  std::ostringstream myCout;
628  jcCondition->print(myCout);
629 
630  LogTrace("l1t|Global") << myCout.str() << std::endl;
631  }
632 
633  // delete jcCondition;
634 */
635  }
636  break;
637  case CondExternal: {
638 
639  /* Don't access conditions for now
640  bool externalCondResult = true;
641 
642  // FIXME need a solution to read External with real value
643 
644  L1GtExternalCondition* externalCondition = new L1GtExternalCondition(
645  itCond->second, externalCondResult);
646 
647  externalCondition->setVerbosity(m_verbosity);
648  externalCondition->evaluateConditionStoreResult();
649 
650  cMapResults[itCond->first] = externalCondition;
651 
652  if (m_verbosity && m_isDebugEnabled) {
653  std::ostringstream myCout;
654  externalCondition->print(myCout);
655 
656  LogTrace("l1t|Global") << myCout.str() << std::endl;
657  }
658 
659  // delete externalCondition;
660 */
661  }
662  break;
663  case CondCorrelation: {
664 
665 
666 /* Don't access conditions for now
667  // get first the sub-conditions
668  const L1GtCorrelationTemplate* corrTemplate =
669  static_cast<const L1GtCorrelationTemplate*>(itCond->second);
670  const L1GtConditionCategory cond0Categ = corrTemplate->cond0Category();
671  const L1GtConditionCategory cond1Categ = corrTemplate->cond1Category();
672  const int cond0Ind = corrTemplate->cond0Index();
673  const int cond1Ind = corrTemplate->cond1Index();
674 
675  const L1GtCondition* cond0Condition = 0;
676  const L1GtCondition* cond1Condition = 0;
677 
678  // maximum number of objects received for evaluation of l1t::Type1s condition
679  int cond0NrL1Objects = 0;
680  int cond1NrL1Objects = 0;
681 
682  int cond0EtaBits = 0;
683  int cond1EtaBits = 0;
684 
685  switch (cond0Categ) {
686  case CondMuon: {
687  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
688  cond0NrL1Objects = nrL1Mu;
689  cond0EtaBits = ifMuEtaNumberBits;
690  }
691  break;
692  case CondCalo: {
693  cond0Condition = &((corrCalo[iChip])[cond0Ind]);
694 
695  switch ((cond0Condition->objectType())[0]) {
696  case NoIsoEG:
697  cond0NrL1Objects= nrL1NoIsoEG;
698  break;
699  case IsoEG:
700  cond0NrL1Objects = nrL1IsoEG;
701  break;
702  case CenJet:
703  cond0NrL1Objects = nrL1CenJet;
704  break;
705  case ForJet:
706  cond0NrL1Objects = nrL1ForJet;
707  break;
708  case TauJet:
709  cond0NrL1Objects = nrL1TauJet;
710  break;
711  default:
712  cond0NrL1Objects = 0;
713  break;
714  }
715 
716  cond0EtaBits = ifCaloEtaNumberBits;
717  }
718  break;
719  case CondEnergySum: {
720  cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
721  cond0NrL1Objects = 1;
722  }
723  break;
724  default: {
725  // do nothing, should not arrive here
726  }
727  break;
728  }
729 
730  switch (cond1Categ) {
731  case CondMuon: {
732  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
733  cond1NrL1Objects = nrL1Mu;
734  cond1EtaBits = ifMuEtaNumberBits;
735  }
736  break;
737  case CondCalo: {
738  cond1Condition = &((corrCalo[iChip])[cond1Ind]);
739 
740  switch ((cond1Condition->objectType())[0]) {
741  case NoIsoEG:
742  cond1NrL1Objects= nrL1NoIsoEG;
743  break;
744  case IsoEG:
745  cond1NrL1Objects = nrL1IsoEG;
746  break;
747  case CenJet:
748  cond1NrL1Objects = nrL1CenJet;
749  break;
750  case ForJet:
751  cond1NrL1Objects = nrL1ForJet;
752  break;
753  case TauJet:
754  cond1NrL1Objects = nrL1TauJet;
755  break;
756  default:
757  cond1NrL1Objects = 0;
758  break;
759  }
760 
761  cond1EtaBits = ifCaloEtaNumberBits;
762  }
763  break;
764  case CondEnergySum: {
765  cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
766  cond1NrL1Objects = 1;
767  }
768  break;
769  default: {
770  // do nothing, should not arrive here
771  }
772  break;
773  }
774 
775  L1GtCorrelationCondition* correlationCond =
776  new L1GtCorrelationCondition(itCond->second,
777  cond0Condition, cond1Condition,
778  cond0NrL1Objects, cond1NrL1Objects,
779  cond0EtaBits, cond1EtaBits,
780  this, this, m_gtEtaPhiConversions);
781 
782  correlationCond->setVerbosity(m_verbosity);
783  correlationCond->evaluateConditionStoreResult();
784 
785  cMapResults[itCond->first] = correlationCond;
786 
787  if (m_verbosity && m_isDebugEnabled) {
788  std::ostringstream myCout;
789  correlationCond->print(myCout);
790 
791  LogTrace("l1t|Global") << myCout.str() << std::endl;
792  }
793 
794  // delete correlationCond;
795 */
796  }
797  break;
798  case CondNull: {
799 
800  // do nothing
801 
802  }
803  break;
804  default: {
805 
806  // do nothing
807 
808  }
809  break;
810  }
811 
812  }
813 
814  }
815 
816  // loop over algorithm map
818  // empty vector for object maps - filled during loop
819  std::vector<L1GlobalTriggerObjectMap> objMapVec;
820  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) objMapVec.reserve(numberPhysTriggers);
821 
822  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
823  AlgorithmEvaluation gtAlg(itAlgo->second);
824  gtAlg.evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
825 
826  int algBitNumber = (itAlgo->second).algoBitNumber();
827  bool algResult = gtAlg.gtAlgoResult();
828 
829  LogDebug("l1t|Global") << " ===> for iBxInEvent = " << iBxInEvent << ":\t algBitName = " << itAlgo->first << ",\t algBitNumber = " << algBitNumber << ",\t algResult = " << algResult << std::endl;
830 
831  if (algResult) {
832 // m_gtlAlgorithmOR.set(algBitNumber);
833  m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber,algResult);
834  m_algInitialOr = true;
835  }
836 
837  if (m_verbosity && m_isDebugEnabled) {
838  std::ostringstream myCout;
839  ( itAlgo->second ).print(myCout);
840  gtAlg.print(myCout);
841 
842  LogTrace("l1t|Global") << myCout.str() << std::endl;
843  }
844 
845 
846  // object maps only for BxInEvent = 0
847  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
848 
849  // set object map
851 
852  objMap.setAlgoName(itAlgo->first);
853  objMap.setAlgoBitNumber(algBitNumber);
854  objMap.setAlgoGtlResult(algResult);
855  objMap.swapOperandTokenVector(gtAlg.operandTokenVector());
856  objMap.swapCombinationVector(gtAlg.gtAlgoCombinationVector());
857  // gtAlg is empty now...
858 
859  if (m_verbosity && m_isDebugEnabled) {
860  std::ostringstream myCout1;
861  objMap.print(myCout1);
862 
863  LogTrace("l1t|Global") << myCout1.str() << std::endl;
864  }
865 
866  objMapVec.push_back(objMap);
867 
868  }
869 
870 
871  }
872 
873  // object maps only for BxInEvent = 0
874  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
875  gtObjectMapRecord->swapGtObjectMap(objMapVec);
876  }
877 
878  // loop over condition maps (one map per condition chip)
879  // then loop over conditions in the map
880  // delete the conditions created with new, zero pointer, do not clear map, keep the vector as is...
881  for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator
882  itCondOnChip = m_conditionResultMaps.begin();
883  itCondOnChip != m_conditionResultMaps.end(); itCondOnChip++) {
884 
886  itCond = itCondOnChip->begin();
887  itCond != itCondOnChip->end(); itCond++) {
888 
889  delete itCond->second;
890  itCond->second = 0;
891  }
892  }
893 
894 }
#define LogDebug(id)
GlobalExtBlk m_uGtExtBlk
Definition: GtBoard.h:242
const L1CaloGeometry * m_l1CaloGeometry
Definition: GtBoard.h:213
std::vector< AlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: GtBoard.h:245
int m_verbosity
verbosity level
Definition: GtBoard.h:251
GlobalAlgBlk m_uGtAlgBlk
Definition: GtBoard.h:241
void reset()
reset the content of a GlobalExtBlk
Definition: GlobalExtBlk.cc:92
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
void setAlgoName(const std::string &algoNameValue)
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:8
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
__gnu_cxx::hash_map< std::string, ConditionEvaluation * > ConditionEvaluationMap
copy constructor
void swapOperandTokenVector(std::vector< L1GtLogicParser::OperandToken > &operandTokenVectorValue)
const L1MuTriggerScales * m_l1MuTriggerScales
Definition: GtBoard.h:216
ConditionEvaluationMap::iterator ItEvalMap
bool m_algFinalOr
Definition: GtBoard.h:257
const TriggerMenu * m_l1GtMenu
Definition: GtBoard.h:209
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GtBoard.h:217
bool m_isDebugEnabled
Definition: GtBoard.h:252
bool m_algInitialOr
Definition: GtBoard.h:255
void reset()
reset the content of a GlobalAlgBlk
void print(std::ostream &myCout) const
print the full object map
const l1t::AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: TriggerMenu.h:239
const std::vector< l1t::ConditionMap > & gtConditionMap() const
get / set / build the condition maps
Definition: TriggerMenu.h:82
#define LogTrace(id)
void setAlgoGtlResult(bool algoGtlResultValue)
unsigned long long m_l1GtMenuCacheID
Definition: GtBoard.h:210
void setAlgoDecisionInitial(int bit, bool val)
Set decision bits.
Definition: GlobalAlgBlk.cc:83
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
bool m_algPrescaledOr
Definition: GtBoard.h:256
void setAlgoBitNumber(int algoBitNumberValue)
unsigned long long m_l1CaloGeometryCacheID
Definition: GtBoard.h:214
void GtBoard::setBxFirst ( int  bx)

Definition at line 135 of file GtBoard.cc.

References rpc-layouts::bx.

135  {
136 
137  m_bxFirst_ = bx;
138 
139 }
int m_bxFirst_
Definition: GtBoard.h:235
string bx
Definition: rpc-layouts.py:13
void GtBoard::setBxLast ( int  bx)

Definition at line 141 of file GtBoard.cc.

References rpc-layouts::bx.

141  {
142 
143  m_bxLast_ = bx;
144 
145 }
int m_bxLast_
Definition: GtBoard.h:236
string bx
Definition: rpc-layouts.py:13
void l1t::GtBoard::setVerbosity ( const int  verbosity)
inline

Member Data Documentation

bool l1t::GtBoard::m_algFinalOr
private

Definition at line 257 of file GtBoard.h.

bool l1t::GtBoard::m_algInitialOr
private

Definition at line 255 of file GtBoard.h.

bool l1t::GtBoard::m_algPrescaledOr
private

Definition at line 256 of file GtBoard.h.

unsigned int l1t::GtBoard::m_boardEventCount
private

Definition at line 260 of file GtBoard.h.

Referenced by GtBoard().

int l1t::GtBoard::m_bxFirst_
private

Definition at line 235 of file GtBoard.h.

int l1t::GtBoard::m_bxLast_
private

Definition at line 236 of file GtBoard.h.

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

Definition at line 225 of file GtBoard.h.

Referenced by getCandL1EG().

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

Definition at line 228 of file GtBoard.h.

Referenced by getCandL1EtSum().

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

Definition at line 227 of file GtBoard.h.

Referenced by getCandL1Jet().

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

Definition at line 224 of file GtBoard.h.

Referenced by getCandL1Mu().

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

Definition at line 226 of file GtBoard.h.

Referenced by getCandL1Tau().

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

Definition at line 245 of file GtBoard.h.

L1GtEtaPhiConversions* l1t::GtBoard::m_gtEtaPhiConversions
private

Definition at line 220 of file GtBoard.h.

std::bitset<L1GlobalTriggerReadoutSetup::NumberPhysTriggers> l1t::GtBoard::m_gtlAlgorithmOR
private

Definition at line 238 of file GtBoard.h.

Referenced by getAlgorithmOR(), and GtBoard().

std::bitset<L1GlobalTriggerReadoutSetup::NumberPhysTriggers> l1t::GtBoard::m_gtlDecisionWord
private

Definition at line 239 of file GtBoard.h.

Referenced by getDecisionWord(), and GtBoard().

bool l1t::GtBoard::m_isDebugEnabled
private

Definition at line 252 of file GtBoard.h.

const L1CaloGeometry* l1t::GtBoard::m_l1CaloGeometry
private

Definition at line 213 of file GtBoard.h.

unsigned long long l1t::GtBoard::m_l1CaloGeometryCacheID
private

Definition at line 214 of file GtBoard.h.

Referenced by GtBoard().

const TriggerMenu* l1t::GtBoard::m_l1GtMenu
private

Definition at line 209 of file GtBoard.h.

unsigned long long l1t::GtBoard::m_l1GtMenuCacheID
private

Definition at line 210 of file GtBoard.h.

Referenced by GtBoard().

const L1MuTriggerScales* l1t::GtBoard::m_l1MuTriggerScales
private

Definition at line 216 of file GtBoard.h.

unsigned long long l1t::GtBoard::m_l1MuTriggerScalesCacheID
private

Definition at line 217 of file GtBoard.h.

Referenced by GtBoard().

GlobalAlgBlk l1t::GtBoard::m_uGtAlgBlk
private

Definition at line 241 of file GtBoard.h.

Referenced by GtBoard().

int l1t::GtBoard::m_uGtBoardNumber
private

Definition at line 263 of file GtBoard.h.

Referenced by GtBoard().

GlobalExtBlk l1t::GtBoard::m_uGtExtBlk
private

Definition at line 242 of file GtBoard.h.

Referenced by GtBoard().

bool l1t::GtBoard::m_uGtFinalBoard
private

Definition at line 264 of file GtBoard.h.

Referenced by GtBoard().

int l1t::GtBoard::m_verbosity
private

verbosity level

Definition at line 251 of file GtBoard.h.

Referenced by setVerbosity().