32 mNThreads = std::max(1, ic.
options().
get<
int>(
"nthreads"));
34 if constexpr (
DetID == o2::detectors::DetID::TRK) {
46 const auto detName = Origin.template as<std::string>();
49 for (
int iLayer = 0; iLayer < NLayers; ++iLayer) {
50 auto digits = pc.
inputs().
get<gsl::span<o2::trkft3::Digit>>(std::format(
"digits_{}", iLayer));
51 auto rofs = pc.
inputs().
get<gsl::span<o2::trkft3::ROFRecord>>(std::format(
"ROframes_{}", iLayer));
53 gsl::span<const char> labelbuffer;
55 labelbuffer = pc.
inputs().
get<gsl::span<char>>(std::format(
"labels_{}", iLayer));
59 std::vector<o2::trkft3::Cluster<DetID>>
clusters;
60 std::vector<unsigned char> patterns;
61 std::vector<o2::trkft3::ROFRecord> clusterROFs;
62 std::unique_ptr<o2::dataformats::MCTruthContainer<o2::MCCompLabel>> clusterLabels;
64 clusterLabels = std::make_unique<o2::dataformats::MCTruthContainer<o2::MCCompLabel>>();
67 bool clustered =
false;
69 if constexpr (
DetID == o2::detectors::DetID::TRK) {
71 LOG(info) <<
"Running TRKClusterer with ACTS on layer " << iLayer;
72 mClustererACTS.process(
digits,
77 mUseMC ? &
labels :
nullptr,
84 LOG(info) <<
"Running " << detName <<
"Clusterer on layer " << iLayer;
90 mUseMC ? &
labels :
nullptr,
102 LOGP(info,
"{}Clusterer layer {} pushed {} clusters in {} ROFs", detName, iLayer,
clusters.size(), clusterROFs.size());
105 LOGP(info,
"{}Clusterer produced {} clusters", detName, totalClusters);
114 std::vector<o2::framework::InputSpec> inputs;
116 for (
int iLayer = 0; iLayer < NLayers; ++iLayer) {
117 inputs.emplace_back(std::format(
"digits_{}", iLayer),
origin,
"DIGITS", iLayer, o2::framework::Lifetime::Timeframe);
118 inputs.emplace_back(std::format(
"ROframes_{}", iLayer),
origin,
"DIGITSROF", iLayer, o2::framework::Lifetime::Timeframe);
120 inputs.emplace_back(std::format(
"labels_{}", iLayer),
origin,
"DIGITSMCTR", iLayer, o2::framework::Lifetime::Timeframe);
124 std::vector<o2::framework::OutputSpec> outputs;
125 for (
int iLayer = 0; iLayer < NLayers; ++iLayer) {
126 outputs.emplace_back(
origin,
"COMPCLUSTERS", iLayer, o2::framework::Lifetime::Timeframe);
127 outputs.emplace_back(
origin,
"PATTERNS", iLayer, o2::framework::Lifetime::Timeframe);
128 outputs.emplace_back(
origin,
"CLUSTERSROF", iLayer, o2::framework::Lifetime::Timeframe);
130 outputs.emplace_back(
origin,
"CLUSTERSMCTR", iLayer, o2::framework::Lifetime::Timeframe);
136 if constexpr (
DetID == o2::detectors::DetID::TRK) {
140 auto name =
origin.template as<std::string>() +
"-clusterer";
141 std::transform(
name.begin(),
name.end(),
name.begin(), [](
unsigned char c) { return std::tolower(c); });
153 return getClustererSpecT<o2::detectors::DetID::TRK>(useMC);
158 return getClustererSpecT<o2::detectors::DetID::FT3>(useMC);
161template class ClustererDPL<o2::detectors::DetID::TRK>;
162template class ClustererDPL<o2::detectors::DetID::FT3>;
header::DataOrigin origin
A const (ready only) version of MCTruthContainer.
Definition of the GeometryManager class.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
std::vector< o2::MCCompLabel > labels
static void loadGeometry(std::string_view geomFilePath="", bool applyMisalignment=false, bool preferAlignedFile=true)
Static class with identifiers, bitmasks and names for ALICE detectors.
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
void init(o2::framework::InitContext &ic) final
void run(o2::framework::ProcessingContext &pc) final
GLuint const GLchar * name
constexpr o2::header::DataOrigin gDataOriginTRK
constexpr o2::header::DataOrigin gDataOriginFT3
o2::framework::DataProcessorSpec getFT3ClustererSpec(bool useMC)
The clusterer of FT3's digits.
o2::framework::DataProcessorSpec getClustererSpec(bool useMC)
The clusterer of TRK's digits.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static constexpr size_t kNLayers
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Cluster > clusters
std::vector< Digit > digits