CbmRoot
Loading...
Searching...
No Matches
CbmStsTracksConverter.h
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 Physikalisches Institut, Eberhard Karls Universität Tuebingen, Tuebingen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Viktor Klochkov [committer] */
4
5#ifndef ANALYSIS_TREE_STSTRACKSCONVERTER_H_
6#define ANALYSIS_TREE_STSTRACKSCONVERTER_H_
7
8#include "CbmConverterTask.h"
9#include <CbmMCDataManager.h>
10
11#include "AnalysisTree/Detector.hpp"
12
13class TClonesArray;
14class CbmVertex;
15class CbmStsTrack;
18class CbmMCDataArray;
19
20namespace AnalysisTree
21{
22 class Matching;
23}
24
26
27public:
28 explicit CbmStsTracksConverter(std::string out_branch_name, std::string match_to = "")
29 : CbmConverterTask(std::move(out_branch_name), std::move(match_to))
30 {
31 }
32
34
35 void Init() final;
36 void ProcessData(CbmEvent* event) final;
37 void Finish() final {}
38
39 void SetIsWriteKFInfo(bool is = true) { is_write_kfinfo_ = is; }
40 void SetIsReproduceCbmKFPF(bool is = true) { is_reproduce_cbmkfpf_ = is; }
41
42private:
43 void ReadVertexTracks(CbmEvent* event);
44 void MapTracks(CbmEvent* event);
45 void InitInput();
46 float ExtrapolateToVertex(CbmStsTrack* sts_track, AnalysisTree::Track& track, int pdg);
47
48 void WriteKFInfo(AnalysisTree::Track& track, const CbmStsTrack* sts_track, bool is_good_track) const;
49 bool IsGoodCovMatrix(const CbmStsTrack* sts_track) const;
50 // int GetMcPid(const CbmTrackMatchNew* match, AnalysisTree::Track& track) const;
51
52 AnalysisTree::TrackDetector* vtx_tracks_ {nullptr};
53 AnalysisTree::Matching* vtx_tracks_2_sim_ {nullptr};
54
56 TClonesArray* cbm_sts_tracks_ {nullptr};
57 TClonesArray* cbm_sts_match_ {nullptr};
58
60
61 bool is_write_kfinfo_ {true};
63
64 int iq_ {AnalysisTree::UndefValueInt};
65 int indf_ {AnalysisTree::UndefValueInt};
66 int indf_time_ {AnalysisTree::UndefValueInt};
67 int ichi2_ {AnalysisTree::UndefValueInt};
68 int ichi2_time_ {AnalysisTree::UndefValueInt};
69 int inhits_ {AnalysisTree::UndefValueInt};
70 int inhits_mvd_ {AnalysisTree::UndefValueInt};
71 int idcax_ {AnalysisTree::UndefValueInt};
72 int ivtx_chi2_ {AnalysisTree::UndefValueInt};
73 int ide_dx_ {AnalysisTree::UndefValueInt};
74 int imatch_weight_ {AnalysisTree::UndefValueInt};
75
76 int ipar_ {AnalysisTree::UndefValueInt};
77 int imf_ {AnalysisTree::UndefValueInt};
78 int icov_ {AnalysisTree::UndefValueInt};
79 int imother_pdg_ {AnalysisTree::UndefValueInt};
80 int ipasscuts_ {AnalysisTree::UndefValueInt};
81
82 ClassDef(CbmStsTracksConverter, 1)
83};
84
85#endif // ANALYSIS_TREE_STSTRACKSCONVERTER_H_
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
Access to a MC data branch for time-based analysis.
Task class creating and managing CbmMCDataArray objects.
void ProcessData(CbmEvent *event) final
void SetIsWriteKFInfo(bool is=true)
TClonesArray * cbm_sts_match_
non-owning pointer
bool IsGoodCovMatrix(const CbmStsTrack *sts_track) const
void WriteKFInfo(AnalysisTree::Track &track, const CbmStsTrack *sts_track, bool is_good_track) const
AnalysisTree::Matching * vtx_tracks_2_sim_
raw pointers are needed for TTree::Branch
CbmVertex * cbm_prim_vertex_
non-owning pointer
void MapTracks(CbmEvent *event)
AnalysisTree::TrackDetector * vtx_tracks_
raw pointers are needed for TTree::Branch
void SetIsReproduceCbmKFPF(bool is=true)
TClonesArray * cbm_sts_tracks_
non-owning pointer
void ReadVertexTracks(CbmEvent *event)
CbmMCDataManager * cbm_mc_manager_
non-owning pointer
float ExtrapolateToVertex(CbmStsTrack *sts_track, AnalysisTree::Track &track, int pdg)
CbmStsTracksConverter(std::string out_branch_name, std::string match_to="")
Hash for CbmL1LinkKey.