8 #include "TClonesArray.h"
10 #include "FairLogger.h"
11 #include "TObjArray.h"
15 #include "TGeoManager.h"
17 #include "TObjArray.h"
18 #include "TRefArray.h"
107 , fHitPosErrX(0.0005)
108 , fHitPosErrY(0.0005)
135 <<
"CbmMvdSensorDigiToHitTask::ReInt---------------" << endl;
156 cout <<
"-E- : CbmMvdSensorFindHitTask - Fatal: No Digits found in this "
166 for (Int_t k = 0; k < nDigis; k++) {
170 LOG(fatal) <<
"RefID of this digi is -1 this should not happend ";
174 Float_t curr_digi_charge = digi->
GetCharge();
176 short dth_current_digi_X = digi->
GetPixelX();
177 short dth_current_digi_Y = digi->
GetPixelY();
179 std::make_pair(dth_current_digi_X, dth_current_digi_Y));
183 dth_grid[dth_current_digi_X + 1][dth_current_digi_Y + 1] =
193 auto& dth_current_digi_X = curr_coord.first;
194 auto& dth_current_digi_Y = curr_coord.second;
197 auto& root_digi_pos_charge =
198 dth_grid[dth_current_digi_X + 1][dth_current_digi_Y + 1];
211 xIndex0 = dth_current_digi_X - 1;
212 yIndex0 = dth_current_digi_Y - 1;
226 shape += TMath::Power(2,
227 (4 * (dth_current_digi_Y - 1 -
yIndex0 + 3))
228 + (dth_current_digi_X - 1 -
xIndex0));
231 (dth_current_digi_X - 1), (dth_current_digi_Y - 1),
lab);
238 root_digi_pos_charge = 0;
246 auto checkNeighbour = [&](
short channelX,
short channelY) {
247 auto& curr_digi_pos_charge =
dth_grid[channelX + 1][channelY + 1];
249 if (curr_digi_pos_charge != 0) {
257 shape += TMath::Power(2,
258 (4 * (channelY - 1 -
yIndex0 + 3))
274 curr_digi_pos_charge = 0;
278 short channelX = index.first;
279 short channelY = index.second;
281 checkNeighbour(channelX + 1, channelY);
282 checkNeighbour(channelX - 1, channelY);
283 checkNeighbour(channelX, channelY + 1);
284 checkNeighbour(channelX, channelY - 1);
292 Double_t sigmaIn[3], sigmaOut[3], shiftIn[3], shiftOut[3];
312 sigmaIn[0] = 0.00053;
313 sigmaIn[1] = 0.00063;
315 shiftIn[0] = -0.00000;
316 shiftIn[1] = -0.00001;
321 sigmaIn[0] = 0.00035;
322 sigmaIn[1] = 0.00036;
324 shiftIn[0] = -0.00000;
325 shiftIn[1] = -0.00002;
330 sigmaIn[0] = 0.00028;
331 sigmaIn[1] = 0.00028;
333 shiftIn[0] = -0.00000;
334 shiftIn[1] = -0.00002;
339 sigmaIn[0] = 0.00028;
340 sigmaIn[1] = 0.00039;
342 shiftIn[0] = -0.00000;
343 shiftIn[1] = -0.00001;
348 sigmaIn[0] = 0.00024;
349 sigmaIn[1] = 0.00022;
351 shiftIn[0] = +0.00020;
352 shiftIn[1] = +0.00008;
357 sigmaIn[0] = 0.00024;
358 sigmaIn[1] = 0.00022;
360 shiftIn[0] = -0.00020;
361 shiftIn[1] = -0.00011;
366 sigmaIn[0] = 0.00024;
367 sigmaIn[1] = 0.00022;
369 shiftIn[0] = -0.00020;
370 shiftIn[1] = +0.00008;
375 sigmaIn[0] = 0.00024;
376 sigmaIn[1] = 0.00022;
378 shiftIn[0] = +0.00020;
379 shiftIn[1] = -0.00011;
384 sigmaIn[0] = 0.00027;
385 sigmaIn[1] = 0.00092;
387 shiftIn[0] = +0.00002;
388 shiftIn[1] = +0.00004;
393 sigmaIn[0] = 0.00036;
394 sigmaIn[1] = 0.00044;
396 shiftIn[0] = -0.00000;
397 shiftIn[1] = -0.00002;
406 TGeoHMatrix RotMatrix;
407 RotMatrix.SetRotation(RecoMatrix->GetRotationMatrix());
409 RotMatrix.LocalToMaster(sigmaIn, sigmaOut);
410 RotMatrix.LocalToMaster(shiftIn, shiftOut);
418 dpos.SetXYZ(TMath::Abs(sigmaOut[0]),
419 TMath::Abs(sigmaOut[1]),
420 TMath::Abs(sigmaOut[2]));
425 Int_t indexX, indexY;
434 new ((*fOutputBuffer)[nHits])
475 cout <<
"\n============================================================"
478 <<
"::Finish: Total events skipped: " <<
fCounter << endl;
479 cout <<
"============================================================"
481 cout <<
"-I- Parameters used" << endl;
482 cout <<
"Gaussian noise [electrons] : " <<
fSigmaNoise << endl;
483 cout <<
"Noise simulated [Bool] : " <<
fAddNoise << endl;
486 cout <<
"ADC - Bits : " <<
fAdcBits << endl;
487 cout <<
"ADC - Dynamic [electrons] : " <<
fAdcDynamic << endl;
488 cout <<
"ADC - Offset [electrons] : " <<
fAdcOffset << endl;
489 cout <<
"============================================================"
494 TH2F* clusterShapeHistogram;
495 TCanvas* canvas2 =
new TCanvas(
"HitFinderCharge",
"HitFinderCharge");
496 canvas2->Divide(2, 2);
499 clusterShapeHistogram =
new TH2F(
"MvdClusterShape",
509 Float_t curr_charge = histo->GetMean();
514 clusterShapeHistogram->Fill(
518 clusterShapeHistogram->Draw(
"Lego2");