CbmRoot
Loading...
Searching...
No Matches
trd/Clusterizer.h
Go to the documentation of this file.
1/* Copyright (C) 2024 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dominik Smith [committer], Etienne Bechtel, Florian Uhlig */
4
5#pragma once
6
7#include "CbmTrdDigi.h"
8#include "Cluster.h"
9#include "HitFinderPars.h"
10
11#include <tuple>
12#include <vector>
13
14namespace cbm::algo::trd
15{
16
18
27 public:
28 typedef std::tuple<int, const CbmTrdDigi*, double>
29 inputType; //digi index, pointer to digi (null if processed), digi time
30
32 Clusterizer() = default;
33
36
38 virtual ~Clusterizer(){};
39
44 std::vector<Cluster> operator()(const std::vector<std::pair<CbmTrdDigi, int32_t>>& inVec) const;
45
46 protected:
47 private:
49
50 bool TryAddDigi(std::vector<std::vector<inputType*>>* digimap, int chan,
51 std::vector<std::vector<inputType*>::iterator>* lastPos,
52 std::vector<std::pair<int, const CbmTrdDigi*>>* cluster, const double digiTime) const;
53
54 void addClusters(std::vector<std::pair<int, const CbmTrdDigi*>> cluster, std::vector<Cluster>* clustersOut) const;
55 };
56
57} // namespace cbm::algo::trd
Algo class for TRD cluster building.
Clusterizer()=default
Default constructor.
bool TryAddDigi(std::vector< std::vector< inputType * > > *digimap, int chan, std::vector< std::vector< inputType * >::iterator > *lastPos, std::vector< std::pair< int, const CbmTrdDigi * > > *cluster, const double digiTime) const
std::vector< Cluster > operator()(const std::vector< std::pair< CbmTrdDigi, int32_t > > &inVec) const
Execution.
Clusterizer(HitFinderModPar par)
Default constructor.
void addClusters(std::vector< std::pair< int, const CbmTrdDigi * > > cluster, std::vector< Cluster > *clustersOut) const
HitFinderModPar fParams
Parameter container.
std::tuple< int, const CbmTrdDigi *, double > inputType
virtual ~Clusterizer()
Destructor.