BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmStsRealMatchHits.cxx
Go to the documentation of this file.
1//* $Id: */
2
3// -------------------------------------------------------------------------
4// ----- CbmStsRealMatchHits source file -----
5// ----- Created 01/07/2008 by R. Karabowicz -----
6// -------------------------------------------------------------------------
7
8// --- Includes from ROOT
9#include "TClonesArray.h"
10
11// --- Includes from base
12#include "FairRootManager.h"
13#include "FairRunAna.h"
14#include "FairRuntimeDb.h"
15
16// --- Includes from STS
17#include "CbmGeoStsPar.h"
18#include "CbmStsDigiMatch.h"
19#include "CbmStsDigiPar.h"
20#include "CbmStsDigiScheme.h"
21#include "CbmStsHit.h"
22#include "CbmStsPoint.h"
23#include "CbmStsRealMatchHits.h"
24#include "CbmStsSector.h"
25#include "CbmStsStation.h"
26#include "FairGeoNode.h"
27#include "FairGeoPassivePar.h"
28#include "FairGeoVector.h"
29#include "TMath.h"
30
31#include <iomanip>
32#include <iostream>
33#include <map>
34
35using std::cout;
36using std::endl;
37using std::fixed;
38using std::left;
39using std::map;
40using std::right;
41using std::setprecision;
42using std::setw;
43
44// ----- Default constructor -------------------------------------------
46 : FairTask("STSMatchHits", 1)
47{
48 fPassGeo = NULL;
49 fGeoPar = NULL;
50 fDigiPar = NULL;
51 fPoints = NULL;
52 fDigis = NULL;
53 fDigiMatches = NULL;
54 fHits = NULL;
57}
58// -------------------------------------------------------------------------
59
60// ----- Standard constructor ------------------------------------------
62 : FairTask("STSMatchHits", iVerbose)
63{
64 fPassGeo = NULL;
65 fGeoPar = NULL;
66 fDigiPar = NULL;
67 fPoints = NULL;
68 fDigis = NULL;
69 fDigiMatches = NULL;
70 fHits = NULL;
73}
74// -------------------------------------------------------------------------
75
76// ----- Constructor with name -----------------------------------------
78 : FairTask(name, iVerbose)
79{
80 fPassGeo = NULL;
81 fGeoPar = NULL;
82 fDigiPar = NULL;
83 fPoints = NULL;
84 fDigis = NULL;
85 fDigiMatches = NULL;
86 fHits = NULL;
89}
90// -------------------------------------------------------------------------
91
92// ----- Destructor ----------------------------------------------------
94{
95 if (fPassGeo)
96 delete fPassGeo;
97 if (fGeoPar)
98 delete fGeoPar;
99 if (fDigiPar)
100 delete fDigiPar;
101 if (fDigiScheme)
102 delete fDigiScheme;
103}
104// -------------------------------------------------------------------------
105
106// ----- Public method Exec --------------------------------------------
108{
109
110 if (fRealistic) {
111 ExecReal(opt);
112 return;
113 }
114
115 // Timer
116 fTimer.Start();
117 Bool_t warn = kFALSE;
118
119 // Counters
120 Int_t nHits = fHits->GetEntriesFast();
121 Int_t nNoDigi = 0;
122 Int_t nBackgrd = 0;
123 Int_t nDistant = 0;
124 Int_t nMatched = 0;
125
126 // Loop over all StsHits
127 for (Int_t iHit = 0; iHit < nHits; iHit++) {
128 CbmStsHit* hit = (CbmStsHit*)fHits->At(iHit);
129 if (!hit) {
130 cout << "-W- " << GetName() << "::Exec: Empty hit at index " << iHit << endl;
131 warn = kTRUE;
132 continue;
133 }
134
135 // Determine sector type and channel numbers
136 Int_t iStation = hit->GetStationNr();
137 Int_t iSector = hit->GetSectorNr();
138 CbmStsStation* station = fDigiScheme->GetStationByNr(iStation);
139 CbmStsSector* sector = fDigiScheme->GetSector(iStation, iSector);
140 Int_t iType = sector->GetType();
141 CbmStsDigiMatch* dMatchF = NULL;
142 CbmStsDigiMatch* dMatchB = NULL;
143
144 // Hit coordinates and errors
145 Double_t xH = hit->GetX();
146 Double_t yH = hit->GetY();
147 Double_t dX = hit->GetDx();
148 Double_t dY = hit->GetDy();
149
150 // Get front side DigiMatch corresponding to hit
151 Int_t iMatchF = (Int_t)hit->GetDigi(0);
152 if (iMatchF >= 0)
153 dMatchF = (CbmStsDigiMatch*)fDigiMatches->At(iMatchF);
154 if (!dMatchF) {
155 cout << "-E- " << GetName() << "::Exec: "
156 << "No DigiMatchF for hit " << iHit << endl;
157 hit->SetRefIndex(-1);
158 nNoDigi++;
159 warn = kTRUE;
160 continue;
161 }
162
163 // Get back side DigiMatch of hit (for strip sensors only)
164 if (iType != 1) {
165 Int_t iMatchB = (Int_t)hit->GetDigi(1);
166 if (iMatchB >= 0)
167 dMatchB = (CbmStsDigiMatch*)fDigiMatches->At(iMatchB);
168 if (!dMatchB) {
169 cout << "-E- " << GetName() << "::Exec: "
170 << "No DigiMatchB for hit " << iHit << endl;
171 hit->SetRefIndex(-1);
172 nNoDigi++;
173 warn = kTRUE;
174 continue;
175 }
176 }
177
178 // Map candidate points to distance to hit
179 fCandMap.clear();
180 Int_t nPointsF = 0;
181 Int_t nPointsB = 0;
182
183 if (iType == 1) {
184 // Case pixel: Candidates are all points of the digi.
185 for (Int_t iMatchF = 0; iMatchF < 3; iMatchF++) {
186 Int_t iPointF = dMatchF->GetRefIndex(iMatchF);
187 if (iPointF < 0)
188 continue;
189 nPointsF++;
190 // Calculate distance to hit
191 CbmStsPoint* point = (CbmStsPoint*)fPoints->At(iPointF);
192 if (!point) {
193 cout << "-E- " << GetName() << "::Exec: "
194 << "No StsPoint (" << iPointF << ") for pixel hit " << iHit << endl;
195 warn = kTRUE;
196 continue;
197 }
198 // point coordinates in station midplane
199 Double_t xP = point->GetX(station->GetZ());
200 Double_t yP = point->GetY(station->GetZ());
201 Double_t dist = TMath::Sqrt((xP - xH) * (xP - xH) + (yP - yH) * (yP - yH));
202 // cout << "candidate dist = " << dist << endl;
203 fCandMap[dist] = iPointF;
204 } // front digi loop
205 } // pixel sensor
206
207 else if (iType == 2 || iType == 3)
208 {
209 // Case strip: Candidates are points corresponding to front
210 // and back side digis
211 for (Int_t iMatchF = 0; iMatchF < 3; iMatchF++) {
212 Int_t iPointF = dMatchF->GetRefIndex(iMatchF);
213 if (iPointF < 0)
214 continue;
215 // cout << " got pointf index = " << iPointF << endl;
216 nPointsF++;
217 for (Int_t iMatchB = 0; iMatchB < 3; iMatchB++) {
218 Int_t iPointB = dMatchB->GetRefIndex(iMatchB);
219 if (iPointB < 0)
220 continue;
221 // cout << " got pointb index = " << iPointB << endl;
222 if (iMatchF == 0)
223 nPointsB++;
224 if (iPointB != iPointF)
225 continue; // chance combination
226 // Calculate distance to hit
227 CbmStsPoint* point = (CbmStsPoint*)fPoints->At(iPointF);
228 if (!point) {
229 cout << "-E- " << GetName() << "::Exec: "
230 << "No StsPoint (" << iPointF << ") for strip hit " << iHit << endl;
231 warn = kTRUE;
232 continue;
233 }
234 // point coordinates in station midplane
235 Double_t xP = point->GetX(station->GetZ());
236 Double_t yP = point->GetY(station->GetZ());
237 Double_t dist = TMath::Sqrt((xP - xH) * (xP - xH) + (yP - yH) * (yP - yH));
238 fCandMap[dist] = iPointF;
239 } // back digi loop
240 } // front digi loop
241 } // strip sensor
242
243 else
244 {
245 // Unknown sensor type
246 cout << "-E- " << GetName() << "::Exec: Unknwon sensor type " << iType << endl;
247 Fatal("Exec", "Unknwon sensor type");
248 }
249
250 if (fVerbose > 1)
251 cout << "-I- " << GetName() << ": Hit " << iHit << ", type " << iType << ", points " << nPointsF << " / "
252 << nPointsB << ", candidates " << fCandMap.size();
253
254 // Check for at least one candidate point. Else background hit.
255 // This can happen for noise digis or for fake combinations
256 // of strip digis.
257 if (fCandMap.empty()) {
258 hit->SetRefIndex(-1);
259 if (fVerbose > 1)
260 cout << ", background " << endl;
261 nBackgrd++;
262 continue;
263 }
264
265 // Select closest point from candidates.
266 Double_t distMin = 999999.;
267 Int_t iPoint = -1;
268 for (fIter = fCandMap.begin(); fIter != fCandMap.end(); fIter++) {
269 if ((*fIter).first < distMin) {
270 distMin = (*fIter).first;
271 iPoint = (*fIter).second;
272 }
273 }
274 if (iPoint < 0) {
275 cout << "-E- " << GetName() << "::Exec: "
276 << "No closest point found in candidate map!" << endl;
277 Fatal("Exec", "No closest point");
278 }
279 CbmStsPoint* point = (CbmStsPoint*)fPoints->At(iPoint);
280 if (fVerbose > 1)
281 cout << ", matched to " << iPoint << ", distance " << distMin << " cm";
282
283 // Check whether closest point is more than 5 sigma away from hit.
284 // This should not happen in case of pixel or strip OSU sensors,
285 // but can happen for strip GSI sensors due to multiple
286 // crossings of front and back side strips.
287 Double_t xP = point->GetX(station->GetZ());
288 Double_t yP = point->GetY(station->GetZ());
289 if (TMath::Abs(xP - xH) > 5. * dX || TMath::Abs(yP - yH) > 5. * dY) {
290 hit->SetRefIndex(-2);
291 nDistant++;
292 if (fVerbose > 1)
293 cout << ", distant" << endl;
294 if (iType == 1 || iType == 2) {
295 cout << "-W- " << fName << "::Exec: "
296 << "Distant hit in pixel / strip MSU station" << endl;
297 cout << "Hit " << iHit << " coordinates " << xH << ", " << yH << endl;
298 cout << "Matched point " << iPoint << ", distance " << distMin << endl;
299 cout << "Distance y " << TMath::Abs(xP - xH) << " Error " << dX << endl;
300 cout << "Distance y " << TMath::Abs(yP - yH) << " Error " << dY << endl;
301 }
302
303 continue;
304 }
305
306 // Match closest StsPoint to hit
307 hit->SetRefIndex(iPoint);
308 nMatched++;
309 if (fVerbose > 1)
310 cout << ", good match" << endl;
311
312 // Check whether hit and point are in the same station.
313 // Else something has really gone wrong.
314 if (TMath::Abs(hit->GetZ() - point->GetZ()) > 1.) {
315 cout << "-E- " << GetName() << "::Exec: Hit " << iHit << " is at z = " << hit->GetZ()
316 << " cm, but matched point " << iPoint << " is at z = " << point->GetZ() << "cm " << endl;
317 Fatal("Exec", "Different stations for hit and point");
318 }
319
320 } // Loop over StsHits
321
322 // Event statistics
323 fTimer.Stop();
324 if (warn)
325 cout << "- ";
326 else
327 cout << "+ ";
328 cout << setw(15) << left << fName << ": " << setprecision(4) << setw(8) << fixed << right << fTimer.RealTime()
329 << " s, hits " << nHits << ", matched " << nMatched << ", distant " << nDistant << ", background " << setw(6)
330 << nBackgrd << endl;
331
332 // Run statistics
333 if (warn)
335 else {
336 fNEvents++;
337 fTime += fTimer.RealTime();
338 fNHits += Double_t(nHits);
339 fNMatched += Double_t(nMatched);
340 fNDistant += Double_t(nDistant);
341 fNBackgrd += Double_t(nBackgrd);
342 }
343}
344
345// -------------------------------------------------------------------------
346
347// ----- Public method ExecReal --------------------------------------------
349{
350
351 // Timer
352 fTimer.Start();
353 Bool_t warn = kFALSE;
354
355 // Counters
356 Int_t nHits = fHits->GetEntriesFast();
357 Int_t nNoDigi = 0;
358 Int_t nBackgrd = 0;
359 Int_t nDistant = 0;
360 Int_t nMatched = 0;
361
362 Int_t nofStsHits = fHits->GetEntriesFast();
363 Int_t nofStsPoints = fPoints->GetEntriesFast();
364 cout << "there are " << nofStsPoints << " points and " << nofStsHits << " hits." << endl;
365 Int_t hitStationLimits[2][100];
366
367 for (Int_t ist = 0; ist < fNStations; ist++) {
368 hitStationLimits[0][ist] = -1;
369 hitStationLimits[1][ist] = -1;
370 }
371
372 // check for limits of hit indices on different stations...
373 for (Int_t ihit = 0; ihit < nofStsHits; ihit++) {
374 CbmStsHit* stsHit = (CbmStsHit*)fHits->At(ihit);
375 stsHit->SetRefIndex(-1);
376 if (hitStationLimits[0][stsHit->GetStationNr() - 1] == -1)
377 hitStationLimits[0][stsHit->GetStationNr() - 1] = ihit;
378 CbmStsHit* stsHitBack = (CbmStsHit*)fHits->At(nofStsHits - ihit - 1);
379 if (hitStationLimits[1][stsHitBack->GetStationNr() - 1] == -1) {
380 hitStationLimits[1][stsHitBack->GetStationNr() - 1] = nofStsHits - ihit;
381 }
382 }
383 // for ( Int_t istat = 0 ; istat < fNStations ; istat++ )
384 // cout << "station " << istat << " hits from " << hitStationLimits[0][istat] << " to " <<
385 // hitStationLimits[1][istat] << endl;
386
387 for (Int_t ipnt = 0; ipnt < nofStsPoints; ipnt++) {
388 CbmStsPoint* stsPoint = (CbmStsPoint*)fPoints->At(ipnt);
389
390 Int_t startHit = hitStationLimits[0][fStationNrFromMcId[stsPoint->GetDetectorID()]];
391 Int_t finalHit = hitStationLimits[1][fStationNrFromMcId[stsPoint->GetDetectorID()]];
392
393 if (startHit == -1 && finalHit == -1)
394 continue;
395
396 for (Int_t ihit = startHit; ihit < finalHit; ihit++) {
397 CbmStsHit* stsHit = (CbmStsHit*)fHits->At(ihit);
398 if ((TMath::Abs(stsHit->GetX() - stsPoint->GetX(stsHit->GetZ())) < .01)
399 && (TMath::Abs(stsHit->GetY() - stsPoint->GetY(stsHit->GetZ())) < .04))
400 {
401 // cout << "matching "
402 // << "X: " << stsHit->GetX() << " - " << stsPoint->GetX(stsHit->GetZ())
403 // << "Y: " << stsHit->GetY() << " - " << stsPoint->GetY(stsHit->GetZ()) << endl;
404 stsHit->SetRefIndex(ipnt);
405 // cout << "setting ref index = " << stsHit->GetRefIndex() << " (max sts pnt = " << nofStsPoints << ")"
406 //<< endl;
407 nMatched++;
408 }
409 }
410 }
411
412 // Event statistics
413 fTimer.Stop();
414 if (warn)
415 cout << "- ";
416 else
417 cout << "+ ";
418 cout << setw(15) << left << fName << ": " << setprecision(4) << setw(8) << fixed << right << fTimer.RealTime()
419 << " s, hits " << nHits << ", matched " << nMatched << ", distant " << nDistant << ", background " << setw(6)
420 << nBackgrd << endl;
421
422 // Run statistics
423 if (warn)
425 else {
426 fNEvents++;
427 fTime += fTimer.RealTime();
428 fNHits += Double_t(nHits);
429 fNMatched += Double_t(nMatched);
430 fNDistant += Double_t(nDistant);
431 fNBackgrd += Double_t(nBackgrd);
432 }
433}
434// -------------------------------------------------------------------------
435
436// ----- Private method SetParContainers -------------------------------
438{
439
440 // Get run and runtime database
441 FairRunAna* run = FairRunAna::Instance();
442 if (!run)
443 Fatal("SetParContainers", "No analysis run");
444 FairRuntimeDb* db = run->GetRuntimeDb();
445 if (!db)
446 Fatal("SetParContainers", "No runtime database");
447
448 // Get STS geometry and digitisation parameter container
449 fPassGeo = (FairGeoPassivePar*)db->getContainer("FairGeoPassivePar");
450 fGeoPar = (CbmGeoStsPar*)db->getContainer("CbmGeoStsPar");
451 fDigiPar = (CbmStsDigiPar*)db->getContainer("CbmStsDigiPar");
452}
453// -------------------------------------------------------------------------
454
455// ----- Private method Init -------------------------------------------
457{
458
459 // Reset counters
462
463 // Get input arrays
464 FairRootManager* ioman = FairRootManager::Instance();
465 if (!ioman)
466 Fatal("Init", "No FairRootManager");
467 fPoints = (TClonesArray*)ioman->GetObject("StsPoint");
468 if (!fPoints) {
469 // cout << "-E- " << GetName() << "::Init: No STSPoint array!" << endl;
470 return kERROR;
471 }
472 fDigis = (TClonesArray*)ioman->GetObject("StsDigi");
473 if (!fDigis) {
474 cout << "-E- " << GetName() << "::Init: No StsDigi array!" << endl;
475 return kERROR;
476 }
477 fDigiMatches = (TClonesArray*)ioman->GetObject("StsDigiMatch");
478 if (!fDigiMatches) {
479 cout << "-E- " << GetName() << "::Init: No StsDigiMatch array!" << endl;
480 return kERROR;
481 }
482 fHits = (TClonesArray*)ioman->GetObject("StsHit");
483 if (!fHits) {
484 cout << "-E- " << GetName() << "::Init: No StsHit array!" << endl;
485 return kERROR;
486 }
487
488 InitStatus geoStatus = GetGeometry();
489 if (geoStatus != kSUCCESS) {
490 cout << "-E- " << GetName() << "::Init: Error in reading geometry!" << endl;
491 return geoStatus;
492 }
493
494 // Build digitisation scheme
495 if (fDigiScheme->Init(fGeoPar, fDigiPar)) {
496 if (fVerbose == 1 || fVerbose == 2)
497 fDigiScheme->Print(kFALSE);
498 else if (fVerbose > 2)
499 fDigiScheme->Print(kTRUE);
500 cout << "-I- " << fName << "::Init: "
501 << "STS digitisation scheme succesfully initialised" << endl;
502 cout << " Stations: " << fDigiScheme->GetNStations() << ", Sectors: " << fDigiScheme->GetNSectors()
503 << ", Channels: " << fDigiScheme->GetNChannels() << endl;
504 return kSUCCESS;
505 }
506
507 return kERROR;
508}
509// -------------------------------------------------------------------------
510
511// ----- Private method ReInit -----------------------------------------
513{
514
515 // Clear digitisation scheme
516 fDigiScheme->Clear();
517
518 // Build new digitisation scheme
519 if (fDigiScheme->Init(fGeoPar, fDigiPar))
520 return kSUCCESS;
521
522 InitStatus geoStatus = GetGeometry();
523 if (geoStatus != kSUCCESS) {
524 cout << "-E- " << GetName() << "::Init: Error in reading geometry!" << endl;
525 return geoStatus;
526 }
527
528 return kERROR;
529}
530// -------------------------------------------------------------------------
531
532// ----- Private method GetGeometry ------------------------------------
534{
535
536 // Get target geometry
537 if (!fPassGeo) {
538 cout << "-W- " << GetName() << "::GetGeometry: No passive geometry!" << endl;
539 fTargetPos.SetXYZ(0., 0., 0.);
540 return kERROR;
541 }
542 TObjArray* passNodes = fPassGeo->GetGeoPassiveNodes();
543 if (!passNodes) {
544 cout << "-W- " << GetName() << "::GetGeometry: No passive node array" << endl;
545 fTargetPos.SetXYZ(0., 0., 0.);
546 return kERROR;
547 }
548 /* FairGeoNode* target = (FairGeoNode*) passNodes->FindObject("targ");
549 if ( ! target ) {
550 cout << "-E- " << GetName() << "::GetGeometry: No target node"
551 << endl;
552 fTargetPos.SetXYZ(0., 0., 0.);
553 return kERROR;
554 }
555 FairGeoVector targetPos = target->getLabTransform()->getTranslation();
556 FairGeoVector centerPos = target->getCenterPosition().getTranslation();
557 Double_t targetX = targetPos.X() + centerPos.X();
558 Double_t targetY = targetPos.Y() + centerPos.Y();
559 Double_t targetZ = targetPos.Z() + centerPos.Z();
560 fTargetPos.SetXYZ(targetX, targetY, targetZ);*/
561
562 // Get STS geometry
563 if (!fGeoPar) {
564 cout << "-W- " << GetName() << "::GetGeometry: No passive geometry!" << endl;
565 fNStations = 0;
566 return kERROR;
567 }
568 TObjArray* stsNodes = fGeoPar->GetGeoSensitiveNodes();
569 if (!stsNodes) {
570 cout << "-E- " << GetName() << "::GetGeometry: No STS node array" << endl;
571 fNStations = 0;
572 return kERROR;
573 }
574 Int_t tempNofStations = stsNodes->GetEntries();
575
576 cout << "There are " << tempNofStations << " nodes" << (tempNofStations > 10 ? "!!!" : "") << endl;
577
578 TString geoNodeName;
579 fNStations = 0;
580 TString stationNames[100];
581 for (Int_t ist = 0; ist < tempNofStations; ist++) {
582 FairGeoNode* stsNode = (FairGeoNode*)stsNodes->At(ist);
583 if (!stsNode) {
584 cout << "-W- CbmStsDigiScheme::Init: station#" << ist << " not found among sensitive nodes " << endl;
585 continue;
586 }
587 geoNodeName = stsNode->getName();
588 // TArrayD* params = stsNode->getParameters();
589
590 Bool_t stationKnown = kFALSE;
591 // check if the node belongs to some station, save the MCId and outer radius
592 for (Int_t ikst = 0; ikst < fNStations; ikst++)
593 if (geoNodeName.Contains(stationNames[ikst])) {
594 fStationNrFromMcId[stsNode->getMCid()] = ikst;
595 stationKnown = kTRUE;
596 }
597
598 if (stationKnown)
599 continue;
600
601 // if not known, register it and save MCId
602 fStationNrFromMcId[stsNode->getMCid()] = fNStations;
603
604 // it will work only if the node name is organized as:
605 // for station name is "stsstationXX", where XX is the station number (f.e. XX=07 for station number 7)
606 // for sector name is "stsstationXXanythingHereToDistinguishDifferentSectors"
607 geoNodeName.Remove(12, geoNodeName.Length() - 12);
608 stationNames[fNStations] = geoNodeName.Data();
609 fNStations++;
610
611 cout << "station #" << fNStations << " has MCID = " << stsNode->getMCid() << " and name " << stsNode->GetName()
612 << endl;
613
614 // fStationsMCId[fNStations] = stsNode->getMCid(); // not used
615 }
616 cout << "There are " << fNStations << " stations" << endl;
617
618 return kSUCCESS;
619}
620// -------------------------------------------------------------------------
621
622// ----- Private method Finish -----------------------------------------
624{
625
626 cout << endl;
627 cout << "============================================================" << endl;
628 cout << "===== " << GetName() << ": Run summary " << endl;
629 cout << "===== " << endl;
630 cout << "===== Good events : " << setw(6) << fNEvents << endl;
631 cout << "===== Failed events : " << setw(6) << fNEventsFailed << endl;
632 cout << "===== Average time : " << setprecision(4) << setw(8) << right << fTime / Double_t(fNEvents) << " s"
633 << endl;
634 cout << "===== " << endl;
635 cout << "===== Hits per event : " << fixed << setprecision(0) << fNHits / Double_t(fNEvents) << endl;
636 cout << setprecision(2);
637 cout << "===== Matched hits : " << fixed << setw(6) << right << fNMatched / fNHits * 100. << " %" << endl;
638 cout << "===== Distant hits : " << fixed << setw(6) << right << fNDistant / fNHits * 100. << " %" << endl;
639 cout << "===== Background hits : " << fixed << setw(6) << right << fNBackgrd / fNHits * 100. << " % " << endl;
640 cout << "============================================================" << endl;
641}
642// -------------------------------------------------------------------------
vector< Double_t > dist(vector< Double_t > qp, Double_t mu)
Definition BmnMath.cxx:869
bool Bool_t
int Int_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
const char Option_t
void Fatal(const char *location, const char *msgfmt,...)
CbmStsDigiMatch.h.
Int_t GetRefIndex(Int_t i=0) const
Accessor to StsPoint indizes.
virtual Int_t GetStationNr() const
Definition CbmStsHit.h:67
Int_t GetSectorNr() const
Definition CbmStsHit.h:68
Int_t GetDigi(Int_t iSide) const
Double_t GetY(Double_t z) const
Double_t GetX(Double_t z) const
Point coordinates at given z from linear extrapolation.
Double_t fNDistant
Total number of matched hits.
Int_t fStationNrFromMcId[10000]
virtual ~CbmStsRealMatchHits()
Destructor.
CbmStsDigiPar * fDigiPar
Geometry parameter container.
FairGeoPassivePar * fPassGeo
Total number of background hits.
virtual void Exec(Option_t *opt)
Execution.
CbmStsRealMatchHits()
Default constructor.
Double_t fNHits
Total real time used for good events.
map< Double_t, Int_t > fCandMap
Map from candidate point to distance to hit.
Double_t fNMatched
Total number of hits.
TStopwatch fTimer
Array of CbmStsHit.
virtual void SetParContainers()
Get parameter containers.
TClonesArray * fPoints
Digitisation scheme.
virtual InitStatus ReInit()
Reinitialisation.
Int_t fNEventsFailed
Number of events with success.
Double_t fNBackgrd
Total number of displaced hits.
map< Double_t, Int_t >::iterator fIter
virtual void Finish()
Run summary.
Double_t fTime
Number of events with failure.
CbmStsDigiScheme * fDigiScheme
Digitisation parameter container.
TClonesArray * fDigiMatches
Array of CbmStsDigi.
TClonesArray * fDigis
Array of CbmStsPoint.
TClonesArray * fHits
Array of CbmStsDigiMatch.
virtual InitStatus Init()
Intialisation.
virtual void ExecReal(Option_t *opt)
Int_t GetType() const
Double_t GetZ(Int_t it=0)
Int_t GetEntries() const override
TObject * At(Int_t idx) const override
const char * Data() const
Double_t Sqrt(Double_t x)
Double_t Abs(Double_t d)