ATLAS Offline Software
T_AnalysisConfigMT_Tier0.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
23 #ifndef TrigInDetAnalysisExample_T_AnalysisConfigMT_Tier0_H
24 #define TrigInDetAnalysisExample_T_AnalysisConfigMT_Tier0_H
25 
31 
37 
38 #include "TTree.h"
39 #include "TFile.h"
40 
41 #include "GaudiKernel/ToolHandle.h"
43 
44 
45 // McParticleEvent includes
47 
49 #include "AtlasHepMC/GenEvent.h"
50 #include "AtlasHepMC/GenVertex.h"
51 #include "AtlasHepMC/GenParticle.h"
52 
54 
55 
56 
58 
60 
66 
67 
68 
69 #include "VxVertex/VxContainer.h"
70 
72 
74 
76 
77 
80 
81 // #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
82 
85 
87 
88 
89 
90 
91 
92 template<typename T, typename A=Analysis_Tier0>
94 
95 public:
96 
97  // Full constructor: test/reference/selection
98  // - analysisInstanceName: the name of the analysis chain being created
99  // - xxxChainName: the name of the chain to be used as test/reference/selection; must be "StoreGate" in case of direct access to SG containers
100  // - xxxType: the type of tracks to be retrieved from the test/reference/selection chain or container
101  // - xxxKey: the key for tracks to be retrieved from the test/reference/selection chain or container
102  // - all standard operations are performed in loops over 0=test 1=reference 2=selection
103  T_AnalysisConfigMT_Tier0(const std::string& analysisInstanceName,
104  const std::string& testChainName, const std::string& testType, const std::string& testKey,
105  const std::string& referenceChainName, const std::string& referenceType, const std::string& referenceKey,
106  TrackFilter* testFilter, TrackFilter* referenceFilter,
107  TrackAssociator* associator,
109  TagNProbe* TnP_tool = 0) :
110  T_AnalysisConfig<T>( analysisInstanceName,
111  testChainName, testType, testKey,
112  referenceChainName, referenceType, referenceKey,
113  testFilter, referenceFilter,
114  associator,
115  analysis),
116  m_useBeamCondSvc(false),
117  m_doOffline(true),
118  m_doMuons(false),
119  m_doElectrons(false),
120  m_doTaus(false),
121  m_doBjets(false),
122  m_hasTruthMap(false),
123  m_NRois(0),
124  m_NRefTracks(0),
125  m_NTestTracks(0),
126  m_runPurity(false),
127  m_shifter(false),
128  m_pTthreshold(0),
129  m_first(true),
130  m_containTracks(false),
131  m_TnP_tool(TnP_tool),
132  m_invmass(0),
133  m_invmass_obj(0)
134  {
136  m_event = new TIDA::Event();
137  m_chainNames.push_back(testChainName);
138 
139 #if 0
140  ChainString& chain = m_chainNames.back();
141 
142  std::cout << "\nT_AnalysisConfigMT_Tier0::name: " << name() << "\t" << this << std::endl;
143  std::cout << "T_AnalysisConfigMT_Tier0::chain specification: " << testChainName << " -> " << chain << "\t" << chain.raw() << std::endl;
144  std::cout << "\tchain: " << chain.head() << std::endl;
145  std::cout << "\tkey: " << chain.tail() << std::endl;
146  std::cout << "\troi: " << chain.roi() << std::endl;
147  std::cout << "\tvtx: " << chain.vtx() << std::endl;
148  std::cout << "\tte: " << chain.element() << std::endl;
149 
150  std::cout << "\tpost: " << chain.post() << std::endl;
151  std::cout << "\tpt: " << chain.postvalue("pt") << std::endl;
152 
153  std::cout << "\tcontainTracks: " << m_containTracks << std::endl;
154 #endif
155 
156  m_testType = testType;
157  }
158 
160  delete m_event;
161  if ( m_TnP_tool != 0 ) delete m_TnP_tool ;
162  }
163 
164  void setRunPurity( bool b ) { m_runPurity=b; }
165 
166  void setShifter( bool b ) { m_shifter=b; }
167 
168  void useBeamCondSvc( bool b ) { m_useBeamCondSvc = b; }
169 
170  void containTracks( bool b ) { m_containTracks = b; }
171 
172 public:
173 
175 
176 protected:
177 
181 
184 
189 
190 
191  virtual void loop() {
192 
193  bool TnP_flag = (m_TnP_tool != 0) ; // flag for tag and probe analysis
194 
195  if( m_provider->msg().level() <= MSG::VERBOSE) {
196  m_provider->msg(MSG::VERBOSE) << "AnalysisConfigMT_Tier0::loop() for " << T_AnalysisConfig<T>::m_analysisInstanceName << endmsg;
197  }
198 
199  // get (offline) beam position
200  double xbeam = 0;
201  double ybeam = 0;
202 
203  if ( m_first ) {
204 
205  m_first = false;
206 
207  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
208  m_provider->msg(MSG::VERBOSE) << " using beam position\tx=" << xbeam << "\ty=" << ybeam << endmsg;
209 
210  std::vector<std::string> configuredChains = (*(m_tdt))->getListOfTriggers("L2_.*, EF_.*, HLT_.*");
211 
212  for ( unsigned i=0 ; i<configuredChains.size() ; i++ ) {
213  // std::cout << "Configured chain " << configuredChains[i] << std::endl;
214  m_provider->msg(MSG::VERBOSE) << "Chain " << configuredChains[i] << endmsg;
215  }
216  }
217 
218  // std::cout << "\tloop() analyse chains " << m_chainNames.size() << std::endl;
219 
221 
222  std::vector<ChainString> chains;
223 
227  while ( chainitr!=m_chainNames.end() ) {
228 
230  ChainString& chainName = (*chainitr);
231 
232  if (m_provider->msg().level() <= MSG::VERBOSE) {
233  m_provider->msg(MSG::VERBOSE) << "process chain " << chainName << endmsg;
234  }
235 
236  if ( chainName.head() == "" ) {
237 
238  std::string selectChain = chainName.raw();
239 
240  chains.push_back( ChainString(selectChain) );
241 
242  }
243  else {
244 
246  std::vector<std::string> selectChains = (*(m_tdt))->getListOfTriggers( chainName.head() );
247 
248  for ( unsigned iselected=0 ; iselected<selectChains.size() ; iselected++ ) {
249 
250  selectChains[iselected] = chainName.subs( selectChains[iselected] );
251 
252 #if 0
253  std::cout << "sorting:: chain specification: " << chainName << "\traw:" << chainName.raw() << std::endl;
254  std::cout << "\tchain: " << chainName.head() << std::endl;
255  std::cout << "\tkey: " << chainName.tail() << std::endl;
256  std::cout << "\tind: " << chainName.extra() << std::endl;
257  std::cout << "\troi: " << chainName.roi() << std::endl;
258  std::cout << "\tvtx: " << chainName.vtx() << std::endl;
259  std::cout << "\tte: " << chainName.element() << std::endl;
260 #endif
261 
263  chains.push_back( ChainString(selectChains[iselected]) );
264 
265  if(m_provider->msg().level() <= MSG::VERBOSE) {
266  m_provider->msg(MSG::VERBOSE) << "Matching chain " << selectChains[iselected] << " (" << chainName.head() << ")" << endmsg;
267  }
268 
269  // std::cout<< "\tMatching chain " << sc << " (" << chainName.head() << ")" << std::endl;
270 
271  }
272  }
273 
274  chainitr++;
275  }
276 
277  // m_chainNames.insert( m_chainNames.end(), chains.begin(), chains.end() );
279 
280  if(m_provider->msg().level() <= MSG::VERBOSE) {
281  for ( size_t ic=m_chainNames.size() ; ic-- ; ) m_provider->msg(MSG::VERBOSE) << "Analyse chain " << m_chainNames[ic] << endmsg;
282  }
283 
284  }
285 
286  // std::cout << "\tloop() event analysis ..." << std::endl;
287 
290 
291  Filter_etaPT filter_etaPT(5,200);
292  Filter_Combined filter_truth( &filter_etaPT, &filter_etaPT);
293 
295  // Filter_Combined filterRef (&filter_offline, &filter_vertex);
296 
297  int iRefFilter = 1;
298  int iTestFilter = 0;
299 
300  if ( m_runPurity ) {
301  iRefFilter = 0;
302  iTestFilter = 1;
303  }
304 
305  Filter_Combined filterRef( m_filters[iRefFilter][0], &filter );
306  Filter_Combined filterTest( m_filters[iTestFilter][0], &filter );
307 
308 
309  TrigTrackSelector selectorTruth( &filter_truth );
310  TrigTrackSelector selectorRef( &filterRef );
311  m_selectorRef = &selectorRef;
312  TrigTrackSelector selectorTest( &filterTest );
313  m_selectorTest = &selectorTest;
314 
315  if ( xbeam!=0 || ybeam!=0 ) {
316  m_selectorRef->setBeamline( xbeam, ybeam );
317  }
318 
320 
321  // clear the ntuple TIDA::Event class
322  m_event->clear();
323 
325 
326  const xAOD::EventInfo* pEventInfo;
327 
328  unsigned run_number = 0;
329  unsigned long long event_number = 0;
330  unsigned lumi_block = 0;
331  unsigned bunch_crossing_id = 0;
332  unsigned time_stamp = 0;
333  double mu_val = 0;
334 
335  // std::cout << "\tloop() get EventInfo" << std::endl;
336 
337  if ( this->template retrieve(pEventInfo, "EventInfo").isFailure() ) {
338  m_provider->msg(MSG::WARNING) << "Failed to get EventInfo " << endmsg;
339  } else {
340 
341  run_number = pEventInfo->runNumber();
342  event_number = pEventInfo->eventNumber();
343  lumi_block = pEventInfo->lumiBlock();
344  time_stamp = pEventInfo->timeStamp();
345  bunch_crossing_id = pEventInfo->bcid();
346  mu_val = pEventInfo->averageInteractionsPerCrossing();
347  }
348 
349  if(m_provider->msg().level() <= MSG::VERBOSE){
350  m_provider->msg(MSG::VERBOSE) << "run " << run_number
351  << "\tevent " << event_number
352  << "\tlb " << lumi_block << endmsg;
353  }
354 
355  // m_provider->msg(MSG::INFO) << "run " << run_number
356  // << "\tevent " << event_number
357  // << "\tlb " << lumi_block << endmsg;
358 
359  // std::cout << "\trun " << run_number << "\tevent " << event_number << "\tlb " << lumi_block << std::endl;
360 
361 
362  // clear the ntuple TIDA::Event class
363  m_event->clear();
364 
366  m_event->event_number(event_number);
367  m_event->lumi_block(lumi_block);
368  m_event->time_stamp(time_stamp);
369  m_event->bunch_crossing_id(bunch_crossing_id);
370  m_event->mu(mu_val);
371 
374 
375  bool analyse = false;
376 
377  // Check HLTResult
378 
379  // std::cout << "\tloop() loop over trigger chains to determine whether to process this event ..." << std::endl;
380 
381  for ( unsigned ichain=0 ; ichain<m_chainNames.size() ; ichain++ ) {
382 
383  const std::string& chainname = m_chainNames[ichain].head();
384 
385  if ( chainname == "" ) analyse = true;
386  else {
387 
388  //Only for trigger chains
389  if ( chainname.find("L2") == std::string::npos &&
390  chainname.find("EF") == std::string::npos &&
391  chainname.find("HLT") == std::string::npos ) continue;
392 
393  if ( m_provider->msg().level() <= MSG::DEBUG ) {
394  m_provider->msg(MSG::DEBUG) << "Chain " << chainname
395  << "\tpass " << (*m_tdt)->isPassed(chainname)
396  << "\tpres " << (*m_tdt)->getPrescale(chainname) << endmsg;
397  }
398 
399  // std::cout << "\tChain " << chainname << "\tpass " << (*m_tdt)->isPassed(chainname)
400  // << "\tpres " << (*m_tdt)->getPrescale(chainname) << std::endl;
401 
402  if ( (*(m_tdt))->isPassed(chainname) || (*(m_tdt))->getPrescale(chainname) ) analyse = true;
403 
404  }
405  }
406 
407 
408  // if ( (*m_tdt)->ExperimentalAndExpertMethods().isHLTTruncated() ) {
409  // m_provider->msg(MSG::WARNING) << "HLTResult truncated, skipping event" << endmsg;
410  // return;
411  // }
412 
413  if ( !this->m_keepAllEvents && !analyse ) {
414  // m_provider->msg(MSG::VERBOSE) << "No chains passed unprescaled - not processing this event" << endmsg;
415  if(m_provider->msg().level() <= MSG::VERBOSE) {
416  m_provider->msg(MSG::VERBOSE) << "No chains passed unprescaled - not processing this event" << endmsg;
417  }
418  // std::cout << "\tNo chains passed unprescaled - not processing this event" << std::endl;
419  return;
420  }
421 
422 
423 
425 
426  selectorTruth.clear();
427 
428 
429 
430  if(m_provider->msg().level() <= MSG::VERBOSE)
431  m_provider->msg(MSG::VERBOSE) << "MC Truth flag " << m_mcTruth << endmsg;
432 
433  const TrigInDetTrackTruthMap* truthMap = 0;
434 
435  if ( m_mcTruth ) {
436  if(m_provider->msg().level() <= MSG::VERBOSE ) m_provider->msg(MSG::VERBOSE) << "getting Truth" << endmsg;
437 
438  if ( this->template retrieve(truthMap, "TrigInDetTrackTruthMap").isFailure()) {
439  if(m_provider->msg().level() <= MSG::VERBOSE)
440  m_provider->msg(MSG::VERBOSE) << "TrigInDetTrackTruthMap not found" << endmsg;
441  m_hasTruthMap = false;
442  }
443  else {
444  if(m_provider->msg().level() <= MSG::VERBOSE)
445  m_provider->msg(MSG::VERBOSE) << "TrigInDetTrackTruthMap found" << endmsg;
446  m_hasTruthMap = true;
447  }
448  }
449 
450 
452 
453  std::vector<TIDA::Vertex> vertices;
454  std::vector<TIDA::Vertex> vertices_rec;
455 
456  std::vector<double> refbeamspot;
457  std::vector<double> testbeamspot;
458 
460 
461  m_provider->msg(MSG::VERBOSE) << "fetching AOD Primary vertex container" << endmsg;
462 
463  if ( !this->select( vertices, "PrimaryVertices" ) ) {
464  m_provider->msg(MSG::VERBOSE) << "could not retrieve vertex collection " "PrimaryVertices" << std::endl;
465  }
466 
468 
469  if ( m_mcTruth ) {
470  m_event->addChain( "Truth" );
472  m_event->back().back().addTracks(selectorTruth.tracks());
473  }
474 
476 
477  if ( m_doOffline ) {
478  for ( unsigned i=0 ; i<vertices.size() ; i++ ) {
479  if(m_provider->msg().level() <= MSG::VERBOSE)
480  m_provider->msg(MSG::VERBOSE) << "vertex " << i << " " << vertices[i] << endmsg;
481  m_event->addVertex(vertices[i]);
482  }
483  }
484 
486 
487  // int Noff = 0;
488  std::vector<TIDA::Track*> offline_tracks;
489  std::vector<TIDA::Track*> electron_tracks;
490  std::vector<TIDA::Track*> muon_tracks;
491 
492  std::vector<TIDA::Track*> ref_tracks;
493  std::vector<TIDA::Track*> test_tracks;
494 
495  offline_tracks.clear();
496  electron_tracks.clear();
497  muon_tracks.clear();
498 
499  ref_tracks.clear();
500  test_tracks.clear();
501 
502  // offline track retrieval now done once for each chain rather than each roi
503  if ( m_provider->msg().level() <= MSG::VERBOSE )
504  m_provider->msg(MSG::VERBOSE) << "MC Truth flag " << m_mcTruth << endmsg;
505 
506  bool foundTruth = false;
507 
508  if ( !m_doOffline && m_mcTruth ) {
509 
510  filter_truth.setRoi( 0 ); // don't filter on RoI yet (or until needed)
511 
512  selectorTruth.clear();
513 
514  if ( m_provider->msg().level() <= MSG::VERBOSE )
515  m_provider->msg(MSG::VERBOSE) << "getting Truth" << endmsg;
516 
517  if ( m_provider->evtStore()->template contains<TruthParticleContainer>("INav4MomTruthEvent") ) {
518  //ESD
519  this->template selectTracks<TruthParticleContainer>( &selectorTruth, "INav4MomTruthEvent" );
520  foundTruth = true;
521  }
522  else if ( m_provider->evtStore()->template contains<TruthParticleContainer>("SpclMC") ) {
524  this->template selectTracks<TruthParticleContainer>( &selectorTruth, "SpclMC");
525  foundTruth = true;
526  }
527  else if ( m_provider->evtStore()->template contains<xAOD::TruthParticleContainer>("TruthParticles") ) {
529  this->template selectTracks<xAOD::TruthParticleContainer>( &selectorTruth, "TruthParticles");
530  foundTruth = true;
531  }
532  else if ( m_provider->evtStore()->template contains<TruthParticleContainer>("") ) {
534  this->template selectTracks<TruthParticleContainer>( &selectorTruth, "");
535  foundTruth = true;
536  }
537  else
538  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
539  m_provider->msg(MSG::VERBOSE) << "Truth not found - none whatsoever!" << endmsg;
540  }
541  }
542 
543  if ( !m_doOffline && m_mcTruth && !foundTruth ) {
544 
545  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
546  m_provider->msg(MSG::VERBOSE) << "getting Truth" << endmsg;
547  }
548 
550 
551  const DataHandle<McEventCollection> mcevent;
552 
554 
555  std::string keys[4] = { "GEN_AOD", "TruthEvent", "", "G4Truth" };
556 
557  std::string key = "";
558 
559  bool foundcollection = false;
560 
561  for ( int ik=0 ; ik<4 ; ik++ ) {
562 
563  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
564  m_provider->msg(MSG::VERBOSE) << "Try McEventCollection: " << keys[ik] << endmsg;
565  }
566 
567  if ( !m_provider->evtStore()->template contains<McEventCollection>(keys[ik]) ) {
568  if( m_provider->msg().level() <= MSG::VERBOSE )
569  m_provider->msg(MSG::VERBOSE) << "No McEventCollection: " << keys[ik] << endmsg;
570  continue;
571  }
572 
573  if ( m_provider->msg().level() <= MSG::VERBOSE )
574  m_provider->msg(MSG::VERBOSE) << "evtStore()->retrieve( mcevent, " << keys[ik] << " )" << endmsg;
575 
576  if ( this->template retrieve( mcevent, keys[ik] ).isFailure() ) {
577  if ( m_provider->msg().level() <= MSG::VERBOSE )
578  m_provider->msg(MSG::VERBOSE) << "Failed to get McEventCollection: " << keys[ik] << endmsg;
579  }
580  else {
582  key = keys[ik];
583  if(m_provider->msg().level() <= MSG::VERBOSE)
584  m_provider->msg(MSG::VERBOSE) << "Found McEventCollection: " << key << endmsg;
585  foundcollection = true;
586  break;
587  }
588  }
589 
591  if ( !foundcollection ) {
592  if(m_provider->msg().level() <= MSG::VERBOSE)
593  m_provider->msg(MSG::WARNING) << "No MC Truth Collections of any sort, whatsoever!!!" << endmsg;
594 
595  // m_tree->Fill();
596  // return StatusCode::FAILURE;
597 
598  return;
599  }
600 
601  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
602  m_provider->msg(MSG::VERBOSE) << "Found McEventCollection: " << key << "\tNevents " << mcevent->size() << endmsg;
603  }
604 
605  McEventCollection::const_iterator evitr = mcevent->begin();
606  McEventCollection::const_iterator evend = mcevent->end();
607 
608  unsigned ie = 0;
609  unsigned ip = 0;
610 
611  unsigned ie_ip = 0;
612 
613  while ( evitr!=evend ) {
614 
615  int _ip = 0;
616 
617  int pid = HepMC::signal_process_id((*evitr));
618 
619  //The logic should be clarified here
620  if ( pid!=0 ) {
621 
622  for (auto pitr: *(*evitr) ) {
623 
624  selectorTruth.selectTrack( pitr );
625 
626  ++_ip;
627 
628  }
629 
630  }
631  ++ie;
632  ++evitr;
633 
634  if ( _ip>0 ) {
636  // m_provider->msg(MSG::VERBOSE) << "Found " << ie << "\tpid " << pid << "\t with " << ip << " TruthParticles (GenParticles)" << endmsg;
637  ++ie_ip;
638  ip += _ip;
639  }
640  }
641 
642  if(m_provider->msg().level() <= MSG::VERBOSE){
643  m_provider->msg(MSG::VERBOSE) << "Found " << ip << " TruthParticles (GenParticles) in " << ie_ip << " GenEvents out of " << ie << endmsg;
644  m_provider->msg(MSG::VERBOSE) << "selected " << selectorTruth.size() << " TruthParticles (GenParticles)" << endmsg;
645  }
646 
647  if(selectorTruth.size() > 0) foundTruth = true;
648 
649  if ( !(ip>0) ) {
650  if (m_provider->msg().level() <= MSG::VERBOSE) m_provider->msg(MSG::WARNING) << "NO TRUTH PARTICLES - returning" << endmsg;
651  return;
652  }
653 
654  }
655 
656  // m_provider->msg(MSG::VERBOSE) << " Offline tracks " << endmsg;
657 
658  if ( m_doOffline ) {
659 
660  if ( m_provider->evtStore()->template contains<xAOD::TrackParticleContainer>("InDetTrackParticles") ) {
661  this->template selectTracks<xAOD::TrackParticleContainer>( m_selectorRef, "InDetTrackParticles" );
662  refbeamspot = this->template getBeamspot<xAOD::TrackParticleContainer>( "InDetTrackParticles" );
663  }
664  else if (m_provider->evtStore()->template contains<Rec::TrackParticleContainer>("TrackParticleCandidate") ) {
665  this->template selectTracks<Rec::TrackParticleContainer>( m_selectorRef, "TrackParticleCandidate" );
666  }
667  else if ( m_provider->msg().level() <= MSG::WARNING ) {
668  m_provider->msg(MSG::WARNING) << " Offline tracks not found " << endmsg;
669  }
670 
671  }
672 
673 
674  // std::cout << "\tloop() loop over chains proper ..." << std::endl;
675 
677  for ( unsigned ichain=0 ; ichain<m_chainNames.size() ; ichain++ ) {
678 
680 
681  // std::string& chainname = chains[ichain];
682  const std::string& chainname = m_chainNames[ichain].head();
683  const std::string& key = m_chainNames[ichain].tail();
684  const std::string& vtx_name = m_chainNames[ichain].vtx();
685  //Not used left just in case
686  //const std::string& roi_name = m_chainNames[ichain].roi();
687  //const std::string& te_name = m_chainNames[ichain].element();
688  m_pTthreshold = 0;
689 
690  if ( m_chainNames[ichain].postcount() ) {
691  std::string ptvalue = m_chainNames[ichain].postvalue("pt");
692  if ( ptvalue!="" ) m_pTthreshold = std::stod(ptvalue);
693  }
694 
695 
696  unsigned _decisiontype = TrigDefs::Physics;
697  unsigned decisiontype;
698 
699  if ( this->requireDecision() ) _decisiontype = TrigDefs::requireDecision;
700 
701 
702  if ( m_chainNames[ichain].passed() ) decisiontype = _decisiontype;
703  else decisiontype = TrigDefs::alsoDeactivateTEs;
704 
706  // if ( decisiontype==TrigDefs::requireDecision ) std::cout << "\tSUTT TrigDefs::requireDecision " << decisiontype << std::endl;
707  // if ( decisiontype==TrigDefs::Physics ) std::cout << "\tSUTT TrigDefs::Physics " << decisiontype << std::endl;
708 
709  if ( chainname!="" && m_provider->msg().level() <= MSG::VERBOSE ) {
710 
711  m_provider->msg(MSG::VERBOSE) << "status for chain " << chainname
712  << "\tpass " << (*m_tdt)->isPassed(chainname)
713  << "\tprescale " << (*m_tdt)->getPrescale(chainname) << endmsg;
714 
715  m_provider->msg(MSG::VERBOSE) << "fetching features for chain " << chainname << endmsg;
716 
717  m_provider->msg(MSG::VERBOSE) << chainname << "\tpassed: " << (*m_tdt)->isPassed( chainname ) << endmsg;
718  }
719 
721  // std::cout << "\tstatus for chain " << chainname
722  // << "\tpass " << (*m_tdt)->isPassed( chainname )
723  // << "\tpassdt " << (*m_tdt)->isPassed( chainname, decisiontype )
724  // << "\tprescale " << (*m_tdt)->getPrescale( chainname ) << std::endl;
725 
726 
727  // m_provider->msg(MSG::INFO) << chainname << "\tpassed: " << (*m_tdt)->isPassed( chainname ) << "\t" << m_chainNames[ichain] << "\trun " << run_number << "\tevent " << event_number << endmsg;
728 
729 
730  if ( chainname!="" && !this->m_keepAllEvents && !(*m_tdt)->isPassed( chainname, decisiontype ) ) continue;
731 
732 
735  // Trig::FeatureContainer f = (*m_tdt)->features( chainname, TrigDefs::alsoDeactivateTEs);
736 
739 
740  // tag and probe analysis processes multiple chains passed in the tag and probe tool at once so loop over vector of chains
741  std::vector<std::string> chainNames ;
742 
743  if ( !TnP_flag ) {
744  chainNames.push_back(m_chainNames[ichain].raw()) ;
745  }
746  else {
747  chainNames.push_back(m_TnP_tool->tag()) ;
748  chainNames.push_back(m_TnP_tool->probe()) ;
749  }
750 
751  // loop over new chainNames vector but doing the same stuff
752  for ( unsigned i = 0 ; i < chainNames.size() ; ++i ) {
753 
754  ChainString chainConfig = chainNames[i] ;
755  std::string chainName = chainConfig.head();
756 
757  m_event->addChain( chainNames[i] );
758 
760 
761  if ( chainName == "" ) {
762 
764 
766 
768 
769  TIDARoiDescriptor* roiInfo = new TIDARoiDescriptor(true);
770 
771  chain.addRoi( *roiInfo );
772 
773  if ( m_provider->evtStore()->template contains<xAOD::TrackParticleContainer>(key) ) {
774  this->template selectTracks<xAOD::TrackParticleContainer>( m_selectorTest, key );
775  refbeamspot = this->template getBeamspot<xAOD::TrackParticleContainer>( key );
776  }
777 
778  const std::vector<TIDA::Track*>& testtracks = m_selectorTest->tracks();
779 
780  chain.back().addTracks(testtracks);
781 
782  if ( vtx_name!="" ) {
783 
785 
786  m_provider->msg(MSG::VERBOSE) << "\tFetch xAOD::VertexContainer with key " << vtx_name << endmsg;
787 
788  std::vector<TIDA::Vertex> tidavertices;
789 
790  if ( this->select( tidavertices, vtx_name ) ) chain.back().addVertices( tidavertices );
791  }
792 
793 
794  if ( roiInfo ) delete roiInfo;
795 
796  }
797  else {
798 
800 
801  //std::string roi_key = m_chainNames[ichain].roi();
802 
803  std::string roi_key = chainConfig.roi();
804 
805  unsigned feature_type =TrigDefs::lastFeatureOfType;
806 
807  if ( roi_key!="" ) feature_type= TrigDefs::allFeaturesOfType;
808 
810 
811  int leg = -1;
812 
813  if ( chainConfig.element()!="" ) {
814  leg = std::atoi(chainConfig.element().c_str());
815  }
816 
817  std::vector< TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> > rois =
818  (*m_tdt)->template features<TrigRoiDescriptorCollection>( Trig::FeatureRequestDescriptor( chainName,
819  decisiontype,
820  roi_key,
821  feature_type,
822  "roi",
823  leg ) );
824 
825  // const unsigned int featureCollectionMode = const std::string& navElementLinkKey = "roi") const;
826 
827  int iroi = 0;
828 
830 
831  iroi++;
832 
836 
837  if ( roi_key=="SuperRoi" && iroi>1 ) continue;
838 
839  // std::cout << "\troi: get link " << roi_key << " ..." << std::endl;
840 
841  const ElementLink<TrigRoiDescriptorCollection> roi_link = roi_info.link;
842 
844  if ( roi_key!="" && roi_link.dataID()!=roi_key ) continue;
845 
846  const TrigRoiDescriptor* const* roiptr = roi_link.cptr();
847 
848  if ( roiptr == 0 ) {
849  continue;
850  }
851 
852  // std::cout << "\troi: link deref ..." << *roiptr << std::endl;
853 
854  if (m_provider->msg().level() <= MSG::VERBOSE) {
855  m_provider->msg(MSG::VERBOSE) << " RoI descriptor for seeded chain " << chainname << " " << **roiptr << endmsg;
856  }
857 
859 
860  // if ( dbg ) std::cout << "\troi " << iroi << " " << *roiInfo << std::endl;
861 
863 
865 
866  if ( this->template selectTracks<xAOD::TrackParticleContainer>( m_selectorTest, roi_link, key ) ) { }
867 
868  // beamspot stuff not needed for xAOD::TrackParticles
869 
871 
872  chain.addRoi( *roiInfo );
873 
875 
876  const std::vector<TIDA::Track*>& testtracks = m_selectorTest->tracks();
877 
878  chain.back().addTracks(testtracks);
879 
880 
882 
883  if ( vtx_name!="" ) {
884 
885  std::vector<TIDA::Vertex> tidavertices;
886 
887  this->select( tidavertices, roi_link, vtx_name );
888 
889  chain.back().addVertices( tidavertices );
890 
891  }
892 
893 
894 #if 0
895  if ( dbg ) {
896  std::cout << "\tTIDA analysis for chain: " << chainname << "\t key: " << key << "\t" << **roiptr << std::endl;
897  std::cout << "\tcollections: " << chain.back() << std::endl;
898  }
899 #endif
900 
901  if ( roiInfo ) delete roiInfo;
902 
903  }
904 
905 
906  }
907 
908  } // end of loop chainNames vector loop
909 
910 
911  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
912  m_provider->msg(MSG::VERBOSE) << "event: " << *m_event << endmsg;
913  }
914 
915  }
916 
917  // close previous loop over chains and open new one
918 
919  for ( unsigned ichain=0 ; ichain<m_event->size() ; ichain++ ) {
920 
921  TIDA::Chain& chain = (*m_event)[ichain];
922  ChainString chainConfig(chain.name());
923  const std::string& vtx_name = chainConfig.vtx();
924 
925  // skip tag chains to avoid performing standard analysis on them (done for tnp at the same time as probes)
926  if ( TnP_flag && chainConfig.extra().find("_tag")!=std::string::npos ) continue ;
927 
928  std::vector<TIDA::Roi*> rois ;
929 
930  if (TnP_flag) {
932  // needs to be done AFTER retrieving offline tracks as m_selectorRef passed as arguement, hence restructuring
933  }
934  else {
935  rois.reserve( chain.size() );
936  for ( size_t ir=0 ; ir<chain.size() ; ir++ ) {
937  rois.push_back( &(chain.rois()[ir]) );
938  }
939  }
940 
941  // now loop over the rois (again)
942 
943  for ( unsigned iroi=0 ; iroi<rois.size() ; iroi++ ) {
944 
945  if ( this->filterOnRoi() ) {
946  filterRef.setRoi( &(rois.at(iroi)->roi() ) );
947  filterRef.containtracks( m_containTracks );
948  }
949  else filterRef.setRoi( 0 );
950 
951  test_tracks.clear();
952 
953  // this block is before the track retrieval in the original, is it working the same here?
954 
968 
969  if ( m_provider->msg().level() <= MSG::VERBOSE )
970  m_provider->msg(MSG::VERBOSE) << "MC Truth flag " << m_mcTruth << endmsg;
971 
972  if ( !m_doOffline && m_mcTruth ) {
973  if ( this->filterOnRoi() ) filter_truth.setRoi( &(rois.at(iroi)->roi() ) );
974  ref_tracks = m_selectorRef->tracks(&filter_truth);
975  }
976  else { // ie. if ( m_doOffline )
977  ref_tracks = m_selectorRef->tracks(&filterRef) ;
978  }
979 
980  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
981  m_provider->msg(MSG::VERBOSE) << "ref tracks.size() " << m_selectorRef->tracks().size() << endmsg;
982  for ( int ii=m_selectorRef->tracks().size() ; ii-- ; ) {
983  m_provider->msg(MSG::VERBOSE) << " ref track " << ii << " " << *m_selectorRef->tracks()[ii] << endmsg;
984  }
985  }
986 
987  test_tracks.clear();
988 
989 
990  for ( unsigned itrk=0 ; itrk<rois.at(iroi)->tracks().size() ; itrk++ ) {
991  test_tracks.push_back(&(rois.at(iroi)->tracks().at(itrk)));
992  }
993 
994  // std::cout << "sutt track multiplicities: offline " << offline_tracks.size() << "\ttest " << test_tracks.size() << std::endl;
995 
996  _analysis->setvertices( vertices.size() );
997 
998  if ( refbeamspot.size()>0 ) _analysis->setBeamRef( refbeamspot );
999  if ( testbeamspot.size()>0 ) _analysis->setBeamTest( testbeamspot );
1000 
1003 
1004  if ( m_runPurity ) {
1005 
1006  if ( this->getUseHighestPT() ) HighestPTOnly( test_tracks );
1007 
1008  if ( m_pTthreshold>0 ) FilterPT( test_tracks, m_pTthreshold );
1009 
1011  m_NRois++;
1012  m_NRefTracks += test_tracks.size();
1013  m_NTestTracks += ref_tracks.size();
1014 
1015 
1017  m_associator->match( test_tracks, ref_tracks );
1018 
1019  _analysis->execute( test_tracks, ref_tracks, m_associator );
1020 
1021  }
1022  else {
1023 
1025  if ( this->getUseHighestPT() ) HighestPTOnly( ref_tracks );
1026 
1028 
1029  if ( m_pTthreshold>0 ) FilterPT( ref_tracks, m_pTthreshold );
1030 
1032  m_NRois++;
1033  m_NRefTracks += ref_tracks.size();
1034  m_NTestTracks += test_tracks.size();
1035 
1037  m_associator->match( ref_tracks, test_tracks );
1038 
1039  _analysis->setroi( &rois.at(iroi)->roi() );
1040  _analysis->execute( ref_tracks, test_tracks, m_associator );
1041 
1042  if ( vtx_name!="" ) {
1044  std::vector<TIDA::Vertex> vr = rois.at(iroi)->vertices();
1045  std::vector<TIDA::Vertex*> vtx_rec;
1046  for ( unsigned iv=0 ; iv<vr.size() ; iv++ ) vtx_rec.push_back( &vr[iv] );
1047 
1048  std::vector<TIDA::Vertex*> vtx;
1049  if ( this->getVtxIndex()<0 ) {
1050  for ( unsigned iv=0 ; iv<vertices.size() ; iv++ ) vtx.push_back( &vertices[iv] );
1051  }
1052  else {
1053  if ( vertices.size()>unsigned(this->getVtxIndex()) ) vtx.push_back( &vertices[this->getVtxIndex()] );
1054  }
1055 
1056  _analysis->execute_vtx( vtx, vtx_rec, m_event );
1057  }
1058 
1059  }
1060 
1061  if ( _analysis->debug() ) {
1062  m_provider->msg(MSG::INFO) << "Missing track for " << m_chainNames[ichain]
1063  << "\trun " << run_number
1064  << "\tevent " << event_number
1065  << "\tlb " << lumi_block << endmsg;
1066  }
1067 
1068  }
1069 
1070  }
1071 
1072  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
1073  m_provider->msg(MSG::VERBOSE) << "\n\nEvent " << *m_event << endmsg;
1074  }
1075  }
1076 
1077 
1078 
1079  virtual void book() {
1080 
1081  if(m_provider->msg().level() <= MSG::VERBOSE)
1082  m_provider->msg(MSG::VERBOSE) << "AnalysisConfigMT_Tier0::book() " << name() << endmsg;
1083 
1084  m_provider->msg(MSG::ERROR) << "AnalysisConfigMT_Tier0::book() should no longer be called: " << name() << endmsg;
1085 
1086 
1087  }
1088 
1089 
1090 
1091  virtual void finalize() {
1092 
1093  if(m_provider->msg().level() <= MSG::VERBOSE){
1094  m_provider->msg(MSG::VERBOSE) << "AnalysisConfigMT_Tier0::finalise() " << m_provider->name() << endmsg;
1095  }
1096 
1097  m_analysis->finalise();
1098 
1099  // deleting instance of TnP_tool and setting pointer to null
1100  if ( m_TnP_tool != 0 ) {
1101  delete m_TnP_tool ;
1102  m_TnP_tool = 0 ;
1103  }
1104 
1105  m_provider->msg(MSG::INFO) << m_provider->name() << " " << m_chainNames[0] << " \tNRois processed: " << m_NRois << "\tRef tracks: " << m_NRefTracks << "\tTestTracks: " << m_NTestTracks << endmsg;
1106 
1107  if(m_provider->msg().level() <= MSG::VERBOSE) {
1108  m_provider->msg(MSG::VERBOSE) << m_provider->name() << " finalised" << endmsg;
1109  }
1110  }
1111 
1112  void set_monTool( ToolHandle<GenericMonitoringTool>* m ) { m_monTool=m; }
1113 
1114  ToolHandle<GenericMonitoringTool>* monTool() { return m_monTool; }
1115 
1116 protected:
1117 
1119 
1121 
1122  std::vector<ChainString> m_chainNames;
1123  std::vector<A*> m_analyses;
1124  std::string m_testType;
1125 
1129  bool m_doTaus;
1134 
1135  std::string m_outputFileName;
1136 
1138  int m_NRois;
1141 
1143 
1145 
1147 
1148  bool m_first;
1149 
1151 
1153 
1156 
1157  ToolHandle<GenericMonitoringTool>* m_monTool;
1158 
1159 };
1160 
1161 
1162 
1163 #endif // TrigInDetAnalysisExample_T_AnalysisConfigMT_Tier0_H
1164 
T_AnalysisConfigMT_Tier0::m_containTracks
bool m_containTracks
Definition: T_AnalysisConfigMT_Tier0.h:1150
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
T_AnalysisConfig< T >::m_selectorRef
TrigTrackSelector * m_selectorRef
Definition: T_AnalysisConfig.h:979
T_AnalysisConfigMT_Tier0::T_AnalysisConfigMT_Tier0
T_AnalysisConfigMT_Tier0(const std::string &analysisInstanceName, const std::string &testChainName, const std::string &testType, const std::string &testKey, const std::string &referenceChainName, const std::string &referenceType, const std::string &referenceKey, TrackFilter *testFilter, TrackFilter *referenceFilter, TrackAssociator *associator, TrackAnalysis *analysis, TagNProbe *TnP_tool=0)
Definition: T_AnalysisConfigMT_Tier0.h:103
Trig::FeatureRequestDescriptor
Definition: FeatureRequestDescriptor.h:37
TIDA::Associator
Definition: TIDAAssociator.h:24
TIDARoiDescriptorBuilder.h
T_AnalysisConfig< T >::m_mcTruth
bool m_mcTruth
Definition: T_AnalysisConfig.h:986
Filter_RoiSelector.h
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
GenEvent.h
plotting.plot_kinematics.run_number
run_number
Definition: plot_kinematics.py:29
ElectronContainer.h
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
T_AnalysisConfigMT_Tier0::m_doTaus
bool m_doTaus
Definition: T_AnalysisConfigMT_Tier0.h:1129
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
T_AnalysisConfigMT_Tier0::setShifter
void setShifter(bool b)
Definition: T_AnalysisConfigMT_Tier0.h:166
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
T_AnalysisConfig< T >::m_provider
T * m_provider
Definition: T_AnalysisConfig.h:955
TrigTrackSelector::clear
virtual void clear() override
Definition: TrigTrackSelector.h:102
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
TrigCompositeUtils.h
T_AnalysisConfigMT_Tier0::m_NTestTracks
int m_NTestTracks
Definition: T_AnalysisConfigMT_Tier0.h:1140
TrackAnalysis::finalise
virtual void finalise()=0
TIDA::Roi::addTracks
void addTracks(const std::vector< TIDA::Track > &tracks)
accessors for the track vector
Definition: TIDARoi.h:46
T_AnalysisConfig< T >::m_tdt
ToolHandle< Trig::TrigDecisionTool > * m_tdt
Definition: T_AnalysisConfig.h:957
TIDAEvent.h
Basic event class to contain a vector of chains for trigger analysis
T_AnalysisConfigMT_Tier0::m_outputFileName
std::string m_outputFileName
Definition: T_AnalysisConfigMT_Tier0.h:1135
TruthParticleContainer.h
TrackFilter
Definition: TrackFilter.h:26
HepMC::signal_process_id
int signal_process_id(const GenEvent &e)
Definition: GenEvent.h:635
TrackSelector::size
unsigned size() const
Definition: Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/TrackSelector.h:63
T_AnalysisConfigMT_Tier0::m_runPurity
bool m_runPurity
Definition: T_AnalysisConfigMT_Tier0.h:1142
Filter_etaPT
Definition: Filter_etaPT.h:27
Analysis_Tier0.h
GenVertex.h
TIDA::Event::size
unsigned size() const
vertex multiplicity ?
Definition: TIDAEvent.h:64
TIDAVertex.h
ChainString::head
std::string head() const
Definition: ChainString.h:33
JiveXML::Event
struct Event_t Event
Definition: ONCRPCServer.h:65
MuonContainer.h
Filters.h
T_AnalysisConfigMT_Tier0::m_first
bool m_first
Definition: T_AnalysisConfigMT_Tier0.h:1148
T_AnalysisConfig< T >::analysis
const TrackAnalysis * analysis() const
Definition: T_AnalysisConfig.h:256
T_AnalysisConfigMT_Tier0::m_pTthreshold
double m_pTthreshold
Definition: T_AnalysisConfigMT_Tier0.h:1146
T_AnalysisConfigMT_Tier0::loop
virtual void loop()
Definition: T_AnalysisConfigMT_Tier0.h:191
TIDARoiDescriptor
Describes the Region of Ineterest geometry It has basically 8 parameters.
Definition: TIDARoiDescriptor.h:42
T_AnalysisConfigMT_Tier0::m_NRois
int m_NRois
output stats
Definition: T_AnalysisConfigMT_Tier0.h:1138
T_AnalysisConfigMT_Tier0::~T_AnalysisConfigMT_Tier0
virtual ~T_AnalysisConfigMT_Tier0()
Definition: T_AnalysisConfigMT_Tier0.h:159
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
ChainString
Definition: ChainString.h:23
TIDATools.h
useful tool for the TrigInDetAnalysis class code
T_AnalysisConfigMT_Tier0::m_hasTruthMap
bool m_hasTruthMap
Definition: T_AnalysisConfigMT_Tier0.h:1131
TrigTrackSelector
L2 tracks.
Definition: TrigTrackSelector.h:58
T_AnalysisConfigMT_Tier0::m_doElectrons
bool m_doElectrons
Definition: T_AnalysisConfigMT_Tier0.h:1128
ExpertMethods.h
T_AnalysisConfigMT_Tier0::m_TnP_tool
TagNProbe * m_TnP_tool
Definition: T_AnalysisConfigMT_Tier0.h:1152
T_AnalysisConfig< T >::getUseHighestPT
bool getUseHighestPT() const
Definition: T_AnalysisConfig.h:277
Filter_AcceptAll.h
T_AnalysisConfig.h
HLTResult.h
Associator_BestMatch.h
TIDA::Event
Definition: TIDAEvent.h:33
TIDA::Event::lumi_block
void lumi_block(unsigned lb)
Definition: TIDAEvent.h:44
ChainString::roi
std::string roi() const
Definition: ChainString.h:35
GenParticle.h
T_AnalysisConfigMT_Tier0::setRunPurity
void setRunPurity(bool b)
Definition: T_AnalysisConfigMT_Tier0.h:164
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
TIDA::Event::chains
const std::vector< TIDA::Chain > & chains() const
Definition: TIDAEvent.h:76
TIDA::Chain::addRoi
void addRoi(TIDA::Roi &roi)
add and roi by root dictionary class
Definition: TIDAChain.h:44
PlotCalibFromCool.ie
ie
Definition: PlotCalibFromCool.py:420
covarianceTool.filter
filter
Definition: covarianceTool.py:514
ChainString::extra
std::string extra() const
Definition: ChainString.h:38
TIDA::Chain::back
TIDA::Roi & back()
Definition: TIDAChain.h:60
T_AnalysisConfigMT_Tier0
Definition: T_AnalysisConfigMT_Tier0.h:93
T_AnalysisConfigMT_Tier0::m_tauEtCutOffline
bool m_tauEtCutOffline
Definition: T_AnalysisConfigMT_Tier0.h:1133
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
FilterPT
void FilterPT(std::vector< T * > &tracks, double pt)
Definition: TIDATools.h:41
TIDDirectory.h
class to keep a directory for each object in a root sort of way, but needed to keep the root objects ...
T_AnalysisConfigMT_Tier0::m_doTauThreeProng
bool m_doTauThreeProng
Definition: T_AnalysisConfigMT_Tier0.h:1132
TagNProbe
Definition: TagNProbe.h:28
T_AnalysisConfigMT_Tier0::finalize
virtual void finalize()
Definition: T_AnalysisConfigMT_Tier0.h:1091
GenericMonitoringTool.h
A
T_AnalysisConfigMT_Tier0::containTracks
void containTracks(bool b)
Definition: T_AnalysisConfigMT_Tier0.h:170
TagNProbe.h
emacs: this is -*- c++ -*-
TIDA::Event::addChain
void addChain(const std::string &chainname)
methods to add and access chains
Definition: TIDAEvent.h:67
T_AnalysisConfigMT_Tier0::set_monTool
void set_monTool(ToolHandle< GenericMonitoringTool > *m)
Definition: T_AnalysisConfigMT_Tier0.h:1112
TIDA::Event::time_stamp
void time_stamp(unsigned t)
Definition: TIDAEvent.h:45
T_AnalysisConfigMT_Tier0::m_invmass_obj
TH1F * m_invmass_obj
Definition: T_AnalysisConfigMT_Tier0.h:1155
McEventCollection.h
TIDA::Event::back
TIDA::Chain & back()
get the last chain from the vector
Definition: TIDAEvent.h:89
lumiFormat.i
int i
Definition: lumiFormat.py:85
TIDA::Event::event_number
void event_number(unsigned long long e)
Definition: TIDAEvent.h:43
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TagNProbe::tag
void tag(const std::string &chainName)
getters and setters
Definition: TagNProbe.h:45
TrackSelector.h
T_AnalysisConfig< T >::m_analysis
TrackAnalysis * m_analysis
Definition: T_AnalysisConfig.h:984
T_AnalysisConfig< T >::getVtxIndex
int getVtxIndex() const
Definition: T_AnalysisConfig.h:280
TrigInDetTrackTruthMap
Definition: TrigInDetTrackTruthMap.h:38
TrackAnalysis
Definition: TrackAnalysis.h:32
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
T_AnalysisConfigMT_Tier0::m_monTool
ToolHandle< GenericMonitoringTool > * m_monTool
Definition: T_AnalysisConfigMT_Tier0.h:1157
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
compute_lumi.leg
leg
Definition: compute_lumi.py:95
Filter_etaPT.h
HighestPTOnly
void HighestPTOnly(std::vector< T * > &tracks)
Definition: TIDATools.h:20
TauJetContainer.h
T_AnalysisConfig< T >::m_keepAllEvents
bool m_keepAllEvents
Definition: T_AnalysisConfig.h:993
VxContainer.h
T_AnalysisConfigMT_Tier0::m_event
TIDA::Event * m_event
Definition: T_AnalysisConfigMT_Tier0.h:1120
T_AnalysisConfigMT_Tier0::m_NRefTracks
int m_NRefTracks
Definition: T_AnalysisConfigMT_Tier0.h:1139
Filter_True
default simple filter which accepts all tracks
Definition: Filters.h:26
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
T_AnalysisConfigMT_Tier0::m_doMuons
bool m_doMuons
Definition: T_AnalysisConfigMT_Tier0.h:1127
VtxAnalysis.h
T_AnalysisConfigMT_Tier0::m_useBeamCondSvc
bool m_useBeamCondSvc
Definition: T_AnalysisConfigMT_Tier0.h:1118
TrigTrackSelector::selectTrack
bool selectTrack(const TrigInDetTrack *track, const TrigInDetTrackTruthMap *truthMap=0)
neater code to make use of vector function also for a single ancestor pdgid, instead of the full code...
Definition: TrigTrackSelector.cxx:116
grepfile.ic
int ic
Definition: grepfile.py:33
T_AnalysisConfigMT_Tier0::monTool
ToolHandle< GenericMonitoringTool > * monTool()
Definition: T_AnalysisConfigMT_Tier0.h:1114
xAOD::EventInfo_v1::averageInteractionsPerCrossing
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
Definition: EventInfo_v1.cxx:397
T_AnalysisConfigMT_Tier0::m_doBjets
bool m_doBjets
Definition: T_AnalysisConfigMT_Tier0.h:1130
ChainString::element
std::string element() const
Definition: ChainString.h:37
T_AnalysisConfig< T >::retrieve
StatusCode retrieve(Collection const *&collection, const std::string &key="")
Definition: T_AnalysisConfig.h:571
dbg
Definition: SGImplSvc.cxx:69
T_AnalysisConfig< T >::m_associator
TrackAssociator * m_associator
Definition: T_AnalysisConfig.h:983
TrackSelector::tracks
const std::vector< TIDA::Track * > & tracks() const
Definition: Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/TrackSelector.h:53
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
ChainString.h
Filter_Combined
Definition: Filters.h:225
TIDA::Chain
Definition: TIDAChain.h:28
DataHandle
an iterator over instances of a given type in StoreGateSvc. It d-casts and caches locally the pointed...
Definition: DataHandle.h:42
TIDARoiDescriptorBuilder
Definition: TIDARoiDescriptorBuilder.h:21
TIDA::Event::addVertex
void addVertex(const TIDA::Vertex &v)
Definition: TIDAEvent.h:71
EventInfo.h
TIDA::Event::clear
void clear()
clear the event
Definition: TIDAEvent.h:86
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
T_AnalysisConfigMT_Tier0::m_analyses
std::vector< A * > m_analyses
Definition: T_AnalysisConfigMT_Tier0.h:1123
Filter_Combined::containtracks
void containtracks(bool b=true)
set / unset the flag to determine whether tracks should be fully contained in the RoI or not
Definition: Filters.h:242
TIDA::Event::mu
void mu(double m)
Definition: TIDAEvent.h:47
python.copyTCTOutput.chains
chains
Definition: copyTCTOutput.py:81
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
TrackParticle.h
Filter_Combined::setRoi
void setRoi(TIDARoiDescriptor *r)
Definition: Filters.h:236
T_AnalysisConfigMT_Tier0::_analysis
A * _analysis
Definition: T_AnalysisConfigMT_Tier0.h:174
TagNProbe::GetRois
std::vector< TIDA::Roi * > GetRois(std::vector< TIDA::Chain > &chains, const TrackSelector *selector, TrackFilter *filter, T *hmass, T *hmass_obj, TrigObjectMatcher *tom=0) const
Definition: TagNProbe.h:60
TrigCompositeUtils::LinkInfo
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition: LinkInfo.h:28
T_AnalysisConfigMT_Tier0::book
virtual void book()
Definition: T_AnalysisConfigMT_Tier0.h:1079
AnalysisR3_Tier0.h
ChainString::vtx
std::string vtx() const
Definition: ChainString.h:36
T_AnalysisConfigMT_Tier0::m_chainNames
std::vector< ChainString > m_chainNames
Definition: T_AnalysisConfigMT_Tier0.h:1122
DEBUG
#define DEBUG
Definition: page_access.h:11
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
TriggerTest.rois
rois
Definition: TriggerTest.py:23
TrigTrackSelector::setBeamline
void setBeamline(double x, double y, double z=0)
Definition: TrigTrackSelector.h:94
xAOD::EventInfo_v1::timeStamp
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
T_AnalysisConfig< T >::filterOnRoi
bool filterOnRoi() const
Definition: T_AnalysisConfig.h:282
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
T_AnalysisConfigMT_Tier0::m_invmass
TH1F * m_invmass
Definition: T_AnalysisConfigMT_Tier0.h:1154
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
T_AnalysisConfig< T >::name
const std::string name() const
Definition: T_AnalysisConfig.h:233
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
TIDA::Associator::match
virtual void match(const std::vector< T * > &s1, const std::vector< S * > &s2)=0
python.StandardJetMods.vr
vr
Definition: StandardJetMods.py:294
TIDA::Event::bunch_crossing_id
void bunch_crossing_id(unsigned b)
Definition: TIDAEvent.h:46
T_AnalysisConfig< T >::m_filters
std::vector< std::vector< TrackFilter * > > m_filters
Definition: T_AnalysisConfig.h:977
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
TIDA::Event::run_number
void run_number(unsigned r)
accessors
Definition: TIDAEvent.h:42
T_AnalysisConfig< T >::m_selectorTest
TrigTrackSelector * m_selectorTest
Definition: T_AnalysisConfig.h:980
T_AnalysisConfigMT_Tier0::useBeamCondSvc
void useBeamCondSvc(bool b)
Definition: T_AnalysisConfigMT_Tier0.h:168
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TrackParticleContainer.h
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
TagNProbe::probe
void probe(const std::string &chainName)
Definition: TagNProbe.h:46
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
T_AnalysisConfig< T >::requireDecision
bool requireDecision() const
Definition: T_AnalysisConfig.h:286
T_AnalysisConfigMT_Tier0::m_shifter
bool m_shifter
Definition: T_AnalysisConfigMT_Tier0.h:1144
T_AnalysisConfig< T >::select
bool select(std::vector< TIDA::Vertex > &vertices, xAOD::VertexContainer::const_iterator vtx_start, xAOD::VertexContainer::const_iterator vtx_end)
Definition: T_AnalysisConfig.h:340
T_AnalysisConfig
Definition: T_AnalysisConfig.h:59
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
T_AnalysisConfigMT_Tier0::m_testType
std::string m_testType
Definition: T_AnalysisConfigMT_Tier0.h:1124
T_AnalysisConfigMT_Tier0::m_doOffline
bool m_doOffline
Definition: T_AnalysisConfigMT_Tier0.h:1126