27 mNThreads = std::max(1, ic.
options().
get<
int>(
"nthreads"));
37 uint64_t totalClusters = 0;
38 for (
int iLayer = 0; iLayer < mLayers; ++iLayer) {
39 auto digits = pc.
inputs().
get<gsl::span<o2::itsmft::Digit>>(std::format(
"digits_{}", iLayer));
40 auto rofs = pc.
inputs().
get<gsl::span<o2::itsmft::ROFRecord>>(std::format(
"ROframes_{}", iLayer));
42 gsl::span<const char> labelbuffer;
44 labelbuffer = pc.
inputs().
get<gsl::span<char>>(std::format(
"labels_{}", iLayer));
48 std::vector<o2::trk::Cluster>
clusters;
49 std::vector<unsigned char> patterns;
50 std::vector<o2::trk::ROFRecord> clusterROFs;
51 std::unique_ptr<o2::dataformats::MCTruthContainer<o2::MCCompLabel>> clusterLabels;
53 clusterLabels = std::make_unique<o2::dataformats::MCTruthContainer<o2::MCCompLabel>>();
58 LOG(info) <<
"Running TRKClusterer with ACTS on layer " << iLayer;
59 mClustererACTS.process(
digits,
64 mUseMC ? &
labels :
nullptr,
69 LOG(info) <<
"Running TRKClusterer on layer " << iLayer;
75 mUseMC ? &
labels :
nullptr,
87 LOGP(info,
"TRKClusterer layer {} pushed {} clusters in {} ROFs", iLayer,
clusters.size(), clusterROFs.size());
90 LOGP(info,
"TRKClusterer produced {} clusters", totalClusters);
96 std::vector<o2::framework::InputSpec> inputs;
97 for (
int iLayer = 0; iLayer < nLayers; ++iLayer) {
98 inputs.emplace_back(std::format(
"digits_{}", iLayer),
"TRK",
"DIGITS", iLayer, o2::framework::Lifetime::Timeframe);
99 inputs.emplace_back(std::format(
"ROframes_{}", iLayer),
"TRK",
"DIGITSROF", iLayer, o2::framework::Lifetime::Timeframe);
101 inputs.emplace_back(std::format(
"labels_{}", iLayer),
"TRK",
"DIGITSMCTR", iLayer, o2::framework::Lifetime::Timeframe);
105 std::vector<o2::framework::OutputSpec> outputs;
106 for (
int iLayer = 0; iLayer < nLayers; ++iLayer) {
107 outputs.emplace_back(
"TRK",
"COMPCLUSTERS", iLayer, o2::framework::Lifetime::Timeframe);
108 outputs.emplace_back(
"TRK",
"PATTERNS", iLayer, o2::framework::Lifetime::Timeframe);
109 outputs.emplace_back(
"TRK",
"CLUSTERSROF", iLayer, o2::framework::Lifetime::Timeframe);
111 outputs.emplace_back(
"TRK",
"CLUSTERSMCTR", iLayer, o2::framework::Lifetime::Timeframe);
std::vector< std::string > labels
A const (ready only) version of MCTruthContainer.
Definition of the GeometryManager class.
static void loadGeometry(std::string_view geomFilePath="", bool applyMisalignment=false, bool preferAlignedFile=true)
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
o2::header::DataHeader::SubSpecificationType SubSpecificationType
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
virtual void process(gsl::span< const Digit > digits, gsl::span< const DigROFRecord > digitROFs, std::vector< o2::trk::Cluster > &clusters, std::vector< unsigned char > &patterns, std::vector< o2::trk::ROFRecord > &clusterROFs, const ConstDigitTruth *digitLabels=nullptr, ClusterTruth *clusterLabels=nullptr, gsl::span< const DigMC2ROFRecord > digMC2ROFs={}, std::vector< o2::trk::MC2ROFRecord > *clusterMC2ROFs=nullptr)
std::vector< ConfigParamSpec > Options
o2::framework::DataProcessorSpec getClustererSpec(bool useMC)
static constexpr size_t kNLayers
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Cluster > clusters
std::vector< Digit > digits