Skip to content

Commit 67b5f16

Browse files
authored
Merge e08220e into sapling-pr-archive-ktf
2 parents b224ac8 + e08220e commit 67b5f16

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+629
-555
lines changed

.cmake-format.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
6666
"HEADERS": '*',
6767
}
6868
},
69-
"o2_target_man_page": {
70-
"kwargs": {
71-
"NAME": '+',
72-
"SECTION": '*',
73-
}
74-
},
7569
"add_root_dictionary": {
7670
"kwargs": {
7771
"LINKDEF": '+',

Algorithm/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
o2_add_header_only_library(Algorithm INTERFACE_LINK_LIBRARIES O2::Headers)
1313

14-
o2_target_man_page(Algorithm NAME Algorithm SECTION 3)
15-
o2_target_man_page(Algorithm NAME algorithm_parser SECTION 3)
16-
1714
o2_add_test(o2formatparser
1815
SOURCES test/o2formatparser.cxx
1916
COMPONENT_NAME Algorithm

Algorithm/doc/Algorithm.3.in

Lines changed: 0 additions & 12 deletions
This file was deleted.

Algorithm/doc/algorithm_parser.3.in

Lines changed: 0 additions & 135 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ include(O2AddTestRootMacro)
8686
include(O2ReportNonTestedMacros)
8787
include(O2TargetRootDictionary)
8888
include(O2DataFile)
89-
include(O2TargetManPage)
9089
include(O2AddWorkflow)
9190
include(O2SetROOTPCMDependencies)
9291
include(O2AddHipifiedExecutable)
@@ -117,10 +116,6 @@ endif()
117116

118117
add_subdirectory(config)
119118

120-
add_custom_target(man ALL)
121-
o2_target_man_page(man NAME o2)
122-
o2_target_man_page(man NAME FairMQDevice)
123-
124119
# Testing and packaging only needed if we are the top level directory
125120
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
126121
# Documentation

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "GPUCommonDef.h"
3030
#include "GPUCommonRtypes.h"
3131
#include "GPUCommonMath.h"
32-
#include "GPUCommonArray.h"
3332
#include "GPUROOTCartesianFwd.h"
3433

3534
#ifndef GPUCA_GPUCODE_DEVICE

Detectors/GlobalTrackingWorkflow/study/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#add_compile_options(-O0 -g -fPIC)
1313

1414
o2_add_library(GlobalTrackingStudy
15+
TARGETVARNAME targetName
1516
SOURCES src/TPCTrackStudy.cxx
1617
src/TrackingStudy.cxx
1718
src/SVStudy.cxx
@@ -23,6 +24,7 @@ o2_add_library(GlobalTrackingStudy
2324
src/TrackInfoExt.cxx
2425
src/TrackMCStudyConfig.cxx
2526
src/TrackMCStudyTypes.cxx
27+
src/TPCClusSelector.cxx
2628
PUBLIC_LINK_LIBRARIES O2::GlobalTracking
2729
O2::GlobalTrackingWorkflowReaders
2830
O2::GlobalTrackingWorkflowHelpers
@@ -73,3 +75,8 @@ o2_add_executable(dump-workfow
7375
COMPONENT_NAME bc-tracks
7476
SOURCES src/track-dump-workflow.cxx
7577
PUBLIC_LINK_LIBRARIES O2::GlobalTrackingStudy)
78+
79+
if (OpenMP_CXX_FOUND)
80+
target_compile_definitions(${targetName} PRIVATE WITH_OPENMP)
81+
target_link_libraries(${targetName} PRIVATE OpenMP::OpenMP_CXX)
82+
endif()
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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+
// helper class for TPC clusters selection
13+
14+
#ifndef ALICEO2_TPCCLUSSELECTOR_H
15+
#define ALICEO2_TPCCLUSSELECTOR_H
16+
17+
#include <vector>
18+
#include <array>
19+
#include <Rtypes.h>
20+
21+
namespace o2::tpc
22+
{
23+
class ClusterNativeAccess;
24+
25+
class TPCClusSelector
26+
{
27+
// helper to select TPC cluster matching to certain timebin and optionally pads range
28+
// example of usage:
29+
/*
30+
TPCClusSelector clSel;
31+
o2::tpc::ClusterNativeHelper::Reader tcpClusterReader;
32+
tcpClusterReader.init(native_clusters_file.c_str());
33+
o2::tpc::ClusterNativeAccess tpcClusterIdxStruct;
34+
std::unique_ptr<o2::tpc::ClusterNative[]> tpcClusterBuffer; ///< buffer for clusters in tpcClusterIdxStruct
35+
o2::tpc::ClusterNativeHelper::ConstMCLabelContainerViewWithBuffer tpcClusterMCBuffer; ///< buffer for mc labels
36+
37+
tcpClusterReader.read(iTF);
38+
tcpClusterReader.fillIndex(tpcClusterIdxStruct, tpcClusterBuffer, tpcClusterMCBuffer);
39+
40+
clSel.fill(tpcClusterIdxStruct); // Create sorted index
41+
// to get i-th cluster in orderer timebins:
42+
const auto& clus = tpcClusterIdxStruct.clusters[sector][row][ clSel.getIndex(sector, row, i)];
43+
44+
// to get sorted indices range of clusters in the tbmin:tbmax range
45+
auto rng = clSel.findClustersRange(sector, row, tbmin, tbmax, tpcClusterIdxStruct);
46+
if (rng.first>rng.second) { // nothing is found }
47+
const auto& cln = tpcClusterIdxStruct.clusters[sector][row][clSel.getIndex(sector, row, rng.first )]; /...
48+
49+
// to get number of clusters in tbmin:tbmax, padmin:padmax range (and optionally get the list)
50+
std::vector<int> cllist; // optional list
51+
int nfnd = clSel.findClustersEntries(sector, row, tbmin, tbmax, padmin, padmax, tpcClusterIdxStruct, &cllist);
52+
for (int i=0;i<nfnd;i++) {
53+
const auto& cln = tpcClusterIdxStruct.clusters[sector][row][cllist[i]]; /... direct indices!
54+
}
55+
*/
56+
57+
public:
58+
void clear()
59+
{
60+
for (auto& s : mSectors)
61+
s.clear();
62+
}
63+
size_t getIndex(int sec, int row, uint32_t icl) const { return mSectors[sec].rows[row][icl]; }
64+
65+
std::pair<int, int> findClustersRange(int sec, int row, float tbmin, float tbmax, const o2::tpc::ClusterNativeAccess& tpcClusterIdxStruct);
66+
int findClustersEntries(int sec, int row, float tbmin, float tbmax, float padmin, float padmax, const o2::tpc::ClusterNativeAccess& tpcClusterIdxStruct, std::vector<int>* clIDDirect = nullptr);
67+
void fill(const o2::tpc::ClusterNativeAccess& tpcClusterIdxStruct);
68+
69+
int getNThreads() const { return mNThreads; }
70+
void setNThreads(int n);
71+
72+
private:
73+
struct Sector {
74+
static constexpr int NRows = 152;
75+
std::array<std::vector<uint16_t>, NRows> rows;
76+
void clear()
77+
{
78+
for (auto& r : rows)
79+
r.clear();
80+
}
81+
};
82+
83+
static constexpr int NSectors = 36;
84+
std::array<Sector, NSectors> mSectors{};
85+
int mNThreads = 1;
86+
87+
ClassDefNV(TPCClusSelector, 1);
88+
};
89+
90+
} // namespace o2::tpc
91+
92+
#endif

Detectors/GlobalTrackingWorkflow/study/src/GlobalTrackingStudyLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@
3838
#pragma link C++ class std::vector < o2::trackstudy::ClResTPCCont> + ;
3939
#pragma link C++ class o2::trackstudy::TrackPairInfo + ;
4040
#pragma link C++ class std::vector < o2::trackstudy::TrackPairInfo> + ;
41+
#pragma ling C++ class o2::tpc::TPCClusSelector + ;
4142

4243
#endif

0 commit comments

Comments
 (0)