Project
Loading...
Searching...
No Matches
O2TrivialMCEngine.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12// An absolut minimal implementation of a TVirtualMC.
13
14#ifndef ALICEO2_MC_TRIVIALMCENGINE_H_
15#define ALICEO2_MC_TRIVIALMCENGINE_H_
16
17#include <TVector3.h>
18#include <TLorentzVector.h>
19
20#include <TMCProcess.h>
21
22#include <TVirtualMC.h>
23#include <TParticle.h>
24#include <TVirtualMCStack.h>
25#include <TMCManager.h>
26
27namespace o2
28{
29
30namespace mc
31{
32
34{
35
36 public:
38 : TVirtualMC("O2TrivialMCEngine", "O2TrivialMCEngine")
39 {
40 fApplication->ConstructGeometry();
41 }
42
44 ~O2TrivialMCEngine() override = default;
45
46 //
47 // All the derived stuff
48 //
49
50 Bool_t IsRootGeometrySupported() const override
51 {
52 return kTRUE;
53 }
54
55 //
56 // functions from GCONS
57 // ------------------------------------------------
58 //
59
60 void Material(Int_t& kmat, const char* name, Double_t a,
61 Double_t z, Double_t dens, Double_t radl, Double_t absl,
62 Float_t* buf, Int_t nwbuf) override
63 {
64 Warning("Material", "Not implemented in this trivial engine");
65 }
66
67 void Material(Int_t& kmat, const char* name, Double_t a,
68 Double_t z, Double_t dens, Double_t radl, Double_t absl,
69 Double_t* buf, Int_t nwbuf) override
70 {
71 Warning("Material", "Not implemented in this trivial engine");
72 }
73
74 void Mixture(Int_t& kmat, const char* name, Float_t* a,
75 Float_t* z, Double_t dens, Int_t nlmat, Float_t* wmat) override
76 {
77 Warning("Mixture", "Not implemented in this trivial engine");
78 }
79
80 void Mixture(Int_t& kmat, const char* name, Double_t* a,
81 Double_t* z, Double_t dens, Int_t nlmat, Double_t* wmat) override
82 {
83 Warning("Mixture", "Not implemented in this trivial engine");
84 }
85
86 void Medium(Int_t& kmed, const char* name, Int_t nmat,
87 Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd,
88 Double_t stemax, Double_t deemax, Double_t epsil,
89 Double_t stmin, Float_t* ubuf, Int_t nbuf) override
90 {
91 Warning("Medium", "Not implemented in this trivial engine");
92 }
93
94 void Medium(Int_t& kmed, const char* name, Int_t nmat,
95 Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd,
96 Double_t stemax, Double_t deemax, Double_t epsil,
97 Double_t stmin, Double_t* ubuf, Int_t nbuf) override
98 {
99 Warning("Medium", "Not implemented in this trivial engine");
100 }
101
102 void Matrix(Int_t& krot, Double_t thetaX, Double_t phiX,
103 Double_t thetaY, Double_t phiY, Double_t thetaZ,
104 Double_t phiZ) override
105 {
106 Warning("Matrix", "Not implemented in this trivial engine");
107 }
108
109 void Gstpar(Int_t itmed, const char* param, Double_t parval) override
110 {
111 Warning("Gstpar", "Not implemented in this trivial engine");
112 }
113
114 //
115 // functions from GGEOM
116 // ------------------------------------------------
117 //
118
119 Int_t Gsvolu(const char* name, const char* shape, Int_t nmed,
120 Float_t* upar, Int_t np) override
121 {
122 Warning("Gsvolu", "Not implemented in this trivial engine");
123 return -1;
124 }
125
126 Int_t Gsvolu(const char* name, const char* shape, Int_t nmed,
127 Double_t* upar, Int_t np) override
128 {
129 Warning("Gsvolu", "Not implemented in this trivial engine");
130 return -1;
131 }
132
133 void Gsdvn(const char* name, const char* mother, Int_t ndiv,
134 Int_t iaxis) override
135 {
136 Warning("Gsdvn", "Not implemented in this trivial engine");
137 }
138
139 void Gsdvn2(const char* name, const char* mother, Int_t ndiv,
140 Int_t iaxis, Double_t c0i, Int_t numed) override
141 {
142 Warning("Gsdvn2", "Not implemented in this trivial engine");
143 }
144
145 void Gsdvt(const char* name, const char* mother, Double_t step,
146 Int_t iaxis, Int_t numed, Int_t ndvmx) override
147 {
148 Warning("Gsdvt", "Not implemented in this trivial engine");
149 }
150
151 void Gsdvt2(const char* name, const char* mother, Double_t step,
152 Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx) override
153 {
154 Warning("Gsdvt2", "Not implemented in this trivial engine");
155 }
156
157 void Gsord(const char* name, Int_t iax) override
158 {
159 Warning("Gsord", "Not implemented in this trivial engine");
160 }
161
162 void Gspos(const char* name, Int_t nr, const char* mother,
163 Double_t x, Double_t y, Double_t z, Int_t irot,
164 const char* konly = "ONLY") override
165 {
166 Warning("Gspos", "Not implemented in this trivial engine");
167 }
168
169 void Gsposp(const char* name, Int_t nr, const char* mother,
170 Double_t x, Double_t y, Double_t z, Int_t irot,
171 const char* konly, Float_t* upar, Int_t np) override
172 {
173 Warning("Gsposp", "Not implemented in this trivial engine");
174 }
175
176 void Gsposp(const char* name, Int_t nr, const char* mother,
177 Double_t x, Double_t y, Double_t z, Int_t irot,
178 const char* konly, Double_t* upar, Int_t np) override
179 {
180 Warning("Gsposp", "Not implemented in this trivial engine");
181 }
182
183 void Gsbool(const char* onlyVolName, const char* manyVolName) override
184 {
185 Warning("Gsbool", "Not implemented in this trivial engine");
186 }
187
188 //
189 // functions for definition of surfaces
190 // and material properties for optical physics
191 // ------------------------------------------------
192 //
193
194 void SetCerenkov(Int_t itmed, Int_t npckov, Float_t* ppckov, Float_t* absco, Float_t* effic, Float_t* rindex, Bool_t aspline = false, Bool_t rspline = false) override
195 {
196 Warning("SetCerenkov", "Not implemented in this trivial engine");
197 }
198
199 void SetCerenkov(Int_t itmed, Int_t npckov, Double_t* ppckov, Double_t* absco, Double_t* effic, Double_t* rindex, Bool_t aspline = false, Bool_t rspline = false) override
200 {
201 Warning("SetCerenkov", "Not implemented in this trivial engine");
202 }
203
204 void DefineOpSurface(const char* name,
205 EMCOpSurfaceModel model,
206 EMCOpSurfaceType surfaceType,
207 EMCOpSurfaceFinish surfaceFinish,
208 Double_t sigmaAlpha) override
209 {
210 Warning("DefineOpSurface", "Not implemented in this trivial engine");
211 }
212
213 void SetBorderSurface(const char* name,
214 const char* vol1Name, int vol1CopyNo,
215 const char* vol2Name, int vol2CopyNo,
216 const char* opSurfaceName) override
217 {
218 Warning("SetBorderSurface", "Not implemented in this trivial engine");
219 }
220
221 void SetSkinSurface(const char* name,
222 const char* volName,
223 const char* opSurfaceName) override
224 {
225 Warning("SetSkinSurface", "Not implemented in this trivial engine");
226 }
227
228 void SetMaterialProperty(Int_t itmed, const char* propertyName, Int_t np, Double_t* pp, Double_t* values, Bool_t createNewKey = false, Bool_t spline = false) override
229 {
230 Warning("SetMaterialProperty", "Not implemented in this trivial engine");
231 }
232 void SetMaterialProperty(Int_t itmed, const char* propertyName, Double_t value) override
233 {
234 Warning("SetMaterialProperty", "Not implemented in this trivial engine");
235 }
236 void SetMaterialProperty(const char* surfaceName, const char* propertyName, Int_t np, Double_t* pp, Double_t* values, Bool_t createNewKey = false, Bool_t spline = false) override
237 {
238 Warning("SetMaterialProperty", "Not implemented in this trivial engine");
239 }
240
241 //
242 // functions for access to geometry
243 // ------------------------------------------------
244 //
245
246 Bool_t GetTransformation(const TString& volumePath,
247 TGeoHMatrix& matrix) override
248 {
249 Warning("GetTransformation", "Not implemented in this trivial engine");
250 return kFALSE;
251 }
252
253 Bool_t GetShape(const TString& volumePath,
254 TString& shapeType, TArrayD& par) override
255 {
256 Warning("GetShape", "Not implemented in this trivial engine");
257 return kFALSE;
258 }
259
260 Bool_t GetMaterial(Int_t imat, TString& name,
261 Double_t& a, Double_t& z, Double_t& density,
262 Double_t& radl, Double_t& inter, TArrayD& par) override
263 {
264 Warning("GetMaterial", "Not implemented in this trivial engine");
265 return kFALSE;
266 }
267
268 Bool_t GetMaterial(const TString& volumeName,
269 TString& name, Int_t& imat,
270 Double_t& a, Double_t& z, Double_t& density,
271 Double_t& radl, Double_t& inter, TArrayD& par) override
272 {
273 Warning("GetMaterial", "Not implemented in this trivial engine");
274 return kFALSE;
275 }
276
277 Bool_t GetMedium(const TString& volumeName,
278 TString& name, Int_t& imed,
279 Int_t& nmat, Int_t& isvol, Int_t& ifield,
280 Double_t& fieldm, Double_t& tmaxfd, Double_t& stemax,
281 Double_t& deemax, Double_t& epsil, Double_t& stmin,
282 TArrayD& par) override
283 {
284 Warning("GetMedium", "Not implemented in this trivial engine");
285 return kFALSE;
286 }
287
288 void WriteEuclid(const char* filnam, const char* topvol,
289 Int_t number, Int_t nlevel) override
290 {
291 Warning("WriteEuclid", "Not implemented in this trivial engine");
292 }
293
294 void SetRootGeometry() override {}
295
296 void SetUserParameters(Bool_t isUserParameters) override
297 {
298 Warning("SetUserParameters", "Not implemented in this trivial engine");
299 }
300
301 //
302 // get methods
303 // ------------------------------------------------
304 //
305
306 Int_t VolId(const char* volName) const override
307 {
308 Warning("VolId", "Not implemented in this trivial engine");
309 return -1;
310 }
311
312 const char* VolName(Int_t id) const override
313 {
314 Warning("VolName", "Not implemented in this trivial engine");
315 return "";
316 }
317
318 Int_t MediumId(const char* mediumName) const override
319 {
320 Warning("MediumId", "Not implemented in this trivial engine");
321 return -1;
322 }
323
324 Int_t NofVolumes() const override
325 {
326 Warning("NofVolumes", "Not implemented in this trivial engine");
327 return -1;
328 }
329
330 Int_t VolId2Mate(Int_t id) const override
331 {
332 Warning("VolId2Mate", "Not implemented in this trivial engine");
333 return -1;
334 }
335
336 Int_t NofVolDaughters(const char* volName) const override
337 {
338 Warning("NofVolDaughters", "Not implemented in this trivial engine");
339 return -1;
340 }
341
342 const char* VolDaughterName(const char* volName, Int_t i) const override
343 {
344 Warning("VolDaughterName", "Not implemented in this trivial engine");
345 return "";
346 }
347
348 Int_t VolDaughterCopyNo(const char* volName, Int_t i) const override
349 {
350 Warning("VolDaughterCopyNo", "Not implemented in this trivial engine");
351 return -1;
352 }
353
354 //
355 // ------------------------------------------------
356 // methods for sensitive detectors
357 // ------------------------------------------------
358 //
359
360 // Set a sensitive detector to a volume
361 // - volName - the volume name
362 // - sd - the user sensitive detector
363 void SetSensitiveDetector(const TString& volName, TVirtualMCSensitiveDetector* sd) override
364 {
365 Warning("SetSensitiveDetector", "Not implemented in this trivial engine");
366 }
367
368 // Get a sensitive detector of a volume
369 // - volName - the volume name
370 TVirtualMCSensitiveDetector* GetSensitiveDetector(const TString& volName) const override
371 {
372 Warning("GetSensitiveDetector", "Not implemented in this trivial engine");
373 return nullptr;
374 }
375
376 // The scoring option:
377 // if true, scoring is performed only via user defined sensitive detectors and
378 // MCApplication::Stepping is not called
379 void SetExclusiveSDScoring(Bool_t exclusiveSDScoring) override
380 {
381 Warning("SetExclusiveSDScoring", "Not implemented in this trivial engine");
382 }
383
384 //
385 // ------------------------------------------------
386 // methods for physics management
387 // ------------------------------------------------
388 //
389
390 //
391 // set methods
392 // ------------------------------------------------
393 //
394
395 Bool_t SetCut(const char* cutName, Double_t cutValue) override
396 {
397 Warning("SetCut", "Not implemented in this trivial engine");
398 return kFALSE;
399 }
400
401 Bool_t SetProcess(const char* flagName, Int_t flagValue) override
402 {
403 Warning("SetProcess", "Not implemented in this trivial engine");
404 return kFALSE;
405 }
406
407 Bool_t DefineParticle(Int_t pdg, const char* name,
408 TMCParticleType mcType,
409 Double_t mass, Double_t charge, Double_t lifetime) override
410 {
411 Warning("DefineParticle", "Not implemented in this trivial engine");
412 return kFALSE;
413 }
414
415 Bool_t DefineParticle(Int_t pdg, const char* name,
416 TMCParticleType mcType,
417 Double_t mass, Double_t charge, Double_t lifetime,
418 const TString& pType, Double_t width,
419 Int_t iSpin, Int_t iParity, Int_t iConjugation,
420 Int_t iIsospin, Int_t iIsospinZ, Int_t gParity,
421 Int_t lepton, Int_t baryon,
422 Bool_t stable, Bool_t shortlived = kFALSE,
423 const TString& subType = "",
424 Int_t antiEncoding = 0, Double_t magMoment = 0.0,
425 Double_t excitation = 0.0) override
426 {
427 Warning("DefineParticle", "Not implemented in this trivial engine");
428 return kFALSE;
429 }
430
431 Bool_t DefineIon(const char* name, Int_t Z, Int_t A,
432 Int_t Q, Double_t excEnergy, Double_t mass = 0.) override
433 {
434 Warning("DefineIon", "Not implemented in this trivial engine");
435 return kFALSE;
436 }
437
438 Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3]) override
439 {
440 Warning("SetDecayMode", "Not implemented in this trivial engine");
441 return kFALSE;
442 }
443
444 Double_t Xsec(char*, Double_t, Int_t, Int_t) override
445 {
446 Warning("Xsec", "Not implemented in this trivial engine");
447 return -1.;
448 }
449
450 //
451 // particle table usage
452 // ------------------------------------------------
453 //
454
455 Int_t IdFromPDG(Int_t pdg) const override
456 {
457 Warning("IdFromPDG", "Not implemented in this trivial engine");
458 return -1;
459 }
460
461 Int_t PDGFromId(Int_t id) const override
462 {
463 Warning("PDGFromId", "Not implemented in this trivial engine");
464 return -1;
465 }
466
467 //
468 // get methods
469 // ------------------------------------------------
470 //
471
472 TString ParticleName(Int_t pdg) const override
473 {
474 Warning("ParticleName", "Not implemented in this trivial engine");
475 return TString();
476 }
477
478 Double_t ParticleMass(Int_t pdg) const override
479 {
480 Warning("ParticleMass", "Not implemented in this trivial engine");
481 return -1.;
482 }
483
484 Double_t ParticleCharge(Int_t pdg) const override
485 {
486 Warning("ParticleCharge", "Not implemented in this trivial engine");
487 return -1.;
488 }
489
490 Double_t ParticleLifeTime(Int_t pdg) const override
491 {
492 Warning("ParticleLifeTime", "Not implemented in this trivial engine");
493 return -1.;
494 }
495
496 TMCParticleType ParticleMCType(Int_t pdg) const override
497 {
498 Warning("ParticleMCType", "Not implemented in this trivial engine");
499 return TMCParticleType();
500 }
501 //
502 // ------------------------------------------------
503 // methods for step management
504 // ------------------------------------------------
505 //
506
507 //
508 // action methods
509 // ------------------------------------------------
510 //
511
512 void StopTrack() override
513 {
514 Warning("StopTrack", "Not implemented in this trivial engine");
515 }
516
517 void StopEvent() override
518 {
519 Warning("StopEvent", "Not implemented in this trivial engine");
520 }
521
522 void StopRun() override
523 {
524 Warning("StopRun", "Not implemented in this trivial engine");
525 }
526
527 //
528 // set methods
529 // ------------------------------------------------
530 //
531
532 void SetMaxStep(Double_t) override
533 {
534 Warning("SetMaxStep", "Not implemented in this trivial engine");
535 }
536
537 void SetMaxNStep(Int_t) override
538 {
539 Warning("SetMaxNStep", "Not implemented in this trivial engine");
540 }
541
542 void SetUserDecay(Int_t pdg) override
543 {
544 Warning("SetUserDecay", "Not implemented in this trivial engine");
545 }
546
547 void ForceDecayTime(Float_t) override
548 {
549 Warning("ForceDecayTime", "Not implemented in this trivial engine");
550 }
551
552 //
553 // tracking volume(s)
554 // ------------------------------------------------
555 //
556
557 Int_t CurrentVolID(Int_t& copyNo) const override
558 {
559 Warning("CurrentVolID", "Not implemented in this trivial engine");
560 return -1;
561 }
562
563 Int_t CurrentVolOffID(Int_t off, Int_t& copyNo) const override
564 {
565 Warning("CurrentVolOffID", "Not implemented in this trivial engine");
566 return -1;
567 }
568
569 const char* CurrentVolName() const override
570 {
571 Warning("CurrentVolName", "Not implemented in this trivial engine");
572 return "";
573 }
574
575 const char* CurrentVolOffName(Int_t off) const override
576 {
577 Warning("CurrentVolOffName", "Not implemented in this trivial engine");
578 return "";
579 }
580
581 const char* CurrentVolPath() override
582 {
583 Warning("CurrentVolPath", "Not implemented in this trivial engine");
584 return "";
585 }
586
588 Double_t& x, Double_t& y, Double_t& z) const override
589 {
590 Warning("CurrentBoundaryNormal", "Not implemented in this trivial engine");
591 return kFALSE;
592 }
593
595 Float_t& dens, Float_t& radl, Float_t& absl) const override
596 {
597 Warning("CurrentMaterial", "Not implemented in this trivial engine");
598 return -1;
599 }
600
601 Int_t CurrentMedium() const override
602 {
603 Warning("CurrentMedium", "Not implemented in this trivial engine");
604 return -1;
605 }
606
607 Int_t CurrentEvent() const override
608 {
609 Warning("CurrentEvent", "Not implemented in this trivial engine");
610 return -1;
611 }
612
613 void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag) override
614 {
615 Warning("Gmtod", "Not implemented in this trivial engine");
616 }
617
618 void Gmtod(Double_t* xm, Double_t* xd, Int_t iflag) override
619 {
620 Warning("Gmtod", "Not implemented in this trivial engine");
621 }
622
623 void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag) override
624 {
625 Warning("Gdtom", "Not implemented in this trivial engine");
626 }
627
628 void Gdtom(Double_t* xd, Double_t* xm, Int_t iflag) override
629 {
630 Warning("Gdtom", "Not implemented in this trivial engine");
631 }
632
633 Double_t MaxStep() const override
634 {
635 Warning("MaxStep", "Not implemented in this trivial engine");
636 return -1.;
637 }
638
639 Int_t GetMaxNStep() const override
640 {
641 Warning("GetMaxNStep", "Not implemented in this trivial engine");
642 return -1;
643 }
644
645 //
646 // get methods
647 // tracking particle
648 // dynamic properties
649 // ------------------------------------------------
650 //
651
652 void TrackPosition(TLorentzVector& position) const override
653 {
654 Warning("TrackPosition", "Not implemented in this trivial engine");
655 }
656
657 void TrackPosition(Double_t& x, Double_t& y, Double_t& z) const override
658 {
659 Warning("TrackPosition", "Not implemented in this trivial engine");
660 }
661
662 void TrackPosition(Float_t& x, Float_t& y, Float_t& z) const override
663 {
664 Warning("TrackPosition", "Not implemented in this trivial engine");
665 }
666
667 void TrackMomentum(TLorentzVector& momentum) const override
668 {
669 Warning("TrackMomentum", "Not implemented in this trivial engine");
670 }
671
672 void TrackMomentum(Double_t& px, Double_t& py, Double_t& pz, Double_t& etot) const override
673 {
674 Warning("TrackMomentum", "Not implemented in this trivial engine");
675 }
676
677 void TrackMomentum(Float_t& px, Float_t& py, Float_t& pz, Float_t& etot) const override
678 {
679 Warning("TrackMomentum", "Not implemented in this trivial engine");
680 }
681
682 Double_t TrackStep() const override
683 {
684 Warning("TrackStep", "Not implemented in this trivial engine");
685 return -1.;
686 }
687
688 Double_t TrackLength() const override
689 {
690 Warning("TrackLength", "Not implemented in this trivial engine");
691 return -1.;
692 }
693
694 Double_t TrackTime() const override
695 {
696 Warning("TrackTime", "Not implemented in this trivial engine");
697 return -1.;
698 }
699
700 Double_t Edep() const override
701 {
702 Warning("Edep", "Not implemented in this trivial engine");
703 return -1.;
704 }
705
706 Double_t NIELEdep() const override
707 {
708 Warning("NIELEdep", "Not implemented in this trivial engine");
709 return -1.;
710 }
711
712 Int_t StepNumber() const override
713 {
714 Warning("StepNumber", "Not implemented in this trivial engine");
715 return -1;
716 }
717
718 Double_t TrackWeight() const override
719 {
720 Warning("TrackWeight", "Not implemented in this trivial engine");
721 return -1.;
722 }
723
724 void TrackPolarization(Double_t& polX, Double_t& polY, Double_t& polZ) const override
725 {
726 Warning("TrackPolarization", "Not implemented in this trivial engine");
727 }
728
729 void TrackPolarization(TVector3& pol) const override
730 {
731 Warning("TrackPolarization", "Not implemented in this trivial engine");
732 }
733
734 //
735 // get methods
736 // tracking particle
737 // static properties
738 // ------------------------------------------------
739 //
740
741 Int_t TrackPid() const override
742 {
743 Warning("TrackPid", "Not implemented in this trivial engine");
744 return -1;
745 }
746
747 Double_t TrackCharge() const override
748 {
749 Warning("TrackCharge", "Not implemented in this trivial engine");
750 return -1.;
751 }
752
753 Double_t TrackMass() const override
754 {
755 Warning("TrackMass", "Not implemented in this trivial engine");
756 return -1.;
757 }
758
759 Double_t Etot() const override
760 {
761 Warning("Etot", "Not implemented in this trivial engine");
762 return -1.;
763 }
764
765 //
766 // get methods - track status
767 // ------------------------------------------------
768 //
769
770 Bool_t IsNewTrack() const override
771 {
772 Warning("IsNewTrack", "Not implemented in this trivial engine");
773 return kFALSE;
774 }
775
776 Bool_t IsTrackInside() const override
777 {
778 Warning("IsTrackInside", "Not implemented in this trivial engine");
779 return kFALSE;
780 }
781
782 Bool_t IsTrackEntering() const override
783 {
784 Warning("IsTrackEntering", "Not implemented in this trivial engine");
785 return kFALSE;
786 }
787
788 Bool_t IsTrackExiting() const override
789 {
790 Warning("IsTrackExiting", "Not implemented in this trivial engine");
791 return kFALSE;
792 }
793
794 Bool_t IsTrackOut() const override
795 {
796 Warning("IsTrackOut", "Not implemented in this trivial engine");
797 return kFALSE;
798 }
799
800 Bool_t IsTrackDisappeared() const override
801 {
802 Warning("IsTrackDisappeared", "Not implemented in this trivial engine");
803 return kFALSE;
804 }
805
806 Bool_t IsTrackStop() const override
807 {
808 Warning("IsTrackStop", "Not implemented in this trivial engine");
809 return kFALSE;
810 }
811
812 Bool_t IsTrackAlive() const override
813 {
814 Warning("IsTrackAlive", "Not implemented in this trivial engine");
815 return kFALSE;
816 }
817
818 //
819 // get methods - secondaries
820 // ------------------------------------------------
821 //
822
823 Int_t NSecondaries() const override
824 {
825 Warning("NSecondaries", "Not implemented in this trivial engine");
826 return -1;
827 }
828
829 void GetSecondary(Int_t isec, Int_t& particleId,
830 TLorentzVector& position, TLorentzVector& momentum) override
831 {
832 Warning("GetSecondary", "Not implemented in this trivial engine");
833 }
834
835 TMCProcess ProdProcess(Int_t isec) const override
836 {
837 Warning("ProdProcess", "Not implemented in this trivial engine");
838 return TMCProcess();
839 }
840
841 Int_t StepProcesses(TArrayI& proc) const override
842 {
843 Warning("StepProcesses", "Not implemented in this trivial engine");
844 return -1;
845 }
846
847 Bool_t SecondariesAreOrdered() const override
848 {
849 Warning("SecondariesAreOrdered", "Not implemented in this trivial engine");
850 return kFALSE;
851 }
852
853 //
854 // ------------------------------------------------
855 // Control methods
856 // ------------------------------------------------
857 //
858
859 void Init() override
860 {
861 fApplication->InitGeometry();
862 Warning("Init", "Not implemented in this trivial engine");
863 }
864
865 void BuildPhysics() override
866 {
867 Warning("BuildPhysics", "Not implemented in this trivial engine");
868 }
869
870 void ProcessEvent(Int_t eventId) override
871 {
872 processEventImpl();
873 }
874
875 void ProcessEvent(Int_t eventId, Bool_t isInterruptible) override
876 {
877 Warning("ProcessEvent", "Not implemented in this trivial engine");
878 }
879
880 void ProcessEvent() override
881 {
882 processEventImpl();
883 }
884
885 void InterruptTrack() override
886 {
887 Info("InterruptTrack", "Not implemented in this trivial engine");
888 }
889
890 Bool_t ProcessRun(Int_t nevent) override
891 {
892 if (nevent <= 0) {
893 return kFALSE;
894 }
895
896 for (Int_t i = 0; i < nevent; i++) {
898 }
899 return kTRUE;
900 }
901
902 void TerminateRun() override
903 {
904 Warning("TerminateRun", "Not implemented in this trivial engine");
905 }
906
907 void InitLego() override
908 {
909 Warning("InitLego", "Not implemented in this trivial engine");
910 }
911
912 void SetCollectTracks(Bool_t collectTracks) override
913 {
914 Warning("SetCollectTracks", "Not implemented in this trivial engine");
915 }
916
917 Bool_t IsCollectTracks() const override
918 {
919 Warning("IsCollectTracks", "Not implemented in this trivial engine");
920 return kFALSE;
921 }
922
923 Bool_t IsMT() const override { return kFALSE; }
924
925 private:
927 O2TrivialMCEngine& operator=(O2TrivialMCEngine const&);
928 void processEventImpl()
929 {
930 auto stack = GetStack();
931 if (!TMCManager::Instance()) {
932 fApplication->GeneratePrimaries();
933 }
934 Int_t nPopped{};
935 Int_t itrack;
936 fApplication->BeginEvent();
937 while (true) {
938 if (!stack->PopNextTrack(itrack)) {
939 break;
940 }
941 nPopped++;
942 fApplication->BeginPrimary();
943 fApplication->PreTrack();
944 fApplication->PostTrack();
945 fApplication->FinishPrimary();
946 }
947 fApplication->FinishEvent();
948 Info("processEventImpl", "Popped %d primaries", nPopped);
949 }
950};
951
952} // namespace mc
953
954} // namespace o2
955
956#endif
int16_t charge
Definition RawEventData.h:5
int32_t i
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char pp
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone proc
uint32_t surfaceType
uint32_t stack
Definition RawData.h:1
Acts::Vector3 position
Definition A.h:16
const char * CurrentVolPath() override
Double_t TrackStep() const override
Int_t NSecondaries() const override
void SetUserParameters(Bool_t isUserParameters) override
void Matrix(Int_t &krot, Double_t thetaX, Double_t phiX, Double_t thetaY, Double_t phiY, Double_t thetaZ, Double_t phiZ) override
const char * VolName(Int_t id) const override
Int_t StepNumber() const override
void SetCerenkov(Int_t itmed, Int_t npckov, Double_t *ppckov, Double_t *absco, Double_t *effic, Double_t *rindex, Bool_t aspline=false, Bool_t rspline=false) override
void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov, Float_t *absco, Float_t *effic, Float_t *rindex, Bool_t aspline=false, Bool_t rspline=false) override
void SetSkinSurface(const char *name, const char *volName, const char *opSurfaceName) override
Double_t ParticleMass(Int_t pdg) const override
Int_t CurrentMedium() const override
void TrackMomentum(TLorentzVector &momentum) const override
Double_t NIELEdep() const override
TString ParticleName(Int_t pdg) const override
Double_t TrackLength() const override
Int_t NofVolumes() const override
Bool_t IsNewTrack() const override
Int_t GetMaxNStep() const override
void SetMaterialProperty(const char *surfaceName, const char *propertyName, Int_t np, Double_t *pp, Double_t *values, Bool_t createNewKey=false, Bool_t spline=false) override
Int_t CurrentVolID(Int_t &copyNo) const override
void Gstpar(Int_t itmed, const char *param, Double_t parval) override
Int_t VolId2Mate(Int_t id) const override
void Gdtom(Double_t *xd, Double_t *xm, Int_t iflag) override
void Mixture(Int_t &kmat, const char *name, Double_t *a, Double_t *z, Double_t dens, Int_t nlmat, Double_t *wmat) override
Bool_t IsTrackExiting() const override
void Gsdvt(const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx) override
void TrackPosition(Float_t &x, Float_t &y, Float_t &z) const override
Int_t MediumId(const char *mediumName) const override
Bool_t ProcessRun(Int_t nevent) override
void TrackMomentum(Float_t &px, Float_t &py, Float_t &pz, Float_t &etot) const override
void ForceDecayTime(Float_t) override
Double_t ParticleCharge(Int_t pdg) const override
Int_t CurrentMaterial(Float_t &a, Float_t &z, Float_t &dens, Float_t &radl, Float_t &absl) const override
Bool_t GetMaterial(const TString &volumeName, TString &name, Int_t &imat, Double_t &a, Double_t &z, Double_t &density, Double_t &radl, Double_t &inter, TArrayD &par) override
TMCParticleType ParticleMCType(Int_t pdg) const override
~O2TrivialMCEngine() override=default
For now just default destructor.
Bool_t GetTransformation(const TString &volumePath, TGeoHMatrix &matrix) override
Bool_t GetShape(const TString &volumePath, TString &shapeType, TArrayD &par) override
void SetMaxNStep(Int_t) override
Bool_t IsTrackDisappeared() const override
Bool_t SetProcess(const char *flagName, Int_t flagValue) override
void DefineOpSurface(const char *name, EMCOpSurfaceModel model, EMCOpSurfaceType surfaceType, EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha) override
Double_t MaxStep() const override
void ProcessEvent(Int_t eventId) override
void Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Double_t *upar, Int_t np) override
Int_t TrackPid() const override
Bool_t IsTrackOut() const override
Int_t CurrentEvent() const override
Bool_t CurrentBoundaryNormal(Double_t &x, Double_t &y, Double_t &z) const override
const char * CurrentVolOffName(Int_t off) const override
void Material(Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Double_t *buf, Int_t nwbuf) override
Int_t StepProcesses(TArrayI &proc) const override
void Gsdvt2(const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx) override
void SetBorderSurface(const char *name, const char *vol1Name, int vol1CopyNo, const char *vol2Name, int vol2CopyNo, const char *opSurfaceName) override
const char * VolDaughterName(const char *volName, Int_t i) const override
Bool_t SecondariesAreOrdered() const override
void Gdtom(Float_t *xd, Float_t *xm, Int_t iflag) override
void Gmtod(Double_t *xm, Double_t *xd, Int_t iflag) override
void TrackMomentum(Double_t &px, Double_t &py, Double_t &pz, Double_t &etot) const override
Bool_t SetCut(const char *cutName, Double_t cutValue) override
void SetMaterialProperty(Int_t itmed, const char *propertyName, Int_t np, Double_t *pp, Double_t *values, Bool_t createNewKey=false, Bool_t spline=false) override
TVirtualMCSensitiveDetector * GetSensitiveDetector(const TString &volName) const override
void SetExclusiveSDScoring(Bool_t exclusiveSDScoring) override
Bool_t IsTrackStop() const override
Bool_t DefineIon(const char *name, Int_t Z, Int_t A, Int_t Q, Double_t excEnergy, Double_t mass=0.) override
Int_t IdFromPDG(Int_t pdg) const override
void Medium(Int_t &kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Double_t *ubuf, Int_t nbuf) override
const char * CurrentVolName() const override
void Gsdvn(const char *name, const char *mother, Int_t ndiv, Int_t iaxis) override
void Mixture(Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat) override
Int_t VolDaughterCopyNo(const char *volName, Int_t i) const override
void SetCollectTracks(Bool_t collectTracks) override
Int_t VolId(const char *volName) const override
void Gspos(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly="ONLY") override
Double_t TrackCharge() const override
Bool_t IsMT() const override
Bool_t IsRootGeometrySupported() const override
void Medium(Int_t &kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Float_t *ubuf, Int_t nbuf) override
Bool_t IsTrackInside() const override
void TrackPosition(TLorentzVector &position) const override
Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np) override
void TrackPolarization(TVector3 &pol) const override
void ProcessEvent(Int_t eventId, Bool_t isInterruptible) override
Double_t Edep() const override
Bool_t GetMedium(const TString &volumeName, TString &name, Int_t &imed, Int_t &nmat, Int_t &isvol, Int_t &ifield, Double_t &fieldm, Double_t &tmaxfd, Double_t &stemax, Double_t &deemax, Double_t &epsil, Double_t &stmin, TArrayD &par) override
Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t np) override
Int_t NofVolDaughters(const char *volName) const override
void Material(Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Float_t *buf, Int_t nwbuf) override
Bool_t IsCollectTracks() const override
Double_t ParticleLifeTime(Int_t pdg) const override
Bool_t DefineParticle(Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime, const TString &pType, Double_t width, Int_t iSpin, Int_t iParity, Int_t iConjugation, Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, Int_t lepton, Int_t baryon, Bool_t stable, Bool_t shortlived=kFALSE, const TString &subType="", Int_t antiEncoding=0, Double_t magMoment=0.0, Double_t excitation=0.0) override
Int_t CurrentVolOffID(Int_t off, Int_t &copyNo) const override
TMCProcess ProdProcess(Int_t isec) const override
void Gsdvn2(const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed) override
void Gmtod(Float_t *xm, Float_t *xd, Int_t iflag) override
void TrackPosition(Double_t &x, Double_t &y, Double_t &z) const override
void Gsbool(const char *onlyVolName, const char *manyVolName) override
Double_t Etot() const override
Bool_t GetMaterial(Int_t imat, TString &name, Double_t &a, Double_t &z, Double_t &density, Double_t &radl, Double_t &inter, TArrayD &par) override
Double_t TrackTime() const override
Double_t TrackWeight() const override
Double_t Xsec(char *, Double_t, Int_t, Int_t) override
Double_t TrackMass() const override
Int_t PDGFromId(Int_t id) const override
void SetMaterialProperty(Int_t itmed, const char *propertyName, Double_t value) override
Bool_t IsTrackEntering() const override
void TrackPolarization(Double_t &polX, Double_t &polY, Double_t &polZ) const override
Bool_t DefineParticle(Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime) override
void Gsord(const char *name, Int_t iax) override
void GetSecondary(Int_t isec, Int_t &particleId, TLorentzVector &position, TLorentzVector &momentum) override
Bool_t IsTrackAlive() const override
void SetUserDecay(Int_t pdg) override
Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3]) override
void WriteEuclid(const char *filnam, const char *topvol, Int_t number, Int_t nlevel) override
void Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Float_t *upar, Int_t np) override
void SetMaxStep(Double_t) override
void SetSensitiveDetector(const TString &volName, TVirtualMCSensitiveDetector *sd) override
GLint GLenum GLint x
Definition glcorearb.h:403
GLuint const GLchar * name
Definition glcorearb.h:781
GLint GLsizei width
Definition glcorearb.h:270
GLint y
Definition glcorearb.h:270
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLenum GLsizei GLsizei GLint * values
Definition glcorearb.h:1576
GLenum GLfloat param
Definition glcorearb.h:271
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition glcorearb.h:2514
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...