CbmRoot
Loading...
Searching...
No Matches
CbmTaskTrdHitFinder.h
Go to the documentation of this file.
1/* Copyright (C) 2023 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dominik Smith [committer], Alexandru Bercuci */
4
5#ifndef CBMTASKTRDHITFINDER_H
6#define CBMTASKTRDHITFINDER_H
7
8#include "CbmTrdCluster.h"
9#include "CbmTrdDigi.h"
10#include "CbmTrdHit.h"
11#include "FairTask.h"
12#include "trd/Hit.h"
13#include "trd/Hitfind.h"
14
15#include <gsl/span>
16#include <map>
17#include <set>
18#include <vector>
19
25class CbmTaskTrdHitFinder : public FairTask {
26
27 public:
32
37
39 virtual InitStatus Init();
40 virtual void SetParContainers();
41
43 virtual void Exec(Option_t* option);
44
46 virtual void Finish();
47
48 private:
51
55 template<class TModule, class TCluster>
56 void BuildHits(TModule* mod, std::vector<TCluster>* clusters);
57
58 template<class TCluster>
59 void AddClusters(std::vector<TCluster>* clusters);
60 void AddHits(gsl::span<cbm::algo::trd::Hit> hits);
61
63 bool InitAlgos();
64
66 std::vector<CbmTrdCluster>* fClusters = nullptr;
67
69 std::vector<CbmTrdHit>* fHits = nullptr;
70
72 std::unique_ptr<cbm::algo::trd::Hitfind> fAlgo;
73
75 UInt_t fNrTs = 0;
76
78 UInt_t fNrEvents = 0;
79
81 UInt_t fNrDigis = 0;
82
84 UInt_t fNrClusters = 0;
85
87 UInt_t fNrHits = 0;
88
90 Float_t fProcessTime = 0;
91
93};
94#endif
static vector< vector< QAHit > > hits
Data Container for TRD clusters.
Class for hits in TRD detector.
UInt_t fNrClusters
Number of produced clusters.
ClassDef(CbmTaskTrdHitFinder, 1)
virtual void SetParContainers()
std::vector< CbmTrdHit > * fHits
Output array of CbmTrdHit.
~CbmTaskTrdHitFinder()
Default destructor.
std::unique_ptr< cbm::algo::trd::Hitfind > fAlgo
Hit finding algorithm.
CbmTaskTrdHitFinder(const CbmTaskTrdHitFinder &)
virtual InitStatus Init()
CbmTaskTrdHitFinder & operator=(const CbmTaskTrdHitFinder &)
bool InitAlgos()
Create one algo object for each RPC.
void BuildHits(TModule *mod, std::vector< TCluster > *clusters)
Build hits from clusters for a given module.
std::vector< CbmTrdCluster > * fClusters
void AddHits(gsl::span< cbm::algo::trd::Hit > hits)
void AddClusters(std::vector< TCluster > *clusters)
CbmTaskTrdHitFinder()
Default constructor.
Float_t fProcessTime
Total processing time [RealTime].
virtual void Exec(Option_t *option)
Executed task.
UInt_t fNrHits
Number of produced hits.
UInt_t fNrEvents
Number of processed events (without CbmEvent corresponds to nr of exec calls)
UInt_t fNrTs
Number of processed time slices.
UInt_t fNrDigis
Number of digis as input for the hit production.
A light-weight TRD hit class for online reconstruction, based on CbmTrdHit. .