CbmRoot
Loading...
Searching...
No Matches
CbmKF.cxx
Go to the documentation of this file.
1/* Copyright (C) 2006-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig, Sergey Gorbunov, Denis Bertini [committer] */
4
5#include "CbmKF.h"
6
7#include "CbmDefs.h"
8#include "CbmDigiManager.h"
9#include "CbmKFFieldMath.h"
10#include "CbmKFHit.h"
11#include "CbmKFMath.h"
12#include "CbmMvdDetector.h"
13#include "CbmRecoSetupManager.h"
14#include "CbmStsSetup.h"
15#include "CbmStsStation.h"
16#include "FairBaseParSet.h"
17#include "FairField.h"
18#include "FairGeoNode.h"
19#include "FairRunAna.h"
20#include "FairRuntimeDb.h"
21#include "TGeoManager.h"
22#include "TGeoMaterial.h"
23#include "TGeoMatrix.h"
24#include "TGeoNode.h"
25#include "TGeoShape.h"
26#include "TGeoTube.h"
27#include "TGeoVolume.h"
28#include "TObjArray.h"
29#include "TString.h"
30
31#include <cmath>
32#include <iostream>
33#include <list>
34#include <map>
35#include <vector>
36
37using std::cout;
38using std::endl;
39using std::fabs;
40using std::map;
41using std::pair;
42using std::vector;
43
44
46
47 CbmKF* CbmKF::fInstance = nullptr;
48
49CbmKF::CbmKF(const char* name, Int_t iVerbose)
50 : FairTask(name, iVerbose)
51 , vMaterial()
52 ,
53
54 vMvdMaterial()
55 , vStsMaterial()
56 , vMuchMaterial()
57 , vMuchDetectors()
58 , vRichMaterial()
59 , vTrdMaterial()
60 , vTargets()
61 , vPipe()
62 ,
63
64 vPassiveTube()
65 , vPassiveWall()
66 , vPassiveBox()
67 ,
68
69 MvdStationIDMap()
70 , StsStationIDMap()
71 , TrdStationIDMap()
72 , MuchMCID2StationMap()
73 , MuchStation2MCIDMap()
74 ,
75
76 fMagneticField(nullptr)
77 , fMethod(1)
78 , fMaterialID2IndexMap()
79{
80 if (!fInstance) {
81 fInstance = this;
82 }
83}
84
85CbmKF::~CbmKF() { fInstance = nullptr; }
86
88{
89 FairRunAna* ana = FairRunAna::Instance();
90 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
91 rtdb->getContainer("FairBaseParSet");
92 rtdb->getContainer("CbmFieldPar");
93}
94
95InitStatus CbmKF::ReInit() { return Init(); }
96
97InitStatus CbmKF::Init()
98{
99 fMagneticField = nullptr;
100
101 vMvdMaterial.clear();
102 vStsMaterial.clear();
103 vTrdMaterial.clear();
104 vRichMaterial.clear();
105 vMuchMaterial.clear();
106 vMuchDetectors.clear();
107 vPipe.clear();
108 vTargets.clear();
109 vPassiveTube.clear();
110 vPassiveWall.clear();
111 vPassiveBox.clear();
112 vMaterial.clear();
113
114 StsStationIDMap.clear();
115 TrdStationIDMap.clear();
116 MvdStationIDMap.clear();
117 MuchMCID2StationMap.clear();
118 MuchStation2MCIDMap.clear();
119
120 fMaterialID2IndexMap.clear();
121
122 FairRunAna* Run = FairRunAna::Instance();
123 //FairRuntimeDb *RunDB = Run->GetRuntimeDb(); (VF) not used
124
125 if (fVerbose) {
126 cout << "KALMAN FILTER : === INIT MAGNETIC FIELD ===" << endl;
127 }
128
129 fMagneticField = reinterpret_cast<FairField*>(Run->GetField());
130
131 if (fVerbose && fMagneticField) {
132 cout << "Magnetic field done" << endl;
133 }
134
135 if (!fMagneticField) {
136 cout << "No Magnetic Field Found" << endl;
137 }
138
139
141 // fill vector of material
142
143 const auto* pRecoSetupManager = cbm::RecoSetupManager::Instance();
144 if (!pRecoSetupManager->IsInitialized()) {
145 return kFATAL;
146 }
147
148 //=== Mvd ===
150 digiMan->Init();
151 Bool_t useMVD = CbmDigiManager::IsPresent(ECbmModuleId::kMvd) && pRecoSetupManager->GetSetup().HasMvd();
152
153 if (useMVD) {
154 const auto* mvdStationPar = CbmMvdDetector::Instance()->GetParameterFile();
155 assert(mvdStationPar);
156 const auto* mvdInterface = pRecoSetupManager->GetSetup().GetMvd();
157 if (mvdInterface == nullptr) {
158 cout << "KF: Warning - there is an MvdDigi branch, but no MVD tracking interface" << endl;
159 }
160 else {
161
162 if (fVerbose) {
163 cout << "KALMAN FILTER : === READ MVD MATERIAL ===" << endl;
164 }
165
166 int NStations = mvdInterface->GetNofTrackingStations();
167 cout << "KF: MVD contains " << NStations << " stations";
168
169 for (Int_t ist = 0; ist < NStations; ist++) {
170 CbmKFTube tube;
171
172 const auto& vol = mvdInterface->GetFullVolume(ist);
173 tube.ID = 1101 + ist;
174 // tube.F = 1.;
175 tube.z = vol.GetCenterZ();
176 tube.dz = mvdStationPar->GetZThickness(ist);
177 // TODO: verify the thickness of MVD stations
178 tube.RadLength = mvdStationPar->GetZThickness(ist) / (10. * mvdStationPar->GetZRadThickness(ist));
179 tube.r = 0.;
180 double dx = vol.GetMaxX();
181 double dy = vol.GetMaxY();
182 tube.R = sqrt(dx * dx + dy * dy);
183 tube.rr = tube.r * tube.r;
184 tube.RR = tube.R * tube.R;
185 tube.ZThickness = tube.dz;
186 tube.ZReference = tube.z;
187
188 vMvdMaterial.push_back(tube);
189 MvdStationIDMap.insert(pair<Int_t, Int_t>(tube.ID, ist));
190
191 if (fVerbose) {
192 cout << " Mvd material ( id, z, dz, r, R, RadL, dz/RadL )= ( " << tube.ID << ", " << tube.z << ", " << tube.dz
193 << ", " << tube.r << ", " << tube.R << ", " << tube.RadLength << ", " << tube.dz / tube.RadLength << " )"
194 << endl;
195 }
196 }
197 }
198 }
199
200
201 //=== Sts stations ===
202
203 if (fVerbose) {
204 cout << "KALMAN FILTER : === READ STS MATERIAL ===" << endl;
205 }
206
207 const auto* stsInterface = pRecoSetupManager->GetSetup().GetSts();
208 int NStations = stsInterface->GetNofTrackingStations();
209
210 for (Int_t ist = 0; ist < NStations; ist++) {
211 CbmKFTube tube;
212
213 const auto* stsStation = CbmStsSetup::Instance()->GetStation(ist);
214 const auto& vol = stsInterface->GetFullVolume(ist);
215 tube.ID = 1000 + ist;
216 tube.F = 1.;
217 tube.z = vol.GetCenterZ();
218 tube.dz = stsStation->GetSensorD();
219 tube.RadLength = stsStation->GetRadLength();
220 tube.r = 0.;
221 double dx = vol.GetMaxX();
222 double dy = vol.GetMaxY();
223 tube.R = sqrt(dx * dx + dy * dy);
224 tube.rr = tube.r * tube.r;
225 tube.RR = tube.R * tube.R;
226 tube.ZThickness = tube.dz;
227 tube.ZReference = tube.z;
228
229 vStsMaterial.push_back(tube);
230 StsStationIDMap.insert(pair<Int_t, Int_t>(tube.ID, ist));
231
232 if (fVerbose) {
233 cout << " Sts material ( id, z, dz, r, R, RadL, dz/RadL )= ( " << tube.ID << ", " << tube.z << ", " << tube.dz
234 << ", " << tube.r << ", " << tube.R << ", " << tube.RadLength << ", " << tube.dz / tube.RadLength << " )"
235 << endl;
236 }
237 }
238
239 // FU 05.03.2020
240 // Remove the usage of old ascii parameter containers. Since the
241 // containers were empty anyway there is no change of the behaviour
242 // The change was tested by Iour Vassiliev (see Redmine Issue #1566)
243 // and no difference of the results was seen. This at least holds for
244 // the STS/MVD system.
245
246
247 // FU 25.05.2020
248 // Reimplement initializing the target information. After shifting the
249 // target 4 cm upstream it was found that the KF package assumes the
250 // target at (0.,0.,0.). In ancient times the target information was
251 // initialized from the ascii parameter container. After the target
252 // geometry was changed to ROOT geometry the information was not
253 // initialized. Probably this never was a problem since the target was at
254 // z=0. cm anyway.
255 // Now the target information s properly initialized from the ROOT GeoManager.
256 // Fixes Redmine issues #1727 and #1718
257
259
260
261 {
262 for (vector<CbmKFTube>::iterator i = vTargets.begin(); i != vTargets.end(); ++i) {
263 vMaterial.push_back(&*i);
264 }
265
266 for (vector<CbmKFTube>::iterator i = vMvdMaterial.begin(); i != vMvdMaterial.end(); ++i) {
267 vMaterial.push_back(&*i);
268 }
269
270 for (vector<CbmKFTube>::iterator i = vStsMaterial.begin(); i != vStsMaterial.end(); ++i) {
271 vMaterial.push_back(&*i);
272 }
273 sort(vMaterial.begin(), vMaterial.end(), CbmKFMaterial::comparePDown);
274 for (unsigned i = 0; i < vMaterial.size(); i++) {
275 fMaterialID2IndexMap.insert(pair<Int_t, Int_t>(vMaterial[i]->ID, i));
276 }
277 }
278 return kSUCCESS;
279}
280
282{
283 // Loop over all nodes till a node with name "target" is found
284 // Extract the required infrmation from the node and store it in the
285 // proper structure
286 // The complete logic depends on the naming convention of the target.
287 // If the node doesn't contain the string target the procedure will fail
288
289 CbmKFTube target{};
290 target.ID = -111;
291 target.F = 1.;
292
293 TString targetPath;
294 TGeoNode* targetNode{nullptr};
295 FindTargetNode(targetPath, targetNode);
296
297 if (!targetNode) {
298 LOG(fatal) << "Could not find the target.";
299 }
300
301 Double_t local[3] = {0., 0., 0.}; // target centre, local c.s.
302 Double_t global[3]; // target centre, global c.s.
303 gGeoManager->cd(targetPath);
304 gGeoManager->GetCurrentMatrix()->LocalToMaster(local, global);
305 target.x = global[0];
306 target.y = global[1];
307 target.z = global[2];
308
309 fTargetXYZ[0] = target.x;
310 fTargetXYZ[1] = target.y;
311 fTargetXYZ[2] = target.z;
312
313 if (fVerbose) {
314 cout << "KALMAN FILTER : === READ TARGET MATERIAL ===" << endl;
315 cout << " found targed \"" << targetPath << "\" at ( " << target.x << " " << target.y << " " << target.z << " ) "
316 << endl;
317 }
318
319 TGeoVolume* volume = targetNode->GetVolume();
320
321 TGeoShape* shape = volume->GetShape();
322 if (shape->TestShapeBit(TGeoShape::kGeoTube)) {
323 target.r = static_cast<TGeoTube*>(shape)->GetRmin();
324 target.R = static_cast<TGeoTube*>(shape)->GetRmax();
325 target.dz = 2. * static_cast<TGeoTube*>(shape)->GetDz();
326 }
327 else {
328 LOG(fatal) << "Only a target of a tube shape is supported";
329 }
330
331 TGeoMaterial* material = volume->GetMaterial();
332 Double_t radlength = material->GetRadLen();
333 target.RadLength = radlength;
334 target.Fe = 0.02145;
335
336 target.rr = target.r * target.r;
337 target.RR = target.R * target.R;
338 target.ZThickness = target.dz;
339 target.ZReference = target.z;
340
341 vTargets.push_back(target);
342 LOG(info) << "Target info: " << target.KFInfo();
343}
344
345const std::array<float, 3> CbmKF::GetTargetPosition() { return fTargetXYZ; }
346
347void CbmKF::FindTargetNode(TString& targetPath, TGeoNode*& targetNode)
348{
349 if (!targetNode) { // init at the top of the tree
350 targetNode = gGeoManager->GetTopNode();
351 targetPath = "/" + TString(targetNode->GetName());
352 }
353
354 if (TString(targetNode->GetName()).Contains("target")) {
355 return;
356 }
357
358 for (Int_t iNode = 0; iNode < targetNode->GetNdaughters(); iNode++) {
359 TGeoNode* newNode = targetNode->GetDaughter(iNode);
360 TString newPath = targetPath + "/" + newNode->GetName();
361 FindTargetNode(newPath, newNode);
362 if (newNode) {
363 targetPath = newPath;
364 targetNode = newNode;
365 return;
366 }
367 }
368 targetPath = "";
369 targetNode = nullptr;
370}
371
373{
374 map<Int_t, Int_t>::iterator i = fMaterialID2IndexMap.find(uid);
375 if (i != fMaterialID2IndexMap.end()) {
376 return i->second;
377 }
378 return -1;
379}
380
381
382Int_t CbmKF::ReadTube(CbmKFTube& tube, FairGeoNode* node)
383{
384
385 if (!node) {
386 return 1;
387 }
388
389 TString name = node->getName();
390 TString Sname = node->getShapePointer()->GetName();
391 FairGeoVector nodeV = node->getLabTransform()->getTranslation(); //in cm
392 FairGeoVector centerV = node->getCenterPosition().getTranslation();
393 TArrayD* P = node->getParameters();
394 Int_t NP = node->getShapePointer()->getNumParam();
395 FairGeoMedium* material = node->getMedium();
396 material->calcRadiationLength();
397
398 tube.ID = node->getMCid();
399 tube.RadLength = material->getRadiationLength();
400 tube.F = 1.;
401
402 tube.Fe = 0.02145;
403 TString Mname = material->GetName();
404 if (Mname == "MUCHWolfram") {
405 tube.Fe = 0.009029;
406 }
407 else if (Mname == "MUCHiron") {
408 tube.Fe = 0.02219;
409 }
410 else if (Mname == "carbon") {
411 tube.Fe = 0.08043;
412 }
413
414 tube.x = nodeV.X() + centerV.X();
415 tube.y = nodeV.Y() + centerV.Y();
416 tube.z = nodeV.Z() + centerV.Z();
417 /*
418 int np = node->getNumPoints();
419 cout<<"points:"<<endl;
420 for( int i=0; i<np; i++ ){
421 FairGeoVector *v = node->getPoint(i);
422 cout<<v->X()<<" "<<v->Y()<<" "<<v->Z()<<endl;
423 }
424 */
425 if (Sname == "TUBS" || Sname == "TUBE") {
426 tube.r = P->At(0);
427 tube.R = P->At(1);
428 tube.dz = 2. * P->At(2);
429 }
430 else if (Sname == "TRAP") {
431 tube.r = 0;
432 tube.R = 1000;
433 tube.dz = 2. * P->At(0);
434 }
435 else if (Sname == "SPHE") {
436 tube.r = 0;
437 tube.R = 1000;
438 tube.z += 0.5 * (P->At(0) + P->At(1)); // inner & outer radius
439 tube.dz = (P->At(1) - P->At(0));
440 }
441 else if (Sname == "PCON") {
442 Int_t Nz = (NP - 3) / 3;
443 double Z = -100000, R = -100000, z = 100000, r = 100000;
444 for (Int_t i = 0; i < Nz; i++) {
445 double z1 = P->At(3 + i * 3 + 0);
446 double r1 = P->At(3 + i * 3 + 1);
447 double R1 = P->At(3 + i * 3 + 2);
448 if (r1 < r) {
449 r = r1;
450 }
451 if (R1 > R) {
452 R = R1;
453 }
454 if (z1 < z) {
455 z = z1;
456 }
457 if (z1 > Z) {
458 Z = z1;
459 }
460 }
461
462 tube.r = r;
463 tube.R = R;
464 tube.z += (z + Z) / 2.;
465 tube.dz = (Z - z);
466 }
467 else if (Sname == "PGON") {
468 Int_t Nz = (NP - 4) / 3;
469 double Z = -100000, R = -100000, z = 100000, r = 100000;
470 for (Int_t i = 0; i < Nz; i++) {
471 double z1 = P->At(4 + i * 3 + 0);
472 double r1 = P->At(4 + i * 3 + 1);
473 double R1 = P->At(4 + i * 3 + 2);
474 if (r1 < r) {
475 r = r1;
476 }
477 if (R1 > R) {
478 R = R1;
479 }
480 if (z1 < z) {
481 z = z1;
482 }
483 if (z1 > Z) {
484 Z = z1;
485 }
486 }
487 tube.r = r;
488 tube.R = R;
489 tube.z += (z + Z) / 2.;
490 tube.dz = (Z - z);
491 }
492 else if (Sname == "BOX ") {
493 double dx = 2 * P->At(0);
494 double dy = 2 * P->At(1);
495 double dz = 2 * P->At(2);
496 tube.r = 0;
497 tube.R = TMath::Sqrt(dx * dx + dy * dy);
498 tube.dz = dz;
499 }
500 else {
501 cout << " -E- unknown shape : " << Sname << endl;
502 cout << " -E- It does not make sense to go on" << endl;
503 cout << " -E- Stop execution here" << endl;
504 Fatal("CbmKF::ReadTube", "Unknown Shape");
505 }
506 tube.rr = tube.r * tube.r;
507 tube.RR = tube.R * tube.R;
508 tube.ZThickness = tube.dz;
509 tube.ZReference = tube.z;
510 return 0;
511}
512
513
515{
516
517 if (!node) {
518 return nullptr;
519 }
520
521 TString name = node->getName();
522 TString Sname = node->getShapePointer()->GetName();
523
524 FairGeoTransform trans(*node->getLabTransform());
525 FairGeoNode* nxt = node;
526 while ((nxt = nxt->getMotherNode())) {
527 FairGeoTransform* tm = nxt->getLabTransform();
528 if (!tm) {
529 break;
530 }
531 trans.transFrom(*tm);
532 }
533
534 //FairGeoVector nodeV = node->getLabTransform()->getTranslation(); //in cm
535 //FairGeoVector centerV = node->getCenterPosition().getTranslation();
536
537 FairGeoVector nodeV = trans.getTranslation(); //in cm
538 FairGeoVector centerV = nodeV + node->getCenterPosition().getTranslation();
539
540 TArrayD* P = node->getParameters();
541 Int_t NP = node->getShapePointer()->getNumParam();
542 FairGeoMedium* material = node->getMedium();
543 material->calcRadiationLength();
544
545 Int_t ID = node->getMCid();
546 Double_t RadLength = material->getRadiationLength();
547 // Double_t F = 1.;
548 Double_t x0 = centerV.X();
549 Double_t y0 = centerV.Y();
550 Double_t z0 = centerV.Z();
551
552 CbmKFMaterial* ret = nullptr;
553
554 if (Sname == "TUBS" || Sname == "TUBE") {
555 CbmKFTube tube(ID, x0, y0, z0, 2. * P->At(2), P->At(0), P->At(1), RadLength);
556 vPassiveTube.push_back(tube);
557 ret = &(vPassiveTube.back());
558 }
559 else if (Sname == "SPHE") {
560 CbmKFTube tube(ID, x0, y0, z0 + 0.5 * (P->At(0) + P->At(1)), (P->At(1) - P->At(0)), 0, 1000, RadLength);
561 vPassiveTube.push_back(tube);
562 ret = &(vPassiveTube.back());
563 }
564 else if (Sname == "PCON") {
565 Int_t Nz = (NP - 3) / 3;
566 double Z = -100000, R = -100000, z = 100000, r = 100000;
567 for (Int_t i = 0; i < Nz; i++) {
568 double z1 = P->At(3 + i * 3 + 0);
569 double r1 = P->At(3 + i * 3 + 1);
570 double R1 = P->At(3 + i * 3 + 2);
571 if (r1 < r) {
572 r = r1;
573 }
574 if (R1 > R) {
575 R = R1;
576 }
577 if (z1 < z) {
578 z = z1;
579 }
580 if (z1 > Z) {
581 Z = z1;
582 }
583 }
584 CbmKFTube tube(ID, x0, y0, z0 + 0.5 * (z + Z), (Z - z), r, R, RadLength);
585 vPassiveTube.push_back(tube);
586 ret = &(vPassiveTube.back());
587 }
588 else if (Sname == "PGON") {
589 Int_t Nz = (NP - 4) / 3;
590 double Z = -100000, R = -100000, z = 100000, r = 100000;
591 for (Int_t i = 0; i < Nz; i++) {
592 double z1 = P->At(4 + i * 3 + 0);
593 double r1 = P->At(4 + i * 3 + 1);
594 double R1 = P->At(4 + i * 3 + 2);
595 if (r1 < r) {
596 r = r1;
597 }
598 if (R1 > R) {
599 R = R1;
600 }
601 if (z1 < z) {
602 z = z1;
603 }
604 if (z1 > Z) {
605 Z = z1;
606 }
607 }
608 CbmKFTube tube(ID, x0, y0, z0 + 0.5 * (z + Z), (Z - z), r, R, RadLength);
609 vPassiveTube.push_back(tube);
610 ret = &(vPassiveTube.back());
611 }
612 else if (Sname == "BOX ") {
613 CbmKFBox box(ID, x0, y0, z0, 2 * P->At(0), 2 * P->At(1), 2 * P->At(2), RadLength);
614 vPassiveBox.push_back(box);
615 ret = &(vPassiveBox.back());
616 }
617 else if (Sname == "TRAP") {
618 int np = node->getNumPoints();
619 FairGeoVector vMin = *node->getPoint(0), vMax = vMin;
620 for (int i = 0; i < np; i++) {
621 FairGeoVector* v = node->getPoint(i);
622 for (int j = 0; j < 3; j++) {
623 if (vMin(j) > (*v)(j)) {
624 (&vMin.X())[j] = (*v)(j);
625 }
626 if (vMax(j) < (*v)(j)) {
627 (&vMax.X())[j] = (*v)(j);
628 }
629 }
630 }
631 FairGeoVector v0 = (vMin + vMax);
632 v0 *= .5 / 10.;
633 FairGeoVector dv = vMax - vMin;
634 dv /= 10.;
635 CbmKFBox box(ID, x0 + v0(0), y0 + v0(1), z0 + v0(2), dv(0), dv(1), dv(2), RadLength);
636 vPassiveBox.push_back(box);
637 ret = &(vPassiveBox.back());
638 }
639 else {
640 cout << " -E- unknown shape : " << Sname << endl;
641 cout << " -E- It does not make sense to go on" << endl;
642 cout << " -E- Stop execution here" << endl;
643 Fatal("CbmKF::ReadPassive", "Unknown Shape");
644 }
645 return ret;
646}
647
648
649Int_t CbmKF::Propagate(Double_t* T, Double_t* C, Double_t z_out, Double_t QP0)
650{
651 Bool_t err = 0;
652 if (fabs(T[5] - z_out) < 1.e-5) {
653 return 0;
654 }
655
656 if (!fMagneticField || (300 <= z_out && 300 <= T[5])) {
657 CbmKFFieldMath::ExtrapolateLine(T, C, T, C, z_out);
658 return 0;
659 }
660 Double_t zz = z_out;
661 if (z_out < 300. && 300 <= T[5]) {
662 CbmKFFieldMath::ExtrapolateLine(T, C, T, C, 300.);
663 }
664
665 if (T[5] < 300. && 300. < z_out) {
666 zz = 300.;
667 }
668 Bool_t repeat = 1;
669 while (!err && repeat) {
670 const Double_t max_step = 5.;
671 Double_t zzz;
672 if (fabs(T[5] - zz) > max_step) {
673 zzz = T[5] + ((zz > T[5]) ? max_step : -max_step);
674 }
675 else {
676 zzz = zz;
677 repeat = 0;
678 }
679 switch (fMethod) {
680 case 0: {
682 break;
683 }
684 case 1: {
685 err = err || CbmKFFieldMath::ExtrapolateALight(T, C, T, C, zzz, QP0, fMagneticField);
686 break;
687 }
688 case 2: {
689 err = err || CbmKFFieldMath::ExtrapolateRK4(T, C, T, C, zzz, QP0, fMagneticField);
690 break;
691 }
692 /*
693 case 3:
694 {
695 CbmKFFieldMath::ExtrapolateACentral( T, C, T, C, zzz , QP0, fMagneticField );
696 break;
697 }
698 case 4:
699 {
700 CbmKFFieldMath::ExtrapolateAnalytic( T, C, T, C, zzz , QP0, fMagneticField, 1 );
701 break;
702 }
703 case 5:
704 {
705 CbmKFFieldMath::ExtrapolateAnalytic( T, C, T, C, zzz , QP0, fMagneticField, 2 );
706 break;
707 }
708 case 6:
709 {
710 CbmKFFieldMath::ExtrapolateAnalytic( T, C, T, C, zzz , QP0, fMagneticField, 3 );
711 break;
712 }
713 */
714 }
715 }
716 if (T[5] != z_out) {
717 CbmKFFieldMath::ExtrapolateLine(T, C, T, C, z_out);
718 }
719 return err;
720}
ClassImp(CbmConverterManager)
@ kMvd
Micro-Vertex Detector.
Definition CbmDefs.h:47
A manager for setup representation in CBM reconstruction.
friend fvec sqrt(const fvec &a)
fscal v[fmask::Size]
Definition KfSimdPseudo.h:4
int Int_t
bool Bool_t
Some class C.
CbmDigiManager.
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
InitStatus Init()
Initialisation.
static CbmDigiManager * Instance()
Static instance.
static void ExtrapolateLine(const Double_t T_in[], const Double_t C_in[], Double_t T_out[], Double_t C_out[], Double_t z_out)
static Int_t ExtrapolateRK4(const Double_t T_in[], const Double_t C_in[], Double_t T_out[], Double_t C_out[], Double_t z_out, Double_t qp0, FairField *MF)
static Int_t ExtrapolateALight(const Double_t T_in[], const Double_t C_in[], Double_t T_out[], Double_t C_out[], Double_t z_out, Double_t qp0, FairField *MF)
Double_t ZReference
Double_t RadLength
static Bool_t comparePDown(const CbmKFMaterial *a, const CbmKFMaterial *b)
Double_t ZThickness
Double_t R
Double_t rr
Double_t RR
Double_t x
Double_t r
Double_t dz
Double_t y
Double_t z
Definition CbmKF.h:34
std::vector< CbmKFMaterial * > vMaterial
Definition CbmKF.h:59
Int_t fMethod
Definition CbmKF.h:96
std::vector< CbmKFWall > vTrdMaterial
Definition CbmKF.h:66
std::vector< CbmKFBox > vPassiveBox
Definition CbmKF.h:72
std::vector< CbmKFTube > vPassiveTube
Definition CbmKF.h:70
void GetTargetInfo()
Definition CbmKF.cxx:281
std::array< float, 3 > fTargetXYZ
Definition CbmKF.h:110
CbmKFMaterial * ReadPassive(FairGeoNode *node)
Definition CbmKF.cxx:514
std::map< Int_t, Int_t > TrdStationIDMap
Definition CbmKF.h:80
std::vector< CbmKFWall > vPassiveWall
Definition CbmKF.h:71
std::map< Int_t, Int_t > MuchMCID2StationMap
Definition CbmKF.h:81
void SetParContainers()
Definition CbmKF.cxx:87
std::vector< CbmKFTube > vRichMaterial
Definition CbmKF.h:65
std::vector< CbmKFCone > vPipe
Definition CbmKF.h:68
std::vector< CbmKFTube > vMuchDetectors
Definition CbmKF.h:64
std::vector< CbmKFTube > vMvdMaterial
Definition CbmKF.h:61
Int_t GetMaterialIndex(Int_t uid)
Definition CbmKF.cxx:372
std::map< Int_t, Int_t > MuchStation2MCIDMap
Definition CbmKF.h:82
FairField * fMagneticField
Definition CbmKF.h:93
~CbmKF()
Definition CbmKF.cxx:85
std::vector< CbmKFTube > vStsMaterial
Definition CbmKF.h:62
std::map< Int_t, Int_t > StsStationIDMap
Definition CbmKF.h:79
CbmKF(const char *name="KF", Int_t iVerbose=1)
void FindTargetNode(TString &targetPath, TGeoNode *&targetNode)
Definition CbmKF.cxx:347
std::map< Int_t, Int_t > fMaterialID2IndexMap
Definition CbmKF.h:101
std::map< Int_t, Int_t > MvdStationIDMap
Definition CbmKF.h:78
std::vector< CbmKFTube > vMuchMaterial
Definition CbmKF.h:63
Int_t ReadTube(CbmKFTube &tube, FairGeoNode *node)
Definition CbmKF.cxx:382
const std::array< float, 3 > GetTargetPosition()
Definition CbmKF.cxx:345
InitStatus Init()
Definition CbmKF.cxx:97
std::vector< CbmKFTube > vTargets
Definition CbmKF.h:67
static CbmKF * fInstance
Definition CbmKF.h:91
Int_t Propagate(Double_t *T, Double_t *C, Double_t z_out, Double_t QP0)
Definition CbmKF.cxx:649
InitStatus ReInit()
Definition CbmKF.cxx:95
static CbmMvdDetector * Instance()
CbmMvdStationPar * GetParameterFile()
static CbmStsSetup * Instance()
CbmStsStation * GetStation(Int_t stationId) const
static RecoSetupManager * Instance()
Instance access.