CbmRoot
CbmMvdSensorDigitizerTask.cxx
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmMvdSensorDigitizerTask source file -----
3 // ----- Created 02.02.2012 by M. Deveaux -----
4 // -------------------------------------------------------------------------
20 
21 #include "TClonesArray.h"
22 #include "TObjArray.h"
23 
24 #include "CbmMvdPileupManager.h"
25 #include "CbmMvdPoint.h"
26 
27 #include "FairRuntimeDb.h"
28 
29 // Includes from FairRoot
30 #include "FairEventHeader.h"
31 #include "FairLogger.h"
32 #include "FairMCEventHeader.h"
33 #include "FairRunAna.h"
34 #include "FairRunSim.h"
35 
36 
37 // Includes from C++
38 #include <iomanip>
39 #include <iostream>
40 #include <map>
41 #include <vector>
42 
43 using std::cout;
44 using std::endl;
45 using std::fixed;
46 using std::ios_base;
47 using std::left;
48 using std::map;
49 using std::pair;
50 using std::right;
51 using std::setprecision;
52 using std::setw;
53 using std::vector;
54 
55 
56 // ----- Default constructor ------------------------------------------
59  , fcurrentFrameNumber(0)
60  , fEpiTh(0.0014)
61  , fSegmentLength(0.0001)
62  , fDiffusionCoefficient(0.0055)
63  , fElectronsPerKeV(276.)
64  , fWidthOfCluster(3.5)
65  , fPixelSizeX(0.0030)
66  , fPixelSizeY(0.0030)
67  , fCutOnDeltaRays(0.00169720)
68  , fChargeThreshold(100.)
69  , fFanoSilicium(0.115)
70  , fEsum(0.)
71  , fSegmentDepth(0.)
72  , fCurrentTotalCharge(0.)
73  , fCurrentParticleMass(0.)
74  , fCurrentParticleMomentum(0.)
75  , fCurrentParticlePdg(0)
76  , fRandomGeneratorTestHisto(NULL)
77  , fPosXY(NULL)
78  , fpZ(NULL)
79  , fPosXinIOut(NULL)
80  , fAngle(NULL)
81  , fSegResolutionHistoX(NULL)
82  , fSegResolutionHistoY(NULL)
83  , fSegResolutionHistoZ(NULL)
84  , fTotalChargeHisto(NULL)
85  , fTotalSegmentChargeHisto(NULL)
86  , fLorentzY0(-6.1)
87  , fLorentzXc(0.)
88  , fLorentzW(1.03)
89  , fLorentzA(477.2)
90  , fLorentzNorm(1.)
91  , fLandauMPV(877.4)
92  , fLandauSigma(204.93)
93  , fLandauGain(3.3)
94  , fLandauRandom(new TRandom3())
95  , fPixelSize(0.0025)
96  , fPar0(520.)
97  , fPar1(0.34)
98  , fPar2(-1.2)
99  , fCompression(1.)
100  , fResolutionHistoX(NULL)
101  , fResolutionHistoY(NULL)
102  , fNumberOfSegments(0)
103  , fCurrentLayer(0)
104  , fEvent(0)
105  , fVolumeId(0)
106  , fNPixelsX(0)
107  , fNPixelsY(0)
108  , fPixelCharge(new TClonesArray("CbmMvdPixelCharge"))
109  , fDigis(NULL)
110  , fDigiMatch(NULL)
111  , frand(nullptr)
112  , fproduceNoise(kFALSE)
113  , fPixelChargeShort()
114  , fPixelScanAccelerator(NULL)
115  , fChargeMap()
116  , fChargeMapIt()
117  , fsensorDataSheet(NULL)
118  , fMode(0)
119  , fSigmaX(0.0005)
120  , fSigmaY(0.0005)
121  , fReadoutTime(0.00005)
122  , fEfficiency(-1.)
123  , fMergeDist(-1.)
124  , fFakeRate(-1.)
125  , fNPileup(0)
126  , fNDeltaElect(0)
127  , fDeltaBufferSize(0)
128  , fBgBufferSize(0)
129  , fBranchName("")
130  , fBgFileName("")
131  , fDeltaFileName("")
132  , fInputPoints(NULL)
133  , fPoints(new TRefArray())
134  , fRandGen()
135  , fTimer()
136  , fPileupManager(NULL)
137  , fDeltaManager(NULL)
138  , fNEvents(0)
139  , fNPoints(0.)
140  , fNReal(0.)
141  , fNBg(0.)
142  , fNFake(0.)
143  , fNLost(0.)
144  , fNMerged(0.)
145  , fTime(0.)
146  , fSignalPoints()
147  , h_trackLength(NULL)
148  , h_numSegments(NULL)
149  , h_LengthVsAngle(NULL)
150  , h_LengthVsEloss(NULL)
151  , h_ElossVsMomIn(NULL) {
152  fRandGen.SetSeed(2736);
153  frand = new TRandom3(0);
154  fproduceNoise = kFALSE;
155 }
156 // -------------------------------------------------------------------------
157 
158 
159 // ----- Standard constructor ------------------------------------------
161  : CbmMvdSensorTask()
162  , fcurrentFrameNumber(0)
163  , fEpiTh(0.0014)
164  , fSegmentLength(0.0001)
165  , fDiffusionCoefficient(0.0055)
166  , fElectronsPerKeV(276.)
167  , fWidthOfCluster(3.5)
168  , fPixelSizeX(0.0030)
169  , fPixelSizeY(0.0030)
170  , fCutOnDeltaRays(0.00169720)
171  , fChargeThreshold(100.)
172  , fFanoSilicium(0.115)
173  , fEsum(0.)
174  , fSegmentDepth(0.)
175  , fCurrentTotalCharge(0.)
176  , fCurrentParticleMass(0.)
177  , fCurrentParticleMomentum(0.)
178  , fCurrentParticlePdg(0)
179  , fRandomGeneratorTestHisto(NULL)
180  , fPosXY(NULL)
181  , fpZ(NULL)
182  , fPosXinIOut(NULL)
183  , fAngle(NULL)
184  , fSegResolutionHistoX(NULL)
185  , fSegResolutionHistoY(NULL)
186  , fSegResolutionHistoZ(NULL)
187  , fTotalChargeHisto(NULL)
188  , fTotalSegmentChargeHisto(NULL)
189  , fLorentzY0(-6.1)
190  , fLorentzXc(0.)
191  , fLorentzW(1.03)
192  , fLorentzA(477.2)
193  , fLorentzNorm(1.)
194  , fLandauMPV(877.4)
195  , fLandauSigma(204.93)
196  , fLandauGain(3.3)
197  , fLandauRandom(new TRandom3())
198  , fPixelSize(0.0025)
199  , fPar0(520.)
200  , fPar1(0.34)
201  , fPar2(-1.2)
202  , fCompression(1.)
203  , fResolutionHistoX(NULL)
204  , fResolutionHistoY(NULL)
205  , fNumberOfSegments(0)
206  , fCurrentLayer(0)
207  , fEvent(0)
208  , fVolumeId(0)
209  , fNPixelsX(0)
210  , fNPixelsY(0)
211  , fPixelCharge(new TClonesArray("CbmMvdPixelCharge", 100000))
212  , fDigis(NULL)
213  , fDigiMatch(NULL)
214  , frand(nullptr)
215  , fproduceNoise(kFALSE)
216  , fPixelChargeShort()
217  , fPixelScanAccelerator(NULL)
218  , fChargeMap()
219  , fChargeMapIt()
220  , fsensorDataSheet(NULL)
221  , fMode(iMode)
222  , fSigmaX(0.0005)
223  , fSigmaY(0.0005)
224  , fReadoutTime(0.00005)
225  , fEfficiency(-1.)
226  , fMergeDist(-1.)
227  , fFakeRate(-1.)
228  , fNPileup(0)
229  , fNDeltaElect(0)
230  , fDeltaBufferSize(0)
231  , fBgBufferSize(0)
232  , fBranchName("MvdPoint")
233  , fBgFileName("")
234  , fDeltaFileName("")
235  , fInputPoints(NULL)
236  , fPoints(new TRefArray())
237  , fRandGen()
238  , fTimer()
239  , fPileupManager(NULL)
240  , fDeltaManager(NULL)
241  , fNEvents(0)
242  , fNPoints(0.)
243  , fNReal(0.)
244  , fNBg(0.)
245  , fNFake(0.)
246  , fNLost(0.)
247  , fNMerged(0.)
248  , fTime(0.)
249  , fSignalPoints()
250  , h_trackLength(NULL)
251  , h_numSegments(NULL)
252  , h_LengthVsAngle(NULL)
253  , h_LengthVsEloss(NULL)
254  , h_ElossVsMomIn(NULL) {
255  cout << "Starting CbmMvdSensorDigitizerTask::CbmMvdSensorDigitizerTask() "
256  << endl;
257 
258  fRandGen.SetSeed(2736);
259  fEvent = 0;
260  fTime = 0.;
261  fSigmaX = 0.0005;
262  fSigmaY = 0.0005;
263  fReadoutTime = 0.00005;
264 
265 
266  fEpiTh = 0.0014;
267  fSegmentLength = 0.0001;
269  0.0055; // correspondes to the sigma of the gauss with the max drift length
270  fElectronsPerKeV = 276; //3.62 eV for e-h creation
271  fWidthOfCluster = 3.5; // in sigmas
272  fPixelSizeX = 0.0025; // in cm
273  fPixelSizeY = 0.0025;
274  fCutOnDeltaRays = 0.00169720; //MeV
275  fChargeThreshold = 100.; //electrons change 1 to 10
276  fFanoSilicium = 0.115;
277  fEsum = 0;
278  fSegmentDepth = 0;
283 
284 
285  fPixelSize = 0.0025;
286  fPar0 = 520.;
287  fPar1 = 0.34;
288  fPar2 = -1.2;
289  fLandauMPV = 877.4;
290  fLandauSigma = 204.93;
291  fLandauGain = 3.3;
292 
293  fLorentzY0 = -6.1;
294  fLorentzXc = 0.;
295  fLorentzW = 1.03;
296  fLorentzA = 477.2;
297 
298 
299  fCompression = 1.;
300 
301 
302  //fLorentzNorm=0.00013010281679422413;
303  fLorentzNorm = 1;
304 
305 
307 
308  frand = new TRandom3(0);
309  fproduceNoise = kFALSE;
310 }
311 
312 
313 // -------------------------------------------------------------------------
314 
315 
316 // ----- Destructor ----------------------------------------------------
318 
319  if (fPileupManager) delete fPileupManager;
320  if (fDeltaManager) delete fDeltaManager;
321  if (fInputPoints) {
322  fInputPoints->Delete();
323  delete fInputPoints;
324  }
325  if (fOutputBuffer) {
326  fOutputBuffer->Delete();
327  delete fOutputBuffer;
328  }
329 }
330 // ------------------------------------------------------------------------
331 
332 
333 // ----- Virtual private method ReadSensorInformation ----------------
335 
336  CbmMvdSensorDataSheet* sensorData;
337  sensorData = fSensor->GetDataSheet();
338  if (!sensorData) { return kERROR; }
339 
340  fPixelSizeX = sensorData->GetPixelPitchX();
341  fPixelSizeY = sensorData->GetPixelPitchY();
342  fNPixelsX = sensorData->GetNPixelsX();
343  fNPixelsY = sensorData->GetNPixelsY();
344 
345  fChargeThreshold = sensorData->GetChargeThreshold();
346 
347  fPar0 = sensorData->GetLorentzPar0();
348  fPar1 = sensorData->GetLorentzPar1();
349  fPar2 =
350  sensorData
351  ->GetLorentzPar2(); //cout<< endl << " LorentzPar2 is now set to " << fPar2 << endl;
352 
353  fLandauMPV =
354  sensorData
355  ->GetLandauMPV(); //cout << endl << " Landau MPV is now set to " << fLandauMPV << endl;
356  fLandauSigma =
357  sensorData
358  ->GetLandauSigma(); //cout << endl << " Landau Sigma is now set to " << fLandauSigma << endl;
359  fLandauGain =
360  sensorData
361  ->GetLandauGain(); //cout << endl << " Landau Gain is now set to " << fLandauGain << endl;
362  fEpiTh =
363  sensorData
364  ->GetEpiThickness(); //cout << endl << " Epitaxial thickness is now set to " << fEpiTh << endl;
366 
367  if (fCompression != 1)
368  //cout << endl << "working with non uniform pixels" << endl;
369  if (fCompression <= 0) fCompression = 1;
370  return kSUCCESS;
371 }
372 
373 
374 // -----------------------------------------------------------------------------
375 
376 void CbmMvdSensorDigitizerTask::SetInputArray(TClonesArray* inputStream) {
377 
378  Int_t i = 0;
379  Int_t nInputs = inputStream->GetEntriesFast();
380  while (nInputs > i) {
381  new ((*fInputPoints)[fInputPoints->GetEntriesFast()])
382  CbmMvdPoint(*((CbmMvdPoint*) inputStream->At(i)));
383 
384  //cout << endl << "New Input registered" << endl;
385  i++;
386  }
387 }
388 // -----------------------------------------------------------------------------
390 
391  new ((*fInputPoints)[fInputPoints->GetEntriesFast()])
392  CbmMvdPoint(*((CbmMvdPoint*) point));
393 }
394 
395 
396 // -------------- public method ExecChain ------------------------------------
398 
399  // cout << endl << "start Digitizer on sensor " << fSensor->GetName() << endl;
400 
401 
402  Exec();
403 }
404 
405 // ----- Virtual public method Exec ------------------------------------
407 
408  if (fPreviousPlugin) {
409  fInputPoints->Delete();
410  fInputPoints->AbsorbObjects(fPreviousPlugin->GetOutputArray());
411  }
412  fOutputBuffer->Clear("C");
413  fDigis->Clear("C");
414  fDigiMatch->Clear("C");
415  if (fInputPoints->GetEntriesFast() > 0) {
416 
417  for (Int_t iPoint = 0; iPoint < fInputPoints->GetEntriesFast(); iPoint++) {
418 
419  CbmMvdPoint* point = (CbmMvdPoint*) fInputPoints->At(iPoint);
420 
421  if (!point) {
422  cout << "-W-" << GetName() << ":: Exec:" << endl;
423  cout << " -received bad MC-Point. Ignored." << endl;
424  continue;
425  }
426  if (point->GetStationNr() != fSensor->GetSensorNr()) {
427  cout << "-W-" << GetName() << ":: Exec:" << endl;
428  cout << " -received bad MC-Point which doesn't belong here. Ignored."
429  << endl;
430  continue;
431  }
432  fcurrentFrameNumber = point->GetFrame();
433  //The digitizer acts only on particles, which crossed the station.
434  //Particles generated in the sensor or being absorbed in this sensor are ignored
435  if (TMath::Abs(point->GetZOut() - point->GetZ()) < 0.9 * fEpiTh) {
436  LOG(debug) << "hit not on chip with thickness "
437  << 0.9 * 2 * fSensor->GetDZ();
438  LOG(debug) << "hit not on chip with length "
439  << TMath::Abs(point->GetZOut() - point->GetZ());
440  continue;
441  }
442  // Reject for the time being light nuclei (no digitization modell yet)
443  if (point->GetPdgCode() > 100000) { continue; }
444  // Digitize the point
445  //cout << endl << " found point make digi" << endl;
447  ProducePixelCharge(point);
448  } //loop on MCpoints
449 
450 
451  Int_t inputNr = 0;
452  Int_t eventNr = 0;
453  Double_t eventTime = .0;
454  Int_t nDigis = 0;
455  GetEventInfo(inputNr, eventNr, eventTime);
456 
458 
459  for (Int_t i = 0; i < fPixelCharge->GetEntriesFast(); i++) {
461 
462  if (pixel->GetCharge() > fChargeThreshold) {
463  nDigis = fDigis->GetEntriesFast();
464 
465  new ((*fDigis)[nDigis]) CbmMvdDigi(fSensor->GetSensorNr(),
466  pixel->GetX(),
467  pixel->GetY(),
468  pixel->GetCharge(),
469  fPixelSizeX,
470  fPixelSizeY,
471  pixel->GetTime(),
472  pixel->GetFrame());
473 
474 
475  new ((*fOutputBuffer)[nDigis]) CbmMvdDigi(fSensor->GetSensorNr(),
476  pixel->GetX(),
477  pixel->GetY(),
478  pixel->GetCharge(),
479  fPixelSizeX,
480  fPixelSizeY,
481  pixel->GetTime(),
482  pixel->GetFrame());
483 
484  new ((*fDigiMatch)[nDigis]) CbmMatch();
485  CbmMatch* match = (CbmMatch*) fDigiMatch->At(nDigis);
486  for (Int_t iLink = 0; iLink < pixel->GetNContributors(); iLink++) {
487  if (pixel->GetTrackID()[iLink] > -1)
488  match->AddLink((Double_t) pixel->GetPointWeight()[iLink],
489  pixel->GetPointID()[iLink],
490  eventNr,
491  inputNr);
492  else
493  match->AddLink((Double_t) pixel->GetPointWeight()[iLink],
494  pixel->GetPointID()[iLink]);
495  }
496  } else {
497  //cout << endl << "charge under threshold, digi rejected" << endl;
498  }
499  }
500  //LOG(debug) << nDigis <<" new Digis at on Sensor " << fSensor->GetSensorNr() << " from " << fInputPoints->GetEntriesFast()<< " McPoints";
501 
502  }
503 
504  else {
505  //LOG(debug)<< "No input found on Sensor " << fSensor->GetSensorNr() << " from " << fInputPoints->GetEntriesFast()<< " McPoints";
506  }
507 
508  fPixelCharge->Delete();
509  fChargeMap.clear();
510  fInputPoints->Delete();
511  fSignalPoints.clear();
512 
513 } // end of exec
514 
515 // -------------------------------------------------------------------------
516 
517 // -------------------------------------------------------------------------
519  Int_t& eventNr,
520  Double_t& eventTime) {
521 
522  // --- The event number is taken from the FairRootManager
523  eventNr = FairRootManager::Instance()->GetEntryNr();
524 
525  // --- In a FairRunAna, take the information from FairEventHeader
526  if (FairRunAna::Instance()) {
527  FairEventHeader* event = FairRunAna::Instance()->GetEventHeader();
528  inputNr = event->GetInputFileId();
529  eventTime = event->GetEventTime();
530  }
531 
532  // --- In a FairRunSim, the input number and event time are always zero.
533  else {
534  if (!FairRunSim::Instance())
535  LOG(fatal) << GetName() << ": neither SIM nor ANA run.";
536  inputNr = 0;
537  eventTime = 0.;
538  }
539 }
540 // -------------------------------------------------------------------------
541 
542 // -------------------------------------------------------------------------
548  //Option_t* opt1;
549  //cout << endl << "Computing Point " << endl;
550  //point->Print(opt1);
551 
552  // Int_t pdgCode = point->GetPdgCode();
553 
554  //Transform coordinates of the point into sensor frame
555 
556  Double_t globalPositionIn[3] = {point->GetX(), point->GetY(), point->GetZ()};
557  Double_t globalPositionOut[3] = {
558  point->GetXOut(), point->GetYOut(), point->GetZOut()};
559 
560  Double_t localPositionIn[3] = {0, 0, 0};
561 
562  Double_t localPositionOut[3] = {0, 0, 0};
563 
564  fSensor->TopToLocal(globalPositionIn, localPositionIn);
565  fSensor->TopToLocal(globalPositionOut, localPositionOut);
566 
567  Int_t pixelX, pixelY;
568  fSensor->LocalToPixel(&localPositionIn[0], pixelX, pixelY);
569 
570  // Copy results into variables used by earlier versions
571 
572  Double_t entryX = localPositionIn[0];
573  Double_t exitX = localPositionOut[0];
574  Double_t entryY = localPositionIn[1];
575  Double_t exitY = localPositionOut[1];
576  Double_t entryZ = localPositionIn[2];
577  Double_t exitZ = localPositionOut[2];
578 
597  // entry and exit from the epi layer ( det ref frame ) :
598  Double_t entryZepi = -fEpiTh / 2;
599  Double_t exitZepi = fEpiTh / 2;
600 
601 
602  TVector3 a(entryX, entryY, entryZ); // entry in the detector
603  TVector3 b(exitX, exitY, exitZ); // exit from the detector
604  TVector3 c;
605 
606  c = b - a; // AB in schema
607 
608  TVector3 d;
609  TVector3 e;
610 
611  Double_t scale1 = (entryZepi - entryZ) / (exitZ - entryZ);
612  Double_t scale2 = (exitZepi - entryZ) / (exitZ - entryZ);
613 
614 
615  d = c * scale1;
616  e = c * scale2;
617 
618  TVector3 entryEpiCoord;
619  TVector3 exitEpiCoord;
620 
621  entryEpiCoord = d + a;
622  exitEpiCoord = e + a;
623 
624 
625  //Get x and y coordinates at the ENTRY of the epi layer
626  Double_t entryXepi = entryEpiCoord.X();
627  Double_t entryYepi = entryEpiCoord.Y();
628  entryZepi = entryEpiCoord.Z();
629 
630  //Get x and y coordinates at the EXIT of the epi layer
631  Double_t exitXepi = exitEpiCoord.X();
632  Double_t exitYepi = exitEpiCoord.Y();
633  exitZepi = exitEpiCoord.Z();
634 
635 
636  Double_t lx = -(entryXepi - exitXepi); //length of segment x-direction
637  Double_t ly = -(entryYepi - exitYepi);
638  Double_t lz = -(entryZepi - exitZepi);
639 
640 
641  //-----------------------------------------------------------
642 
643 
644  Double_t rawLength =
645  sqrt(lx * lx + ly * ly
646  + lz * lz); //length of the track inside the epi-layer, in cm
647  Double_t trackLength = 0;
648 
649  if (rawLength < 1.0e+3) {
650  trackLength = rawLength;
651  }
652 
653  else {
654  cout << "-W- " << GetName() << " : rawlength > 1.0e+3 : " << rawLength
655  << endl;
656  trackLength = 1.0e+3;
657  }
658 
659  //Smear the energy on each track segment
660  Double_t charge =
662 
663  //if (fShowDebugHistos ) cout << endl << "charge " << charge << endl;
664 
665  if (charge > (12000 / fLandauMPV)) {
666  charge = 12000 / fLandauMPV;
667  } //limit Random generator behaviour
668 
669  if (fShowDebugHistos) {
670  fRandomGeneratorTestHisto->Fill(charge * fLandauMPV);
671  }
672  //Translate the charge to normalized energy
673 
674  // cout << endl << "charge after random generator " << charge << endl;
675  Double_t dEmean = charge / (fElectronsPerKeV * 1e6);
676  // cout << endl << "dEmean " << dEmean << endl;
677  fNumberOfSegments = int(trackLength / fSegmentLength) + 1;
678 
679  dEmean =
680  dEmean
681  * ((Double_t) trackLength / fEpiTh); //scale the energy to the track length
682 
683  dEmean =
684  dEmean
685  / ((Double_t)
686  fNumberOfSegments); // From this point dEmean corresponds to the E lost per segment.
687 
688 
690 
691  fEsum = 0.0;
692 
693  //Double_t segmentLength_update = trackLength/((Double_t)fNumberOfSegments);
694 
695  if (lz != 0) {
700  fSegmentDepth = fEpiTh / ((Double_t) fNumberOfSegments);
701  } else { //condition added 05/08/08
702  fSegmentDepth = 0;
703  cout << "-W- " << GetName()
704  << " Length of track in detector (z-direction) is 0!!!" << endl;
705  }
706 
707 
708  Double_t x = 0, y = 0, z = 0;
709 
710  Double_t xDebug = 0, yDebug = 0, zDebug = 0;
711  Float_t totalSegmentCharge = 0;
712 
713  for (int i = 0; i < fNumberOfSegments; ++i) {
714 
715  z = -fEpiTh / 2
716  + ((double) (i) + 0.5)
717  * fSegmentDepth; //middle position of the segment; zdirection
718  x =
719  entryXepi
720  + ((double) (i) + 0.5)
721  * (lx
722  / ((Double_t)
723  fNumberOfSegments)); //middle position of the segment; xdirection
724  y =
725  entryYepi
726  + ((double) (i) + 0.5)
727  * (ly
728  / ((Double_t)
729  fNumberOfSegments)); //middle position of the segment; ydirection
730 
731  if (fShowDebugHistos) {
732  xDebug = xDebug + x;
733  yDebug = yDebug + y;
734  zDebug = zDebug + z;
735  };
736 
737  SignalPoint* sPoint = &fSignalPoints[i];
738 
739  fEsum = fEsum + dEmean;
740  sPoint->eloss = dEmean;
741  sPoint->x =
742  x; //here the coordinates x,y,z are given in the sensor reference frame.
743  sPoint->y = y;
744  sPoint->z = z;
745  charge = 1.0e+6 * dEmean * fElectronsPerKeV;
746  //cout << endl << "charge " << charge << endl;
747  sPoint->sigmaX = fPixelSize;
748  sPoint->sigmaY = fPixelSize;
749  sPoint->charge = charge;
750  totalSegmentCharge = totalSegmentCharge + charge;
751  }
752  //if (fShowDebugHistos )cout << endl << "totalSegmentCharge " << totalSegmentCharge << endl;
753  if (fShowDebugHistos) {
754  fTotalSegmentChargeHisto->Fill(totalSegmentCharge * fLandauMPV);
756  - (point->GetX() + point->GetXOut()) / 2
757  - fSensor->GetX());
759  - (point->GetY() + point->GetYOut()) / 2
760  - fSensor->GetY());
762  - (point->GetZ() + point->GetZOut()) / 2
763  - fSensor->GetZ());
764  }
765 }
766 
767 
768 // -------------------------------------------------------------------------
769 
775  fCurrentTotalCharge = 0.0;
776 
777 
778  // MDx - Variables needed in order to compute a "Monte Carlo Center of Gravity" of the cluster
779 
780  Float_t xCharge = 0., yCharge = 0., totClusterCharge = 0.;
781  CbmMvdPixelCharge* pixel;
782 
783  pair<Int_t, Int_t> thispoint;
784 
785  Double_t xCentre, yCentre, sigmaX, sigmaY, xLo, xUp, yLo, yUp;
786 
787  SignalPoint* sPoint;
788  sPoint = &fSignalPoints[0];
789 
790  xCentre = sPoint->x; //of segment
791  yCentre = sPoint->y;
792  sigmaX = sPoint->sigmaX;
793  sigmaY = sPoint->sigmaY;
794 
795  xLo = sPoint->x - fWidthOfCluster * sigmaX;
796  xUp = sPoint->x + fWidthOfCluster * sigmaX;
797  yLo = sPoint->y - fWidthOfCluster * sigmaY;
798  yUp = sPoint->y + fWidthOfCluster * sigmaY;
799 
800  if (fNumberOfSegments < 2) {
801  Fatal("-E- CbmMvdDigitizer: ",
802  "fNumberOfSegments < 2, this makes no sense, check parameters.");
803  }
804 
805  Int_t* lowerXArray = new Int_t[fNumberOfSegments];
806  Int_t* upperXArray = new Int_t[fNumberOfSegments];
807  Int_t* lowerYArray = new Int_t[fNumberOfSegments];
808  Int_t* upperYArray = new Int_t[fNumberOfSegments];
809 
810  Int_t ixLo, ixUp, iyLo, iyUp;
811 
812 
813  Double_t minCoord[] = {xLo, yLo};
814  Double_t maxCoord[] = {xUp, yUp};
815 
816 
817  fSensor->LocalToPixel(minCoord, lowerXArray[0], lowerYArray[0]);
818  fSensor->LocalToPixel(maxCoord, upperXArray[0], upperYArray[0]);
819 
820 
821  if (lowerXArray[0] < 0) lowerXArray[0] = 0;
822  if (lowerYArray[0] < 0) lowerYArray[0] = 0;
823  if (upperXArray[0] > fNPixelsX) upperXArray[0] = fNPixelsX;
824  if (upperYArray[0] > fNPixelsY) upperYArray[0] = fNPixelsY;
825 
826  ixLo = lowerXArray[0];
827  iyLo = lowerYArray[0];
828  ixUp = upperXArray[0];
829  iyUp = upperYArray[0];
830 
831 
832  for (Int_t i = 1; i < fNumberOfSegments; i++) {
833 
834  sPoint = &fSignalPoints[i];
835  sigmaX = sPoint->sigmaX;
836  sigmaY = sPoint->sigmaY;
837 
838  minCoord[0] = sPoint->x - fWidthOfCluster * sigmaX;
839  minCoord[1] = sPoint->y - fWidthOfCluster * sigmaY;
840  maxCoord[0] = sPoint->x + fWidthOfCluster * sigmaX;
841  maxCoord[1] = sPoint->y + fWidthOfCluster * sigmaY;
842 
843 
844  fSensor->LocalToPixel(minCoord, lowerXArray[i], lowerYArray[i]);
845  fSensor->LocalToPixel(maxCoord, upperXArray[i], upperYArray[i]);
846 
847  if (lowerXArray[i] < 0) lowerXArray[i] = 0;
848  if (lowerYArray[i] < 0) lowerYArray[i] = 0;
849 
850  if (upperXArray[i] > fNPixelsX) upperXArray[i] = fNPixelsX;
851  if (upperYArray[i] > fNPixelsY) upperYArray[i] = fNPixelsY;
852 
853  if (ixLo > lowerXArray[i]) { ixLo = lowerXArray[i]; }
854  if (ixUp < upperXArray[i]) { ixUp = upperXArray[i]; }
855  if (iyLo > lowerYArray[i]) { iyLo = lowerYArray[i]; }
856  if (iyUp < upperYArray[i]) { iyUp = upperYArray[i]; }
857  }
858 
859 
860  //cout << "Scanning from x= " << ixLo << " to " <<ixUp <<" and y= "<<iyLo<< " to " << iyUp << endl;
861 
862  // loop over all pads of interest.
863  fPixelChargeShort.clear();
864  Int_t ix, iy;
865 
866 
867  for (ix = ixLo; ix < ixUp + 1; ix++) {
868 
869  for (iy = iyLo; iy < iyUp + 1; iy++) {
870 
871  //calculate the position of the current pixel in the lab-system
872 
873  Double_t Current[3];
874  fSensor->PixelToLocal(ix, iy, Current);
875  pixel = 0; //decouple pixel-pointer from previous pixel
876  //loop over segments, check if the pad received some charge
877 
878  for (Int_t i = 0; i < fNumberOfSegments; ++i) {
879  // cout << endl << "check segment nr. " << i << " from " << fNumberOfSegments << endl;
880  // ignore pads, which are out of reach for this segments
881  if (ix < lowerXArray[i]) { continue; }
882  if (iy < lowerYArray[i]) { continue; }
883  if (ix > upperXArray[i]) { continue; }
884  if (iy > upperYArray[i]) { continue; }
885 
886  // cout << endl << "found vallied pad " << i << endl;
887  sPoint = &fSignalPoints[i];
888 
889  xCentre = sPoint->x; //of segment
890  yCentre = sPoint->y; // idem
891  sigmaX = sPoint->sigmaX;
892  sigmaY = sPoint->sigmaY;
893 
894  fCurrentTotalCharge += sPoint->charge;
895 
896  //compute the charge distributed to this pixel by this segment
897  Float_t totCharge =
898  (sPoint->charge * fLorentzNorm * (0.5 * fPar0 * fPar1 / TMath::Pi())
899  / TMath::Max(1.e-10,
900  (((Current[0] - xCentre) * (Current[0] - xCentre))
901  + ((Current[1] - yCentre) * (Current[1] - yCentre)))
903  + 0.25 * fPar1 * fPar1)
904  + fPar2);
905 
906  if (totCharge < 1) {
907 
908  // cout << endl << "charge is " << totCharge << " < 1 electron thus charge is negligible" << endl;
909  continue;
910  } //ignore negligible charge (< 1 electron)
911  if (!pixel) {
912  // cout << endl << "charge is " << totCharge << " > 1 electron thus pixel is firred at "<< ix << " " << iy << endl;
913  // Look for pixel in charge map if not yet linked.
914  thispoint = std::make_pair(ix, iy);
915  // cout << endl << "creat pair at "<< ix << " " << iy << endl;
916  fChargeMapIt = fChargeMap.find(thispoint);
917  // cout << endl << "found pair at "<< ix << " " << iy << endl;
918  // cout << endl << "Map size is now " << fChargeMap.size() << endl;
919  // Pixel not yet in map -> Add new pixel
920  if (fChargeMapIt == fChargeMap.end()) {
921  pixel = new ((*fPixelCharge)[fPixelCharge->GetEntriesFast()])
922  CbmMvdPixelCharge(totCharge,
923  ix,
924  iy,
925  point->GetPointId(),
926  point->GetTrackID(),
927  (point->GetX() + point->GetXOut()) / 2,
928  (point->GetY() + point->GetXOut()) / 2,
929  point->GetTime(),
930  point->GetFrame());
931  //cout << endl << "new charched pixel with charge " << totCharge << " at " << ix << " " << iy << endl;
932  // fPixelChargeShort.push_back(pixel);
933  // cout << endl << "added pixel to ChargeShort vector " << endl;
934 
935  fChargeMap[thispoint] = pixel;
936 
937  }
938 
939  // Pixel already in map -> Add charge
940  else {
941  pixel = fChargeMapIt->second;
942  //if ( ! pixel ) Fatal("AddChargeToPixel", "Zero pointer in charge map!");
943  pixel->AddCharge(totCharge);
944  // if(pixel->GetCharge()>150)
945  // {cout << endl << "added charge to pixel summing up to "<< pixel->GetCharge() << endl;}
946  }
947  fPixelChargeShort.push_back(pixel);
948  } else { //pixel already linked => add charge only
949  pixel->AddCharge(totCharge);
950  // cout<<"put charge" << endl;
951  }
952 
953 
954  if (fShowDebugHistos) {
955  xCharge = xCharge + Current[0] * totCharge;
956  yCharge = yCharge + Current[1] * totCharge;
957  totClusterCharge = totClusterCharge + totCharge;
958  } // end if
959  } // end for (track segments)
960 
961 
962  } //for y
963  } // for x
964  // cout << endl << "End of loops " << endl;
965  std::vector<CbmMvdPixelCharge*>::size_type vectorSize =
966  fPixelChargeShort.size();
967 
968  for (ULong64_t f = 0; f < vectorSize; f++) {
969  CbmMvdPixelCharge* pixelCharge = fPixelChargeShort.at(f);
970  if (pixelCharge) {
971  pixelCharge->DigestCharge(
972  ((float) (point->GetX() + point->GetXOut()) / 2),
973  ((float) (point->GetY() + point->GetYOut()) / 2),
974  point->GetPointId(),
975  point->GetTrackID());
976  } else {
977  cout << endl << "Warning working on broken pixel " << endl;
978  }
979  }
980 
981 
982  if (fShowDebugHistos) {
983  //cout << endl << "produced " << fPixelChargeShort.size() << " Digis with total charge of " << totClusterCharge << endl;
984  TVector3 momentum, position;
985  if (totClusterCharge > 0) fTotalChargeHisto->Fill(totClusterCharge);
986  point->Position(position);
987  point->Momentum(momentum);
988  fPosXY->Fill(position.X(), position.Y());
989  fpZ->Fill(momentum.Z());
990  fPosXinIOut->Fill(point->GetZ() - point->GetZOut());
991  fAngle->Fill(TMath::ATan(momentum.Pt() / momentum.Pz()) * 180
992  / TMath::Pi());
993  }
994 
995  delete[] lowerXArray;
996  delete[] upperXArray;
997  delete[] lowerYArray;
998  delete[] upperYArray;
999 
1000 
1001 } //end of function
1002 
1003 
1004 // -------------------------------------------------------------------------
1005 
1007  Int_t fmaxNoise = 100;
1008  Int_t noiseHits = (Int_t)(frand->Rndm(fmaxNoise) * fmaxNoise);
1009  Int_t xPix, yPix;
1010  CbmMvdPixelCharge* pixel;
1011  pair<Int_t, Int_t> thispoint;
1012 
1013  for (Int_t i = 0; i <= noiseHits; i++) {
1014  xPix = frand->Integer(fNPixelsX);
1015  yPix = frand->Integer(fNPixelsY);
1016 
1017  Double_t Current[3];
1018  fSensor->PixelToLocal(xPix, yPix, Current);
1019 
1020  thispoint = std::make_pair(xPix, yPix);
1021 
1022  fChargeMapIt = fChargeMap.find(thispoint);
1023 
1024  if (fChargeMapIt == fChargeMap.end()) {
1025  pixel = new ((*fPixelCharge)[fPixelCharge->GetEntriesFast()])
1026  CbmMvdPixelCharge(1000, xPix, yPix, 0, -4, Current[0], Current[1]);
1027  pixel->DigestCharge(Current[0], Current[1], 0, -4);
1028  fChargeMap[thispoint] = pixel;
1029  } else {
1030  pixel = fChargeMapIt->second;
1031  pixel->AddCharge(1000);
1032  pixel->DigestCharge(Current[0], Current[1], 0, -4);
1033  }
1034  }
1035 }
1036 // -------------------------------------------------------------------------
1037 
1038 // -------------------------------------------------------------------------
1039 
1040 
1041 // ----- Virtual private method SetParContainers -----------------------
1043  // FairRunAna* ana = FairRunAna::Instance();
1044  // FairRuntimeDb* rtdb = ana->GetRuntimeDb();
1045 }
1046 // -------------------------------------------------------------------------
1047 
1048 
1049 // ----- Virtual private method Init ----------------------------------
1051 
1052  //Read information on the sensor von data base
1053  fSensor = mySensor;
1054 
1055  // cout << "-I- " << GetName() << ": Initialisation of sensor " << fSensor->GetName() << endl;
1056 
1057  fDigis = new TClonesArray("CbmMvdDigi", 10000);
1058  fDigiMatch = new TClonesArray("CbmMatch", 10000);
1059 
1060  fOutputBuffer = new TClonesArray("CbmMvdDigi", 10000);
1061  fInputPoints = new TClonesArray("CbmMvdPoint", 10000);
1062 
1063  if (!fSensor) {
1064  Fatal(GetName(),
1065  "Fatal error: Init(CbmMvdSensor*) called without valid pointer, "
1066  "don't know how to proceed.");
1067  };
1068 
1070 
1071  // Initialize histogramms used for debugging
1072 
1073  if (fShowDebugHistos) {
1074  cout << endl << "Show debug histos in this Plugin" << endl;
1076  new TH1F("TestHisto", "TestHisto", 1000, 0, 12000);
1078  new TH1F("DigiResolutionX", "DigiResolutionX", 1000, -.005, .005);
1080  new TH1F("DigiResolutionY", "DigiResolutionY", 1000, -.005, .005);
1081  fPosXY = new TH2F("DigiPointXY", "DigiPointXY", 100, -6, 6, 100, -6, 6);
1082  fpZ = new TH1F("DigiPointPZ", "DigiPointPZ", 1000, -0.5, 0.5);
1083  fPosXinIOut = new TH1F("DigiZInOut", "Digi Z InOut", 1000, -0.04, 0.04);
1084  fAngle = new TH1F("DigiAngle", "DigiAngle", 1000, 0, 90);
1086  new TH1F("SegmentResolutionX", "SegmentResolutionX", 1000, -.005, .005);
1088  new TH1F("SegmentResolutionY", "SegmentResolutionY", 1000, -.005, .005);
1090  new TH1F("SegmentResolutionZ", "SegmentResolutionZ", 1000, -.005, .005);
1092  new TH1F("TotalChargeHisto", "TotalChargeHisto", 1000, 0, 12000);
1093  fTotalSegmentChargeHisto = new TH1F(
1094  "TotalSegmentChargeHisto", "TotalSegmentChargeHisto", 1000, 0, 12000);
1095  }
1096 
1102  fPreviousPlugin = NULL;
1103  initialized = kTRUE;
1104 }
1105 // -------------------------------------------------------------------------
1106 
1107 
1108 // ----- Virtual public method Reinit ----------------------------------
1110 
1111  delete fOutputBuffer;
1112 
1113  InitTask(sensor);
1114 }
1115 // -------------------------------------------------------------------------
1116 
1117 
1118 // ----- Virtual method Finish -----------------------------------------
1120 
1121 
1122  // PrintParameters();
1123 
1124 
1125  if (fShowDebugHistos) {
1126  TCanvas* c = new TCanvas("DigiCanvas", "DigiCanvas", 150, 10, 800, 600);
1127  c->Divide(3, 3);
1128  c->cd(1);
1129  fResolutionHistoX->Draw();
1130  fResolutionHistoX->Write();
1131  c->cd(2);
1132  fResolutionHistoY->Draw();
1133  fResolutionHistoY->Write();
1134  c->cd(3);
1135  fPosXY->Draw();
1136  fPosXY->Write();
1137  c->cd(4);
1138  fpZ->Draw();
1139  fpZ->Write();
1140  c->cd(5);
1141  fPosXinIOut->Draw();
1142  fPosXinIOut->Write();
1143  c->cd(6);
1144  fAngle->Draw();
1145  fAngle->Write();
1146  c->cd(7);
1147  //fSegResolutionHistoX->Draw();
1148  fSegResolutionHistoX->Write();
1149  fTotalSegmentChargeHisto->Draw();
1150  fTotalSegmentChargeHisto->Write();
1151  c->cd(8);
1152  fRandomGeneratorTestHisto->Draw();
1153  fRandomGeneratorTestHisto->Write();
1154 
1155  fSegResolutionHistoY->Write();
1156  c->cd(9);
1157  fTotalChargeHisto->Draw();
1158  fTotalChargeHisto->Write();
1159  cout << "-I- CbmMvdDigitizerL::Finish - Fit of the total cluster charge"
1160  << endl;
1161  fTotalChargeHisto->Fit("landau");
1162  cout << "=============================================================="
1163  << endl;
1164  // new TCanvas();
1165  //fTotalChargeHisto->Draw();
1166  };
1167 }
1168 // -------------------------------------------------------------------------
1169 
1170 
1171 // ----- Private method Reset ------------------------------------------
1173 // -------------------------------------------------------------------------
1174 
1175 
1176 // ----- Private method PrintParameters --------------------------------
1178 
1179  cout.setf(ios_base::fixed, ios_base::floatfield);
1180  cout << "============================================================"
1181  << endl;
1182  cout << "============== Parameters of the Lorentz - Digitizer ======="
1183  << endl;
1184  cout << "============================================================"
1185  << endl;
1186 
1187 
1188  cout << "Pixel Size X : " << setw(8) << setprecision(2)
1189  << fPixelSizeX * 10000. << " mum" << endl;
1190  cout << "Pixel Size Y : " << setw(8) << setprecision(2)
1191  << fPixelSizeY * 10000. << " mum" << endl;
1192  cout << "Epitaxial layer thickness : " << setw(8) << setprecision(2)
1193  << fEpiTh * 10000. << " mum" << endl;
1194  cout << "Segment Length : " << setw(8) << setprecision(2)
1195  << fSegmentLength * 10000. << " mum" << endl;
1196  cout << "Diffusion Coefficient : " << setw(8) << setprecision(2)
1197  << fDiffusionCoefficient * 10000. << " mum" << endl;
1198  cout << "Width of Cluster : " << setw(8) << setprecision(2)
1199  << fWidthOfCluster << " * sigma " << endl;
1200  cout << "ElectronsPerKeV 3.62 eV/eh : " << setw(8) << setprecision(2)
1201  << fElectronsPerKeV << endl;
1202  cout << "CutOnDeltaRays : " << setw(8) << setprecision(8)
1203  << fCutOnDeltaRays << " MeV " << endl;
1204  cout << "ChargeThreshold : " << setw(8) << setprecision(2)
1205  << fChargeThreshold << endl;
1206  cout << "Pileup: " << fNPileup << endl;
1207  cout << "Delta - Pileup: " << fNDeltaElect << endl;
1208  cout << "=============== End Parameters Digitizer ==================="
1209  << endl;
1210 }
1211 // -------------------------------------------------------------------------
1212 
1213 
CbmMvdSensorDigitizerTask::ProduceNoise
void ProduceNoise()
Definition: CbmMvdSensorDigitizerTask.cxx:1006
CbmMvdSensorDigitizerTask::fReadoutTime
Double_t fReadoutTime
Definition: CbmMvdSensorDigitizerTask.h:192
CbmMvdSensorDigitizerTask::fSegmentLength
Double_t fSegmentLength
Definition: CbmMvdSensorDigitizerTask.h:109
CbmMvdSensorTask::fSensor
CbmMvdSensor * fSensor
Definition: CbmMvdSensorTask.h:59
CbmMvdSensorPlugin::GetOutputArray
virtual TClonesArray * GetOutputArray()
Definition: CbmMvdSensorPlugin.h:41
CbmMvdPixelCharge::GetPointID
Int_t * GetPointID()
Definition: CbmMvdPixelCharge.h:48
CbmMatch
Definition: CbmMatch.h:22
CbmMvdSensor::GetZ
Double_t GetZ() const
Definition: CbmMvdSensor.h:75
CbmMvdSensorDigitizerTask::fSegResolutionHistoY
TH1F * fSegResolutionHistoY
Definition: CbmMvdSensorDigitizerTask.h:133
f
float f
Definition: L1/vectors/P4_F32vec4.h:24
CbmMvdSensorDigitizerTask::fSegResolutionHistoZ
TH1F * fSegResolutionHistoZ
Definition: CbmMvdSensorDigitizerTask.h:134
CbmMvdSensorDigitizerTask::ExecChain
void ExecChain()
Definition: CbmMvdSensorDigitizerTask.cxx:397
CbmMvdSensorDataSheet::GetPixelPitchY
virtual Double_t GetPixelPitchY()
Definition: CbmMvdSensorDataSheet.h:82
CbmMvdSensorDigitizerTask::SetParContainers
virtual void SetParContainers()
Definition: CbmMvdSensorDigitizerTask.cxx:1042
CbmMvdPoint::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMvdPoint.h:76
CbmMvdSensorDataSheet::GetLorentzPar0
virtual Double_t GetLorentzPar0()
Definition: CbmMvdSensorDataSheet.h:103
CbmMvdSensorDigitizerTask::fFanoSilicium
Double_t fFanoSilicium
Definition: CbmMvdSensorDigitizerTask.h:118
CbmMvdSensorDigitizerTask::Exec
void Exec()
Definition: CbmMvdSensorDigitizerTask.cxx:406
CbmMvdPixelCharge::GetY
Int_t GetY()
Definition: CbmMvdPixelCharge.h:43
CbmMvdSensorDigitizerTask::fRandomGeneratorTestHisto
TH1F * fRandomGeneratorTestHisto
Definition: CbmMvdSensorDigitizerTask.h:127
CbmMvdSensorDigitizerTask::fSigmaX
Double_t fSigmaX
Definition: CbmMvdSensorDigitizerTask.h:191
CbmMvdPoint::GetStationNr
Int_t GetStationNr() const
Definition: CbmMvdPoint.h:78
CbmMvdSensor::TopToLocal
void TopToLocal(Double_t *lab, Double_t *local)
Definition: CbmMvdSensor.cxx:573
CbmMvdSensorDigitizerTask::SignalPoint::z
double z
Definition: CbmMvdSensorDigitizerTask.h:236
CbmMvdSensorDigitizerTask::fLorentzA
Double_t fLorentzA
Definition: CbmMvdSensorDigitizerTask.h:142
CbmMvdSensorDigitizerTask::ProduceIonisationPoints
void ProduceIonisationPoints(CbmMvdPoint *point)
Definition: CbmMvdSensorDigitizerTask.cxx:543
CbmMvdSensorDigitizerTask::fTotalSegmentChargeHisto
TH1F * fTotalSegmentChargeHisto
Definition: CbmMvdSensorDigitizerTask.h:136
sqrt
friend F32vec4 sqrt(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:41
CbmMvdSensorDigitizerTask::fLandauGain
Double_t fLandauGain
Definition: CbmMvdSensorDigitizerTask.h:147
CbmMvdSensor::PixelToLocal
void PixelToLocal(Int_t pixelNumberX, Int_t pixelNumberY, Double_t *local)
Definition: CbmMvdSensor.cxx:603
CbmMvdSensorDigitizerTask::fResolutionHistoX
TH1F * fResolutionHistoX
Definition: CbmMvdSensorDigitizerTask.h:157
CbmMvdSensorDigitizerTask::ReInit
virtual void ReInit(CbmMvdSensor *mySensor)
Definition: CbmMvdSensorDigitizerTask.cxx:1109
CbmMvdSensorDigitizerTask::SignalPoint::eloss
double eloss
Definition: CbmMvdSensorDigitizerTask.h:240
CbmMvdSensorDigitizerTask::fSignalPoints
SignalPointVec fSignalPoints
Definition: CbmMvdSensorDigitizerTask.h:246
CbmMvdSensorDataSheet::GetLandauGain
virtual Double_t GetLandauGain()
Definition: CbmMvdSensorDataSheet.h:100
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMvdSensorDigitizerTask::fDigiMatch
TClonesArray * fDigiMatch
Definition: CbmMvdSensorDigitizerTask.h:171
CbmMvdSensorDigitizerTask::SignalPoint::y
double y
Definition: CbmMvdSensorDigitizerTask.h:235
CbmMvdSensorDigitizerTask::fSegmentDepth
Double_t fSegmentDepth
Definition: CbmMvdSensorDigitizerTask.h:121
CbmMvdSensorPlugin::fShowDebugHistos
Bool_t fShowDebugHistos
Definition: CbmMvdSensorPlugin.h:72
CbmMvdSensorDigitizerTask::fPosXY
TH2F * fPosXY
Definition: CbmMvdSensorDigitizerTask.h:128
CbmMvdSensorDigitizerTask::ReadSensorInformation
InitStatus ReadSensorInformation()
Definition: CbmMvdSensorDigitizerTask.cxx:334
CbmMvdSensorDigitizerTask::fcurrentFrameNumber
Int_t fcurrentFrameNumber
Definition: CbmMvdSensorDigitizerTask.h:106
CbmMvdSensorDigitizerTask::fEsum
Double_t fEsum
Definition: CbmMvdSensorDigitizerTask.h:120
CbmMvdSensorPlugin::fPreviousPlugin
CbmMvdSensorPlugin * fPreviousPlugin
Definition: CbmMvdSensorPlugin.h:67
CbmMvdSensorDigitizerTask::fLandauRandom
TRandom3 * fLandauRandom
Definition: CbmMvdSensorDigitizerTask.h:148
CbmMvdSensorDigitizerTask
Definition: CbmMvdSensorDigitizerTask.h:47
CbmMvdSensorDataSheet::GetEpiThickness
virtual Double_t GetEpiThickness()
Definition: CbmMvdSensorDataSheet.h:90
CbmMvdSensorDataSheet::GetNPixelsX
virtual Int_t GetNPixelsX()
Definition: CbmMvdSensorDataSheet.h:83
CbmMvdSensorTask::fOutputBuffer
TClonesArray * fOutputBuffer
Definition: CbmMvdSensorTask.h:58
CbmMvdSensorDigitizerTask::Finish
virtual void Finish()
Definition: CbmMvdSensorDigitizerTask.cxx:1119
CbmMvdSensorDigitizerTask::fChargeMapIt
std::map< std::pair< Int_t, Int_t >, CbmMvdPixelCharge * >::iterator fChargeMapIt
Definition: CbmMvdSensorDigitizerTask.h:180
CbmMvdSensorDigitizerTask::fNDeltaElect
Int_t fNDeltaElect
Definition: CbmMvdSensorDigitizerTask.h:197
CbmMvdSensorDigitizerTask::fSigmaY
Double_t fSigmaY
Definition: CbmMvdSensorDigitizerTask.h:191
CbmMvdSensorDigitizerTask::fSegResolutionHistoX
TH1F * fSegResolutionHistoX
Definition: CbmMvdSensorDigitizerTask.h:132
CbmMvdSensorDigitizerTask::fTotalChargeHisto
TH1F * fTotalChargeHisto
Definition: CbmMvdSensorDigitizerTask.h:135
CbmMvdSensorDigitizerTask::fNumberOfSegments
Int_t fNumberOfSegments
Definition: CbmMvdSensorDigitizerTask.h:160
CbmMvdSensorDigitizerTask::SetInput
void SetInput(CbmMvdPoint *point)
Definition: CbmMvdSensorDigitizerTask.cxx:389
CbmMvdSensorDigitizerTask::fPar0
Double_t fPar0
Definition: CbmMvdSensorDigitizerTask.h:151
CbmMvdSensor::LocalToPixel
void LocalToPixel(Double_t *local, Int_t &pixelNumberX, Int_t &pixelNumberY)
Definition: CbmMvdSensor.cxx:582
CbmMvdSensorTask
Definition: CbmMvdSensorTask.h:26
CbmMvdSensorDigitizerTask::fCutOnDeltaRays
Double_t fCutOnDeltaRays
Definition: CbmMvdSensorDigitizerTask.h:116
CbmMvdSensorDigitizerTask::fPixelCharge
TClonesArray * fPixelCharge
Definition: CbmMvdSensorDigitizerTask.h:167
CbmMvdPoint::GetPointId
Int_t GetPointId() const
Definition: CbmMvdPoint.h:79
CbmMvdSensorDigitizerTask::fNPixelsX
Int_t fNPixelsX
Definition: CbmMvdSensorDigitizerTask.h:164
CbmMvdSensorDigitizerTask.h
CbmMvdPixelCharge::GetNContributors
Short_t GetNContributors()
Definition: CbmMvdPixelCharge.h:45
CbmMvdSensorDigitizerTask::fCurrentTotalCharge
Double_t fCurrentTotalCharge
Definition: CbmMvdSensorDigitizerTask.h:122
CbmMvdSensorPlugin::initialized
Bool_t initialized
Definition: CbmMvdSensorPlugin.h:71
CbmMvdSensorDigitizerTask::InitTask
virtual void InitTask(CbmMvdSensor *mySensor)
Definition: CbmMvdSensorDigitizerTask.cxx:1050
CbmMvdPixelCharge::GetTime
Float_t GetTime()
Definition: CbmMvdPixelCharge.h:52
CbmMvdPoint.h
CbmMvdSensor
Definition: CbmMvdSensor.h:40
CbmMvdPixelCharge::GetPointWeight
Float_t * GetPointWeight()
Definition: CbmMvdPixelCharge.h:51
CbmMvdPoint
Definition: CbmMvdPoint.h:28
CbmMvdSensorDigitizerTask::fDiffusionCoefficient
Double_t fDiffusionCoefficient
Definition: CbmMvdSensorDigitizerTask.h:111
CbmMvdSensorDigitizerTask::Reset
void Reset()
Definition: CbmMvdSensorDigitizerTask.cxx:1172
CbmMvdPixelCharge
Definition: CbmMvdPixelCharge.h:14
d
double d
Definition: P4_F64vec2.h:24
CbmMvdSensorDigitizerTask::fPixelSizeY
Double_t fPixelSizeY
Definition: CbmMvdSensorDigitizerTask.h:115
CbmMvdSensorDigitizerTask::SignalPoint
Definition: CbmMvdSensorDigitizerTask.h:233
CbmMvdSensorDigitizerTask::fLorentzNorm
Double_t fLorentzNorm
Definition: CbmMvdSensorDigitizerTask.h:143
CbmMvdSensorDataSheet::GetChargeThreshold
virtual Double_t GetChargeThreshold()
Definition: CbmMvdSensorDataSheet.h:114
CbmMvdSensorDigitizerTask::CbmMvdSensorDigitizerTask
CbmMvdSensorDigitizerTask()
Definition: CbmMvdSensorDigitizerTask.cxx:57
CbmMatch::AddLink
void AddLink(const CbmLink &newLink)
Definition: CbmMatch.cxx:42
CbmMvdSensorDigitizerTask::fLandauMPV
Double_t fLandauMPV
Definition: CbmMvdSensorDigitizerTask.h:145
CbmMvdSensorDigitizerTask::fChargeThreshold
Float_t fChargeThreshold
Definition: CbmMvdSensorDigitizerTask.h:117
CbmMvdPoint::GetFrame
Int_t GetFrame() const
Definition: CbmMvdPoint.h:85
CbmMvdSensorPlugin::GetName
virtual const char * GetName() const
Definition: CbmMvdSensorPlugin.h:62
CbmMvdPixelCharge::GetX
Int_t GetX()
Definition: CbmMvdPixelCharge.h:42
CbmMvdSensorDigitizerTask::fPileupManager
CbmMvdPileupManager * fPileupManager
Definition: CbmMvdSensorDigitizerTask.h:217
CbmMvdSensor::GetX
Double_t GetX() const
Definition: CbmMvdSensor.h:69
CbmMvdSensorDigitizerTask::fCurrentParticleMomentum
Double_t fCurrentParticleMomentum
Definition: CbmMvdSensorDigitizerTask.h:124
CbmMvdPixelCharge::GetTrackID
Int_t * GetTrackID()
Definition: CbmMvdPixelCharge.h:47
CbmMvdSensorDataSheet::GetPixelPitchX
virtual Double_t GetPixelPitchX()
Definition: CbmMvdSensorDataSheet.h:81
CbmMvdSensorDigitizerTask::fDigis
TClonesArray * fDigis
Definition: CbmMvdSensorDigitizerTask.h:169
CbmMvdSensorDigitizerTask::~CbmMvdSensorDigitizerTask
virtual ~CbmMvdSensorDigitizerTask()
Definition: CbmMvdSensorDigitizerTask.cxx:317
CbmMvdPixelCharge::GetFrame
Int_t GetFrame()
Definition: CbmMvdPixelCharge.h:53
CbmMvdSensorDigitizerTask::fpZ
TH1F * fpZ
Definition: CbmMvdSensorDigitizerTask.h:129
CbmMvdPixelCharge::GetCharge
Float_t GetCharge()
Definition: CbmMvdPixelCharge.h:41
CbmMvdSensorDigitizerTask::ProducePixelCharge
void ProducePixelCharge(CbmMvdPoint *point)
Definition: CbmMvdSensorDigitizerTask.cxx:770
CbmMvdSensorDigitizerTask::fNPileup
Int_t fNPileup
Definition: CbmMvdSensorDigitizerTask.h:196
CbmMvdSensorDigitizerTask::frand
TRandom3 * frand
Definition: CbmMvdSensorDigitizerTask.h:173
xMath::Pi
double Pi()
Definition: xMath.h:5
CbmMvdSensorDigitizerTask::fPosXinIOut
TH1F * fPosXinIOut
Definition: CbmMvdSensorDigitizerTask.h:130
CbmMvdSensor::GetDZ
Double_t GetDZ() const
Definition: CbmMvdSensor.h:68
CbmMvdSensorDigitizerTask::fproduceNoise
Bool_t fproduceNoise
Definition: CbmMvdSensorDigitizerTask.h:174
CbmMvdPoint::GetZOut
Double_t GetZOut() const
Definition: CbmMvdPoint.h:72
CbmMvdSensorDigitizerTask::fLorentzW
Double_t fLorentzW
Definition: CbmMvdSensorDigitizerTask.h:141
CbmMvdSensorDigitizerTask::SetInputArray
void SetInputArray(TClonesArray *inputStream)
Definition: CbmMvdSensorDigitizerTask.cxx:376
CbmMvdSensorDigitizerTask::fResolutionHistoY
TH1F * fResolutionHistoY
Definition: CbmMvdSensorDigitizerTask.h:158
CbmMvdSensorDigitizerTask::fPar2
Double_t fPar2
Definition: CbmMvdSensorDigitizerTask.h:153
CbmMvdSensorDataSheet::GetLandauMPV
virtual Double_t GetLandauMPV()
Definition: CbmMvdSensorDataSheet.h:94
CbmMvdSensorDigitizerTask::fElectronsPerKeV
Double_t fElectronsPerKeV
Definition: CbmMvdSensorDigitizerTask.h:112
CbmMvdSensorDigitizerTask::fWidthOfCluster
Double_t fWidthOfCluster
Definition: CbmMvdSensorDigitizerTask.h:113
CbmMvdSensorDigitizerTask::fChargeMap
std::map< std::pair< Int_t, Int_t >, CbmMvdPixelCharge * > fChargeMap
Definition: CbmMvdSensorDigitizerTask.h:179
CbmMvdSensorDigitizerTask::fPixelSize
Double_t fPixelSize
Definition: CbmMvdSensorDigitizerTask.h:150
CbmMvdSensor::GetDataSheet
CbmMvdSensorDataSheet * GetDataSheet()
Definition: CbmMvdSensor.h:83
CbmMvdSensorDigitizerTask::fAngle
TH1F * fAngle
Definition: CbmMvdSensorDigitizerTask.h:131
CbmMvdSensorDigitizerTask::fPar1
Double_t fPar1
Definition: CbmMvdSensorDigitizerTask.h:152
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMvdPoint::GetXOut
Double_t GetXOut() const
Definition: CbmMvdPoint.h:70
CbmMvdSensorDigitizerTask::fPixelChargeShort
std::vector< CbmMvdPixelCharge * > fPixelChargeShort
Definition: CbmMvdSensorDigitizerTask.h:176
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMvdPileupManager.h
CbmMvdPoint::GetYOut
Double_t GetYOut() const
Definition: CbmMvdPoint.h:71
CbmMvdDigi
Definition: CbmMvdDigi.h:21
CbmMvdSensorDigitizerTask::GetEventInfo
void GetEventInfo(Int_t &inputNr, Int_t &eventNr, Double_t &eventTime)
Definition: CbmMvdSensorDigitizerTask.cxx:518
CbmMvdSensorDigitizerTask::fLorentzXc
Double_t fLorentzXc
Definition: CbmMvdSensorDigitizerTask.h:140
CbmMvdSensorDigitizerTask::PrintParameters
void PrintParameters()
Definition: CbmMvdSensorDigitizerTask.cxx:1177
CbmMvdSensorDigitizerTask::fEvent
Int_t fEvent
Definition: CbmMvdSensorDigitizerTask.h:162
CbmMvdSensorDigitizerTask::fEpiTh
Double_t fEpiTh
Definition: CbmMvdSensorDigitizerTask.h:108
CbmMvdPixelCharge::DigestCharge
void DigestCharge(Float_t pointX, Float_t pointY, Int_t PointId, Int_t trackId)
Definition: CbmMvdPixelCharge.cxx:101
CbmMvdSensor::GetSensorNr
Int_t GetSensorNr() const
Definition: CbmMvdSensor.h:64
CbmMvdSensorDigitizerTask::SignalPoint::charge
double charge
Definition: CbmMvdSensorDigitizerTask.h:239
CbmMvdSensorDigitizerTask::fInputPoints
TClonesArray * fInputPoints
Definition: CbmMvdSensorDigitizerTask.h:206
CbmMvdSensorDigitizerTask::fPixelSizeX
Double_t fPixelSizeX
Definition: CbmMvdSensorDigitizerTask.h:114
CbmMvdSensor::GetY
Double_t GetY() const
Definition: CbmMvdSensor.h:72
ClassImp
ClassImp(CbmMvdSensorDigitizerTask)
CbmMvdSensorDataSheet::GetNPixelsY
virtual Int_t GetNPixelsY()
Definition: CbmMvdSensorDataSheet.h:84
CbmMvdSensorDigitizerTask::fRandGen
TRandom3 fRandGen
Definition: CbmMvdSensorDigitizerTask.h:212
CbmMvdSensorDigitizerTask::fTime
Double_t fTime
Definition: CbmMvdSensorDigitizerTask.h:229
CbmMvdSensorDigitizerTask::SignalPoint::sigmaY
double sigmaY
Definition: CbmMvdSensorDigitizerTask.h:238
CbmMvdSensorDataSheet::GetLandauSigma
virtual Double_t GetLandauSigma()
Definition: CbmMvdSensorDataSheet.h:97
CbmMvdSensorDigitizerTask::fDeltaManager
CbmMvdPileupManager * fDeltaManager
Definition: CbmMvdSensorDigitizerTask.h:218
CbmMvdSensorDigitizerTask::fLorentzY0
Double_t fLorentzY0
Definition: CbmMvdSensorDigitizerTask.h:139
CbmMvdSensorDigitizerTask::SignalPoint::sigmaX
double sigmaX
Definition: CbmMvdSensorDigitizerTask.h:237
CbmMvdSensorDigitizerTask::fCurrentParticleMass
Double_t fCurrentParticleMass
Definition: CbmMvdSensorDigitizerTask.h:123
CbmMvdSensorDigitizerTask::fNPixelsY
Int_t fNPixelsY
Definition: CbmMvdSensorDigitizerTask.h:165
CbmMvdPixelCharge::AddCharge
void AddCharge(Float_t charge)
Definition: CbmMvdPixelCharge.h:38
CbmMvdSensorDataSheet
Definition: CbmMvdSensorDataSheet.h:22
CbmMvdSensorDataSheet::GetLorentzPar1
virtual Double_t GetLorentzPar1()
Definition: CbmMvdSensorDataSheet.h:106
CbmMvdSensorDigitizerTask::fPixelScanAccelerator
TObjArray * fPixelScanAccelerator
Definition: CbmMvdSensorDigitizerTask.h:178
CbmMvdSensorDigitizerTask::fLandauSigma
Double_t fLandauSigma
Definition: CbmMvdSensorDigitizerTask.h:146
CbmMvdSensorDataSheet::GetLorentzPar2
virtual Double_t GetLorentzPar2()
Definition: CbmMvdSensorDataSheet.h:109
CbmMvdSensorDigitizerTask::fCompression
Double_t fCompression
Definition: CbmMvdSensorDigitizerTask.h:155
CbmMvdSensorDigitizerTask::SignalPoint::x
double x
Definition: CbmMvdSensorDigitizerTask.h:234