Handle drawing the GEANT4 (truth) hits.
More...
#include <TG4HitChangeHandler.hxx>
Handle drawing the GEANT4 (truth) hits.
Definition at line 13 of file TG4HitChangeHandler.hxx.
EDep::TG4HitChangeHandler::TG4HitChangeHandler |
( |
| ) |
|
Definition at line 17 of file TG4HitChangeHandler.cxx.
18 fG4HitList =
new TEveElementList(
"g4HitList",
"Geant4 Truth Hits");
TEveElementList * fG4HitList
The GEANT4 hits to draw in the event.
EDep::TG4HitChangeHandler::~TG4HitChangeHandler |
( |
| ) |
|
void EDep::TG4HitChangeHandler::Apply |
( |
| ) |
|
|
virtual |
Draw the trajectories into the current scene.
Implements EDep::TVEventChangeHandler.
Definition at line 27 of file TG4HitChangeHandler.cxx.
32 std::cout <<
"G4 hits disabled" <<
std::endl;
36 std::cout <<
"Handle the geant4 truth hits" <<
std::endl;
39 double minEnergy = 0.18;
40 double maxEnergy = 3.0;
46 std::cout <<
"Show hits for " << detector->first
47 <<
" (" << detector->second.size() <<
" hits)"<<
std::endl;
48 TEveElementList* hitList
49 =
new TEveElementList(
50 detector->first.c_str(),
51 (
"Energy Deposit for " + detector->first).c_str());
53 g4Hit != detector->second.end();
55 double energy = g4Hit->GetEnergyDeposit();
56 double length = g4Hit->GetTrackLength();
58 if (length>0.01) dEdX /= length;
60 int contrib = g4Hit->Contrib.front();
63 TEveLine* eveHit =
new TEveLine(2);
64 eveHit->SetName(detector->first.c_str());
65 std::ostringstream
title;
66 title <<
"Hit(" << particle <<
")";
68 <<
" " << dEdX*1000.0 <<
" keV/mm";
69 title <<
" for " << length <<
" mm" 70 <<
" at (" << g4Hit->GetStart().X() <<
" mm" 71 <<
"," << g4Hit->GetStart().Y() <<
" mm" 72 <<
"," << g4Hit->GetStart().Z() <<
" mm" 75 eveHit->SetTitle(title.str().c_str());
76 eveHit->SetLineWidth(5);
83 g4Hit->GetStart().X(),
84 g4Hit->GetStart().Y(),
85 g4Hit->GetStart().Z());
89 g4Hit->GetStop().Z());
90 hitList->AddElement(eveHit);
TG4TrajectoryContainer Trajectories
TEveElementList * fG4HitList
The GEANT4 hits to draw in the event.
Q_EXPORT QTSManip setprecision(int p)
double dEdX(double KE, const simb::MCParticle *part)
TG4HitSegmentDetectors SegmentDetectors
static TEventDisplay & Get(void)
TG4Event * gEDepSimEvent
The event being displayed.
QTextStream & endl(QTextStream &s)
TEveElementList* EDep::TG4HitChangeHandler::fG4HitList |
|
private |
The documentation for this class was generated from the following files: