CbmRoot
Loading...
Searching...
No Matches
trd/HitFinder.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 "Cluster.h"
8#include "DigiRec.h"
9#include "Hit.h"
10#include "HitFinderPars.h"
11#include "Math/Rotation3D.h"
12#include "Math/Vector3Dfwd.h"
13
14#include <tuple>
15#include <vector>
16
17class CbmTrdDigi;
18
19namespace cbm::algo::trd
20{
24 class HitFinder {
25 public:
26 typedef std::pair<Hit, std::vector<DigiRec>> resultType;
27
33 virtual ~HitFinder(){};
34
35 /* \brief Steering routine for building hits */
36 std::vector<resultType> operator()(std::vector<Cluster>* clusters);
37
38 double GetSpaceResolution(double val = 3.0);
39 bool IsClusterComplete(const Cluster* cluster);
40
41
42 protected:
43 private:
44 typedef std::tuple<int, const CbmTrdDigi*, double>
45 inputType; //digi index, pointer to digi (null if processed), digi time
46
47 HitFinder(const HitFinder& ref);
48 const HitFinder& operator=(const HitFinder& ref);
49
50 Hit MakeHit(int cId, const Cluster* c, const std::vector<const CbmTrdDigi*>* digis, size_t);
51
56 inline int GetPadRowCol(int address, int& c);
57
59
60 void TransformHitError(ROOT::Math::XYZVector& hitErr) const;
61
62 // different error classes for the position resolution based on the simulation results
63 // the error classes are defined for the different module types
64 // TODO: move to parameter file
65 static constexpr double kxVar_Value[2][5] = {{0.0258725, 0.0267693, 0.0344325, 0.0260322, 0.040115},
66 {0.0426313, 0.0426206, 0.0636962, 0.038981, 0.0723851}};
67 static constexpr double kyVar_Value[2][5] = {{0.024549, 0.025957, 0.0250713, 0.0302682, 0.0291146},
68 {0.0401438, 0.0407502, 0.0397242, 0.0519485, 0.0504586}};
69 };
70
71} // namespace cbm::algo::trd
Data container for TRD clusters.
Rectangular pad module; Cluster finding and hit reconstruction algorithms.
int GetPadRowCol(int address, int &c)
Addressing ASIC on module based on id.
static constexpr double kyVar_Value[2][5]
const HitFinder & operator=(const HitFinder &ref)
bool IsClusterComplete(const Cluster *cluster)
std::vector< resultType > operator()(std::vector< Cluster > *clusters)
HitFinderModPar fParams
Parameter container.
Hit MakeHit(int cId, const Cluster *c, const std::vector< const CbmTrdDigi * > *digis, size_t)
std::tuple< int, const CbmTrdDigi *, double > inputType
double GetSpaceResolution(double val=3.0)
HitFinder(const HitFinder &ref)
static constexpr double kxVar_Value[2][5]
void TransformHitError(ROOT::Math::XYZVector &hitErr) const
std::pair< Hit, std::vector< DigiRec > > resultType
A light-weight TRD hit class for online reconstruction, based on CbmTrdHit. .
A light-weight TRD hit class for online reconstruction, based on CbmTrdHit. .