35 TVector3 start = TVector3();
36 TVector3 stop = TVector3();
38 strawtubes*
module = dynamic_cast<strawtubes*> (FairRunSim::Instance()->GetListOfModules()->FindObject("Strawtubes") );
39 Double_t v_drift =
module->StrawVdrift();
40 Double_t sigma_spatial =
module->StrawSigmaSpatial();
41 module->StrawEndPoints(fDetectorID,start,stop);
42 Double_t t_drift = fabs( gRandom->Gaus( p->dist2Wire(), sigma_spatial ) )/v_drift;
49 Int_t vnb = (
fDetectorID - statnb*10000000)/1000000;
50 Int_t pnb = (
fDetectorID- statnb*10000000 - vnb*1000000)/100000;
51 Int_t lnb = (
fDetectorID - statnb*10000000 - vnb*1000000 - pnb*100000)/10000;
52 TString stat =
"Tr";stat+=+statnb;stat+=
"_";stat+=statnb;
53 if (statnb==5){stat=
"Veto_5";}
58 if (statnb==5){view =
"_x";}
71 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
72 TString prefix =
"Tr";
73 if (statnb==5){prefix=
"Veto";}
75 prefix+=view;prefix+=
"_plane_";prefix+=pnb;prefix+=
"_";
76 TString plane = prefix;plane+=statnb;plane+=vnb;plane+=+pnb;plane+=
"00000";
77 TString layer = prefix+
"layer_";layer+=lnb;layer+=
"_";layer+=statnb;layer+=vnb;layer+=pnb;layer+=lnb;layer+=
"0000";
78 TString wire =
"wire_";
79 if (statnb==5){wire+=
"veto_";}
81 if (statnb<3){wire =
"wire_12_";wire+=(
fDetectorID+1000);}
82 TString path =
"/";path+=stat;path+=
"/";path+=plane;path+=
"/";path+=layer;path+=
"/";path+=wire;
83 Bool_t rc = nav->cd(path);
85 cout <<
"strawtubes::StrawDecode, TgeoNavigator failed "<<path<<endl;
88 TGeoNode* W = nav->GetCurrentNode();
89 TGeoTube* S =
dynamic_cast<TGeoTube*
>(W->GetVolume()->GetShape());
90 Double_t top[3] = {0,0,S->GetDZ()};
91 Double_t bot[3] = {0,0,-S->GetDZ()};
92 Double_t Gtop[3],Gbot[3];
93 nav->LocalToMaster(top, Gtop); nav->LocalToMaster(bot, Gbot);
94 vtop.SetXYZ(Gtop[0],Gtop[1],Gtop[2]);
95 vbot.SetXYZ(Gbot[0],Gbot[1],Gbot[2]);