ATLAS Offline Software
Loading...
Searching...
No Matches
TrigDecisionChecker.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
7
9
10// EDM
13
17
19
20// Muon includes
24
25// include these tau navigation check
27//#include "TrigCaloEvent/TrigTauCluster.h"
28#include "tauEvent/TauJet.h"
33
41
42// bjet includes
44#include "xAODTracking/Vertex.h"
49
55
57
58#include "CxxUtils/crc64.h"
59
61
66
67
68#include <cmath>
69#include <algorithm>
70#include <iostream>
71#include <iomanip>
72
73TrigDecisionChecker::TrigDecisionChecker(const std::string &name, ISvcLocator *pSvcLocator)
74: AthAlgorithm(name, pSvcLocator),
75 m_first_event(true)
76{
77
78
79}
80
81
83
84
86{
87 // reset event counters
88 m_first_event=true;
90 m_muSum=0.0;
91
92 // Reset keys
93
94 // print out properties
95 ATH_MSG_INFO("Initializing...");
96 ATH_MSG_INFO("MonitoredChains: " << m_countSigNames);
97 //ATH_MSG_INFO("MonitoredTauItem: " << m_tauItem);
98 ATH_MSG_INFO("MonitoringBlock: " << m_monitoringBlockSize);
99 if (not m_printoutFileName.empty()) {
100 ATH_MSG_INFO("PrintOutFilename: " << m_printoutFileName);
101 }
102
103 // get handle to TrigDecisionTool
104 ATH_CHECK(m_trigDec.retrieve());
105
106 // reserve space for vectors
107 m_summary.reserve(700);
108 m_summaryChainPassRaw.reserve(700);
109 m_summaryChainPassRaw.reserve(700);
110 m_summaryChainPT.reserve(700);
111 m_summaryChainPS.reserve(700);
112 m_summaryPassRaw.reserve(700);
113 m_summaryPass.reserve(700);
114 m_summaryPassPhys.reserve(700);
115 m_chainPrescales.reserve(700);
116 m_chainPrescalesCalculated.reserve(700);
117 m_chain_passthrough.reserve(700);
119 m_lower_chain_accept.reserve(700);
120
121 // initialize vectors for chains to monitor
122 ATH_MSG_INFO("Monitoring number of events passing these chains (blocks of "
123 << m_monitoringBlockSize << " events):");
124 for (unsigned int i=0; i < m_countSigNames.size(); ++i) {
125 ATH_MSG_INFO("Initializing monitoring counters for " << m_countSigNames[i]);
126 m_countSigs.push_back(new std::vector<int>());
127 m_runCountSigs.push_back(0);
128 }
129
130
131 ATH_MSG_INFO("Initialization successful");
132
133 return StatusCode::SUCCESS;
134}
135
136
138{
139
140 // print summary of trigger decisions for each level
141 msg(MSG::INFO) << "==========================================================" << endmsg;
142 msg(MSG::INFO) << "TrigDecisionTool summary:" << endmsg;
143 msg(MSG::INFO) << "==========================================================" << endmsg;
144
145 // LVL1
146 std::map<std::string,int>::iterator itL1,itL1End=m_L1Summary.end();
147 for ( itL1=m_L1Summary.begin(); itL1!=itL1End; ++itL1 ) {
148 msg(MSG::INFO) << "REGTEST item " << (*itL1).first << " accepted events=" << (*itL1).second << endmsg;
149 }
150
151 // HLT
152 for ( unsigned int i=0; i<m_summary.size(); ++i) {
153 msg(MSG::INFO) << "REGTEST chain " << m_summary[i] << " accepted events= " << m_summaryPassPhys[i]
154 <<" ( PS: " << m_summaryChainPS[i] << " , PT: " << m_summaryChainPT[i] << ")" << endmsg;
155 }
156
157 // print out nr. of events passed in blocks of N events for specific chains (configurable)
158 ATH_MSG_INFO(" ");
159 ATH_MSG_INFO("TrigDecisionTool tests: monitored chain efficiency");
160 ATH_MSG_INFO("==================================================");
161 msg(MSG::INFO) << "REGTEST Nr.events: ";
162 for (unsigned int k=0; k<m_countEvent.size();++k) {
163 msg() << m_countEvent[k] << " ";
164 }
165 msg() << endmsg;
166 for (unsigned int i=0; i<m_countSigNames.size();++i) {
167 msg(MSG::INFO) << "REGTEST " << m_countSigNames[i] << " : ";
168 for (unsigned int j=0; j<(m_countSigs[i])->size();++j) {
169 msg() << (*m_countSigs[i])[j] << " ";
170 }
171 msg() << endmsg;
172 }
173
174 // compare prescale and passthrough fractions from configuration and by counting events
175 ATH_MSG_INFO(" ");
176 ATH_MSG_INFO("TrigDecisionTool tests: chain prescale/passthrough ");
177 ATH_MSG_INFO("==================================================");
178 // HLT
179 msg(MSG::INFO) << "REGTEST Chain (passed raw) PS(conf) PS(counts) PT(conf) PT(counts) (Lower chain)";
180 for ( unsigned int i=0; i<m_summary.size(); ++i) {
181 if (m_lower_chain_accept[i]!=0) {
182 msg(MSG::INFO) << "REGTEST " << m_summary[i] << " (" << m_summaryChainPT[i] << ") \t"
183 << " \t" << m_chainPrescales[i] << " \t" << m_chainPrescalesCalculated[i]
184 << " \t" << m_chain_passthrough[i] << " \t" << m_chain_passthrough_calculated[i]
185 << " (" << m_lower_chain_accept[i] << ")" << endmsg;
186 } else {
187 msg(MSG::INFO) << "REGTEST " << m_summary[i] << " (" << m_summaryChainPT[i] << ") \t"
188 << " \t" << m_chainPrescales[i] << " --- "
189 << " \t" << m_chain_passthrough[i] << " --- "
190 << " (lower chain passed no events)" << endmsg;
191 }
192 }
193 ATH_MSG_INFO("REGTEST ran on " << m_eventNumber << " events");
194 ATH_MSG_INFO("Average mu value " << m_muSum/float(m_eventNumber));
195
196 // open output file and write out counts
197 if (not m_printoutFileName.empty()) {
198 ATH_MSG_INFO("==================================================");
199 ATH_MSG_INFO("Opening " << m_printoutFileName << " for writing trigger counts");
200 std::ofstream printoutFile(m_printoutFileName);
201
202 /*
203 m_L1Summary - isPassed for L[1
204 m_summaryChainPassRaw - chainPassedRaw for HLT
205 m_summaryPass - chain Passed for HLT
206 m_summaryPassPhys - chain Physics Passed for HLT
207 m_summaryChainPS - chainPassedRaw && !isPrescaled for HLT
208 m_summaryChainPT - (chainPassedRaw && !isPrescaled) || isPassedThrough for HLT
209 */
210
211 printoutFile << std::setiosflags(std::ios::left) << std::setw(25) << "* L1 item"
212 << std::setw(15) << " #Passed " << std::endl;
213 std::map<std::string,int>::iterator l1,l1End=m_L1Summary.end();
214 for ( l1=m_L1Summary.begin(); l1!=l1End; ++l1 ) {
215 printoutFile << std::setiosflags(std::ios::left) << (*l1).first
216 << std::setw(10) << (*l1).second << std::endl;
217 }
218
219 printoutFile << std::setiosflags(std::ios::left) << std::setw(25) << "* Chain name"
220 << std::setw(15) << " #Passed Raw "
221 << std::setw(15) << " #passed "
222 << std::setw(15) << " #Physics Passed "<< std::endl;
223 for ( unsigned int i=0; i<m_summary.size(); ++i) {
224 printoutFile << std::setiosflags(std::ios::left) << std::setw(25) << m_summary[i]
225 << std::setw(15) << m_summaryPassRaw[i]
226 << std::setw(15) << m_summaryPass[i]
227 << std::setw(15) << m_summaryPassPhys[i] << std::endl;
228
229 // std::cout << std::setiosflags(std::ios::dec) << std::setw(6) << i << "|"
230 // << std::setiosflags(std::ios::dec) << std::setw(4) << (*(m_elink_vec[i]))->algorithmId() << "|"
231 // << std::setw(11) << *(m_elink_vec[i]) << "|";
232 }
233 ATH_MSG_INFO("Closing output file " << m_printoutFileName);
234 printoutFile.close();
235 }
236
237 // cleanup newed vectors
238 ATH_MSG_INFO("==================================================");
239 ATH_MSG_INFO("Cleaning up counters...");
240 for (unsigned int i=0; i<m_countSigs.size(); ++i) {
241 delete m_countSigs[i];
242 }
243 ATH_MSG_INFO("Finalised successfully");
244
245 return StatusCode::SUCCESS;
246}
247
249{
251
252 // check mu value
253 const xAOD::EventInfo* eventInfo = nullptr;
254 //#sc = evtStore()->retrieve(eventInfo, m_eventInfoName);
255 StatusCode sc;
256 if (m_eventInfoName == "") {
257 sc=evtStore()->retrieve(eventInfo);
258 } else {
259 sc=evtStore()->retrieve(eventInfo, m_eventInfoName);
260 }
261 if ( sc.isFailure() || !eventInfo )
262 {
263 ATH_MSG_INFO("Container '" << m_eventInfoName << "' could not be retrieved from StoreGate !");
264 sc = StatusCode::SUCCESS;
265 return sc;
266 } else {
267 ATH_MSG_DEBUG("Container '" << m_eventInfoName << "' retrieved from StoreGate");
268 }
269
270 if ( eventInfo ) {
271 float mu = eventInfo->actualInteractionsPerCrossing();
272 float muave = eventInfo->averageInteractionsPerCrossing();
273 msg(MSG::INFO) << "run number " << eventInfo->runNumber() << " event number " << eventInfo->eventNumber() <<
274 " lumi block " << eventInfo->lumiBlock() << endmsg;
275 msg(MSG::INFO) << "mu value " << mu << " average mu value " << muave << " event number " << m_eventNumber << endmsg;
277 }
278
279
280 for(const auto& tauItem : m_TauItems) {
281 ATH_MSG_INFO("Check tau items " << tauItem);
282 sc = checkTauEDM(tauItem);
283 if ( sc.isFailure() ) {
284 msg(MSG::ERROR) << "Could not finish checkTauEDM test for chain " <<tauItem << endmsg;
285 return sc;
286 }
287 if(m_checkBits) {
288 if(checkEDM<xAOD::TauJetContainer>(tauItem).isFailure())
289 ATH_MSG_ERROR("Could not finish checkTauJetEDM test for chain " << tauItem);
290 }
291 }
292
293 for(const auto& muonItem : m_muonItems) {
294 sc = checkMuonEDM(muonItem);
295 if ( sc.isFailure() ) {
296 msg(MSG::ERROR) << "Could not finish checkMuonEDM test for chain " << muonItem << endmsg;
297 return sc;
298 }
299 if(m_checkBits) {
300 if(checkEDM<xAOD::MuonContainer>(muonItem).isFailure())
301 ATH_MSG_ERROR("Could not finish checkMuonEDM test for chain " << muonItem);
302 if(checkEDM<xAOD::L2CombinedMuonContainer>(muonItem).isFailure())
303 ATH_MSG_ERROR("Could not finish checkMuonEDM test for chain " << muonItem);
304 if(checkEDM<xAOD::L2StandAloneMuonContainer>(muonItem).isFailure())
305 ATH_MSG_ERROR("Could not finish checkMuonEDM test for chain " << muonItem);
306 }
307 }
308
309 for(const auto& bjetItem : m_bjetItems) {
310 sc = checkBjetEDM(bjetItem);
311 if ( sc.isFailure() ) {
312 msg(MSG::ERROR) << "Could not finish checkBjetEDM test for chain " << bjetItem << endmsg;
313 return sc;
314 }
315 if(m_checkBits) {
316 if(checkEDM<xAOD::BTaggingContainer>(bjetItem).isFailure())
317 ATH_MSG_ERROR("Could not finish checkBjetEDM test for chain " << bjetItem);
318 }
319 }
320
321 for(const auto& bphysItem : m_bphysItems) {
322 sc = checkBphysEDM(bphysItem);
323 if ( sc.isFailure() ) {
324 msg(MSG::ERROR) << "Could not finish checkBphysEDM test for chain " << bphysItem << endmsg;
325 // return sc; try not to return for other tests to run
326 }
327 if(m_checkBits) {
328 if(checkEDM<xAOD::TrigBphysContainer>(bphysItem).isFailure())
329 ATH_MSG_ERROR("Could not finish checkJetEDM test for chain " << bphysItem);
330 }
331 }
332
333 for(const auto& electronItem : m_electronItems) {
334 ATH_MSG_INFO("Check Electron items " << electronItem);
335 sc = checkElectronEDM(electronItem);
336 if ( sc.isFailure() ) {
337 msg(MSG::ERROR) << "Could not finish checkElectronEDM test for chain " << electronItem << endmsg;
338 }
339 if(m_checkBits) {
340 if(checkEDM<xAOD::ElectronContainer>(electronItem).isFailure())
341 ATH_MSG_ERROR("Could not finish checkElectronEDM test for chain " << electronItem);
342 if(checkEDM<xAOD::CaloClusterContainer>(electronItem).isFailure())
343 ATH_MSG_ERROR("Could not finish checkElectronEDM test for chain " << electronItem);
344 if(checkEDM<xAOD::TrigElectronContainer>(electronItem).isFailure())
345 ATH_MSG_ERROR("Could not finish checkElectronEDM test for chain " << electronItem);
346 }
347 }
348
349 for(const auto& photonItem : m_photonItems) {
350 sc = checkPhotonEDM(photonItem);
351 if ( sc.isFailure() ) {
352 ATH_MSG_ERROR("Could not finish checkPhotonEDM test for chain " << photonItem);
353 }
354 if(m_checkBits) {
355 if(checkEDM<xAOD::PhotonContainer>(photonItem).isFailure())
356 ATH_MSG_ERROR("Could not finish checkPhotonEDM test for chain " << photonItem);
357 if(checkEDM<xAOD::CaloClusterContainer>(photonItem).isFailure())
358 ATH_MSG_ERROR("Could not finish checkPhotonEDM test for chain " << photonItem);
359 }
360 }
361
362 for(const auto& minBiasItem : m_minBiasItems) {
363 sc = checkMinBiasEDM(minBiasItem);
364 if ( sc.isFailure() ) {
365 msg(MSG::ERROR) << "Could not finish checkMinBiasEDM test for chain " << minBiasItem << endmsg;
366 return sc;
367 }
368 }
369
370 ATH_MSG_INFO("REGTEST ==========START of Jet EDM/Navigation check===========");
371 for(const auto& jetItem : m_jetItems) {
372 sc = checkJetEDM(jetItem);
373 if ( sc.isFailure() ) {
374 ATH_MSG_INFO("REGTEST Could not finish checkJetEDM test for chain " << jetItem);
375 return sc;
376 }
377 if(m_checkBits) {
378 if(checkEDM<xAOD::JetContainer>(jetItem).isFailure())
379 ATH_MSG_ERROR("Could not finish checkJetEDM test for chain " << jetItem);
380 }
381 }
382 ATH_MSG_INFO("REGTEST ==========END of Jet EDM/Navigation check===========");
383
384 ATH_MSG_INFO("REGTEST ==========START of Met EDM/Navigation check===========");
385 for(const auto& metItem : m_metItems) {
386 sc = checkMetEDM(metItem);
387 if ( sc.isFailure() ) {
388 ATH_MSG_INFO("REGTEST Could not finish checkMetEDM test for chain " << metItem);
389 return sc;
390 }
391 }
392 ATH_MSG_INFO("REGTEST =========END of Met EDM/Navigation check============");
393
395 msg(MSG::INFO) << "TrigDecisionChecker::execute" << endmsg;
396
397 msg(MSG::INFO) << "Pass state = " << m_trigDec->isPassed("EF_.*") << endmsg;
398 msg(MSG::INFO) << "Pass state L1 = " << m_trigDec->isPassed("L1_.*") << endmsg;
399 msg(MSG::INFO) << "Pass state L2 = " << m_trigDec->isPassed("L2_.*") << endmsg;
400 msg(MSG::INFO) << "Pass state EF = " << m_trigDec->isPassed("EF_.*") << endmsg;
401 msg(MSG::INFO) << "Pass state HLT = " << m_trigDec->isPassed("HLT_.*") << endmsg;
402 }
403
404 // L1
405 std::vector<std::string> allItems = m_trigDec->getListOfTriggers("L1_.*");
406 if (!allItems.empty()) {
407 if (m_eventDecisionPrintout) msg(MSG::INFO) << "Items : " << allItems.size() << endmsg;
408
409 for (std::vector<std::string>::const_iterator itemIt = allItems.begin();
410 itemIt != allItems.end(); ++itemIt) {
411
412 const LVL1CTP::Lvl1Item* aItem = m_trigDec->ExperimentalAndExpertMethods().getItemDetails(*itemIt);
413
414 if (!aItem) continue;
415 if (aItem->name()=="") continue;
416
417 if (m_eventDecisionPrintout) msg(MSG::INFO) << "Item " << aItem->name() << " : Item ID " << aItem->hashId() << " : " << aItem->isPassed() << endmsg;
418
419 // fill bookkeeping map with zeros if first event
420 std::string item_name = aItem->name();
421 if (m_first_event) m_L1Summary[item_name] = 0;
422
423 // increment counter for L1 summary
424 if (aItem->isPassed()) m_L1Summary[item_name] = (m_L1Summary[item_name]+1);
425 int count = (m_L1Summary.find(item_name))->second;
426 if (m_eventDecisionPrintout) msg(MSG::INFO) << "L1_map[" << item_name << "] = " << count << endmsg;
427
428
429 }
430 } else {
431 ATH_MSG_WARNING("Could not retrieve L1 Items !!");
432 }
433
434
435 // HLT Chains
436
437 // Get all configured chain names from config
438 std::vector<std::string> confChains = m_trigDec->getListOfTriggers("L2_.*, EF_.*, HLT_.*");
439 msg(MSG::INFO) << "Configuring for " << confChains.size() << " HLT chain counters" << endmsg;
440
441 // resize & initialise counters in first event
442 if (m_first_event) {
443 m_summary.resize(0); // vector for chain names
444 m_summaryPassRaw.resize(confChains.size(),0);
445 m_summaryPass.resize(confChains.size(),0);
446 m_summaryPassPhys.resize(confChains.size(),0);
447 m_summaryChainPassRaw.resize(confChains.size(),0);
448 m_summaryChainPass.resize(confChains.size(),0);
449 m_summaryChainPassPhys.resize(confChains.size(),0);
450 m_summaryChainPT.resize(confChains.size(),0);
451 m_summaryChainPS.resize(confChains.size(),0);
452 m_chainPrescales.resize(confChains.size(),0);
453 m_chainPrescalesCalculated.resize(confChains.size(),0);
454 m_chain_passthrough.resize(confChains.size(),0);
455 m_chain_passthrough_calculated.resize(confChains.size(),0);
456 m_lower_chain_accept.resize(confChains.size(),0);
457
458 // make vector of names and sort alphabetically
459 std::map<std::string,float> t_pt_map;
460 std::map<std::string,float> t_ps_map;
461
462 for(std::vector<std::string>::iterator chIter = confChains.begin(); chIter != confChains.end(); ++chIter) {
463 const TrigConf::HLTChain * ch = m_trigDec->ExperimentalAndExpertMethods().getChainConfigurationDetails(*chIter);
464 std::string name = *chIter;
465 m_summary.push_back(name);
466 t_pt_map[name] = ch->pass_through();
467 t_ps_map[name] = ch->prescale();
468 m_lowerChainMap[name] = ch->lower_chain_name();
469 ATH_MSG_DEBUG("Configured chain: " << name
470 << "; prescale=" << ch->prescale()
471 << "; passthrough=" << ch->pass_through()
472 << "; lower chain=" << ch->lower_chain_name());
473 }
474 // sort by chain names to group together L2 and EF chains: do this for
475 // first event only and use ordering in m_summary for later processing
476 std::sort(m_summary.begin(),m_summary.end());
477
478 // store prescaled factor from *configuration* chain
479 for (unsigned int k=0; k<m_summary.size(); ++k) {
480 // prescales
481 std::map<std::string,float>::iterator psIt=t_ps_map.find(m_summary[k]);
482 float ps = -1;
483 if (psIt!=t_ps_map.end()) ps = (*psIt).second;
484 m_chainPrescales[k]=ps;
485 // passthrough
486 std::map<std::string,float>::iterator ptIt=t_pt_map.find(m_summary[k]);
487 float pt = -1;
488 if (ptIt!=t_pt_map.end()) pt = (*ptIt).second;
490 }
491 }
492
493 // all events: loop over names of configured chains, find their status,
494 // increment counters
495 for (unsigned int i=0; i<m_summary.size(); ++i){
496 std::string name = m_summary[i];
497 ATH_MSG_VERBOSE("Testing chain: " << name);
498
499 const HLT::Chain* aChain = m_trigDec->ExperimentalAndExpertMethods().getChainDetails(name);
500 if (! aChain) { // inactive chain
501 continue;
502 }
503
504 // use TrigDecisionTool methods directly
506 ATH_MSG_VERBOSE("chain: " << name << " Passed RAW");
507 ++m_summaryPassRaw[i];
508 }
509 if ( m_trigDec->isPassed(name) ) {
510 ATH_MSG_VERBOSE("chain: " << name << " Passed");
511 ++m_summaryPass[i];
512 }
513 if ( m_trigDec->isPassed(name) ) {
514 ATH_MSG_VERBOSE("chain: " << name << " Passed PHYSICS");
516 }
517
518
519 // Reproduce the definitions of raw, with PS, with PT, as used in monitoring:
520 // http://alxr.usatlas.bnl.gov/lxr/source/atlas/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigChainMoni.cxx#380
521 // chainPassed == (chainPassedRaw() && !aChain->isPrescaled()) || isPassedThrough
522 if (aChain->chainPassedRaw()){
524 }
525 if (aChain->chainPassedRaw() && !aChain->isPrescaled()){
526 ++m_summaryChainPS[i];
527 }
528 if (aChain->chainPassed()){
529 ++m_summaryChainPT[i];
530 }
531 if (!(aChain->isPrescaled())){ // get prescale fraction by counting events
533 }
534 if (aChain->isPassedThrough()){ // get passthrough fraction by counting events
536 }
537 // events accepted by the lower chain
538 std::map<std::string,std::string>::iterator lcIt=m_lowerChainMap.find(m_summary[i]);
539 if (lcIt!=m_lowerChainMap.end()) {
540 if ( !m_trigDec->getListOfTriggers((*lcIt).second).empty() &&m_trigDec->isPassed((*lcIt).second) ) {
542 }
543 }
544 // print info for each event
546 msg(MSG::INFO) << "chain " << name << " = "
548 }
549 }
550
551 // TrigDecisionTool tests on a few specific sigs:
552 for (unsigned int i=0; i < m_countSigNames.size(); ++i) {
553 ATH_MSG_DEBUG("Monitoring " << m_countSigNames[i]);
554 if ( !m_trigDec->getListOfTriggers(m_countSigNames[i]).empty() ) {
555 if ( m_trigDec->isPassed(m_countSigNames[i]) )
557 } else {
558 msg(MSG::WARNING) << m_countSigNames[i] << " not configured!" << endmsg;
559 }
560 }
561
563 m_countEvent.push_back(m_eventNumber);
564
565 for (unsigned int i=0; i < m_countSigNames.size(); ++i) {
566 (m_countSigs[i])->push_back(m_runCountSigs[i]);
567 m_runCountSigs[i]=0;
568 }
569 }
570
571 // reset first event flag
572 if (m_first_event) m_first_event = false;
573
574 return StatusCode::SUCCESS;
575}
576
577template <class T>
578StatusCode TrigDecisionChecker::checkEDM(const std::string& trigItem){
579 ATH_MSG_INFO("REGTEST Check TrigPassBits for " << trigItem << " and type " << ClassID_traits< T >::typeName() );
580 m_trigDec->isPassed(trigItem) ? ATH_MSG_INFO("REGTEST " << trigItem << " Passes ") : ATH_MSG_INFO("REGTEST " << trigItem << " Fails");
581 const auto fc = m_trigDec->features(trigItem,TrigDefs::alsoDeactivateTEs);
582 const auto vec = fc.get<T>();
583 const auto vecbits = fc.get<xAOD::TrigPassBits>();
584 std::string label="";
585 for(const auto& feat:vecbits){
586 const auto *xbits=feat.cptr();
587 TrigConf::HLTTriggerElement::getLabel(feat.te()->getId(), label );
588 const auto *cont=(m_trigDec->ancestor<T>(feat.te())).cptr();
589 if(cont){
590 ATH_MSG_INFO("REGTEST TrigPassBits for TE " << label
591 << " size " << cont->size());
592
593 if(cont->size()!=xbits->size()) {
594 ATH_MSG_WARNING("REGTEST Container and bit size not equal, continue");
595 continue;
596 }
597 int npassed=0;
598 for(const auto &ptr:*cont){
599 if(xbits->isPassing(ptr,cont))
600 npassed++;
601 }
602 ATH_MSG_INFO("REGTEST TrigPassBits for container type " << ClassID_traits< T >::typeName()
603 << " size " << cont->size() << " xbits " << xbits->size() << " selected " << npassed);
604 }
605 }
606
607
608
609 for(const auto& feat:vec){
610 const auto *cont=feat.cptr();
611 const TrigPassBits *bits=(m_trigDec->ancestor<TrigPassBits>(feat.te())).cptr();
612 const xAOD::TrigPassBits *xbits=(m_trigDec->ancestor<xAOD::TrigPassBits>(feat.te())).cptr();
613 TrigConf::HLTTriggerElement::getLabel(feat.te()->getId(), label );
614 if(!cont){
615 ATH_MSG_WARNING(label << " " << ClassID_traits< T >::typeName() << "REGTEST: TrigPassBits container is null ");
616 continue;
617 }
618 if(!bits){
619 ATH_MSG_WARNING(label << " " << ClassID_traits< T >::typeName() << " REGTEST: TrigPassBits old bits null ");
620 }
621 if(!xbits){
622 ATH_MSG_WARNING(label << " " << ClassID_traits< T >::typeName() << " REGTEST: TrigPassBits xbits null ");
623 continue;
624 }
625 //
626 const size_t bitlen = ( (cont->size() - 1)/32 ) + 1;
627 if(bits)
628 ATH_MSG_INFO("REGTEST Retrieved container type " << ClassID_traits< T >::typeName() << " size " << cont->size()
629 << " bits " << bits->size() << " Expect vector of bits " << bitlen);
630 int npassed=0;
631 if(xbits){
632 for(const auto &ptr:*cont){
633 if(xbits->isPassing(ptr,cont))
634 npassed++;
635 }
636 ATH_MSG_INFO("REGTEST TrigPassBits for container type " << ClassID_traits< T >::typeName()
637 << " size " << cont->size() << " xbits " << xbits->size() << " selected " << npassed);
638 }
639 }
640
641 return StatusCode::SUCCESS;
642}
643
644StatusCode TrigDecisionChecker::checkBjetEDM(const std::string& trigItem){
645
646 ATH_MSG_INFO("REGTEST ==========START of bjet EDM/Navigation check for chain " << trigItem << " ===========");
647
648 ATH_MSG_INFO("Chain passed = " << m_trigDec->isPassed(trigItem));
649
650 // Get feature container
651 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
652
653 // Get online combinations
654 const std::vector< Trig::Combination >& bjetCombs = fc.getCombinations();
655 ATH_MSG_INFO("REGTEST - RETRIEVED " << bjetCombs.size() << " COMBINATIONS FOR " << trigItem);
656
657 // Loop on combinations
658 std::vector< Trig::Combination >::const_iterator bjetComb;
659 for( bjetComb = bjetCombs.begin(); bjetComb != bjetCombs.end(); ++bjetComb ) {
660
661 const Trig::Combination& comb = *bjetComb;
662 ATH_MSG_INFO("REGTEST - ------------ NEW COMBINATION ------------");
663
664 // Get online pv - histo
665 const std::vector< Trig::Feature<xAOD::VertexContainer> > onlinepvs_histo = comb.get<xAOD::VertexContainer>("EFHistoPrmVtx");
666 ATH_MSG_INFO("REGTEST - RETRIEVED PV (HISTO) - size: " << onlinepvs_histo.size());
667 if(onlinepvs_histo.size()) {
668 const xAOD::VertexContainer* onlinepv_histo = onlinepvs_histo[0].cptr();
669 ATH_MSG_INFO("REGTEST - - nVert: " << onlinepv_histo->size());
670 if(onlinepv_histo->size()) {
671 ATH_MSG_INFO("REGTEST - - z[0]: " << (*(onlinepv_histo))[0]->z());
672 }
673 }
674
675 // Get online pv - id tracking
676 const std::vector< Trig::Feature<xAOD::VertexContainer> > onlinepvs_id = comb.get<xAOD::VertexContainer>("xPrimVx");
677 ATH_MSG_INFO("REGTEST - RETRIEVED PV (IDTRK) - size: " << onlinepvs_id.size());
678 if(onlinepvs_id.size()) {
679 const xAOD::VertexContainer* onlinepv_id = onlinepvs_id[0].cptr();
680 ATH_MSG_INFO("REGTEST - - nVert: " << onlinepv_id->size());
681 if(onlinepv_id->size()) {
682 ATH_MSG_INFO("REGTEST - - z[0]: " << (*(onlinepv_id))[0]->z());
683 }
684 }
685
686 // Get online jet - from EFBjetSequenceAllTE
687 const std::vector< Trig::Feature<xAOD::JetContainer> > onlinejets_efbjet = comb.get<xAOD::JetContainer>("TrigJetRec");
688 ATH_MSG_INFO("REGTEST - RETRIEVED JETS (EFBJET) - size: " << onlinejets_efbjet.size());
689 if(onlinejets_efbjet.size()) {
690 const xAOD::JetContainer* onlinejet_efbjet = onlinejets_efbjet[0].cptr();
691 ATH_MSG_INFO("REGTEST - - nJet: " << onlinejet_efbjet->size());
692 for(const auto* jet_efbjet : *onlinejet_efbjet) {
693 // Dump
694 ATH_MSG_INFO("REGTEST - - eta/phi: " << jet_efbjet->eta() << " / " << jet_efbjet->phi());
695 }
696 }
697
698 // Get online jet - from JetSplitter
699 const std::vector< Trig::Feature<xAOD::JetContainer> > onlinejets_split = comb.get<xAOD::JetContainer>("SplitJet");
700 ATH_MSG_INFO("REGTEST - RETRIEVED JETS (SPLIT) - size: " << onlinejets_split.size());
701 if(onlinejets_split.size()) {
702 const xAOD::JetContainer* onlinejet_split = onlinejets_split[0].cptr();
703 ATH_MSG_INFO("REGTEST - - nJet: " << onlinejet_split->size());
704 for(const auto* jet_split : *onlinejet_split) {
705 // Dump
706 ATH_MSG_INFO("REGTEST - - eta/phi: " << jet_split->eta() << " / " << jet_split->phi());
707 }
708 }
709
710 // Get online jet - from SuperRoiBuilder (will this work for superROI ??)
711 const std::vector< Trig::Feature<xAOD::JetContainer> > onlinejets_super = comb.get<xAOD::JetContainer>("SuperRoi");
712 ATH_MSG_INFO("REGTEST - RETRIEVED JETS (SUPER) - size: " << onlinejets_super.size());
713 if(onlinejets_super.size()) {
714 const xAOD::JetContainer* onlinejet_super = onlinejets_super[0].cptr();
715 ATH_MSG_INFO("REGTEST - - nJet: " << onlinejet_super->size());
716 for(const auto* jet_super : *onlinejet_super) {
717 // Dump
718 ATH_MSG_INFO("REGTEST - - eta/phi: " << jet_super->eta() << " / " << jet_super->phi());
719 }
720 }
721
722 // Get online track particles (InDetTrigTrackingxAODCnv_BjetPrmVtx_FTF)
723 const std::vector< Trig::Feature<xAOD::TrackParticleContainer> > onlinetracks_prmvtx = comb.get<xAOD::TrackParticleContainer>("InDetTrigTrackingxAODCnv_BjetPrmVtx_FTF");
724 ATH_MSG_INFO("REGTEST - RETRIEVED TRACKS (BJETPRMVTX_FTF) - size: " << onlinetracks_prmvtx.size());
725 if(onlinetracks_prmvtx.size()) {
726 const xAOD::TrackParticleContainer* onlinetrack_prmvtx = onlinetracks_prmvtx[0].cptr();
727 ATH_MSG_INFO("REGTEST - - nTrack: " << onlinetrack_prmvtx->size());
728 for(const auto* trk : *onlinetrack_prmvtx) {
729 // Dump
730 uint8_t nInn=0, nNext=0, nPix=0, nSCT=0;
731 trk->summaryValue(nInn, xAOD::numberOfInnermostPixelLayerHits);
732 trk->summaryValue(nNext, xAOD::numberOfNextToInnermostPixelLayerHits);
733 trk->summaryValue(nPix, xAOD::numberOfPixelHits);
734 trk->summaryValue(nSCT, xAOD::numberOfSCTHits);
735 ATH_MSG_INFO("REGTEST - - inn/next/pix/sct: " << (int)nInn << " / " << (int)nNext << " / " << (int)nPix << " / " << (int)nSCT);
736 }
737 }
738
739 // Get online track particles (InDetTrigTrackingxAODCnv_Bjet_FTF)
740 const std::vector< Trig::Feature<xAOD::TrackParticleContainer> > onlinetracks_bjetftf = comb.get<xAOD::TrackParticleContainer>("InDetTrigTrackingxAODCnv_Bjet_FTF");
741 ATH_MSG_INFO("REGTEST - RETRIEVED TRACKS (BJET_FTF) - size: " << onlinetracks_bjetftf.size());
742 if(onlinetracks_bjetftf.size()) {
743 const xAOD::TrackParticleContainer* onlinetrack_bjetftf = onlinetracks_bjetftf[0].cptr();
744 ATH_MSG_INFO("REGTEST - - nTrack: " << onlinetrack_bjetftf->size());
745 for(const auto* trk : *onlinetrack_bjetftf) {
746 // Dump
747 uint8_t nInn=0, nNext=0, nPix=0, nSCT=0;
748 trk->summaryValue(nInn, xAOD::numberOfInnermostPixelLayerHits);
749 trk->summaryValue(nNext, xAOD::numberOfNextToInnermostPixelLayerHits);
750 trk->summaryValue(nPix, xAOD::numberOfPixelHits);
751 trk->summaryValue(nSCT, xAOD::numberOfSCTHits);
752 ATH_MSG_INFO("REGTEST - - inn/next/pix/sct: " << (int)nInn << " / " << (int)nNext << " / " << (int)nPix << " / " << (int)nSCT);
753 }
754 }
755
756 // Get online track particles (InDetTrigTrackingxAODCnv_Bjet_IDTrig)
757 const std::vector< Trig::Feature<xAOD::TrackParticleContainer> > onlinetracks_bjetprec = comb.get<xAOD::TrackParticleContainer>("InDetTrigTrackingxAODCnv_Bjet_IDTrig");
758 ATH_MSG_INFO("REGTEST - RETRIEVED TRACKS (BJET_IDTRIG) - size: " << onlinetracks_bjetprec.size());
759 if(onlinetracks_bjetprec.size()) {
760 const xAOD::TrackParticleContainer* onlinetrack_bjetprec = onlinetracks_bjetprec[0].cptr();
761 ATH_MSG_INFO("REGTEST - - nTrack: " << onlinetrack_bjetprec->size());
762 for(const auto* trk : *onlinetrack_bjetprec) {
763 // Dump
764 uint8_t nInn=0, nNext=0, nPix=0, nSCT=0;
765 trk->summaryValue(nInn, xAOD::numberOfInnermostPixelLayerHits);
766 trk->summaryValue(nNext, xAOD::numberOfNextToInnermostPixelLayerHits);
767 trk->summaryValue(nPix, xAOD::numberOfPixelHits);
768 trk->summaryValue(nSCT, xAOD::numberOfSCTHits);
769 ATH_MSG_INFO("REGTEST - - inn/next/pix/sct: " << (int)nInn << " / " << (int)nNext << " / " << (int)nPix << " / " << (int)nSCT);
770 }
771 }
772
773 // Get online bjet
774 const std::vector< Trig::Feature<xAOD::BTaggingContainer> > onlinebjets = comb.get<xAOD::BTaggingContainer>();
775 ATH_MSG_INFO("REGTEST - RETRIEVED BJETS - size: " << onlinebjets.size());
776 if(onlinebjets.size()) {
777 const xAOD::BTaggingContainer* onlinebjet = onlinebjets[0].cptr();
778 ATH_MSG_INFO("REGTEST - - nBjet: " << onlinebjet->size());
779 for(const auto* bjet : *onlinebjet) {
780 // Dump
781 double wIP2D, wIP3D, wSV1, wCOMB, wMV1;
782 bjet->loglikelihoodratio("IP2D", wIP2D);
783 bjet->loglikelihoodratio("IP3D", wIP3D);
784 bjet->loglikelihoodratio("SV1", wSV1);
785 wCOMB = wIP3D+wSV1;
786 wMV1 = bjet->MV1_discriminant();
787 ATH_MSG_INFO("REGTEST - - IP2D/IP3D/SV1/IP3D+SV1/MV1: " << wIP2D << " / " << wIP3D << " / " << wSV1 << " / " << wCOMB << " / " << wMV1);
788 }
789 }
790
791 }
792
793 msg(MSG::INFO) << "REGTEST ==========END of bjet EDM/Navigation check for chain " << trigItem << " ===========" << endmsg;
794
795 return StatusCode::SUCCESS;
796}//checkBjetEDM
797
798StatusCode TrigDecisionChecker::checkMuonEDM(const std::string& trigItem){
799
800 msg(MSG::INFO) << "REGTEST ==========START of muon EDM/Navigation check for chain " << trigItem << " ===========" << endmsg;
801
802 ATH_MSG_INFO("Chain passed = " << m_trigDec->isPassed(trigItem));
803
804 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
805
806 const std::vector< Trig::Feature<xAOD::MuonContainer> > vec_muons = fc.get<xAOD::MuonContainer>();
807 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::MuonContainer> > = " << vec_muons.size());
808
809 for( const auto& mufeat : vec_muons ) {
810 ATH_MSG_INFO("REGTEST Got muon container, size = " << mufeat.cptr()->size());
811 for(auto muItr : *(mufeat.cptr())) {
812 ATH_MSG_INFO("REGTEST MuonFeature with pt, eta, phi = " << muItr->pt() << ", " << muItr->eta() << ", " << muItr->phi());
813 }
814 }// loop over muon features
815
816 const std::vector< Trig::Feature<xAOD::L2CombinedMuonContainer> > vec_L2CBmuons = fc.get<xAOD::L2CombinedMuonContainer>();
817 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::L2CombinedMuonContainer> > = " << vec_L2CBmuons.size());
818
819 for( const auto& l2cbmufeat : vec_L2CBmuons) {
820 ATH_MSG_INFO("REGTEST Got muon container, size = " << l2cbmufeat.cptr()->size());
821 for(auto l2cbmuItr : *(l2cbmufeat.cptr())) {
822 ATH_MSG_INFO("REGTEST MuonFeature with pt, eta, phi = " << l2cbmuItr->pt() << ", " << l2cbmuItr->eta() << ", " << l2cbmuItr->phi());
823 }
824 }// loop over muon L2 CB features
825
826 const std::vector< Trig::Feature<xAOD::L2StandAloneMuonContainer> > vec_L2SAmuons = fc.get<xAOD::L2StandAloneMuonContainer>();
827 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::L2StandAloneMuonContainer> > = " << vec_L2SAmuons.size());
828
829 for( const auto& l2samufeat : vec_L2SAmuons) {
830 ATH_MSG_INFO("REGTEST Got muon container, size = " << l2samufeat.cptr()->size());
831 for(auto l2samuItr : *(l2samufeat.cptr())) {
832 ATH_MSG_INFO("REGTEST MuonFeature with pt, eta, phi = " << l2samuItr->pt() << ", " << l2samuItr->eta() << ", " << l2samuItr->phi());
833 }
834 }// loop over muon L2 SA features
835
836 msg(MSG::INFO) << "REGTEST ==========END of muon EDM/Navigation check for chain " << trigItem << " ===========" << endmsg;
837
838 return StatusCode::SUCCESS;
839}//checkMuonEDM
840
841StatusCode TrigDecisionChecker::checkTauEDM(const std::string& trigItem){
842 msg(MSG::INFO)<< "REGTEST ==========START of tau EDM/Navigation check for chain " << trigItem<< "===========" << endmsg;
843 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
844 const std::vector< Trig::Feature<xAOD::TauJetContainer> > vec_tauHLTClust = fc.get<xAOD::TauJetContainer>();
845 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::TauJetContainer> > = " << vec_tauHLTClust.size());
846 for(const auto& cont_tau : vec_tauHLTClust) {
847 ATH_MSG_INFO("REGTEST Got Tau container, size = " << cont_tau.cptr()->size());
848
849 for(auto tauItr : *(cont_tau.cptr())) {
850
851 msg(MSG::INFO) << "REGTEST "<<" HLT tau number of tracks: "<<tauItr->nTracks()<<endmsg;
852 msg(MSG::INFO) << "REGTEST "<<" HLT tau pt : "<<tauItr->pt()<<endmsg;
853 msg(MSG::INFO) << "REGTEST "<<" HLT tau phi : "<<tauItr->phi()<<endmsg;
854 msg(MSG::INFO) << "REGTEST "<<" HLT tau eta : "<<tauItr->eta()<<endmsg;
855 if( !tauItr->jetLink().isValid() ) {
856 ATH_MSG_WARNING("tau does not have jet seed");
857 return StatusCode::SUCCESS;
858 }
859
860 const xAOD::Jet* pJetSeed = *(tauItr->jetLink());
863 for (int clusCount = 0; clusItr != clusItrE; ++clusItr, ++clusCount) {
864 ATH_MSG_INFO( "REGTEST Tau Cluster " << clusCount << " pt = " << (*clusItr)->pt()<< " eta = " << (*clusItr)->eta()<< " phi = " << (*clusItr)->phi() );
865 }
866 for (unsigned int trackNum = 0; trackNum < tauItr->nTracks(); ++trackNum) {
867
868 const xAOD::TrackParticle *linkTrack = tauItr->track(trackNum)->track();
869 if (!linkTrack) {
870 ATH_MSG_WARNING("can't get tau linked track");
871 return StatusCode::SUCCESS;
872 } else {
873 ATH_MSG_DEBUG("Got the tau linked track");
874 }
875 ATH_MSG_INFO( "REGTEST Tau linked track " << trackNum << " pt = " << linkTrack->pt()<< " eta = " << linkTrack->eta() << " phi = " << linkTrack->phi() );
876 }
877
878 }
879 }
880
881 msg(MSG::INFO) << "REGTEST ==========END of Tau EDM/Navigation check ===========" << endmsg;
882 return StatusCode::SUCCESS;
883}
884
885
886
887StatusCode TrigDecisionChecker::checkBphysEDM(const std::string& trigItem){
888
889 msg(MSG::INFO) << "REGTEST ==========START of Bphysics EDM/Navigation check for chain " << trigItem << " ===========" << endmsg;
890
891 ATH_MSG_INFO("Chain passed = " << m_trigDec->isPassed(trigItem));
892
893 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
894
895 const std::vector< Trig::Feature<xAOD::TrigBphysContainer> > fc_bphys = fc.get<xAOD::TrigBphysContainer>();
896 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::TrigBphysContainer> > = " << fc_bphys.size());
897
898 for( const auto& cont_bphys : fc_bphys ) {
899 ATH_MSG_INFO("REGTEST Got Bphysics container, size = " << cont_bphys.cptr()->size());
900 for ( auto bphys: *(cont_bphys.cptr()) ) {
901 ATH_MSG_INFO("REGTEST Bphysics Item mass, fitmass, secVx, nTP: "
902 << bphys->mass()*0.001 << " , " << bphys->fitmass() * 0.001 << " , "
903 << bphys->secondaryDecay() << " , " << bphys->nTrackParticles()
904 );
905 } // for
906
907 }// loop over bphys features
908
909 // const std::vector< Trig::Feature<CombinedMuonFeature> > vec_cbmufeats = fc.get<CombinedMuonFeature>();
910 // ATH_MSG_INFO("Size of vector< Trig::Feature<CombinedMuonFeature> > = " << vec_cbmufeats.size());
911 //
912 // for( auto cbmufeat : vec_cbmufeats) {
913 // ATH_MSG_INFO("REGTEST CombinedMuonFeature with pt, eta, phi = " << cbmufeat.cptr()->pt() << ", " << cbmufeat.cptr()->eta() << ", " << cbmufeat.cptr()->phi());
914 // }
915 //
916 ATH_MSG_INFO("REGTEST ==========END of Bphysics EDM/Navigation check for chain " << trigItem << " ===========");
917
918 return StatusCode::SUCCESS;
919}//checkBphysEDM
920
921
922
923
924
925
926StatusCode TrigDecisionChecker::checkElectronEDM(const std::string& trigItem){
927 msg(MSG::INFO) << "REGTEST ==========START of Electron EDM/Navigation check for chain " << trigItem << " ===========" << endmsg;
928
929 ATH_MSG_INFO("Chain passed = " << m_trigDec->isPassed(trigItem));
930
931 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
932 const std::vector< Trig::Feature<xAOD::ElectronContainer> > vec_el = fc.get<xAOD::ElectronContainer>();
933 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::ElectronContainer> > = " << vec_el.size());
934 float val_float=-99.;
935 for(const auto& elfeat : vec_el){
936 ATH_MSG_INFO("REGTEST: Got electron container, size = " << elfeat.cptr()->size());
937 const xAOD::ElectronContainer *elCont = elfeat.cptr();
938
939 for(const auto eg : *elCont){
940 if (eg) {
941 ATH_MSG_INFO(" REGTEST: egamma energy: " << eg->e() );
942 ATH_MSG_INFO(" REGTEST: egamma eta: " << eg->eta() );
943 ATH_MSG_INFO(" REGTEST: egamma phi: " << eg->phi() );
944 } else{
945 ATH_MSG_INFO(" REGTEST: problems with egamma pointer" );
946 return StatusCode::SUCCESS;
947 }
948 ATH_MSG_INFO(" REGTEST: caloCluster variables ");
949 if (eg->caloCluster()) {
950 ATH_MSG_INFO(" REGTEST: egamma cluster transverse energy: " << eg->caloCluster()->et() );
951 ATH_MSG_INFO(" REGTEST: egamma cluster eta: " << eg->caloCluster()->eta() );
952 ATH_MSG_INFO(" REGTEST: egamma cluster phi: " << eg->caloCluster()->phi() );
953 double tmpeta = -999.;
954 double tmpphi = -999.;
955 eg->caloCluster()->retrieveMoment(xAOD::CaloCluster::ETACALOFRAME,tmpeta);
956 eg->caloCluster()->retrieveMoment(xAOD::CaloCluster::PHICALOFRAME,tmpphi);
957 ATH_MSG_INFO(" REGTEST: egamma cluster calo-frame coords. etaCalo = " << tmpeta);
958 ATH_MSG_INFO(" REGTEST: egamma cluster calo-frame coords. phiCalo = " << tmpphi);
959 } else{
960 ATH_MSG_INFO(" REGTEST: problems with egamma cluster pointer" );
961 }
962 ATH_MSG_INFO(" REGTEST: trackmatch variables ");
963 if(eg->trackParticle()){
964 ATH_MSG_INFO(" REGTEST: pt= " << eg->trackParticle()->pt());
965 ATH_MSG_INFO(" REGTEST: charge= " << eg->trackParticle()->charge());
966 ATH_MSG_INFO(" REGTEST: E/p= " << eg->caloCluster()->et() / eg->trackParticle()->pt() );
967 eg->trackCaloMatchValue(val_float,xAOD::EgammaParameters::deltaEta1);
968 ATH_MSG_INFO(" REGTEST: Delta eta 1st sampling= " << val_float);
969 eg->trackCaloMatchValue(val_float,xAOD::EgammaParameters::deltaPhi2);
970 ATH_MSG_INFO(" REGTEST: Delta phi 2nd sampling= " << val_float);
971 } else{
972 ATH_MSG_INFO(" REGTEST: no electron eg->trackParticle() pointer");
973 }
974 }
975 }
976
977 msg(MSG::INFO) << "REGTEST ==========END of Electron EDM/Navigation check ===========" << endmsg;
978 return StatusCode::SUCCESS;
979}
980
981StatusCode TrigDecisionChecker::checkPhotonEDM(const std::string& trigItem){
982 msg(MSG::INFO) << "REGTEST ==========START of Photon EDM/Navigation check for chain " << trigItem << " ===========" << endmsg;
983
984 ATH_MSG_INFO("Chain passed = " << m_trigDec->isPassed(trigItem));
985
986 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
987 const std::vector< Trig::Feature<xAOD::PhotonContainer> > vec_ph = fc.get<xAOD::PhotonContainer>();
988 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::PhotonContainer> > = " << vec_ph.size());
989 //float val_float=-99.;
990 for(const auto& phfeat : vec_ph){
991 ATH_MSG_INFO("REGTEST: Got photon container, size = " << phfeat.cptr()->size());
992 const xAOD::PhotonContainer *phCont = phfeat.cptr();
993
994 for(const auto eg : *phCont){
995 if (eg) {
996 ATH_MSG_INFO(" REGTEST: egamma energy: " << eg->e() );
997 ATH_MSG_INFO(" REGTEST: egamma eta: " << eg->eta() );
998 ATH_MSG_INFO(" REGTEST: egamma phi: " << eg->phi() );
999 } else{
1000 ATH_MSG_INFO(" REGTEST: problems with egamma pointer" );
1001 return StatusCode::SUCCESS;
1002 }
1003 ATH_MSG_INFO(" REGTEST: caloCluster variables ");
1004 if (eg->caloCluster()) {
1005 ATH_MSG_INFO(" REGTEST: egamma cluster transverse energy: " << eg->caloCluster()->et() );
1006 ATH_MSG_INFO(" REGTEST: egamma cluster eta: " << eg->caloCluster()->eta() );
1007 ATH_MSG_INFO(" REGTEST: egamma cluster phi: " << eg->caloCluster()->phi() );
1008 double tmpeta = -999.;
1009 double tmpphi = -999.;
1010 eg->caloCluster()->retrieveMoment(xAOD::CaloCluster::ETACALOFRAME,tmpeta);
1011 eg->caloCluster()->retrieveMoment(xAOD::CaloCluster::PHICALOFRAME,tmpphi);
1012 ATH_MSG_INFO(" REGTEST: egamma cluster calo-frame coords. etaCalo = " << tmpeta);
1013 ATH_MSG_INFO(" REGTEST: egamma cluster calo-frame coords. phiCalo = " << tmpphi);
1014 } else{
1015 ATH_MSG_INFO(" REGTEST: problems with egamma cluster pointer" );
1016 }
1017 }
1018 }
1019
1020 msg(MSG::INFO) << "REGTEST ==========END of Photon EDM/Navigation check ===========" << endmsg;
1021 return StatusCode::SUCCESS;
1022}
1023
1024StatusCode TrigDecisionChecker::checkMinBiasEDM(const std::string& trigItem){
1025 msg(MSG::INFO) << "REGTEST ==========START of MinBias EDM/Navigation check for chain " << trigItem << " ===========" << endmsg;
1026
1027 ATH_MSG_INFO("Chain passed = " << m_trigDec->isPassed(trigItem));
1028
1029 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
1030
1035
1036 msg(MSG::INFO) << "REGTEST ==========END of MinBias EDM/Navigation check ===========" << endmsg;
1037 return StatusCode::SUCCESS;
1038}
1039
1041
1042 const std::vector< Trig::Feature<xAOD::TrigSpacePointCounts> > vec_sp = fc.get<xAOD::TrigSpacePointCounts>();
1043 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::TrigSpacePointCounts> > = " << vec_sp.size());
1044
1045 float sum;
1046 auto fun = [&sum](const std::vector<float>& vec){sum = 0.; for (const auto &i: vec) sum += i; return sum;};
1047
1048 for(const auto& spfeat : vec_sp){
1049 const xAOD::TrigSpacePointCounts *spCounts = spfeat.cptr();
1050 if (spCounts){
1051 ATH_MSG_INFO(" REGTEST: SUM of contentsPixelClusEndcapC: " << fun(spCounts->contentsPixelClusEndcapC()) );
1052 ATH_MSG_INFO(" REGTEST: SUM of contentsPixelClusBarrel: " << fun(spCounts->contentsPixelClusBarrel()) );
1053 ATH_MSG_INFO(" REGTEST: SUM of contentsPixelClusEndcapA: " << fun(spCounts->contentsPixelClusEndcapA()) );
1054
1055 ATH_MSG_INFO(" REGTEST: pixelClusTotBins: " << spCounts->pixelClusTotBins() );
1056 ATH_MSG_INFO(" REGTEST: pixelClusTotMin: " << spCounts->pixelClusTotMin() );
1057 ATH_MSG_INFO(" REGTEST: pixelClusTotMax: " << spCounts->pixelClusTotMax() );
1058 ATH_MSG_INFO(" REGTEST: pixelClusSizeBins: " << spCounts->pixelClusSizeBins() );
1059 ATH_MSG_INFO(" REGTEST: pixelClusSizeMin: " << spCounts->pixelClusSizeMin() );
1060 ATH_MSG_INFO(" REGTEST: pixelClusSizeMax: " << spCounts->pixelClusSizeMax() );
1061 ATH_MSG_INFO(" REGTEST: sctSpEndcapC: " << spCounts->sctSpEndcapC() );
1062 ATH_MSG_INFO(" REGTEST: sctSpBarrel: " << spCounts->sctSpBarrel() );
1063 ATH_MSG_INFO(" REGTEST: sctSpEndcapA: " << spCounts->sctSpEndcapA() );
1064 } else{
1065 ATH_MSG_INFO(" REGTEST: problems with TrigSpacePointCounts pointer" );
1066 return;
1067 }
1068 }
1069}
1070
1072
1073 const std::vector< Trig::Feature<xAOD::TrigT2MbtsBits> > vec_mbts = fc.get<xAOD::TrigT2MbtsBits>();
1074 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::TrigT2MbtsBits> > = " << vec_mbts.size());
1075
1076 float sum;
1077 auto fun = [&sum](const std::vector<float>& vec){sum = 0.; for (const auto &i: vec) sum += i; return sum;};
1078
1079 for(const auto& mbtsfeat : vec_mbts){
1080 const xAOD::TrigT2MbtsBits *mbtsBits = mbtsfeat.cptr();
1081 if (mbtsBits){
1082 ATH_MSG_INFO(" REGTEST: SUM of triggerEnergies: " << fun(mbtsBits->triggerEnergies()) );
1083 ATH_MSG_INFO(" REGTEST: SUM of triggerTimes: " << fun(mbtsBits->triggerTimes()) );
1084 } else{
1085 ATH_MSG_INFO(" REGTEST: problems with TrigT2MBTSBits pointer" );
1086 return;
1087 }
1088 }
1089}
1090
1092
1093 const std::vector< Trig::Feature<xAOD::TrigVertexCounts> > vec_v = fc.get<xAOD::TrigVertexCounts>();
1094 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::TrigVertexCounts> > = " << vec_v.size());
1095
1096 auto funu = [](const std::vector<uint>& vec){uint sum = 0; for (const auto &i: vec) sum += i; return sum;};
1097 auto funf = [](const std::vector<float>& vec){float sum = 0.; for (const auto &i: vec) sum += i; return sum;};
1098
1099 for(const auto& vfeat : vec_v){
1100 const xAOD::TrigVertexCounts *vCounts = vfeat.cptr();
1101 if (vCounts){
1102 ATH_MSG_INFO(" REGTEST: SUM of vtxNtrks: " << funu(vCounts->vtxNtrks()) );
1103 ATH_MSG_INFO(" REGTEST: SUM of vtxTrkPtSqSum: " << funf(vCounts->vtxTrkPtSqSum()) );
1104 } else{
1105 ATH_MSG_INFO(" REGTEST: problems with TrigVertexCounts pointer" );
1106 return;
1107 }
1108 }
1109}
1110
1112
1113 const std::vector< Trig::Feature<xAOD::TrigTrackCounts> > vec_t = fc.get<xAOD::TrigTrackCounts>();
1114 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::TrigTrackCounts> > = " << vec_t.size());
1115
1116 float sum;
1117 auto fun = [&sum](const std::vector<float>& vec){sum = 0.; for (const auto &i: vec) sum += i; return sum;};
1118
1119 for(const auto& tfeat : vec_t){
1120 const xAOD::TrigTrackCounts *tCounts = tfeat.cptr();
1121 if (tCounts){
1122 ATH_MSG_INFO(" REGTEST: SUM of z0_pt: " << fun(tCounts->z0_pt()) );
1123 ATH_MSG_INFO(" REGTEST: SUM of eta_phi: " << fun(tCounts->eta_phi()) );
1124
1125 ATH_MSG_INFO(" REGTEST: z0Bins: " << tCounts->z0Bins() );
1126 ATH_MSG_INFO(" REGTEST: z0Min: " << tCounts->z0Min() );
1127 ATH_MSG_INFO(" REGTEST: z0Max: " << tCounts->z0Max() );
1128 ATH_MSG_INFO(" REGTEST: ptBins: " << tCounts->ptBins() );
1129 ATH_MSG_INFO(" REGTEST: ptMin: " << tCounts->ptMin() );
1130 ATH_MSG_INFO(" REGTEST: ptMax: " << tCounts->ptMax() );
1131 ATH_MSG_INFO(" REGTEST: etaBins: " << tCounts->etaBins() );
1132 ATH_MSG_INFO(" REGTEST: etaMin: " << tCounts->etaMin() );
1133 ATH_MSG_INFO(" REGTEST: etaMax: " << tCounts->etaMax() );
1134 } else{
1135 ATH_MSG_INFO(" REGTEST: problems with TrigTrackCounts pointer" );
1136 return;
1137 }
1138 }
1139}
1140
1141StatusCode TrigDecisionChecker::checkJetEDM(const std::string& trigItem){
1142 ATH_MSG_DEBUG("in checkJetEDM()");
1143
1144 ATH_MSG_INFO("REGTEST =====For chain " << trigItem << "=====");
1145
1146 ATH_MSG_INFO("Chain passed = " << m_trigDec->isPassed(trigItem));
1147
1148 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
1149 const std::vector< Trig::Feature<xAOD::JetContainer> > vec_jet = fc.get<xAOD::JetContainer>();
1150 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::JetContainer> > = " << vec_jet.size());
1151 for(const auto& jetfeat : vec_jet){
1152 const xAOD::JetContainer * jetCont = jetfeat.cptr();
1153
1154 int jetContsize = jetCont->size();
1155 ATH_MSG_INFO("REGTEST Got jet container, size: " << jetContsize);
1156
1157 int i = 0;
1158 for(const auto thisjet : *jetCont){
1159 ++i;
1160 ATH_MSG_INFO("REGTEST Looking at jet " << i);
1161 if (thisjet) {
1162 //checks jet variables
1163 ATH_MSG_DEBUG("REGTEST Checking jet variables");
1164 ATH_MSG_INFO("REGTEST pt: " << thisjet->pt() );
1165 ATH_MSG_INFO("REGTEST eta: " << thisjet->eta() );
1166 ATH_MSG_INFO("REGTEST phi: " << thisjet->phi() );
1167 ATH_MSG_INFO("REGTEST m: " << thisjet->m() );
1168 ATH_MSG_INFO("REGTEST e: " << thisjet->e() );
1169 ATH_MSG_INFO("REGTEST px: " << thisjet->px() );
1170 ATH_MSG_INFO("REGTEST py: " << thisjet->py() );
1171 ATH_MSG_INFO("REGTEST pz: " << thisjet->pz() );
1172 ATH_MSG_INFO("REGTEST type: " << thisjet->type() );
1173 ATH_MSG_INFO("REGTEST algorithm (kt: 0, cam: 1, antikt: 2, ...): " << thisjet->getAlgorithmType() );
1174 ATH_MSG_INFO("REGTEST size parameter: " << thisjet->getSizeParameter() );
1175 ATH_MSG_INFO("REGTEST input (LCTopo: 0, EMTopo: 1, ...): " << thisjet->getInputType() );
1176 ATH_MSG_INFO("REGTEST constituents signal state (uncalibrated: 0, calibrated: 1): " << thisjet->getConstituentsSignalState() );
1177 ATH_MSG_INFO("REGTEST number of constituents: " << thisjet->numConstituents() );
1178 }
1179 else{
1180 ATH_MSG_ERROR("REGTEST Problem with jet pointer" );
1181 return StatusCode::FAILURE;
1182 }
1183 }
1184 if (jetContsize == i) ATH_MSG_INFO("REGTEST size of jet container == number of displayed jets: " << (jetContsize == i) );
1185 else ATH_MSG_WARNING("REGTEST Problem with displaying jets");
1186 }
1187
1188 ATH_MSG_DEBUG("leaving checkJetEDM()");
1189
1190 return StatusCode::SUCCESS;
1191}
1192
1193StatusCode TrigDecisionChecker::checkMetEDM(const std::string& trigItem){
1194 ATH_MSG_DEBUG("in checkMetEDM()");
1195
1196 ATH_MSG_INFO("REGTEST =====For chain " << trigItem << "=====");
1197
1198 ATH_MSG_INFO("Chain passed = " << m_trigDec->isPassed(trigItem));
1199
1200 Trig::FeatureContainer fc = m_trigDec->features(trigItem);
1201 const std::vector< Trig::Feature<xAOD::TrigMissingETContainer> > vec_met = fc.get<xAOD::TrigMissingETContainer>();
1202 ATH_MSG_INFO("Size of vector< Trig::Feature<xAOD::TrigMissingETContainer> > = " << vec_met.size());
1203 for(const auto& metfeat : vec_met){
1204 const xAOD::TrigMissingETContainer * metCont = metfeat.cptr();
1205
1206 ATH_MSG_INFO("REGTEST Fot trigMet container, size: " << metCont->size());
1207
1208 const xAOD::TrigMissingET * metObj = metCont->front(); // the first object in the container typically holds the total MET, other objects hold components
1209
1210 if (metObj){
1211 ATH_MSG_DEBUG("REGTEST Checking met variables");
1212 ATH_MSG_INFO("REGTEST ex: " << metObj->ex() );
1213 ATH_MSG_INFO("REGTEST ey: " << metObj->ey() );
1214 ATH_MSG_INFO("REGTEST sumEt: " << metObj->sumEt() );
1215 ATH_MSG_INFO("REGTEST ez: " << metObj->ez() );
1216 ATH_MSG_INFO("REGTEST sumE: " << metObj->sumE() );
1217 ATH_MSG_INFO("REGTEST number of components: " << metObj->getNumberOfComponents() );
1218 }
1219 else{
1220 ATH_MSG_ERROR("REGTEST Problem with met pointer" );
1221 return StatusCode::FAILURE;
1222 }
1223 }
1224
1225 ATH_MSG_DEBUG("leaving checkMetEDM()");
1226
1227 return StatusCode::SUCCESS;
1228}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
std::vector< size_t > vec
unsigned int uint
static Double_t sc
Declaration of tau jet transient class.
DEPRECATED DO NOT USE.
Declaration of tau details container transient class.
DEPRECATED DO NOT USE.
#define z
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
MsgStream & msg() const
const T * front() const
Access the first element in the collection as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
This class represents one chain of signatures, i.e.
Definition Chain.h:64
bool chainPassed() const
Definition Chain.cxx:46
bool isPassedThrough() const
is chain passed through ?
Definition Chain.h:85
bool isPrescaled() const
is chain prescaled ?
Definition Chain.h:86
bool chainPassedRaw() const
Definition Chain.h:81
unsigned int hashId() const
Definition Lvl1Item.h:47
bool isPassed() const
Definition Lvl1Item.h:53
const std::string & name() const
Definition Lvl1Item.h:46
HLT chain configuration information.
static bool getLabel(unsigned int id, std::string &label)
find name from ID in the map m_IdToLabel
void checkTrigSpacePointCounts(const Trig::FeatureContainer &fc)
StatusCode checkMuonEDM(const std::string &trigItem)
StatusCode execute()
std Gaudi execute method -> use TrigDecisionTool to 'look' at the trigger data
std::vector< int > m_summaryChainPass
Gaudi::Property< std::vector< std::string > > m_jetItems
std::vector< std::vector< int > * > m_countSigs
std::vector< float > m_chainPrescalesCalculated
Gaudi::Property< std::vector< std::string > > m_photonItems
std::vector< int > m_countEvent
TrigDecisionChecker(const std::string &name, ISvcLocator *pSvcLocator)
std Gaudi Algorithm constructor
StatusCode checkPhotonEDM(const std::string &trigItem)
StatusCode checkEDM(const std::string &trigItem)
StatusCode initialize()
std Gaudi initialize method
Gaudi::Property< std::vector< std::string > > m_muonItems
Muon triggers to test output for.
std::vector< float > m_chain_passthrough
StatusCode checkMetEDM(const std::string &trigItem)
StatusCode checkMinBiasEDM(const std::string &trigItem)
Gaudi::Property< std::vector< std::string > > m_minBiasItems
StatusCode checkBphysEDM(const std::string &trigItem)
Bphysics EDM checker.
Gaudi::Property< std::vector< std::string > > m_bjetItems
~TrigDecisionChecker()
std deconstructor
std::vector< int > m_summaryChainPassPhys
Gaudi::Property< std::vector< std::string > > m_countSigNames
void checkTrigTrackCounts(const Trig::FeatureContainer &fc)
std::vector< int > m_lower_chain_accept
Gaudi::Property< std::vector< std::string > > m_bphysItems
std::vector< int > m_summaryPassRaw
Gaudi::Property< std::vector< std::string > > m_metItems
std::map< std::string, std::string > m_lowerChainMap
Gaudi::Property< std::string > m_printoutFileName
StatusCode checkBjetEDM(const std::string &trigItem)
std::vector< int > m_runCountSigs
std::vector< int > m_summaryPassPhys
StatusCode checkElectronEDM(const std::string &trigItem)
Gaudi::Property< int > m_monitoringBlockSize
Gaudi::Property< std::vector< std::string > > m_TauItems
std::vector< std::string > m_summary
StatusCode checkTauEDM(const std::string &trigItem)
Gaudi::Property< bool > m_checkBits
ToolHandle< Trig::TrigDecisionTool > m_trigDec
interface to use the trigger data: TriggerTool
Gaudi::Property< bool > m_eventDecisionPrintout
std::vector< float > m_chain_passthrough_calculated
std::vector< int > m_summaryChainPS
StatusCode checkJetEDM(const std::string &trigItem)
void checkTrigVertexCounts(const Trig::FeatureContainer &fc)
Gaudi::Property< std::vector< std::string > > m_electronItems
Bphysics chains to test.
std::vector< float > m_chainPrescales
void checkTrigT2MBTSBits(const Trig::FeatureContainer &fc)
std::map< std::string, int > m_L1Summary
std::vector< int > m_summaryChainPassRaw
StatusCode finalize()
std Gaudi finalize method
std::vector< int > m_summaryPass
std::vector< int > m_summaryChainPT
unsigned int size() const
gets size of the bits array
is a connector between chains and object It store single combination of trigger elements.
std::vector< Trig::Feature< T > > get(const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
Method used to get objects.
const std::vector< Trig::Feature< T > > get(const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
returns flattened vector of Features of given type This method is in fact sullied by 3 arguments.
const std::vector< Trig::Combination > & getCombinations() const
gives back reference to combinations collected through append
@ ETACALOFRAME
Eta in the calo frame (for egamma)
@ PHICALOFRAME
Phi in the calo frame (for egamma)
uint32_t lumiBlock() const
The current event's luminosity block number.
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
iterator begin() const
iterator on the first constituent
iterator end() const
iterator after the last constituent
JetConstituentVector getConstituents() const
Return a vector of consituents. The object behaves like vector<const IParticle*>. See JetConstituentV...
Definition Jet_v1.cxx:147
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float ex() const
Get the x component of the missing energy.
float sumE() const
Get the sum of the E of the missing energy.
unsigned int getNumberOfComponents() const
Get the number of components.
float sumEt() const
Get the sum of the ET of the missing energy.
float ez() const
Get the z component of the missing energy.
float ey() const
Get the y component of the missing energy.
uint32_t size() const
The size of the target container.
bool isPassing(const OBJ *obj, const CONT *container) const
Check if an element of a container is passing/failing.
unsigned int sctSpEndcapA() const
unsigned int pixelClusTotBins() const
unsigned int sctSpBarrel() const
unsigned int pixelClusSizeBins() const
const std::vector< float > & contentsPixelClusEndcapC() const
getters
const std::vector< float > & contentsPixelClusEndcapA() const
unsigned int sctSpEndcapC() const
const std::vector< float > & contentsPixelClusBarrel() const
const std::vector< float > & triggerEnergies() const
Return the trigger energies of each counter.
const std::vector< float > & triggerTimes() const
Return the relative times of the triggers.
const std::vector< float > & eta_phi() const
unsigned int etaBins() const
const std::vector< float > & z0_pt() const
getters
unsigned int z0Bins() const
unsigned int ptBins() const
const std::vector< float > & vtxTrkPtSqSum() const
const std::vector< unsigned int > & vtxNtrks() const
getters
A crc-64 implementation, using pclmul where possible.
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
std::string label(const std::string &format, int i)
Definition label.h:19
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
Jet_v1 Jet
Definition of the current "jet version".
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
BTaggingContainer_v1 BTaggingContainer
Definition of the current "BTagging container version".
TrigMissingETContainer_v1 TrigMissingETContainer
DataVector of TrigMissingET - the current version.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
L2CombinedMuonContainer_v1 L2CombinedMuonContainer
Define the latest version of the muon CB container.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
TrigPassBits_v1 TrigPassBits
Define the latest version of the trigger pass bits class.
L2StandAloneMuonContainer_v2 L2StandAloneMuonContainer
Define the latest version of the muon SA container.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
TrigMissingET_v1 TrigMissingET
Define the most recent version of the TrigMissingET class.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
TrigBphysContainer_v1 TrigBphysContainer
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].