Project
Loading...
Searching...
No Matches
LaserTrack.h
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
12#ifndef ALICEO2_TPC_LASERTRACK
13#define ALICEO2_TPC_LASERTRACK
14
15#include <string>
16#include <gsl/span>
17
20
21namespace o2::tpc
22{
25
27{
28 public:
29 static constexpr int NumberOfTracks = 336;
30 static constexpr int RodsPerSide = 6;
31 static constexpr int BundlesPerRod = 4;
32 static constexpr int TracksPerBundle = 7;
34 static constexpr std::array<float, 2> FirstRodPhi{2.f * SectorSpanRad, 1.f * SectorSpanRad};
35 static constexpr float RodDistancePhi = 3.f * SectorSpanRad;
36 static constexpr std::array<float, 4> CoarseBundleZPos{243.5, 165.5, 82, 11.5};
37
38 LaserTrack() = default;
39 LaserTrack(int id, float x, float alpha, const std::array<float, o2::track::kNParams>& par) : mID(id), o2::track::TrackPar(x, alpha, par) { ; }
40 LaserTrack(LaserTrack const&) = default;
41
43 void setID(int id) { mID = id; }
44
46 int getID() const { return mID; }
47
49 int getSide() const { return 2 * getID() / NumberOfTracks; }
50
52 int getRod() const { return (getID() / (BundlesPerRod * TracksPerBundle)) % RodsPerSide; }
53
55 int getBundle() const { return (getID() / TracksPerBundle) % BundlesPerRod; }
56
58 int getBeam() const { return getID() % TracksPerBundle; }
59
60 private:
61 unsigned short mID{0};
62
63 ClassDefNV(LaserTrack, 1);
64};
65
73{
74 public:
76
78 void loadTracksFromFile();
79
82 LaserTrack const& getTrack(int id) const { return mLaserTracks[id]; }
83
86 const auto& getLaserTracks() const { return mLaserTracks; }
87
89 static void dumpToTree(const std::string_view fileName);
90
92 gsl::span<const LaserTrack> getTracksInBundle(int side, int rod, int bundle)
93 {
94 const int startID = LaserTrack::NumberOfTracks / 2 * side +
97 return gsl::span<const LaserTrack>(&mLaserTracks[startID], LaserTrack::TracksPerBundle);
98 }
99
100 private:
101 std::array<LaserTrack, LaserTrack::NumberOfTracks> mLaserTracks;
102
103 ClassDefNV(LaserTrackContainer, 1);
104};
105
106} // namespace o2::tpc
107#endif
Base track model for the Barrel, params only, w/o covariance.
useful math constants
uint32_t side
Definition RawData.h:0
const auto & getLaserTracks() const
Definition LaserTrack.h:86
void loadTracksFromFile()
load laser tracks from file
LaserTrack const & getTrack(int id) const
Definition LaserTrack.h:82
gsl::span< const LaserTrack > getTracksInBundle(int side, int rod, int bundle)
get span with tracks in one bundle
Definition LaserTrack.h:92
static void dumpToTree(const std::string_view fileName)
dump tracks to a tree for simple visualization
static constexpr float SectorSpanRad
secotor width in rad
Definition LaserTrack.h:33
static constexpr int RodsPerSide
Number of laser rods per side.
Definition LaserTrack.h:30
static constexpr int BundlesPerRod
number of micro-mirror bundle per laser rod
Definition LaserTrack.h:31
static constexpr int NumberOfTracks
Total number of laser tracks.
Definition LaserTrack.h:29
static constexpr float RodDistancePhi
phi distance of laser Rods
Definition LaserTrack.h:35
static constexpr int TracksPerBundle
number of micro-mirrors per bundle
Definition LaserTrack.h:32
int getSide() const
side of laser track
Definition LaserTrack.h:49
static constexpr std::array< float, 4 > CoarseBundleZPos
coarse z-position of the laser bundles
Definition LaserTrack.h:36
LaserTrack(LaserTrack const &)=default
int getBundle() const
micro-mirror bundle inside laser rod
Definition LaserTrack.h:55
int getID() const
laser track ID
Definition LaserTrack.h:46
int getBeam() const
laser beam inside mirror-mirror bundle
Definition LaserTrack.h:58
LaserTrack(int id, float x, float alpha, const std::array< float, o2::track::kNParams > &par)
Definition LaserTrack.h:39
void setID(int id)
set laser track ID
Definition LaserTrack.h:43
static constexpr std::array< float, 2 > FirstRodPhi
phi pos of first laser rod, A-, C-Side
Definition LaserTrack.h:34
int getRod() const
laser rod number on Side
Definition LaserTrack.h:52
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
GLint GLenum GLint x
Definition glcorearb.h:403
GLuint id
Definition glcorearb.h:650
constexpr float SectorSpanRad
Global TPC definitions and constants.
Definition SimTraits.h:167
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...