13 #include <TGeoMatrix.h>
45 Double_t local[3] = {xLocal, yLocal, 0.};
48 fMatrix->LocalToMaster(local, global);
59 Double_t error[3] = {TMath::Sqrt(varX), TMath::Sqrt(varY), 0.};
62 Double_t hitTime = 0.5 * (clusterF.
GetTime() + clusterB.
GetTime());
65 Double_t hitTimeError = 0.5 * TMath::Sqrt(etF * etF + etB * etB);
86 const vector<CbmStsCluster>& clustersB,
87 vector<CbmStsHit>&
hits,
97 TGeoHMatrix* matrix) {
100 assert(nStripsF > 0);
101 assert(nStripsB > 0);
120 Double_t maxTerrF = 0.;
121 for (
auto& cluster : clustersF) {
122 if (cluster.GetTimeError() > maxTerrF) maxTerrF = cluster.GetTimeError();
124 Double_t maxTerrB = 0.;
125 for (
auto& cluster : clustersB) {
126 if (cluster.GetTimeError() > maxTerrB) maxTerrB = cluster.GetTimeError();
128 const Double_t maxTerrF2 = maxTerrF * maxTerrF;
129 const Double_t maxTerrB2 = maxTerrB * maxTerrB;
130 const Double_t max_sigma_both = 4. * TMath::Sqrt(maxTerrF2 + maxTerrB2);
135 for (UInt_t iClusterF = 0; iClusterF < clustersF.size(); iClusterF++) {
138 Double_t tF = clusterF.
GetTime();
140 Double_t max_sigma = 4. * TMath::Sqrt(tFerr2 + maxTerrB2);
142 for (UInt_t iClusterB = startB; iClusterB < clustersB.size(); iClusterB++) {
145 Double_t timeDiff = tF - clusterB.
GetTime();
146 if ((timeDiff > 0) && (timeDiff > max_sigma_both)) {
149 }
else if ((timeDiff > 0) && (timeDiff > max_sigma)) {
151 }
else if ((timeDiff < 0) && (
fabs(timeDiff) > max_sigma))
155 Double_t timeCut = -1.;
157 timeCut = timeCutAbs;
159 if (timeCutSig > 0.) {
162 timeCut = timeCutSig * TMath::Sqrt(eF * eF + eB * eB);
187 Int_t iChannel = Int_t(centre);
188 Double_t xDif = centre - Double_t(iChannel);
192 pair<Int_t, Int_t> stripSide =
GetStrip(iChannel);
193 iStrip = stripSide.first;
194 side = stripSide.second;
195 assert(side == 0 || side == 1);
200 xCluster = (Double_t(iStrip) + xDif + 0.5) *
fPitchF;
202 xCluster = (Double_t(iStrip) + xDif + 0.5) *
fPitchB;
235 return (pair<Int_t, Int_t>(stripNr, side));
260 if (!(xF >= 0. || xF <=
fDx))
return 0;
261 if (!(xB >= 0. || xB <=
fDy))
return 0;
275 Double_t varX = exF * exF;
276 Double_t varY = exB * exB;
285 xC, yC, varX, varY, varXY, clusterF, clusterB, indexF, indexB, du, dv);
295 if (
x < -
fDx / 2.)
return kFALSE;
296 if (
x >
fDx / 2.)
return kFALSE;
297 if (
y < -
fDy / 2.)
return kFALSE;
298 if (
y >
fDy / 2.)
return kFALSE;