CbmRoot
Loading...
Searching...
No Matches
cbm_cuts.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Physikalisches Institut, Eberhard Karls Universitaet Tuebingen, Tuebingen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Viktor Klochkov [committer] */
4
5AnalysisTree::Cuts* GetCbmEventCuts(const std::string& branch, std::string name = "CbmGoodEvent")
6{
7 AnalysisTree::SimpleCut vtx_x_cut = AnalysisTree::RangeCut(branch + ".vtx_x", -0.5, 0.5);
8 AnalysisTree::SimpleCut vtx_y_cut = AnalysisTree::RangeCut(branch + ".vtx_y", -0.5, 0.5);
9 AnalysisTree::SimpleCut vtx_z_cut = AnalysisTree::RangeCut(branch + ".vtx_z", -0.1, 0.1);
10 AnalysisTree::SimpleCut vtx_chi2_cut = AnalysisTree::RangeCut(branch + ".vtx_chi2", 0.8, 1.7);
11
12 auto* event_cuts = new AnalysisTree::Cuts(std::move(name), {vtx_x_cut, vtx_y_cut, vtx_z_cut, vtx_chi2_cut});
13 return event_cuts;
14}
15
16AnalysisTree::Cuts* GetCbmTrackCuts(const std::string& branch, std::string name = "CbmGoodVertexTrack")
17{
18 AnalysisTree::SimpleCut vtx_chi2_track_cut = AnalysisTree::RangeCut(branch + ".vtx_chi2", 0, 3);
19 AnalysisTree::SimpleCut nhits_cut = AnalysisTree::RangeCut(branch + ".nhits", 4, 100);
20 AnalysisTree::SimpleCut chi2_cut({branch + ".chi2", branch + ".ndf"},
21 [](std::vector<double> par) { return par[0] / par[1] < 3; });
22 AnalysisTree::SimpleCut eta_cut = AnalysisTree::RangeCut(branch + ".eta", 0.2, 6);
23
24 auto* vertex_tracks_cuts =
25 new AnalysisTree::Cuts(std::move(name), {vtx_chi2_track_cut, nhits_cut, chi2_cut, eta_cut});
26 return vertex_tracks_cuts;
27}
28
29AnalysisTree::Cuts* GetCbmTofHitsCuts(const std::string& branch, std::string name = "CbmGoodTofHit")
30{
31 AnalysisTree::SimpleCut tof_cuts_dx = AnalysisTree::RangeCut(branch + ".dx", -2, 2);
32 AnalysisTree::SimpleCut tof_cuts_dy = AnalysisTree::RangeCut(branch + ".dy", -1, 1);
33
34 auto* tof_cuts = new AnalysisTree::Cuts(std::move(name), {tof_cuts_dx, tof_cuts_dy});
35 return tof_cuts;
36}
37
38AnalysisTree::Cuts* GetCbmMcTracksCuts(const std::string& branch, std::string name = "CbmMcPrimaryTrack")
39{
40 auto* sim_tracks_cut = new AnalysisTree::Cuts(std::move(name), {AnalysisTree::EqualsCut(branch + ".mother_id", -1)});
41 return sim_tracks_cut;
42}
AnalysisTree::Cuts * GetCbmEventCuts(const std::string &branch, std::string name="CbmGoodEvent")
Definition cbm_cuts.h:5
AnalysisTree::Cuts * GetCbmTofHitsCuts(const std::string &branch, std::string name="CbmGoodTofHit")
Definition cbm_cuts.h:29
AnalysisTree::Cuts * GetCbmMcTracksCuts(const std::string &branch, std::string name="CbmMcPrimaryTrack")
Definition cbm_cuts.h:38
AnalysisTree::Cuts * GetCbmTrackCuts(const std::string &branch, std::string name="CbmGoodVertexTrack")
Definition cbm_cuts.h:16