ATLAS Offline Software
TrackValidationNtupleWriter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackValidationNtupleWriter.cxx, (c) ATLAS Detector Software
8 
10 // Gaudi
11 #include "GaudiKernel/ITHistSvc.h"
12 
13 #include "TTree.h"
14 
15 // Trk
16 #include "TrkTrack/Track.h"
17 
18 #include "AtlasHepMC/GenParticle.h"
22 
23 //#include "TrkParameters/Perigee.h"
24 
26 
29 #include "VxVertex/VxContainer.h"
30 
31 // inventory of tools
41 
42 #include "CLHEP/Vector/LorentzVector.h"
43 using CLHEP::HepLorentzVector;
44 
45 Trk::TrackValidationNtupleWriter::TrackValidationNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator):
46  AthAlgorithm(name,pSvcLocator),
47  m_ValidationNtupleTools(),
48  m_ValTrkParticleNtupleTool("Trk::BasicValTrkParticleNtupleTool/BasicValTrkParticleNtupleTool"),
49  m_truthNtupleTool("Trk::TruthNtupleTool/TruthNtupleTool"),
50  m_jetTruthNtupleTool(""),
51  m_trackTruthClassifierHandles(),
52  m_trackTruthClassifiers(0),
53  m_eventPropertyNtupleHandles(),
54  m_eventPropertyNtupleTools(0),
55  m_inputTrackCollection(0),
56  m_trackTruthCollectionName(0),
57  m_McEventCollectionName("TruthEvent"),
58  m_inputPrimaryVertexCollection(""),
59  m_ntupleFileName("TRKVAL"),
60  m_ntupleDirName("Validation"),
61  m_truthToTrack("Trk::TruthToTrack/TruthToTrack"),
62  m_trackSelector("InDet::InDetTrackSelectorTool/InDetTrackSelectorTool"),
63  m_genPartSelector("Trk::InDetReconstructableSelector/InDetReconstructableSelector"),
64  m_genJetFinder("Trk::GenParticleJetFinder/GenParticleJetFinder"),
65  m_useExternalEventLinkTree(false),
66  m_doTruth(true),
67  m_doTrackParticle(false),
68  m_visibleParticleWithoutTruth(nullptr),
69  m_nTrackTreeRecords(0),
70  m_trees(0),
71  m_eventLinkTree(nullptr)
72 
73 {
74  m_ValidationNtupleTools.push_back("Trk::TrackInformationNtupleTool/TrackInformationNtupleTool");
75  m_ValidationNtupleTools.push_back("Trk::PerigeeParametersNtupleTool/PerigeeParametersNtupleTool");
76  m_ValidationNtupleTools.push_back("Trk::MeasurementVectorNtupleTool/MeasurementVectorNtupleTool");
77  m_trackTruthClassifierHandles.push_back("Trk::PrimaryTruthClassifier/PrimaryTruthClassifier");
78 
79  m_eventPropertyNtupleHandles.push_back("Trk::EventPropertyNtupleTool/EventPropertyNtupleTool");
80  m_eventPropertyNtupleHandles.push_back("Trk::EventToTrackLinkNtupleTool/EventToTrackLinkNtupleTool");
81 
82  m_inputTrackCollection.emplace_back("Tracks");
83  m_trackTruthCollectionName.emplace_back("TrackTruthCollection");
84 
85  declareProperty("TrackCollection", m_inputTrackCollection, "Names of the track collections");
86  declareProperty("TrackParticleCollection", m_inputTrackParticleCollection, "Names of the track particle collections");
87  declareProperty("TrackTruthCollection", m_trackTruthCollectionName, "Names of the truth track collections (if DoTruth=True)");
88  declareProperty("TruthCollection", m_McEventCollectionName, "Name of the truth (gen event) collection (if DoTruth=True)");
89  declareProperty("PrimaryVertexCollection", m_inputPrimaryVertexCollection, "SG key of input PrimaryVertex collection (needed for TrackSelector, if no vertex collection is given, the selector will not use the vertex position)");
90  declareProperty("NtupleFileName", m_ntupleFileName, "Ntuple file handle");
91  declareProperty("NtupleDirectoryName", m_ntupleDirName, "directory name for ntuple tree");
92  //declareProperty("NtupleTreeName", m_ntupleTreeNames, "Name of the ntuple trees (list corresponding to the list of input track collections)");
93  declareProperty("UseExternalEventLinkTree", m_useExternalEventLinkTree, "flag if event link tree is supplied externally, eg as part of CBNT");
94  declareProperty("DoTruth", m_doTruth, "Write truth data?");
95  declareProperty("ValidationNtupleTools", m_ValidationNtupleTools, "Tool to write the validation ntuple");
96  declareProperty("ValTrkParticleNtupleTool", m_ValTrkParticleNtupleTool, "Tool to write the validation ntuple for Track Particles");
97  declareProperty("TruthNtupleTool", m_truthNtupleTool, "Tool to write the truth ntuple");
98  declareProperty("JetNtupleTool", m_jetTruthNtupleTool, "Tool to add jet information to ntuple");
99  declareProperty("TruthToTrackTool", m_truthToTrack, "Tool for truth to track");
100  declareProperty("TrackSelectorTool", m_trackSelector, "Tool for the selection of tracks");
101  declareProperty("GenParticleSelectorTool", m_genPartSelector, "Tool for the selection of truth particles");
102  declareProperty("GenParticleJetFinder", m_genJetFinder, "Tool for jet clustering (MC)");
103  declareProperty("TruthClassifierTools", m_trackTruthClassifierHandles, "List of truth classifier tools");
104  declareProperty("EventPropertyNtupleTools", m_eventPropertyNtupleHandles,"List of event property ntuple tools");
105  declareProperty("doTrackParticle", m_doTrackParticle, "Swith to record Rec:TrackParticle Trees");
106 }
107 
109 
111 
112  msg(MSG::INFO) <<"TrackValidationNtupleWriter initialize()" << endmsg;
113 
114  //check that m_inputTrackCollection and m_trackTruthCollectionName have the same size
115  if (m_doTruth && (m_inputTrackCollection.size() != m_trackTruthCollectionName.size())) {
116  msg(MSG::FATAL) << "joboptions TrackCollection and TrackTruthCollection have different sizes!" << endmsg;
117  msg(MSG::FATAL) << "If you like to get truth data (DoTruth=True)," << endmsg;
118  msg(MSG::FATAL) << " please make sure to set for each TrackCollection the corresponding TrackTruthCollection" << endmsg;
119  return StatusCode::FAILURE;
120  }
121 
122  // Get Validation ntuple Tools
123  StatusCode sc = m_ValidationNtupleTools.retrieve();
124  if (sc.isFailure()) {
125  msg(MSG::FATAL) << "Could not retrieve "<< m_ValidationNtupleTools <<" (to write validation ntuple) "<< endmsg;
126  return sc;
127  }
128  if(m_doTrackParticle){
129  // Get TrackParticle Validation ntuple Tool
130  sc = m_ValTrkParticleNtupleTool.retrieve();
131  if (sc.isFailure()) {
132  msg(MSG::FATAL) << "Could not retrieve "<< m_ValTrkParticleNtupleTool <<" (to write TrackParticle validation ntuple) "<< endmsg;
133  return sc;
134  }
135  }
136 
137  // Get the Track Selector Tool
138  if ( !m_trackSelector.empty() ) {
139  sc = m_trackSelector.retrieve();
140  if (sc.isFailure()) {
141  msg(MSG::FATAL) << "Could not retrieve "<< m_trackSelector <<" (to select the tracks which are written to the ntuple) "<< endmsg;
142  msg(MSG::INFO) << "Set the ToolHandle to None if track selection is supposed to be disabled" << endmsg;
143  return sc;
144  }
145  }
146 
147  msg(MSG::INFO) <<"Track Selector retrieved" << endmsg;
148  // -------------------------------
149  // get event property tools
151  if ( m_eventPropertyNtupleHandles.retrieve().isFailure() ) {
152  msg(MSG::ERROR) << "Failed to retreive " << m_eventPropertyNtupleHandles << endmsg;
153  } else {
154  msg(MSG::INFO) << "Retrieved " << m_eventPropertyNtupleHandles << endmsg;
155  }
156 
157 
158  //std::vector<std::string> classifierNames(0);
159  itTools = m_eventPropertyNtupleHandles.begin();
160  for ( ; itTools != m_eventPropertyNtupleHandles.end(); ++itTools ) {
161  // add tool to list
162  m_eventPropertyNtupleTools.push_back(&(*(*itTools)));
163  }
164 
165  // Retrieve the TruthToTrack tool if truth is required
166  if ( m_doTruth ) {
167  sc = m_truthToTrack.retrieve();
168  if (sc.isFailure()) {
169  ATH_MSG_FATAL ("Could not retrieve "<< m_truthToTrack);
170  return sc;
171  }
172 
173  // retrieve truth selector for efficiency denominator
174  sc = m_genPartSelector.retrieve();
175  if (sc.isFailure()) {
176  ATH_MSG_FATAL ("Could not retrieve "<< m_genPartSelector);
177  return sc;
178  }
179 
180  // -------------------------------
181  // get given classifier tools
183  if ( m_trackTruthClassifierHandles.retrieve().isFailure() ) {
184  msg(MSG::ERROR) << "Failed to retreive " << m_trackTruthClassifierHandles << endmsg;
185  } else {
186  msg(MSG::INFO) << "Retrieved " << m_trackTruthClassifierHandles << endmsg;
187  }
188  //std::vector<std::string> classifierNames(0);
189  itTools = m_trackTruthClassifierHandles.begin();
190  for ( ; itTools != m_trackTruthClassifierHandles.end(); ++itTools ) {
191  // add tool to list
192  m_trackTruthClassifiers.push_back(&(*(*itTools)));
193  //classifierNames.push_back((*itTools)->nameOfClassifier());
194  }
195 
196  // Get the Jet-Truth Ntuple Tool
197  if (! m_jetTruthNtupleTool.empty()) {
198  sc = m_jetTruthNtupleTool.retrieve();
199  if (sc.isFailure()) {
200  msg(MSG::ERROR) << "Could not retrieve "<< m_jetTruthNtupleTool
201  << " (to write jet data)."<< endmsg << "--> Instead configure "
202  << "to empty string if jet data not desired." << endmsg;
203  return sc;
204  }
205  sc = m_genJetFinder.retrieve();
206  if (sc.isFailure()) {
207  msg(MSG::ERROR) << "Could not retrieve "<< m_genJetFinder
208  << " (to find jets at truth level)."<< endmsg;
209  return sc;
210  }
211  }
212 
213  // Get the Truth Ntuple Tool
214  sc = m_truthNtupleTool.retrieve();
215  if (sc.isFailure()) {
216  msg(MSG::FATAL) << "Could not retrieve "<< m_truthNtupleTool <<" (to write truth data) "<< endmsg;
217  return sc;
218  }
219  bool include_jets = (! m_jetTruthNtupleTool.empty());
220  sc = m_truthNtupleTool->initBranches(m_trackTruthClassifiers, include_jets, m_inputTrackCollection);
221  if (sc.isFailure()) return sc;
222 
223  m_visibleParticleWithoutTruth = HepMC::newGenParticlePtr(HepMC::FourVector(), 0);
224 
225  } // if truth is activated
226 
227  // ---------------------------
228  // retrive pointer to THistSvc
229  ITHistSvc *tHistSvc;
230  sc = service("THistSvc", tHistSvc);
231  if (sc.isFailure()) {
232  msg(MSG::ERROR) << "Unable to retrieve pointer to THistSvc" << endmsg;
233  return sc;
234  }
235  // ---------------------------
236  // create tree for each given track collection and register it to THistSvc
237  std::vector<std::string>::const_iterator trackColNameIter = m_inputTrackCollection.begin();
238  //for (unsigned int trackColIndex = 0; trackColIndex<m_inputTrackCollection.size(); trackColIndex++) {
239  for (; trackColNameIter != m_inputTrackCollection.end(); ++trackColNameIter) {
240  TTree* tree = new TTree((*trackColNameIter).c_str(), ((*trackColNameIter)+" Validation").c_str());
241  m_trees.push_back(tree);
242  std::string fullNtupleName = "/"+m_ntupleFileName+"/"+m_ntupleDirName+"/"+(*trackColNameIter);
243  sc = tHistSvc->regTree(fullNtupleName, tree);
244  if (sc.isFailure()) {
245  msg(MSG::ERROR) << "Unable to register TTree : " << fullNtupleName << endmsg;
246  return sc;
247  }
248  // add the ntuple branches to this tree
250  itTools = m_ValidationNtupleTools.begin();
251  for ( ; itTools != m_ValidationNtupleTools.end(); ++itTools ) {
252  if (((*itTools)->addNtupleItems(tree)).isFailure()) {
253  msg(MSG::ERROR) << "ValidationNtupleTool could not add its branches"
254  << " for tree " << fullNtupleName << endmsg;
255  return StatusCode::FAILURE;
256  }
257  }
258  // initialize tree offsets to 0:
259  m_nTrackTreeRecords.push_back( 0 );
260  }
261 
262 
263  // create tree for each given track particle collection and register it to THistSvc
264  std::vector<std::string>::const_iterator trackParticleColNameIter = m_inputTrackParticleCollection.begin();
265 
266  for (; trackParticleColNameIter != m_inputTrackParticleCollection.end(); ++trackParticleColNameIter ) {
267  TTree* tree = new TTree((*trackParticleColNameIter).c_str(), ((*trackParticleColNameIter)+" Validation").c_str());
268  m_trees.push_back(tree);
269  std::string fullNtupleName = "/"+m_ntupleFileName+"/"+m_ntupleDirName+"/"+(*trackParticleColNameIter);
270  sc = tHistSvc->regTree(fullNtupleName, tree);
271  if (sc.isFailure()) {
272  msg(MSG::ERROR) << "Unable to register TTree : " << fullNtupleName << endmsg;
273  return sc;
274  }
275  // add the ntuple branches to this tree
276  sc = m_ValTrkParticleNtupleTool->addNtupleItems(tree);
277  if (sc.isFailure()) {
278  msg(MSG::ERROR) << "ValidationNtupleTool could not add its branches for tree " << fullNtupleName << endmsg;
279  return sc;
280  }
281 
282  } //loop over m_inputTrackParticleCollection
283 
284  for (unsigned int toolIndex = 0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex ) {
285  if( m_eventPropertyNtupleTools[toolIndex]->isTrackLinkTool( ) ) {
286  m_eventPropertyNtupleTools[toolIndex]->registerTrackCollections( m_inputTrackCollection,
287  m_doTruth );
288  } //if
289  else if(m_eventPropertyNtupleTools[toolIndex]->isTrkParticleLinkTool() ) // register just Trk::TrackParticleBase collection retrieved from SG
290  m_eventPropertyNtupleTools[toolIndex]->registerTrackCollections( m_inputTrackParticleCollection, m_doTruth );
291  } // for over m_eventPropertyNtupleTools
292 
293  // ---------------------------
294  // add event-wise track tree with link to the information in the track-wise tree
295  if (!m_useExternalEventLinkTree) {
296  m_eventLinkTree = new TTree("EventToTrackLink", "Event to track entry link");
297  std::string fullNtupleName = "/"+m_ntupleFileName+"/"+m_ntupleDirName+"/EventToTrackLink";
298  sc = tHistSvc->regTree(fullNtupleName, m_eventLinkTree);
299  if (sc.isFailure()) {
300  msg(MSG::ERROR) << "Unable to register TTree : " << fullNtupleName << endmsg;
301  return sc;
302  }
303 
304  for (unsigned int toolIndex=0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex ) {
305  if( m_eventPropertyNtupleTools[toolIndex]->isTrkParticleLinkTool() ||
306  m_eventPropertyNtupleTools[toolIndex]->isTrackLinkTool( ) ||
307  m_eventPropertyNtupleTools[toolIndex]->isEvtPropertyTool( ) ) {
308  if( m_eventPropertyNtupleTools[toolIndex]->addNtupleItems( m_eventLinkTree ).isFailure() )
309  {
310  msg(MSG::ERROR) << "Unable to add items into the event tree: " << m_eventLinkTree->GetTitle() << endmsg;
311  return StatusCode::SUCCESS;
312  } // if addNtupleItems isFailure
313  } // if Track or TrackParticle
314  } //loop over m_eventPropertyNtupleTools
315  } // if not use external link tree
316  return StatusCode::SUCCESS;
317 }
318 
319 
320 
322 
323 // std::cout<< "TrackValidationNtupleWriter execute() start" <<std::endl;
324 
325  ATH_MSG_DEBUG ("TrackValidationNtupleWriter execute() start");
326 
327  StatusCode sc = StatusCode::SUCCESS; if (sc.isFailure()) { /* mute sc*/ }
328  for (unsigned int toolIndex = 0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex ) {
329  if (m_eventPropertyNtupleTools[toolIndex]->resetVariables( ).isFailure()){};
330  }
331 
332  const McEventCollection* mcEventColl = nullptr;
333 
334  unsigned int nTruthTreeRecordsAtCurrentEvent = 0;
335  std::vector<Trk::ValidationTrackTruthData> truthData;
336  std::vector<HepMC::ConstGenParticlePtr>* selecParticles = nullptr;
337  //std::vector<const Trk::TrackParameters*> extrapolatedTruthPerigees;
338  //std::vector<std::vector<unsigned int> > classifications;
339  std::vector< Trk::GenParticleJet >* genParticleJets = nullptr;
340  //std::map<HepMC::GenParticle*, unsigned int> particleToIndexMap;
341  if (m_doTruth)
342  {
343  // retrieve gen event collection
344  if (evtStore()->retrieve(mcEventColl, m_McEventCollectionName).isFailure())
345  {
346  std::string key = "G4Truth";
347  if (evtStore()->retrieve(mcEventColl, key).isFailure())
348  {
349  msg(MSG::WARNING) << "Could not find the McEventCollection" << endmsg;
350  return StatusCode::SUCCESS;
351  }
352  }
353 
354 // std::cout<<"collecton retrieved "<<std::endl;
355 
356  // select stable, charged particles
357  selecParticles = m_genPartSelector->selectGenSignal(mcEventColl);
358  if (selecParticles)
359  {
360 // std::cout<<"there are selected particles "<<std::endl;
361 
362  // init the classification:
363  //classifications.resize(selecParticles->size());
364  //truthData.classifications.resize(selecParticles->size());
365  //truthData.truthPerigee.resize(selecParticles->size());
366  for (unsigned int toolIndex = 0 ; toolIndex < m_trackTruthClassifiers.size(); ++toolIndex )
367  {
368  m_trackTruthClassifiers[toolIndex]->initClassification(*mcEventColl, selecParticles);
369  }
370 
371  for ( const auto& genParticle: *selecParticles)
372  {
373  //truthData.genParticle = (*selecParticles);
375  partData.genParticle = genParticle;
376  // Perform extrapolation to generate perigee parameters
377  const Trk::TrackParameters* generatedTrackPerigee(nullptr);
378  if ( genParticle->production_vertex() )
379  {
380  generatedTrackPerigee = m_truthToTrack->makePerigeeParameters( genParticle );
381  if (generatedTrackPerigee == nullptr && HepMC::generations(genParticle) > 0 ) {
382  ATH_MSG_DEBUG ("No perigee available for interacting truth particle."
383  <<" -> This is OK for particles from the TrackRecord, but probably"
384  <<" a bug for production vertex particles.");
385  }
386 
387  }
388  partData.truthPerigee = generatedTrackPerigee;
389  // get classification
390  partData.classifications.reserve(m_trackTruthClassifiers.size());
391  for (unsigned int toolIndex = 0 ; toolIndex < m_trackTruthClassifiers.size(); ++toolIndex )
392  {
393  partData.classifications.push_back(m_trackTruthClassifiers[toolIndex]->classify(genParticle));
394  }
395  // resize the truth to track vectors to the number of input track collections:
396  partData.truthToTrackIndices.resize(m_inputTrackCollection.size());
397  partData.truthToTrackMatchingProbabilities.resize(m_inputTrackCollection.size());
398  truthData.push_back(partData);
399  //partIndex++;
400  }
401 
402 // std::cout<<"Second loop done "<<std::endl;
403 
404  if (! m_jetTruthNtupleTool.empty()) {
405 
406 // std::cout<<"Second loop done "<<std::endl;
407  genParticleJets = m_genJetFinder->jetMCFinder(*selecParticles);
408  if (!genParticleJets) ATH_MSG_DEBUG ("no jets found!");
409  else ATH_MSG_DEBUG ("jets found: " << genParticleJets->size());
410  }
411 // std::cout<<" end of jet truth tool check"<<std::endl;
412 
413  } // end if (selecParticles)
414  nTruthTreeRecordsAtCurrentEvent = m_truthNtupleTool->getNumberOfTreeRecords();
415  } // end if(m_doTruth)
416 
417 // std::cout<<"Finished working with truth part"<<std::endl;
418 
419  // get vertex collection so that the track selector is able to make a correct d0, z0 cut
420  const VxContainer* primaryVertexContainer = nullptr;
421  if (!m_trackSelector.empty() && !m_inputPrimaryVertexCollection.empty()) {
422  sc = evtStore()->retrieve(primaryVertexContainer, m_inputPrimaryVertexCollection);
423  if ( !primaryVertexContainer || sc.isFailure() ) {
424  ATH_MSG_ERROR( " Primary Vertex container (" << m_inputPrimaryVertexCollection << ") not found in StoreGate" );
425  delete genParticleJets;
426  return StatusCode::FAILURE;
427  }
428  }
429  const Trk::Vertex* vertex = nullptr;
430  if (primaryVertexContainer) {
431  if (!primaryVertexContainer->empty()) vertex = &((*primaryVertexContainer)[0]->recVertex());
432  }
433 
434  // fill the track trees for each track collection
435  for (unsigned int trackColIndex = 0; trackColIndex<m_inputTrackCollection.size(); trackColIndex++)
436  {
437  sc = writeTrackData(trackColIndex, truthData, vertex);
438  if (sc.isFailure()) {
439  ATH_MSG_ERROR ("Failure when writing track data for collection " << m_inputTrackCollection[trackColIndex]);
440  delete genParticleJets;
441  return sc;
442  }
443  }
444 
445  // fill track particle data
446  if(m_doTrackParticle){
447  for (unsigned int trackParticleColIndex = 0; trackParticleColIndex<m_inputTrackParticleCollection.size(); trackParticleColIndex++)
448  {
449  sc = writeTrackParticleData(trackParticleColIndex);
450  if (sc.isFailure()) {
451  msg(MSG::ERROR) <<"Failure when writing TrackParticle data for collection " << m_inputTrackParticleCollection[trackParticleColIndex] << endmsg;
452  delete genParticleJets;
453  return sc;
454  }
455  }
456 }
457  if (m_doTruth) {
458  for (unsigned int toolIndex = 0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex )
459  if( m_eventPropertyNtupleTools[toolIndex]->isTrackLinkTool() ) {
460  m_eventPropertyNtupleTools[toolIndex]->setGenParticleTreeIndices
461  (nTruthTreeRecordsAtCurrentEvent,
462  selecParticles ? (int)selecParticles->size() : 0);
463  }
464  }
465 
466  // fill info about whole event
467  for (unsigned int toolIndex = 0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex ) {
468  sc = m_eventPropertyNtupleTools[toolIndex]->fillEventData( );
469  if (sc.isFailure()) {
470  msg(MSG::ERROR) <<"Failure when filling event data." << endmsg;
471  delete genParticleJets;
472  return sc;
473  }
474  }
475 
476  if (!m_useExternalEventLinkTree) m_eventLinkTree->Fill();
477 
478  // fill info about jets
479  std::vector<unsigned int> truthToJetIndices(selecParticles ? selecParticles->size() : 0);
480  if (m_doTruth && selecParticles && genParticleJets && !m_jetTruthNtupleTool.empty() ) {
481 
482  const unsigned int nJetTruthTreeRecordsAtCurrentEvent
483  = m_jetTruthNtupleTool->getNumberOfTreeRecords();
484 
485  for( std::vector<Trk::GenParticleJet>::iterator itrMcJet = genParticleJets->begin();
486  itrMcJet < genParticleJets->end() ; ++itrMcJet) {
487 
488  std::vector<int> indices = (*itrMcJet).getIndicesInEvent();
489  if (!indices.empty())
490  for (std::vector<int>::const_iterator k =indices.begin(); k != indices.end(); ++k) {
491  if (*k >= 0 && *k <= (int)selecParticles->size() ) {
492  truthData[*k].truthToJetIndex = nJetTruthTreeRecordsAtCurrentEvent
493  + int(itrMcJet - genParticleJets->begin()) + 1;
494  } else {
495  msg(MSG::WARNING) <<" mistake with jet::indexInEvent !! " << *k << endmsg;
496  }
497  }
498  }
499  sc = m_jetTruthNtupleTool->writeJetTruthData(*genParticleJets,
500  nTruthTreeRecordsAtCurrentEvent);
501  if ( sc.isFailure() ){
502  msg(MSG::ERROR) << "Jet Truth Ntuple Tool could not fill data" << endmsg;
503  delete genParticleJets;
504  return StatusCode::FAILURE;
505  }
506  }
507 
508 
509  if (m_doTruth && selecParticles){
510  sc = m_truthNtupleTool->writeTruthData( truthData );
511  if ( sc.isFailure() ){
512  msg(MSG::ERROR) << "Truth Ntuple Tool could not fill data" << endmsg;
513  delete genParticleJets;
514  return StatusCode::FAILURE;
515  }
516  } // end if (m_doTruth && selecParticles)
517 
518  delete selecParticles;
519  delete genParticleJets;
520  std::vector<Trk::ValidationTrackTruthData>::iterator truthDataIter = truthData.begin();
521  for (; truthDataIter != truthData.end(); ++truthDataIter) {
522  delete (*truthDataIter).truthPerigee;
523  (*truthDataIter).truthPerigee = nullptr;
524  }
525  return StatusCode::SUCCESS;
526 }
527 
529  std::vector<Trk::ValidationTrackTruthData>& truthData,
530  const Trk::Vertex* primaryVertex ) {
531  StatusCode sc = StatusCode::SUCCESS; if (sc.isFailure()) { /* mute sc*/ }
532  // retrieve reconstructed tracks
533  const TrackCollection* tracks = nullptr;
534  if (!m_inputTrackCollection[trackColIndex].empty() && evtStore()->contains<TrackCollection>(m_inputTrackCollection[trackColIndex])) {
535  sc = evtStore()->retrieve(tracks, m_inputTrackCollection[trackColIndex]);
536  if (sc.isFailure()) {
537  msg(MSG::WARNING) <<"Tracks not found: " << m_inputTrackCollection[trackColIndex] << endmsg;
538  return StatusCode::SUCCESS;
539  } else {
540  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<"Tracks found: " << m_inputTrackCollection[trackColIndex] <<endmsg;
541  }
542  } else {
543  msg(MSG::WARNING) <<"TrackCollection " << m_inputTrackCollection[trackColIndex] << " not found in StoreGate." << endmsg;
544  return StatusCode::SUCCESS;
545  }
546 
547  const TrackTruthCollection* trackTruthCollection = nullptr;
548  if (m_doTruth) {
549  // retrieve track truth collection
550  if (!m_trackTruthCollectionName[trackColIndex].empty() && evtStore()->contains<TrackTruthCollection>(m_trackTruthCollectionName[trackColIndex])) {
551  sc = evtStore()->retrieve(trackTruthCollection, m_trackTruthCollectionName[trackColIndex]);
552  if (sc.isFailure()) {
553  msg(MSG::WARNING) <<"TrackTruthCollection not found: " << m_trackTruthCollectionName[trackColIndex] << endmsg;
554  // FIXME: return is not good here...
555  return StatusCode::SUCCESS;
556  } else {
557  ATH_MSG_DEBUG ("TrackTruthColl found: " << m_trackTruthCollectionName[trackColIndex]);
558  // TODO: use trackTruthCollection.trackCollectionLink() to check whether consistent track collection was used
559  }
560  } else {
561  msg(MSG::WARNING) <<"TrackTruthCollection " << m_trackTruthCollectionName[trackColIndex] << " not found in StoreGate." << endmsg;
562  // FIXME: return is not good here...
563  return StatusCode::SUCCESS;
564  }
565  } // end if m_doTruth
566 
567  const unsigned int nTruthTreeRecordsAtCurrentEvent =
568  (m_doTruth ? m_truthNtupleTool->getNumberOfTreeRecords() : 0 );
569 
570  int trackTreeIndexBegin = m_trees[trackColIndex]->GetEntries();
571  int nTracksPerEvent = 0;
572 
573  // loop over tracks
574  TrackCollection::const_iterator trackIterator = (*tracks).begin();
575  for ( ; trackIterator < (*tracks).end(); ++trackIterator) {
576  if (!((*trackIterator))) {
577  msg(MSG::WARNING) <<"TrackCollection " << m_inputTrackCollection[trackColIndex] << "contains empty entries" << endmsg;
578  continue;
579  }
580  if (m_trackSelector.empty() || m_trackSelector->decision(*(*trackIterator), primaryVertex)) {
581  ATH_MSG_VERBOSE ("track selected!");
583  itTools = m_ValidationNtupleTools.begin();
584  for ( ; itTools != m_ValidationNtupleTools.end(); ++itTools ) {
585  if (((*itTools)->fillTrackData( *(*trackIterator), 0 )).isFailure()) {
586  ATH_MSG_ERROR ("Validation Ntuple Tool could not fill track data.");
587  return StatusCode::FAILURE;
588  }
589  }
590  nTracksPerEvent += 1;
591 
592  if (m_doTruth){
593  // find matching truth particle
594  const TrackTruth* trackTruth = nullptr;
595  HepMC::ConstGenParticlePtr genParticle{nullptr};
596  TrackTruthCollection::const_iterator truthIterator = trackTruthCollection->find( trackIterator - (*tracks).begin() );
597  if ( truthIterator == trackTruthCollection->end() ){
598  ATH_MSG_DEBUG ("No matching truth particle found for track");
599  } else {
600  trackTruth = &((*truthIterator).second);
601  if ( !(trackTruth->particleLink().isValid()) ) {
602  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Link to generated particle information is not there - assuming a lost G4 particle ('fake fake')." << endmsg;
603  genParticle = m_visibleParticleWithoutTruth; // with pdg_id 0
604  } else {
605 #ifdef HEPMC3
606  genParticle = trackTruth->particleLink().scptr();
607 #else
608  genParticle = trackTruth->particleLink().cptr();
609 #endif
610  if ( genParticle!=nullptr && genParticle->pdg_id() == 0 ) {
611  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Associated Particle ID " << genParticle->pdg_id()
612  << " does not conform to PDG requirements... ignore it!" << endmsg;
613  genParticle = nullptr;
614  }
615  }
616  }
617  if (genParticle) {
618  ATH_MSG_VERBOSE("Associated Particle ID: " << genParticle->pdg_id());
619  // Perform extrapolation to generate perigee parameters
620  const Trk::TrackParameters* generatedTrackPerigee(nullptr);
621  const Trk::TrackParameters* newTrackPerigee(nullptr);
622  // fill the truth data in the track tree
623  int truthIndex = -1;
624  // TODO: do the search somehow better:
625  std::vector<Trk::ValidationTrackTruthData>::iterator matchedPartIter = truthData.begin();
626  for (; matchedPartIter != truthData.end(); ++matchedPartIter) {
627  truthIndex++;
628  if ((*matchedPartIter).genParticle == genParticle) break;
629  }
630  if (matchedPartIter == truthData.end()) {
631  // did not find particle in list of selected particles
632  truthIndex = -1;
633  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Matched particle " << genParticle << " is not in list of selected particles" << endmsg;
634  if ( genParticle->production_vertex() ) {
635  newTrackPerigee = m_truthToTrack->makePerigeeParameters( genParticle );
636  generatedTrackPerigee = newTrackPerigee;
637  }
638  } else {
639  // store the index in the track tree of the current track (establish link from truth to track)
640  (*matchedPartIter).truthToTrackIndices[trackColIndex].push_back(m_nTrackTreeRecords[trackColIndex]);
641  (*matchedPartIter).truthToTrackMatchingProbabilities[trackColIndex].push_back(trackTruth->probability());
642  generatedTrackPerigee = (*matchedPartIter).truthPerigee;
643  // calculate entry index in tree:
644  truthIndex += nTruthTreeRecordsAtCurrentEvent;
645  }
647  itTools = m_ValidationNtupleTools.begin();
648  for ( ; itTools != m_ValidationNtupleTools.end(); ++itTools ) {
649  if (((*itTools)->fillTrackTruthData( generatedTrackPerigee, *trackTruth, truthIndex )).isFailure()) {
650  ATH_MSG_ERROR ("Validation Ntuple Tool could not fill track truth data.");
651  delete newTrackPerigee;
652  return StatusCode::FAILURE;
653  }
654  }
655  // New memory allocated for the true perigee - must be deleted
656  delete newTrackPerigee;
657 
658  } // end if (genParticle)
659  } // end if (m_doTruth)
660 
661  m_trees[trackColIndex]->Fill();
662  itTools = m_ValidationNtupleTools.begin();
663  for ( ; itTools != m_ValidationNtupleTools.end(); ++itTools )
664  (*itTools)->resetVariables();
665  // call getEntries - 1, push_back in index vektor
666 
667  m_nTrackTreeRecords[trackColIndex]++;
668  } else {
669  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) <<"track not selected!" <<endmsg;
670  }
671  } // end for (trackIterator)
672 
673  for (unsigned int toolIndex = 0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex )
674  if( m_eventPropertyNtupleTools[toolIndex]->isTrackLinkTool() ) m_eventPropertyNtupleTools[toolIndex]->setTrackTreeIndices
675  (trackColIndex, trackTreeIndexBegin, nTracksPerEvent );
676 
677  return StatusCode::SUCCESS;
678 }
679 
681 
682  msg(MSG::DEBUG) << "writeTrackParticleData method started" << endmsg;
683 
684  // retrieve Trk::TrackParticleBaseCollection from the SG
685  const Trk::TrackParticleBaseCollection* trackParticles = nullptr;
686 
687  if (!m_inputTrackParticleCollection[trackParticleColIndex].empty() &&
688  evtStore()->contains<Trk::TrackParticleBaseCollection>(m_inputTrackParticleCollection[trackParticleColIndex])) {
689  if (evtStore()->retrieve(trackParticles, m_inputTrackParticleCollection[trackParticleColIndex]).isFailure()) {
690  msg(MSG::WARNING) <<"Trk::TrackParticleBasesContainer not found:" << m_inputTrackParticleCollection[trackParticleColIndex] << endmsg;
691  return StatusCode::SUCCESS;
692  } else {
693  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<"Trk::TrackParticleBasesContainer found: "<< m_inputTrackParticleCollection[trackParticleColIndex] <<endmsg;
694  }
695  } else {
696  msg(MSG::WARNING) <<"Trk::TrackParticleBasesContainer " << m_inputTrackParticleCollection[trackParticleColIndex] << " not found in StoreGate." << endmsg;
697  return StatusCode::SUCCESS;
698  }
699 
700  // indexes for eventPropertyNtupleTool
701  int trackTreeIndexBegin = m_trees[trackParticleColIndex + m_inputTrackCollection.size()]->GetEntries();
702  int nTrkParticlesPerEvent = 0;
703 
704  // fill coresponding Rec:TrackParticle tree using BasicTrkParticleValidationNtuple
705  Trk::TrackParticleBaseCollection::const_iterator trackParticleIterator = (*trackParticles).begin();
706  for ( ; trackParticleIterator < (*trackParticles).end(); ++trackParticleIterator) {
707  if (!((*trackParticleIterator))) {
708  msg(MSG::WARNING) <<"TrackParticleCollection " << m_inputTrackParticleCollection[trackParticleColIndex] << "contains empty entries" << endmsg;
709  continue;
710  } // if emty entry
711 
712  if ( m_ValTrkParticleNtupleTool->fillTrackParticleData( *(*trackParticleIterator) ).isFailure() ){
713  msg(MSG::ERROR) << "Validation Ntuple Tool could not fill track data." << endmsg;
714  return StatusCode::FAILURE;
715  } // if StatusCode is FAILURE
716  nTrkParticlesPerEvent += 1;
717 
718  if ( m_ValTrkParticleNtupleTool->writeRecord(m_trees[trackParticleColIndex + m_inputTrackCollection.size()]).isFailure() ){
719  msg(MSG::ERROR) << "Validation Ntuple Tool could not write track data." << endmsg;
720  return StatusCode::FAILURE;
721  }
722  } // loop over Rec::TrackPartcielContainer
723 
724  // Record link between Event Property and Trk::TrackParticleBase information
725  for (unsigned int toolIndex = 0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex ){
726  if( m_eventPropertyNtupleTools[toolIndex]->isTrkParticleLinkTool() )
727  m_eventPropertyNtupleTools[toolIndex]->setTrackTreeIndices(trackParticleColIndex, trackTreeIndexBegin, nTrkParticlesPerEvent );
728  }
729 
730  msg(MSG::DEBUG) <<"writeTrackParticleData successfully finished " << endmsg;
731  return StatusCode::SUCCESS;
732 }
733 
734 
736 
737  msg(MSG::INFO) << "TrackValidationNtupleWriter finalize()" << endmsg;
738 
739 #ifdef HEPMC3
740  //This is smart pointer in HepMC3
741 #else
742  delete m_visibleParticleWithoutTruth;
743 #endif
744  for (unsigned int toolIndex = 0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex ){
745  if (m_eventPropertyNtupleTools[toolIndex]->resetVariables( ).isFailure()){};
746  }
747 
748  return StatusCode::SUCCESS;
749 }
750 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::TrackValidationNtupleWriter::finalize
StatusCode finalize()
standard Athena-Algorithm method
Definition: TrackValidationNtupleWriter.cxx:735
IJetTruthNtupleTool.h
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
TrackParticleBaseCollection.h
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Trk::TrackValidationNtupleWriter::m_inputTrackCollection
std::vector< std::string > m_inputTrackCollection
name of the TrackCollection
Definition: TrackValidationNtupleWriter.h:83
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
IGenParticleSelector.h
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
IValidationNtupleTool.h
Trk::TrackValidationNtupleWriter::writeTrackParticleData
StatusCode writeTrackParticleData(unsigned int trackParticleColIndex)
method to write track particle data to Ntuple.
Definition: TrackValidationNtupleWriter.cxx:680
Common::classify
void classify(ToolHandle< IMCTruthClassifier > &m_classif, const xAOD::TruthParticle *theParticle, unsigned int &particleOutCome, unsigned int &result, int &hadron_pdg, unsigned int &particleType, unsigned int &particleOrigin)
Definition: Common.cxx:96
IEventPropertyNtupleTool.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ValidationTrackTruthData::genParticle
HepMC::ConstGenParticlePtr genParticle
Definition: ITruthNtupleTool.h:38
Trk::indices
std::pair< long int, long int > indices
Definition: AlSymMatBase.h:24
TrackParticleBase.h
Trk::TrackValidationNtupleWriter::m_ValidationNtupleTools
ToolHandleArray< Trk::ITrackValidationNtupleTool > m_ValidationNtupleTools
set of tools for writing Trk::Track into the Ntuple
Definition: TrackValidationNtupleWriter.h:74
ITrackTruthClassifier.h
tree
TChain * tree
Definition: tile_monitor.h:30
Trk::ValidationTrackTruthData::truthToTrackIndices
std::vector< std::vector< unsigned int > > truthToTrackIndices
Definition: ITruthNtupleTool.h:40
Trk::TrackValidationNtupleWriter::execute
StatusCode execute()
standard Athena-Algorithm method
Definition: TrackValidationNtupleWriter.cxx:321
Trk::ValidationTrackTruthData::truthToTrackMatchingProbabilities
std::vector< std::vector< float > > truthToTrackMatchingProbabilities
Definition: ITruthNtupleTool.h:41
Trk::TrackValidationNtupleWriter::m_doTruth
bool m_doTruth
Switch to turn on / off truth.
Definition: TrackValidationNtupleWriter.h:96
Trk::TrackValidationNtupleWriter::m_inputTrackParticleCollection
std::vector< std::string > m_inputTrackParticleCollection
name of the TrackParticleCollection
Definition: TrackValidationNtupleWriter.h:84
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
GenParticle.h
Trk::TrackValidationNtupleWriter::~TrackValidationNtupleWriter
~TrackValidationNtupleWriter()
Default Destructor.
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Trk::TrackValidationNtupleWriter::m_ntupleFileName
std::string m_ntupleFileName
jobOption: Ntuple file name
Definition: TrackValidationNtupleWriter.h:88
Track.h
Trk::TrackValidationNtupleWriter::initialize
StatusCode initialize()
standard Athena-Algorithm method
Definition: TrackValidationNtupleWriter.cxx:110
Trk::TrackValidationNtupleWriter::m_inputPrimaryVertexCollection
std::string m_inputPrimaryVertexCollection
SG key of the input primary vertex collection (used by the track selector)
Definition: TrackValidationNtupleWriter.h:87
TrackTruthCollection
Definition: TrackTruthCollection.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::TrackValidationNtupleWriter::m_eventPropertyNtupleHandles
ToolHandleArray< Trk::IEventPropertyNtupleTool > m_eventPropertyNtupleHandles
jobO: list of event property tools
Definition: TrackValidationNtupleWriter.h:80
McEventCollection.h
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
VxContainer.h
Trk::TrackValidationNtupleWriter::m_ValTrkParticleNtupleTool
ToolHandle< Trk::IValidationNtupleTool > m_ValTrkParticleNtupleTool
Tool for writting Rec::TrackParticle into the Ntuple – OBSOLETE.
Definition: TrackValidationNtupleWriter.h:75
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::TrackValidationNtupleWriter::m_genPartSelector
ToolHandle< Trk::IGenParticleSelector > m_genPartSelector
Tool handle to the Trk::IGenParticleSelector.
Definition: TrackValidationNtupleWriter.h:93
VxContainer
Definition: VxContainer.h:28
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
DataVector< Trk::Track >
TrackTruth::particleLink
const HepMcParticleLink & particleLink() const
Definition: TrackTruth.h:26
AthAlgorithm
Definition: AthAlgorithm.h:47
Trk::TrackValidationNtupleWriter::TrackValidationNtupleWriter
TrackValidationNtupleWriter(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
Definition: TrackValidationNtupleWriter.cxx:45
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
ITrackValidationNtupleTool.h
Trk::TrackValidationNtupleWriter::m_trackTruthClassifierHandles
ToolHandleArray< Trk::ITrackTruthClassifier > m_trackTruthClassifierHandles
jobO: list of truth classifiers
Definition: TrackValidationNtupleWriter.h:78
Trk::TrackValidationNtupleWriter::m_ntupleDirName
std::string m_ntupleDirName
jobOption: Ntuple directory name
Definition: TrackValidationNtupleWriter.h:89
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MagicNumbers.h
Trk::TrackValidationNtupleWriter::m_trackSelector
ToolHandle< Trk::ITrackSelectorTool > m_trackSelector
Tool handle to the Trk::ITrackSelectorTool.
Definition: TrackValidationNtupleWriter.h:92
ITruthNtupleTool.h
Trk::TrackValidationNtupleWriter::m_genJetFinder
ToolHandle< Trk::IGenParticleJetFinder > m_genJetFinder
Tool to find jets.
Definition: TrackValidationNtupleWriter.h:94
IGenParticleJetFinder.h
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
TrackTruth
MC particle associated with a reco track + the quality of match.
Definition: TrackTruth.h:14
Trk::TrackValidationNtupleWriter::m_truthNtupleTool
ToolHandle< Trk::ITruthNtupleTool > m_truthNtupleTool
Definition: TrackValidationNtupleWriter.h:76
Trk::ValidationTrackTruthData::classifications
std::vector< unsigned int > classifications
Definition: ITruthNtupleTool.h:43
Trk::ValidationTrackTruthData::truthPerigee
const Trk::TrackParameters * truthPerigee
Definition: ITruthNtupleTool.h:39
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
Trk::TrackValidationNtupleWriter::writeTrackData
StatusCode writeTrackData(unsigned int trackColIndex, std::vector< Trk::ValidationTrackTruthData > &truthData, const Trk::Vertex *primaryVertex=NULL)
< following methods and atributes are used in derived class TrigTrackValidationNtupleWriter Private m...
Definition: TrackValidationNtupleWriter.cxx:528
Trk::TrackValidationNtupleWriter::m_jetTruthNtupleTool
ToolHandle< Trk::IJetTruthNtupleTool > m_jetTruthNtupleTool
Definition: TrackValidationNtupleWriter.h:77
ITruthToTrack.h
Trk::TrackValidationNtupleWriter::m_McEventCollectionName
std::string m_McEventCollectionName
name of the McEventCollection
Definition: TrackValidationNtupleWriter.h:86
Trk::TrackValidationNtupleWriter::m_trackTruthCollectionName
std::vector< std::string > m_trackTruthCollectionName
name of the TrackTruthCollection
Definition: TrackValidationNtupleWriter.h:85
TrackTruth::probability
float probability() const
Definition: TrackTruth.h:28
Trk::TrackValidationNtupleWriter::m_truthToTrack
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
Tool handle to the Trk::TruthToTrack tool.
Definition: TrackValidationNtupleWriter.h:91
DEBUG
#define DEBUG
Definition: page_access.h:11
GenParticleJet.h
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
HepMC::generations
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (TODO migrate to be...
Definition: MagicNumbers.h:302
ITrackSelectorTool.h
TrackValidationNtupleWriter.h
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
Trk::TrackValidationNtupleWriter::m_doTrackParticle
bool m_doTrackParticle
Definition: TrackValidationNtupleWriter.h:97
fitman.k
k
Definition: fitman.py:528
Trk::ValidationTrackTruthData
Definition: ITruthNtupleTool.h:36
Trk::TrackValidationNtupleWriter::m_useExternalEventLinkTree
bool m_useExternalEventLinkTree
if TVNW should make event tree itself or assume CBNT does
Definition: TrackValidationNtupleWriter.h:95
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37