GSI Helmholtzzentrum für Schwerionenforschung
Hello, I am a student and work currently at SMI, Vienna, where I should perform some simulations using PANDA ROOT. So far, we have created a set of macros for full simulation based on those in trunk/tutorials/analysis (sim, digi, reco, kalman, makeTCands). We are using revision 5813 following a suggestion by Klaus Götzen, since the macros were not compatible with the most current version. I could already perform some simple analysis, like getting the momentum or energy of different particle types, etc. What I could not do -- and here is the reason for my question -- is track visualization. We would like to that, but unfortunately so far I have not found out how. There are some example scripts available, but they all do not work since they they look for some TGeoTrack objects which are apparently not present in our ROOT files, causing an error: Error in <TTree::SetBranchAddress>: unknown branch -> GeoTracks Is there a method for adding this branch to the tree, or has the track visualization process changed so I have to use another approach? Thanks a lot and sorry for me asking so simple questions Christian Leitold
Dear Christian, in your simulation macro you have to set: fRun->SetStoreTraj(kTRUE); then the GeoTracks should be created. Cheers, Tobias
Hey, thank you for your fast answer. To add the GeoTracks was really that simple! Unfortunately, I have another problem now: The script needs to create FairVTrack objects, the actual "visual" representation of the tracks, to draw them. But that does not work: Error: Symbol FairVTrack is not defined in current scope drawGLTracks.C:87: The FairVTrack object exists in my revision in trunk/base and should be compiled into libBase, but in fact, it is not. There exists the file trunk/base/CMakeLists.txt, which contains a list of files to be compiled into the library. There, FairVTrack.cxx is commented out. If I remove the comment, compilation works fine (I execute "make" in directory build), BUT it is not possible to load the library in the macro any more, the load process stops with an error: Load Error: Failed to load Dynamic link library /home/cleitold/pandaroot/fairsoft/build/lib/libBase.so We already had this kind of error before, when we unsuccessfully tried to add a new generator class to our PANDA ROOT. So, the more general question is now, how can I compile new classes into libraries without generating a crash when trying to load those libraries? Thanks Christian
Dear Christian, which script are you using to display your tracks? Cheers, Tobias
I use macro/run/drawGLTracks.C, the interesting (which means, crashing) part is: TGeoTrack *tr; TObjArray *TrList= geoMan->GetListOfTracks(); geoMan->SetAnimateTracks(); for (Int_t j=0; j< t->GetEntriesFast(); j++) { t->GetEntry(0); Double_t *point; for (Int_t i=0; i<fT->GetEntriesFast(); i++) { tr=(TGeoTrack *)fT->At(i); Int_t Np=tr->GetNpoints(); FairVTrack *pt = new FairVTrack(Np); pt->SetLineColor(tr->GetLineColor()); pt->SetLineWidth(2); pt->SetTrack(tr); pt->SetParticle((TParticle *)tr->GetParticle()); for (Int_t n=0; n<Np; n++){ point=tr->GetPoint(n); pt->SetPoint(n,point[0],point[1],point[2]); } pt->Draw(); } } As you can see, in the inner loop, the FairVTrack *pt is created, leading to the crash. Thanks Christian
Dear Christian, use the macro eventDisplay.C from macro/run/. You can visualize the different hits in the detectors, the Panda geometry and the tracks of particles. Cheers, Tobias
Hello, I have just tried eventDisplay.C, unfortunately, I still have library problems: Error in <TUnixSystem::DynamicPathName>: libEventDisplay[.so | .sl | .dl | .a | .dll] does not exist in [long list of paths follows] The libEventDisplay.so library file does not exist on my system and I see no way how to compile it, even though the source files all are where they should be. Maybe I should better open a new thread concerning my growing library problems? Kind regards Christian
You should enable the compilation of that package. Edit your trunk/CMakeLists.txt file and uncomment the line add_subdirectory(PndEventdisplay) Then, just do a new cmake and compile again pandaroot.
Thanks a lot Stefano, that worked, I have compiled the additional library! Now the thing I have left to do is actually SEE the tracks ... Kind regards Christian
Hi Christian, You might want to look at my slides from the last Collaboration Meeting. There is also a small introduction how to use the EventDisplay. I suppose you will find the latest Tutorial Wiki Site useful, too. Kind regards, Ralf.