#include "PhysicsNtuple/AlgStore.h"#include "PhysicsNtuple/Truth.h"Go to the source code of this file.
Namespaces | |
| namespace | Anp |
Classes | |
| class | Anp::FillTruth |
Functions | |
| template<class T> | |
| std::vector< const T * > | FillRecoTruth (const TClonesArray *array) |
|
||||||||||
|
Definition at line 613 of file FillTruth.cxx. 00614 {
00615 //
00616 // Collect and return records that match true and reconstructed objects
00617 //
00618
00619 vector<const T *> tvec;
00620
00621 if(!array)
00622 {
00623 cerr << "FillRecoTruth<T> - TClonesArray of reco-to-truth records does not exist" << endl;
00624 return tvec;
00625 }
00626
00627 const int nentries = array -> GetEntries();
00628 for(int index = 0; index < nentries; ++index)
00629 {
00630 const T *treco = dynamic_cast<const T *>(array -> At(index));
00631 if(!treco)
00632 {
00633 cerr << "FillRecoTruth<T> - dynamic_cast failed at index: "<< index << endl;
00634 continue;
00635 }
00636
00637 if(treco -> index != index)
00638 {
00639 cerr << "FillRecoTruth<T> - wrong index at index: "<< index << endl;
00640 continue;
00641 }
00642
00643 tvec.push_back(treco);
00644 }
00645
00646 return tvec;
00647 }
|
1.3.9.1