#include <MCVectors.h>
Public Member Functions | |
| MCVectors (double x1, double y1, double x2, double y2) | |
| virtual | ~MCVectors () |
| void | Update (Mint *mint) |
Private Attributes | |
| TPad * | fPad |
| TView * | fView |
| TList * | fParticles |
Midad/Base
At construction, this will draw into gPad.
Contact: bv@bnl.gov
Created on: Tue Jan 28 10:06:34 2003
Definition at line 29 of file MCVectors.h.
|
||||||||||||||||||||
|
Definition at line 24 of file MCVectors.cxx. References fPad, fParticles, fView, and pdg_kludge(). 00025 {
00026 pdg_kludge();
00027
00028 fPad = new TPad("MCVectors","MCVectors",x1,y1,x2,y2);
00029 fPad->Draw();
00030 fPad->cd();
00031 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,3)
00032 fView = new TView3D(1,0,0);
00033 #else
00034 fView = new TView(1);
00035 #endif
00036 fView->ShowAxis();
00037 fView->SetAutoRange();
00038 fView->Centered();
00039
00040 fParticles = new TList;
00041 }
|
|
|
Definition at line 44 of file MCVectors.cxx. 00045 {
00046 }
|
|
|
Definition at line 61 of file MCVectors.cxx. References RecDataRecord< T >::FindComponent(), fPad, fParticles, MomNavigator::GetFragment(), Mint::GetJint(), and Jint::GetMom(). Referenced by PageDisplay::MakeMCVectors(), PageDisplay::UpdateDisplay(), and PageDisplay::UpdateTab(). 00062 {
00063 fPad->cd();
00064
00065
00066 // fPad->Clear();
00067 // fPad->SetView(fView);
00068 fParticles->Delete();
00069
00070 if (!mint) return;
00071 const MomNavigator* mom = mint->GetJint().GetMom();
00072 if (!mom) return;
00073
00074 SimSnarlRecord* ssr =
00075 dynamic_cast<SimSnarlRecord*>(mom->GetFragment("SimSnarlRecord"));
00076 if (!ssr) return;
00077
00078 const TClonesArray* ctca =
00079 dynamic_cast<const TClonesArray*>
00080 (ssr->FindComponent("TClonesArray","StdHep"));
00081 if (!ctca) return;
00082
00083
00084 int ind, siz = ctca->GetEntriesFast();
00085 double x1,y1,z1,x2,y2,z2;
00086 x1=y1=z1=x2=y2=z2=0.0;
00087 TParticle* first = 0;
00088 for (ind=0; ind < siz; ++ind) {
00089 TParticle* tmp = dynamic_cast<TParticle*>((*ctca)[ind]);
00090 if (!tmp) {
00091 cerr << "Non particle: " << (*ctca)[ind]->GetName() << endl;
00092 continue;
00093 }
00094
00095 TParticle* p = new TParticle(*tmp);
00096 fParticles->Add(p);
00097
00098 if (!ind) first = p;
00099
00100 p->SetProductionVertex( 0,0,0,0);
00101
00102 int mother = p->GetFirstMother();
00103 if (mother < 0) p->SetLineColor(2);
00104
00105 p->Draw();
00106 }
00107 fPad->Modified();
00108 fPad->Update();
00109
00110 }
|
|
|
Definition at line 39 of file MCVectors.h. Referenced by MCVectors(), and Update(). |
|
|
Definition at line 41 of file MCVectors.h. Referenced by MCVectors(), and Update(). |
|
|
Definition at line 40 of file MCVectors.h. Referenced by MCVectors(). |
1.3.9.1