CbmRoot
Loading...
Searching...
No Matches
CbmMvdSensorDigitizerTBTask.cxx
Go to the documentation of this file.
1/* Copyright (C) 2017-2019 Institut fuer Kernphysik, Goethe-Universitaet Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Philipp Sitzmann [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmMvdSensorDigitizerTBTask source file -----
7// ----- Created 02.02.2012 by M. Deveaux -----
8// -------------------------------------------------------------------------
24
25#include "CbmMvdPileupManager.h"
26#include "CbmMvdPoint.h"
27
28#include "FairRuntimeDb.h"
29
30#include "TClonesArray.h"
31#include "TObjArray.h"
32
33// Includes from FairRoot
34#include "FairEventHeader.h"
35#include "FairMCEventHeader.h"
36#include "FairRunAna.h"
37#include "FairRunSim.h"
38#include <Logger.h>
39
40
41// Includes from C++
42#include <iomanip>
43#include <iostream>
44#include <map>
45#include <vector>
46
47using std::endl;
48using std::fixed;
49using std::ios_base;
50using std::left;
51using std::map;
52using std::pair;
53using std::right;
54using std::setprecision;
55using std::setw;
56using std::vector;
57
58//--------- Default constructor ------------------------------------------
59//CbmMvdSensorDigitizerTBTask::CbmMvdSensorDigitizerTBTask(){
60//fPluginIDNumber= 1100;
61//}
62
63// ----- Standard constructor ------------------------------------------
66 , fEpiTh()
67 , fSegmentLength()
68 , fDiffusionCoefficient()
69 , fElectronsPerKeV()
70 , fWidthOfCluster()
71 , fPixelSizeX()
72 , fPixelSizeY()
73 , fCutOnDeltaRays()
74 , fChargeThreshold()
75 , fFanoSilicium()
76 , fEsum()
77 , fSegmentDepth()
78 , fCurrentTotalCharge()
79 , fCurrentParticleMass()
80 , fCurrentParticleMomentum()
81 , fCurrentParticlePdg()
82 , fLorentzY0()
83 , fLorentzXc()
84 , fLorentzW()
85 , fLorentzA()
86 , fLorentzNorm()
87 , fLandauMPV()
88 , fLandauSigma()
89 , fLandauGain()
90 , fLandauRandom(new TRandom3())
91 , fPixelSize()
92 , fPar0()
93 , fPar1()
94 , fPar2()
95 , fCompression()
96 , fResolutionHistoX()
97 , fResolutionHistoY()
98 , fNumberOfSegments()
99 , fCurrentLayer()
100 , fEvent()
101 , fVolumeId()
102 , fNPixelsX()
103 , fNPixelsY()
104 , fPixelCharge()
105 , fDigis()
106 , fDigiMatch()
107 , fproduceNoise()
108 , fPixelChargeShort()
109 , fPixelScanAccelerator()
110 , fChargeMap()
111 , fChargeMapIt()
112 , fsensorDataSheet()
113 , fSigmaX()
114 , fSigmaY()
115 , fReadoutTime()
116 , fEfficiency()
117 , fMergeDist()
118 , fFakeRate()
119 , fInputPoints()
120 , fRandGen()
121 , fTimer()
122 , fNEvents()
123 , fNPoints()
124 , fNReal()
125 , fNBg()
126 , fNFake()
127 , fNLost()
128 , fNMerged()
129 , fTime()
130 , fReadoutLast()
131 , fReadoutCurrent()
132 , fReadoutNext()
133 , fSignalPoints()
134{
135 LOG(debug) << "Starting CbmMvdSensorDigitizerTBTask::CbmMvdSensorDigitizerTBTask() ";
136
137 fRandGen.SetSeed(2736);
138 fEvent = 0;
139 fTime = 0.;
140 fSigmaX = 0.0005;
141 fSigmaY = 0.0005;
142 fReadoutTime = 0.00005;
143
144 fSegmentLength = 0.0001;
145 fDiffusionCoefficient = 0.0055; // correspondes to the sigma of the gauss with the max drift length
146 fElectronsPerKeV = 276; //3.62 eV for e-h creation
147 fWidthOfCluster = 3.5; // in sigmas
148 fCutOnDeltaRays = 0.00169720; //MeV
149 fChargeThreshold = 100.; //electrons change 1 to 10
150 fFanoSilicium = 0.115;
151 fEsum = 0;
152 fSegmentDepth = 0;
157
158 fPixelSize = 0.0025;
159
160 fLorentzY0 = -6.1;
161 fLorentzXc = 0.;
162 fLorentzW = 1.03;
163 fLorentzA = 477.2;
164
165 //fLorentzNorm=0.00013010281679422413;
166 fLorentzNorm = 1;
167
168 fproduceNoise = kFALSE;
169
170 fReadoutLast = -1.;
171 fReadoutCurrent = 0.;
172
173 fPluginIDNumber = 1100;
174}
175// -------------------------------------------------------------------------
176
177// ----- Destructor ----------------------------------------------------
179{
180
181 if (fInputPoints) {
182 fInputPoints->Delete();
183 delete fInputPoints;
184 }
185 if (fOutputBuffer) {
186 fOutputBuffer->Delete();
187 delete fOutputBuffer;
188 }
189}
190// ------------------------------------------------------------------------
191
192// ----- Virtual private method ReadSensorInformation ----------------
194{
195
196 CbmMvdSensorDataSheet* sensorData;
197 sensorData = fSensor->GetDataSheet();
198 if (!sensorData) { return kERROR; }
199
200 fPixelSizeX = sensorData->GetPixelPitchX();
201 fPixelSizeY = sensorData->GetPixelPitchY();
202 fNPixelsX = sensorData->GetNPixelsX();
203 fNPixelsY = sensorData->GetNPixelsY();
204
205 fChargeThreshold = sensorData->GetChargeThreshold();
206
207 fPar0 = sensorData->GetLorentzPar0();
208 LOG(debug) << fPar0;
209 fPar1 = sensorData->GetLorentzPar1();
210 LOG(debug) << fPar1;
211 fPar2 = sensorData->GetLorentzPar2();
212 LOG(debug) << fPar2;
213
214 fLandauMPV = sensorData->GetLandauMPV();
215 fLandauSigma = sensorData->GetLandauSigma();
216 fLandauGain = sensorData->GetLandauGain();
217 fEpiTh = sensorData->GetEpiThickness();
218
219 return kSUCCESS;
220}
221// -----------------------------------------------------------------------------
222
223
224// -----------------------------------------------------------------------------
225void CbmMvdSensorDigitizerTBTask::SetInputArray(TClonesArray* inputStream)
226{
227
228 Int_t i = 0;
229 Int_t nInputs = inputStream->GetEntriesFast();
230 while (nInputs > i) {
231 new ((*fInputPoints)[fInputPoints->GetEntriesFast()]) CbmMvdPoint(*((CbmMvdPoint*) inputStream->At(i)));
232 ++i;
233 }
234}
235// -----------------------------------------------------------------------------
236
237// -------------- public method ExecChain ------------------------------------
239// -----------------------------------------------------------------------------
240
241// ----- Virtual public method Exec ------------------------------------
243{
244
245 if (fPreviousPlugin) {
246 fInputPoints->Delete();
248 }
249 fOutputBuffer->Clear();
250 Int_t inputNr = 0;
251 Int_t eventNr = 0;
252 // Int_t nDigis = 0; (VF) not used
253 GetEventInfo(inputNr, eventNr, fTime);
254
257 if (fInputPoints->GetEntriesFast() > 0) {
258
259 for (Int_t iPoint = 0; iPoint < fInputPoints->GetEntriesFast(); iPoint++) {
260
261 CbmMvdPoint* point = (CbmMvdPoint*) fInputPoints->At(iPoint);
262
263 if (!point) {
264 LOG(warning) << GetName() << ":: Exec:";
265 LOG(warning << " -received bad MC-Point. Ignored.";
266 continue;
267 }
268 if (point->GetStationNr() != fSensor->GetSensorNr()) {
269 LOG(warning) << GetName() << ":: Exec:";
270 LOG(warning) << " -received bad MC-Point which doesn't belong here. Ignored.";
271 continue;
272 }
273 //The digitizer acts only on particles, which crossed the station.
274 //Particles generated in the sensor or being absorbed in this sensor are ignored
275 if (TMath::Abs(point->GetZOut() - point->GetZ()) < 0.9 * fEpiTh) {
276 LOG(debug) << "hit not on chip with thickness " << 0.9 * 2 * fSensor->GetDZ();
277 LOG(debug) << "hit not on chip with length " << TMath::Abs(point->GetZOut() - point->GetZ());
278 continue;
279 }
280 // Reject for the time being light nuclei (no digitization modell yet)
281 if (point->GetPdgCode() > 100000) { continue; }
283 ProducePixelCharge(point);
284 } //loop on MCpoints
285
286 for (Int_t i = 0; i < fPixelCharge->GetEntriesFast(); ++i) {
288
289 if (pixel->GetCharge() > fChargeThreshold && pixel->GetTime() <= fReadoutLast) {
290 /* Not used
291 nDigis = fOutputBuffer->GetEntriesFast();
292
293 CbmMvdDigi* digi = new ((*fOutputBuffer)[nDigis]) CbmMvdDigi (fSensor->GetSensorNr(),
294 pixel->GetX(), pixel->GetY(), pixel->GetCharge(),
295 fPixelSizeX, fPixelSizeY, pixel->GetTime(),
296 pixel->GetFrame());
297 */
298
299
300 CbmMatch* match = new CbmMatch();
301 for (Int_t iLink = 0; iLink < pixel->GetNContributors(); iLink++) {
302 if (pixel->GetTrackID()[iLink] > -1)
303 match->AddLink((Double_t) pixel->GetPointWeight()[iLink], pixel->GetPointID()[iLink], eventNr, inputNr);
304 else
305 match->AddLink((Double_t) pixel->GetPointWeight()[iLink], pixel->GetPointID()[iLink]);
306 }
307
308 //digi->SetMatch(match);
309 std::pair<Int_t, Int_t> thispoint = std::make_pair(pixel->GetX(), pixel->GetY());
310 std::pair<std::pair<Int_t, Int_t>, Double_t> thisTimePoint = std::make_pair(thispoint, pixel->GetTime());
311
312 fChargeMap.erase(thisTimePoint);
313 fPixelCharge->RemoveAt(i);
314 }
315 else {
316 ;
317 }
318 }
319 }
320
321 else {
322 ;
323 }
324
325 fPixelCharge->Compress();
326 fInputPoints->Delete();
327 fSignalPoints.clear();
328
329} // end of exec
330// -------------------------------------------------------------------------
331
332// -------------------------------------------------------------------------
333void CbmMvdSensorDigitizerTBTask::GetEventInfo(Int_t& inputNr, Int_t& eventNr, Double_t& eventTime)
334{
335
336 // --- The event number is taken from the FairRootManager
337 eventNr = FairRootManager::Instance()->GetEntryNr();
338
339 // --- In a FairRunAna, take the information from FairEventHeader
340 if (FairRunAna::Instance()) {
341 FairEventHeader* event = FairRunAna::Instance()->GetEventHeader();
342 inputNr = event->GetInputFileId();
343 eventTime = event->GetEventTime();
344 }
345
346 // --- In a FairRunSim, the input number and event time are always zero.
347 else {
348 if (!FairRunSim::Instance()) LOG(fatal) << GetName() << ": neither SIM nor ANA run.";
349 inputNr = 0;
350 eventTime = 0.;
351 }
352}
353// -------------------------------------------------------------------------
354
355// -------------------------------------------------------------------------
357{
361 //Transform coordinates of the point into sensor frame
362
363 Double_t globalPositionIn[3] = {point->GetX(), point->GetY(), point->GetZ()};
364 Double_t globalPositionOut[3] = {point->GetXOut(), point->GetYOut(), point->GetZOut()};
365
366 Double_t localPositionIn[3] = {0, 0, 0};
367
368 Double_t localPositionOut[3] = {0, 0, 0};
369
370 fSensor->TopToLocal(globalPositionIn, localPositionIn);
371 fSensor->TopToLocal(globalPositionOut, localPositionOut);
372
373 Int_t pixelX, pixelY;
374 fSensor->LocalToPixel(&localPositionIn[0], pixelX, pixelY);
375
376 // Copy results into variables used by earlier versions
377
378 Double_t entryX = localPositionIn[0];
379 Double_t exitX = localPositionOut[0];
380 Double_t entryY = localPositionIn[1];
381 Double_t exitY = localPositionOut[1];
382 Double_t entryZ = localPositionIn[2];
383 Double_t exitZ = localPositionOut[2];
384
403 // entry and exit from the epi layer ( det ref frame ) :
404 Double_t entryZepi = -fEpiTh / 2;
405 Double_t exitZepi = fEpiTh / 2;
406
407
408 TVector3 a(entryX, entryY, entryZ); // entry in the detector
409 TVector3 b(exitX, exitY, exitZ); // exit from the detector
410 TVector3 c;
411
412 c = b - a; // AB in schema
413
414 TVector3 d;
415 TVector3 e;
416
417 Double_t scale1 = (entryZepi - entryZ) / (exitZ - entryZ);
418 Double_t scale2 = (exitZepi - entryZ) / (exitZ - entryZ);
419
420
421 d = c * scale1;
422 e = c * scale2;
423
424 TVector3 entryEpiCoord;
425 TVector3 exitEpiCoord;
426
427 entryEpiCoord = d + a;
428 exitEpiCoord = e + a;
429
430
431 //Get x and y coordinates at the ENTRY of the epi layer
432 Double_t entryXepi = entryEpiCoord.X();
433 Double_t entryYepi = entryEpiCoord.Y();
434 entryZepi = entryEpiCoord.Z();
435
436 //Get x and y coordinates at the EXIT of the epi layer
437 Double_t exitXepi = exitEpiCoord.X();
438 Double_t exitYepi = exitEpiCoord.Y();
439 exitZepi = exitEpiCoord.Z();
440
441
442 Double_t lx = -(entryXepi - exitXepi); //length of segment x-direction
443 Double_t ly = -(entryYepi - exitYepi);
444 Double_t lz = -(entryZepi - exitZepi);
445
446
447 //-----------------------------------------------------------
448
449
450 Double_t rawLength = sqrt(lx * lx + ly * ly + lz * lz); //length of the track inside the epi-layer, in cm
451 Double_t trackLength = 0;
452
453 if (rawLength < 1.0e+3) { trackLength = rawLength; }
454
455 else {
456 LOG(warning) << GetName() << " : rawlength > 1.0e+3 : " << rawLength;
457 trackLength = 1.0e+3;
458 }
459
460 //Smear the energy on each track segment
461 Double_t charge = fLandauRandom->Landau(fLandauGain, fLandauSigma / fLandauMPV);
462
463 if (charge > (12000 / fLandauMPV)) { charge = 12000 / fLandauMPV; } //limit Random generator behaviour
464 //Translate the charge to normalized energy
465
466 // LOG(debug) << "charge after random generator " << charge;
467 Double_t dEmean = charge / (fElectronsPerKeV * 1e6);
468 // LOG(debug) << "dEmean " << dEmean;
469 fNumberOfSegments = int(trackLength / fSegmentLength) + 1;
470
471 dEmean = dEmean * ((Double_t) trackLength / fEpiTh); //scale the energy to the track length
472
473 dEmean = dEmean / ((Double_t) fNumberOfSegments); // From this point dEmean corresponds to the E lost per segment.
474
475
477
478 fEsum = 0.0;
479
480 //Double_t segmentLength_update = trackLength/((Double_t)fNumberOfSegments);
481
482 if (lz != 0) {
487 fSegmentDepth = fEpiTh / ((Double_t) fNumberOfSegments);
488 }
489 else { //condition added 05/08/08
490 fSegmentDepth = 0;
491 LOG(warning) << GetName() << " Length of track in detector (z-direction) is 0!!!";
492 }
493
494
495 Double_t x = 0, y = 0, z = 0;
496
497 Double_t xDebug = 0, yDebug = 0, zDebug = 0;
498 Float_t totalSegmentCharge = 0;
499
500 for (int i = 0; i < fNumberOfSegments; ++i) {
501
502 z = -fEpiTh / 2 + ((double) (i) + 0.5) * fSegmentDepth; //middle position of the segment; zdirection
503 x = entryXepi
504 + ((double) (i) + 0.5) * (lx / ((Double_t) fNumberOfSegments)); //middle position of the segment; xdirection
505 y = entryYepi
506 + ((double) (i) + 0.5) * (ly / ((Double_t) fNumberOfSegments)); //middle position of the segment; ydirection
507
508 if (fShowDebugHistos) {
509 xDebug = xDebug + x;
510 yDebug = yDebug + y;
511 zDebug = zDebug + z;
512 };
513
514 SignalPoint* sPoint = &fSignalPoints[i];
515
516 fEsum = fEsum + dEmean;
517 sPoint->eloss = dEmean;
518 sPoint->x = x; //here the coordinates x,y,z are given in the sensor reference frame.
519 sPoint->y = y;
520 sPoint->z = z;
521 charge = 1.0e+6 * dEmean * fElectronsPerKeV;
522 //LOG(debug) << "charge " << charge;
523 sPoint->sigmaX = fPixelSize;
524 sPoint->sigmaY = fPixelSize;
525 sPoint->charge = charge;
526 totalSegmentCharge = totalSegmentCharge + charge;
527 }
528}
529// -------------------------------------------------------------------------
530
532{
533
535
536 CbmMvdPixelCharge* pixel;
537
538 pair<Int_t, Int_t> thispoint;
539 pair<pair<Int_t, Int_t>, Double_t> thisTimePoint;
540
541 Double_t xCentre, yCentre, sigmaX, sigmaY, xLo, xUp, yLo, yUp;
542
543 SignalPoint* sPoint;
544 sPoint = &fSignalPoints[0];
545
546 xCentre = sPoint->x; //of segment
547 yCentre = sPoint->y;
548 sigmaX = sPoint->sigmaX;
549 sigmaY = sPoint->sigmaY;
550
551 xLo = sPoint->x - fWidthOfCluster * sigmaX;
552 xUp = sPoint->x + fWidthOfCluster * sigmaX;
553 yLo = sPoint->y - fWidthOfCluster * sigmaY;
554 yUp = sPoint->y + fWidthOfCluster * sigmaY;
555
556 if (fNumberOfSegments < 2) {
557 Fatal("-E- CbmMvdDigitizer: ", "fNumberOfSegments < 2, this makes no sense, check parameters.");
558 }
559
560 Int_t* lowerXArray = new Int_t[fNumberOfSegments];
561 Int_t* upperXArray = new Int_t[fNumberOfSegments];
562 Int_t* lowerYArray = new Int_t[fNumberOfSegments];
563 Int_t* upperYArray = new Int_t[fNumberOfSegments];
564
565 Int_t ixLo, ixUp, iyLo, iyUp;
566
567
568 Double_t minCoord[] = {xLo, yLo};
569 Double_t maxCoord[] = {xUp, yUp};
570
571
572 fSensor->LocalToPixel(minCoord, lowerXArray[0], lowerYArray[0]);
573 fSensor->LocalToPixel(maxCoord, upperXArray[0], upperYArray[0]);
574
575
576 if (lowerXArray[0] < 0) lowerXArray[0] = 0;
577 if (lowerYArray[0] < 0) lowerYArray[0] = 0;
578 if (upperXArray[0] > fNPixelsX) upperXArray[0] = fNPixelsX;
579 if (upperYArray[0] > fNPixelsY) upperYArray[0] = fNPixelsY;
580
581 ixLo = lowerXArray[0];
582 iyLo = lowerYArray[0];
583 ixUp = upperXArray[0];
584 iyUp = upperYArray[0];
585
586
587 for (Int_t i = 1; i < fNumberOfSegments; i++) {
588
589 sPoint = &fSignalPoints[i];
590 sigmaX = sPoint->sigmaX;
591 sigmaY = sPoint->sigmaY;
592
593 minCoord[0] = sPoint->x - fWidthOfCluster * sigmaX;
594 minCoord[1] = sPoint->y - fWidthOfCluster * sigmaY;
595 maxCoord[0] = sPoint->x + fWidthOfCluster * sigmaX;
596 maxCoord[1] = sPoint->y + fWidthOfCluster * sigmaY;
597
598 fSensor->LocalToPixel(minCoord, lowerXArray[i], lowerYArray[i]);
599 fSensor->LocalToPixel(maxCoord, upperXArray[i], upperYArray[i]);
600
601 if (lowerXArray[i] < 0) lowerXArray[i] = 0;
602 if (lowerYArray[i] < 0) lowerYArray[i] = 0;
603
604 if (upperXArray[i] > fNPixelsX) upperXArray[i] = fNPixelsX;
605 if (upperYArray[i] > fNPixelsY) upperYArray[i] = fNPixelsY;
606
607 if (ixLo > lowerXArray[i]) { ixLo = lowerXArray[i]; }
608 if (ixUp < upperXArray[i]) { ixUp = upperXArray[i]; }
609 if (iyLo > lowerYArray[i]) { iyLo = lowerYArray[i]; }
610 if (iyUp < upperYArray[i]) { iyUp = upperYArray[i]; }
611 }
612 // loop over all pads of interest.
613 fPixelChargeShort.clear();
614 Int_t ix, iy;
615 Double_t ROTime = fSensor->GetReadoutTime(fTime + point->GetTime());
616 for (ix = ixLo; ix < ixUp + 1; ix++) {
617 for (iy = iyLo; iy < iyUp + 1; iy++) {
618 Double_t Current[3];
619 fSensor->PixelToLocal(ix, iy, Current);
620 pixel = nullptr;
621 for (Int_t i = 0; i < fNumberOfSegments; ++i) {
622 if (ix < lowerXArray[i] || iy < lowerYArray[i] || ix > upperXArray[i] || iy > upperYArray[i]) { continue; }
623
624 sPoint = &fSignalPoints[i];
625 xCentre = sPoint->x; //of segment
626 yCentre = sPoint->y; // idem
627 sigmaX = sPoint->sigmaX;
628 sigmaY = sPoint->sigmaY;
629 fCurrentTotalCharge += sPoint->charge;
630
631 //compute the charge distributed to this pixel by this segment
632 Float_t numerator = sPoint->charge * fLorentzNorm * (0.5 * fPar0 * fPar1 / TMath::Pi());
633 Float_t maxCount = TMath::Max(1.e-10, (((Current[0] - xCentre) * (Current[0] - xCentre))
634 + ((Current[1] - yCentre) * (Current[1] - yCentre)))
636 + 0.25 * fPar1 * fPar1);
637
638 Float_t totCharge = (numerator / maxCount + fPar2);
639
640 if (totCharge < 1) { continue; }
641 if (!pixel) {
642 thispoint = std::make_pair(ix, iy);
643 thisTimePoint = std::make_pair(thispoint, ROTime);
644 fChargeMapIt = fChargeMap.find(thisTimePoint);
645 if (fChargeMapIt == fChargeMap.end()) {
646 pixel = new ((*fPixelCharge)[fPixelCharge->GetEntriesFast()])
647 CbmMvdPixelCharge(totCharge, ix, iy, point->GetPointId(), point->GetTrackID(),
648 (point->GetX() + point->GetXOut()) / 2, (point->GetY() + point->GetXOut()) / 2, ROTime);
649 fChargeMap[thisTimePoint] = pixel;
650 }
651 else {
652 pixel = fChargeMapIt->second;
653 pixel->AddCharge(totCharge);
654 }
655 fPixelChargeShort.push_back(pixel);
656 }
657 else {
658 pixel->AddCharge(totCharge);
659 }
660 } // end for (track segments)
661 } //for y
662 } // for x
663
664 std::vector<CbmMvdPixelCharge*>::size_type vectorSize = fPixelChargeShort.size();
665
666 for (ULong64_t f = 0; f < vectorSize; f++) {
667 CbmMvdPixelCharge* pixelCharge = fPixelChargeShort.at(f);
668 if (pixelCharge) {
669 pixelCharge->DigestCharge(((float) (point->GetX() + point->GetXOut()) / 2),
670 ((float) (point->GetY() + point->GetYOut()) / 2), point->GetPointId(),
671 point->GetTrackID());
672 }
673 else {
674 LOG(warning) << "Warning working on broken pixel ";
675 }
676 }
677
678 delete[] lowerXArray;
679 delete[] upperXArray;
680 delete[] lowerYArray;
681 delete[] upperYArray;
682}
683// -------------------------------------------------------------------------
684
685// ----- Virtual private method Init ----------------------------------
687{
688
689 //Read information on the sensor von data base
690 fSensor = mySensor;
691
692 // LOG(info) << GetName() << ": Initialisation of sensor " << fSensor->GetName();
693
694 fDigis = new TClonesArray("CbmMvdDigi", 10000);
695 fDigiMatch = new TClonesArray("CbmMatch", 10000);
696
697 fOutputBuffer = new TClonesArray("CbmMvdDigi", 10000);
698 fInputPoints = new TClonesArray("CbmMvdPoint", 10000);
699
700 fPixelCharge = new TClonesArray("CbmMvdPixelCharge", 100000);
701
702 if (!fSensor) {
703 Fatal(GetName(), "Fatal error: Init(CbmMvdSensor*) called without valid pointer, "
704 "don't know how to proceed.");
705 };
706
708
709 fPreviousPlugin = nullptr;
710 initialized = kTRUE;
711}
712// -------------------------------------------------------------------------
713
714// ----- Virtual public method Reinit ----------------------------------
716{
717
718 delete fOutputBuffer;
719
720 InitTask(sensor);
721}
722// -------------------------------------------------------------------------
723
724// ----- Virtual method Finish -----------------------------------------
726// -------------------------------------------------------------------------
727
728// ----- Private method Reset ------------------------------------------
730// -------------------------------------------------------------------------
731
732// ----- Private method PrintParameters --------------------------------
734// -------------------------------------------------------------------------
735
ClassImp(CbmMvdSensorDigitizerTBTask)
friend fvec sqrt(const fvec &a)
void AddLink(const CbmLink &newLink)
Definition CbmMatch.cxx:47
std::vector< Double_t > & GetTime()
void DigestCharge(Float_t pointX, Float_t pointY, Double_t time, Int_t PointId, Int_t trackId, Int_t inputNr, Int_t eventNr)
void AddCharge(Float_t charge)
std::vector< Int_t > & GetPointID()
std::vector< Int_t > & GetTrackID()
std::vector< Float_t > & GetPointWeight()
std::vector< Float_t > & GetCharge()
double GetXOut() const
Definition CbmMvdPoint.h:67
int32_t GetPointId() const
Definition CbmMvdPoint.h:76
int32_t GetStationNr() const
Definition CbmMvdPoint.h:75
double GetZOut() const
Definition CbmMvdPoint.h:69
double GetYOut() const
Definition CbmMvdPoint.h:68
int32_t GetPdgCode() const
Definition CbmMvdPoint.h:73
virtual Double_t GetEpiThickness()
virtual Double_t GetLorentzPar1()
virtual Double_t GetPixelPitchX()
virtual Double_t GetLandauMPV()
virtual Double_t GetPixelPitchY()
virtual Double_t GetLandauSigma()
virtual Double_t GetChargeThreshold()
virtual Double_t GetLandauGain()
virtual Double_t GetLorentzPar0()
virtual Double_t GetLorentzPar2()
void SetInputArray(TClonesArray *inputStream)
void ProduceIonisationPoints(CbmMvdPoint *point)
virtual void InitTask(CbmMvdSensor *mySensor)
std::map< std::pair< std::pair< Int_t, Int_t >, Double_t >, CbmMvdPixelCharge * >::iterator fChargeMapIt
std::map< std::pair< std::pair< Int_t, Int_t >, Double_t >, CbmMvdPixelCharge * > fChargeMap
void GetEventInfo(Int_t &inputNr, Int_t &eventNr, Double_t &eventTime)
std::vector< CbmMvdPixelCharge * > fPixelChargeShort
virtual void ReInit(CbmMvdSensor *mySensor)
virtual TClonesArray * GetOutputArray()
CbmMvdSensorPlugin * fPreviousPlugin
virtual const char * GetName() const
CbmMvdSensor * fSensor
TClonesArray * fOutputBuffer
void TopToLocal(Double_t *lab, Double_t *local)
Int_t GetSensorNr() const
void PixelToLocal(Int_t pixelNumberX, Int_t pixelNumberY, Double_t *local)
void LocalToPixel(Double_t *local, Int_t &pixelNumberX, Int_t &pixelNumberY)
Double_t GetIntegrationtime() const
Double_t GetReadoutTime(Double_t absoluteTime) const
CbmMvdSensorDataSheet * GetDataSheet()