4 #include <TDatabasePDG.h>
5 #include <TEveManager.h>
6 #include <TGeoManager.h>
12 #include <TClonesArray.h>
26 TFile* trackFile = TFile::Open(
"tracks.root",
"READ");
28 std::cerr <<
"Couldn't open 'tracks.root'." << std::endl;
31 TTree*
tree = (TTree*)trackFile->Get(
"tree");
33 std::cerr <<
"Couldn't find tree 'tree' in file 'tracks.root'." << std::endl;
36 TClonesArray* trackArray =
new TClonesArray(
"genfit::Track");
37 tree->SetBranchAddress(
"trackBranch", &trackArray);
41 TClonesArray* vertexArray =
new TClonesArray(
"genfit::GFRaveVertex");
42 tree->SetBranchAddress(
"vertexBranch", &vertexArray);
45 for (Long_t
i = 0;
i < tree->GetEntries(); ++
i) {
48 std::cout <<
"trackArray nr of entries: " << trackArray->GetEntries() <<
"\n";
50 for (Long_t
j = 0;
j < trackArray->GetEntriesFast(); ++
j) {
51 std::cout <<
"track uniqueID: " <<
static_cast<genfit::Track*
>(trackArray->At(
j))->GetUniqueID() <<
52 " (" <<
static_cast<genfit::Track*
>(trackArray->At(
j))->GetUniqueID() - 16777216 <<
")\n";
55 for (Long_t
j = 0;
j < vertexArray->GetEntriesFast(); ++
j) {
68 std::cout <<
"track parameters have track \n";
71 std::cout <<
"track parameters have NO track <--------------------------------- \n";