-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from guilhermeAlmeida1/wipClusterizationNewBoth
Changed device clusterization to flat EDM & cell-level parallelism
- Loading branch information
Showing
78 changed files
with
2,233 additions
and
1,277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Project include(s). | ||
#include "traccc/definitions/primitives.hpp" | ||
#include "traccc/edm/cell.hpp" | ||
#include "traccc/edm/container.hpp" | ||
|
||
namespace traccc { | ||
|
||
/// Alternative measurement structure which contains both the measurement and | ||
/// a link to its module (held in a separate collection). | ||
/// | ||
/// This can be used for storing all information in a single collection, whose | ||
/// objects need to have both the header and item information from the | ||
/// measurement container types. | ||
struct alt_measurement { | ||
/// Local 2D coordinates for a measurement on a detector module | ||
point2 local{0., 0.}; | ||
/// Variance on the 2D coordinates of the measurement | ||
variance2 variance{0., 0.}; | ||
|
||
using link_type = cell_module_collection_types::view::size_type; | ||
link_type module_link; | ||
}; | ||
|
||
/// Declare all alt measurement collection types | ||
using alt_measurement_collection_types = collection_types<alt_measurement>; | ||
|
||
} // namespace traccc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "traccc/edm/container.hpp" | ||
#include "traccc/edm/spacepoint.hpp" | ||
|
||
namespace traccc { | ||
|
||
/// Seed consisting of three spacepoints, z origin and weight | ||
/// This differs from (non-alt) seed in the link_type definition | ||
struct alt_seed { | ||
|
||
using link_type = spacepoint_collection_types::host::size_type; | ||
|
||
link_type spB_link; | ||
link_type spM_link; | ||
link_type spT_link; | ||
|
||
scalar weight; | ||
scalar z_vertex; | ||
|
||
TRACCC_HOST_DEVICE | ||
std::array<measurement, 3> get_measurements( | ||
const spacepoint_collection_types::const_view& spacepoints_view) const { | ||
const spacepoint_collection_types::const_device spacepoints( | ||
spacepoints_view); | ||
return {spacepoints.at(spB_link).meas, spacepoints.at(spM_link).meas, | ||
spacepoints.at(spT_link).meas}; | ||
} | ||
|
||
TRACCC_HOST_DEVICE | ||
std::array<spacepoint, 3> get_spacepoints( | ||
const spacepoint_collection_types::const_view& spacepoints_view) const { | ||
const spacepoint_collection_types::const_device spacepoints( | ||
spacepoints_view); | ||
return {spacepoints.at(spB_link), spacepoints.at(spM_link), | ||
spacepoints.at(spT_link)}; | ||
} | ||
}; | ||
|
||
/// Declare all seed collection types | ||
using alt_seed_collection_types = collection_types<alt_seed>; | ||
|
||
} // namespace traccc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
device/common/include/traccc/clusterization/device/aggregate_cluster.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Project include(s). | ||
#include "traccc/definitions/qualifiers.hpp" | ||
#include "traccc/edm/alt_cell.hpp" | ||
#include "traccc/edm/alt_measurement.hpp" | ||
#include "traccc/edm/device/partition.hpp" | ||
|
||
// System include(s). | ||
#include <cstddef> | ||
|
||
namespace traccc::device { | ||
|
||
/// Function which looks for cells which share the same "parent" index and | ||
/// aggregates them into a cluster. | ||
/// | ||
/// @param[in] cells collection of cells | ||
/// @param[in] modules collection of modules to which the cells are linked to | ||
/// @param[in] f array of "parent" indices for all cells in this | ||
/// partition | ||
/// @param[in] start partition start point this cell belongs to | ||
/// @param[in] end partition end point this cell belongs to | ||
/// @param[in] tid current thread id | ||
/// @param[out] out cluster to fill | ||
TRACCC_HOST_DEVICE | ||
inline void aggregate_cluster( | ||
const alt_cell_collection_types::const_device& cells, | ||
const cell_module_collection_types::const_device& modules, | ||
const vecmem::data::vector_view<unsigned short> f_view, | ||
const partition start, const partition end, const unsigned short tid, | ||
alt_measurement& out); | ||
|
||
} // namespace traccc::device | ||
|
||
// Include the implementation. | ||
#include "traccc/clusterization/device/impl/aggregate_cluster.ipp" |
54 changes: 0 additions & 54 deletions
54
device/common/include/traccc/clusterization/device/connect_components.hpp
This file was deleted.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
device/common/include/traccc/clusterization/device/count_cluster_cells.hpp
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.