Hi Matevz:
Really nice to get you reply! Thank you for your quick echo.
Currently I'm using Root_v5.22.00 and Root_v5.24.00. There is no significant difference for those two versions noticed during my display. I'd be very happy to use the trunk and get involved in the root developement :slight_smile: Just telling me how to get the corresponding tarballs.
I'm really happy about the RnrSelf & SetPickable Stuff! That's exactly what I need!!
Now about the questions:
1) About the Boxset:
I use only 1 box in each Boxset, for, I want to attach the hit information to the boxset name. With your suggestion I send them pickable and now works quite nicely. ( Only 1 question, is it used too much resources if I keep an Boxset/Pointset for each calorimeter/tracker hit? )
About the size it's quite strange. My box is set with length = weight = 10* height, with an global scale factor acting on each dimension. So when I have the length = weighth >= 3 cm, it's properly showned; when I reduce the length to 2 cm, I need to swithch off the detector geometry & rotate a bit to get it displayed. With the cell size ~ 1cm (which is the real cell size according to current design), I cannot get it shown. The shift-left-click on the hits seems fine, see attached plot. I think the bug you mentioned about the GL calculation about if the object worth drawing is quite possible...
BTW, is there a way to set the transparency & lightness of the boxes?
2) About the Tracks:
Yes I tried the nice example on tutorials, and that's why I got myself totally puzzled (they works so nicely there!)...
The track is not a trivial stuff, for we can only estimate its path through the following information (reading from the MC Particle List in the data file), the Vtx point (creating point), the end point (dead point) and initial momentum, and based on your simulation, a set of detector hits created by this particle.
There is another question I want to ask, which maybe also concering this problem, is do we have a method to make sure that the track ends at an given point? So far to me, the 'MaxOrbs' is the only parameter I know concering the length of the helix. And I used a rather rude way to define the length for each charged track:
Seting the 'MaxOrbs' to a very small value, say
TEveTrackPropagator* propsetCharged = new TEveTrackPropagator();
propsetCharged->SetMaxOrbs(0.00001);
And attach the End point as its pathmark. Which, to my observation, for most of the cases works (some time causes track missing )... But I believe there should be some more elegant, straightforward method to get this job done.
Currently in my code, for neutral paritcle, low energy particles or particle with length between creating point and end point less than a threshold, I use a straight line to link the 2 points directly; and for Charged particle with proper momentum, I use an helix with some PathMarkers -- a charged track can have at most 3 PathMarkers in current version, they are:
1) The End point, used for every track.
2) The last hits in the tracker: if the track created in tracker region and end outside;
3) The muon detector hits with the longest distance from the VTX: mostly for muon only.
However, I found that the last two end points doesn't really constraint the track... see attached plot. (With some cout it do find the right position of the PathMarker, but just doesn't work) I don't know if its associated with my setting of MaxOrbs...
Here is the piece of codes I wrote for the PathMarker...
track = new TEveTrack(ChargedTrack, propsetCharged);
TEvePathMark* pm1 = new TEvePathMark(TEvePathMark::kDaughter);
TEvePathMark* pm2 = new TEvePathMark(TEvePathMark::kDaughter);
TEvePathMark* pm3 = new TEvePathMark(TEvePathMark::kDaughter);
if( (Vz<2350 && Vz>-2350 && GenRadius<1810) && (Ez>2350 || Ez<-2350 || EndRadius>1810) ) // if cross the board of TPC
{
std::string SETHitCollection = "SETCollection";
LCCollection* col = evt->getCollection( SETHitCollection ) ;
int nHits = col->getNumberOfElements();
int count = 0;
for(int j=0; j<nHits; j++)
{
SimTrackerHit* hit = dynamic_cast<SimTrackerHit*>( col->getElementAt(j) );
MCParticle* hitMCPart = dynamic_cast<MCParticle*>( hit->getMCParticle());
if(hitMCPart==part && count==0)
{
TEveVector SetHit(hit->getPosition()[0], hit->getPosition()[1], hit->getPosition()[2]);
pm1->fV.Set(SetHit);
cout<<"For "<<i<<"th Track, SET PathMarker Located!!"<<hit->getPosition()[0]<<"\t"<<hit->getPosition()[1]<<endl;
track->AddPathMark(*pm1);
count=1;
}
}
}
if ( (Vz<3381.6 && Vz>-3381.6 && GenRadius<3973.6) && (Ez>3381.6 || Ez<-3381.6 || EndRadius > 3973.6) ) // if end outside the HCAL
{
float MuonCaloHitDis = 0;
float EndPointDisMax = 0;
float Xmax = 0;
float Ymax = 0;
float Zmax = 0;
const std::vector< std::string >* strVec = evt->getCollectionNames() ;
for( name = strVec->begin() ; name != strVec->end() ; name++){
LCCollection* col = evt->getCollection( *name ) ;
string SubD (*name, 0, 4);
if ( SubD=="Muon" )
{
cout<<"Muon Calo Hit Located"<<endl;
int nMuonHits = col->getNumberOfElements();
for(int i = 0; i<nMuonHits; i++)
{
SimCalorimeterHit* hit11 = dynamic_cast<SimCalorimeterHit*>( col->getElementAt(i) );
MCParticle* hitMCPart11 = dynamic_cast<MCParticle*>( hit11->getParticleCont(0));
if( hitMCPart11==part )
{
MuonCaloHitDis = sqrt(hit11->getPosition()[0]*hit11->getPosition()[0]+hit11->getPosition()[1]*hit11->getPosition()[1]+hit11->getPosition()[2]*hit11->getPosition()[2]);
if(MuonCaloHitDis>EndPointDisMax)
{
EndPointDisMax = MuonCaloHitDis;
Xmax = hit11->getPosition()[0];
Ymax = hit11->getPosition()[1];
Zmax = hit11->getPosition()[2];
}
}
}
}
}
TEveVector MuonFarHit(Xmax, Ymax, Zmax);
if(EndPointDisMax>10)
{
pm2->fV.Set(MuonFarHit);
cout<<"For "<<i<<"th track, Muon Calo Hit PathMarker Set, X: "<<Xmax<<" Y: "<<Ymax<<" Z: "<<Zmax<<endl;
track->AddPathMark(*pm2);
}
}
pm3->fV.Set(End);
track->AddPathMark(*pm3);
3) About the OpenGL:
Version: Here is the output I got from type glinfo and I guess the version is 1.2... I must say I got lost with those information :slight_smile:
The OS I'm using is Fedora.
I tried a bit to target the object creating the OpenGL Error msg:
With only draw the geometry (Based on TGeoPGon classes), there still show 1 or 2 lines of 'GL Error invalid operation', and then no matter how I zoom & rotate, it just seems fine.
With calorimeter hits (TEveBoxset) & tracker hits (TEvePointset), clean, no error msg.
With estimated tracks based on TEveTrackPropagator, TEveTrack: printing lots of the error msg, espiceally when you rotate & zoom.
[manqi@localhost gear]$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe,
GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
client glx vendor string: SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control,
GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control,
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
GLX version: 1.2
GLX extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method,
GLX_SGIS_multisample, GLX_SGIX_fbconfig
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 2.1 Mesa 7.3-devel
OpenGL shading language version string: 1.10
OpenGL extensions:
GL_ARB_depth_texture, GL_ARB_draw_buffers, GL_ARB_fragment_program,
GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader,
GL_ARB_half_float_pixel, GL_ARB_imaging, GL_ARB_multisample,
GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_pixel_buffer_object,
GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shader_objects,
GL_ARB_shading_language_100, GL_ARB_shadow, GL_ARB_shadow_ambient,
GL_ARB_texture_border_clamp, GL_ARB_texture_compression,
GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle,
GL_ARB_transpose_matrix, GL_ARB_vertex_buffer_object,
GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos,
GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate,
GL_EXT_blend_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
GL_EXT_clip_volume_hint, GL_EXT_compiled_vertex_array, GL_EXT_convolution,
GL_EXT_copy_texture, GL_EXT_depth_bounds_test, GL_EXT_draw_range_elements,
GL_EXT_framebuffer_object, GL_EXT_framebuffer_blit, GL_EXT_fog_coord,
GL_EXT_gpu_program_parameters, GL_EXT_histogram, GL_EXT_multi_draw_arrays,
GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels,
GL_EXT_paletted_texture, GL_EXT_pixel_buffer_object,
GL_EXT_point_parameters, GL_EXT_polygon_offset, GL_EXT_rescale_normal,
GL_EXT_secondary_color, GL_EXT_separate_specular_color,
GL_EXT_shadow_funcs, GL_EXT_shared_texture_palette, GL_EXT_stencil_wrap,
GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D,
GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp,
GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_texture_sRGB,
GL_EXT_vertex_array, GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object,
GL_ATI_blend_equation_separate, GL_ATI_texture_env_combine3,
GL_ATI_texture_mirror_once, GL_ATI_fragment_shader,
GL_ATI_separate_stencil, GL_IBM_multimode_draw_arrays,
GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
GL_INGR_blend_func_separate, GL_MESA_pack_invert, GL_MESA_program_debug,
GL_MESA_resize_buffers, GL_MESA_texture_array, GL_MESA_ycbcr_texture,
GL_MESA_window_pos, GL_NV_blend_square, GL_NV_fragment_program,
GL_NV_light_max_exponent, GL_NV_point_sprite, GL_NV_texture_rectangle,
GL_NV_texgen_reflection, GL_NV_vertex_program, GL_NV_vertex_program1_1,
GL_OES_read_format, GL_SGI_color_matrix, GL_SGI_color_table,
GL_SGI_texture_color_table, GL_SGIS_generate_mipmap,
GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
GL_SGIS_texture_lod, GL_SGIX_depth_texture, GL_SGIX_shadow,
GL_SGIX_shadow_ambient, GL_SUN_multi_draw_arrays
3 GLX Visuals
visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
0x21 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x22 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x56 32 tc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
32 GLXFBConfigs:
visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
0x57 0 tc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x58 0 tc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x59 0 tc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x5a 0 tc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x5b 0 tc 0 32 0 r . . 8 8 8 8 0 0 8 0 0 0 0 0 0 None
0x5c 0 tc 0 32 0 r . . 8 8 8 8 0 0 8 16 16 16 16 0 0 Slow
0x5d 0 tc 0 32 0 r y . 8 8 8 8 0 0 8 0 0 0 0 0 0 None
0x5e 0 tc 0 32 0 r y . 8 8 8 8 0 0 8 16 16 16 16 0 0 Slow
0x5f 0 tc 0 32 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x60 0 tc 0 32 0 r . . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x61 0 tc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x62 0 tc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x63 0 tc 0 32 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x64 0 tc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x65 0 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x66 0 tc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x67 0 dc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x68 0 dc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x69 0 dc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x6a 0 dc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x6b 0 dc 0 32 0 r . . 8 8 8 8 0 0 8 0 0 0 0 0 0 None
0x6c 0 dc 0 32 0 r . . 8 8 8 8 0 0 8 16 16 16 16 0 0 Slow
0x6d 0 dc 0 32 0 r y . 8 8 8 8 0 0 8 0 0 0 0 0 0 None
0x6e 0 dc 0 32 0 r y . 8 8 8 8 0 0 8 16 16 16 16 0 0 Slow
0x6f 0 dc 0 32 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x70 0 dc 0 32 0 r . . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x71 0 dc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x72 0 dc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x73 0 dc 0 32 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x74 0 dc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x75 0 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x76 0 dc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
<img src="/uploads/default/original/2X/6/6176c6785ba1b467afe3b54e0e5540320c7beecf.png" width="690" height="431"><br/>