CbmRoot
Loading...
Searching...
No Matches
CbmTofHitsConverter.h
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 Physikalisches Institut, Eberhard Karls Universitaet Tuebingen, Tuebingen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Viktor Klochkov [committer] */
4
5#ifndef ANALYSIS_TREE_TOFHITSCONVERTER_H
6#define ANALYSIS_TREE_TOFHITSCONVERTER_H
7
8#include "CbmConverterTask.h"
9
10#include "AnalysisTree/Detector.hpp"
11
12class TClonesArray;
13class FairTrackParam;
15class CbmMCDataArray;
16
17namespace AnalysisTree
18{
19 class Matching;
20}
21
23public:
24 explicit CbmTofHitsConverter(std::string out_branch_name, std::string match_to = "")
25 : CbmConverterTask(std::move(out_branch_name), std::move(match_to))
26 {
27 }
28
30
31 void Init() final;
32 void ProcessData(CbmEvent* event) final;
33 void Finish() final {}
34
35private:
36 static void ExtrapolateStraightLine(FairTrackParam* params, float z);
37
38 const std::map<int, int>& GetMatchMap(const std::string& name) const
39 {
40 const auto& it = indexes_map_->find(name);
41 if (it == indexes_map_->end()) { throw std::runtime_error(name + " is not found to match with TOF hits"); }
42 return it->second;
43 }
44 std::string mc_tracks_ {"SimParticles"};
45
46 TClonesArray* cbm_global_tracks_ {nullptr};
47 TClonesArray* cbm_tof_hits_ {nullptr};
48 // TClonesArray* cbm_tof_points_ {nullptr};
49 TClonesArray* cbm_tof_match_ {nullptr};
50 // TClonesArray* cbm_mc_tracks_ {nullptr};
54
55 AnalysisTree::HitDetector* tof_hits_ {nullptr};
56 AnalysisTree::Matching* vtx_tracks_2_tof_ {nullptr};
57 AnalysisTree::Matching* tof_hits_2_mc_tracks_ {nullptr};
58
59 int i_mass2_ {AnalysisTree::UndefValueInt};
60 int i_qp_ {AnalysisTree::UndefValueInt};
61 int i_dx_ {AnalysisTree::UndefValueInt};
62 int i_t_ {AnalysisTree::UndefValueInt};
63 int i_l_ {AnalysisTree::UndefValueInt};
64
65 ClassDef(CbmTofHitsConverter, 1)
66};
67
68#endif // ANALYSIS_TREE_TOFHITSCONVERTER_H
std::map< std::string, MapType > * indexes_map_
from other tasks
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.
TClonesArray * cbm_tof_hits_
AnalysisTree::Matching * vtx_tracks_2_tof_
CbmMCDataArray * cbm_mc_tracks_new_
AnalysisTree::Matching * tof_hits_2_mc_tracks_
AnalysisTree::HitDetector * tof_hits_
CbmMCDataArray * cbm_tof_points_new_
const std::map< int, int > & GetMatchMap(const std::string &name) const
CbmTofHitsConverter(std::string out_branch_name, std::string match_to="")
TClonesArray * cbm_tof_match_
TClonesArray * cbm_global_tracks_
void ProcessData(CbmEvent *event) final
static void ExtrapolateStraightLine(FairTrackParam *params, float z)
CbmMCDataManager * cbm_mc_manager_
Hash for CbmL1LinkKey.