15 #include <TRootEmbeddedCanvas.h>
16 #include <TGTextEdit.h>
17 #include <TLorentzVector.h>
23 #include <TIterator.h>
31 using std::ostringstream;
33 using namespace genie;
34 using namespace genie::utils;
35 using namespace genie::masterclass;
38 MCTruthDisplay::MCTruthDisplay(TRootEmbeddedCanvas * ec, TGTextEdit * gtx) :
54 LOG(
"MasterClass",
pINFO) <<
"Drawing input event diagram";
67 TEllipse grpx_target(0,0,R,R);
73 TIter event_iter(event);
74 while ( (p = dynamic_cast<GHepParticle *>(event_iter.Next())) ) {
92 string ghepstr = ghep.str();
96 string delim = string(
"\n");
97 while(ghepstr.find_first_of(delim) < ghepstr.length()) {
99 ghepstr.substr(0, ghepstr.find_first_of(delim)) );
100 ghepstr = ghepstr.substr(
101 ghepstr.find_first_of(delim)+1, ghepstr.length());
103 lines.push_back(ghepstr);
106 vector<string>::iterator line_iter;
107 for(line_iter = lines.begin(); line_iter != lines.end(); ++line_iter) {
108 fGTxt->AddLine( line_iter->c_str() );
TRootEmbeddedCanvas * fEmbeddedCanvas
void PrintEventRecord(EventRecord *event)
double Radius(int A, double Ro=constants::kNucRo)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static constexpr double A
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
STDHEP-like event record entry that can fit a particle or a nucleus.
void DrawDiagram(EventRecord *event)