CbmRoot
ATKFParticleFinder.h
Go to the documentation of this file.
1 #ifndef ATKFParticleFinder_HH
2 #define ATKFParticleFinder_HH
3 
4 #include <string>
5 #include <utility>
6 
7 #include "TChain.h"
8 #include "TFile.h"
9 #include "TTree.h"
10 
11 #include "AnalysisTree/Configuration.hpp"
12 #include "AnalysisTree/Detector.hpp"
13 #include "AnalysisTree/EventHeader.hpp"
14 
15 #include "CutsContainer.h"
16 #include "KFParticleTopoReconstructor.h"
17 
19 public:
20  void InitInput(const std::string& file_name, const std::string& tree_name);
21  void InitOutput(const std::string& file_name = "KFPF_output.root");
22  void Finish();
23  void SetCuts(CutsContainer cuts) { cuts_ = cuts; };
24  // const KFParticleTopoReconstructor* GetTopoReconstructor() const {return topo_reconstructor_;};
25  void SetPIDMode(int pid) { pid_mode_ = pid; };
26  void WriteCandidates(const KFParticleTopoReconstructor* TR);
27  void Run(int n_events = -1);
28 
29 private:
30  KFParticleTopoReconstructor* CreateTopoReconstructor();
31 
32  std::string in_file_name_;
33  std::string in_tree_name_;
34  TFile* in_file_ {nullptr};
35  TChain* in_chain_ {nullptr};
36  AnalysisTree::Configuration* config_ {nullptr};
37  AnalysisTree::EventHeader* rec_event_header_ {nullptr};
38  AnalysisTree::TrackDetector* kf_tracks_ {nullptr};
39 
40  TFile* out_file_ {nullptr};
41  TTree* out_tree_ {nullptr};
42  AnalysisTree::Configuration out_config_;
43  AnalysisTree::Particles* particles_reco_ {nullptr};
44 
45  int q_field_id_ {-999};
46  int par_field_id_ {-999};
47  int mf_field_id_ {-999};
48  int cov_field_id_ {-999};
49  int passcuts_field_id_ {-999};
50  int pdg_field_id_ {-999};
51  int vtx_chi2_field_id_ {-999};
52  int nhits_field_id_ {-999};
53  int nhits_mvd_field_id_ {-999};
54 
57 
59  // KFParticleTopoReconstructor* topo_reconstructor_{nullptr};
60 
61  std::vector<float> GetCovMatrixCbm(const AnalysisTree::Track& track) const;
62 
63  int pid_mode_ {1};
64 };
65 #endif //ATKFParticleFinder_HH
ATKFParticleFinder::par_field_id_
int par_field_id_
Definition: ATKFParticleFinder.h:46
ATKFParticleFinder::out_file_
TFile * out_file_
Definition: ATKFParticleFinder.h:40
ATKFParticleFinder::SetPIDMode
void SetPIDMode(int pid)
Definition: ATKFParticleFinder.h:25
ATKFParticleFinder::daughter2_id_field_id_
int daughter2_id_field_id_
Definition: ATKFParticleFinder.h:56
ATKFParticleFinder::pdg_field_id_
int pdg_field_id_
Definition: ATKFParticleFinder.h:50
ATKFParticleFinder
Definition: ATKFParticleFinder.h:18
ATKFParticleFinder::passcuts_field_id_
int passcuts_field_id_
Definition: ATKFParticleFinder.h:49
ATKFParticleFinder::rec_event_header_
AnalysisTree::EventHeader * rec_event_header_
Definition: ATKFParticleFinder.h:37
CutsContainer
Definition: CutsContainer.h:13
ATKFParticleFinder::particles_reco_
AnalysisTree::Particles * particles_reco_
Definition: ATKFParticleFinder.h:43
ATKFParticleFinder::SetCuts
void SetCuts(CutsContainer cuts)
Definition: ATKFParticleFinder.h:23
ATKFParticleFinder::GetCovMatrixCbm
std::vector< float > GetCovMatrixCbm(const AnalysisTree::Track &track) const
Definition: ATKFParticleFinder.cxx:197
CutsContainer.h
ATKFParticleFinder::daughter1_id_field_id_
int daughter1_id_field_id_
Definition: ATKFParticleFinder.h:55
ATKFParticleFinder::out_tree_
TTree * out_tree_
Definition: ATKFParticleFinder.h:41
ATKFParticleFinder::Finish
void Finish()
Definition: ATKFParticleFinder.cxx:57
ATKFParticleFinder::InitInput
void InitInput(const std::string &file_name, const std::string &tree_name)
Definition: ATKFParticleFinder.cxx:3
ATKFParticleFinder::CreateTopoReconstructor
KFParticleTopoReconstructor * CreateTopoReconstructor()
Definition: ATKFParticleFinder.cxx:88
ATKFParticleFinder::mf_field_id_
int mf_field_id_
Definition: ATKFParticleFinder.h:47
ATKFParticleFinder::q_field_id_
int q_field_id_
Definition: ATKFParticleFinder.h:45
ATKFParticleFinder::in_tree_name_
std::string in_tree_name_
Definition: ATKFParticleFinder.h:33
ATKFParticleFinder::pid_mode_
int pid_mode_
Definition: ATKFParticleFinder.h:63
ATKFParticleFinder::WriteCandidates
void WriteCandidates(const KFParticleTopoReconstructor *TR)
Definition: ATKFParticleFinder.cxx:172
ATKFParticleFinder::nhits_field_id_
int nhits_field_id_
Definition: ATKFParticleFinder.h:52
ATKFParticleFinder::InitOutput
void InitOutput(const std::string &file_name="KFPF_output.root")
Definition: ATKFParticleFinder.cxx:32
ATKFParticleFinder::nhits_mvd_field_id_
int nhits_mvd_field_id_
Definition: ATKFParticleFinder.h:53
ATKFParticleFinder::Run
void Run(int n_events=-1)
Definition: ATKFParticleFinder.cxx:64
ATKFParticleFinder::cov_field_id_
int cov_field_id_
Definition: ATKFParticleFinder.h:48
ATKFParticleFinder::out_config_
AnalysisTree::Configuration out_config_
Definition: ATKFParticleFinder.h:42
ATKFParticleFinder::in_chain_
TChain * in_chain_
Definition: ATKFParticleFinder.h:35
ATKFParticleFinder::config_
AnalysisTree::Configuration * config_
Definition: ATKFParticleFinder.h:36
ATKFParticleFinder::kf_tracks_
AnalysisTree::TrackDetector * kf_tracks_
Definition: ATKFParticleFinder.h:38
ATKFParticleFinder::in_file_name_
std::string in_file_name_
Definition: ATKFParticleFinder.h:32
ATKFParticleFinder::vtx_chi2_field_id_
int vtx_chi2_field_id_
Definition: ATKFParticleFinder.h:51
ATKFParticleFinder::in_file_
TFile * in_file_
Definition: ATKFParticleFinder.h:34
ATKFParticleFinder::cuts_
CutsContainer cuts_
Definition: ATKFParticleFinder.h:58