GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AgataEventDisplay.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004-2006 by Olivier Stezowski & Christian Finck *
3  * stezow(AT)ipnl.in2p3.fr, cfinck(AT)ires.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * FreAgataEventDisplaye Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #include "Riostream.h"
24 
25 #ifndef Gw_AgataEventDisplay
26 #include "AgataEventDisplay.h"
27 #endif
28 
29 #ifndef Gw_AgataEventContainer
30 #include "AgataEventContainer.h"
31 #endif
32 
33 #ifndef Gw_AgataGeometryTransformer
35 #endif
36 
37 #ifndef Gw_AgataHitDisplay
38 #include "AgataHitDisplay.h"
39 #endif
40 
41 #ifndef Gw_AgataTrackDisplay
42 #include "AgataTrackDisplay.h"
43 #endif
44 
45 // root include
46 #ifndef ROOT_TEveGeoNode
47 #include "TEveGeoNode.h"
48 #endif
49 
50 #ifndef ROOT_TEveManager
51 #include "TEveManager.h"
52 #endif
53 
54 #ifndef ROOT_TEveBrowser
55 #include "TEveBrowser.h"
56 #endif
57 
58 #ifndef ROOT_TGeoManager
59 #include "TGeoManager.h"
60 #endif
61 
62 #ifndef ROOT_TGeoNode
63 #include "TGeoNode.h"
64 #endif
65 
66 #ifndef ROOT_TGeoVolume
67 #include "TGeoVolume.h"
68 #endif
69 
70 #ifndef ROOT_TGButton
71 #include "TGButton.h"
72 #endif
73 
74 #ifndef ROOT_TGLViewer
75 #include "TGLViewer.h"
76 #endif
77 
78 #ifndef ROOT_TGLabel
79 #include "TGLabel.h"
80 #endif
81 
82 #ifndef ROOT_TGTextView
83 #include "TGTextView.h"
84 #endif
85 
86 #ifndef ROOT_TGTextEntry
87 #include "TGTextEntry.h"
88 #endif
89 
90 #ifndef ROOT_TList
91 #include "TList.h"
92 #endif
93 
94 #ifndef ROOT_TNamed
95 #include "TNamed.h"
96 #endif
97 
98 #ifndef ROOT_TSystem
99 #include "TSystem.h"
100 #endif
101 
102 using namespace Gw;
103 
104 //
106 
107 AgataEventDisplay* AgataEventDisplay::fgInstance = 0x0;
108 
109 Bool_t AgataEventDisplay::fgAgataGeoDone = false;
110 Bool_t AgataEventDisplay::fgDanteGeoDone = false;
111 Bool_t AgataEventDisplay::fgPrismaGeoDone = false;
112 Bool_t AgataEventDisplay::fgPassiveGeoDone = false;
113 Bool_t AgataEventDisplay::fgFloorGeoDone = true;
114 
115 const Char_t* AgataEventDisplay::fgDefaultAgataPath = "./";
116 const Char_t* AgataEventDisplay::fgDefaultDanteConf = "Dante.conf";
117 const Char_t* AgataEventDisplay::fgDefaultPrismaConf = "solver.conf";
118 
119 //__________________________________________________________
121 {
122  if (fgInstance == 0x0)
123  fgInstance = new AgataEventDisplay();
124 
125  return fgInstance;
126 }
127 
128 //__________________________________________________________
129 AgataEventDisplay::AgataEventDisplay()
130  : BaseEventDisplay(),
131  fAgataContainer(new AgataEventContainer()),
132  fQuadHitList(new TList()),
133  fLineTrackList(new TList()),
134  fBoxDefWidth(0.4),
135  fBoxDefHeight(0.4),
136  fQuadDefWidth(0.4),
137  fQuadDefHeight(0.4),
138  fInfoView(0x0),
139  fEventEntry(0x0),
140  fGUIFlag(true)
141 {
142  // default constructor
143  fLog.GetProcessName() = "AgataEventDisplay";
144  fQuadHitList->SetOwner(true);
145  fLineTrackList->SetOwner(true);
146 
147  if ( gGeoManager == NULL ) { // a new Geo Manager is created if needed
148 
149  new TGeoManager("Agata","Creating Geometry AGATA");
150 
151  TGeoMaterial *mat = new TGeoMaterial("Vacuum",0,0,0);
152  TGeoMedium *med = new TGeoMedium("Vacuum",1,mat);
153 
154  fTopVolume = gGeoManager->MakeBox("World",med,100,100,100);
155  gGeoManager->SetTopVolume(fTopVolume);
156  }
157 }
158 
159 //__________________________________________________________
161 {
162  // default destructor
163  delete fAgataContainer;
164  delete fQuadHitList;
165  delete fLineTrackList;
166  if (fInfoView)
167  delete fInfoView;
168  if (fEventEntry)
169  delete fEventEntry;
170  if (fRefreshButton)
171  fRefreshButton->Delete();
172 }
173 
174 
175 //__________________________________________________________
176 void AgataEventDisplay::BuildDefaultGeometry(Bool_t danteGeo, Bool_t prismaGeo, Bool_t agataGeo, Bool_t passiveGeo)
177 {
178  TGeoVolume* vol = 0x0;
179  if (agataGeo && !fgAgataGeoDone) {
180  TGeoRotation* rot = new TGeoRotation();
181  rot->RotateY(180.);
182  vol = Gw::AgataGeometryTransformer::BuildAgata(fgDefaultAgataPath);
183  if (vol) {
184  AddGeometry(vol, rot);
185  fgAgataGeoDone = true;
186  }
187  }
188 
189  if (passiveGeo && !fgPassiveGeoDone) {
190 
191  TGeoHMatrix transfo;
192  TGeoRotation rot;
193  rot.RotateY(42);
194  TGeoTranslation trans(-18*TMath::Sin(42*TMath::DegToRad()), 0., -18*TMath::Cos(42*TMath::DegToRad()));
195 
196  transfo = trans*rot;
197  TGeoHMatrix *hm = new TGeoHMatrix(transfo);
198 
199  vol = Gw::AgataGeometryTransformer::AddBeamPipe(18, 0.1, 0.2);
200  if (vol) {
201  AddGeometry(vol, hm);
202  fgPassiveGeoDone = true;
203  }
204 
206  if (vol) {
207  AddGeometry(vol);
208  fgPassiveGeoDone = true;
209  }
210 
211  if (fgFloorGeoDone) {
212  TGeoTranslation* trans2 = new TGeoTranslation();
213  if (!prismaGeo) {
214  trans2->SetDy(-82.);
215  trans2->SetDz(-8.);
216  vol = Gw::AgataGeometryTransformer::AddFloor(20, 0.1, 25);
217  } else {
218  trans2->SetDx(-260.);
219  trans2->SetDy(-82.);
220  trans2->SetDz(280);
221  vol = Gw::AgataGeometryTransformer::AddFloor(350, 0.1, 360);
222  }
223  if (vol) {
224  AddGeometry(vol, trans2);
225  fgPassiveGeoDone = true;
226  }
227  }
228  }
229 
230  if (danteGeo && !fgDanteGeoDone) {
231  TGeoRotation* rot = new TGeoRotation();
232  rot->RotateY(90);
233  vol = Gw::AgataGeometryTransformer::BuildDante(fgDefaultDanteConf);
234  if (vol) {
235  AddGeometry(vol, rot);
236  fgDanteGeoDone = true;
237  }
238  }
239 
240  if (prismaGeo && !fgPrismaGeoDone) {
241  vol = Gw::AgataGeometryTransformer::BuildPrisma(fgDefaultPrismaConf);
242  if (vol) {
243  AddGeometry(vol);
244  fgPrismaGeoDone = true;
245  }
246  }
247 
248 }
249 
250 //__________________________________________________________
251 const Char_t* AgataEventDisplay::RegisterBranch(Option_t* type)
252 {
253  return fAgataContainer->RegisterBranch(type);
254 }
255 
256 //__________________________________________________________
257 void AgataEventDisplay::SetTrackStyle(const Char_t* s, Option_t* type)
258 {
259  fMapStyle[type] = s;
260 }
261 
262 
263 //__________________________________________________________
265 {
266  fLog.SetProcessMethod("ShowDisplay()");
267 
268  if (fgIsDisplayed) {
269  gEve->FullRedraw3D(kTRUE);
270  fLog << warning << "Display already open, just redraw canvas" << dolog;
271  return;
272  }
273 
274  TEveManager::Create();
275  gEve->AddEvent(this);
276 
277  if (gGeoManager) {
278  TGeoNode* topNode = gGeoManager->GetTopNode();
279  TGeoManager::SetVerboseLevel(0);
280  if (topNode == 0x0) {
281  fLog << error << "No top node in geometry" << dolog;;
282  return;
283  } else {
284  TEveGeoTopNode* out = new TEveGeoTopNode(gGeoManager, topNode);
285  gEve->AddGlobalElement(out);
286  }
287  } else {
288  fLog << warning << "No geometry loaded" << nline;
289  }
290 
291  std::map<const Char_t*, const Char_t*>::iterator it;
292 
293  for (Int_t i = 0; i < fAgataContainer->GetNofBranches(); ++i) {
294  const Char_t* type = AgataEventContainer::GetTypeName(i);
295  AgataHitDisplay* quadHits = new AgataHitDisplay(Form("%s %s", type, "Hits"));
296  quadHits->SetMaxEnergy(fMaxEnergy);
297  quadHits->SetDefWidth(fQuadDefWidth);
298  quadHits->SetDefHeight(fQuadDefHeight);
299  quadHits->SetPickable(true);
300  fQuadHitList->Add(quadHits);
301 
302  AgataTrackDisplay* lineTracks = new AgataTrackDisplay(Form("%s %s", type, "Tracks"));
303  // loop over map to be sure
304  for (it = fMapStyle.begin(); it != fMapStyle.end(); ++it) {
305  TString sType(it->first);
306  if (sType.Contains(type)) {
307  TString sStyle(it->second);
308  lineTracks->SetStyle(sStyle);
309  }
310  }
311 
312  lineTracks->SetMaxEnergy(fMaxEnergy);
313  lineTracks->SetDefWidth(fBoxDefWidth);
314  lineTracks->SetDefHeight(fBoxDefHeight);
315  lineTracks->SetPickable(true);
316  fLineTrackList->Add(lineTracks);
317  }
318 
319  if (fGUIFlag)
320  MakeGUI();
321 
322 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,24,0)
323  TGLViewer* v = gEve->GetDefaultGLViewer();
324 #else
325  TGLViewer* v = gEve->GetGLViewer();
326 #endif
327 
328  v->SetClearColor(kWhite);
329 
330  gEve->FullRedraw3D(kTRUE);
331 
332  fgIsDisplayed = true;
333 
334  fLog << dolog;
335 }
336 
337 //__________________________________________________________
339 {
340 
341  TEveBrowser* browser = gEve->GetBrowser();
342  browser->StartEmbedding(TRootBrowser::kLeft);
343 
344  TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
345  frmMain->SetWindowName("XX GUI");
346  frmMain->SetCleanup(kDeepCleanup);
347 
348  TGHorizontalFrame *eventFrame = new TGHorizontalFrame(frmMain);
349 
350  TString icondir( Form("%s/icons/", gSystem->Getenv("ROOTSYS")) );
351  TGPictureButton* b = 0x0;
352 
353  b = new TGPictureButton(eventFrame, gClient->GetPicture(icondir + "ReloadPage.gif"));
354  eventFrame->AddFrame(b);
355  b->SetToolTipText("First Event");
356  b->Connect("Clicked()", "Gw::AgataEventDisplay", this, "FirstEvent()");
357 
358  b = new TGPictureButton(eventFrame, gClient->GetPicture(icondir + "GoBack.gif"));
359  eventFrame->AddFrame(b);
360  b->SetToolTipText("Previous Event");
361  b->Connect("Clicked()", "Gw::AgataEventDisplay", this, "PrevEvent()");
362 
363  b = new TGPictureButton(eventFrame, gClient->GetPicture(icondir + "GoForward.gif"));
364  eventFrame->AddFrame(b);
365  b->SetToolTipText("Next Event");
366  b->Connect("Clicked()", "Gw::AgataEventDisplay", this, "NextEvent()");
367 
368  fRefreshButton = new TGCheckButton(eventFrame, "Refresh", 1);
369  fRefreshButton->SetState(kButtonDown);
370  eventFrame->AddFrame(fRefreshButton, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 5, 0));
371  frmMain->AddFrame(eventFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 5, 5));
372 
373  TGVerticalFrame *infoFrameView = new TGVerticalFrame(frmMain);
374  fEventEntry = new TGTextEntry(infoFrameView);
375  infoFrameView->AddFrame(fEventEntry, new TGLayoutHints(kLHintsLeft | kLHintsCenterY |
376  kLHintsExpandX, 2, 10, 0, 10));
377 
378  TGLabel* infoName = new TGLabel(infoFrameView, "Selection:");
379  infoFrameView->AddFrame(infoName, new TGLayoutHints(kLHintsLeft | kLHintsTop, 2, 0, 5, 5));
380 
381  fInfoView = new TGTextView(infoFrameView, 300, 400);
382  fInfoView->ShowBottom();
383  infoFrameView->AddFrame(fInfoView, new TGLayoutHints(kLHintsLeft | kLHintsCenterY |
384  kLHintsExpandX, 2, 10, 0, 0));
385 
386  TGTextButton* clearInfo = new TGTextButton(infoFrameView,"&Clear");
387  clearInfo->Connect("Clicked()","Gw::AgataEventDisplay",this,"ClearInfoView()");
388  clearInfo->SetToolTipText("Clear Info View");
389  infoFrameView->AddFrame(clearInfo, new TGLayoutHints(kLHintsLeft | kLHintsCenterY,15,5,3,4));
390 
391  frmMain->AddFrame(infoFrameView, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 5, 5));
392  frmMain->MapSubwindows();
393  frmMain->Resize();
394  frmMain->MapWindow();
395  browser->StopEmbedding();
396  browser->SetTabTitle("Info", 0);
397 
398  for (Int_t i = 0; i < fAgataContainer->GetNofBranches(); ++i) {
399  AgataHitDisplay* quadHits = static_cast<AgataHitDisplay*> (fQuadHitList->At(i));
400  quadHits->SetEmitSignals(true);
401  quadHits->Connect("SecSelected(TEveDigitSet*, Int_t )", "Gw::AgataEventDisplay", this, "UpdateHitInfo(TEveDigitSet*, Int_t)");
402 
403  AgataTrackDisplay* lineTracks = static_cast<AgataTrackDisplay*> (fLineTrackList->At(i));
404  lineTracks->SetEmitSignals(true);
405  lineTracks->Connect("SecSelected(TEveDigitSet*, Int_t )", "Gw::AgataEventDisplay", this, "UpdateTrackInfo(TEveDigitSet*, Int_t)");
406  }
407 
408 }
409 
410 //__________________________________________________________
411 void AgataEventDisplay::UpdateHitInfo(TEveDigitSet* qs, Int_t idx)
412 {
413  AgataHitDisplay* quadHits = dynamic_cast<AgataHitDisplay*> (qs);
414 
415  fInfoView->AddLine( Form("%s # %3d with energy: %3d\n", quadHits->GetName(), idx, quadHits->GetSelectedValue()) );
416 }
417 
418 //__________________________________________________________
419 void AgataEventDisplay::UpdateTrackInfo(TEveDigitSet* qs, Int_t idx)
420 {
421  AgataTrackDisplay* lineTracks = dynamic_cast<AgataTrackDisplay*> (qs);
422 
423  std::pair<Int_t, Int_t> p;
424  p = lineTracks->GetIndexes(idx);
425 
426  fInfoView->AddLine( Form("%s # %2d:", lineTracks->GetName(), p.first) );
427  fInfoView->AddLine( Form(" associated hit# %2d\n", p.second) );
428  fInfoView->AddLine( Form(" and energy: %3d\n", lineTracks->GetSelectedValue()) );
429 }
430 
431 //__________________________________________________________
433 {
434  // clear log message
435  fInfoView->Clear();
436  fInfoView->ShowBottom();
437 }
438 
439 //__________________________________________________________
441 {
442  fLog.SetProcessMethod("FirstEvent()");
443 
444  // reset
445  fCurrentEventId = 0;
446 
447  if (!fFirstEventDone) {
448  for (Int_t i = 0; i < fAgataContainer->GetNofBranches(); ++i) {
449  AgataHitDisplay* quadHits = static_cast<AgataHitDisplay*> (fQuadHitList->At(i));
450  quadHits->ResetHits();
451  gEve->AddElement(quadHits);
452 
453  AgataTrackDisplay* lineTracks = static_cast<AgataTrackDisplay*> (fLineTrackList->At(i));
454  lineTracks->ResetTracks();
455  gEve->AddElement(lineTracks);
456  }
457  }
458 
459  UpdateElements();
460 
461  fLog << dolog;
462  fFirstEventDone = true;
463 }
464 
465 //__________________________________________________________
467 {
468  fLog.SetProcessMethod("NextEvent()");
469 
470  if (fFirstEventDone == false) {
471  fLog << warning << "Reseting iterator by calling FirstEvent method" << nline;
472  FirstEvent();
473  fFirstEventDone = true;
474  }
475 
476  if (++fCurrentEventId >= fAgataContainer->GetNofEvents()) {
477  fLog << warning << "Already last event" << dolog;
478  fCurrentEventId = fAgataContainer->GetNofEvents()-1;
479  return;
480  }
481 
482  UpdateElements();
483  fLog << dolog;
484 }
485 
486 //__________________________________________________________
488 {
489  fLog.SetProcessMethod("PrevEvent()");
490 
491  if (fFirstEventDone == false) {
492  fLog << warning << "Click on first event before" << nline;
493  return;
494  }
495 
496  if (--fCurrentEventId < 0) {
497  fLog << warning << "Already first event" << dolog;
498  fCurrentEventId = 0;
499  return;
500  }
501 
502  UpdateElements();
503  fLog << dolog;
504 }
505 
506 //__________________________________________________________
508 {
509  fAgataContainer->ClearEvents();
510  fCurrentEventId = 0;
511  fFirstEventDone = false;
512 }
513 
514 //__________________________________________________________
516 {
517 
518  fLog.SetProcessMethod("UpdateElements()");
519 
520  if (fGUIFlag)
521  fEventEntry->SetText(Form("Event number: %d out of %d", fCurrentEventId, fAgataContainer->GetNofEvents()));
522 
523  for (Int_t i = 0; i < fAgataContainer->GetNofBranches(); ++i) {
524 
525  Option_t* type = AgataEventContainer::GetTypeName(i);
526  AgataHitDisplay* quadHits = static_cast<AgataHitDisplay*> (fQuadHitList->At(i));
527  AgataTrackDisplay* lineTracks = static_cast<AgataTrackDisplay*> (fLineTrackList->At(i));
528 
529  if (!fGUIFlag || (fGUIFlag && fRefreshButton->IsOn())) {
530  quadHits->ResetHits();
531  lineTracks->ResetTracks();
532  }
533 
534  TClonesArray* hitList = 0x0;
535  TrackHit* tHit = 0x0;
536  StdHit* sHit = 0x0;
537 
538  hitList = fAgataContainer->GetTrackList(fCurrentEventId, type, false);
539  if (hitList == 0x0) {
540  fLog << debug << Form("Track not available for this event in type %s", type) << dolog;
541  } else {
542 
543  Int_t nHits = hitList->GetEntries();
544  printf("%s Tracks display %d\n", type, nHits);
545  for (Int_t i = 0; i < nHits; ++i) {
546 
547  TObject* obj = hitList->At(i);
548 
549  tHit = dynamic_cast<TrackHit*> ( obj );
550 
551 
552  Float_t eTot = tHit->GetE();
553  Float_t xOld = 0.;
554  Float_t yOld = 0.;
555  Float_t zOld = 0.;
556 
557  //printf("TrackHit Display %f %f %f %f\n", tHit->GetX(), tHit->GetY(), tHit->GetZ(), eTot);
558 
559  lineTracks->AddNewTrack();
560 
561  for (Int_t j = 0; j < tHit->GetNbHits(); ++j) {
562  Float_t x = tHit->GetHit(j)->GetX();
563  Float_t y = tHit->GetHit(j)->GetY();
564  Float_t z = tHit->GetHit(j)->GetZ();
565  Float_t e = tHit->GetHit(j)->GetE();
566 
567  // avoid first hit nil (in some case)
568  if (x == 0.0 && y == 0.0 && z == 0.0) continue;
569 
570  // put total energy for last hit
571  if (j != 0) {
572  lineTracks->AddTracklet(e, xOld, yOld, zOld, x, y, z);
573  //printf("TrackHit Display %f %f %f %f\n", x, y, z, e);
574  } else {
575  lineTracks->AddTracklet(eTot, xOld, yOld, zOld, x, y, z, true);
576  //printf("TrackHit Display %f %f %f %f\n", x, y, z, eTot);
577  }
578  xOld = tHit->GetHit(j)->GetX();
579  yOld = tHit->GetHit(j)->GetY();
580  zOld = tHit->GetHit(j)->GetZ();
581  }
582  }
583  }
584 
585  hitList = fAgataContainer->GetHitList(fCurrentEventId, type, false);
586  if (hitList == 0x0) {
587  fLog << debug << Form("Hit not available for this event in type %s", type) << dolog;
588  } else {
589 
590  Int_t nHits = hitList->GetEntries();
591  //printf("Hits display %d\n", nHits);
592  for (Int_t i = 0; i < nHits; ++i) {
593 
594  TObject* obj = hitList->At(i);
595 
596  sHit = dynamic_cast<StdHit*> ( obj );
597 
598  // just display hits
599  Float_t x = sHit->GetX();
600  Float_t y = sHit->GetY();
601  Float_t z = sHit->GetZ();
602  Float_t e = sHit->GetE();
603  //printf("Hit Display %f %f %f\n", x, y, z);
604  quadHits->AddHit(e, x, y, z);
605  quadHits->QuadId(new TNamed(Form("hit %d", i), "Hit Only"));
606  }
607 
608  }
609  // refit anyway
610  quadHits->RefitPlex();
611  lineTracks->RefitPlex();
612  }
613  gEve->FullRedraw3D(kFALSE);
614 
615 }
616 
617 
618 
AgataEventContainer class that contains agata event to be displayed.
TBrowser * b
const Char_t * RegisterBranch(Option_t *type="")
Register branch, return name of type.
printf("******************************************************************** \n")
virtual Float_t GetY() const
void AgataTrackDisplay(Int_t nEvents=100)
Macro that generates gamma rays from a given level scheme and generated randomly associated positions...
static const Char_t * GetTypeName(Int_t idx)
Get type name.
AgataTrackDisplay a class to display tracks on event.
LogMessage & error(LogMessage &)
const Char_t * RegisterBranch(Option_t *type="")
Register branch.
static TGeoVolume * AddTarget(const Float_t dx=0.8, const Float_t dy=0.8, const Float_t dz=0.05, const char *targetName="Target", TGeoMaterial *mat=0x0)
Add beam pipe.
LogMessage & warning(LogMessage &)
AgataEventDisplay a class to work on a specific event display.
void ResetTracks()
Reset tracks.
BaseEventDisplay base class to work on event display.
static TGeoVolume * BuildPrisma(const char *prismaConf="solver.conf", Float_t dzMCP=25., Float_t dzQpole=54., Float_t dzDipole=160., Float_t dzDipMWPC=328.5, const char *nameMCP="PrismaMCP", const char *nameQPole="PrismaQpole", const char *nameDipole="PrismaDipole", const char *nameMWPC="PrismaMWPC", const char *prismaName="Prisma")
Build Prisma.
virtual Float_t GetZ() const
Int_t GetSelectedValue()
Get current digit value.
LogMessage & nline(LogMessage &)
void UpdateTrackInfo(TEveDigitSet *qs, Int_t idx)
Update tracks info.
TClonesArray * GetHitList(Int_t ievent, Option_t *type="Agata", Bool_t warn=true)
get array
void SetStyle(TString s)
Set style (rec/cone)
virtual Float_t GetX() const
Setter position & energy.
Int_t GetSelectedValue()
Get selected digit value.
void BuildDefaultGeometry(Bool_t danteGeo=true, Bool_t prismaGeo=true, Bool_t agataGeo=true, Bool_t passiveGeo=true)
void AddHit(Float_t e, Float_t x, Float_t y, Float_t z)
Add hit.
void AddTracklet(Float_t e, Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2, Bool_t eTot=false)
Add Track.
void ClearInfoView()
Clear info view.
static TGeoVolume * BuildDante(const char *danteConf="Dante.conf", const char *basemoduleName="Module", const char *danteName="Dante")
Build Dante.
std::pair< Int_t, Int_t > GetIndexes(Int_t index)
Get index pair.
StdHit * GetHit(Int_t i=0) const
Get Hit number i of the track (already added with NewHit !!)
static TGeoVolume * AddBeamPipe(const Float_t dZ=18, const Float_t minR=2., const Float_t maxR=2.3, const char *pipeName="Pipe")
Add beam pipe.
Int_t GetNofBranches() const
Get number of bracnhes.
void AddNewTrack()
Add new track, resetting counter.
Int_t GetNbHits() const
It returns the number of hits for this tracked particle.
LogMessage & dolog(LogMessage &)
void ClearEvents()
clear list or delete when dynamical memory allocation
void SetMaxEnergy(Float_t e)
Set Max energy.
TClonesArray * GetTrackList(Int_t ievent, Option_t *type="Agata", Bool_t warn=true)
get array
static Bool_t fgIsDisplayed
LogMessage & debug(LogMessage &)
void UpdateElements()
Update elements to be displayed.
virtual Float_t GetE() const
virtual void AddGeometry(TGeoVolume *volume, TGeoMatrix *matrix=gGeoIdentity)
void ResetHits()
Reset hits.
virtual std::string & GetProcessName()
To get the Process name.
Definition: GwLogMessage.h:224
ClassImp(BaseNucleus)
static TGeoVolume * BuildAgata(const char *agataPath="./", const char *asolid="asolid", const char *aclust="aclust", const char *aeuler="aeuler", const char *baseclusname="agataCluster", const char *agataName="Agata")
For uniformity of names overload ImportAgata method.
void SetMaxEnergy(Float_t e)
Set Max energy.
void SetTrackStyle(const Char_t *s, Option_t *type="Agata")
Set track style (rec/cone)
virtual Float_t GetE() const
void UpdateHitInfo(TEveDigitSet *qs, Int_t idx)
Update hits info.
virtual void SetProcessMethod(const char *)
To set the current method.
static TGeoVolume * AddFloor(Float_t dx=20, const Float_t dy=0.1, const Float_t dz=25, const char *floorName="Floor")
Add floor.
AgataHitDisplay a class to display hits on event.
Int_t GetNofEvents() const
get Number of events