2 #include "FairMCEventHeader.h"
3 #include "FairRootManager.h"
4 #include "TClonesArray.h"
12 assert(!in_branches_.empty() && !out_branch_.empty() && out_config_
14 auto* ioman = FairRootManager::Instance();
15 assert(ioman !=
nullptr);
16 cbm_header_ = (FairMCEventHeader*) ioman->GetObject(in_branches_[0].c_str());
20 AnalysisTree::BranchConfig RecEventHeaderBranch(
21 "RecEventHeader", AnalysisTree::DetType::kEventHeader);
22 RecEventHeaderBranch.AddField<
float>(
"psi_EP");
23 RecEventHeaderBranch.AddField<
float>(
"vtx_chi2");
24 RecEventHeaderBranch.AddField<
float>(
"Epsd");
25 RecEventHeaderBranch.AddField<
int>(
"M");
26 RecEventHeaderBranch.AddField<
int>(
"evt_id");
27 out_config_->AddBranchConfig(RecEventHeaderBranch);
37 std::cout <<
"WARNING! No fPrimVtx!" << std::endl;
49 conf.GetFieldId(
"evt_id"));
52 conf.GetFieldId(
"vtx_chi2"));