56 Double_t varY, Double_t varXY,
58 Double_t du, Double_t dv) {
62 LOG(fatal) << GetName() <<
": Hit output array not set!";
66 LOG(fatal) << GetName() <<
": Invalid pointer to front cluster!";
69 LOG(fatal) << GetName() <<
": Invalid pointer to back cluster!";
73 Double_t local[3] = { xLocal, yLocal, 0.};
75 if (
fNode )
fNode->GetMatrix()->LocalToMaster(local, global);
85 Double_t error[3] = { TMath::Sqrt(varX), TMath::Sqrt(varY), 0.};
89 Double_t hitTime = 0.5 * ( clusterF->
GetTime() + clusterB->
GetTime());
92 Double_t hitTimeError = 0.5 * TMath::Sqrt( etF*etF + etB*etB );
95 Int_t index =
fHits->GetEntriesFast();
96 new ( (*fHits)[index] )
108 LOG(debug2) << GetName() <<
": Creating hit at (" << global[0] <<
", "
109 << global[1] <<
", " << global[2] <<
")";
135 Int_t unit = 10 * ( name[5] -
'0') + name[6] -
'0' - 1;
136 Int_t ladder = 10 * ( name[9] -
'0') + name[10] -
'0' - 1;
137 Int_t hLadder = ( name[11] ==
'U' ? 0 : 1);
138 Int_t
module = 10 * ( name[14] - '0') + name[15] - '0' - 1;
139 Int_t sensor = 10 * ( name[18] -
'0') + name[19] -
'0' - 1;
157 Double_t eventTime,
BmnLink* link) {
165 global[0] = point->
GetXIn();
166 global[1] = point->
GetYIn();
167 global[2] = point->
GetZIn();
168 fNode->GetMatrix()->MasterToLocal(global, local);
169 Double_t x1 = local[0];
170 Double_t y1 = local[1];
171 Double_t z1 = local[2];
177 fNode->GetMatrix()->MasterToLocal(global, local);
178 Double_t x2 = local[0];
179 Double_t y2 = local[1];
180 Double_t z2 = local[2];
186 if ( z2 - z1 != 0. ) {
187 tXav = ( x2 - x1 ) / (z2 - z1);
188 tYav = ( y2 - y1 ) / (z2 - z1);
200 Double_t dZ =
dynamic_cast<TGeoBBox*
>(
fNode->GetShape())->GetDZ();
206 global[0] = point->GetPx();
207 global[1] = point->GetPy();
208 global[2] = point->GetPz();
210 rot =
fNode->GetMatrix()->GetRotationMatrix();
212 rotMat.SetRotation(rot);
213 rotMat.MasterToLocal(global,local);
214 if ( local[2] != 0.) {;
215 Double_t tX = local[0] / local[2];
216 Double_t tY = local[1] / local[2];
222 if ( z1 > 0. ) zNew = dZ - 1.e-4;
223 else zNew = 1.e-4 - dZ;
224 xNew = x1 + tX * (zNew - z1);
225 yNew = y1 + tY * (zNew - z1);
235 if ( TMath::Abs(z2) > dZ ) {
242 rot =
fNode->GetMatrix()->GetRotationMatrix();
244 rotMat.SetRotation(rot);
245 rotMat.MasterToLocal(global,local);
249 if ( local[2] != 0. ) {
250 tX = local[0] / local[2];
251 tY = local[1] / local[2];
267 if ( z2 > 0. ) zNew = dZ - 1.e-4;
268 else zNew = 1.e-4 - dZ;
269 xNew = x2 + tX * (zNew - z2);
270 yNew = y2 + tY * (zNew - z2);
280 Double_t px = 0.5 * ( point->GetPx() + point->
GetPxOut() );
281 Double_t py = 0.5 * ( point->GetPy() + point->
GetPyOut() );
282 Double_t pz = 0.5 * ( point->GetPz() + point->
GetPzOut() );
283 Double_t p = TMath::Sqrt( px*px + py*py + pz*pz );
289 Double_t bField[3] = { 0., 0., 0.};
290 if ( FairRun::Instance() -> GetField())
291 FairRun::Instance()->GetField()->Field(global, bField);
294 Double_t pTime = eventTime + point->GetTime();
299 point->GetEnergyLoss(),
305 LOG(debug2) << GetName() <<
": Local point coordinates are (" << x1
306 <<
", " << y1 <<
"), (" << x2 <<
", " << y2 <<
")";
void CreateHit(Double_t xLocal, Double_t yLocal, Double_t varX, Double_t varY, Double_t varXY, BmnSsdCluster *clusterF, BmnSsdCluster *clusterB, Double_t du=0., Double_t dv=0.)
Int_t GetAddress(UInt_t unit=0, UInt_t ladder=0, UInt_t halfladder=0, UInt_t module=0, UInt_t sensor=0, UInt_t side=0, UInt_t version=kCurrentVersion)
Construct address.