ATLAS Offline Software
T_AnalysisConfig.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
12 #ifndef TrigInDetAnalysisUtils_T_AnalysisConfig_H
13 #define TrigInDetAnalysisUtils_T_AnalysisConfig_H
14 
15 #include <iostream>
16 #include <sstream>
17 #include <string>
18 #include <map>
19 
20 #include "GaudiKernel/IToolSvc.h"
21 #include "GaudiKernel/ITHistSvc.h"
22 // #include "GaudiKernel/AlgFactory.h"
23 
25 
30 
31 
32 // #include "TrigInDetAnalysisUtils/RoI.h"
33 // #include "TrigInDetAnalysisUtils/Converter.h"
38 
39 #ifdef XAODTRACKING_TRACKPARTICLE_H
40 #include "xAODMuon/MuonContainer.h"
44 #else
48 #endif
49 
50 class MsgSvc;
51 
52 // class TrackAssociator;
53 // class Converter;
54 
55 // class RoI;
56 // class TrackFilter;
57 
58 template<class Provider>
60 
61 public:
62 
63  // Full constructor: test/reference/selection
64  // - analysisInstanceName: the name of the analysis chain being created
65  // - xxxChainName: the name of the chain to be used as test/reference/selection; must be "StoreGate" in case of direct access to SG containers
66  // - xxxType: the type of tracks to be retrieved from the test/reference/selection chain or container
67  // - xxxKey: the key for tracks to be retrieved from the test/reference/selection chain or container
68  // - all standard operations are performed in loops over 0=test 1=reference 2=selection
69  T_AnalysisConfig(const std::string& analysisInstanceName,
70  const std::string& testChainName, const std::string& testType, const std::string& testKey,
71  const std::string& referenceChainName, const std::string& referenceType, const std::string& referenceKey,
72  const std::string& selectionChainName, const std::string& selectionType, const std::string& selectionKey,
73  TrackFilter* testFilter, TrackFilter* referenceFilter, TrackFilter* selectionFilter,
74  TrackAssociator* associator,
76  m_provider(0),
77  m_tdt(0),
78  m_analysisInstanceName(analysisInstanceName),
79  m_refChainName(referenceChainName),
80  m_refChainKey(referenceKey),
81  m_testChainName(testChainName),
82  m_testChainKey(testKey),
83  m_selectorRef(0),
84  m_selectorTest(0),
85  m_selectorSel(0),
86  m_associator(associator),
88  m_mcTruth(false),
89  m_beamX(0),
90  m_beamY(0),
91  m_beamZ(0),
92  m_genericFlag(true),
93  m_releaseData(""),
94  m_keepAllEvents(false),
95  m_useHighestPT(false),
96  m_vtxIndex(-1),
97  m_filterOnRoi(true),
98  m_requireDecision(false)
99  {
100  // Rearrange objects in vectors: chain names
101  std::vector<std::string> testChainNames; testChainNames.push_back(testChainName);
102  std::vector<std::string> referenceChainNames; referenceChainNames.push_back(referenceChainName);
103  std::vector<std::string> selectionChainNames; selectionChainNames.push_back(selectionChainName);
104  m_chainNames.push_back(testChainNames); m_chainNames.push_back(referenceChainNames); m_chainNames.push_back(selectionChainNames);
105  // Types
106  std::vector<std::string> testTypes; testTypes.push_back(testType);
107  std::vector<std::string> referenceTypes; referenceTypes.push_back(referenceType);
108  std::vector<std::string> selectionTypes; selectionTypes.push_back(selectionType);
109  m_types.push_back(testTypes); m_types.push_back(referenceTypes); m_types.push_back(selectionTypes);
110  // Keys
111  std::vector<std::string> testKeys; testKeys.push_back(testKey);
112  std::vector<std::string> referenceKeys; referenceKeys.push_back(referenceKey);
113  std::vector<std::string> selectionKeys; selectionKeys.push_back(selectionKey);
114  m_keys.push_back(testKeys); m_keys.push_back(referenceKeys); m_keys.push_back(selectionKeys);
115  // Filters
116  std::vector<TrackFilter*> testFilters; testFilters.push_back(testFilter);
117  std::vector<TrackFilter*> referenceFilters; referenceFilters.push_back(referenceFilter);
118  std::vector<TrackFilter*> selectionFilters; selectionFilters.push_back(selectionFilter);
119  m_filters.push_back(testFilters); m_filters.push_back(referenceFilters); m_filters.push_back(selectionFilters);
120  }
121 
122 
123  // Partial constructor: test/reference
124  // - analysisInstanceName: the name of the analysis chain being created
125  // - xxxChainName: the name of the chain to be used as test/reference; must be "StoreGate" in case of direct access to SG containers
126  // - xxxType: the type of tracks to be retrieved from the test/reference chain or container
127  // - xxxKey: the key for tracks to be retrieved from the test/reference chain or container
128  // - all standard operations are performed in loops over 0=test 1=reference 2=selection
129  T_AnalysisConfig(const std::string& analysisInstanceName,
130  const std::string& testChainName, const std::string& testType, const std::string& testKey,
131  const std::string& referenceChainName, const std::string& referenceType, const std::string& referenceKey,
132  TrackFilter* testFilter, TrackFilter* referenceFilter,
133  TrackAssociator* associator,
135  m_provider(0),
136  m_tdt(0),
137  m_analysisInstanceName(analysisInstanceName),
138  m_refChainName(referenceChainName),
139  m_refChainKey(referenceKey),
140  m_testChainName(testChainName),
141  m_testChainKey(testKey),
142  m_selectorRef(0),
143  m_selectorTest(0),
144  m_selectorSel(0),
145  m_associator(associator),
147  m_mcTruth(false),
148  m_beamX(0),
149  m_beamY(0),
150  m_beamZ(0),
151  m_genericFlag(true),
152  m_releaseData(""),
153  m_keepAllEvents(false),
154  m_useHighestPT(false),
155  m_vtxIndex(-1),
156  m_filterOnRoi(true),
157  m_requireDecision(false)
158  {
159  // Rearrange objects in vectors: chain names
160  std::vector<std::string> testChainNames; testChainNames.push_back(testChainName);
161  std::vector<std::string> referenceChainNames; referenceChainNames.push_back(referenceChainName);
162  std::vector<std::string> selectionChainNames; selectionChainNames.push_back("NONE");
163  m_chainNames.push_back(testChainNames); m_chainNames.push_back(referenceChainNames); m_chainNames.push_back(selectionChainNames);
164  // Types
165  std::vector<std::string> testTypes; testTypes.push_back(testType);
166  std::vector<std::string> referenceTypes; referenceTypes.push_back(referenceType);
167  std::vector<std::string> selectionTypes; selectionTypes.push_back("");
168  m_types.push_back(testTypes); m_types.push_back(referenceTypes); m_types.push_back(selectionTypes);
169  // Keys
170  std::vector<std::string> testKeys; testKeys.push_back(testKey);
171  std::vector<std::string> referenceKeys; referenceKeys.push_back(referenceKey);
172  std::vector<std::string> selectionKeys; selectionKeys.push_back("");
173  m_keys.push_back(testKeys); m_keys.push_back(referenceKeys); m_keys.push_back(selectionKeys);
174  // Filters
175  std::vector<TrackFilter*> testFilters; testFilters.push_back(testFilter);
176  std::vector<TrackFilter*> referenceFilters; referenceFilters.push_back(referenceFilter);
177  std::vector<TrackFilter*> selectionFilters;
178  m_filters.push_back(testFilters); m_filters.push_back(referenceFilters); m_filters.push_back(selectionFilters);
179 
180  // m_selectorRef = new TrigTrackSelector( referenceFilter );
181  // m_selectorTest = new TrigTrackSelector( testFilter );
182  }
183 
184 
185 
186 
187 
188  // Destructor
189  virtual ~T_AnalysisConfig() {
190  // if ( m_selectorRef ) delete m_selectorRef;
191  // if ( m_selectorTest ) delete m_selectorTest;
192  // if ( m_selectorSel ) delete m_selectorSel;
193  // if ( m_analysis ) delete m_analysis;
194  }
195 
196 
197 
198  // Configuration methods
199  void addTestChain(const std::string& chainName, const std::string& type, const std::string& key) {
200  m_chainNames[0].push_back(chainName); m_types[0].push_back(type); m_keys[0].push_back(key);
201  }
202 
203  void addReferenceChain(const std::string& chainName, const std::string& type, const std::string& key) {
204  m_chainNames[1].push_back(chainName); m_types[1].push_back(type); m_keys[1].push_back(key);
205  }
206 
207  void addSelectionChain(const std::string& chainName, const std::string& type, const std::string& key) {
208  m_chainNames[2].push_back(chainName); m_types[2].push_back(type); m_keys[2].push_back(key);
209  }
210 
211  void addTestFilter(TrackFilter* filter) { m_filters[0].push_back(filter); }
214 
215  // Initialize, execute and finalize generic methods
216  virtual void initialize(Provider* p, ToolHandle<Trig::TrigDecisionTool>* tdt ) {
217  m_provider = p;
218  m_tdt = tdt;
219  if ( m_tdt==0 ) m_analysis->initialise();
220 
221  }
222 
223 
224 
225  virtual void execute() {
226  if ( !m_provider ) std::cerr << "ERROR T_AnalysisConfig::execute() called without initialising" << std::endl;
227  loop();
228  }
229 
230  virtual void finalize() { m_analysis->finalise(); }
231 
232  virtual void book() { }
233 
234  // Accessor methods
235  const std::string& name() const {return m_analysisInstanceName;}
236 
237  const std::string testChains() const {
238  std::string name;
239  for(unsigned int i=0; i<m_chainNames[0].size(); i++)
240  name += (m_chainNames[0][i]+"::"+m_types[0][i]+"::"+m_keys[0][i]+" ");
241  return name;
242  }
243 
244  const std::string referenceChains() const {
245  std::string name;
246  for(unsigned int i=0; i<m_chainNames[1].size(); i++)
247  name += (m_chainNames[1][i]+"::"+m_types[1][i]+"::"+m_keys[1][i]+" ");
248  return name;
249  }
250 
251  const std::string selectionChains() const {
252  std::string name;
253  for(unsigned int i=0; i<m_chainNames[2].size(); i++)
254  name += (m_chainNames[2][i]+"::"+m_types[2][i]+"::"+m_keys[2][i]+" ");
255  return name;
256  }
257 
258  const TrackAnalysis* analysis() const {return m_analysis;}
259 
260  void setMCTruth(bool b=true) { m_mcTruth=b; }
261  bool mcTruth() const { return m_mcTruth; }
262 
263  void setBeamX(double d) { m_beamX=d; }
264  void setBeamY(double d) { m_beamY=d; }
265  void setBeamZ(double d) { m_beamZ=d; }
266  double beamX() const { return m_beamX; }
267  double beamY() const { return m_beamY; }
268  double beamZ() const { return m_beamZ; }
269 
270  bool genericFlag() const { return m_genericFlag; }
271  void setGenericFlag(bool b) { m_genericFlag=b; }
272 
273  const std::string& releaseData() const { return m_releaseData; }
274  void releaseData(const std::string& s) { m_releaseData = s; }
275 
276  void keepAllEvents( bool b ) { m_keepAllEvents = b; }
277 
278  void setUseHighestPT( bool b ) { m_useHighestPT=b; }
279  bool getUseHighestPT() const { return m_useHighestPT; }
280 
281  void setVtxIndex( int i ) { m_vtxIndex=i; }
282  int getVtxIndex() const { return m_vtxIndex; }
283 
284  bool filterOnRoi() const { return m_filterOnRoi; }
285  bool setFilterOnRoi(bool b) { return m_filterOnRoi=b; }
286 
288  bool requireDecision() const { return m_requireDecision; }
289 
290 protected:
291 
292  virtual void loop() = 0;
293 
294 
296 
297  template<class Collection>
298  std::pair< typename Collection::const_iterator, typename Collection::const_iterator >
300  const std::string& key="" ) {
301 
304  // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl;
305 
308  std::string key_collection = key;
309  std::string key_tename = "";
310  size_t pos = key_collection.find("/");
311  if ( pos!=std::string::npos ) {
312  key_collection = key.substr( pos+1, key.size()-pos );
313  key_tename = key.substr( 0, pos );
314  }
315 
316  std::pair< typename Collection::const_iterator,
317  typename Collection::const_iterator > itrpair;
318 
320 
321  CLID checkCLID;
322  const std::string* keyStr = m_provider->evtStore()->keyToString(roi_link.key(), checkCLID);
323  m_provider->msg(MSG::DEBUG) << "Requesting range over (" << key << ") associated to ROI from " << (keyStr == nullptr ? "UNKNOWN" : *keyStr) << endmsg;
324 
325  itrpair = (*m_tdt)->associateToEventView( handle, roi_link );
326 
327  return itrpair;
328  }
329 
330 
331 
332 
333 
334 
335 
336 
337 
338 
339 
340 
341 
342  bool select( std::vector<TIDA::Vertex>& vertices,
345 
346  xAOD::VertexContainer::const_iterator vtxitr = vtx_start;
347 
348  for ( ; vtxitr!=vtx_end ; ++vtxitr ) {
349  if ( (*vtxitr)->vertexType()!=0 ) {
350  m_provider->msg(MSG::VERBOSE) << "\tvertex " << (*vtxitr)->z() << endmsg;
351 
352  vertices.push_back( TIDA::Vertex( (*vtxitr)->x(),
353  (*vtxitr)->y(),
354  (*vtxitr)->z(),
356  (*vtxitr)->covariancePosition()(Trk::x,Trk::x),
357  (*vtxitr)->covariancePosition()(Trk::y,Trk::y),
358  (*vtxitr)->covariancePosition()(Trk::z,Trk::z),
359  (*vtxitr)->nTrackParticles(),
361  (*vtxitr)->chiSquared(),
362  (*vtxitr)->numberDoF() ) );
363 
364  }
365  }
366 
367  return true;
368  }
369 
370 
371  bool select( std::vector<TIDA::Vertex>& vertices,
373  const std::string& key="" ) {
374 
375  m_provider->msg(MSG::VERBOSE) << "\tFetch xAOD::VertexContainer for key: " << key << endmsg;
376 
378  xAOD::VertexContainer::const_iterator > vtx_itrpair = this->template getCollection<xAOD::VertexContainer>( roi_link, key );
379 
380  if ( vtx_itrpair.first == vtx_itrpair.second ) {
381  m_provider->msg(MSG::WARNING) << "\tNo xAOD::Vertex collection for key " << key << endmsg;
382  return false;
383  }
384 
385  m_provider->msg(MSG::DEBUG) << "\txAOD::VertexContainer found with size " << (vtx_itrpair.second - vtx_itrpair.first)
386  << "\t:" << key << endmsg;
387 
388  return select( vertices, vtx_itrpair.first, vtx_itrpair.second );
389  }
390 
391 
392 
393 
394  bool select( std::vector<TIDA::Vertex>& vertices, const std::string& key="" ) {
395 
396  m_provider->msg(MSG::VERBOSE) << "fetching AOD vertex container" << endmsg;
397 
398  const xAOD::VertexContainer* xaodVtxCollection = 0;
399 
400  if ( retrieve( xaodVtxCollection, key ).isFailure()) {
401  m_provider->msg(MSG::WARNING) << "xAOD vertex container not found with key " << key << endmsg;
402  return false;
403  }
404 
405  if ( xaodVtxCollection!=0 ) {
406 
407  m_provider->msg(MSG::VERBOSE) << "xAOD vertex container " << xaodVtxCollection->size() << " entries" << endmsg;
408 
409  return select( vertices, xaodVtxCollection->begin(), xaodVtxCollection->end() );
410 
411 #if 0
412 
413  xAOD::VertexContainer::const_iterator vtxitr = xaodVtxCollection->begin();
414 
415  for ( ; vtxitr != xaodVtxCollection->end(); vtxitr++ ) {
416  if ( (*vtxitr)->nTrackParticles()>0 && (*vtxitr)->vertexType()!=0 ) {
417  vertices.push_back( TIDA::Vertex( (*vtxitr)->x(),
418  (*vtxitr)->y(),
419  (*vtxitr)->z(),
421  (*vtxitr)->covariancePosition()(Trk::x,Trk::x),
422  (*vtxitr)->covariancePosition()(Trk::y,Trk::y),
423  (*vtxitr)->covariancePosition()(Trk::z,Trk::z),
424  (*vtxitr)->nTrackParticles(),
426  (*vtxitr)->chiSquared(),
427  (*vtxitr)->numberDoF() ) );
428  }
429  }
430 
431 #endif
432 
433  }
434 
435  return true;
436  }
437 
438 
439 
440  template<class Collection>
442  // const TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> roi_link,
444  const std::string& key="" ) {
445 
446 
449  // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl;
450 
453  std::string key_collection = key;
454  std::string key_tename = "";
455  size_t pos = key_collection.find("/");
456  if ( pos!=std::string::npos ) {
457  key_collection = key.substr( pos+1, key.size()-pos );
458  key_tename = key.substr( 0, pos );
459  }
460 
461  std::pair< typename Collection::const_iterator,
462  typename Collection::const_iterator > itrpair;
463 
465 
466  CLID checkCLID;
467  const std::string* keyStr = m_provider->evtStore()->keyToString(roi_link.key(), checkCLID);
468  m_provider->msg(MSG::DEBUG) << "Requesting range over (" << key << ") associated to ROI from " << (keyStr == nullptr ? "UNKNOWN" : *keyStr) << endmsg;
469 
470  itrpair = (*m_tdt)->associateToEventView( handle, roi_link );
471 
472  if ( itrpair.first != itrpair.second ) {
473  selector->selectTracks( itrpair.first, itrpair.second );
474  return true;
475  }
476  else {
477  m_provider->msg(MSG::DEBUG) << "TDT TrackFeature collection (" << key << ") is empty " << endmsg;
478  return false;
479  }
480  }
481 
482 
483 
485 
486  template<class Collection>
488 
489  // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl;
490 
491  std::string key_collection = key;
492  std::string key_tename = "";
493  size_t pos = key_collection.find("/");
494  if ( pos!=std::string::npos ) {
495  key_collection = key.substr( pos+1, key.size()-pos );
496  key_tename = key.substr( 0, pos );
497  }
498 
499  std::vector< Trig::Feature<Collection> > trackcollections = citr->get<Collection>( key_collection, TrigDefs::alsoDeactivateTEs, key_tename );
500  if ( !trackcollections.empty() ) {
501  // NB!! a combination should never have more than one entry for a track collection from a single algorithm, for single object triggers
502  for ( unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
503  Trig::Feature<Collection> trackfeature = trackcollections.at(ifeat);
504  if ( !trackfeature.empty() ) {
505  // actually select the tracks from this roi at last!!
506  const Collection* trigtracks = trackfeature.cptr();
507  selector->selectTracks( trigtracks );
508  }
509  }
510  return true;
511  }
512  else {
513  m_provider->msg(MSG::DEBUG) << "TDT TrackFeature collection (" << key << ") is empty " << endmsg;
514  return false;
515  }
516  }
517 
518 
522  template<class Collection>
524 
525  // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl;
526 
527  std::vector< Trig::Feature<Collection> > trackcollections = citr->get<Collection>( key, TrigDefs::alsoDeactivateTEs );
528  if ( !trackcollections.empty() ) {
529 
530  const HLT::NavigationCore* nc = (*m_tdt)->ExperimentalAndExpertMethods().getNavigation();
531 
532  // NB!! a combination should never have more than one entry for a track collection from a single algorithm,
533  // if ( trackcollections.size()>1 ) std::cerr << "SUTT OH NO!!!!!!!!" << endmsg;
534  // maybe a bit dodgy, if we really do have multiple objects returned, but that should only be for
535  // multiple object triggers - then probably none of this would work anyhow
536  for ( unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
537  // std::cout << "selectTracks() ifeat=" << ifeat << "\tkey " << key << "\t(truthmap)" << std::endl;
538  Trig::Feature<Collection> trackfeature = trackcollections.at(ifeat);
539 
541  const HLT::TriggerElement* te = trackfeature.te();
542 
544  std::vector< const Collection* > collectionVector;
545  if ( !const_cast<HLT::NavigationCore *>(nc)->getFeatures( te, collectionVector, key ) ) return false;
546 
547  // std::cout << "foundok " << foundok << "\tsize " << collectionVector.size() << std::endl;
548 
550 
551  for ( unsigned iv=collectionVector.size() ; iv-- ; ) {
555  if ( index!=iv ) continue;
557  // m_provider->msg(MSG::DEBUG) << "TDT TrackFeature->size() " << collectionVector[iv]->size() << " (" << key << ")" << endmsg;
558  selector->selectTracks( collectionVector[iv], truthmap );
559  break;
560  }
561  }
562  return true;
563  }
564  else {
565  m_provider->msg(MSG::DEBUG) << "TDT TrackFeature collection (" << key << ") is empty" << endmsg;
566  return false;
567  }
568  }
569 
570 
571 
572  template<class Collection>
573  StatusCode retrieve( Collection const*& collection, const std::string& key="" ) {
576  if ( m_provider->evtStore()->template contains<Collection>( key ) ) {
578  if ( handle.isValid() ) {
581  collection = handle.cptr();
582  return StatusCode::SUCCESS;
583  }
584  }
585  return StatusCode::FAILURE;
586  }
587 
588 
589 
590  template<class Collection>
591  bool selectTracks( TrigTrackSelector* selector, const std::string& key ) {
592  if ( key!="" ) {
594  if ( handle.isValid() ) {
596  // std::cout << "\t\t\t T_AnalysisConfig::selectTracks() - > TrackSelector" << std::endl;
597  selector->selectTracks( handle.cptr() );
598  return true;
599  }
600  }
601  return false;
602  }
603 
604 
605 
606 
607  template<class Collection>
608  bool selectTracksNotEmpty( TrigTrackSelector* selector, const std::string& key ) {
609  const Collection* collection = nullptr;
610  if ( key.empty() ) return false;
611  if ( !m_provider->evtStore()->template contains<Collection>( key ) ) return false;
612 
613  StatusCode sc = retrieve( collection, key );
614 
615  if ( !( sc.isSuccess() && collection ) ) return false;
616 
617  m_provider->msg(MSG::DEBUG) << "SG Collection->size() " << collection->size() << " (" << key << ")" << endmsg;
618 
619  // added to fix muon samples bug
620  if ( collection->size() == 0 ) {
621  m_provider->msg(MSG::WARNING) << "no particles in collection" << endmsg;
622  return false;
623  }
624 
625  selector->selectTracks( collection );
626  return true;
627  }
628 
629 
630 
631 
632 
633  template<class Collection>
634  std::vector<double> getBeamspot( const std::string& key ) {
635  const Collection* collection = 0;
636  std::vector<double> v;
637 
638  if ( key!="" ) {
639  if ( m_provider->evtStore()->template contains<Collection>( key ) ) {
640  StatusCode sc = retrieve( collection, key );
641  if( sc.isSuccess() && collection ) {
642  m_provider->msg(MSG::DEBUG) << "SG Collection->size() " << collection->size() << " (" << key << ")" << endmsg;
643 
644  typename Collection::const_iterator trackitr = collection->begin();
645  typename Collection::const_iterator trackend = collection->end();
646  if ( trackitr!=trackend ) {
647  v.resize(3);
648  v[0] = (*trackitr)->vx();
649  v[1] = (*trackitr)->vy();
650  v[2] = (*trackitr)->vz();
651  return v;
652  } // only need to look at the first track
653  }
654  }
655  }
656  return v;
657  }
658 
659 
660 
661 
662  template<class Collection>
663  std::vector<double> getBeamspot( Trig::FeatureContainer::combination_const_iterator citr, const std::string& key="" ) {
664  std::vector< Trig::Feature<Collection> > trackcollections = citr->get<Collection>( key, TrigDefs::alsoDeactivateTEs );
665  std::vector<double> v;
666  if ( !trackcollections.empty() ) {
667  // NB!! a combination should never have more than one entry for a track collection from a single algorithm,
668  // if ( trackcollections.size()>1 ) std::cerr << "SUTT OH NO!!!!!!!!" << endmsg;
669  for ( unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
670  // std::cout << "selectTracks() ifeat=" << ifeat << "\tkey " << key << std::endl;
671  Trig::Feature<Collection> trackfeature = trackcollections.at(ifeat);
672  if ( !trackfeature.empty() ) {
673  // m_provider->msg(MSG::DEBUG) << "TDT TrackFeature->size() " << trackfeature.cptr()->size() << " (" << key << ")" << endmsg;
674  // actually select the tracks from this roi at last!!
675  const Collection* trigtracks = trackfeature.cptr();
676 
677  typename Collection::const_iterator trackitr = trigtracks->begin();
678  typename Collection::const_iterator trackend = trigtracks->end();
679  if ( trackitr!=trackend ) {
680  v.resize(3);
681  v[0] = (*trackitr)->vx();
682  v[1] = (*trackitr)->vy();
683  v[2] = (*trackitr)->vz();
684  return v;
685  } // only need to look at the first track
686  }
687  }
688  return v;
689  }
690  else {
691  m_provider->msg(MSG::DEBUG) << "TDT TrackFeature collection (" << key << ") is empty " << endmsg;
692  return v;
693  }
694  }
695 
696 
697 
698 
699 
703  unsigned processElectrons( TrigTrackSelector& selectorRef,
704  std::vector<TrackTrigObject>* elevec=0,
705  const unsigned int selection=0,
706  bool raw_track=false,
707  double ETOffline=0,
708 # ifdef XAODTRACKING_TRACKPARTICLE_H
709  const std::string& containerName = "Electrons"
710 # else
711  const std::string& containerName = "ElectronAODCollection"
712 # endif
713  ) {
714 
715  m_provider->msg(MSG::DEBUG) << "Fetching offline electrons: " << containerName << endmsg;
716 
717  selectorRef.clear();
718 
719 # ifdef XAODTRACKING_TRACKPARTICLE_H
721 # else
723 # endif
724 
725 
726  const Container* container = 0;
727 
728  if( ! m_provider->evtStore()->template contains<Container>(containerName) ) {
729  m_provider->msg(MSG::WARNING) << "Error No Electron Container " << containerName << " !" << endmsg;
730  return 0;
731  }
732 
733  StatusCode sc = retrieve( container, containerName);
734  if( sc.isFailure() || !container ) {
735  m_provider->msg(MSG::WARNING) << "Error retrieving container: " << containerName << " !" << endmsg;
736  return 0;
737  }
738 
739  m_provider->msg(MSG::DEBUG) << "Event with " << container->size() << " Electron object(s) " << endmsg;
740 
741  Container::const_iterator elec = container->begin();
742  Container::const_iterator elec_end = container->end();
743 
744  for( ; elec!=elec_end ; ++elec ){
745  //m_provider->msg(MSG::DEBUG) << " Electron " << (*elec)
746  // << ", eta " << (*elec)->eta()
747  // << ", phi " << (*elec)->phi()
748  // << ", ET " << (*elec)->pt()
749  // << ", author " << (*elec)->author()
750  // << ", trackParticle " << (*elec)->trackParticle()
751  // << ", conversion " << (*elec)->conversion()
752  // << ", mediumPP " << ((*elec)->isem(egammaPID::ElectronMediumPP)==0)
753  // << endmsg;
754 
755  bool good_electron = false;
756 # ifdef XAODTRACKING_TRACKPARTICLE_H
757  good_electron = TIDA::isGoodOffline( *(*elec), selection, ETOffline );
758 # else
759  good_electron = TIDA::isGoodOffline( *(*elec));
760 # endif
761 
762  if (good_electron) {
763  const xAOD::Electron_v1& eleduff = *(*elec);
764  long unsigned eleid = (unsigned long)(&eleduff) ;
765  TrackTrigObject eleobj = TrackTrigObject( (*elec)->eta(),
766  (*elec)->phi(),
767  (*elec)->pt(),
768  0,
769  (*elec)->type(),
770  eleid );
771 
772  bool trk_added ;
773  if ( raw_track ) trk_added = selectorRef.selectTrack( xAOD::EgammaHelpers::getOriginalTrackParticle( *elec ) );
774  else trk_added = selectorRef.selectTrack( (*elec)->trackParticle() );
775 
776  if (trk_added) eleobj.addChild( selectorRef.tracks().back()->id() );
777  if (elevec) elevec->push_back( eleobj );
778  }
779  }
780 
781  return selectorRef.tracks().size();
782  }
783 
784 
785 
789  unsigned processMuons( TrigTrackSelector& selectorRef, const unsigned int selection=0,
790  double ETOffline=0,
791 # ifdef XAODTRACKING_TRACKPARTICLE_H
792  const std::string& containerName = "Muons"
793 # else
794  const std::string& containerName = "StacoMuonCollection"
795 # endif
796  ) {
797 
798 # ifdef XAODTRACKING_TRACKPARTICLE_H
800 # else
802 # endif
803 
804  m_provider->msg(MSG::DEBUG) << " Offline muons (" << containerName << ")" << endmsg;
805 
806  selectorRef.clear();
807 
808  const Container* container = 0;
809 
810  if( ! m_provider->evtStore()->template contains<Container>(containerName) ) {
811  m_provider->msg(MSG::WARNING) << "Error No MuonCollection" << containerName << " !" << endmsg;
812  return 0;
813  }
814 
815  StatusCode sc = retrieve( container, containerName );
816  if( sc.isFailure() || !container ) {
817  m_provider->msg(MSG::WARNING) << "Error retrieving " << containerName << " !" << endmsg;
818  return 0;
819  }
820 
821  auto muon = container->begin();
822  auto muon_end = container->end();
823 
824  // std::cout << "SUTT Offline muons " << container->size() << "\t threshold " << ETOffline << std::endl;
825 
826  for( ; muon!=muon_end ; ++muon ){
827 # ifdef XAODTRACKING_TRACKPARTICLE_H
828  if ( TIDA::isGoodOffline(*(*muon), selection, ETOffline ) ) selectorRef.selectTrack(*((*muon)->inDetTrackParticleLink()));
829 # else
830  if ( TIDA::isGoodOffline(*(*muon)) ) selectorRef.selectTrack((*muon)->inDetTrackParticle());
831 # endif
832  }
833 
834 
835  // std::cout << "SUTT found " << selectorRef.tracks().size() << " muons for " << containerName << std::endl;
836  m_provider->msg(MSG::DEBUG) << "found " << selectorRef.tracks().size() << " muons for " << containerName << endmsg;
837 
838  return selectorRef.tracks().size();
839 }
840 
841 
842 
846 unsigned processTaus( TrigTrackSelector& selectorRef,
847  std::vector<TrackTrigObject>* tauvec=0,
848  const unsigned selection=0,
849  int requireNtracks=0,
850  double EtCutOffline=0,
851 # ifdef XAODTRACKING_TRACKPARTICLE_H
852  const std::string& containerName = "TauJets"
853 # else
854  const std::string& containerName = "TauRecContainer"
855 # endif
856  ) {
857 
858 # ifdef XAODTRACKING_TRACKPARTICLE_H
860 # else
862 # endif
863 
864  selectorRef.clear();
865 
866  const Container* container = 0;
867 
868  selectorRef.clear();
869 
870  m_provider->msg(MSG::DEBUG) << " Offline taus " << containerName << endmsg;
871 
872  if ( !m_provider->evtStore()->template contains<Container>(containerName)) {
873  m_provider->msg(MSG::WARNING) << " Offline taus not found" << endmsg;
874  return 0;
875  }
876 
877  StatusCode sc = retrieve( container, containerName);
878  if (sc != StatusCode::SUCCESS) {
879  m_provider->msg(MSG::WARNING) << " Offline tau retrieval not successful" << endmsg;
880  return 0;
881  }
882 
883  Container::const_iterator tau = container->begin();
884  Container::const_iterator tau_end = container->end();
885 
886 
887  for ( ; tau!=tau_end ; ++tau ) {
888 
889 # ifdef XAODTRACKING_TRACKPARTICLE_H
890  // unsigned N = (*tau)->nTracks();
891 
892 # ifndef XAODTAU_VERSIONS_TAUJET_V3_H
893  int N = (*tau)->nTracks();
894  // std::cout << "SUTT no tau detail " << N << "\t3prong: " << doThreeProng << std::endl;
895 # else
896  int N=0;
897  (*tau)->detail( xAOD::TauJetParameters::nChargedTracks, N );
898  // std::cout << "SUTT tau detail: N " << N << "\t3prong: " << doThreeProng << std::endl;
899 # endif
900 
901 # else
902  unsigned N = (*tau)->numTrack();
903 # endif
904 
905 
906  bool good_tau = false;
907 # ifdef XAODTRACKING_TRACKPARTICLE_H
908  good_tau = TIDA::isGoodOffline( *(*tau), selection, requireNtracks, EtCutOffline );
909 # else
910  good_tau = TIDA::isGoodOffline( *(*tau), requireNtracks, EtCutOffline );
911 # endif
912 
913  // std::cout << "SUTT tau ntracks: " << N << "\tgoodtau: " << good_tau << "\tpt: " << (*tau)->p4().Et() << "\t3prong: " << doThreeProng << std::endl;
914 
915  if (good_tau){
916  const xAOD::TauJet_v3& duff = *(*tau);
917  long unsigned tauid = (unsigned long)(&duff) ;
918  TrackTrigObject tauobj = TrackTrigObject( (*tau)->eta(),
919  (*tau)->phi(),
920  (*tau)->pt(),
921  0,
922  (*tau)->type(),
923  tauid );
924 
925  bool trk_added = false;
926 
927  for ( unsigned i=N ; i-- ; ) {
928 # ifdef XAODTAU_TAUTRACK_H
929 
930  std::vector< ElementLink<xAOD::TrackParticleContainer> > alink = (*tau)->track(i)->trackLinks();
931 
932  trk_added = false;
933 
934  for ( size_t ilink=0 ; ilink<alink.size() ; ilink++ ) {
935  if ( alink[ilink].isValid() ) trk_added = selectorRef.selectTrack((*alink[ilink]));
936  }
938  // trk_added = selectorRef.selectTrack((*tau)->track(i)->track());
940 # else
941  trk_added = selectorRef.selectTrack((*tau)->track(i));
942 # endif
943  if ( trk_added ) tauobj.addChild( selectorRef.tracks().back()->id() );
944  }
945  if ( tauvec ) tauvec->push_back( tauobj );
946  }
947  }
948 
949  return selectorRef.tracks().size();
950 
951 }
952 
953 protected:
954 
955  // Athena tools
956 
957  Provider* m_provider;
958 
959  ToolHandle<Trig::TrigDecisionTool>* m_tdt;
960 
961  // TrigInDetAnalysis tools
962  // Converter* m_converter;
963 
964  // Analysis instance name
966 
967  // Chain info
968  std::vector< std::vector<std::string> > m_chainNames;
969  std::vector< std::vector<std::string> > m_types;
970  std::vector< std::vector<std::string> > m_keys;
971 
972  std::string m_refChainName;
973  std::string m_refChainKey;
974 
975  std::string m_testChainName;
976  std::string m_testChainKey;
977 
978  // Analysis tools
979  std::vector< std::vector<TrackFilter*> > m_filters;
980 
984 
987 
988  bool m_mcTruth;
989 
991 
993  std::string m_releaseData;
994 
996 
998 
1000 
1002 
1004 
1005 };
1006 
1007 //}
1008 
1009 
1010 #endif // TrigInDetAnalysisUtils_T_AnalysisConfig_H
T_AnalysisConfig::select
bool select(std::vector< TIDA::Vertex > &vertices, const ElementLink< TrigRoiDescriptorCollection > &roi_link, const std::string &key="")
Definition: T_AnalysisConfig.h:371
T_AnalysisConfig::testChains
const std::string testChains() const
Definition: T_AnalysisConfig.h:237
T_AnalysisConfig::m_selectorRef
TrigTrackSelector * m_selectorRef
Definition: T_AnalysisConfig.h:981
Trig::FeatureContainer::combination_const_iterator
std::vector< Combination >::const_iterator combination_const_iterator
Definition: FeatureContainer.h:69
Trk::y
@ y
Definition: ParamDefs.h:56
T_AnalysisConfig::addReferenceChain
void addReferenceChain(const std::string &chainName, const std::string &type, const std::string &key)
Definition: T_AnalysisConfig.h:203
TrackAnalysis::initialise
virtual void initialise()=0
standard operation interface
T_AnalysisConfig::m_types
std::vector< std::vector< std::string > > m_types
Definition: T_AnalysisConfig.h:969
TIDA::Associator
Definition: TIDAAssociator.h:24
T_AnalysisConfig::m_refChainKey
std::string m_refChainKey
Definition: T_AnalysisConfig.h:973
T_AnalysisConfig::setGenericFlag
void setGenericFlag(bool b)
Definition: T_AnalysisConfig.h:271
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
T_AnalysisConfig::m_mcTruth
bool m_mcTruth
Definition: T_AnalysisConfig.h:988
Trig::Feature
Definition: Feature.h:112
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TIDA::isGoodOffline
bool isGoodOffline(const Analysis::Electron &elec)
Definition: OfflineObjectSelection.cxx:122
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
T_AnalysisConfig::processMuons
unsigned processMuons(TrigTrackSelector &selectorRef, const unsigned int selection=0, double ETOffline=0, const std::string &containerName="StacoMuonCollection")
select offlinqe muons
Definition: T_AnalysisConfig.h:789
ElectronContainer.h
T_AnalysisConfig::m_filterOnRoi
bool m_filterOnRoi
Definition: T_AnalysisConfig.h:1001
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
T_AnalysisConfig::m_provider
Provider * m_provider
Definition: T_AnalysisConfig.h:957
TrigTrackSelector::clear
virtual void clear() override
Definition: TrigTrackSelector.h:102
T_AnalysisConfig::finalize
virtual void finalize()
Definition: T_AnalysisConfig.h:230
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
TrackAnalysis::finalise
virtual void finalise()=0
T_AnalysisConfig::setFilterOnRoi
bool setFilterOnRoi(bool b)
Definition: T_AnalysisConfig.h:285
T_AnalysisConfig::m_tdt
ToolHandle< Trig::TrigDecisionTool > * m_tdt
Definition: T_AnalysisConfig.h:959
DataVector::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition: DataVector.h:837
T_AnalysisConfig::m_testChainName
std::string m_testChainName
Definition: T_AnalysisConfig.h:975
T_AnalysisConfig::releaseData
void releaseData(const std::string &s)
Definition: T_AnalysisConfig.h:274
T_AnalysisConfig::addReferenceFilter
void addReferenceFilter(TrackFilter *filter)
Definition: T_AnalysisConfig.h:212
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
TrackFilter
Definition: TrackFilter.h:26
hist_file_dump.d
d
Definition: hist_file_dump.py:143
T_AnalysisConfig::m_refChainName
std::string m_refChainName
Definition: T_AnalysisConfig.h:972
TrackAnalysis.h
TrackFilter.h
base class for a single track selection filter allowing parameter setting for complex track selection
T_AnalysisConfig::~T_AnalysisConfig
virtual ~T_AnalysisConfig()
Definition: T_AnalysisConfig.h:189
MuonContainer.h
T_AnalysisConfig::analysis
const TrackAnalysis * analysis() const
Definition: T_AnalysisConfig.h:258
T_AnalysisConfig::m_selectorSel
TrigTrackSelector * m_selectorSel
Definition: T_AnalysisConfig.h:983
ElectronxAODHelpers.h
T_AnalysisConfig::setBeamZ
void setBeamZ(double d)
Definition: T_AnalysisConfig.h:265
LArDigits2NtupleDumper.tdt
tdt
Definition: LArDigits2NtupleDumper.py:137
TIDARoiDescriptor.h
TrigDecisionTool.h
Analysis::TauJetContainer
Definition: Reconstruction/tauEvent/tauEvent/TauJetContainer.h:31
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
TrigTrackSelector
L2 tracks.
Definition: TrigTrackSelector.h:58
T_AnalysisConfig::getUseHighestPT
bool getUseHighestPT() const
Definition: T_AnalysisConfig.h:279
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:812
T_AnalysisConfig::T_AnalysisConfig
T_AnalysisConfig(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, const std::string &selectionChainName, const std::string &selectionType, const std::string &selectionKey, TrackFilter *testFilter, TrackFilter *referenceFilter, TrackFilter *selectionFilter, TrackAssociator *associator, TrackAnalysis *analysis)
Definition: T_AnalysisConfig.h:69
OfflineObjectSelection.h
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
T_AnalysisConfig::getBeamspot
std::vector< double > getBeamspot(const std::string &key)
Definition: T_AnalysisConfig.h:634
Trig::Feature::empty
bool empty() const
test method to check if the object is truly there
Definition: Feature.h:197
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
T_AnalysisConfig::getBeamspot
std::vector< double > getBeamspot(Trig::FeatureContainer::combination_const_iterator citr, const std::string &key="")
Definition: T_AnalysisConfig.h:663
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
T_AnalysisConfig::m_analysisInstanceName
std::string m_analysisInstanceName
Definition: T_AnalysisConfig.h:965
Container
storage of the time histories of all the cells
T_AnalysisConfig::setRequireDecision
void setRequireDecision(bool b)
Definition: T_AnalysisConfig.h:287
covarianceTool.filter
filter
Definition: covarianceTool.py:514
T_AnalysisConfig::addSelectionFilter
void addSelectionFilter(TrackFilter *filter)
Definition: T_AnalysisConfig.h:213
T_AnalysisConfig::m_keys
std::vector< std::vector< std::string > > m_keys
Definition: T_AnalysisConfig.h:970
T_AnalysisConfig::initialize
virtual void initialize(Provider *p, ToolHandle< Trig::TrigDecisionTool > *tdt)
Definition: T_AnalysisConfig.h:216
T_AnalysisConfig::genericFlag
bool genericFlag() const
Definition: T_AnalysisConfig.h:270
T_AnalysisConfig::selectTracks
bool selectTracks(TrigTrackSelector *selector, const std::string &key)
Definition: T_AnalysisConfig.h:591
HLT::NavigationCore
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
Definition: NavigationCore.h:96
Trig::Feature::te
const HLT::TriggerElement * te() const
explicit conversion to TriggerElement
Definition: Feature.h:181
T_AnalysisConfig::selectTracks
bool selectTracks(TrigTrackSelector *selector, Trig::FeatureContainer::combination_const_iterator citr, const std::string &key="")
lagacy run 2 access
Definition: T_AnalysisConfig.h:487
HLT::NavigationCore::getFeatures
bool getFeatures(const TriggerElement *te, std::vector< const T * > &features, const std::string &label="", std::map< const T *, std::string > *labels=0) const
retrieve features attached to given TriggerElement
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
T_AnalysisConfig::m_beamY
double m_beamY
Definition: T_AnalysisConfig.h:990
T_AnalysisConfig::getCollection
std::pair< typename Collection::const_iterator, typename Collection::const_iterator > getCollection(const ElementLink< TrigRoiDescriptorCollection > &roi_link, const std::string &key="")
new MT feature access
Definition: T_AnalysisConfig.h:299
T_AnalysisConfig::addTestFilter
void addTestFilter(TrackFilter *filter)
Definition: T_AnalysisConfig.h:211
T_AnalysisConfig::m_beamX
double m_beamX
Definition: T_AnalysisConfig.h:990
ElectronContainer.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
T_AnalysisConfig::setBeamX
void setBeamX(double d)
Definition: T_AnalysisConfig.h:263
T_AnalysisConfig::processTaus
unsigned processTaus(TrigTrackSelector &selectorRef, std::vector< TrackTrigObject > *tauvec=0, const unsigned selection=0, int requireNtracks=0, double EtCutOffline=0, const std::string &containerName="TauRecContainer")
select offline taus
Definition: T_AnalysisConfig.h:846
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
T_AnalysisConfig::processElectrons
unsigned processElectrons(TrigTrackSelector &selectorRef, std::vector< TrackTrigObject > *elevec=0, const unsigned int selection=0, bool raw_track=false, double ETOffline=0, const std::string &containerName="ElectronAODCollection")
select offline electrons
Definition: T_AnalysisConfig.h:703
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:27
T_AnalysisConfig::m_analysis
TrackAnalysis * m_analysis
Definition: T_AnalysisConfig.h:986
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
T_AnalysisConfig::getVtxIndex
int getVtxIndex() const
Definition: T_AnalysisConfig.h:282
xAOD::TauJetParameters::nChargedTracks
@ nChargedTracks
Definition: TauDefs.h:322
T_AnalysisConfig::beamZ
double beamZ() const
Definition: T_AnalysisConfig.h:268
T_AnalysisConfig::beamY
double beamY() const
Definition: T_AnalysisConfig.h:267
T_AnalysisConfig::m_requireDecision
bool m_requireDecision
Definition: T_AnalysisConfig.h:1003
TrigInDetTrackTruthMap
Definition: TrigInDetTrackTruthMap.h:38
TrackAnalysis
Definition: TrackAnalysis.h:32
TrigTrackSelector.h
T_AnalysisConfig::book
virtual void book()
Definition: T_AnalysisConfig.h:232
TauJetContainer.h
T_AnalysisConfig::m_keepAllEvents
bool m_keepAllEvents
Definition: T_AnalysisConfig.h:995
T_AnalysisConfig::beamX
double beamX() const
Definition: T_AnalysisConfig.h:266
Analysis::MuonContainer
definition of StoreGate container holding a vector of Analysis::Muon
Definition: Reconstruction/MuonIdentification/muonEvent/muonEvent/MuonContainer.h:38
TrackAssociator.h
TauJetContainer.h
T_AnalysisConfig::addTestChain
void addTestChain(const std::string &chainName, const std::string &type, const std::string &key)
Definition: T_AnalysisConfig.h:199
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
T_AnalysisConfig::T_AnalysisConfig
T_AnalysisConfig(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)
Definition: T_AnalysisConfig.h:129
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TIDA::Vertex
Definition: TIDAVertex.h:23
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
T_AnalysisConfig::selectTracks
bool selectTracks(TrigTrackSelector *selector, const ElementLink< TrigRoiDescriptorCollection > &roi_link, const std::string &key="")
Definition: T_AnalysisConfig.h:441
selection
const std::string selection
Definition: fbtTestBasics.cxx:74
T_AnalysisConfig::retrieve
StatusCode retrieve(Collection const *&collection, const std::string &key="")
Definition: T_AnalysisConfig.h:573
T_AnalysisConfig::m_associator
TrackAssociator * m_associator
Definition: T_AnalysisConfig.h:985
TrackSelector::tracks
const std::vector< TIDA::Track * > & tracks() const
Definition: Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/TrackSelector.h:53
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrigInDetTrackTruthMap.h
T_AnalysisConfig::setUseHighestPT
void setUseHighestPT(bool b)
Definition: T_AnalysisConfig.h:278
T_AnalysisConfig::addSelectionChain
void addSelectionChain(const std::string &chainName, const std::string &type, const std::string &key)
Definition: T_AnalysisConfig.h:207
xAOD::Electron_v1
Definition: Electron_v1.h:34
T_AnalysisConfig::loop
virtual void loop()=0
T_AnalysisConfig::m_useHighestPT
bool m_useHighestPT
Definition: T_AnalysisConfig.h:997
TrackTrigObject.h
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonContainer.h
Athena_test::testKeys
void testKeys(StoreGateSvc &rSG)
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
T_AnalysisConfig::releaseData
const std::string & releaseData() const
Definition: T_AnalysisConfig.h:273
python.PyAthena.v
v
Definition: PyAthena.py:154
T_AnalysisConfig::setBeamY
void setBeamY(double d)
Definition: T_AnalysisConfig.h:264
TrackTrigObject
Definition: TrackTrigObject.h:21
python.selector.AtlRunQuerySelectorLhcOlc.selector
selector
Definition: AtlRunQuerySelectorLhcOlc.py:611
T_AnalysisConfig::selectionChains
const std::string selectionChains() const
Definition: T_AnalysisConfig.h:251
T_AnalysisConfig::select
bool select(std::vector< TIDA::Vertex > &vertices, const std::string &key="")
Definition: T_AnalysisConfig.h:394
T_AnalysisConfig::mcTruth
bool mcTruth() const
Definition: T_AnalysisConfig.h:261
DEBUG
#define DEBUG
Definition: page_access.h:11
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
ElectronContainer
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/ElectronContainer.h:32
T_AnalysisConfig::referenceChains
const std::string referenceChains() const
Definition: T_AnalysisConfig.h:244
T_AnalysisConfig::m_vtxIndex
int m_vtxIndex
Definition: T_AnalysisConfig.h:999
xAOD::EgammaHelpers::getOriginalTrackParticle
const xAOD::TrackParticle * getOriginalTrackParticle(const xAOD::Electron *el)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the electron.
Definition: ElectronxAODHelpers.cxx:11
T_AnalysisConfig::filterOnRoi
bool filterOnRoi() const
Definition: T_AnalysisConfig.h:284
T_AnalysisConfig::keepAllEvents
void keepAllEvents(bool b)
Definition: T_AnalysisConfig.h:276
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
T_AnalysisConfig::m_genericFlag
int m_genericFlag
Definition: T_AnalysisConfig.h:992
Trk::x
@ x
Definition: ParamDefs.h:55
T_AnalysisConfig::m_beamZ
double m_beamZ
Definition: T_AnalysisConfig.h:990
T_AnalysisConfig::m_filters
std::vector< std::vector< TrackFilter * > > m_filters
Definition: T_AnalysisConfig.h:979
T_AnalysisConfig::selectTracksNotEmpty
bool selectTracksNotEmpty(TrigTrackSelector *selector, const std::string &key)
Definition: T_AnalysisConfig.h:608
T_AnalysisConfig::selectTracks
bool selectTracks(TrigTrackSelector *selector, Trig::FeatureContainer::combination_const_iterator citr, const TrigInDetTrackTruthMap *truthmap, const std::string &key="", unsigned index=0)
NB: because we want to use this for the L2Star chains, we have to use this method,...
Definition: T_AnalysisConfig.h:523
T_AnalysisConfig::m_selectorTest
TrigTrackSelector * m_selectorTest
Definition: T_AnalysisConfig.h:982
TrackTrigObject::addChild
void addChild(unsigned long id)
Definition: TrackTrigObject.h:43
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
T_AnalysisConfig::execute
virtual void execute()
Definition: T_AnalysisConfig.h:225
T_AnalysisConfig::name
const std::string & name() const
Definition: T_AnalysisConfig.h:235
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83
T_AnalysisConfig::m_testChainKey
std::string m_testChainKey
Definition: T_AnalysisConfig.h:976
Trig::Feature::cptr
const T * cptr() const
explicit conversion to object
Definition: Feature.h:171
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
T_AnalysisConfig::setMCTruth
void setMCTruth(bool b=true)
Definition: T_AnalysisConfig.h:260
T_AnalysisConfig::requireDecision
bool requireDecision() const
Definition: T_AnalysisConfig.h:288
T_AnalysisConfig::setVtxIndex
void setVtxIndex(int i)
Definition: T_AnalysisConfig.h:281
T_AnalysisConfig::select
bool select(std::vector< TIDA::Vertex > &vertices, xAOD::VertexContainer::const_iterator vtx_start, xAOD::VertexContainer::const_iterator vtx_end)
Definition: T_AnalysisConfig.h:342
T_AnalysisConfig
Definition: T_AnalysisConfig.h:59
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
T_AnalysisConfig::m_releaseData
std::string m_releaseData
Definition: T_AnalysisConfig.h:993
T_AnalysisConfig::m_chainNames
std::vector< std::vector< std::string > > m_chainNames
Definition: T_AnalysisConfig.h:968