11#include <ROOT/TSeq.hxx>
15#include "FairGeoBuilder.h"
16#include "FairGeoInterface.h"
17#include "FairGeoLoader.h"
18#include "FairGeoMedia.h"
19#include "FairGeoNode.h"
20#include "FairGeoVolume.h"
21#include "FairRootManager.h"
23#include "FairRuntimeDb.h"
24#include "FairVolume.h"
28#include "TClonesArray.h"
30#include "TGeoCompositeShape.h"
31#include "TGeoManager.h"
32#include "TGeoMaterial.h"
33#include "TGeoMedium.h"
38#include "TVirtualMC.h"
50 UpstreamTagger_fulldet(0),
51 scoringPlaneUBText(0) {}
56 UpstreamTagger_fulldet(0),
57 scoringPlaneUBText(0) {}
62 if (gMC->IsTrackEntering()) {
64 fTime = gMC->TrackTime() * 1.0e09;
66 gMC->TrackPosition(
fPos);
67 gMC->TrackMomentum(
fMom);
74 if (gMC->IsTrackExiting() || gMC->IsTrackStop() ||
75 gMC->IsTrackDisappeared()) {
80 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
83 gMC->CurrentVolID(uniqueId);
84 if (uniqueId > 1000000)
87 gMC->CurrentVolOffID(1, vcpy);
88 if (vcpy == 5) uniqueId += 4;
91 TParticle* p = gMC->GetStack()->GetCurrentTrack();
92 Int_t pdgCode = p->GetPdgCode();
94 gMC->TrackPosition(Pos);
96 gMC->TrackMomentum(Mom);
97 Double_t xmean = (
fPos.X() + Pos.X()) / 2.;
98 Double_t ymean = (
fPos.Y() + Pos.Y()) / 2.;
99 Double_t zmean = (
fPos.Z() + Pos.Z()) / 2.;
103 pdgCode, TVector3(Pos.X(), Pos.Y(), Pos.Z()),
104 TVector3(Mom.Px(), Mom.Py(), Mom.Pz()));
115 TGeoVolume* top = gGeoManager->GetTopVolume();
124 TGeoMedium* Vacuum_box = gGeoManager->GetMedium(
"vacuum");
129 Fatal(
"ConstructGeometry",
"Medium 'vacuum' not found.");
133 gGeoManager->MakeBox(
"Upstream_Tagger", Vacuum_box,
xbox_fulldet / 2.0,
138 new TGeoTranslation(0.0, 0.0,
det_zPos));
140 cout <<
" Z Position (Upstream Tagger1) " <<
det_zPos << endl;
Int_t fTrackID
event index
TLorentzVector fPos
volume id
Double_t fTime
momentum at entrance
UpstreamTaggerPoint * AddHit(Args &&... args)
TLorentzVector fMom
position at entrance
Bool_t ProcessHits(FairVolume *v=0) override
Double_t ybox_fulldet
X dimension (default: 4.4 m)
void ConstructGeometry() override
Double_t xbox_fulldet
z-position of detector (set via SetZposition)
TGeoVolume * UpstreamTagger_fulldet
Z dimension/thickness (default: 16 cm)
Double_t zbox_fulldet
Y dimension (default: 6.4 m)
Int_t InitMedium(const char *name)