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