forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJet.h
More file actions
105 lines (93 loc) · 4.14 KB
/
Jet.h
File metadata and controls
105 lines (93 loc) · 4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
// table definitions for jets
//
// Author: Jochen Klein, Nima Zardoshti
#ifndef O2_ANALYSIS_DATAMODEL_JET_H
#define O2_ANALYSIS_DATAMODEL_JET_H
#include "Framework/AnalysisDataModel.h"
#include <cmath>
namespace o2::aod
{
namespace jet
{
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_COLUMN(Pt, pt, float); //!
DECLARE_SOA_COLUMN(Eta, eta, float); //!
DECLARE_SOA_COLUMN(Phi, phi, float); //!
DECLARE_SOA_COLUMN(Energy, energy, float); //!
DECLARE_SOA_COLUMN(Mass, mass, float); //!
DECLARE_SOA_COLUMN(Area, area, float); //!
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
[](float pt, float phi) -> float { return pt * std::cos(phi); });
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //!
[](float pt, float phi) -> float { return pt * std::sin(phi); });
DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //!
[](float pt, float eta) -> float { return pt * std::sinh(eta); });
DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! absolute p
[](float pt, float eta) -> float { return pt * std::cosh(eta); });
} // namespace jet
DECLARE_SOA_TABLE(Jets, "AOD", "JET", //!
o2::soa::Index<>,
jet::CollisionId,
jet::Pt,
jet::Eta,
jet::Phi,
jet::Energy,
jet::Mass,
jet::Area,
jet::Px<jet::Pt, jet::Phi>,
jet::Py<jet::Pt, jet::Phi>,
jet::Pz<jet::Pt, jet::Eta>,
jet::P<jet::Pt, jet::Eta>);
using Jet = Jets::iterator;
// TODO: absorb in jet table
// when list of references available
namespace constituents
{
DECLARE_SOA_INDEX_COLUMN(Jet, jet); //!
DECLARE_SOA_INDEX_COLUMN(Track, track); //!
} // namespace constituents
DECLARE_SOA_TABLE(JetConstituents, "AOD", "CONSTITUENTS", //!
constituents::JetId,
constituents::TrackId);
using JetConstituent = JetConstituents::iterator;
namespace constituentssub
{
DECLARE_SOA_INDEX_COLUMN(Jet, jet); //!
DECLARE_SOA_COLUMN(Pt, pt, float); //!
DECLARE_SOA_COLUMN(Eta, eta, float); //!
DECLARE_SOA_COLUMN(Phi, phi, float); //!
DECLARE_SOA_COLUMN(Energy, energy, float); //!
DECLARE_SOA_COLUMN(Mass, mass, float); //!
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
[](float pt, float phi) -> float { return pt * std::cos(phi); });
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //!
[](float pt, float phi) -> float { return pt * std::sin(phi); });
DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //!
[](float pt, float eta) -> float { return pt * std::sinh(eta); });
DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! absolute p
[](float pt, float eta) -> float { return pt * std::cosh(eta); });
} //namespace constituentssub
DECLARE_SOA_TABLE(JetConstituentsSub, "AOD", "CONSTITUENTSSUB", //!
constituentssub::JetId,
constituentssub::Pt,
constituentssub::Eta,
constituentssub::Phi,
constituentssub::Energy,
constituentssub::Mass,
constituentssub::Px<constituentssub::Pt, constituentssub::Phi>,
constituentssub::Py<constituentssub::Pt, constituentssub::Phi>,
constituentssub::Pz<constituentssub::Pt, constituentssub::Eta>,
constituentssub::P<constituentssub::Pt, constituentssub::Eta>);
using JetConstituentSub = JetConstituentsSub::iterator;
} // namespace o2::aod
#endif