RecoilUtilsED3D
Page maintainer: Andreas
| This page is considered done. It been reviewed by Alberto. There may be missing elements, but they are all flagged and the text has no errors. |
The following is a short description of the recoil detector 3D event display ED3D.
Startup
To start the event display type
- For regular data dad files:
ed3d -rfil datafile
- For HRC data files in ROOT format:
ed3d -root datafile
- For MC data dad files:
ed3d -mc -rfil datafile
- For MC HRC data files in ROOT format:
ed3d -mc -root datafile
Windows
Main Control Window
Track & Tracking Method Selection Tab
In this tab the user can select which tracking methods and track hypothesis are shown. In addition one can select if untracked spacepoints, MC tracks and RC tracks should be shown. In the list view individual tracks (RD, MC and RC) can be marked to be drawn.
For all toolbar buttons tooltips are provided which give additional information.
Filter Tab
For easy navigation, the user can apply various filters. This way only events will be shown that satisfy all active filters. In addition to the predefined filters the user can add own filters by implementing a filter class derived form ED3DFilterUser and putting it into the directory ~/.ed3d. The user filters will be compiled when ed3d is started. For user filter examples have a look at the shared/ed3d directory of the RecoilUtils distribution. There is also an example filter provided on the bottom of this page.
Geometry & Drawing Tab
In the Geometry & Drawing Tab one can choose what will be drawn. In the top box one can choose the different detector components. In the second box (Track Drawing Options) the user can select how tracks will be drawn. The third box deals with drawing options for spacepoints. The default for MC hits is to sum up all mcHits for one track (same mcTrack.ID) and detector ID (dgDETS) and only display one "virtual" mcHit. The option Draw all mcHits bypasses this logic and draws really all mcHits.
All checkboxes are provided with tooltips that give additional information.
Style Tab
In the style tab one can choose the background color of the 3D viewer window for both on screen displaying and printing. One can also select the font for printing.
Bookmark Tab
Events or tracks of interest can be bookmarked. Once bookmarked the event will appear in the list view and can be selected later. The individual bookmarks also have information on the drawing options and the tracks that were selected when the bookmark was created. Bookmarks can also be saved to a root file and later loaded with ed3d. To do so, start ed3d in the following way:
ed3d -bm bookmarkfile
3D Viewer Window
This is the 3D viewer window of ED3D. ED3D can have up to 4 independent viewer windows in parallel. By moving the mouse over tracks and spacepoints one gets additional information on the selected object in form of tooltips.
Again, all toolbar buttons are provided with tooltips that give additional information.
Info Window
For selected spacepoints of tracks additional information is printed both in the terminal and in the Info Window. For a selected track for instance, all information on the used spacepoints is printed. For a selected spacepoint the information on all tracks this particular spacepoint is used in, is printed.
OpenGL Window
The OpenGL viewer is an alternative viewer which overs a "real" 3D view. It is, however, not possible to select tracks or spacepoints.
Additional Information
Example User Filter
The following is a simple example user filter that selects events with a track that has a spacepoint in the outer recoil silicon sensors of quadrant 2.
SiliconO2.h
#include "ED3DFilterUser.hh"
#include "ED3DEvent.hh"
#include "ED3DTrack.hh"
#include "ED3DSpacePoint.hh"
#ifndef SILICONO2_HH
#define SILICONO2_HH 1
class SiliconO2 : public ED3DFilterUser
{
public:
/* the constructor
*/
SiliconO2(const char * name);
/* the destructor
*/
virtual ~SiliconO2();
/* The current event is checked here. This method should
* return kTRUE if the event passed the filter and kFALSE
* otherwise
*/
virtual Bool_t Result(const ED3DEvent * ev);
/* Returns a short description of the filter. This string
* is used as a tooltip within ed3d
*/
virtual const char * Description();
ClassDef(SiliconO2,0);
};
#endif
SiliconO2.C
#include <HDgDETS.hh>
#include <ED3DTrack.hh>
#include <ED3DSpacePoint.hh>
#include "SiliconO2.h"
ClassImp(SiliconO2);
SiliconO2::SiliconO2(const char * name)
:ED3DFilterUser(name)
{
}
SiliconO2::~SiliconO2()
{
}
Bool_t SiliconO2::Result(const ED3DEvent * ev)
{
Int_t S1O2 = gDETS->GetId(hS1O2);
Int_t S2O2 = gDETS->GetId(hS2O2);
if (!fIsActive) return kTRUE;
Bool_t good = kFALSE;
ED3DTrack * tr;
for (Int_t t=0;t<ev->GetNTracks();t++) {
tr = ev->GetTrack(t);
tr->SetDraw(kFALSE);
ED3DSpacePoint * sp;
for (Int_t s=0;s<tr->GetNSpacePoints();s++) {
sp = tr->GetSpacePoint(s);
if (sp->GetDgDets()==S1O2 __ sp->GetDgDets()==S2O2) {
tr->SetDraw(kTRUE);
good = kTRUE;
}
}
}
return good;
}
const char * SiliconO2::Description()
{
return "Allow events with at least on track with a spacepoint\nin O2 of the silicon detector";
}
For more information have a look at the ed3d section of the RecoilUtils class documentation.
Tutorial Video
There is a short tutorial video available on the recoil part of the HERMES web page (ed3d_tutorial.avi). Although it was created using an old version of ed3d, you should still get the idea on how to use the event display.




