Support #916
draw Particle By ID
Start date:
21 February 2012
Due date:
% Done:
100%
Estimated time:
Workflow:
New Issue
Description
Hi Chris,
I'm trying to implement the drawing particle colours by what type of particle they are. I can't quite remember how we did it before and was wondering if you remember? I've looked around and found this code which registers a new model for the visualisation.
G4TrajectoryDrawByParticleID* model = new G4TrajectoryDrawByParticleID; model->SetDefault("cyan"); model->Set("gamma", "green"); model->Set("e+", "magenta"); model->Set("e-", G4Colour(0.3, 0.3, 0.3)); visManager->RegisterModel(model);
I'm sure this belongs in MAUSVisManager.cc but can't seem to get it to compile? Perhaps I have put it in the wrong place? My MAUSVisManager.cc is attached.
Files
Updated by Rogers, Chris almost 12 years ago
Using the code you attached. Need
#include <G4TrajectoryDrawByParticleID.hh>
and also
G4TrajectoryDrawByParticleID* model = new G4TrajectoryDrawByParticleID; model->SetDefault("cyan"); model->Set("gamma", "green"); model->Set("e+", "magenta"); model->Set("e-", G4Colour(0.3, 0.3, 0.3)); RegisterModel(model); // NOTE THE CHANGE HERE
visManager is not a separate object.
I checked this compiles, I didn't try running it.
Updated by Rogers, Chris almost 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100