Project
Loading...
Searching...
No Matches
DigitAdd.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
12#include "GPUTPCGeometry.h"
13#include "TPCBase/Mapper.h"
14#include "TPCBase/CRU.h"
16
17using namespace o2::tpc;
18
20{
21 return CRU(mCRU).sector();
22}
23
24float DigitAdd::lx() const
25{
26 const o2::gpu::GPUTPCGeometry gpuGeom;
27 return gpuGeom.Row2X(mRow);
28}
29
30float DigitAdd::ly() const
31{
32 const o2::gpu::GPUTPCGeometry gpuGeom;
33 return gpuGeom.LinearPad2Y(sector(), mRow, getPad());
34}
35
36float DigitAdd::gx() const
37{
38 const LocalPosition2D l2D{lx(), ly()};
39 const auto g2D = Mapper::LocalToGlobal(l2D, Sector(sector()));
40 return g2D.x();
41}
42
43float DigitAdd::gy() const
44{
45 const LocalPosition2D l2D{lx(), ly()};
46 const auto g2D = Mapper::LocalToGlobal(l2D, Sector(sector()));
47 return g2D.y();
48}
49
50float DigitAdd::cpad() const
51{
52 const o2::gpu::GPUTPCGeometry gpuGeom;
53 return getPad() - gpuGeom.NPads(mRow) / 2.f;
54}
Extension of TPC Digit adding draw query functions for simple drawing.
const Sector sector() const
Definition CRU.h:65
float cpad() const
Definition DigitAdd.cxx:50
float gy() const
Definition DigitAdd.cxx:43
int sector() const
Definition DigitAdd.cxx:19
float ly() const
Definition DigitAdd.cxx:30
float gx() const
Definition DigitAdd.cxx:36
float lx() const
Definition DigitAdd.cxx:24
unsigned short mCRU
CRU of the Digit.
Definition Digit.h:76
unsigned char mRow
Global pad row of the Digit.
Definition Digit.h:77
static GlobalPosition3D LocalToGlobal(const LocalPosition3D &pos, const double alpha)
Definition Mapper.h:461
Global TPC definitions and constants.
Definition SimTraits.h:167