Tack visualization in VMC for a very simple tracker

Hi All,
I’d like to use, and I’m partially succeeding, to write for example reason a very simple montecarlo of an ideal tracker.

I’m using Geant3 VMC plugin, defining the geometry using the TGeo* ROOT classes. Using the examples in the geant4_vmc package I actually have something that works:

  • the geometry seems ok, using gGeoManga->Draw() I can see the geometry I’ve built
  • the application generate the primaries (actually just a single muon) and seems to propagate it correctly

The only feature I really miss to almost finish my test is how to visualize the track simulated in the detector. Have anyone a good idea to do this?

thanks

Hi,
You can compile geant3 with a special flag as described below, then draw tracks as in the geant4_vmc/Ex03

     // Drawing G3 tracks via TGeo is available only
  // if geant3 is compile with -DCOLLECT_TRACK flag
  // (to be activated in geant3/TGeant3/TGeant3gu.cxx)

Regards,

I recompiled Geant3 with this options but the example doesn’t draw the tracks. Do you have any idea?

Should have worked. I cannot look right now - I am not at CERN, but I will cross check next week.

Did you uncommented the line //#define COLLECT_TRACKS inside TGeant3gu.cxx ? If not, please try that.

You are right, I have made a type adding -DCOLLECT_TRACK (not TRACKS) in the Makefile. Now it works good.

The only additional step I needed was to add explicitly TDatabasePDG.h in the includes of the TGeant3gu.cxx.

Thanks, and sorry for the spam.

Guido