CbmRoot
Loading...
Searching...
No Matches
ATKFParticleFinder.h
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 GSI, IKF-UFra
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Oleksii Lubynets [committer] */
4
5#ifndef ATKFParticleFinder_HH
6#define ATKFParticleFinder_HH
7
8#include "TFile.h"
9#include "TTree.h"
10
11#include <string>
12#include <utility>
13
14#include "AnalysisTree/Chain.hpp"
15#include "AnalysisTree/Configuration.hpp"
16#include "AnalysisTree/Detector.hpp"
17#include "AnalysisTree/EventHeader.hpp"
18#include "CutsContainer.h"
19
20class KFParticleTopoReconstructor;
21class Matching;
22
24public:
25 void InitInput(const std::string& file_name, const std::string& tree_name);
26 void InitOutput(const std::string& file_name = "KFPF_output.root");
27 void Finish();
28 void SetCuts(CutsContainer cuts) { cuts_ = cuts; };
29 // const KFParticleTopoReconstructor* GetTopoReconstructor() const {return topo_reconstructor_;};
30 void SetPIDMode(int pid) { pid_mode_ = pid; };
31 void WriteCandidates(const KFParticleTopoReconstructor* TR);
32 void Run(int n_events = -1);
33
34private:
36
37 std::string in_file_name_;
38 std::string in_tree_name_;
39 AnalysisTree::Chain* in_chain_ {nullptr};
40 AnalysisTree::EventHeader* rec_event_header_ {nullptr};
41 AnalysisTree::TrackDetector* kf_tracks_ {nullptr};
42 AnalysisTree::Particles* sim_particles_ {nullptr};
43 AnalysisTree::Matching* kf2sim_tracks_ {nullptr};
44
45 TFile* out_file_ {nullptr};
46 TTree* out_tree_ {nullptr};
47 AnalysisTree::Configuration out_config_;
48 AnalysisTree::Particles* particles_reco_ {nullptr};
49
50 int q_field_id_ {-999};
51 int par_field_id_ {-999};
52 int mf_field_id_ {-999};
53 int cov_field_id_ {-999};
56 int nhits_field_id_ {-999};
58
61
63 KFParticleTopoReconstructor* topo_reconstructor_ {nullptr};
64
65 std::vector<float> GetCovMatrixCbm(const AnalysisTree::Track& track) const;
66
67 int pid_mode_ {1};
68};
69#endif //ATKFParticleFinder_HH
void Run(int n_events=-1)
AnalysisTree::Particles * sim_particles_
AnalysisTree::TrackDetector * kf_tracks_
AnalysisTree::Configuration out_config_
std::vector< float > GetCovMatrixCbm(const AnalysisTree::Track &track) const
void InitInput(const std::string &file_name, const std::string &tree_name)
AnalysisTree::Chain * in_chain_
void InitOutput(const std::string &file_name="KFPF_output.root")
void SetCuts(CutsContainer cuts)
AnalysisTree::EventHeader * rec_event_header_
AnalysisTree::Matching * kf2sim_tracks_
KFParticleTopoReconstructor * topo_reconstructor_
AnalysisTree::Particles * particles_reco_
void WriteCandidates(const KFParticleTopoReconstructor *TR)