CbmRoot
Loading...
Searching...
No Matches
CbmTrdHitMC.h
Go to the documentation of this file.
1/* Copyright (C) 2018-2022 Horia Hulubei National Institute of Physics and Nuclear Engineering, Bucharest
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci [committer] */
4
5#ifndef CBMTRDHITMC_H
6#define CBMTRDHITMC_H
7
8#include "CbmTrdCluster.h"
9#include "CbmTrdHit.h"
10#include "CbmTrdPoint.h"
11
12#include <string> // for ToString
13#include <vector> // for fTrdPoints
14
27class CbmTrdDigi;
28class CbmTrdHitMC : public CbmTrdHit {
29 public:
31 {
32 kRT = 0, // open left - open right shape
33 kRR, // open left - closed right shape
34 kTT, // closed left - open right shape
35 kTR // closed left - closed right shape
36 };
37
40
42 CbmTrdHitMC(const CbmTrdHit& hit);
43
45 virtual ~CbmTrdHitMC();
46
48 void AddCluster(const CbmTrdCluster* c);
49
56 size_t AddPoint(const CbmTrdPoint* p, double t, int id);
62 size_t AddSignal(const CbmTrdDigi* d, uint64_t t0);
63
65 std::string GetErrorMsg() const { return fErrMsg; }
66
70 const CbmTrdPoint* GetPoint(uint idx = 0) const;
71
75 double GetSignal(uint idx = 0) const;
76
78 size_t GetNPoints() const { return fTrdPoints.size(); }
79
81 size_t GetNSignals() const { return fTrdSignals.size(); }
82
85
87 double GetDx() const;
88
90 double GetSx() const;
91
93 double GetDy() const;
94
96 double GetSy() const;
97
99 double GetDt() const;
100
102 void SetErrorMsg(std::string msg) { fErrMsg = msg; }
103
105 size_t PurgeSignals();
106
108 virtual std::string ToString() const;
109
110 private:
112 CbmTrdHitMC(const CbmTrdHitMC&) = default;
115
116 std::string fErrMsg = ""; //< error message from the QA task
117 std::vector<std::pair<double, int>> fTrdSignals = {}; //< list of signal/time in cluster
118 std::vector<std::tuple<CbmTrdPoint, double, int>> fTrdPoints =
119 {}; //< list of MC points together with the event time and particle PDG code producing them
120 CbmTrdCluster fCluster; //< data from the cluster
121 static int fSx[5][2]; //< x error parametrization as function of cluster size and incident direction
122 ClassDef(CbmTrdHitMC, 1) // Hit to MC point data correlation
123};
124
125#endif
Data Container for TRD clusters.
Class for hits in TRD detector.
Data Container for TRD clusters.
TRD hit to MC point correlation class.
Definition CbmTrdHitMC.h:28
CbmTrdCluster fCluster
CbmTrdHitMC(const CbmTrdHitMC &)=default
Copy Constructor.
std::vector< std::pair< double, int > > fTrdSignals
size_t AddPoint(const CbmTrdPoint *p, double t, int id)
Add MC points to the hit. The first time this function is called is for the best matched MC point.
virtual std::string ToString() const
Verbosity functionality.
double GetSignal(uint idx=0) const
return signal at position
std::string fErrMsg
std::vector< std::tuple< CbmTrdPoint, double, int > > fTrdPoints
double GetSy() const
Calculate error for the azimuth direction.
const CbmTrdPoint * GetPoint(uint idx=0) const
Register a MC point.
void SetErrorMsg(std::string msg)
Store error message.
std::string GetErrorMsg() const
return MC pile-up size
Definition CbmTrdHitMC.h:65
eCbmTrdHitMCshape GetClShape() const
return cluster shape according to the eCbmTrdHitMCshape definitions
void AddCluster(const CbmTrdCluster *c)
Copy cluster details.
double GetSx() const
Calculate error in the bending plane.
CbmTrdHitMC & operator=(const CbmTrdHitMC &)=default
Assignment operator.
size_t GetNPoints() const
return MC pile-up size
Definition CbmTrdHitMC.h:78
double GetDt() const
Calculate residuals for time.
size_t PurgeSignals()
Applies to TRD2D and remove 0 charges from the boundaries of the cluster.
size_t AddSignal(const CbmTrdDigi *d, uint64_t t0)
Add signal values in the increasing order of pad index.
double GetDy() const
Calculate residuals for the azimuth direction.
virtual ~CbmTrdHitMC()
Destructor.
size_t GetNSignals() const
return cluster size
Definition CbmTrdHitMC.h:81
double GetDx() const
Calculate residuals in the bending plane.
static int fSx[5][2]
Definition CbmTrdHitMC.h:16
CbmTrdHitMC()
Default constructor.
data class for a reconstructed Energy-4D measurement in the TRD
Definition CbmTrdHit.h:40
ClassDef(CbmTrdHit, 4)