9 #include "TLorentzVector.h"
10 #include "TParticle.h"
11 #include "TVirtualMC.h"
13 #include "TGeoManager.h"
14 #include "TGeoVolume.h"
31 : fPointCollection(new TClonesArray(
"FairRadMapPoint")),
35 fPosIn(TLorentzVector(0,0,0,0)),
36 fPosOut(TLorentzVector(0,0,0,0)),
37 fMomIn(TLorentzVector(0,0,0,0)),
38 fMomOut(TLorentzVector(0,0,0,0)),
76 cout <<
"RadMapMan initialized" << endl;
80 Int_t volumeiterator=0,lastvolume=0;
82 TObjArray* volumelist;
84 const char* volumename;
87 volumelist = gGeoManager->GetListOfVolumes();
89 lastvolume = volumelist->GetLast();
93 cout <<
"RadMapMan: calculating the masses for " << lastvolume <<
" volumes in this simulation" << endl;
95 while ( volumeiterator<=lastvolume ) {
96 volumename = volumelist->At(volumeiterator)->GetName();
97 myvolume = gGeoManager->GetVolume(volumename);
98 vmass = myvolume->WeightA();
99 TVectorD* vomass=
new TVectorD(1,1,vmass,
"END");
103 cout << myvolume->GetName() <<
" has " << vmass <<
" kg" << endl;
114 printf(
" FairRadMapManager::Reset() ------------------------------------------------\n");
120 if ( gMC->IsTrackEntering() ) {
130 fTime = gMC->TrackTime() * 1.0e09;
132 gMC->TrackPosition(
fPosIn);
133 gMC->TrackMomentum(
fMomIn);
139 TGeoVolume* actVolume = gGeoManager->GetVolume(
fVolumeID);
141 TVectorD* ActMass = (TVectorD*)
fMassMap->GetValue(actVolume);
150 fStep += gMC->TrackStep();
152 fPdg = gMC->TrackPid();
157 if (fPdg<10000 && fStep>0 &&
fActMass>0 ) {
170 if ( gMC->IsTrackExiting() ||
171 gMC->IsTrackStop() ||
172 gMC->IsTrackDisappeared() ) {
175 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
177 Int_t fVolID = gMC->CurrentVolID(copyNo);
182 Int_t tsize = clref.GetEntriesFast();