9#include <TDatabasePDG.h>
10#include <TParticlePDG.h>
16int CbmTrdHitMC::fSx[5][2] = {{190, 2321}, {147, 1920}, {50, 1461}, {22, 2094}, {21, 4297}};
97 double dz(
GetZ() - p->GetZ()),
x(p->GetX() + dz * p->GetPx() / p->GetPz());
106 double phi(p->GetPx() / p->GetPz());
109 if (isz < 0) isz = 0;
110 if (isz >= 5) isz = 4;
112 return 1.e-4 * (
fSx[isz][0] + phi * phi *
fSx[isz][1]);
120 double dz(
GetZ() - p->GetZ()),
y(p->GetY() + dz * p->GetPy() / p->GetPz());
130 constexpr double speedOfLight = 29.979246;
135 double t0(std::get<1>(
fTrdPoints[0])), dz(
GetZ() - p->GetZ()), t(t0 + p->GetTime()), mass(0);
137 TParticlePDG* pmc = (TParticlePDG*) TDatabasePDG::Instance()->GetParticle(pdg);
138 if (pdg < 9999999 && pmc) mass = pmc->Mass();
142 t += dz / (p->GetPz() * speedOfLight) *
sqrt(mass * mass + mom3.Mag2());
149 std::stringstream ss;
151 ss <<
"Event time(ns)=" << std::get<1>(mcp) <<
" partId=" << std::get<2>(mcp) <<
"\n";
152 ss << std::get<0>(mcp).ToString();
155 ss <<
"CbmTrdDigi: [" <<
fTrdSignals.size() <<
"] Signal / Relative Time\n ";
157 ss <<
sgn.first <<
"/" <<
sgn.second <<
" ";
ClassImp(CbmConverterManager)
friend fvec sqrt(const fvec &a)
friend fscal sgn(fscal x)
Data class with information on a STS local track.
Data Container for TRD clusters.
virtual std::string ToString() const
Extended functionality.
uint64_t GetTimeDAQ() const
Getter for global DAQ time [clk]. Differs for each ASIC. In FASP case DAQ time is already stored in f...
double GetTime() const
Getter for physical time [ns]. Accounts for clock representation of each ASIC. In SPADIC case physica...
double GetCharge() const
Common purpose charge getter.
TRD hit to MC point correlation class.
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::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.
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.
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
double GetDx() const
Calculate residuals in the bending plane.
CbmTrdHitMC()
Default constructor.
data class for a reconstructed Energy-4D measurement in the TRD
bool GetClassType() const
virtual std::string ToString() const
Inherited from CbmBaseHit.