CbmRoot
Loading...
Searching...
No Matches
V0Trigger.h
Go to the documentation of this file.
1/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
5#pragma once // include this header only once per compilation unit
6
7#include "CaTrack.h"
8#include "CaVector.h"
9#include "V0TriggerConfig.h"
11
12#include <utility>
13#include <vector>
14
15#include <xpu/host.h>
16
17namespace cbm::algo::evbuild
18{
19
20
32
43 class V0Trigger {
44
45 public:
46 typedef std::pair<std::vector<double>, V0TriggerMoniData> Result;
50
52 V0Trigger() = default;
53
54
60 Result operator()(const TrackVector& tracks, const V0TriggerConfig& config) const;
61
62
66 void SetQa(std::shared_ptr<V0TriggerQa> pQa) { fpQa = pQa; }
67
68
70 std::string ToString() const;
71
72
73 private:
83 std::pair<double, double> CalcPCA(const TrackParam& track1, const TrackParam& track2) const;
84
89 bool Select(const Track& track, const V0TriggerConfig& config) const;
90
95 bool IsPrimary(const TrackParam& track, const V0TriggerConfig& config) const;
96
97 std::shared_ptr<V0TriggerQa> fpQa{std::make_shared<V0TriggerQa>(nullptr)};
98 };
99
100} // namespace cbm::algo::evbuild
TClonesArray * tracks
source file for the ca::Track class
A V0-trigger QA.
Class representing an output track in the CA tracking algorithm.
Configuration of the V0 trigger class (trigger on displaced vertices)
Trigger class for secondary two-track vertices in mCBM.
Definition V0Trigger.h:43
std::pair< std::vector< double >, V0TriggerMoniData > Result
Definition V0Trigger.h:46
V0Trigger()=default
Constructor.
bool Select(const Track &track, const V0TriggerConfig &config) const
Check track cuts.
cbm::algo::kf::TrackParamS TrackParam
Definition V0Trigger.h:49
std::shared_ptr< V0TriggerQa > fpQa
Definition V0Trigger.h:97
void SetQa(std::shared_ptr< V0TriggerQa > pQa)
Sets QA module.
Definition V0Trigger.h:66
cbm::algo::ca::Vector< cbm::algo::ca::Track > TrackVector
Definition V0Trigger.h:48
std::pair< double, double > CalcPCA(const TrackParam &track1, const TrackParam &track2) const
Calculation of closest approach of two tracks (straight lines)
Definition V0Trigger.cxx:75
Result operator()(const TrackVector &tracks, const V0TriggerConfig &config) const
Execution.
Definition V0Trigger.cxx:16
cbm::algo::ca::Track Track
Definition V0Trigger.h:47
bool IsPrimary(const TrackParam &track, const V0TriggerConfig &config) const
Check if track is a priomary.
std::string ToString() const
Info to string.
TrackParam classes of different types.
Monitoring information for the algorithm V0Trigger.
Definition V0Trigger.h:24
xpu::timings time
Time for trigger building.
Definition V0Trigger.h:30