Project
Loading...
Searching...
No Matches
Decay3Body.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13
14using namespace o2::dataformats;
15
16Decay3Body::Decay3Body(const std::array<float, 3>& xyz, const std::array<float, 3>& pxyz, const std::array<float, 6>& covxyz, const Track& tr0, const Track& tr1, const Track& tr2, o2::track::PID pid)
17 : mProngs{tr0, tr1, tr2}
18{
19 std::array<float, 21> cov{}, cov1{}, cov2{};
20 tr0.getCovXYZPxPyPzGlo(cov);
21 tr1.getCovXYZPxPyPzGlo(cov1);
22 tr2.getCovXYZPxPyPzGlo(cov2);
23 for (int i = 0; i < 21; i++) {
24 cov[i] += cov1[i] + cov2[i];
25 }
26 for (int i = 0; i < 6; i++) {
27 cov[i] = covxyz[i];
28 }
29 this->set(xyz, pxyz, cov, tr0.getCharge() + tr1.getCharge() + tr2.getCharge(), true, pid);
30}
31
32float Decay3Body::calcMass2(float mass0, float mass1, float mass2) const
33{
34 auto p2 = getP2();
35 auto energy = std::sqrt(mass0 + mProngs[0].getP2()) + std::sqrt(mass1 + mProngs[1].getP2()) + std::sqrt(mass1 + mProngs[2].getP2());
36 return energy * energy - p2;
37}
int32_t i
constexpr int p2()
uint16_t pid
Definition RawData.h:2
o2::track::TrackParCov Track
Definition Decay3Body.h:28
std::array< Track, 3 > mProngs
Definition Decay3Body.h:51
Definition of a container to keep/associate and arbitrary number of labels associated to an index wit...