CbmRoot
Loading...
Searching...
No Matches
CbmAnaTreeContainer.h
Go to the documentation of this file.
1/* Copyright (C) 2023-2023 Warsaw University of Technology, Warsaw
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Daniel Wielanek [committer] */
4#ifndef NICACBMATCONTAINER_H_
5#define NICACBMATCONTAINER_H_
6
7#include <TNamed.h>
8
9#include <AnalysisTree/Detector.hpp>
10#include <AnalysisTree/EventHeader.hpp>
11#include <AnalysisTree/Matching.hpp>
12
13class TChain;
14
23
24class CbmAnaTreeRecoSourceContainer : public TNamed {
25 AnalysisTree::EventHeader* fEvent = {nullptr};
26 AnalysisTree::TrackDetector* fVtxTracks = {nullptr};
27 AnalysisTree::Matching* fVtx2Tof = {nullptr};
28 AnalysisTree::HitDetector* fTofHits = {nullptr};
29 AnalysisTree::Matching* fVtx2Mc = {nullptr};
31
32 public:
34 void LoadFields(TString file);
35 Bool_t ConnectToTree(TChain* tree);
36 inline AnalysisTree::EventHeader* GetEventHeader() const { return fEvent; };
37 inline AnalysisTree::TrackDetector* GetVtxTracks() const { return fVtxTracks; };
38 inline AnalysisTree::HitDetector* GetTofHits() const { return fTofHits; };
39 inline AnalysisTree::Matching* GetVtx2ToFMatch() const { return fVtx2Tof; };
40 inline AnalysisTree::Matching* GetVtx2Sim() const { return fVtx2Mc; };
41 inline AnaTreeRecoIds& GetFieldIds() { return fVtxIds; }
43 {
44 if (fEvent) {
45 delete fEvent;
46 delete fVtxTracks;
47 delete fTofHits;
48 delete fVtx2Tof;
49 delete fVtx2Mc;
50 }
51 }
53};
54
56 Int_t px, py, pz;
57 Int_t pdg, motherId, mass;
58 Int_t event_b;
59 Int_t event_psi;
61};
62
63class CbmAnaTreeMcSourceContainer : public TNamed {
64 AnalysisTree::EventHeader* fEvent = {nullptr};
65 AnalysisTree::Particles* fParticles = {nullptr};
67
68 public:
70 void LoadFields(TString inFile);
71 Bool_t ConnectToTree(TChain* tree);
72 inline AnaTreeMcIds& GetFieldIds() { return fIds; };
73 inline AnalysisTree::EventHeader* GetEventHeader() const { return fEvent; };
74 inline AnalysisTree::Particles* GetParticles() const { return fParticles; };
76 {
77 if (fEvent) {
78 delete fEvent;
79 delete fParticles;
80 }
81 };
83};
84
85#endif /* NICACBMATCONTAINER_H_ */
AnalysisTree::EventHeader * fEvent
AnalysisTree::EventHeader * GetEventHeader() const
AnalysisTree::Particles * fParticles
AnalysisTree::Particles * GetParticles() const
AnalysisTree::TrackDetector * GetVtxTracks() const
AnalysisTree::Matching * GetVtx2Sim() const
AnalysisTree::EventHeader * GetEventHeader() const
AnalysisTree::Matching * GetVtx2ToFMatch() const
AnalysisTree::TrackDetector * fVtxTracks
AnalysisTree::Matching * fVtx2Tof
AnalysisTree::Matching * fVtx2Mc
AnalysisTree::HitDetector * fTofHits
AnalysisTree::EventHeader * fEvent
AnalysisTree::HitDetector * GetTofHits() const