Skip to content

Commit fd2e2e8

Browse files
committed
class for TPC track refitted with TOF time constraint
1 parent df23544 commit fd2e2e8

File tree

4 files changed

+92
-1
lines changed

4 files changed

+92
-1
lines changed

DataFormats/Reconstruction/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ o2_add_library(ReconstructionDataFormats
2424
src/GlobalTrackID.cxx
2525
src/VtxTrackIndex.cxx
2626
src/VtxTrackRef.cxx
27+
src/TrackTPCTOF.cxx
2728
PUBLIC_LINK_LIBRARIES O2::GPUCommon
2829
O2::FrameworkLogger
2930
O2::DetectorsCommonDataFormats
@@ -44,7 +45,8 @@ o2_target_root_dictionary(
4445
include/ReconstructionDataFormats/V0.h
4546
include/ReconstructionDataFormats/GlobalTrackID.h
4647
include/ReconstructionDataFormats/VtxTrackIndex.h
47-
include/ReconstructionDataFormats/VtxTrackRef.h)
48+
include/ReconstructionDataFormats/VtxTrackRef.h
49+
include/ReconstructionDataFormats/TrackTPCTOF.h)
4850

4951
o2_add_test(Vertex
5052
SOURCES test/testVertex.cxx
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
/// \file TrackTPCTOF.h
12+
/// \brief Result of refitting TPC with TOF match constraint
13+
/// \author ruben.shahoyan@cern.ch
14+
15+
#ifndef ALICEO2_TRACKTPCTOF_H
16+
#define ALICEO2_TRACKTPCTOF_H
17+
18+
#include "ReconstructionDataFormats/Track.h"
19+
#include "ReconstructionDataFormats/TrackLTIntegral.h"
20+
#include "CommonDataFormat/TimeStamp.h"
21+
22+
namespace o2
23+
{
24+
namespace dataformats
25+
{
26+
27+
class TrackTPCTOF : public o2::track::TrackParCov
28+
{
29+
using timeEst = o2::dataformats::TimeStampWithError<float, float>;
30+
31+
public:
32+
TrackTPCTOF() = default;
33+
~TrackTPCTOF() = default;
34+
TrackTPCTOF(const TrackTPCTOF& src) = default;
35+
TrackTPCTOF(const o2::track::TrackParCov& src) : o2::track::TrackParCov(src) {}
36+
37+
int getRefMatch() const { return mRefMatch; }
38+
void setRefMatch(int id) { mRefMatch = id; }
39+
40+
const timeEst& getTimeMUS() const { return mTimeMUS; }
41+
timeEst& getTimeMUS() { return mTimeMUS; }
42+
void setTimeMUS(const timeEst& t) { mTimeMUS = t; }
43+
void setTimeMUS(float t, float te)
44+
{
45+
mTimeMUS.setTimeStamp(t);
46+
mTimeMUS.setTimeStampError(te);
47+
}
48+
49+
void setChi2Refit(float v) { mChi2Refit = v; }
50+
float getChi2Refit() const { return mChi2Refit; }
51+
52+
void print() const;
53+
54+
private:
55+
int mRefMatch = -1; ///< reference on track-TOF match in its original container
56+
float mChi2Refit = 0.f; ///< chi2 of the refit
57+
timeEst mTimeMUS; ///< time estimate in ns
58+
59+
ClassDefNV(TrackTPCTOF, 1);
60+
};
61+
} // namespace dataformats
62+
} // namespace o2
63+
64+
#endif

DataFormats/Reconstruction/src/ReconstructionDataFormatsLinkDef.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@
2828
#pragma link C++ class o2::BaseCluster < float> + ;
2929
#pragma link C++ class o2::dataformats::TrackTPCITS + ;
3030
#pragma link C++ class std::vector < o2::dataformats::TrackTPCITS> + ;
31+
3132
#pragma link C++ class o2::dataformats::MatchInfoTOF + ;
3233
#pragma link C++ class std::vector < o2::dataformats::MatchInfoTOF> + ;
3334

35+
#pragma link C++ class o2::dataformats::TrackTPCTOF + ;
36+
#pragma link C++ class std::vector < o2::dataformats::TrackTPCTOF> + ;
37+
3438
#pragma link C++ class std::vector < std::pair < float, float>> + ;
3539
#pragma link C++ class std::vector < std::pair < int, float>> + ;
3640
#pragma link C++ class std::vector < int> + ;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
#include "ReconstructionDataFormats/TrackTPCTOF.h"
12+
13+
using namespace o2::dataformats;
14+
15+
//__________________________________________________
16+
void TrackTPCTOF::print() const
17+
{
18+
printf("TPC-TOC MatchRef: %6d Chi2Refit: %6.2f Time: %10.4f+-%10.4f mus\n",
19+
mRefMatch, getChi2Refit(), mTimeMUS.getTimeStamp(), mTimeMUS.getTimeStampError());
20+
o2::track::TrackParCov::print();
21+
}

0 commit comments

Comments
 (0)