Project
Loading...
Searching...
No Matches
PreClusterFinderMapping.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
13
14#ifndef O2_MCH_MAPPING_H_
15#define O2_MCH_MAPPING_H_
16
17#include <cstdint>
18#include <memory>
19#include <vector>
20
22
23namespace o2
24{
25namespace mch
26{
27
29{
30
31 public:
32 // pad structure in the internal mapping
33 struct MpPad {
34 uint16_t iDigit; // index of the corresponding digit
35 uint8_t nNeighbours; // number of neighbours
36 uint16_t neighbours[10]; // indices of neighbours in array stored in MpDE
37 float area[2][2]; // 2D area
38 bool useMe; // false if no digit attached or already visited
39 };
40
41 // DE structure in the internal mapping
42 struct MpDE {
43 int uid; // unique ID
44 uint16_t nPads[2]; // number of pads on each plane
45 std::unique_ptr<MpPad[]> pads; // array of pads on both planes
46 };
47
48 static std::vector<std::unique_ptr<MpDE>> createMapping();
49
50 static bool areOverlapping(float area1[2][2], float area2[2][2], float precision);
51 static bool areOverlappingExcludeCorners(float area1[2][2], float area2[2][2]);
52
53 private:
54 static auto addPad(MpDE& de, const mapping::Segmentation& segmentation);
55 static auto addNeighbour(MpPad& pad);
56 static auto removeNeighbouringPadsInCorners(MpDE& de);
57};
58
59} // namespace mch
60} // namespace o2
61
62#endif // O2_MCH_MAPPING_H_
static std::vector< std::unique_ptr< MpDE > > createMapping()
static bool areOverlappingExcludeCorners(float area1[2][2], float area2[2][2])
static bool areOverlapping(float area1[2][2], float area2[2][2], float precision)
A Segmentation lets you find pads of a detection element and then inspect those pads.
GLenum GLint GLint * precision
Definition glcorearb.h:1899
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unique_ptr< MpPad[]> pads
uint16_t de