which included commits to RCS files with non-trunk default branches.
--- /dev/null
+// $Header$
+
+#include "CLASS.h"
+#include <Reve/STEM.h>
+
+#include <TVirtualPad.h>
+#include <TColor.h>
+
+#include <TGLabel.h>
+#include <TGButton.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+#include <TGDoubleSlider.h>
+
+using namespace Reve;
+using namespace Alieve;
+
+//______________________________________________________________________
+// CLASS
+//
+
+ClassImp(CLASS);
+
+CLASS::CLASS(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+ UInt_t options, Pixel_t back) :
+ TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+{
+ fM = 0;
+ MakeTitle("STEM");
+
+ //!!! create the widgets here ...
+
+ // Register the editor.
+ TClass *cl = STEM::Class();
+ TGedElement *ge = new TGedElement;
+ ge->fGedFrame = this;
+ ge->fCanvas = 0;
+ cl->GetEditorList()->Add(ge);
+}
+
+CLASS::~CLASS()
+{}
+
+/**************************************************************************/
+
+void CLASS::SetModel(TVirtualPad* pad, TObject* obj, Int_t event)
+{
+ fModel = 0;
+ fPad = 0;
+
+ if (!obj || !obj->InheritsFrom(STEM::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
+ SetActive(kFALSE);
+ return;
+ }
+
+ fModel = obj;
+ fPad = pad;
+
+ fM = dynamic_cast<STEM*>(fModel);
+
+ SetActive();
+}
+
+/**************************************************************************/
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_CLASS_H
+#define ALIEVE_CLASS_H
+
+#include <TGedFrame.h>
+
+class TGCheckButton;
+class TGNumberEntry;
+class TGColorSelect;
+
+namespace Alieve {
+
+class STEM;
+
+class CLASS : public TGedFrame
+{
+protected:
+ STEM* fM; // fModel dynamic-casted to CLASS
+
+public:
+ CLASS(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+ ~CLASS();
+
+ virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
+
+ // void DoXYZZ();
+
+ ClassDef(CLASS, 1); // Editor for STEM
+}; // endclass CLASS
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "CLASS.h"
+#include <Reve/STEM.h>
+
+#include <TGLDrawFlags.h>
+
+#ifdef WIN32
+#include "Windows4root.h"
+#endif
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+using namespace Reve;
+using namespace Alieve;
+
+//______________________________________________________________________
+// CLASS
+//
+
+ClassImp(CLASS);
+
+CLASS::CLASS()
+{
+ // fCached = false; // Disable display list.
+}
+
+CLASS::~CLASS()
+{}
+
+/**************************************************************************/
+
+Bool_t CLASS::SetModel(TObject* obj)
+{
+ return set_model(obj, "Alieve::STEM");
+}
+
+void CLASS::SetBBox()
+{
+ // !! This ok if master sub-classed from TAttBBox
+ set_axis_aligned_bbox(((STEM*)fExternalObj)->AssertBBox());
+}
+
+/**************************************************************************/
+
+void CLASS::DirectDraw(const TGLDrawFlags & flags) const
+{
+ // printf("CLASS::DirectDraw Style %d, LOD %d\n", flags.Style(), flags.LOD());
+}
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_CLASS_H
+#define ALIEVE_CLASS_H
+
+#include <TGLObject.h>
+
+namespace Alieve {
+
+class CLASS
+{
+protected:
+ STEM* fM; // fModel dynamic-casted to CLASS
+
+ virtual void DirectDraw(const TGLDrawFlags & flags) const;
+
+public:
+ CLASS();
+ virtual ~CLASS();
+
+ virtual Bool_t SetModel(TObject* obj);
+ virtual void SetBBox();
+
+ ClassDef(CLASS, 0);
+}; // endclass CLASS
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "CLASS.h"
+
+
+//______________________________________________________________________
+// CLASS
+//
+
+ClassImp(CLASS);
+
+using namespace Reve;
+using namespace Alieve;
+
+CLASS::CLASS()
+{
+
+}
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_CLASS_H
+#define ALIEVE_CLASS_H
+
+#include <Reve/Reve.h>
+
+#include <TObject.h>
+
+namespace Alieve {
+
+class CLASS
+{
+protected:
+
+public:
+ CLASS();
+
+ ClassDef(CLASS, 1);
+}; // endclass CLASS
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "EventAlieve.h"
+#include <Reve/Reve.h>
+
+#include <AliRunLoader.h>
+#include <AliESD.h>
+
+#include <TFile.h>
+#include <TTree.h>
+
+#include <TROOT.h>
+#include <TSystem.h>
+
+using namespace Reve;
+using namespace Alieve;
+
+//______________________________________________________________________
+// Event
+//
+
+ClassImp(Event)
+
+Event* Alieve::gEvent = 0;
+
+Bool_t Alieve::Event::fgUseRunLoader = true;
+Bool_t Alieve::Event::fgUseESDTree = true;
+
+void Event::Initialize(Bool_t use_runloader, Bool_t use_esd)
+{
+ static const Exc_t eH("Event::Initialize ");
+
+ fgUseRunLoader = use_runloader;
+ fgUseESDTree = use_esd;
+
+ /*
+ if(fgUseRunLoader == false && fgUseESDTree == false)
+ throw(eH + "should use at least one data source.");
+
+ if(fgUseRunLoader) {
+ AssertMacro("loadlibs.C");
+ }
+ else if(fgUseESDTree) {
+ gSystem->Load("libESD.so");
+ }
+ */
+}
+
+/**************************************************************************/
+
+void Event::Init()
+{
+ fRunLoader = 0;
+ fESDFile = 0;
+ fESDTree = 0;
+ fESD = 0;
+}
+
+Event::Event() : TNamed(), fEventId(0)
+{
+ Init();
+}
+
+Event::Event(TString path, Int_t ev) : fPath(path), fEventId(ev)
+{
+ Init();
+ Open();
+}
+
+/**************************************************************************/
+
+void Event::Open()
+{
+ static const Exc_t eH("Event::Open ");
+
+ gSystem->ExpandPathName(fPath);
+ if(fPath[0] != '/')
+ fPath = Form("%s/%s", gSystem->WorkingDirectory(), fPath.Data());
+
+ if(fgUseRunLoader) {
+ TString ga_path(Form("%s/galice.root", fPath.Data()));
+ if(gSystem->AccessPathName(ga_path, kReadPermission))
+ throw(eH + "can not read '" + ga_path + "'.");
+ fRunLoader = AliRunLoader::Open(ga_path);
+ if(!fRunLoader)
+ throw(eH + "failed opening ALICE run loader from '" + ga_path + "'.");
+ {
+ TString alice_path = fPath + "/";
+ fRunLoader->SetDirName(alice_path);
+ }
+ if(fRunLoader->LoadgAlice() != 0) {
+ throw(eH + "failed loading gAlice.");
+ }
+
+ if(fRunLoader->GetEvent(fEventId) != 0) {
+ throw(eH + "failed getting required event.");
+ }
+ }
+
+ if(fgUseESDTree) {
+ TString p(Form("%s/AliESDs.root", fPath.Data()));
+ fESDFile = new TFile(p);
+ if(fESDFile->IsZombie()) {
+ delete fESDFile; fESDFile = 0;
+ throw(eH + "failed opening ALICE ESD from '" + p + "'.");
+ }
+
+ fESDTree = (TTree*) fESDFile->Get("esdTree");
+ if(fESDTree == 0)
+ throw(eH + "failed getting the esdTree.");
+ fESDTree->SetBranchAddress("ESD", &fESD);
+ if(fESDTree->GetEntry(fEventId) <= 0)
+ throw(eH + "failed getting required event.");
+ }
+
+ SetName(Form("Event%d", fEventId));
+ SetTitle(fPath);
+}
+
+void Event::Close()
+{
+
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+// Static convenience functions.
+
+AliRunLoader* Event::AssertRunLoader()
+{
+ static const Exc_t eH("Event::AssertRunLoader ");
+
+ if(gEvent == 0)
+ throw(eH + "ALICE event not ready.");
+ if(gEvent->fRunLoader == 0)
+ throw(eH + "AliRunLoader not initialised.");
+ return gEvent->fRunLoader;
+}
+
+AliESD* Event::AssertESD()
+{
+ static const Exc_t eH("Event::AssertESD ");
+
+ if(gEvent == 0)
+ throw(eH + "ALICE event not ready.");
+ if(gEvent->fESD == 0)
+ throw(eH + "AliESD not initialised.");
+ return gEvent->fESD;
+}
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_Event_H
+#define ALIEVE_Event_H
+
+#include <TNamed.h>
+#include <TString.h>
+
+class AliRunLoader;
+class AliESD;
+
+class TFile;
+class TTree;
+
+namespace Alieve {
+
+class Event : public TNamed
+{
+private:
+ void Init();
+
+protected:
+ TString fPath;
+ Int_t fEventId;
+
+ AliRunLoader* fRunLoader;
+
+ TFile* fESDFile;
+ TTree* fESDTree;
+ AliESD* fESD;
+
+ static Bool_t fgUseRunLoader;
+ static Bool_t fgUseESDTree;
+
+public:
+ static void Initialize(Bool_t use_runloader=true, Bool_t use_esd=true);
+
+ Event();
+ Event(TString path, Int_t ev=0);
+
+ void Open();
+ void Close();
+
+ Int_t GetEventId() const { return fEventId; }
+ AliRunLoader* GetRunLoader() const { return fRunLoader; }
+ TTree* GetESDTree() const { return fESDTree; }
+ AliESD* GetESD() const { return fESD; }
+
+ virtual const Text_t* GetTitle() const { return fPath.Data(); }
+
+ static AliRunLoader* AssertRunLoader();
+ static AliESD* AssertESD();
+
+ ClassDef(Event, 1);
+}; // endclass Event
+
+extern Event* gEvent;
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+//__________________________________________________________________________
+// ITSDigitsInfo
+//
+//
+
+#include <Reve/TTreeTools.h>
+
+#include "ITSDigitsInfo.h"
+//#include <AliITSresponseSDD.h>
+#include <AliITSCalibrationSDD.h>
+#include <AliITSdigit.h>
+#include <AliITSdigitSPD.h>
+
+using namespace Reve;
+using namespace Alieve;
+using namespace std;
+
+ClassImp(ITSDigitsInfo)
+
+/**************************************************************************/
+
+void ITSDigitsInfo::Init()
+{
+ fTree = 0;
+ fGeom = 0;
+ fSegSPD = 0;
+ fSegSDD = 0;
+ fSegSSD = 0;
+}
+
+/**************************************************************************/
+
+ITSDigitsInfo:: ~ITSDigitsInfo()
+{
+ for(map<Int_t, TClonesArray*>::iterator j=fSPDmap.begin(); j!=fSPDmap.end(); ++j) {
+ delete j->second;
+ }
+ for(map<Int_t, TClonesArray*>::iterator j=fSDDmap.begin(); j!=fSDDmap.end(); ++j) {
+ delete j->second;
+ }
+ for(map<Int_t, TClonesArray*>::iterator j=fSSDmap.begin(); j!=fSSDmap.end(); ++j) {
+ delete j->second;
+ }
+ delete fSegSPD; delete fSegSDD; delete fSegSSD;
+ delete fGeom;
+ delete fTree;
+}
+
+/**************************************************************************/
+
+void ITSDigitsInfo::SetTree(TTree* tree)
+{
+ static const Exc_t eH("ITSDigitsInfo::SetTree ");
+
+ if(fGeom == 0) {
+ fGeom = new AliITSgeom();
+ fGeom->ReadNewFile("$REVESYS/alice-data/ITSgeometry.det");
+ if(fGeom == 0)
+ throw(eH + "can not load ITS geometry \n");
+ }
+
+ fTree = tree;
+
+ SetITSSegmentation();
+
+ // create tables for scaling
+ // lowest scale factor refers unscaled ITS module
+ fSPDScaleX[0]=1;
+ fSPDScaleZ[0]=1;
+ fSDDScaleX[0]=1;
+ fSDDScaleZ[0]=1;
+ fSSDScale[0]=1;
+ // spd lows rsolution is in the level of 8x2 redaut chips
+ Int_t nx = 8; // fSegSPD->Npx()/8; // 32
+ Int_t nz = 6; // fSegSPD->Npz()/2; // 128
+
+ fSPDScaleX[1] = Int_t(nx);
+ fSPDScaleZ[1] = Int_t(nz);
+ fSPDScaleX[2] = Int_t(nx*2);
+ fSPDScaleZ[2] = Int_t(nz*2);
+ fSPDScaleX[3] = Int_t(nx*3);
+ fSPDScaleZ[3] = Int_t(nz*3);
+ fSPDScaleX[4] = Int_t(nx*4);
+ fSPDScaleZ[4] = Int_t(nz*4);
+
+
+ fSDDScaleX[1] = 2;
+ fSDDScaleZ[1] = 2;
+ fSDDScaleX[2] = 8;
+ fSDDScaleZ[2] = 8;
+ fSDDScaleX[3] = 16;
+ fSDDScaleZ[3] = 16;
+ fSDDScaleX[4] = 25;
+ fSDDScaleZ[4] = 25;
+
+ fSSDScale[1] = 3;
+ fSSDScale[2] = 9;
+ fSSDScale[3] = 20;
+ fSSDScale[4] = 30;
+
+
+ // lowest scale factor refers unscaled ITS module
+ fSPDScaleX[0]=1;
+ fSPDScaleZ[0]=1;
+ fSDDScaleX[0]=1;
+ fSDDScaleZ[0]=1;
+ fSSDScale[0]=1;
+}
+
+/**************************************************************************/
+
+void ITSDigitsInfo::SetITSSegmentation()
+{
+ // SPD
+ fSegSPD = new AliITSsegmentationSPD(fGeom);
+ //SPD geometry
+ Int_t m;
+ Float_t fNzSPD=160;
+ Float_t fZ1pitchSPD=0.0425; Float_t fZ2pitchSPD=0.0625;
+ Float_t fHlSPD=3.48;
+
+ fSPDZCoord[0]=fZ1pitchSPD -fHlSPD;
+ for (m=1; m<fNzSPD; m++) {
+ Double_t dz=fZ1pitchSPD;
+ if (m==31 || m==32 || m==63 || m==64 || m==95 || m==96 ||
+ m==127 || m==128) dz=fZ2pitchSPD;
+ fSPDZCoord[m]=fSPDZCoord[m-1]+dz;
+ }
+
+ for (m=0; m<fNzSPD; m++) {
+ Double_t dz=1.*fZ1pitchSPD;
+ if (m==31 || m==32 || m==63 || m==64 || m==95 || m==96 ||
+ m==127 || m==128) dz=1.*fZ2pitchSPD;
+ fSPDZCoord[m]-=dz;
+ }
+
+ // end of SPD geometry
+
+ // SDD
+ // response replaced by Calibration (March 2006).
+ AliITSresponseSDD* resp1 = new AliITSresponseSDD();
+ AliITSCalibrationSDD* cal1 = new AliITSCalibrationSDD;
+ cal1->SetResponse(resp1);
+ fSegSDD = new AliITSsegmentationSDD(fGeom, cal1);
+
+ // SSD
+ fSegSSD = new AliITSsegmentationSSD(fGeom);
+}
+
+void ITSDigitsInfo::GetSPDLocalZ(Int_t j, Float_t& z)
+{
+ z = fSPDZCoord[j];
+}
+
+/**************************************************************************/
+
+TClonesArray* ITSDigitsInfo::GetDigits(Int_t mod, Int_t subdet)
+{
+ switch(subdet) {
+ case 0: {
+ TClonesArray* digitsSPD = 0;
+ map<Int_t, TClonesArray*>::iterator i = fSPDmap.find(mod);
+ if(i == fSPDmap.end()) {
+ fTree->SetBranchAddress("ITSDigitsSPD",&digitsSPD);
+ fTree->GetEntry(mod);
+ fSPDmap[mod] = digitsSPD;
+ return digitsSPD;
+ }
+ else{
+ return i->second;
+ }
+ break;
+ }
+ case 1: {
+ TClonesArray* digitsSDD = 0;
+ map<Int_t, TClonesArray*>::iterator i = fSDDmap.find(mod);
+ if(i == fSDDmap.end()) {
+ fTree->SetBranchAddress("ITSDigitsSDD",&digitsSDD);
+ fTree->GetEntry(mod);
+ fSDDmap[mod] = digitsSDD;
+ return digitsSDD;
+ }
+ else{
+ return i->second;
+ }
+ break;
+ }
+ case 2: {
+ TClonesArray* digitsSSD = 0;
+ map<Int_t, TClonesArray*>::iterator i = fSSDmap.find(mod);
+ if(i == fSSDmap.end()) {
+ fTree->SetBranchAddress("ITSDigitsSSD",&digitsSSD);
+ fTree->GetEntry(mod);
+ fSSDmap[mod] = digitsSSD;
+ return digitsSSD;
+ }
+ else{
+ return i->second;
+ }
+ break;
+ }
+ default:
+ return 0;
+ } //end switch
+}
+
+
+/**************************************************************************/
+
+void ITSDigitsInfo::Print(Option_t* ) const
+{
+ printf("*********************************************************\n");
+ printf("SPD module dimension (%f,%f) \n",fSegSPD->Dx()*0.0001, fSegSPD->Dz()*0.0001);
+ printf("SPD first,last module:: %d,%d \n", fGeom->GetStartSPD(),fGeom->GetLastSPD() );
+ printf("SPD num cells per module (x::%d,z::%d)\n",fSegSPD->Npx(), fSegSPD->Npz());
+ Int_t iz=0,ix = 0;
+ printf("SPD dimesion of (%d,%d) in pixel(%f,%f) \n", ix,iz, fSegSPD->Dpx(ix), fSegSPD->Dpz(iz));
+ iz = 32;
+ printf("SPD dimesion of pixel (%d,%d) are (%f,%f) \n", ix,iz, fSegSPD->Dpx(ix)*0.001, fSegSPD->Dpz(iz)*0.001);
+
+ printf("*********************************************************\n");
+ printf("SDD module dimension (%f,%f) \n",fSegSDD->Dx()*0.0001, fSegSDD->Dz()*0.0001);
+ printf("SDD first,last module:: %d,%d \n", fGeom->GetStartSDD(),fGeom->GetLastSDD() );
+ printf("SDD num cells per module (x::%d,z::%d)\n",fSegSDD->Npx(), fSegSDD->Npz());
+ printf("SDD dimesion of pixel are (%f,%f) \n", fSegSDD->Dpx(1)*0.001,fSegSDD->Dpz(1)*0.001);
+ printf("*********************************************************\n");
+ printf("SSD module dimension (%f,%f) \n",fSegSSD->Dx()*0.0001, fSegSSD->Dz()*0.0001);
+ printf("SSD first,last module:: %d,%d \n", fGeom->GetStartSSD(),fGeom->GetLastSSD() );
+ printf("SSD strips in module %d \n",fSegSSD->Npx());
+ printf("SSD strip sizes are (%f,%f) \n", fSegSSD->Dpx(1),fSegSSD->Dpz(1));
+ fSegSSD->SetLayer(5); Float_t ap,an; fSegSSD->Angles(ap,an);
+ printf("SSD layer 5 stereoP %f stereoN %f angle \n",ap,an);
+ fSegSSD->SetLayer(6); fSegSSD->Angles(ap,an);
+ printf("SSD layer 6 stereoP %f stereoN %f angle \n",ap,an);
+}
+
+
+/*
+ printf("num cells %d,%d scaled %d,%d \n",fSegSPD->Npz(),fSegSPD->Npx(),Nz,Nx);
+ printf("%d digits in ITSModule %d\n",ne, module);
+ Float_t zn = i*(3.48*2)/Nz - 3.48 ;
+ Float_t xo = -fSegSPD->Dx()*0.00005 + fSegSPD->Dpx(0)*od->GetCoord2()*0.0001;
+ Float_t xn = -fSegSPD->Dx()*0.00005 + j*0.0001*fSegSPD->Dx()/Nx;
+ Float_t dpx = 0.0001*fSegSPD->Dx()/Nx;
+ Float_t dpz = 3.48*2/Nz;
+ printf("Z::original (%3f) scaled (%3f, %3f) \n", zo, zn-dpz/2, zn+dpz/2);
+ printf("X::original (%3f) scaled (%3f, %3f) \n", xo, xn-dpx/2, xn+dpx/2);
+ printf("%d,%d maped to %d,%d \n", od->GetCoord1(), od->GetCoord2(), i,j );
+*/
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_ITSDigitsInfo_H
+#define ALIEVE_ITSDigitsInfo_H
+
+#include <Reve/VSD.h>
+
+#include <map>
+
+#include <TObject.h>
+#include <TClonesArray.h>
+#include <TTree.h>
+
+#include <AliITS.h>
+#include <AliITSgeom.h>
+#include <AliITSsegmentationSPD.h>
+#include <AliITSsegmentationSDD.h>
+#include <AliITSsegmentationSSD.h>
+
+static const int NSCALE = 5;
+
+namespace Alieve {
+
+class ITSDigitsInfo : public TObject
+{
+private:
+ void Init();
+ Float_t fSPDZCoord[192];
+
+protected:
+ Int_t fRefCount;
+
+ map<Int_t, TClonesArray*> fSPDmap;
+ map<Int_t, TClonesArray*> fSDDmap;
+ map<Int_t, TClonesArray*> fSSDmap;
+
+ void SetITSSegmentation();
+
+public:
+ TTree* fTree;
+ AliITSgeom* fGeom;
+ AliITSsegmentationSPD* fSegSPD;
+ AliITSsegmentationSDD* fSegSDD;
+ AliITSsegmentationSSD* fSegSSD;
+
+ Int_t fSPDScaleX[NSCALE];
+ Int_t fSPDScaleZ[NSCALE];
+ Int_t fSDDScaleX[NSCALE];
+ Int_t fSDDScaleZ[NSCALE];
+ Int_t fSSDScale[NSCALE];
+
+ ITSDigitsInfo(const Text_t* /*n*/="ITSDigitsInfo", const Text_t* /*t*/=0) :
+ TObject()
+ { Init(); }
+
+ virtual ~ITSDigitsInfo();
+
+ void SetTree(TTree* tree);
+
+ TClonesArray* GetDigits(Int_t moduleID, Int_t detector);
+
+ void GetSPDLocalZ(Int_t j, Float_t& z);
+
+
+ void IncRefCount() { ++fRefCount; }
+ void DecRefCount() { --fRefCount; if(fRefCount <= 0) delete this; }
+
+ virtual void Print(Option_t* opt="") const;
+
+ ClassDef(ITSDigitsInfo, 1);
+}; // endclass ITSDigitsInfo
+
+}
+#endif
--- /dev/null
+#include "ITSModule.h"
+
+#include <AliITSdigitSPD.h>
+#include <AliITSdigitSDD.h>
+#include <AliITSdigitSSD.h>
+
+#include <TStyle.h>
+
+using namespace Reve;
+using namespace Alieve;
+using namespace std;
+
+Short_t ITSModule::fgSDDThreshold = 5;
+Short_t ITSModule::fgSDDMaxVal = 80;
+Short_t ITSModule::fgSSDThreshold = 2;
+Short_t ITSModule::fgSSDMaxVal = 100;
+
+ClassImp(ITSModule)
+
+/**************************************************************************/
+
+void ITSModule::Init()
+{
+ fTrans = false;
+ fID = -1;
+ fInfo = 0;
+}
+
+/**************************************************************************/
+
+ITSModule::ITSModule(Int_t id, ITSDigitsInfo* info, Color_t col) :
+ QuadSet(Form("ITS module %d", id)), Reve::RenderElement(fFrameCol),
+ fFrameCol(col)
+{
+ Init();
+
+ fInfo = info;
+ SetID(id);
+}
+
+ITSModule::~ITSModule()
+{
+ if(fInfo) fInfo->DecRefCount();
+}
+
+/**************************************************************************/
+
+void ITSModule::SetMainColor(Color_t col)
+{
+ Reve::RenderElement::SetMainColor(col);
+ if(!fQuads.empty()) {
+ fQuads.front().ColorFromIdx(col);
+ }
+}
+
+/**************************************************************************/
+
+void ITSModule::SetID(Int_t id)
+{
+ static const Exc_t eH("ITSModule::SetID ");
+
+ if(fInfo == 0)
+ throw(eH + "ITSDigitsInfo not set.");
+
+ if (id < fInfo->fGeom->GetStartSPD() || id > fInfo->fGeom->GetLastSSD())
+ throw(eH + Form("%d is not valid. ID range from %d to %d", id,
+ fInfo->fGeom->GetStartSPD(), fInfo->fGeom->GetLastSSD()));
+
+ fID = id;
+ InitModule();
+}
+
+/**************************************************************************/
+
+void ITSModule::InitModule()
+{
+ fInfo->fGeom->GetModuleId(fID,fLayer,fLadder,fDet);
+ SetName(Form("ITSModule %d", fID));
+
+ if (fID <= fInfo->fGeom->GetLastSPD()) {
+ fDetID = 0;
+ fDx = fInfo->fSegSPD->Dx()*0.00005;
+ fDz = 3.48;
+ fDy = fInfo->fSegSPD->Dy()*0.00005;
+ }
+ else if (fID <= fInfo->fGeom->GetLastSDD()) {
+ fDetID = 1;
+ fDx = fInfo->fSegSDD->Dx()*0.0001;
+ fDz = fInfo->fSegSDD->Dz()*0.00005;
+ fDy = fInfo->fSegSDD->Dy()*0.00005;
+ }
+ else {
+ fDetID = 2;
+ fInfo->fSegSSD->SetLayer(fLayer);
+ fDx = fInfo->fSegSSD->Dx()*0.00005;
+ fDz = fInfo->fSegSSD->Dz()*0.00005;
+ fDy = fInfo->fSegSSD->Dy()*0.00005;
+ }
+
+ LoadQuads();
+ ComputeBBox();
+ SetTrans();
+}
+
+void ITSModule::LoadQuads()
+{
+ // printf("its module load quads \n");
+ Float_t x = fDx;
+ Float_t z = fDz;
+ Bool_t above_treshold = false;
+
+ // Module frame in xy plane
+ fQuads.push_back(Reve::Quad(fFrameCol));
+ Float_t dy = -0.;
+ Float_t* p = fQuads.back().vertices;
+ p[0] = -x; p[1] = dy; p[2] = -z;
+ p[3] = -x; p[4] = dy; p[5] = z;
+ p[6] = x; p[7] = dy; p[8] = z;
+ p[9] = x; p[10] = dy; p[11] = -z;
+
+ // Digits
+ TClonesArray *digits;
+ Int_t ndigits;
+ Float_t dpx,dpz;
+ Int_t i,j;
+ digits = fInfo->GetDigits(fID, fDetID );
+ ndigits = digits->GetEntriesFast();
+ Int_t n_col = gStyle->GetNumberOfColors();
+
+ switch(fDetID) {
+
+ case 0: { // SPD
+ above_treshold = true;
+ AliITSsegmentationSPD* seg = fInfo->fSegSPD;
+ AliITSdigitSPD *d=0;
+
+ for (Int_t k=0; k<ndigits; k++) {
+ d=(AliITSdigitSPD*)digits->UncheckedAt(k);
+ j = d->GetCoord1();
+ i = d->GetCoord2();
+ x = -seg->Dx()/2 + seg->Dpx(0) *i;
+ x *= 0.0001;
+ fInfo->GetSPDLocalZ(j,z);
+ dpx = seg->Dpx(i)*0.0001;
+ dpz = seg->Dpz(j)*0.0001;
+
+ fQuads.push_back(Reve::Quad(7));
+ Float_t* p = fQuads.back().vertices;
+ p[0] = x; p[1] = 0.; p[2] = z;
+ p[3] = x; p[4] = 0.; p[5] = z + dpz;
+ p[6] = x + dpx; p[7] = 0.; p[8] = z + dpz;
+ p[9] = x + dpx; p[10] =0.; p[11] = z;
+ }
+ break;
+ }
+
+ case 1: { // SDD
+ AliITSsegmentationSDD* seg = fInfo->fSegSDD;
+ AliITSdigitSDD *d=0;
+ x = 2*fDx;
+ z = 2*fDz;
+ for (Int_t k=0; k<ndigits; k++) {
+ d=(AliITSdigitSDD*)digits->UncheckedAt(k);
+
+ if (d->GetSignal() > fgSDDThreshold) {
+ j = d->GetCoord1();
+ i = d->GetCoord2();
+ above_treshold = true;
+ seg->DetToLocal(i,j,x,z);
+ dpx = seg->Dpx(i)*0.0001;
+ dpz = seg->Dpz(j)*0.0001;
+
+ Int_t ci = gStyle->GetColorPalette
+ (TMath::Min(n_col - 1,
+ (n_col*(d->GetSignal() - fgSDDThreshold))/(fgSDDMaxVal - fgSDDThreshold)));
+ fQuads.push_back(Reve::Quad(ci, p));
+ Float_t* p = fQuads.back().vertices;
+ p[0] = x; p[1] = 0.; p[2] = z;
+ p[3] = x; p[4] = 0.; p[5] = z + dpz;
+ p[6] = x + dpx; p[7] = 0.; p[8] = z + dpz;
+ p[9] = x + dpx; p[10] =0.; p[11] = z;
+ }
+ }
+ break;
+ }
+
+ case 2: { // SSD
+ AliITSsegmentationSSD* seg = fInfo->fSegSSD;
+ AliITSdigitSSD *d=0;
+ Float_t ap,an,a;
+ seg->Angles(ap,an);
+ for (Int_t k=0; k<ndigits; k++) {
+ d=(AliITSdigitSSD*)digits->UncheckedAt(k);
+ if(d->GetSignal() > fgSSDThreshold){
+ above_treshold = true;
+ j = d->GetCoord1();
+ i = d->GetCoord2();
+ seg->DetToLocal(i,j,x,z);
+
+ if( d->GetCoord1() == 1) {
+ a = ap;
+ }
+ else {
+ a = -an;
+ }
+ fQuads.push_back(Reve::Quad());
+ Int_t ci = gStyle->GetColorPalette
+ (TMath::Min(n_col - 1,
+ (n_col*(d->GetSignal() - fgSSDThreshold))/(fgSSDMaxVal - fgSSDThreshold)));
+
+ fQuads.back().ColorFromIdx(ci);
+ Float_t* p = fQuads.back().vertices;
+
+ p[0] = x-TMath::Tan(a)*fDz; p[1] = 0; p[2] = -fDz;
+ p[3] = x+TMath::Tan(a)*fDz; p[4] = 0; p[5] = fDz ;
+ p[6] = x+TMath::Tan(a)*fDz; p[7] = 0; p[8] = fDz ;
+ p[9] = x-TMath::Tan(a)*fDz; p[10] = 0; p[11] = -fDz;
+ // printf("%3d -> %3d -> %8x\n", d->GetSignal(), ci, fQuads.back().color);
+ }
+ }
+ break;
+ }
+
+ }
+}
+
+/**************************************************************************/
+
+void ITSModule::SetTrans()
+{
+ Double_t pos[3];
+ Double_t rot[9];
+ fInfo->fGeom->GetTrans(fID,pos);
+ fInfo->fGeom->GetRotMatrix(fID,rot);
+ Double_t *s, *d;
+
+ // column major ii
+ s = &rot[0]; d = &fMatrix[0];
+ d[0] = s[0]; d[1] = s[3]; d[2] = s[6]; d[3] = 0;
+ s = &rot[1]; d = &fMatrix[4];
+ d[0] = s[0]; d[1] = s[3]; d[2] = s[6]; d[3] = 0;
+ s = &rot[2]; d = &fMatrix[8];
+ d[0] = s[0]; d[1] = s[3]; d[2] = s[6]; d[3] = 0;
+ s = &pos[0]; d = &fMatrix[12];
+ d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; d[3] = 1;
+
+ fTrans = true;
+}
+
+/**************************************************************************/
+
+void ITSModule::Print(Option_t* ) const
+{
+ printf("ID %d, layer %d, ladder %d, det %d \n", fID, fLayer, fLadder, fDetID);
+}
--- /dev/null
+#ifndef ALIEVE_ITSModule_H
+#define ALIEVE_ITSModule_H
+
+#include <Reve/QuadSet.h>
+#include <Reve/RenderElement.h>
+
+#include <Alieve/ITSDigitsInfo.h>
+
+namespace Alieve {
+
+class ITSModule : public Reve::QuadSet, public Reve::RenderElement
+{
+private:
+ void Init();
+ void LoadQuads();
+
+protected:
+ virtual void InitModule();
+ virtual void SetTrans();
+
+ ITSDigitsInfo* fInfo;
+
+ Int_t fID;
+ Int_t fDetID;
+
+ Int_t fLayer;
+ Int_t fLadder;
+ Int_t fDet;
+
+ Float_t fDx;
+ Float_t fDz;
+ Float_t fDy;
+
+ Color_t fFrameCol;
+
+public:
+ ITSModule(const Text_t* n="ITSModule", const Text_t* t=0, Color_t col=2) :
+ QuadSet(n, t), Reve::RenderElement(fFrameCol), fFrameCol(col)
+ { Init(); }
+ ITSModule(Int_t id, ITSDigitsInfo* info, Color_t col=2);
+ virtual ~ITSModule();
+
+ virtual Bool_t CanEditMainColor() { return true; }
+ virtual void SetMainColor(Color_t col);
+
+ virtual void SetID(Int_t id);
+ virtual void Print(Option_t* opt="") const;
+
+ static Short_t fgSDDThreshold;
+ static Short_t fgSDDMaxVal;
+
+ static Short_t fgSSDThreshold;
+ static Short_t fgSSDMaxVal;
+
+ ClassDef(ITSModule, 1);
+};
+}
+#endif
--- /dev/null
+#pragma link off all functions;
+#pragma link off all globals;
+#pragma link off all classes;
+
+#pragma link C++ namespace Alieve;
+
+//================================
+// base/
+//================================
+
+// Event
+#pragma link C++ class Alieve::Event+;
+#pragma link C++ global Alieve::gEvent;
+
+#pragma link C++ class Alieve::VSDCreator+;
+
+#pragma link C++ class Alieve::ITSDigitsInfo+;
+#pragma link C++ class Alieve::TPCDigitsInfo+;
+#pragma link C++ class Alieve::TPCSeg+;
+
+//================================
+// g3d/
+//================================
+
+#pragma link C++ class Alieve::ITSModule+;
+#pragma link C++ class Alieve::TPCSegment+;
+
+//================================
+// ged/
+//================================
+
+#pragma link C++ class Alieve::TPCSegmentEditor+;
+
+//================================
+// gl/
+//================================
+
+#pragma link C++ class Alieve::TPCSegmentGL+;
--- /dev/null
+# $Header$
+
+# MODULE ~include sub-directory, namespace
+# NAME ~ name of the library
+
+MODULE = Alieve
+NAME = Alieve
+LIBNAME = lib${NAME}.${LDEXT}
+DICTSTEM = ${NAME}_Dict
+
+HDRS = $(filter-out %LinkDef.h %_Dict.h, $(wildcard *.h))
+SRCS = $(wildcard *.cxx)
+OBJS = $(SRCS:.cxx=.o)
+ALLOBJS = ${OBJS} ${DICTSTEM}.o
+
+LIBS = ${LIBNAME}
+
+include ../make_base.inc
+
+ALICE_INCLUDES = -I${ALICE_ROOT}/include -I${ALICE_ROOT}/TPC -I${ALICE_ROOT}/ITS
+
+CPPFLAGS += ${ALICE_INCLUDES}
+
+${DICTSTEM}.cc: ${HDRS} LinkDef.h
+ ${ROOTCINT} -f $@ -c ${ROOTCINTFLAGS} ${ALICE_INCLUDES} $^
--- /dev/null
+// $Header$
+
+//__________________________________________________________________________
+// TPCDigitsInfo
+//
+//
+
+
+#include <TFile.h>
+#include <TStopwatch.h>
+#include <Reve/TTreeTools.h>
+
+#include "TPCDigitsInfo.h"
+
+
+using namespace Reve;
+using namespace Alieve;
+using namespace std;
+
+void TPCSeg::Dump() const
+{
+ printf("TPCSeg: pw %f, pl %f, R %f, nRows %d, nMaxPads %d \n",
+ fPadWidth, fPadLength,fRlow,fNRows,fNMaxPads);
+}
+
+
+ClassImp(TPCDigitsInfo)
+
+/**************************************************************************/
+
+void TPCDigitsInfo::Init()
+{
+ fTree = 0;
+ fParameter= 0;
+}
+
+
+TPCDigitsInfo::~TPCDigitsInfo()
+{
+ delete fParameter;
+ delete fTree;
+}
+
+/**************************************************************************/
+
+void TPCDigitsInfo::SetData(AliTPCParam* par, TTree* digits)
+{
+
+ static const Exc_t eH("TPCDigitsInfo::SetData");
+
+ fParameter = par;
+ fTree = digits;
+
+ TStopwatch* sw = new TStopwatch();
+ sw->Start();
+ fTree->LoadBaskets();
+ sw->Stop();
+ // printf("TPCDigitsInfo::SetData timer %f\n", sw->RealTime());
+ // sw->Dump();
+
+ fSegEnt.assign(72,-1);
+ AliSimDigits *digit = &fSimDigits;
+ fTree->GetBranch("Segment")->SetAddress(&digit);
+
+ Int_t sbr=(Int_t)fTree->GetEntries();
+ for (Int_t ent=0; ent<sbr; ent++) {
+ fTree->GetEntry(ent);
+ Int_t s, row;
+ par->AdjustSectorRow(digit->GetID(),s,row);
+ // printf("found entry %d in sec %d row %d \n",ent, s, row);
+
+ if(row == 0) fSegEnt[s] = ent;
+ }
+
+
+ // read TPC Seg data
+ fInnSeg.fPadWidth = par->GetInnerPadPitchWidth();
+ fInnSeg.fPadLength = par->GetInnerPadPitchLength();
+ fInnSeg.fRlow = par->GetPadRowRadiiLow(0);
+ fInnSeg.fNRows = par->GetNRowLow();
+ fInnSeg.fNMaxPads = par->GetNPadsLow(fInnSeg.fNRows - 1);
+
+
+ fOut1Seg.fPadWidth = par->GetOuterPadPitchWidth();
+ fOut1Seg.fPadLength = par->GetOuter1PadPitchLength();
+ fOut1Seg.fRlow = par->GetPadRowRadiiUp(0);
+ fOut1Seg.fNRows = par->GetNRowUp1();
+ fOut1Seg.fNMaxPads = par->GetNPadsUp(fOut1Seg.fNRows-1);
+
+
+ fOut2Seg.fPadWidth = par->GetOuterPadPitchWidth();
+ fOut2Seg.fPadLength = par->GetOuter2PadPitchLength();
+ fOut2Seg.fRlow = par->GetPadRowRadiiUp(fOut1Seg.fNRows);
+ fOut2Seg.fNRows = par->GetNRowUp() - fOut1Seg.fNRows;
+ fOut2Seg.fNMaxPads = par->GetNPadsUp(par->GetNRowUp()-1);
+
+
+ // set stepsize array
+ Int_t k, npads;
+ // Inn
+ k=0, npads = par->GetNPadsLow(0);
+ for (int row = 0; row < fInnSeg.fNRows ;row++ ){
+ if (par->GetNPadsLow(row) > npads){
+ npads = par->GetNPadsLow(row);
+ fInnSeg.fStepY[k]=row* fInnSeg.fPadLength +fInnSeg.fRlow;
+ k++;
+ }
+ }
+ fInnSeg.fNsteps=k;
+ // Out1 seg
+ k=0; npads = par->GetNPadsUp(0);
+ for (int row = 0; row < fOut1Seg.fNRows ;row++ ){
+ if (par->GetNPadsUp(row) > npads){
+ npads = par->GetNPadsUp(row);
+ fOut1Seg.fStepY[k]=row* fOut1Seg.fPadLength + fOut1Seg.fRlow ;
+ k++;
+ }
+ }
+ fOut1Seg.fNsteps=k;
+ // Out2 seg
+ k=0; npads = par->GetNPadsUp(fOut1Seg.fNRows);
+ for (int row = fOut1Seg.fNRows; row < par->GetNRowUp() ;row++ ){
+ if (par->GetNPadsUp(row) > npads){
+ npads = par->GetNPadsUp(row);
+ fOut2Seg.fStepY[k]=(row - fOut1Seg.fNRows)* fOut2Seg.fPadLength + fOut2Seg.fRlow ;
+ k++;
+ }
+ }
+ fOut2Seg.fNsteps=k;
+}
+
+/**************************************************************************/
+
+void TPCDigitsInfo::Print(Option_t* ) const
+{
+ fInnSeg.Dump();
+ fOut1Seg.Dump();
+ fOut2Seg.Dump();
+}
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_TPCDigitsInfo_H
+#define ALIEVE_TPCDigitsInfo_H
+
+#include <Reve/VSD.h>
+
+#include <vector>
+
+#include <TNamed.h>
+#include <TArrayI.h>
+#include <TTree.h>
+
+#include <AliTPCParam.h>
+#include <AliSimDigits.h>
+
+
+namespace Alieve {
+
+ class TPCSeg {
+ public:
+ Float_t fPadWidth, fPadLength,fRlow; // vertices data
+ Int_t fNRows; // text & vertices data
+ Int_t fNMaxPads; // texture offset data
+ Float_t fStepY[64]; // y coord wher npads has changed
+ Int_t fNsteps; // number of steps
+
+ void Dump() const;
+ };
+
+ class TPCDigitsInfo : public TNamed
+ {
+ private:
+ void Init();
+
+ protected:
+ Int_t fRefCount;
+ TString fDataDir;
+ Int_t fEvent;
+
+ public:
+ AliSimDigits fSimDigits;
+ AliTPCParam* fParameter;
+ TTree* fTree;
+ std::vector<Int_t> fSegEnt;
+ TPCSeg fInnSeg;
+ TPCSeg fOut1Seg;
+ TPCSeg fOut2Seg;
+
+ TPCDigitsInfo(const Text_t* n="TPCDigitsInfo", const Text_t* t=0) :
+ TNamed(n, t) { Init(); }
+ virtual ~TPCDigitsInfo();
+
+ void SetData(AliTPCParam* par, TTree* digits);
+
+ void IncRefCount() { ++fRefCount; }
+ void DecRefCount() { --fRefCount; if(fRefCount <= 0) delete this; }
+
+ virtual void Print(Option_t* opt="") const;
+
+ ClassDef(TPCDigitsInfo, 1);
+ }; // endclass TPCDigitsInfo
+}
+#endif
--- /dev/null
+#include "TPCSegment.h"
+
+
+using namespace Reve;
+using namespace Alieve;
+using namespace std;
+
+ClassImp(TPCSegment)
+
+/**************************************************************************/
+
+void TPCSegment::Init()
+{
+ fID = 0;
+ fInfo = 0;
+
+ fTrans = false;
+
+ fRnrFrame = true;
+ fUseTexture = true;
+ fTreshold = 1;
+ fShowMax = true;
+
+ fMinTime = 0;
+ fMaxTime = 1;
+ fTreshold = 5;
+ fMaxVal = 80;
+}
+
+TPCSegment::~TPCSegment()
+{
+ if(fInfo) fInfo->DecRefCount();
+}
+
+/**************************************************************************/
+
+void TPCSegment::SetInfo(TPCDigitsInfo* info)
+{
+ if(fInfo) fInfo->DecRefCount();
+ fInfo = info;
+ if(fInfo) fInfo->IncRefCount();
+}
+
+void TPCSegment::SetSegmentID(Int_t segment)
+{
+ if(segment < 0 ) segment = 0;
+ if(segment > 36) segment = 36;
+ fID = segment;
+ SetName(Form("TPCSegment %d", fID));
+ ++fRTS;
+}
+
+/**************************************************************************/
+
+void TPCSegment::ComputeBBox()
+{
+ Float_t b = fInfo->fInnSeg.fRlow;
+ Float_t w = fInfo->fOut2Seg.fNMaxPads* fInfo->fOut2Seg.fPadWidth/2;
+ Float_t h = fInfo->fOut2Seg.fRlow +
+ fInfo->fOut2Seg.fNRows* fInfo->fOut2Seg.fPadLength - fInfo->fInnSeg.fRlow;
+
+ bbox_init();
+ fBBox[0] = -w; fBBox[1] = w;
+ fBBox[2] = b; fBBox[3] = b + h;
+ fBBox[4] = -0.5; fBBox[5] = 0.5; // Fake z-width to 1 cm.
+}
+
+/**************************************************************************/
+
+void TPCSegment::SetTrans(Bool_t trans)
+{
+ fTrans = trans;
+ if(fTrans) {
+ for (Int_t k = 0; k< 16; k++)
+ fMatrix[k] = 0.;
+
+ Float_t z, s, c;
+ if(fID < 18) {
+ z = fInfo->fParameter->GetZLength();
+ } else {
+ z = -fInfo->fParameter->GetZLength();
+ }
+
+ // column major ii
+ fMatrix[14] = z;
+ fMatrix[15] = 1;
+
+ c = TMath::Cos((fID + 0.5)*20*TMath::Pi()/180 - TMath::Pi()/2);
+ s = TMath::Sin((fID + 0.5)*20*TMath::Pi()/180 - TMath::Pi()/2);
+
+ fMatrix[0] = -c;
+ fMatrix[1] = -s;
+ fMatrix[4] = -s;
+ fMatrix[5] = c;
+ fMatrix[10] = -1;
+ }
+}
+
+/**************************************************************************/
+void TPCSegment::Paint(Option_t* )
+{
+ TBuffer3D buffer(TBuffer3DTypes::kGeneric);
+
+ // Section kCore
+ buffer.fID = this;
+ buffer.fColor = 1;
+ buffer.fTransparency = 0;
+ buffer.fLocalFrame = fTrans;
+
+ if (fTrans)
+ memcpy(buffer.fLocalMaster, fMatrix, 16*sizeof(Double_t));
+ buffer.SetSectionsValid(TBuffer3D::kCore);
+
+ // We fill kCore on first pass and try with viewer
+ Int_t reqSections = gPad->GetViewer3D()->AddObject(buffer);
+ if (reqSections == TBuffer3D::kNone) {
+ // printf("TPCSegment::Paint viewer was happy with Core buff3d.\n");
+ return;
+ }
+ printf("TPCSegment::Paint only GL supported.\n");
+ return;
+ /*
+ if (reqSections & TBuffer3D::kRawSizes) {
+ Int_t nbPnts = fQuads.size()*4;
+ Int_t nbSegs = nbPnts;
+ if (!buffer.SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, fQuads.size(), fQuads.size()*6)) {
+ return;
+ }
+ buffer.SetSectionsValid(TBuffer3D::kRawSizes);
+ }
+
+ if ((reqSections & TBuffer3D::kRaw) && buffer.SectionsValid(TBuffer3D::kRawSizes)) {
+ // Points
+ Int_t pidx = 0;
+ for (std::vector<Quad>::iterator i=fQuads.begin(); i!=fQuads.end(); ++i) {
+ for (Int_t k = 0; k < 12; k++ ){
+ buffer.fPnts[pidx] = (*i).vertices[k];
+ pidx++;
+ }
+ }
+
+ // Segments
+ Int_t sidx = 0;
+ for (Int_t q = 0; q < fQuads.size(); ++q) {
+ for (Int_t s = 0; s < 4; ++s ) {
+ buffer.fSegs[3*sidx ] = 4;
+ buffer.fSegs[3*sidx+1] = sidx;
+ if (s == 3)
+ buffer.fSegs[3*sidx+2] = q*4;
+ else
+ buffer.fSegs[3*sidx+2] = sidx + 1;
+ sidx ++;
+ }
+ }
+
+ // Polygons
+ for (Int_t q = 0; q < fQuads.size(); ++q) {
+ buffer.fPols[6*q] = fQuads[q].color;
+ buffer.fPols[6*q +1] = 4;
+ buffer.fPols[6*q +2] = 4*q +0;
+ buffer.fPols[6*q +3] = 4*q +1;
+ buffer.fPols[6*q +4] = 4*q +2;
+ buffer.fPols[6*q +5] = 4*q +3;
+ }
+
+ buffer.SetSectionsValid(TBuffer3D::kRaw);
+ buffer.fColor = 5;
+ }
+
+ */
+ // gPad->GetViewer3D()->AddObject(buffer);
+}
--- /dev/null
+#ifndef ALIEVE_TPCSegment_H
+#define ALIEVE_TPCSegment_H
+
+#include <Reve/RenderElement.h>
+
+#include <Alieve/TPCDigitsInfo.h>
+
+#include <TNamed.h>
+#include <TBuffer3D.h>
+#include <TBuffer3DTypes.h>
+#include <TGeometry.h>
+#include <TVirtualPad.h>
+#include <TVirtualViewer3D.h>
+#include <TAtt3D.h>
+#include <TAttBBox.h>
+
+
+namespace Alieve {
+
+ class TPCSegmentEditor;
+ class TPCSegmentGL;
+
+ class TPCSegment : public TNamed, public TAtt3D, public TAttBBox, public Reve::RenderElement
+ {
+ friend class TPCSegmentGL;
+ friend class TPCSegmentEditor;
+ private:
+ void Init();
+
+ protected:
+ TPCDigitsInfo* fInfo;
+
+ Bool_t fRnrFrame;
+ Bool_t fUseTexture;
+ Color_t fFrameCol;
+
+ // These change data representation:
+ Int_t fID;
+ Bool_t fShowMax;
+ Int_t fMinTime;
+ Int_t fMaxTime;
+ Short_t fTreshold;
+ Int_t fMaxVal;
+
+ Double_t fMatrix[16];
+ Bool_t fTrans;
+ UInt_t fRTS; //! Rendering TimeStamp
+
+ public:
+ TPCSegment(const Text_t* n="TPCSegment", const Text_t* t=0, Color_t col=2) :
+ TNamed(n,t), Reve::RenderElement(fFrameCol), fFrameCol(col), fRTS(1)
+ { Init(); }
+
+
+ virtual ~TPCSegment();
+
+ void SetInfo(TPCDigitsInfo* diginfo);
+ virtual void SetSegmentID(Int_t id);
+
+ void SetShowMax(Bool_t sm) { fShowMax = sm; ++fRTS; }
+ void SetMinTime(Int_t mt) { fMinTime = mt; ++fRTS; }
+ void SetMaxTime(Int_t mt) { fMaxTime = mt; ++fRTS; }
+ void SetTreshold(Short_t t) { fTreshold = t; ++fRTS; }
+ void SetMaxVal(Int_t mv) { fMaxVal = mv; ++fRTS; }
+
+ virtual void ComputeBBox();
+
+ virtual void Paint(Option_t* option = "");
+
+ virtual void SetTrans(Bool_t t);
+
+ virtual Bool_t CanEditMainColor() { return true; }
+ ClassDef(TPCSegment, 1);
+ }; // endclass TPCSegment
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "TPCSegmentEditor.h"
+#include <Alieve/TPCSegment.h>
+
+#include <TVirtualPad.h>
+#include <TColor.h>
+
+#include <TGLabel.h>
+#include <TGButton.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+#include <TGSlider.h>
+#include <TGDoubleSlider.h>
+
+using namespace Reve;
+using namespace Alieve;
+
+//______________________________________________________________________
+// TPCSegmentEditor
+//
+
+ClassImp(TPCSegmentEditor)
+
+TPCSegmentEditor::TPCSegmentEditor(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+ UInt_t options, Pixel_t back) :
+ TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+{
+ fM = 0;
+ MakeTitle("TPCSegment");
+
+ //!!! create the widgets here ...
+
+ // Register the editor.
+ // TClass *cl = TPCSegment::Class();
+ // TGedElement *ge = new TGedElement;
+ // ge->fGedFrame = this;
+ // ge->fCanvas = 0;
+ // cl->GetEditorList()->Add(ge);
+
+ fUseTexture = new TGCheckButton(this, "UseTexture");
+ AddFrame(fUseTexture, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fUseTexture->Connect
+ ("Toggled(Bool_t)","Alieve::TPCSegmentEditor", this, "DoUseTexture()");
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "SegmentID:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 15, 2, 1, 1));
+
+ fSegmentID = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative,
+ TGNumberFormat::kNELLimitMinMax, 0, 35);
+
+ fSegmentID->GetNumberEntry()->SetToolTipText("0-18 front plate 18-36 back plate");
+ f->AddFrame(fSegmentID, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fSegmentID->Associate(this);
+ fSegmentID->Connect("ValueSet(Long_t)",
+ "Alieve::TPCSegmentEditor", this, "DoSegmentID()");
+
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "Treshold:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 15, 2, 1, 1));
+
+ fTreshold = new TGHSlider(f, 150);
+ fTreshold->SetRange(0,10);
+ fTreshold->Associate(this);
+ f->AddFrame(fTreshold, new TGLayoutHints(kLHintsLeft, 0, 5));
+ fTreshold->Connect("PositionChanged(Int_t)",
+ "Alieve::TPCSegmentEditor", this, "DoTreshold()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "MaxValue:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 2, 1, 1));
+ fMaxVal = new TGHSlider(f, 150);
+ fMaxVal->SetRange(0,100);
+ fMaxVal->Associate(this);
+ f->AddFrame(fMaxVal, new TGLayoutHints(kLHintsLeft, 0, 5));
+ fMaxVal->Connect("PositionChanged(Int_t)",
+ "Alieve::TPCSegmentEditor", this, "DoMaxVal()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+ fShowMax = new TGCheckButton(this, "ShowMax");
+ AddFrame(fShowMax, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fShowMax->Connect("Toggled(Bool_t)","Alieve::TPCSegmentEditor", this, "DoShowMax()");
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "Time Range:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 2, 1, 1));
+
+ fTime = new TGDoubleHSlider(f);
+ fTime->SetRange(0, 500);
+ fTime->Resize(160, 20);
+ f->AddFrame(fTime);//, new TGLayoutHints(kLHintsLeft, 0, 5));
+ fTime->Connect("PositionChanged()", "Alieve::TPCSegmentEditor",
+ this, "DoTime()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+ // What is this crap?
+ TClass *cl = TPCSegmentEditor::Class();
+ TGedElement *ge = new TGedElement;
+ ge->fGedFrame = this;
+ ge->fCanvas = 0;
+ cl->GetEditorList()->Add(ge);
+}
+
+TPCSegmentEditor::~TPCSegmentEditor()
+{}
+
+/**************************************************************************/
+
+void TPCSegmentEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
+{
+ fModel = 0;
+ fPad = 0;
+
+ if (!obj || !obj->InheritsFrom(TPCSegment::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
+ SetActive(kFALSE);
+ return;
+ }
+
+ fModel = obj;
+ fPad = pad;
+
+ fM = dynamic_cast<TPCSegment*>(fModel);
+
+ fUseTexture->SetState(fM->fUseTexture ? kButtonDown : kButtonUp);
+ fSegmentID->SetNumber(fM->fID);
+ fTreshold->SetPosition(fM->fTreshold);//(fTreshold->GetMaxPosition()- fTreshold->GetMinPosition() ));
+
+ fMaxVal->SetPosition(fM->fMaxVal);
+ fTime->SetPosition(fM->fMinTime, fM->fMaxTime);
+
+ fShowMax->SetState(fM->fShowMax ? kButtonDown : kButtonUp);
+ // fTime->SetPosition(fM->fMaxTime);
+ SetActive();
+}
+
+/**************************************************************************/
+
+void TPCSegmentEditor::DoUseTexture()
+{
+ fM->fUseTexture = fUseTexture->IsOn();
+ Update();
+}
+
+void TPCSegmentEditor::DoSegmentID()
+{
+ fM->SetSegmentID((Int_t) fSegmentID->GetNumber());
+ Update();
+}
+
+void TPCSegmentEditor::DoTreshold()
+{
+ fM->SetTreshold((Short_t) fTreshold->GetPosition());
+ printf("DoTreshold %d \n", fM->fTreshold);
+ Update();
+}
+
+void TPCSegmentEditor::DoMaxVal()
+{
+ fM->SetMaxVal((Int_t) fMaxVal->GetPosition());
+ printf("DoMaxVal %d \n",fM->fMaxVal);
+ Update();
+}
+
+void TPCSegmentEditor::DoShowMax()
+{
+ fM->SetShowMax(fShowMax->IsOn());
+ Update();
+}
+
+void TPCSegmentEditor::DoTime()
+{
+ Double_t min = fTime->GetMinPosition(), max = fTime->GetMaxPosition();
+ printf("hslidor min=%f max=%f\n", min, max);
+ fM->SetMinTime((Int_t) min);
+ fM->SetMaxTime((Int_t) max);
+ Update();
+}
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_TPCSegmentEditor_H
+#define ALIEVE_TPCSegmentEditor_H
+
+#include <TGedFrame.h>
+
+class TGCheckButton;
+class TGNumberEntry;
+class TGColorSelect;
+class TGDoubleHSlider;
+class TGHSlider;
+
+namespace Alieve {
+
+ class TPCSegment;
+
+ class TPCSegmentEditor : public TGedFrame
+ {
+ protected:
+ TPCSegment* fM; // fModel dynamic-casted to TPCSegmentEditor
+
+ TGCheckButton* fUseTexture;
+
+ TGNumberEntry* fSegmentID;
+
+ TGHSlider* fTreshold;
+ TGHSlider* fMaxVal;
+
+ TGCheckButton* fShowMax;
+
+ TGDoubleHSlider* fTime;
+
+ public:
+ TPCSegmentEditor(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+ ~TPCSegmentEditor();
+
+ virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
+ virtual Bool_t CanEditMainColor() { return true; }
+
+ // void DoXYZZ();
+ void DoUseTexture();
+
+ void DoSegmentID();
+
+ void DoTreshold();
+ void DoMaxVal();
+ void DoShowMax();
+ void DoTime();
+
+ ClassDef(TPCSegmentEditor, 1); // Editor for TPCSegment
+ }; // endclass TPCSegmentEditor
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "TPCSegmentGL.h"
+
+#include <TStyle.h>
+#include <TColor.h>
+#include <TStopwatch.h>
+
+using namespace Reve;
+using namespace Alieve;
+using namespace std;
+
+/**************************************************************************/
+
+TPCSegmentGL::TPCSegmentGL() : TGLObject()
+{
+ fImage = 0;
+ fTexture = 0;
+ fRTS = 0;
+}
+
+TPCSegmentGL::~TPCSegmentGL()
+{
+ if(fImage) delete fImage;
+ if(fTexture) glDeleteTextures(1, &fTexture);
+}
+
+
+/**************************************************************************/
+
+Bool_t TPCSegmentGL::SetModel(TObject* obj)
+{
+ if( set_model(obj, "Alieve::TPCSegment")){
+ fSegment = (TPCSegment*) fExternalObj;
+ return true;
+ }
+ return false;
+}
+
+void TPCSegmentGL::SetBBox()
+{
+ set_axis_aligned_bbox(((TPCSegment*)fExternalObj)->AssertBBox());
+}
+
+/**************************************************************************/
+
+void TPCSegmentGL::DirectDraw(const TGLDrawFlags & ) const
+{
+ // printf("TPCSegmentGL::DirectDraw \n");
+
+ if(fSegment->fInfo == 0 ) return;
+ TPCDigitsInfo* info = fSegment->fInfo;
+
+ if(fRTS < fSegment->fRTS) {
+ CreateTexture(info);
+ fRTS = fSegment->fRTS;
+ }
+
+ glPushAttrib(GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT |
+ GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_POLYGON_BIT);
+
+ glDisable(GL_LIGHTING);
+ glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
+ glEnable(GL_COLOR_MATERIAL);
+ glDisable(GL_CULL_FACE);
+
+
+ // rnr digits
+ if(fSegment->fUseTexture) {
+ //texture
+ glEnable(GL_BLEND);
+ glDepthMask(GL_FALSE);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glShadeModel(GL_FLAT);
+
+ glBindTexture (GL_TEXTURE_2D, fTexture);
+
+ glPolygonOffset(2,2);
+ glEnable(GL_POLYGON_OFFSET_FILL);
+
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glBindTexture(GL_TEXTURE_2D, fTexture);
+ glEnable(GL_TEXTURE_2D);
+
+ DisplayTexture(info->fInnSeg.fPadWidth, info->fInnSeg.fPadLength, info->fInnSeg.fRlow,
+ info->fInnSeg.fNMaxPads, info->fInnSeg.fNRows, 0,0);
+ DisplayTexture(info->fOut1Seg.fPadWidth, info->fOut1Seg.fPadLength, info->fOut1Seg.fRlow,
+ info->fOut1Seg.fNMaxPads,info->fOut1Seg.fNRows,info->fInnSeg.fNMaxPads,0);
+ DisplayTexture(info->fOut2Seg.fPadWidth, info->fOut2Seg.fPadLength, info->fOut2Seg.fRlow,
+ info->fOut2Seg.fNMaxPads, info->fOut2Seg.fNRows,0,info->fOut1Seg.fNRows);
+
+ glDisable(GL_TEXTURE_2D);
+ } else {
+ DisplayQuads(info->fInnSeg.fPadWidth, info->fInnSeg.fPadLength, info->fInnSeg.fRlow,
+ info->fInnSeg.fNMaxPads, info->fInnSeg.fNRows, 0,0);
+ DisplayQuads(info->fOut1Seg.fPadWidth, info->fOut1Seg.fPadLength, info->fOut1Seg.fRlow,
+ info->fOut1Seg.fNMaxPads,info->fOut1Seg.fNRows,info->fInnSeg.fNMaxPads,0);
+ DisplayQuads(info->fOut2Seg.fPadWidth, info->fOut2Seg.fPadLength, info->fOut2Seg.fRlow,
+ info->fOut2Seg.fNMaxPads, info->fOut2Seg.fNRows,0,info->fOut1Seg.fNRows);
+ }
+
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ DisplayFrame(info);
+
+ glPopAttrib();
+}
+
+/**************************************************************************/
+
+void TPCSegmentGL::LoadPadrow(Int_t row, Int_t col_off) const
+{
+ AliSimDigits *digit = &fSegment->fInfo->fSimDigits;
+
+ Int_t pad_var = 0;
+ Int_t time, pad, val;
+ UChar_t* img_pos;
+
+ Int_t min_time = fSegment->fMinTime;
+ Int_t max_time = fSegment->fMaxTime;
+ Bool_t half_border_time = ((fSegment->fMaxTime - fSegment->fMinTime) % 2 == 0);
+
+ Bool_t done_p = false;
+ Bool_t save_p = false;
+
+ digit->First();
+ do {
+
+ time = digit->CurrentRow();
+ pad = digit->CurrentColumn();
+ val = digit->CurrentDigit();
+
+ Bool_t use_digit = true;
+ if(use_digit) {
+ if(fSegment->fShowMax) {
+ if(val > pad_var) {
+ pad_var = val;
+ }
+ } else {
+ // Integrate int max_val.
+ if(time >= min_time && time <= max_time) {
+ if(half_border_time && (time == min_time || time == max_time))
+ pad_var += val/2;
+ else
+ pad_var += val;
+ }
+ }
+ }
+
+ if(digit->Next()) {
+ if(pad != digit->CurrentColumn())
+ save_p = true;
+ } else {
+ done_p = true;
+ save_p = true;
+ }
+
+ if(save_p) {
+ pad_var = TMath::Min(pad_var, fSegment->fMaxVal);
+ if(pad_var > fSegment->fTreshold) {
+ img_pos = GetRowCol(row, pad + col_off);
+ SetCol(pad_var, img_pos);
+ }
+ pad_var = 0;
+ }
+
+ } while (!done_p);
+}
+
+/**************************************************************************/
+
+void TPCSegmentGL::SetCol(Float_t z, UChar_t* pixel) const
+{
+
+ Int_t n_col = gStyle->GetNumberOfColors();
+
+ Int_t ci = gStyle->GetColorPalette
+ (TMath::Min(n_col - 1,
+ Int_t((n_col*(z - fSegment->fTreshold))/(fSegment->fMaxVal - fSegment->fTreshold))));
+
+ TColor* c = gROOT->GetColor(ci);
+
+ if(c) {
+ // UChar_t *x = (UChar_t*) &c;
+ pixel[0] = (UChar_t)(255*c->GetRed());
+ pixel[1] = (UChar_t)(255*c->GetGreen());
+ pixel[2] = (UChar_t)(255*c->GetBlue());
+ pixel[3] = 255;
+ }
+}
+
+/**************************************************************************/
+
+void TPCSegmentGL::CreateTexture(TPCDigitsInfo* info) const
+{
+ AliSimDigits *digit = &info->fSimDigits;
+ AliTPCParam *par = info->fParameter;
+
+ TTree* t = info->fTree;
+ Int_t s, row, ent, off;
+
+ TStopwatch* sw = new TStopwatch();
+ sw->Start();
+
+ // init fImage table
+ if (fImage == 0 ){
+ fImage = new UChar_t[ImageWidth*ImageHeight*4];
+ glGenTextures(1, &fTexture);
+ }
+ memset(fImage, 0, ImageWidth*ImageHeight*4);
+
+ ent = info->fSegEnt[fSegment->fID];
+ if(ent != -1) {
+ row=0;
+ // info->fInnSeg.Dump();
+ while(ent < t->GetEntriesFast()) {
+ t->GetEntry(ent);
+ par->AdjustSectorRow(digit->GetID(),s,row);
+ // printf("AdjustSectorRow DigitID %d sector %d row %d \n",digit->GetID(),s,row );
+ if(s != fSegment->fID) break;
+ off = (info->fInnSeg.fNMaxPads - par->GetNPadsLow(row))/2;
+ LoadPadrow(row, off);
+ ent++;
+ }
+ }
+ ent = info->fSegEnt[fSegment->fID + 36];
+ if(ent != -1) {
+ row=0;
+ // info->fOut1Seg.Dump();
+ while(ent < t->GetEntriesFast()) {
+ t->GetEntry(ent);
+ par->AdjustSectorRow(digit->GetID(),s,row);
+ // printf("AdjustSectorRow DigitID %d sector %d row %d \n",digit->GetID(),s,row );
+ if(s != (fSegment->fID+36)) break;
+
+ if(row < par->GetNRowUp1()) {
+ off = (info->fOut1Seg.fNMaxPads - par->GetNPadsUp(row))/2;
+ LoadPadrow(row, off + info->fInnSeg.fNMaxPads);
+ } else {
+ off = (info->fOut2Seg.fNMaxPads - par->GetNPadsUp(row))/2;
+ LoadPadrow(row, off); // info->fInnSeg.fNRows - info->fOut1Seg.fNRows);
+ }
+ ent++;
+ }
+ }
+ sw->Stop();
+ // printf("TPCSegment::CreateTexture timer %f\n", sw->RealTime());
+ // sw->Dump();
+
+ glBindTexture (GL_TEXTURE_2D, fTexture);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ // glTexEnvf (GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE, GL_MODULATE); // Lightning is off anyway.
+ glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, ImageWidth, ImageHeight,
+ 0, GL_RGBA, GL_UNSIGNED_BYTE, fImage);
+
+}
+
+void TPCSegmentGL::DisplayTexture(Float_t pw, Float_t pl, Float_t vR,
+ Int_t fNMaxPads, Int_t fNRows,
+ Int_t startCol, Int_t startRow) const
+{
+ Float_t w = fNMaxPads*pw/2;
+ Float_t v1 = 1.0*startRow/ImageHeight;
+ Float_t v2 = v1 + 1.0*fNRows/ImageHeight;
+ Float_t u1 = 1.0 *startCol/ImageWidth;
+ Float_t u2 = u1 + 1.0 *fNMaxPads/ImageWidth;
+ // printf("tex coord u1,v1: (%f, %f), v2,u2: (%f,%f) \n", v1, u1, v2, u2);
+ // printf("vertex coord >>> nPads %d pw %f, w: %f, y1: %f, y2: %f \n",fNMaxPads,pw, w, vR, vR+fNRows*pl);
+ // glColor4f(1.,1.,1.,fSegment->mAlpha);
+ // glColor4f(1.,1.,1.,1);
+ glBegin (GL_QUADS);
+
+ glTexCoord2f(u1, v1); glVertex3f (-w, vR, 0.0);
+ glTexCoord2f(u1, v2); glVertex3f (-w, vR+fNRows*pl, 0.0);
+ glTexCoord2f(u2, v2); glVertex3f ( w, vR+fNRows*pl, 0.0);
+ glTexCoord2f(u2, v1); glVertex3f ( w, vR, 0.0);
+
+ glEnd();
+}
+
+/**************************************************************************/
+
+void TPCSegmentGL::DisplayQuads(Float_t pw, Float_t pl, Float_t vR,
+ Int_t fNMaxPads, Int_t fNRows,
+ Int_t startCol, Int_t startRow) const
+{
+ UChar_t *pix;
+ Float_t y_d, y_u;
+ Float_t x_off, x;
+
+ glBegin(GL_QUADS);
+ for(Int_t row = 0; row<fNRows; row++){
+ y_d = vR + row*pl;
+ y_u = y_d + pl;
+ x_off = -fNMaxPads*pw/2;
+ for(Int_t pad = 0; pad<fNMaxPads; pad++){
+ pix = GetRowCol(row + startRow, pad + startCol);
+ x = x_off + pad*pw;
+ if(pix[3] != 0){
+ glColor4ubv(pix);
+ glVertex3f(x+pw, y_d, 0);
+ glVertex3f(x, y_d, 0);
+ glVertex3f(x, y_u, 0);
+ glVertex3f(x+pw, y_u, 0);
+ }
+ }
+ }
+ glEnd();
+}
+
+/**************************************************************************/
+
+void TPCSegmentGL::DisplayFrame(TPCDigitsInfo* info) const
+{
+ TPCSeg* seg;
+
+ TColor* c = gROOT->GetColor(fSegment->fFrameCol);
+ if(c == 0) return;
+
+ // x[0] = (UChar_t)(255*c->GetRed()); x[1] = (UChar_t)(255*c->GetGreen());
+ // x[2] = (UChar_t)(255*c->GetBlue()); x[3] = 255;
+
+ glColor3ub((UChar_t)(255*c->GetRed()),
+ (UChar_t)(255*c->GetGreen()),
+ (UChar_t)(255*c->GetBlue()));
+
+ seg = &info->fInnSeg;
+ glBegin(GL_LINE_LOOP);
+ LoopStepsUp(seg);
+ LoopStepsDown(seg);
+ glEnd();
+
+ // outer1 segment
+ seg = &info->fOut1Seg;
+ glBegin(GL_LINE_LOOP);
+ LoopStepsUp(seg);
+ LoopStepsDown(seg);
+ glEnd();
+
+ // outer2 segment
+ seg = &info->fOut2Seg;
+ glBegin(GL_LINE_STRIP);
+ LoopStepsUp(seg);
+ LoopStepsDown(seg);
+ glEnd();
+}
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_TPCSegmentGL_H
+#define ALIEVE_TPCSegmentGL_H
+
+
+#include <TGLObject.h>
+
+#include <Alieve/TPCSegment.h>
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+namespace Alieve {
+
+ const int ImageWidth = 256;
+ const int ImageHeight = 128;
+
+ class TPCSegmentGL : public TGLObject
+ {
+ protected:
+ virtual void DirectDraw(const TGLDrawFlags & flags) const;
+
+ private:
+ void LoadPadrow(Int_t row, Int_t off) const;
+ void DisplayTexture(Float_t pw, Float_t pl, Float_t vR, Int_t nMaxPads,
+ Int_t nRows, Int_t startRow,Int_t startCol) const;
+ void DisplayQuads(Float_t pw, Float_t pl, Float_t vR, Int_t nMaxPads,
+ Int_t nRows, Int_t startRow,Int_t startCol) const;
+ void DisplayFrame(TPCDigitsInfo* info) const;
+
+ GLubyte* GetRow(Int_t row) const;
+ GLubyte* GetRowCol(Int_t row, Int_t col) const;
+
+ // protected:
+ TPCSegment* fSegment;
+ mutable UChar_t* fImage;
+ mutable UInt_t fTexture;
+ mutable UInt_t fRTS;
+
+ public:
+ TPCSegmentGL();
+ virtual ~TPCSegmentGL();
+ virtual Bool_t SetModel(TObject* obj);
+ virtual void SetBBox();
+
+ void SetCol(Float_t z, UChar_t* pixel) const;
+ void CreateTexture(TPCDigitsInfo* info) const;
+
+ }; // endclass TPCSegment_GL_Rnr
+
+
+ inline UChar_t* TPCSegmentGL::GetRowCol(Int_t row, Int_t col) const
+ {
+ if ( row > ImageHeight) printf("ERROR row %d ImageHeight %d\n", row, col);
+ return fImage + (ImageWidth*row +col)*4*sizeof(UChar_t); //*sizeof();
+ }
+
+ inline void LoopStepsUp(Alieve::TPCSeg* seg)
+ {
+ Float_t x = -(seg->fNMaxPads*1.0/2 - seg->fNsteps)*seg->fPadWidth;
+ Float_t y = seg->fRlow;
+ glVertex3f(x,y,0.);
+ for(int s = 0; s <seg->fNsteps ;s++){
+ y = seg->fStepY[s];
+ glVertex3f(x,y,0.);
+ x -= seg->fPadWidth;
+ glVertex3f(x,y,0.);
+ }
+ y = seg->fRlow + seg->fNRows*seg->fPadLength;
+ glVertex3f(-seg->fNMaxPads*seg->fPadWidth/2,y,0.);
+ }
+
+ inline void LoopStepsDown(TPCSeg* seg)
+ {
+ Float_t x = seg->fNMaxPads*seg->fPadWidth/2;
+ Float_t y = seg->fRlow + seg->fNRows*seg->fPadLength;
+ glVertex3f(x,y,0.);
+ for (int s = (seg->fNsteps -1); s >= 0 ;s--){
+ y = seg->fStepY[s];
+ glVertex3f(x,y,0.);
+ x -= seg->fPadWidth;
+ glVertex3f(x,y,0.);
+ }
+ y = seg->fRlow;
+ glVertex3f((seg->fNMaxPads*1.0/2 - seg->fNsteps)*seg->fPadWidth,y, 0.);
+ }
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "VSDCreator.h"
+
+#include <Reve/TTreeTools.h>
+
+#include <AliStack.h>
+#include <AliITSLoader.h>
+#include <AliTPCTrackHitsV2.h>
+#include <AliPDG.h>
+#include <AliHit.h>
+#include <AliSimDigits.h>
+#include <AliKalmanTrack.h>
+#include <AliESD.h>
+#include <AliESDV0MI.h>
+#include <AliTPCclusterMI.h>
+#include <AliTPCClustersRow.h>
+#include <AliITS.h>
+#include <AliITSclusterV2.h>
+#include <AliTrackReference.h>
+#include <AliESDkink.h>
+
+#include <AliRun.h>
+#include <AliTPCParam.h>
+
+#include <TSystem.h>
+#include <TFile.h>
+
+using namespace Reve;
+using namespace Alieve;
+
+using namespace std;
+
+//______________________________________________________________________
+// VSDCreator
+//
+
+ClassImp(VSDCreator)
+
+void VSDCreator::init()
+{
+ mKineType = KT_Standard;
+ mDataDir = ".";
+
+ mTPCHitRes = 2;
+ mTRDHitRes = 2;
+
+ pRunLoader = 0;
+
+ // Particles not in ROOT's PDG database occuring in ALICE
+ AliPDG::AddParticlesToPdgDataBase();
+ {
+ TDatabasePDG *pdgDB = TDatabasePDG::Instance();
+ // const Int_t kspe=50000000;
+ const Int_t kion=10000000;
+
+ const Double_t kAu2Gev=0.9314943228;
+ const Double_t khSlash = 1.0545726663e-27;
+ const Double_t kErg2Gev = 1/1.6021773349e-3;
+ const Double_t khShGev = khSlash*kErg2Gev;
+ const Double_t kYear2Sec = 3600*24*365.25;
+
+ pdgDB->AddParticle("Deuteron","Deuteron",2*kAu2Gev+8.071e-3,kTRUE,
+ 0,1,"Ion",kion+10020);
+ pdgDB->AddParticle("Triton","Triton",3*kAu2Gev+14.931e-3,kFALSE,
+ khShGev/(12.33*kYear2Sec),1,"Ion",kion+10030);
+ pdgDB->AddParticle("Alpha","Alpha",4*kAu2Gev+2.424e-3,kTRUE,
+ khShGev/(12.33*kYear2Sec),2,"Ion",kion+20040);
+ pdgDB->AddParticle("HE3","HE3",3*kAu2Gev+14.931e-3,kFALSE,
+ 0,2,"Ion",kion+20030);
+ }
+
+ // AliKalmanTrack::SetConvConst(1);
+}
+
+VSDCreator::VSDCreator()
+{
+ init();
+}
+
+VSDCreator::VSDCreator(const Text_t* name, const Text_t* title) :
+ VSD(name, title)
+{
+ init();
+}
+
+/**************************************************************************/
+
+void VSDCreator::CreateVSD(const Text_t* data_dir, Int_t event,
+ const Text_t* vsd_file)
+{
+ static const Exc_t eH("VSDCreator::CreateVSD ");
+
+ mDataDir = data_dir;
+ mEvent = event;
+
+ string galice_file (Form("%s/galice.root", mDataDir.Data()));
+
+ if(mDebugLevel > 0)
+ printf("%s opening %s \n", eH.Data(), galice_file.c_str());
+
+ if(gSystem->AccessPathName(galice_file.c_str(), kReadPermission)) {
+ throw(eH + "Can not read file '" + galice_file + "'.");
+ }
+ pRunLoader = AliRunLoader::Open(galice_file.c_str());
+ if(pRunLoader == 0)
+ throw(eH + "AliRunLoader::Open failed.");
+
+ pRunLoader->LoadgAlice();
+ Int_t status = pRunLoader->GetEvent(mEvent);
+ if(status)
+ throw(eH + Form("GetEvent(%d) failed, exit code %s.", mEvent, status));
+
+ if(mDebugLevel > 0)
+ printf("%s open seems ok. Now loading sim data.\n", eH.Data());
+
+ pRunLoader->LoadHeader();
+ pRunLoader->LoadKinematics();
+ pRunLoader->LoadTrackRefs();
+ pRunLoader->LoadHits();
+
+ // GledNS::PushFD();
+
+ if(mDebugLevel > 0)
+ printf("%s opening output VSD.\n", eH.Data());
+
+ TFile* file = TFile::Open(vsd_file, "RECREATE", "ALICE VisualizationDataSummary");
+ mDirectory = new TDirectory("Event0", "");
+
+ if(mDebugLevel > 0)
+ printf("%s creating trees now ...\n", eH.Data());
+
+ CreateTrees();
+
+ if(mDebugLevel > 0)
+ printf("%s trees created, closing files.\n", eH.Data());
+
+ // file->Write();
+ file->Close();
+ delete file;
+ mDirectory =0;
+
+ //GledNS::PopFD();
+
+ // clean after the VSD data was sucessfuly written
+ mTreeK = 0;
+ mTreeH = 0;
+ //mTreeTR = 0;
+ mTreeC = 0;
+ mTreeV0 = 0;
+ mTreeKK = 0;
+ mTreeR = 0;
+ mTreeGI = 0;
+
+ pRunLoader->UnloadAll();
+ delete pRunLoader;
+ if(gAlice) {
+ delete gAlice; gAlice = 0;
+ }
+ pRunLoader = 0;
+
+ if(mDebugLevel > 0)
+ printf("%s all done.\n", eH.Data());
+}
+
+void VSDCreator::CreateTrees()
+{
+ static const Exc_t eH("VSDCreator::CreateTrees ");
+
+ if(mDirectory == 0)
+ throw(eH + "output directory not set.");
+
+ try {
+ if(mDebugLevel > 1)
+ printf("%s ConvertKinematics.\n", eH.Data());
+ ConvertKinematics();
+ } catch(Exc_t& exc) { WarnCaller(exc); }
+
+ try {
+ if(mDebugLevel > 1)
+ printf("%s ConvertHits.\n", eH.Data());
+ ConvertHits();
+ } catch(Exc_t& exc) { WarnCaller(exc); }
+
+ try {
+ if(mDebugLevel > 1)
+ printf("%s ConvertClusters.\n", eH.Data());
+ ConvertClusters();
+ } catch(Exc_t& exc) { WarnCaller(exc); }
+
+
+ printf("############# EXITING, had incompatible ESDTrack class #####\n");
+ goto end_geninfo_processing;
+
+
+ try {
+ if(mDebugLevel > 1)
+ printf("%s ConvertRecTracks.\n", eH.Data());
+ ConvertRecTracks();
+ } catch(Exc_t& exc) {
+ WarnCaller(exc + " Skipping V0 extraction.");
+ goto end_esd_processing;
+ }
+
+ try {
+ if(mDebugLevel > 1)
+ printf("%s ConvertV0.\n", eH.Data());
+ ConvertV0();
+ } catch(Exc_t& exc) { WarnCaller(exc); }
+
+ try {
+ if(mDebugLevel > 1)
+ printf("%s ConvertKinks.\n", eH.Data());
+ ConvertKinks();
+ } catch(Exc_t& exc) { WarnCaller(exc); }
+
+end_esd_processing:
+
+ try {
+ if(mDebugLevel > 1)
+ printf("%s ConvertGenInfo.\n", eH.Data());
+ ConvertGenInfo();
+ } catch(Exc_t& exc) { WarnCaller(exc); }
+
+end_geninfo_processing:
+ return;
+}
+
+/**************************************************************************/
+// Kinematics
+/**************************************************************************/
+
+void VSDCreator::ConvertKinematics()
+{
+ static const Exc_t eH("VSDCreator::ConvertKinematics ");
+
+ if(mTreeK != 0)
+ throw (eH + "kinematics already converted");
+
+ AliStack* stack = pRunLoader->Stack();
+ if(stack == 0)
+ throw(eH + "stack is null.");
+
+ mDirectory->cd();
+ mTreeK = new TTree("Kinematics", "TParticles sorted by Label");
+
+ Int_t nentries = stack->GetNtrack();
+ vector<MCTrack> vmc(nentries);
+ for (Int_t idx=0; idx<nentries; idx++) {
+ TParticle* tp = stack->Particle(idx);
+ vmc[idx] = *tp;
+ vmc[idx].label = idx;
+ }
+
+ // read track refrences
+ TTree* mTreeTR = pRunLoader->TreeTR();
+
+ if(mTreeTR == 0) {
+ WarnCaller(eH + "no TrackRefs; some data will not be available.");
+ } else {
+ TClonesArray* RunArrayTR = 0;
+ mTreeTR->SetBranchAddress("AliRun", &RunArrayTR);
+
+ Int_t nPrimaries = (Int_t) mTreeTR->GetEntries();
+ for (Int_t iPrimPart = 0; iPrimPart<nPrimaries; iPrimPart++) {
+ // printf("START mTreeTR->GetEntry(%d) \n",iPrimPart);
+ mTreeTR->GetEntry(iPrimPart);
+ // printf("END mTreeTR->GetEntry(%d) \n",iPrimPart);
+
+ for (Int_t iTrackRef = 0; iTrackRef < RunArrayTR->GetEntriesFast(); iTrackRef++) {
+ AliTrackReference *trackRef = (AliTrackReference*)RunArrayTR->At(iTrackRef);
+ Int_t track = trackRef->GetTrack();
+ if(track < nentries && track > 0){
+ MCTrack& mct = vmc[track];
+ if(trackRef->TestBit(kNotDeleted)) {
+ mct.decayed = true;
+ mct.t_decay = trackRef->GetTime();
+ mct.V_decay.x = trackRef->X();
+ mct.V_decay.y = trackRef->Y();
+ mct.V_decay.z = trackRef->Z();
+ mct.P_decay.x = trackRef->Px();
+ mct.P_decay.y = trackRef->Py();
+ mct.P_decay.z = trackRef->Pz();
+ if(TMath::Abs(mct.GetPdgCode()) == 11)
+ mct.decayed = false; // a bug in TreeTR
+ }
+ }
+ }
+ }
+ }
+
+ mTreeK->Branch("K", "Reve::MCTrack", &mpK, fBuffSize);
+
+ printf("sizeofvmc = %d\n", vmc.size());
+ for(vector<MCTrack>::iterator k=vmc.begin(); k!=vmc.end(); ++k) {
+ MCTrack& mct = *k;
+ mK = mct;
+
+ TParticle* m = &mct;
+ Int_t mi = mct.label;
+ int cnt = 0;
+ while(m->GetMother(0) != -1) {
+ if(cnt > 100) {
+ printf("cnt %d mi=%d, mo=%d\n", cnt, mi, m->GetMother(0));
+ }
+ mi = m->GetMother(0);
+ m = &vmc[mi];
+ ++cnt;
+ }
+ mK.eva_label = mi;
+
+ mTreeK->Fill();
+ }
+
+ mTreeK->BuildIndex("label");
+}
+
+/**************************************************************************/
+// Hits
+/**************************************************************************/
+
+namespace {
+
+ struct Detector
+ {
+ const char* name;
+ const char* hitbranch;
+ unsigned char detidx;
+ };
+
+ Detector detects[] = {
+ { "ITS", "AliITShit", 0 },
+ { "TPC", "AliTPCTrackHitsV2", 1 },
+ { "TRD", "AliTRDhit", 2 },
+ { "TOF", "AliTOFhit", 3 }
+ // { "RICH", "AliRICHhit", 4 },
+ };
+
+}
+
+/**************************************************************************/
+
+void VSDCreator::ConvertHits()
+{
+ static const Exc_t eH("VSDCreator::ConvertHits ");
+
+ if(mTreeH != 0)
+ throw(eH + "hits already converted.");
+
+ mDirectory->cd();
+ mTreeH = new TTree("Hits", "Combined detector hits.");
+ mTreeH->Branch("H", "Reve::Hit", &mpH, fBuffSize);
+
+ map<Int_t, Int_t> hmap;
+ // parameters for ITS, TPC hits filtering
+ Float_t x,y,z, x1,y1,z1;
+ Float_t tpc_sqr_res = mTPCHitRes*mTPCHitRes;
+ Float_t trd_sqr_res = mTRDHitRes*mTRDHitRes;
+
+ int l=0;
+ // load hits from the rest of detectors
+ while(detects[l].name != 0) {
+ Detector& det = detects[l++];
+
+ switch(det.detidx) {
+ case 1: {
+ Int_t count = 0;
+ TTree* treeh = pRunLoader->GetTreeH(det.name, false);
+ if(treeh == 0) {
+ WarnCaller(eH + "no hits for "+ det.name +".");
+ continue;
+ }
+ AliTPCTrackHitsV2 hv2, *_hv2=&hv2;
+ treeh->SetBranchAddress("TPC2", &_hv2);
+ Int_t np = treeh->GetEntries();
+ for(Int_t i=0; i<np; i++){
+ treeh->GetEntry(i);
+ Int_t eva_idx = np -i -1;
+ if (hv2.First() == 0) continue;
+ x = y = z = 0;
+ do {
+ AliHit* ah = hv2.GetHit();
+ x1=ah->X();y1=ah->Y();z1=ah->Z();
+ if((x-x1)*(x-x1)+(y-y1)*(y-y1)+(z-z1)*(z-z1) > tpc_sqr_res) {
+ mH.det_id = det.detidx;
+ mH.subdet_id = 0;
+ mH.label = ah->Track();
+ mH.eva_label = eva_idx;
+ mH.V.x = x1; mH.V.y = y1; mH.V.z = z1;
+ mTreeH->Fill();
+ hmap[mH.label]++;
+ x = x1; y = y1; z = z1;
+ count++;
+ }
+ } while (hv2.Next());
+ }
+ // printf("%d entries in TPChits \n",count);
+ break;
+ }
+ default: {
+ TTree* treeh = pRunLoader->GetTreeH(det.name, false);
+ if(treeh == 0) {
+ WarnCaller(eH + "no hits for "+ det.name +".");
+ continue;
+ }
+ TClonesArray *arr = new TClonesArray(det.hitbranch);
+ treeh->SetBranchAddress(det.name, &arr);
+ Int_t np = treeh->GetEntries();
+ // in TreeH files hits are grouped in clones arrays
+ // each eva particle has its own clone array
+ for (Int_t i=0; i<np; i++) {
+ treeh->GetEntry(i);
+ Int_t eva_idx = np -i -1;
+ Int_t nh=arr->GetEntriesFast();
+ x = y = z = 0;
+ // printf("%d entry %d hits for primary %d \n", i, nh, eva_idx);
+ for (Int_t j=0; j<nh; j++) {
+ AliHit* ali_hit = (AliHit*)arr->UncheckedAt(j);
+ mH.det_id = det.detidx;
+ mH.subdet_id = 0;
+ mH.label = ali_hit->GetTrack();
+ mH.eva_label = eva_idx;
+ mH.V.Set(ali_hit->X(), ali_hit->Y(), ali_hit->Z());
+ if(det.detidx == 2) {
+ x1=ali_hit->X();y1=ali_hit->Y();z1=ali_hit->Z();
+ if((x-x1)*(x-x1)+(y-y1)*(y-y1)+(z-z1)*(z-z1) < trd_sqr_res) continue;
+ x=x1; y=y1; z=z1;
+ }
+ hmap[mH.label]++;
+ mTreeH->Fill();
+ }
+ }
+ delete arr;
+ break;
+ } // end default
+ } // end switch
+ } // end while
+
+
+ //set geninfo
+ for(map<Int_t, Int_t>::iterator j=hmap.begin(); j!=hmap.end(); ++j) {
+ GetGeninfo(j->first)->n_hits += j->second;
+ }
+
+}
+
+/**************************************************************************/
+// Clusters
+/**************************************************************************/
+
+void VSDCreator::ConvertClusters()
+{
+ static const Exc_t eH("VSDCreator::ConvertClusters ");
+
+ if(mTreeC != 0)
+ throw(eH + "clusters already converted.");
+
+ mDirectory->cd();
+ mTreeC = new TTree("Clusters", "rec clusters");
+ mTreeC->Branch("C", "Reve::Cluster", &mpC, fBuffSize);
+
+ try {
+ ConvertITSClusters();
+ } catch(Exc_t& exc) { WarnCaller(exc); }
+
+ try {
+ ConvertTPCClusters();
+ } catch(Exc_t& exc) { WarnCaller(exc); }
+}
+
+/**************************************************************************/
+
+void VSDCreator::ConvertTPCClusters()
+{
+ static const Exc_t eH("VSDCreator::ConvertTPCClusters ");
+
+ auto_ptr<TFile> f
+ ( TFile::Open(Form("%s/TPC.RecPoints.root", mDataDir.Data())) );
+ if(!f.get())
+ throw(eH + "can not open 'TPC.RecPoints.root' file.");
+
+ auto_ptr<TDirectory> d
+ ( (TDirectory*) f->Get(Form("Event%d", mEvent)) );
+ if(!d.get())
+ throw(eH + Form("event directory '%d' not found.", 0));
+
+ auto_ptr<TTree> tree( (TTree*) d->Get("TreeR") );
+ if(!tree.get())
+ throw(eH + "'TreeR' not found.");
+
+ auto_ptr<AliTPCParam> par( GetTpcParam(eH) );
+
+ AliTPCClustersRow clrow, *_clrow=&clrow;
+ AliTPCclusterMI *cl;
+ _clrow->SetClass("AliTPCclusterMI");
+ tree->SetBranchAddress("Segment", &_clrow);
+
+ // count clusters
+ Int_t nClusters = 0;
+ Int_t n_ent = tree->GetEntries();
+ for (Int_t n=0; n<n_ent; n++) {
+ tree->GetEntry(n);
+ nClusters += _clrow->GetArray()->GetEntriesFast();
+ }
+
+ // calculate xyz for a cluster and add it to container
+ Double_t x,y,z;
+ Float_t cs, sn, tmp;
+ map<Int_t, Int_t> cmap;
+
+ for (Int_t n=0; n<tree->GetEntries(); n++) {
+ tree->GetEntry(n);
+ Int_t ncl = _clrow->GetArray()->GetEntriesFast();
+ if(ncl > 0) {
+ Int_t sec,row;
+ par->AdjustSectorRow(_clrow->GetID(),sec,row);
+ while (ncl--) {
+ if(_clrow->GetArray()) {
+ // cl = new AliTPCclusterMI(*(AliTPCclusterMI*)_clrow->GetArray()->UncheckedAt(ncl));
+ cl = (AliTPCclusterMI*)_clrow->GetArray()->UncheckedAt(ncl);
+ if(cl->GetLabel(0) >= 0){
+ x = par->GetPadRowRadii(sec,row); y = cl->GetY(); z = cl->GetZ();
+ par->AdjustCosSin(sec,cs,sn);
+ tmp = x*cs-y*sn; y= x*sn+y*cs; x=tmp;
+
+ mC.det_id = 1;
+ mC.subdet_id = 0;
+ mC.label[0] = cl->GetLabel(0);
+ mC.label[1] = cl->GetLabel(1);
+ mC.label[2] = cl->GetLabel(2);
+ mC.V.Set(x, y, z);
+
+ mTreeC->Fill();
+ { int i = 0;
+ while(i < 3 && mC.label[i])
+ cmap[mC.label[i++]]++;
+ }
+ }
+ }
+ }
+ }
+ }
+ //set geninfo
+ for(map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
+ GetGeninfo(j->first)->n_clus += j->second;
+ }
+}
+
+/**************************************************************************/
+
+void VSDCreator::ConvertITSClusters()
+{
+ static const Exc_t eH("VSDCreator::ConvertITSClusters ");
+
+ auto_ptr<TFile> f
+ ( TFile::Open(Form("%s/ITS.RecPoints.root", mDataDir.Data())) );
+ if(!f.get())
+ throw(eH + "can not open 'ITS.RecPoints.root' file.");
+
+ auto_ptr<TDirectory> d
+ ( (TDirectory*) f->Get(Form("Event%d", mEvent)) );
+ if(!d.get())
+ throw(eH + Form("event directory '%d' not found.", 0));
+
+ auto_ptr<TTree> tree( (TTree*) d->Get("TreeR") );
+ if(!tree.get())
+ throw(eH + "'TreeR' not found.");
+
+ AliITSLoader* ITSld = (AliITSLoader*) pRunLoader->GetLoader("ITSLoader");
+ //AliITS* pITS = ITSld->GetITS();
+ AliITSgeom* geom = ITSld->GetITSgeom();
+ //AliITSgeom* geom = new AliITSgeom();
+ //geom->ReadNewFile("/home/aljam/ITSgeometry.det");
+
+ //printf("alice ITS geom %p \n",geom );
+
+ if(!geom)
+ throw(eH + "can not find ITS geometry");
+
+ TClonesArray *arr = new TClonesArray("AliITSclusterV2");
+ tree->SetBranchAddress("Clusters", &arr);
+ Int_t nmods = tree->GetEntries();
+ Float_t gc[3];
+ map<Int_t, Int_t> cmap;
+
+ for (Int_t mod=0; mod<nmods; mod++) {
+ tree->GetEntry(mod);
+ Int_t nc=arr->GetEntriesFast();
+ for (Int_t j=0; j<nc; j++) {
+ AliITSclusterV2* recp = (AliITSclusterV2*)arr->UncheckedAt(j);
+
+ Double_t rot[9];
+ geom->GetRotMatrix(mod,rot);
+ Int_t lay,lad,det;
+ geom->GetModuleId(mod,lay,lad,det);
+ Float_t tx,ty,tz;
+ geom->GetTrans(lay,lad,det,tx,ty,tz);
+
+ Double_t alpha=TMath::ATan2(rot[1],rot[0])+TMath::Pi();
+ Double_t phi1=TMath::Pi()/2+alpha;
+ if(lay==1) phi1+=TMath::Pi();
+
+ Float_t cp=TMath::Cos(phi1), sp=TMath::Sin(phi1);
+ Float_t r=tx*cp+ty*sp;
+ gc[0]= r*cp - recp->GetY()*sp;
+ gc[1]= r*sp + recp->GetY()*cp;
+ gc[2]= recp->GetZ();
+
+ mC.det_id = 0;
+ mC.subdet_id = 0;
+ mC.label[0] = recp->GetLabel(0);
+ mC.label[1] = recp->GetLabel(1);
+ mC.label[2] = recp->GetLabel(2);
+ mC.V.x = r*cp - recp->GetY()*sp;
+ mC.V.y = r*sp + recp->GetY()*cp;
+ mC.V.z = recp->GetZ();
+ mTreeC->Fill();
+ { int i = 0;
+ while(i < 3 && mC.label[i])
+ cmap[mC.label[i++]]++;
+ }
+ }
+
+ for(map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
+ GetGeninfo(j->first)->n_clus += j->second;
+ }
+ }
+ delete arr;
+}
+
+/**************************************************************************/
+// ESD
+/**************************************************************************/
+
+void VSDCreator::ConvertRecTracks()
+{
+ static const Exc_t eH("VSDCreator::ConvertRecTracks ");
+
+ if(mTreeR != 0)
+ throw(eH + "tracks already converted.");
+
+ mDirectory->cd();
+ mTreeR = new TTree("RecTracks", "rec tracks");
+
+ mTreeR->Branch("R", "Reve::RecTrack", &mpR, 512*1024,1);
+
+ TFile f(Form("%s/AliESDs.root", mDataDir.Data()));
+ if(!f.IsOpen())
+ throw(eH + "no AliESDs.root file.");
+
+ TTree* tree = (TTree*) f.Get("esdTree");
+ if (tree == 0)
+ throw(eH + "no esdTree.");
+
+
+ AliESD *fEvent=0;
+ tree->SetBranchAddress("ESD", &fEvent);
+ tree->GetEntry(mEvent);
+
+
+ // reconstructed tracks
+ AliESDtrack* esd_t;
+ Double_t dbuf[3];
+ for (Int_t n=0; n<fEvent->GetNumberOfTracks(); n++) {
+ esd_t = fEvent->GetTrack(n);
+
+ mR.label = esd_t->GetLabel();
+ mR.status = (Int_t) esd_t->GetStatus();
+ mR.sign = (Int_t) esd_t->GetSign();
+ esd_t->GetXYZ(dbuf); mR.V.Set(dbuf);
+ esd_t->GetPxPyPz(dbuf); mR.P.Set(dbuf);
+ Double_t ep = esd_t->GetP();
+ mR.beta = ep/TMath::Sqrt(ep*ep + TMath::C()*TMath::C()*esd_t->GetMass()*esd_t->GetMass());
+ mTreeR->Fill();
+ }
+ mTreeR->BuildIndex("label");
+}
+
+/**************************************************************************/
+
+void VSDCreator::ConvertV0()
+{
+ static const Exc_t eH("VSDCreator::ConvertV0 ");
+
+ if(mTreeV0 != 0)
+ throw(eH + "V0 already converted.");
+
+ mDirectory->cd();
+ mTreeV0 = new TTree("V0", "V0 points");
+
+ mTreeV0->Branch("V0", "Reve::RecV0", &mpV0, 512*1024,1);
+
+ TFile f(Form("%s/AliESDs.root", mDataDir.Data()));
+ if(!f.IsOpen()){
+ throw(eH + "no AliESDs.root file.");
+ }
+
+ TTree* tree = (TTree*) f.Get("esdTree");
+ if (tree == 0)
+ throw(eH + "no esdTree.");
+
+ AliESD *fEvent=0;
+ tree->SetBranchAddress("ESD", &fEvent);
+ tree->GetEntry(mEvent);
+
+ for (Int_t n =0; n< fEvent->GetNumberOfV0MIs(); n++) {
+ AliESDV0MI* av = fEvent->GetV0MI(n);
+ Double_t pos[3];
+
+ mV0.status = av->GetStatus();
+ // Point of closest approach
+ mV0.V_ca.x = av->GetXr(0);
+ mV0.V_ca.y = av->GetXr(1);
+ mV0.V_ca.z = av->GetXr(2);
+ // set birth vertex of neutral particle
+ { Double_t p[3];
+ av->GetXYZ(p[0], p[1], p[2]);
+ mV0.V0_birth.Set(p);
+ }
+
+ // momentum and position of negative particle
+ mV0.P_neg.Set(av->GetPMp());
+ av->GetParamM()->GetXYZ(pos);
+ mV0.V_neg.Set(pos);
+
+ // momentum and position of positive particle
+ mV0.P_pos.Set(av->GetPPp());
+ av->GetParamP()->GetXYZ(pos);
+ mV0.V_pos.Set(pos);
+
+ mV0.label = 0; // !!!! mother label unknown
+ mV0.pdg = av->GetPdgCode();
+ // daughter indices
+ mV0.d_label[0] = av->GetLab(0);
+ mV0.d_label[1] = av->GetLab(1);
+
+ // printf("V0 convert labels(%d,%d) index(%d,%d)\n",
+ // av->GetLab(0), av->GetLab(1),
+ // av->GetIndex(0), av->GetIndex(1));
+
+ mTreeV0->Fill();
+ }
+ // if(fEvent->GetNumberOfV0MIs()) mTreeV0->BuildIndex("label");
+}
+
+/**************************************************************************/
+
+void VSDCreator::ConvertKinks()
+{
+ static const Exc_t eH("VSDCreator::ConvertKinks ");
+
+ if(mTreeKK != 0)
+ throw(eH + "Kinks already converted.");
+
+ mDirectory->cd();
+ mTreeKK = new TTree("Kinks", "ESD Kinks");
+
+ mTreeKK->Branch("KK", "Reve::RecKink", &mpKK, fBuffSize);
+
+ TFile f(Form("%s/AliESDs.root", mDataDir.Data()));
+ if(!f.IsOpen()){
+ throw(eH + "no AliESDs.root file.");
+ }
+
+ TTree* tree = (TTree*) f.Get("esdTree");
+ if (tree == 0)
+ throw(eH + "no esdTree.");
+
+ AliESD *fEvent=0;
+ tree->SetBranchAddress("ESD", &fEvent);
+ tree->GetEntry(mEvent);
+
+ // printf("CONVERT KINK Read %d entries in tree kinks \n", fEvent->GetNumberOfKinks());
+ for (Int_t n =0; n< fEvent->GetNumberOfKinks(); n++) {
+ AliESDkink* kk = fEvent->GetKink(n);
+
+ Double_t pos[3];
+
+
+ mKK.label = kk->GetLabel(0);
+ mKK.status = Int_t(kk->GetStatus(1) << 8 + kk->GetStatus(2));
+
+ // reconstructed kink position
+ mKK.label_sec = kk->GetLabel(1);
+ mKK.V_kink.Set(kk->GetPosition());
+
+ const AliExternalTrackParam& tp_mother = kk->RefParamMother();
+ // momentum and position of mother
+ tp_mother.GetPxPyPz(pos);
+ mKK.P.Set(pos);
+ tp_mother.GetXYZ(pos);
+ mKK.V.Set(pos);
+ const Double_t* par = tp_mother.GetParameter();
+ // printf("KINK Pt %f, %f \n",1/tp_mother.Pt(),par[4] );
+ mKK.sign = (par[4] < 0) ? -1 : 1;
+
+ const AliExternalTrackParam& tp_daughter = kk->RefParamDaughter();
+ // momentum and position of daughter
+ tp_daughter.GetPxPyPz(pos);
+ mKK.P_sec.Set(pos);
+ tp_daughter.GetXYZ(pos);
+ mKK.V_end.Set(pos);
+
+ mTreeKK->Fill();
+ }
+ if(fEvent->GetNumberOfKinks()) mTreeKK->BuildIndex("label");
+}
+/**************************************************************************/
+// GenInfo
+/**************************************************************************/
+
+void VSDCreator::ConvertGenInfo()
+{
+ static const Exc_t eH("VSDCreator::ConvertGenInfo ");
+
+ if(mTreeGI != 0)
+ throw(eH + "GI already converted.");
+
+ mDirectory->cd();
+ mTreeGI = new TTree("GenInfo", "Objects prepared for cross querry");
+
+ GenInfo::Class()->IgnoreTObjectStreamer(true);
+ mTreeGI->Branch("GI", "Reve::GenInfo", &mpGI, fBuffSize);
+ mTreeGI->Branch("K.", "Reve::MCTrack", &mpK);
+ mTreeGI->Branch("R.", "Reve::RecTrack", &mpR);
+
+ for(map<Int_t, GenInfo*>::iterator j=mGenInfoMap.begin(); j!=mGenInfoMap.end(); ++j) {
+ mGI = *(j->second);
+ mGI.label = j->first;
+ mTreeK->GetEntry(j->first);
+
+ if(mTreeR) {
+ Int_t re = mTreeR->GetEntryNumberWithIndex(j->first);
+ if(re != -1)
+ mGI.is_rec = true;
+ }
+ // Int_t has_v0 = mTreeV0->GetEntryNumberWithIndex(j->first);
+ //if (has_v0 != -1)
+ // mGI.has_V0 = true;
+ if (mTreeKK) {
+ Int_t has_kk = mTreeKK->GetEntryNumberWithIndex(j->first);
+ if (has_kk != -1)
+ mGI.has_kink = true;
+ }
+ mTreeGI->Fill();
+ }
+ mGenInfoMap.clear();
+}
+
+/**************************************************************************/
+/**************************************************************************/
+// Protected methods
+/**************************************************************************/
+/**************************************************************************/
+
+AliTPCParam* VSDCreator::GetTpcParam(const Exc_t& eh)
+{
+ auto_ptr<TFile> fp( TFile::Open(Form("%s/galice.root", mDataDir.Data())) );
+ if(!fp.get())
+ throw(eh + "can not open 'galice.root' file.");
+ AliTPCParam* par = (AliTPCParam *) fp->Get("75x40_100x60_150x60");
+ if(!par)
+ throw(eh + "TPC data not found.");
+ return par;
+}
+
+
+
+GenInfo* VSDCreator::GetGeninfo(Int_t label)
+{
+ // printf("get_geninfo %d\n", label);
+ GenInfo* gi;
+ map<Int_t, GenInfo*>::iterator i = mGenInfoMap.find(label);
+ if(i == mGenInfoMap.end()) {
+ gi = new GenInfo();
+ mGenInfoMap[label] = gi;
+ } else {
+ gi = i->second;
+ }
+ return gi;
+}
--- /dev/null
+// $Header$
+
+#ifndef ALIEVE_VSDCreator_H
+#define ALIEVE_VSDCreator_H
+
+#include <Reve/VSD.h>
+
+class AliTPCParam;
+class AliRunLoader;
+
+#include <map>
+
+namespace Alieve {
+
+class VSDCreator : public Reve::VSD
+{
+public:
+ enum KineType_e { KT_Standard, KT_ProtonProton };
+
+protected:
+ void MakeItsDigitsInfo();
+ Reve::GenInfo* GetGeninfo(Int_t label);
+ AliTPCParam* GetTpcParam(const Reve::Exc_t& eh);
+
+ KineType_e mKineType; // X{GS} 7 PhonyEnum()
+ TString mDataDir; // X{G}
+ Int_t mEvent; // X{G}
+
+ Float_t mTRDHitRes; // X{gs}
+ Float_t mTPCHitRes; // X{gs}
+
+ Int_t mDebugLevel;
+
+ std::map<Int_t, Reve::GenInfo*> mGenInfoMap; //!
+
+ void init();
+
+public:
+ VSDCreator();
+ VSDCreator(const Text_t* name, const Text_t* title="");
+ virtual ~VSDCreator() {}
+
+ void CreateVSD(const Text_t* data_dir, Int_t event,
+ const Text_t* vsd_file); // X{Ed}
+
+ void CreateTrees();
+
+ // --------------------------------------------------------------
+ // Conversion functions.
+
+ void ConvertKinematics();
+ void ConvertHits();
+ void ConvertClusters();
+ void ConvertTPCClusters();
+ void ConvertITSClusters();
+ void ConvertV0();
+ void ConvertKinks();
+ void ConvertRecTracks();
+ void ConvertGenInfo();
+
+ // --------------------------------------------------------------
+ // Get/Set crap
+ Int_t GetDebugLevel() const { return mDebugLevel; }
+ void SetDebugLevel(Int_t dl) { mDebugLevel = dl; }
+
+ // --------------------------------------------------------------
+ // Globals.
+
+ AliRunLoader* pRunLoader;
+
+ ClassDef(VSDCreator, 1);
+}; // endclass VSDCreator
+
+}
+
+#endif
--- /dev/null
+# $Header$
+
+# Sorted by build order.
+SUBDIRS := Reve Alieve
+MKDEPINC := make_depend.inc
+
+export REVESYS := ${CURDIR}
+
+all:
+
+${MKDEPINC}: Makefile
+ @echo "Creating top-level dependencies."
+ @echo "%:" > ${MKDEPINC}
+ @for dir in ${SUBDIRS}; do \
+ echo -e "\t\$${MAKE} -C $$dir \$$@" >> ${MKDEPINC}; \
+ done
+
+-include ${MKDEPINC}
+
+depend:: # This one descents into subdirs.
+depend::
+ @rm -rf ${MKDEPINC}
+ @mkdir -p lib
+
+distclean::
+distclean::
+ @rm -rf ${MKDEPINC}
+ @rm -rf lib
--- /dev/null
+EVE - Event Visualization Environment
+=====================================
+
+EVE is composed of:
+1. small application kernel;
+2. graphics classes with editors and OpenGL renderers;
+3. CINT scripts that extract data, fill graphics classes and register
+ them to the application.
+
+This is an early release ... expect problems and be sure that what you
+need is not supported.
+
+
+Usage
+=====
+
+1. Initialize ALICE environment.
+
+2. Spawn 'reve' executable and invoke the alieve_init.C macro, for example:
+
+To load first event from current directory:
+ # reve alieve_init.C
+To load 5th event from directory /data/my-pp-run:
+ # reve 'alieve_init.C("/data/my-pp-run", 5)'
+Interactively:
+ # reve
+ root[0] .L alieve_init.C
+ root[1] alieve_init("/somedir")
+
+3. Use GUI or CINT command-line to invoke further visualization macros.
+
+See files in EVE/alice-macros/. For specific uses these should be
+edited to suit your needs.
+
+
+Directory structure
+===================
+
+EVE is split into two modules: REVE (ROOT part, not dependent on
+AliROOT) and ALIEVE (ALICE specific part). For the time being both
+modules are kept in AliROOT CVS.
+
+Alieve/ and Reve/ -- sources
+
+macros/ -- macros for bootstraping and internal steering
+alice-macros/ -- macros for ALICE visualization
+alica-data/ -- data files used by ALICE macros
+
+bin/, Makefile and make_base.inc are used for stand-alone build of the
+packages.
--- /dev/null
+// $Header$
+
+#include "CLASS.h"
+#include <Reve/STEM.h>
+
+#include <TVirtualPad.h>
+#include <TColor.h>
+
+#include <TGLabel.h>
+#include <TGButton.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+#include <TGDoubleSlider.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// CLASS
+//
+
+ClassImp(CLASS);
+
+CLASS::CLASS(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+ UInt_t options, Pixel_t back) :
+ TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+{
+ fM = 0;
+ MakeTitle("STEM");
+
+ //!!! create the widgets here ...
+
+ // Register the editor.
+ TClass *cl = STEM::Class();
+ TGedElement *ge = new TGedElement;
+ ge->fGedFrame = this;
+ ge->fCanvas = 0;
+ cl->GetEditorList()->Add(ge);
+}
+
+CLASS::~CLASS()
+{}
+
+/**************************************************************************/
+
+void CLASS::SetModel(TVirtualPad* pad, TObject* obj, Int_t event)
+{
+ fModel = 0;
+ fPad = 0;
+
+ if (!obj || !obj->InheritsFrom(STEM::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
+ SetActive(kFALSE);
+ return;
+ }
+
+ fModel = obj;
+ fPad = pad;
+
+ fM = dynamic_cast<STEM*>(fModel);
+
+ SetActive();
+}
+
+/**************************************************************************/
--- /dev/null
+// $Header$
+
+#ifndef REVE_CLASS_H
+#define REVE_CLASS_H
+
+#include <TGedFrame.h>
+
+class TGCheckButton;
+class TGNumberEntry;
+class TGColorSelect;
+
+namespace Reve {
+
+class STEM;
+
+class CLASS : public TGedFrame
+{
+protected:
+ STEM* fM; // fModel dynamic-casted to CLASS
+
+public:
+ CLASS(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+ ~CLASS();
+
+ virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
+
+ // void DoXYZZ();
+
+ ClassDef(CLASS, 1); // Editor for STEM
+}; // endclass CLASS
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "CLASS.h"
+#include <Reve/STEM.h>
+
+#include <TGLDrawFlags.h>
+
+#ifdef WIN32
+#include "Windows4root.h"
+#endif
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// CLASS
+//
+
+ClassImp(CLASS);
+
+CLASS::CLASS()
+{
+ // fCached = false; // Disable display list.
+}
+
+CLASS::~CLASS()
+{}
+
+/**************************************************************************/
+
+Bool_t CLASS::SetModel(TObject* obj)
+{
+ return set_model(obj, "Reve::STEM");
+}
+
+void CLASS::SetBBox()
+{
+ // !! This ok if master sub-classed from TAttBBox
+ set_axis_aligned_bbox(((STEM*)fExternalObj)->AssertBBox());
+}
+
+/**************************************************************************/
+
+void CLASS::DirectDraw(const TGLDrawFlags & flags) const
+{
+ // printf("CLASS::DirectDraw Style %d, LOD %d\n", flags.Style(), flags.LOD());
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_CLASS_H
+#define REVE_CLASS_H
+
+#include <TGLObject.h>
+
+namespace Reve {
+
+class CLASS
+{
+protected:
+ STEM* fM; // fModel dynamic-casted to CLASS
+
+ virtual void DirectDraw(const TGLDrawFlags & flags) const;
+
+public:
+ CLASS();
+ virtual ~CLASS();
+
+ virtual Bool_t SetModel(TObject* obj);
+ virtual void SetBBox();
+
+ ClassDef(CLASS, 0);
+}; // endclass CLASS
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "CLASS.h"
+
+
+//______________________________________________________________________
+// CLASS
+//
+
+ClassImp(CLASS);
+
+using namespace Reve;
+
+CLASS::CLASS()
+{
+
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_CLASS_H
+#define REVE_CLASS_H
+
+#include <Reve/Reve.h>
+
+#include <TObject.h>
+
+namespace Reve {
+
+class CLASS
+{
+protected:
+
+public:
+ CLASS();
+
+ ClassDef(CLASS, 1);
+}; // endclass CLASS
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "Event.h"
+
+#include <TClass.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// Event
+//
+
+ClassImp(Event)
+
+/**************************************************************************/
+
+const TString Event::sVSDHeaderName("VSDheader");
+
+void Event::Init()
+{
+ SetName(sVSDHeaderName);
+ fDirectory = 0;
+ fCreator = 0;
+ fSelector = 0;
+}
+
+Event::Event() :
+ fRun(0), fEvent(0)
+{ Init(); }
+
+Event::Event(Int_t run, Int_t evt, const TString& url) :
+ fRun(run), fEvent(evt), fUrl(url)
+{ Init(); }
+
+Event::Event(const TString& url) :
+ fEvent(0), fUrl(url)
+{ Init(); }
+
+/**************************************************************************/
+
+Event* Event::OpenDirectory(const TString& dir_name)
+{
+ static const Exc_t eH("Event::OpenDirectory ");
+
+ TDirectory* dir = dynamic_cast<TDirectory*>(gDirectory->Get(dir_name));
+ if (!dir)
+ throw(eH + "direcotry '" + dir_name + "' not found.");
+ return OpenDirectory(dir);
+}
+
+Event* Event::OpenDirectory(TDirectory* dir)
+{
+ static const Exc_t eH("Event::OpenDirectory ");
+
+ Event* evt = dynamic_cast<Event*>(dir->Get(sVSDHeaderName));
+ if (!evt)
+ throw(eH + "VSD header '" + sVSDHeaderName + "' not found.");
+ evt->fDirectory = dir;
+ return evt;
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void Event::SetDirectory(TDirectory* dir)
+{
+ if(fDirectory)
+ fDirectory->RecursiveRemove(this);
+ fDirectory = dir;
+ if(fDirectory)
+ fDirectory->Append(this);
+}
+
+TDirectory* Event::MakeDirectory(const Text_t* name, const Text_t* title)
+{
+ TDirectory* dir = new TDirectory(name, title);
+ SetDirectory(dir);
+ return fDirectory;
+}
+
+/**************************************************************************/
+
+void Event::Print(Option_t* ) const
+{
+ printf("%s: '%s', '%s'\n", IsA()->GetName(), GetName(), GetTitle());
+ printf(" run=%d, event=%d, url='%s'\n", fRun, fEvent, fUrl.Data());
+ if(fDirectory)
+ printf(" directory: '%s', '%s'\n", fDirectory->GetName(), fDirectory->GetTitle());
+}
+
+/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+
+#include <TBrowser.h>
+
+void EvTree::Browse(TBrowser* b)
+{
+ // fFolder.Browse(b); // This adds all elements to top-level.
+ b->Add(&fFolder);
+ TTree::Browse(b);
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_Event_H
+#define REVE_Event_H
+
+#include <Reve/Reve.h>
+#include <TDirectory.h>
+#include <map>
+
+#include <TTree.h>
+#include <TFolder.h>
+class TBrowser;
+
+namespace Reve {
+
+class VSD;
+
+class EvTree : public TTree
+{
+public:
+ TFolder fFolder;
+
+ EvTree() : TTree() {}
+ EvTree(const char* name, const char* title, Int_t splitlevel = 99) :
+ TTree(name, title, splitlevel), fFolder("Folder", "Additional event data") {}
+ virtual ~EvTree() {}
+
+ virtual void Browse(TBrowser* b);
+
+ ClassDef(EvTree, 1);
+};
+
+class Event : public TNamed
+{
+private:
+ void Init();
+
+protected:
+ Int_t fRun;
+ Int_t fEvent;
+ TString fUrl;
+
+ std::map<TString, TString> fTags;
+
+ TDirectory* fDirectory; //!
+
+ VSD* fCreator; //!
+ VSD* fSelector; //!
+
+public:
+ Event();
+ Event(Int_t run, Int_t evt, const TString& url=".");
+ Event(const TString& url);
+ // Static ctors
+ static Event* OpenDirectory(const TString& dir_name);
+ static Event* OpenDirectory(TDirectory* dir);
+
+ TDirectory* GetDirectory() { return fDirectory; }
+ void SetDirectory(TDirectory* dir);
+ TDirectory* MakeDirectory(const Text_t* name, const Text_t* title="");
+
+ TObject* Get(const Text_t* obj_name) { return fDirectory->Get(obj_name); }
+
+ virtual void Print(Option_t* opt="") const;
+
+ static const TString sVSDHeaderName;
+
+ ClassDef(Event, 1);
+}; // endclass Event
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "GeoNode.h"
+#include <Reve/RGTopFrame.h>
+
+#include <TPad.h>
+#include <TColor.h>
+
+#include <TGeoVolume.h>
+#include <TGeoNode.h>
+#include <TGeoManager.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// GeoNodeRnrEl
+//
+
+ClassImp(GeoNodeRnrEl)
+
+GeoNodeRnrEl::GeoNodeRnrEl(TGeoNode* node) :
+ RenderElementListBase(),
+ fNode(node)
+{
+ // Hack!! Should use cint to retrieve TAttLine::fLineColor offset.
+ char* l = (char*) dynamic_cast<TAttLine*>(node->GetVolume());
+ SetMainColorPtr((Color_t*)(l + sizeof(void*)));
+
+ fRnrElement = fNode->TGeoAtt::IsVisible();
+}
+
+const Text_t* GeoNodeRnrEl::GetName() const { return fNode->GetName(); }
+const Text_t* GeoNodeRnrEl::GetTitle() const { return fNode->GetTitle(); }
+
+/**************************************************************************/
+
+Int_t GeoNodeRnrEl::ExpandIntoListTree(TGListTree* ltree,
+ TGListTreeItem* parent)
+{
+ // Checks if child-nodes have been imported ... imports them if not.
+ // Then calls RenderElementListBase::ExpandIntoListTree.
+
+ if(fList.empty() && fNode->GetVolume()->GetNdaughters() > 0) {
+ TIter next(fNode->GetVolume()->GetNodes());
+ TGeoNode* dnode;
+ while((dnode = (TGeoNode*) next()) != 0) {
+ GeoNodeRnrEl* node_re = new GeoNodeRnrEl(dnode);
+ AddElement(node_re);
+ }
+ }
+ return RenderElementListBase::ExpandIntoListTree(ltree, parent);
+}
+
+/**************************************************************************/
+
+void GeoNodeRnrEl::FullUpdate()
+{
+ fRnrElement = fNode->TGeoAtt::IsVisible();
+ RenderElementListBase::FullUpdate();
+}
+
+/**************************************************************************/
+
+void GeoNodeRnrEl::SetRnrElement(Bool_t rnr)
+{
+ fNode->SetVisibility(rnr);
+ FullUpdate();
+}
+
+/**************************************************************************/
+
+void GeoNodeRnrEl::SetMainColor(Color_t color)
+{
+ fNode->GetVolume()->SetLineColor(color);
+ FullUpdate();
+}
+
+void GeoNodeRnrEl::SetMainColor(Pixel_t pixel)
+{
+ // This one needed for proper calling via CINT (signals).
+
+ SetMainColor(Color_t(TColor::GetColor(pixel)));
+}
+
+/**************************************************************************/
+
+void GeoNodeRnrEl::UpdateNode(TGeoNode* node)
+{
+ // Updates all reve-browsers having the node in their contents.
+ // All 3D-pads updated if any change found.
+ //
+ // Should (could?) be optimized with some assumptions about
+ // volume/node structure (search for parent, know the same node can not
+ // reoccur on lower level once found).
+
+ static const Exc_t eH("GeoNodeRnrEl::UpdateNode ");
+
+ // printf("%s node %s %p\n", eH.Data(), node->GetName(), node);
+
+ if(fNode == node)
+ FullUpdate();
+
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ ((GeoNodeRnrEl*)(*i))->UpdateNode(node);
+ }
+
+}
+
+void GeoNodeRnrEl::UpdateVolume(TGeoVolume* volume)
+{
+ // Updates all reve-browsers having the volume in their contents.
+ // All 3D-pads updated if any change found.
+ //
+ // Should (could?) be optimized with some assumptions about
+ // volume/node structure (search for parent, know the same node can not
+ // reoccur on lower level once found).
+
+ static const Exc_t eH("GeoNodeRnrEl::UpdateVolume ");
+
+ // printf("%s volume %s %p\n", eH.Data(), volume->GetName(), volume);
+
+ if(fNode->GetVolume() == volume)
+ FullUpdate();
+
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ ((GeoNodeRnrEl*)(*i))->UpdateVolume(volume);
+ }
+}
+
+/**************************************************************************/
+
+void GeoNodeRnrEl::Draw(Option_t* option)
+{
+ TString opt("SAME");
+ opt += option;
+ fNode->GetVolume()->Draw(opt);
+}
+
+/**************************************************************************/
+//______________________________________________________________________
+// GeoTopNodeRnrEl
+//
+/**************************************************************************/
+
+ClassImp(GeoTopNodeRnrEl)
+
+GeoTopNodeRnrEl::GeoTopNodeRnrEl(TGeoManager* manager, TGeoNode* node,
+ Int_t visopt, Int_t vislvl) :
+ GeoNodeRnrEl(node),
+ fManager(manager),
+ fVisOption(visopt), fVisLevel(vislvl)
+{
+ fRnrElement = true;
+}
+
+/**************************************************************************/
+
+void GeoTopNodeRnrEl::SetVisOption(Int_t visopt)
+{
+ fVisOption = visopt;
+ gReve->Redraw3D();
+}
+
+void GeoTopNodeRnrEl::SetVisLevel(Int_t vislvl)
+{
+ fVisLevel = vislvl;
+ gReve->Redraw3D();
+}
+
+/**************************************************************************/
+
+void GeoTopNodeRnrEl::FullUpdate()
+{
+ RenderElementListBase::FullUpdate();
+}
+
+/**************************************************************************/
+
+void GeoTopNodeRnrEl::SetRnrElement(Bool_t rnr)
+{
+ // Revert from GeoNode to back to standard behaviour.
+ RenderElementListBase::SetRnrElement(rnr);
+}
+
+/**************************************************************************/
+
+void GeoTopNodeRnrEl::Draw(Option_t* option)
+{
+ AppendPad(option);
+}
+
+void GeoTopNodeRnrEl::Paint(Option_t* option)
+{
+ if(fRnrElement) {
+ gGeoManager = fManager;
+ TVirtualPad* pad = gPad;
+ gPad = 0;
+ TGeoVolume* top_volume = fManager->GetTopVolume();
+ fManager->SetVisOption(fVisOption);
+ fManager->SetVisLevel(fVisLevel);
+ fManager->SetTopVolume(fNode->GetVolume());
+ gPad = pad;
+ fNode->Paint(option);
+ fManager->SetTopVolume(top_volume);
+ }
+}
+
+/**************************************************************************/
+
+void GeoTopNodeRnrEl::VolumeVisChanged(TGeoVolume* volume)
+{
+ static const Exc_t eH("GeoTopNodeRnrEl::VolumeVisChanged ");
+ printf("%s volume %s %p\n", eH.Data(), volume->GetName(), (void*)volume);
+ UpdateVolume(volume);
+}
+
+void GeoTopNodeRnrEl::VolumeColChanged(TGeoVolume* volume)
+{
+ static const Exc_t eH("GeoTopNodeRnrEl::VolumeColChanged ");
+ printf("%s volume %s %p\n", eH.Data(), volume->GetName(), (void*)volume);
+ UpdateVolume(volume);
+}
+
+void GeoTopNodeRnrEl::NodeVisChanged(TGeoNode* node)
+{
+ static const Exc_t eH("GeoTopNodeRnrEl::NodeVisChanged ");
+ printf("%s node %s %p\n", eH.Data(), node->GetName(), (void*)node);
+ UpdateNode(node);
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_ReveGeom_H
+#define REVE_ReveGeom_H
+
+#include <Reve/RenderElement.h>
+
+class TGeoVolume;
+class TGeoNode;
+class TGeoManager;
+
+namespace Reve {
+
+class GeoNodeRnrEl : public TObject, public RenderElementListBase
+{
+ friend class GeoNodeRnrElEditor;
+
+protected:
+ TGeoNode* fNode;
+
+public:
+ GeoNodeRnrEl(TGeoNode* node);
+
+ virtual const Text_t* GetName() const;
+ virtual const Text_t* GetTitle() const;
+
+ TGeoNode* GetNode() const { return fNode; }
+
+ virtual Int_t ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent);
+
+ virtual void FullUpdate();
+
+ virtual Bool_t CanEditRnrElement() { return false; }
+ virtual void SetRnrElement(Bool_t rnr);
+
+ virtual Bool_t CanEditMainColor() { return true; }
+ virtual void SetMainColor(Color_t color);
+ virtual void SetMainColor(Pixel_t pixel);
+
+ void UpdateNode(TGeoNode* node);
+ void UpdateVolume(TGeoVolume* volume);
+
+ virtual void Draw(Option_t* option="");
+
+ ClassDef(GeoNodeRnrEl, 1);
+}; // endclass GeoNodeRnrEl
+
+//----------------------------------------------------------------
+
+class GeoTopNodeRnrEl : public GeoNodeRnrEl
+{
+protected:
+ TGeoManager* fManager;
+ Int_t fVisOption;
+ Int_t fVisLevel;
+
+public:
+ GeoTopNodeRnrEl(TGeoManager* manager, TGeoNode* node, Int_t visopt=1, Int_t vislvl=3);
+
+ Int_t GetVisOption() const { return fVisOption; }
+ void SetVisOption(Int_t visopt);
+ Int_t GetVisLevel() const { return fVisLevel; }
+ void SetVisLevel(Int_t vislvl);
+
+ virtual void FullUpdate();
+
+ virtual Bool_t CanEditRnrElement() { return true; }
+ virtual void SetRnrElement(Bool_t rnr);
+
+ virtual void Draw(Option_t* option="");
+ virtual void Paint(Option_t* option="");
+
+ // Signals from GeoManager.
+ // These are not available any more ... colors in list-tree not refreshed
+ // properly.
+ void VolumeVisChanged(TGeoVolume* volume);
+ void VolumeColChanged(TGeoVolume* volume);
+ void NodeVisChanged(TGeoNode* node);
+
+ ClassDef(GeoTopNodeRnrEl, 1);
+}; // endclass GeoTopNodeRnrEl
+
+}
+
+#endif
--- /dev/null
+#pragma link off all functions;
+#pragma link off all globals;
+#pragma link off all classes;
+
+#pragma link C++ namespace Reve;
+#pragma link C++ global gReve; // In RGTopFrame ... should move.
+
+//================================
+// base/
+//================================
+
+// Reve
+#pragma link C++ function Reve::SetupEnvironment;
+#pragma link C++ function Reve::AssertMacro;
+#pragma link C++ function Reve::Macro;
+#pragma link C++ function Reve::LoadMacro;
+#pragma link C++ function Reve::PushPad;
+#pragma link C++ function Reve::PopPad;
+#pragma link C++ class Reve::Exc_t+;
+#pragma link C++ class Reve::PadHolder+;
+#pragma link C++ class Reve::GeoManagerHolder+;
+
+// PODs
+#pragma link C++ class Reve::Vector+;
+#pragma link C++ class Reve::PathMark+;
+#pragma link C++ class Reve::MCTrack+;
+#pragma link C++ class Reve::MCTrackRef+;
+#pragma link C++ class Reve::Hit+;
+#pragma link C++ class Reve::Cluster+;
+#pragma link C++ class Reve::RecTrack+;
+#pragma link C++ class Reve::RecKink+;
+#pragma link C++ class Reve::RecV0+;
+#pragma link C++ class Reve::GenInfo+;
+
+// Event
+#pragma link C++ class Reve::EvTree+;
+#pragma link C++ class Reve::Event+;
+#pragma link C++ class Reve::VSDTree+;
+#pragma link C++ class Reve::VSD+;
+
+// TTreeTools
+#pragma link C++ class TSelectorToEventList+;
+#pragma link C++ class TTreeQuery+;
+
+// RenderElement
+#pragma link C++ class Reve::RenderElement+;
+#pragma link C++ class Reve::RenderElement::ListTreeInfo+;
+#pragma link C++ class Reve::RenderElementListBase+;
+#pragma link C++ class Reve::RenderElementList+;
+
+// Pad
+#pragma link C++ class Reve::Pad+;
+
+// VSDSelector
+#pragma link C++ class Reve::VSDSelector+;
+
+// RGBrowser
+#pragma link C++ class Reve::ReveValuator+;
+#pragma link C++ class Reve::ReveColorSelect+;
+#pragma link C++ class Reve::RGBrowser+;
+
+// RGEditor
+#pragma link C++ class Reve::RGEditor+;
+
+// RGTopFrame
+#pragma link C++ class Reve::RGTopFrame+;
+
+//================================
+// g3d/
+//================================
+
+// Track
+#pragma link C++ class Reve::Track+;
+#pragma link C++ class Reve::TrackList+;
+#pragma link C++ class Reve::TrackRnrStyle+;
+
+// PointSet
+#pragma link C++ class Reve::PointSet+;
+#pragma link C++ class Reve::PointSetArray+;
+
+// QuadSet
+#pragma link C++ class Reve::Quad+;
+#pragma link C++ class Reve::QuadSet+;
+
+// GeoNode
+#pragma link C++ class Reve::GeoNodeRnrEl+;
+#pragma link C++ class Reve::GeoTopNodeRnrEl+;
+
+//================================
+// ged/
+//================================
+
+#pragma link C++ class Reve::RenderElementEditor+;
+#pragma link C++ class Reve::TrackListEditor+;
+#pragma link C++ class Reve::GeoNodeRnrElEditor+;
+#pragma link C++ class Reve::GeoTopNodeRnrElEditor+;
+
+#pragma link C++ class Reve::PointSetArrayEditor+;
+
+//================================
+// gl/
+//================================
+
+// ReveGLRenderers
+#pragma link C++ class Reve::QuadSetGL+;
--- /dev/null
+#ifndef REVE_MCHelixLine_H
+#define REVE_MCHelixLine_H
+
+#include <Reve/Track.h>
+#include <vector>
+
+namespace Reve {
+
+ struct MCVertex {
+ Float_t x,y,z,t;
+ };
+
+
+ struct MCStruct
+ {
+ TrackRnrStyle* fRnrMod;
+ std::vector<MCVertex>* track_points;
+ MCVertex v;
+ Float_t fVelocity; // size of particle velocity
+
+ MCStruct(TrackRnrStyle* rs, MCVertex* v0 , Float_t vel, std::vector<MCVertex>* tpv)
+ {
+ fRnrMod = rs;
+ v = *v0;
+ fVelocity = vel;
+ track_points = tpv;
+ track_points->push_back(v);
+ }
+ };
+
+ struct MCHelix : public MCStruct {
+ // constant
+ Float_t fA; // contains charge and magnetic field data
+
+ //parameters dependend pT and pZ size, set in init function
+ Float_t fLam; // momentum ratio pT/pZ
+ Float_t fR; // a/pT
+ Float_t fPhiStep; // step size in xy projection, dependent of RnrMode and momentum
+ Float_t fTimeStep;
+
+ Int_t fN; // step number in helix;
+ Int_t NMax; // max number of points in helix
+ Float_t x_off, y_off; // offset for fitting daughters
+ Float_t sin, cos;
+ Bool_t crosR;
+
+ MCHelix(TrackRnrStyle* rs, MCVertex* v0, Float_t vel, std::vector<MCVertex>* tpv, Float_t a):
+ MCStruct(rs, v0 , vel, tpv){
+ fA = a;
+ };
+
+ void Init(Float_t pT, Float_t pZ)
+ {
+ fN=0;
+ crosR = false;
+ x_off = 0; y_off = 0;
+ fLam = pZ/pT;
+ fR = pT/fA;
+
+ fPhiStep = fRnrMod->fMinAng *TMath::Pi()/180;
+ if(fRnrMod->fDelta < TMath::Abs(fR)){
+ Float_t ang = 2*TMath::ACos(1 - fRnrMod->fDelta/TMath::Abs(fR));
+ if (ang < fPhiStep) fPhiStep = ang;
+ }
+ if(fA<0) fPhiStep = -fPhiStep;
+
+ // printf("MCHelix::init (%f/%f) labda %f time step %e phi step %f \n", pT, pZ,fLam, fTimeStep,fPhiStep);
+ fTimeStep = TMath::Abs(fR*fPhiStep)*TMath::Sqrt(1+fLam*fLam)/fVelocity;
+ fTimeStep *= 0.01; //cm->m
+
+ sin = TMath::Sin(fPhiStep);
+ cos = TMath::Cos(fPhiStep);
+ }
+
+ void SetBounds()
+ {
+ // check steps for max orbits
+ NMax = Int_t(fRnrMod->fMaxOrbs*TMath::TwoPi()/TMath::Abs(fPhiStep));
+ // check steps for Z boundaries
+ Float_t nz;
+ if(fLam > 0) {
+ nz = (fRnrMod->fMaxZ - v.z)/(fLam*TMath::Abs(fR*fPhiStep));
+ } else {
+ nz = (-fRnrMod->fMaxZ - v.z)/(fLam*TMath::Abs(fR*fPhiStep));
+ }
+ // printf("steps in helix line %d nz %f vz %f\n", NMax, nz, v.z);
+ if (nz < NMax) NMax = Int_t(nz);
+
+ // check steps if circles intersect
+ if(TMath::Sqrt(v.x*v.x+v.y*v.y) < fRnrMod->fMaxR + TMath::Abs(fR)) {
+ crosR = true;
+ }
+ // printf("end steps in helix line %d \n", NMax);
+ }
+
+
+ void Step(Float_t &px, Float_t &py, Float_t &/*pz*/)
+ {
+ v.t += fTimeStep;
+ v.x += (px*sin - py*(1 - cos))/fA + x_off;
+ v.y += (py*sin + px*(1 - cos))/fA + y_off;
+ v.z += fLam*TMath::Abs(fR*fPhiStep);
+ track_points->push_back(v);
+ Float_t px_t = px*cos - py*sin ;
+ Float_t py_t = py*cos + px*sin ;
+ px = px_t;
+ py = py_t;
+ fN++;
+ }
+
+
+ Bool_t LoopToVertex(Float_t &px, Float_t &py, Float_t &pz,
+ Float_t ex, Float_t ey, Float_t ez)
+ {
+ Float_t p0x = px, p0y = py;
+ Float_t zs = fLam*TMath::Abs(fR*fPhiStep);
+ Float_t fnsteps = (ez - v.z)/zs;
+ Int_t nsteps = Int_t((ez - v.z)/zs);
+ Float_t sinf = TMath::Sin(fnsteps*fPhiStep);
+ Float_t cosf = TMath::Cos(fnsteps*fPhiStep);
+
+ {
+ track_points->push_back(v);
+ if(nsteps > 0){
+ Float_t xf = v.x + (px*sinf - py*(1 - cosf))/fA;
+ Float_t yf = v.y + (py*sinf + px*(1 - cosf))/fA;
+ x_off = (ex - xf)/fnsteps;
+ y_off = (ey - yf)/fnsteps;
+ Float_t xforw, yforw, zforw;
+ for (Int_t l=0; l<nsteps; l++) {
+ xforw = v.x + (px*sin - py*(1 - cos))/fA + x_off;
+ yforw = v.y + (py*sin + px*(1 - cos))/fA + y_off;
+ zforw = v.z + fLam*TMath::Abs(fR*fPhiStep);
+ if ((xforw*xforw+yforw*yforw > fRnrMod->fMaxR*fRnrMod->fMaxR) ||(TMath::Abs(zforw) > fRnrMod->fMaxZ) ) {
+ return false;
+ }
+ Step(px,py,pz);
+ }
+
+ }
+ // set time to the end point
+ v.t += TMath::Sqrt((v.x-ex)*(v.x-ex)+(v.y-ey)*(v.y-ey) +(v.z-ez)*(v.z-ez))/fVelocity;
+ v.x = ex; v.y = ey; v.z = ez;
+ track_points->push_back(v);
+ }
+
+ { // fix momentum in the remaining part
+ Float_t cosr = TMath::Cos((fnsteps-nsteps)*fPhiStep);
+ Float_t sinr = TMath::Sin((fnsteps-nsteps)*fPhiStep);
+ Float_t px_t = px*cosr - py*sinr ;
+ Float_t py_t = py*cosr + px*sinr ;
+ px = px_t;
+ py = py_t;
+ }
+ { // calculate direction of faked px,py
+ Float_t pxf = (p0x*cosf - p0y*sinf)/TMath::Abs(fA) + x_off/fPhiStep;
+ Float_t pyf = (p0y*cosf + p0x*sinf)/TMath::Abs(fA) + y_off/fPhiStep;
+ Float_t fac = TMath::Sqrt(p0x*p0x + p0y*p0y)/TMath::Sqrt(pxf*pxf + pyf*pyf);
+ px = fac*pxf;
+ py = fac*pyf;
+ }
+ return true;
+ }
+
+ Bool_t LoopToBounds(Float_t &px, Float_t &py, Float_t &pz)
+ {
+ // printf("MC helix loop_to_bounds\n");
+ SetBounds();
+ if(NMax > 0){
+ // printf("NMAx MC helix loop_to_bounds\n");
+ track_points->push_back(v);
+ Float_t xforw,yforw,zforw;
+ while(fN < NMax){
+ xforw = v.x + (px*sin - py*(1 - cos))/fA + x_off;
+ yforw = v.y + (py*sin + px*(1 - cos))/fA + y_off;
+ zforw = v.z + fLam*TMath::Abs(fR*fPhiStep);
+
+ if ((crosR && (xforw*xforw+yforw*yforw > fRnrMod->fMaxR*fRnrMod->fMaxR)) ||(TMath::Abs(zforw) > fRnrMod->fMaxZ)) {
+ return false;
+ }
+ Step(px,py,pz);
+ }
+ return true;
+ }
+ return false;
+ }
+ };
+
+ /**************************************************************************/
+ // LINE
+ /**************************************************************************/
+
+ struct MCLine : public MCStruct
+ {
+ MCLine(TrackRnrStyle* rs, MCVertex* v0 ,Float_t vel, std::vector<MCVertex>* tpv):
+ MCStruct(rs, v0 , vel, tpv){};
+
+ Bool_t InBounds(Float_t ex, Float_t ey, Float_t ez)
+ {
+ if(TMath::Abs(ez) > fRnrMod->fMaxZ ||
+ ex*ex + ey*ey > fRnrMod->fMaxR*fRnrMod->fMaxR)
+ return false;
+ else
+ return true;
+ }
+
+ void GotoVertex(Float_t x1, Float_t y1, Float_t z1)
+ {
+ track_points->push_back(v);
+ v.t += TMath::Sqrt((v.x-x1)*(v.x-x1)+(v.y-y1)*(v.y-y1)+(v.z-z1)*(v.z-z1))/fVelocity;
+ v.x=x1; v.y=y1; v.z=z1;
+ track_points->push_back(v);
+ }
+
+
+ void GotoBounds( Float_t px, Float_t py, Float_t pz)
+ {
+ Float_t tZ = 0,Tb = 0;
+ // time where particle intersect +/- fMaxZ
+ if (pz > 0) {
+ tZ = (fRnrMod->fMaxZ - v.z)/pz;
+ }
+ else if (pz < 0 ) {
+ tZ = (-1)*(fRnrMod->fMaxZ + v.z)/pz;
+ }
+ // time where particle intersects cylinder
+ Float_t tR=0;
+ Double_t a = px*px + py*py;
+ Double_t b = 2*(v.x*px + v.y*py);
+ Double_t c = v.x*v.x + v.y*v.y - fRnrMod->fMaxR*fRnrMod->fMaxR;
+ Double_t D = b*b - 4*a*c;
+ if(D >= 0) {
+ Double_t D_sqrt=TMath::Sqrt(D);
+ tR = ( -b - D_sqrt )/(2*a);
+ if( tR < 0) {
+ tR = ( -b + D_sqrt )/(2*a);
+ }
+
+ // compare the two times
+ Tb = tR < tZ ? tR : tZ;
+ } else {
+ Tb = tZ;
+ }
+
+ GotoVertex(v.x+px*Tb, v.y+py*Tb, v.z+ pz*Tb);
+ }
+ }; // struct Line
+
+
+} // namespace Reve
+
+#endif
--- /dev/null
+# $Header$
+
+# MODULE ~include sub-directory, namespace
+# NAME ~ name of the library
+
+MODULE = Reve
+NAME = Reve
+LIBNAME = lib${NAME}.${LDEXT}
+DICTSTEM = ${NAME}_Dict
+
+HDRS = $(filter-out %LinkDef.h %_Dict.h, $(wildcard *.h))
+SRCS = $(wildcard *.cxx)
+OBJS = $(SRCS:.cxx=.o)
+LIBOBJS = ${OBJS} ${DICTSTEM}.o
+ALLOBJS = ${LIBOBJS} reve_main/reve_main.o
+
+LIBS = ${LIBNAME}
+EXES = reve
+
+ROOTLIBS = $(shell root-config --libs)
+ROOTGLIBS = $(shell root-config --glibs)
+
+include ../make_base.inc
+
+${LIBNAME}: ${LIBOBJS}
+ ${LD} ${LDFLAGS} -o $@ $^
+
+${DICTSTEM}.cc: ${HDRS} LinkDef.h
+ ${ROOTCINT} -f $@ -c ${ROOTCINTFLAGS} $^
+
+reve: reve_main/reve_main.o ${LIBNAME}
+ ${CXX} ${CPPFLAGS} -o $@ ${CXXFLAGS} $< -L. -lReve \
+ ${ROOTGLIBS} -lTreePlayer -lEG -lGeom -lGeomPainter -lGed -lRGL
--- /dev/null
+// $Header$
+
+#include "PODs.h"
+
+using namespace Reve;
+
+void Reve::DisablePODTObjectStreamers()
+{
+ // Vector is not TObject
+
+ // MCTrack derives from TParticle
+ TParticle::Class()->IgnoreTObjectStreamer(true);
+ MCTrackRef::Class()->IgnoreTObjectStreamer(true);
+
+ Hit::Class()->IgnoreTObjectStreamer(true);
+ Cluster::Class()->IgnoreTObjectStreamer(true);
+
+ RecTrack::Class()->IgnoreTObjectStreamer(true);
+ // RecKink derives from RecTrack
+
+ RecV0::Class()->IgnoreTObjectStreamer(true);
+
+ GenInfo::Class()->IgnoreTObjectStreamer(true);
+}
+
+//______________________________________________________________________
+// Point
+//
+
+ClassImp(Reve::Vector)
+
+Float_t Vector::Eta() const
+{
+ Float_t cosTheta = CosTheta();
+ if (cosTheta*cosTheta < 1) return -0.5* TMath::Log( (1.0-cosTheta)/(1.0+cosTheta) );
+ Warning("Eta","transverse momentum = 0! return +/- 10e10");
+ return (z >= 0) ? 10e10 : -10e10;
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+//ClassImp(Hit);
+//ClassImp(RecTrack);
--- /dev/null
+// $Header$
+
+#ifndef REVE_PODs_H
+#define REVE_PODs_H
+
+#include <TObject.h>
+#include <TMath.h>
+
+#include <TParticle.h>
+
+namespace Reve {
+
+/**************************************************************************/
+// PODs.h
+/**************************************************************************/
+
+// Basic structures for Reve. Design criteria:
+//
+// * provide basic cross-referencing functionality;
+//
+// * small memory/disk footprint (floats / count on compression in
+// split mode);
+//
+// * simple usage from tree selections;
+//
+// * placement in TClonesArray (composites are TObject derived);
+//
+// * minimal member-naming (impossible to make everybody happy).
+
+void DisablePODTObjectStreamers();
+
+/**************************************************************************/
+// Vector
+/**************************************************************************/
+
+// Minimal Float_t copy of TVector3.
+// Used to represent points and momenta.
+
+class Vector
+{
+public:
+ Float_t x, y, z;
+
+ Vector() : x(0), y(0), z(0) {}
+ Vector(Float_t _x, Float_t _y, Float_t _z) : x(_x), y(_y), z(_z) {}
+
+ Float_t* c_vec() { return &x; }
+ void Set(Float_t* v) { x=v[0]; y=v[1]; z=v[2]; }
+ void Set(Double_t* v) { x=v[0]; y=v[1]; z=v[2]; }
+ void Set(Float_t _x, Float_t _y, Float_t _z) { x=_x; y=_y; z=_z; }
+ void Set(Double_t _x, Double_t _y, Double_t _z) { x=_x; y=_y; z=_z; }
+ void Set(const TVector3& v) { x=v.x(); y=v.y(); z=v.z(); }
+
+ Float_t Phi() const;
+ Float_t Theta() const;
+ Float_t CosTheta() const;
+ Float_t Eta() const;
+
+ Float_t Mag() const { return TMath::Sqrt(x*x+y*y+z*z);}
+ Float_t Mag2() const { return x*x+y*y+z*z;}
+
+ Float_t Perp() const { return TMath::Sqrt(x*x+y*y);}
+ Float_t Perp2() const { return x*x+y*y;}
+ Float_t R() const { return Perp(); }
+
+ // need operator +,-,Dot
+
+ ClassDef(Vector, 1);
+};
+
+inline Float_t Vector::Phi() const
+{ return x == 0.0 && y == 0.0 ? 0.0 : TMath::ATan2(y,x); }
+
+inline Float_t Vector::Theta() const
+{ return x == 0.0 && y == 0.0 && z == 0.0 ? 0.0 : TMath::ATan2(Perp(),z); }
+
+inline Float_t Vector::CosTheta() const
+{ Float_t ptot = Mag(); return ptot == 0.0 ? 1.0 : z/ptot; }
+
+/**************************************************************************/
+// PathMark
+/**************************************************************************/
+
+class PathMark
+{
+ public:
+ enum Type_e { Reference, Daughter, Decay };
+
+ Vector V, P;
+ Type_e type;
+
+ PathMark(Type_e t=Reference) : type(t) {}
+
+ ClassDef(PathMark, 1);
+};
+
+/**************************************************************************/
+// MCTrack
+/**************************************************************************/
+
+class MCTrack : public TParticle // ?? Copy stuff over ??
+{
+public:
+ Int_t label; // Label of the track
+ Int_t eva_label; // Label of primary particle
+
+ Bool_t decayed; // True if decayed during tracking.
+ // ?? Perhaps end-of-tracking point/momentum would be better.
+ Float_t t_decay; // Decay time
+ Vector V_decay; // Decay vertex
+ Vector P_decay; // Decay momentum
+
+ MCTrack() { decayed = false; }
+
+ MCTrack& operator=(const TParticle& p)
+ { *((TParticle*)this) = p; return *this; }
+
+ void ResetPdgCode() { fPdgCode = 0; }
+
+ ClassDef(MCTrack, 1);
+};
+
+
+/**************************************************************************/
+// MCTrackRef
+/**************************************************************************/
+
+// Not used.
+
+class MCTrackRef : public TObject
+{
+public:
+ Int_t label;
+ Int_t status;
+ Vector V;
+ Vector P;
+ Float_t length;
+ Float_t time;
+
+ MCTrackRef() {}
+
+ ClassDef(MCTrackRef, 1)
+};
+
+
+/**************************************************************************/
+// Hit
+/**************************************************************************/
+
+// Representation of a hit.
+
+// Members det_id (and subdet_id) serve for cross-referencing into
+// geometry. Hits should be stored in det_id (+some label ordering) in
+// order to maximize branch compression.
+
+
+class Hit : public TObject
+{
+public:
+ UShort_t det_id; // Custom detector id
+ UShort_t subdet_id; // Custom sub-detector id
+ Int_t label; // Label of particle that produced the hit
+ Int_t eva_label;
+ Vector V; // Vertex
+
+ // ?? Float_t charge. Probably specific.
+
+ Hit() {}
+
+ ClassDef(Hit, 1);
+};
+
+
+/**************************************************************************/
+// Cluster
+/**************************************************************************/
+
+// Base class for reconstructed clusters
+
+// ?? Should Hit and cluster have common base? No.
+
+class Cluster : public TObject
+{
+public:
+ UShort_t det_id; // Custom detector id
+ UShort_t subdet_id; // Custom sub-detector id
+ Int_t label[3]; // Labels of particles that contributed hits
+ // ?? Should include reconstructed track using it? Rather not, separate.
+
+ Vector V; // Vertex
+ // Vector W; // Cluster widths
+ // ?? Coord system? Special variables Wz, Wy?
+
+ Cluster() {}
+
+ ClassDef(Cluster, 1);
+};
+
+
+/**************************************************************************/
+// RecTrack
+/**************************************************************************/
+
+class RecTrack : public TObject
+{
+public:
+ Int_t label; // Label of the track
+ Int_t status; // Status as exported from reconstruction
+ Int_t sign;
+ Vector V; // Start vertex from reconstruction
+ Vector P; // Reconstructed momentum at start vertex
+ Float_t beta;
+
+ // PID data missing
+
+ RecTrack() {}
+
+ Float_t Pt() { return P.Perp(); }
+
+ ClassDef(RecTrack, 1);
+};
+
+// Another class with specified points/clusters
+
+
+/**************************************************************************/
+// RecKink
+/**************************************************************************/
+
+class RecKink : public RecTrack
+{
+public:
+ Int_t label_sec; // Label of the secondary track
+ Vector V_end; // End vertex: last point on the primary track
+ Vector V_kink; // Kink vertex: reconstructed position of the kink
+ Vector P_sec; // Momentum of secondary track
+
+ ClassDef(RecKink, 1);
+};
+
+
+/**************************************************************************/
+// RecV0
+/**************************************************************************/
+
+class RecV0 : public TObject
+{
+public:
+ Int_t status;
+
+ Vector V_neg; // Vertex of negative track
+ Vector P_neg; // Momentum of negative track
+ Vector V_pos; // Vertex of positive track
+ Vector P_pos; // Momentum of positive track
+
+ Vector V_ca; // Point of closest approach
+ Vector V0_birth; // Reconstucted birth point of neutral particle
+
+ // ? Data from simulation.
+ Int_t label; // Neutral mother label read from kinematics
+ Int_t pdg; // PDG code of mother
+ Int_t d_label[2]; // Daughter labels ?? Rec labels present anyway.
+
+ ClassDef(RecV0, 1);
+};
+
+/**************************************************************************/
+/**************************************************************************/
+
+// Missing primary vertex.
+
+// Missing GenInfo, RecInfo.
+
+class GenInfo : public TObject
+{
+public:
+ Bool_t is_rec; // is reconstructed
+ Bool_t has_V0;
+ Bool_t has_kink;
+ Int_t label;
+ Int_t n_hits;
+ Int_t n_clus;
+
+ GenInfo() { is_rec = has_V0 = has_kink = false; }
+
+ ClassDef(GenInfo, 1);
+};
+
+/**************************************************************************/
+/**************************************************************************/
+
+// This whole construction is highly embarrassing. It requires
+// shameless copying of experiment data. What is good about this
+// scheme:
+//
+// 1) Filters can be applied at copy time so that only part of the
+// data is copied over.
+//
+// 2) Once the data is extracted it can be used without experiment
+// software. Thus, external service can provide this data and local
+// client can be really thin.
+//
+// 3) Some pretty advanced visualization schemes/selections can be
+// implemented in a general framework by providing data extractors
+// only. This is also good for PR or VIP displays.
+//
+// 4) These classes can be extended by particular implementations. The
+// container classes will use TClonesArray with user-specified element
+// class.
+
+// The common behaviour could be implemented entirely without usage of
+// a common base classes, by just specifying names of members that
+// retrieve specific data. This is fine as long as one only uses tree
+// selections but becomes painful for extraction of data into local
+// structures (could a) use interpreter but this is an overkill and
+// would cause serious trouble for multi-threaded environment; b) use
+// member offsets and data-types from the dictionary).
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "Pad.h"
+
+#include <THashList.h>
+
+//______________________________________________________________________
+// Pad
+//
+// This was intended as a TPad wrapper to allow smart updates of
+// groups of pads. Uses THashList instead of TList for faster removal
+// of objects from the pad.
+// Currently not used ...
+
+using namespace Reve;
+
+ClassImp(Pad)
+
+Pad::Pad()
+{
+ fPrimitives = new THashList;
+}
+
+Pad::Pad(const char *name, const char *title, Double_t xlow,
+ Double_t ylow, Double_t xup, Double_t yup,
+ Color_t color, Short_t bordersize, Short_t bordermode)
+ : TPad(name,title,xlow,ylow,xup,yup,color,bordersize,bordermode)
+{
+ delete fPrimitives;
+ fPrimitives = new THashList;
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_Pad_H
+#define REVE_Pad_H
+
+#include <Reve/Reve.h>
+
+#include <TPad.h>
+
+namespace Reve {
+
+class Pad : public TPad
+{
+public:
+ Pad();
+ Pad(const char* name, const char* title,
+ Double_t xlow, Double_t ylow, Double_t xup, Double_t yup,
+ Color_t color = -1, Short_t bordersize = -1, Short_t bordermode = -2);
+ virtual ~Pad() {}
+
+ ClassDef(Pad, 1); // Wrapper for TPad
+};
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "PointSet.h"
+
+#include <Reve/RGTopFrame.h>
+
+#include <TTree.h>
+#include <TF3.h>
+
+#include <TColor.h>
+#include <TCanvas.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// PointSet
+//
+
+ClassImp(PointSet)
+
+PointSet::PointSet(Int_t n_points) :
+ TPointSet3D(n_points),
+ RenderElement(fMarkerColor)
+{
+ fMarkerStyle = 20;
+}
+
+PointSet::PointSet(const Text_t* name, Int_t n_points) :
+ TPointSet3D(n_points),
+ RenderElement(fMarkerColor)
+{
+ fMarkerStyle = 20;
+ SetName(name);
+}
+
+PointSet::PointSet(const Text_t* name, TTree* tree,
+ TreeVarType_e tv_type) :
+ TPointSet3D(tree->GetSelectedRows()),
+ RenderElement(fMarkerColor)
+{
+ static const Exc_t eH("PointSet::PointSet ");
+
+ fMarkerStyle = 20;
+ SetName(name);
+ Double_t *vx = tree->GetV1(), *vy = tree->GetV2(), *vz = tree->GetV3();
+ Long64_t nr = tree->GetSelectedRows();
+
+ switch(tv_type) {
+ case TVT_XYZ:
+ while(nr-- > 0) {
+ SetNextPoint(*vx, *vy, *vz);
+ ++vx; ++vy; ++vz;
+ }
+ break;
+ case TVT_RPhiZ:
+ while(nr-- > 0) {
+ SetNextPoint(*vx * TMath::Cos(*vy), *vx * TMath::Sin(*vy), *vz);
+ ++vx; ++vy; ++vz;
+ }
+ break;
+ default:
+ throw(eH + "unknown tree variable type.");
+ }
+}
+
+/**************************************************************************/
+
+void PointSet::Reset(Int_t n_points)
+{
+ delete [] fP; fP = 0;
+ fN = n_points;
+ if(fN) fP = new Float_t [3*fN];
+ memset(fP, 0, 3*fN*sizeof(Float_t));
+ fLastPoint = -1;
+ ResetBBox();
+}
+
+/**************************************************************************/
+
+void PointSet::Paint(Option_t* option)
+{
+ if(fRnrElement == false) return;
+
+ TPointSet3D::Paint(option);
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+//______________________________________________________________________
+// PointSetArray
+//
+
+ClassImp(PointSetArray)
+
+PointSetArray::PointSetArray(const Text_t* name,
+ const Text_t* title) :
+ TNamed(name, title), RenderElementListBase(fColor)
+{
+ fBins = 0;
+ fColor = 1;
+}
+
+PointSetArray::~PointSetArray()
+{
+ delete [] fBins;
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void PointSetArray::InitBins(TGListTreeItem* tree_item, const Text_t* quant_name,
+ Int_t nbins, Double_t min, Double_t max)
+{
+ fQuantName = quant_name;
+ fNBins = nbins;
+ fMin = fCurMin = min;
+ fMax = fCurMax = max;
+ fBinWidth = (fMax - fMin)/fNBins;
+
+ fBins = new Reve::PointSet*[fNBins];
+ for(Int_t i=0; i<fNBins; ++i) {
+ fBins[i] = new Reve::PointSet
+ (Form("Slice %d [%4.3lf, %4.3lf]", i, fMin + i*fBinWidth, fMin + (i+1)*fBinWidth));
+ AddElement(fBins[i]);
+ if(tree_item)
+ gReve->AddRenderElement(tree_item, fBins[i]);
+ }
+}
+
+void PointSetArray::Fill(Double_t quant, Double_t x, Double_t y, Double_t z)
+{
+ Int_t bin = Int_t( (quant - fMin)/fBinWidth );
+ if(bin >= 0 && bin < fNBins)
+ fBins[bin]->SetNextPoint(x, y, z);
+}
+
+void PointSetArray::Fill(TF3* , TTree* , TreeVarType_e )
+{
+
+}
+
+void PointSetArray::CloseBins(Int_t mark_stlye, Float_t mark_size)
+{
+ for(Int_t i=0; i<fNBins; ++i) {
+ fBins[i]->SetMarkerColor(fColor);
+ fBins[i]->SetMarkerColor(fColor);
+ fBins[i]->SetMarkerStyle(mark_stlye);
+ fBins[i]->SetMarkerSize(mark_size);
+ fBins[i]->fN = fBins[i]->fLastPoint; // HACK! PolyMarker3D does half-management of array size.
+ fBins[i]->ComputeBBox();
+ }
+}
+
+/**************************************************************************/
+
+void PointSetArray::SetRange(Double_t min, Double_t max)
+{
+ using namespace TMath;
+
+ fCurMin = min; fCurMax = max;
+ Int_t low_b = (Int_t) Max(Double_t(0), Floor((min-fMin)/fBinWidth));
+ Int_t high_b = (Int_t) Min(Double_t(fNBins-1), Ceil((max-fMin)/fBinWidth));
+ for(Int_t i=0; i<fNBins; ++i) {
+ fBins[i]->SetRnrElement(i>=low_b && i<=high_b);
+ }
+}
+
+/**************************************************************************/
+
+#include <TGFrame.h>
+#include <TGDoubleSlider.h>
+#include <TGXYLayout.h>
+
+void PointSetArray::MakeScrollbar()
+{
+ TGMainFrame* mf = new TGMainFrame(gClient->GetRoot(), 320, 60);
+
+ TGDoubleHSlider* hs = new TGDoubleHSlider(mf);
+ hs->SetRange(fMin, fMax);
+ hs->SetPosition(fMin, fMax);
+ hs->Resize(300, 25);
+ mf->AddFrame(hs, new TGLayoutHints(kLHintsCenterX, 10, 10, 10, 10));
+
+ hs->Connect("PositionChanged()", "Reve::PointSetArray",
+ this, "HandleScrollEvent()");
+
+ mf->SetWindowName(fQuantName + " Selector");
+ mf->MapSubwindows();
+ mf->Resize(mf->GetDefaultSize()); // this is used here to init layout algorithm
+ mf->MapWindow();
+}
+
+void PointSetArray::HandleScrollEvent()
+{
+ TGDoubleHSlider* hs = (TGDoubleHSlider*)gTQSender;
+
+ Float_t min = hs->GetMinPosition(), max = hs->GetMaxPosition();
+ printf("hslidor min=%f max=%f\n", min, max);
+ SetRange(min, max);
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_GuiPointSet_H
+#define REVE_GuiPointSet_H
+
+#include <Reve/PODs.h>
+#include <Reve/RenderElement.h>
+
+#include <TPointSet3D.h>
+
+class TTree;
+class TF3;
+class TGListTreeItem;
+
+namespace Reve {
+
+class PointSet : public TPointSet3D, public RenderElement
+{
+ friend class PointSetArray;
+
+private:
+ void Init();
+
+protected:
+ TString fTitle;
+
+public:
+ enum TreeVarType_e { TVT_XYZ, TVT_RPhiZ };
+
+ PointSet(Int_t n_points=0);
+ PointSet(const Text_t* name, Int_t n_points=0);
+ PointSet(const Text_t* name, TTree* tree,
+ TreeVarType_e tv_type=TVT_XYZ);
+
+ void Reset(Int_t n_points=0);
+
+ virtual const Text_t* GetTitle() const { return fTitle; }
+ virtual void SetTitle(const Text_t* t) { fTitle = t; }
+
+ virtual void SetMarkerColor(Color_t col)
+ { SetMainColor(col); }
+
+ virtual void Paint(Option_t* option="");
+
+ ClassDef(PointSet, 1);
+}; // endclass GuiPointSet
+
+/**************************************************************************/
+
+class PointSetArray : public TNamed, public RenderElementListBase
+{
+protected:
+ PointSet** fBins;
+ Int_t fNBins;
+ Double_t fMin, fCurMin;
+ Double_t fMax, fCurMax;
+ Double_t fBinWidth;
+ TString fQuantName;
+
+ Color_t fColor;
+
+public:
+ enum TreeVarType_e { TVT_XYZ, TVT_RPhiZ };
+
+ PointSetArray(const Text_t* name="PointSetArray",
+ const Text_t* title="");
+ virtual ~PointSetArray();
+
+ virtual Bool_t CanEditMainColor() { return true; }
+ virtual void Paint(Option_t* option = "") { PaintElements(option); }
+
+ void InitBins(TGListTreeItem* tree_item, const Text_t* quant_name,
+ Int_t nbins, Double_t min, Double_t max);
+ void Fill(Double_t quant, Double_t x, Double_t y, Double_t z);
+ void Fill(TF3* formula, TTree* tree, TreeVarType_e tv_type=TVT_XYZ);
+ void CloseBins(Int_t mark_style, Float_t mark_size);
+
+ Double_t GetMin() const { return fMin; }
+ Double_t GetCurMin() const { return fCurMin; }
+ Double_t GetMax() const { return fMax; }
+ Double_t GetCurMax() const { return fCurMax; }
+
+ void SetRange(Double_t min, Double_t max);
+
+ void MakeScrollbar(); // *MENU*
+ void HandleScrollEvent();
+
+ ClassDef(PointSetArray, 1);
+};
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "PointSetArrayEditor.h"
+#include <Reve/PointSet.h>
+
+#include <TVirtualPad.h>
+#include <TColor.h>
+
+#include <TGLabel.h>
+#include <TGButton.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+#include <TGDoubleSlider.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// PointSetArrayEditor
+//
+
+ClassImp(PointSetArrayEditor)
+
+PointSetArrayEditor::PointSetArrayEditor(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+ UInt_t options, Pixel_t back) :
+ TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+{
+ fM = 0;
+ MakeTitle("PointSetArray");
+
+ fSlider = new TGDoubleHSlider(this);
+ fSlider->Resize(260, 20);
+ AddFrame(fSlider, new TGLayoutHints(kLHintsLeft, 0, 5));
+ fSlider->Connect("PositionChanged()", "Reve::PointSetArrayEditor",
+ this, "DoScroll()");
+
+ // Register the editor.
+ TClass *cl = PointSetArray::Class();
+ TGedElement *ge = new TGedElement;
+ ge->fGedFrame = this;
+ ge->fCanvas = 0;
+ cl->GetEditorList()->Add(ge);
+}
+
+PointSetArrayEditor::~PointSetArrayEditor()
+{}
+
+/**************************************************************************/
+
+void PointSetArrayEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
+{
+ fModel = 0;
+ fPad = 0;
+
+ if (!obj || !obj->InheritsFrom(PointSetArray::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
+ SetActive(kFALSE);
+ return;
+ }
+
+ fModel = obj;
+ fPad = pad;
+
+ fM = dynamic_cast<PointSetArray*>(fModel);
+
+ printf("FullRange(%f, %f) Selected(%f,%f)\n",
+ fM->GetMin(), fM->GetMax(), fM->GetCurMin(), fM->GetCurMax());
+ fSlider->SetRange(fM->GetMin(), fM->GetMax());
+ fSlider->SetPosition(fM->GetCurMin(), fM->GetCurMax());
+
+ SetActive();
+}
+
+/**************************************************************************/
+
+void PointSetArrayEditor::DoScroll()
+{
+ Double_t min = fSlider->GetMinPosition(), max = fSlider->GetMaxPosition();
+ printf("PointSet range: min=%f max=%f\n", min, max);
+ fM->SetRange(min, max);
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_PointSetArrayEditor_H
+#define REVE_PointSetArrayEditor_H
+
+#include <TGedFrame.h>
+
+class TGCheckButton;
+class TGNumberEntry;
+class TGColorSelect;
+class TGDoubleHSlider;
+
+namespace Reve {
+
+class PointSetArray;
+
+class PointSetArrayEditor : public TGedFrame
+{
+protected:
+ PointSetArray* fM; // fModel dynamic-casted to PointSetArrayEditor
+
+ TGDoubleHSlider* fSlider;
+
+public:
+ PointSetArrayEditor(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+ ~PointSetArrayEditor();
+
+ virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
+
+ void DoScroll();
+
+ ClassDef(PointSetArrayEditor, 1); // Editor for PointSetArray
+}; // endclass PointSetArrayEditor
+
+}
+
+#endif
--- /dev/null
+#include "QuadSet.h"
+
+#include <TColor.h>
+
+#include <TBuffer3D.h>
+#include <TBuffer3DTypes.h>
+#include <TGeometry.h>
+#include <TVirtualPad.h>
+#include <TVirtualViewer3D.h>
+
+#include <TROOT.h>
+#include <TRandom.h>
+
+
+using namespace Reve;
+
+/**************************************************************************/
+// Quad
+/**************************************************************************/
+ClassImp(Reve::Quad)
+
+void Quad::ColorFromIdx(Color_t ci)
+{
+ TColor* c = gROOT->GetColor(ci);
+ if(c) {
+ UChar_t *x = (UChar_t*) &color;
+ x[0] = (UChar_t)(255*c->GetRed()); x[1] = (UChar_t)(255*c->GetGreen());
+ x[2] = (UChar_t)(255*c->GetBlue()); x[3] = 255;
+ }
+}
+
+Quad::Quad(TRandom& rnd, Float_t origin, Float_t size)
+{
+ ColorFromIdx(Int_t(30*rnd.Rndm()));
+ Float_t x = 2*origin*(rnd.Rndm() - 0.5);
+ Float_t y = 2*origin*(rnd.Rndm() - 0.5);
+ Float_t z = 2*origin*(rnd.Rndm() - 0.5);
+ Float_t* p = vertices;
+ for(int i=0; i<4; ++i) {
+ p[0] = x + 2*size*(rnd.Rndm() - 0.5);
+ p[1] = y + 2*size*(rnd.Rndm() - 0.5);
+ p[2] = z + 2*size*(rnd.Rndm() - 0.5);
+ p += 3;
+ }
+}
+
+/**************************************************************************/
+// QuadSet
+/**************************************************************************/
+ClassImp(Reve::QuadSet)
+
+
+void QuadSet::Init()
+{
+ fTrans = false;
+}
+
+void QuadSet::Test(Int_t nquads)
+{
+ TRandom rnd(0);
+ fQuads.resize(nquads);
+ for(Int_t i=0; i<nquads; ++i) {
+ new (&fQuads[i]) Quad(rnd, 10, 2);
+ }
+}
+
+void QuadSet::Paint(Option_t* )
+{
+ TBuffer3D buffer(TBuffer3DTypes::kGeneric);
+
+ // Section kCore
+ buffer.fID = this;
+ buffer.fColor = 1;
+ buffer.fTransparency = 0;
+ buffer.fLocalFrame = fTrans;
+ if (fTrans)
+ memcpy(buffer.fLocalMaster, fMatrix, 16*sizeof(Double_t));
+ buffer.SetSectionsValid(TBuffer3D::kCore);
+
+ // We fill kCore on first pass and try with viewer
+ Int_t reqSections = gPad->GetViewer3D()->AddObject(buffer);
+ if (reqSections == TBuffer3D::kNone) {
+ // printf("QuadSet::Paint viewer was happy with Core buff3d.\n");
+ return;
+ }
+
+ if (reqSections & TBuffer3D::kRawSizes) {
+ Int_t nbPnts = fQuads.size()*4;
+ Int_t nbSegs = nbPnts;
+ if (!buffer.SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, fQuads.size(), fQuads.size()*6)) {
+ return;
+ }
+ buffer.SetSectionsValid(TBuffer3D::kRawSizes);
+ }
+
+ if ((reqSections & TBuffer3D::kRaw) && buffer.SectionsValid(TBuffer3D::kRawSizes)) {
+ // Points
+ Int_t pidx = 0;
+ for (std::vector<Quad>::iterator i=fQuads.begin(); i!=fQuads.end(); ++i) {
+ for (Int_t k = 0; k < 12; k++ ){
+ buffer.fPnts[pidx] = (*i).vertices[k];
+ pidx++;
+ }
+ }
+
+ // Segments
+ Int_t sidx = 0;
+ for (Int_t q = 0; q < (Int_t)fQuads.size(); ++q) {
+ for (Int_t s = 0; s < 4; ++s ) {
+ buffer.fSegs[3*sidx ] = 4;
+ buffer.fSegs[3*sidx+1] = sidx;
+ if (s == 3)
+ buffer.fSegs[3*sidx+2] = q*4;
+ else
+ buffer.fSegs[3*sidx+2] = sidx + 1;
+ sidx ++;
+ }
+ }
+
+ // Polygons
+ for (Int_t q = 0; q < (Int_t)fQuads.size(); ++q) {
+ buffer.fPols[6*q] = fQuads[q].color;
+ buffer.fPols[6*q +1] = 4;
+ buffer.fPols[6*q +2] = 4*q +0;
+ buffer.fPols[6*q +3] = 4*q +1;
+ buffer.fPols[6*q +4] = 4*q +2;
+ buffer.fPols[6*q +5] = 4*q +3;
+ }
+
+ buffer.SetSectionsValid(TBuffer3D::kRaw);
+ buffer.fColor = 5;
+ }
+
+ gPad->GetViewer3D()->AddObject(buffer);
+}
+
+/**************************************************************************/
+
+void QuadSet::ComputeBBox()
+{
+ if(fQuads.empty()) {
+ bbox_zero();
+ return;
+ }
+
+ bbox_init();
+
+ for(std::vector<Quad>::iterator q=fQuads.begin(); q!=fQuads.end(); ++q) {
+ Float_t* p = q->vertices;
+ for(int i=0; i<4; ++i, p+=3)
+ bbox_check_point(p);
+ }
+
+ // printf("%s BBox is x(%f,%f), y(%f,%f), z(%f,%f)\n", GetName(),
+ // fBBox[0], fBBox[1], fBBox[2], fBBox[3], fBBox[4], fBBox[5]);
+}
--- /dev/null
+#ifndef REVE_QuadSet_H
+#define REVE_QuadSet_H
+
+#include <Gtypes.h>
+#include <TNamed.h>
+#include <TAtt3D.h>
+#include <TAttBBox.h>
+
+#include <vector>
+
+class TRandom;
+
+namespace Reve {
+
+struct Quad
+{
+ Float_t vertices[12];
+ Int_t color;
+
+ void ColorFromIdx(Color_t ci);
+
+ Quad(Color_t col = 1)
+ { ColorFromIdx(col); }
+
+ Quad(Color_t col, Float_t* p)
+ { ColorFromIdx(col); memcpy(vertices, p, 12*sizeof(Float_t)); }
+
+ Quad(TRandom& rnd, Float_t origin, Float_t size);
+
+ Quad(const Quad& org) { memcpy(this, &org, sizeof(Quad)); }
+
+ ClassDef(Quad, 1);
+};
+
+/**************************************************************************/
+
+class QuadSet : public TNamed, public TAtt3D, public TAttBBox
+{
+ friend class QuadSetGL;
+
+ void Init();
+
+protected:
+ std::vector<Quad> fQuads;
+ Double_t fMatrix[16];
+ Bool_t fTrans;
+
+public:
+ QuadSet(const Text_t* n="QuadSet", const Text_t* t="") : TNamed(n, t)
+ { Init(); }
+
+ Bool_t GetTrans() const { return fTrans; }
+ void SetTrans(Bool_t t) { fTrans = t; }
+
+ void Test(Int_t nquads);
+
+ virtual void ComputeBBox();
+
+ virtual void Paint(Option_t* option = "");
+
+ ClassDef(QuadSet, 1);
+};
+
+} // namespace Reve
+
+#endif
--- /dev/null
+// $Header$
+
+#include "QuadSetGL.h"
+#include <Reve/QuadSet.h>
+
+#include <TGLDrawFlags.h>
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// QuadSetGL
+//
+
+ClassImp(QuadSetGL)
+
+/**************************************************************************/
+
+QuadSetGL::QuadSetGL() : TGLObject()
+{
+ // fCached = false; // Disable DL.
+}
+
+QuadSetGL::~QuadSetGL()
+{}
+
+/**************************************************************************/
+
+Bool_t QuadSetGL::SetModel(TObject* obj)
+{
+ return set_model(obj, "Reve::QuadSet");
+}
+
+void QuadSetGL::SetBBox()
+{
+ set_axis_aligned_bbox(((QuadSet*)fExternalObj)->AssertBBox());
+}
+
+/**************************************************************************/
+
+void QuadSetGL::DirectDraw(const TGLDrawFlags & ) const
+{
+ // printf("QuadSetGLRenderer::DirectDraw Style %d, LOD %d\n", flags.Style(), flags.LOD());
+
+ QuadSet& Q = * (QuadSet*) fExternalObj;
+
+ glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT);
+
+ glDisable(GL_LIGHTING);
+ glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
+ glEnable(GL_COLOR_MATERIAL);
+ glPolygonMode(GL_FRONT, GL_LINE);
+ glPolygonMode(GL_BACK, GL_LINE);
+ glDisable(GL_CULL_FACE);
+
+ Float_t c[4]; glGetFloatv(GL_CURRENT_COLOR, c);
+ // UChar_t alpha = (UChar_t)(255*c[3]);
+
+ glBegin(GL_QUADS);
+ for(std::vector<Quad>::iterator q=Q.fQuads.begin(); q!=Q.fQuads.end(); ++q) {
+ UChar_t* c = (UChar_t*) &q->color;
+ //glColor4ub(c[0], c[1], c[2], (c[3]*alpha) >> 8);
+ glColor3ub(c[0], c[1], c[2]);
+ glVertex3fv(q->vertices);
+ glVertex3fv(q->vertices + 3);
+ glVertex3fv(q->vertices + 6);
+ glVertex3fv(q->vertices + 9);
+ }
+ glEnd();
+
+ glPopAttrib();
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_QuadSetGL_H
+#define REVE_QuadSetGL_H
+
+#include <TGLObject.h>
+
+namespace Reve {
+
+class QuadSetGL : public TGLObject
+{
+protected:
+ virtual void DirectDraw(const TGLDrawFlags & flags) const;
+
+public:
+ QuadSetGL();
+ virtual ~QuadSetGL();
+
+ virtual Bool_t SetModel(TObject* obj);
+ virtual void SetBBox();
+
+ ClassDef(QuadSetGL, 0);
+};
+
+}
+
+#endif
--- /dev/null
+#include "RGBrowser.h"
+#include "RGTopFrame.h"
+#include "Reve.h"
+#include "RGEditor.h"
+#include "VSDSelector.h"
+#include <Reve/PointSet.h>
+#include <Reve/Track.h>
+
+#include <Riostream.h>
+
+#include <TROOT.h>
+#include <TStyle.h>
+#include <TSystem.h>
+#include <TRint.h>
+#include <TVirtualX.h>
+#include <TEnv.h>
+
+#include <TApplication.h>
+#include <TFile.h>
+#include <TEventList.h>
+#include <TClassMenuItem.h>
+
+#include <TColor.h>
+#include <TPolyMarker3D.h>
+
+#include <TGCanvas.h>
+#include <TGSplitter.h>
+#include <TGStatusBar.h>
+#include <TGMenu.h>
+#include <TGToolBar.h>
+#include <TGLabel.h>
+#include <TGXYLayout.h>
+#include <TGNumberEntry.h>
+#include <KeySymbols.h>
+
+#include <TGLSAViewer.h>
+#include <TGLSAFrame.h>
+#include <TGTab.h>
+
+#include <TGeoVolume.h>
+#include <TGeoNode.h>
+
+using namespace Reve;
+using namespace Reve;
+
+/**************************************************************************/
+
+void RGBrowser::SetupCintExport(TClass* cl)
+{
+
+ TList* l = cl->GetMenuList();
+ TClassMenuItem* n = new TClassMenuItem(TClassMenuItem::kPopupUserFunction, cl,
+ "Export to CINT", "ExportToCINT", this, "const char*,TObject*", 1);
+
+ l->AddFirst(n);
+}
+
+RGBrowser::RGBrowser(const TGWindow *p, UInt_t w, UInt_t h)
+ : TGCompositeFrame(p, w, h)
+{
+ fMainFrame = new TGCompositeFrame(this, 100, 10, kHorizontalFrame | kRaisedFrame);
+ fMainFrame->SetCleanup(kDeepCleanup);
+ fV1 = new TGVerticalFrame(fMainFrame, 250, 10, kSunkenFrame | kFixedWidth);
+ fV2 = new TGVerticalFrame(fMainFrame, 50, 10, kSunkenFrame);
+
+ TGLayoutHints *lo;
+ lo = new TGLayoutHints(kLHintsLeft | kLHintsExpandY,2,0,2,2);
+ fMainFrame->AddFrame(fV1, lo);
+
+ TGVSplitter *splitter = new TGVSplitter(fMainFrame);
+ splitter->SetFrame(fV1, kTRUE);
+ fMainFrame->AddFrame(splitter,
+ new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 1,1,2,2));
+
+ lo = new TGLayoutHints(kLHintsRight | kLHintsExpandX | kLHintsExpandY,0,2,2,4);
+ fMainFrame->AddFrame(fV2, lo);
+
+ // selection frame
+ fSelectionFrame = new TGCompositeFrame(fV1, 250, 10, kVerticalFrame);
+ fTreeView = new TGCanvas(fSelectionFrame, 250, 10, kSunkenFrame | kDoubleBorder);
+ fListTree = new TGListTree(fTreeView->GetViewPort(), 250, 10, kHorizontalFrame);
+ fListTree->SetCanvas(fTreeView);
+ fListTree->Associate(this);
+ fListTree->SetColorMode(TGListTree::EColorMarkupMode(TGListTree::kColorUnderline | TGListTree::kColorBox));
+ fTreeView->SetContainer(fListTree);
+
+ lo= new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY,
+ 2, 2, 2, 2);
+ fSelectionFrame->AddFrame(fTreeView, lo);
+
+ lo = new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY);
+ fV1->AddFrame(fSelectionFrame, lo);
+
+ // Classic look vars:
+ fCanvasWindow = 0;
+ fDisplayFrame = 0;
+
+ //display frame
+
+ lo = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY);
+ AddFrame(fMainFrame, lo);
+
+
+ SetWindowName("Reve List Browser");
+ MapSubwindows();
+ //Resize(GetDefaultSize()); // this is used here to init layout algoritme
+
+ //MapWindow();
+
+ // popup menu
+
+ fCtxMenu = new TContextMenu("Pepe", "Moroder");
+
+ //-- CINT export now declared in RenderElement with *MENU*
+ // SetupCintExport(PointSet::Class());
+ // SetupCintExport(Track::Class());
+ // SetupCintExport(TrackList::Class());
+
+ fListTree->Connect("Clicked(TGListTreeItem*, Int_t, Int_t, Int_t)", "Reve::RGBrowser",
+ this, "ItemClicked(TGListTreeItem*, Int_t, Int_t, Int_t)");
+ fListTree->Connect("DoubleClicked(TGListTreeItem*, Int_t)", "Reve::RGBrowser",
+ this, "DbClickListItem(TGListTreeItem*,Int_t )");
+ //fListTree->Connect("Clicked(TGListTreeItem*, Int_t)", "Reve::RGBrowser",
+ // this, "DisplayChildren(TGListTreeItem*, Int_t)");
+
+ //---------------------------------------------
+ // WARNING ... this Connect goes to *gReve*!
+ fListTree->Connect("Checked(TObject*,Bool_t)", "Reve::RGTopFrame",
+ gReve, "RenderElementChecked(TObject*, Bool_t)");
+}
+
+/**************************************************************************/
+
+void RGBrowser::SetupClassicLook()
+{
+ fCanvasWindow = new TGCanvas(fV2, 25, 250);
+ fDisplayFrame = new TGCompositeFrame(fCanvasWindow->GetViewPort(), 0, 0,kVerticalFrame, TGFrame::GetWhitePixel() );
+ fCanvasWindow->SetContainer(fDisplayFrame);
+ fDisplayFrame->SetCleanup(kDeepCleanup);
+
+ fV2->AddFrame(fCanvasWindow, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0, 0, 2, 2));
+ fV2->MapSubwindows();
+}
+
+void RGBrowser::SetupEditorLook(RGEditor* editor)
+{
+ editor->UnmapWindow();
+ fV2->AddFrame(editor, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0, 0, 2, 2));
+ editor->ReparentWindow(fV2, 0, 0);
+
+ fV2->MapSubwindows();
+}
+
+void RGBrowser::SetupGLViewerLook(RGEditor* editor, TVirtualPad* glpad)
+{
+ TGLayoutHints *lo;
+
+ TGLSAViewer* v = new TGLSAViewer(fV2, glpad);
+ v->GetFrame()->SetMinWidth(200);
+ lo = new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY);
+ fV2->AddFrame(v->GetFrame(), lo);
+ glpad->SetViewer3D(v);
+
+ fSelectionFrame->Resize(fSelectionFrame->GetWidth(), fSelectionFrame->GetHeight()/2);
+
+ TGHSplitter *splitter = new TGHSplitter(fV1);
+ lo = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 4, 2, 2, 0);
+ fSelectionFrame->AddFrame(splitter, lo);
+
+ editor->UnmapWindow();
+ editor->ChangeOptions(editor->GetOptions() | kFixedHeight);
+ lo = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,2,2,2);
+ fV1->AddFrame(editor, lo);
+ editor->ReparentWindow(fV1, 0, 0);
+
+ splitter->SetFrame(editor, kFALSE);
+
+ fV1->MapSubwindows();
+ v->GetFrame()->MapWindow();
+}
+
+
+/**************************************************************************/
+/**************************************************************************/
+
+void RGBrowser::RedrawListTree()
+{
+ gClient->NeedRedraw(fListTree);
+}
+
+/**************************************************************************/
+
+void RGBrowser::ItemClicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y)
+{
+ //printf("ItemClicked item %s List %d btn=%d, x=%d, y=%d\n",
+ // item->GetText(),fDisplayFrame->GetList()->GetEntries(), btn, x, y);
+
+ TObject* obj = (TObject*)item->GetUserData();
+
+ if(btn == 3) {
+ if (obj) {
+ fCtxMenu->Popup(x, y, obj);
+ }
+ return;
+ }
+
+ {
+ RenderElement* re = dynamic_cast<RenderElement*>(obj);
+ gReve->EditRenderElement(re);
+ }
+
+ // This only available in classic look.
+ // Still working but slowly drifting towards obscurity (4.2006).
+ DisplayChildren(item, btn);
+}
+
+void RGBrowser::DbClickListItem(TGListTreeItem* item, Int_t btn)
+{
+ static const Exc_t eH("RGBrowser::DbClickListItem ");
+
+ printf("dbclick item %s\n", item->GetText());
+ TObject* obj = (TObject*)item->GetUserData();
+
+ if (obj) {
+ // ListTreeHighlight(item);
+
+ {
+ RenderElementListBase* rel = dynamic_cast<RenderElementListBase*>(obj);
+ if(rel != 0) {
+ Int_t ni = rel->ExpandIntoListTree(fListTree, item);
+ printf("%s expanded by %d\n", eH.Data(), ni);
+ }
+ }
+
+ // browse geonodes
+ if(obj->IsA()->InheritsFrom("TGeoNode")){
+ TGeoNode* n = (TGeoNode*) obj->IsA()->DynamicCast( TGeoNode::Class(), obj );
+ // initialization
+ if(item->GetFirstChild() == 0 && n->GetNdaughters()){
+ UpdateListItems(item, btn);
+ }
+ }
+ }
+ DisplayChildren(item,0);
+}
+
+/**************************************************************************/
+
+void RGBrowser::ExportToCINT(Text_t* var_name, TObject* obj)
+{
+ const char* cname = obj->IsA()->GetName();
+ gROOT->ProcessLine(Form("%s* %s = (%s*) %p;", cname, var_name, cname, obj));
+}
+
+void RGBrowser::DisplayChildren(TGListTreeItem *item, Int_t btn)
+{
+ // Only classic mode provides direct children editing.
+ if(fDisplayFrame == 0)
+ return;
+
+ fDisplayFrame->DestroySubwindows();
+ fDisplayFrame->Cleanup();
+ printf("DisplayChildren item %s List %d btn=%d\n", item->GetText(),fDisplayFrame->GetList()->GetEntries(), btn);
+
+ if(item->GetFirstChild() == 0) return;
+
+ UInt_t wH = 2;
+ UInt_t wW = 7;
+
+ UInt_t fw, fh;
+ Int_t nc = 0;
+ TGListTreeItem *child = item->GetFirstChild();
+ do {
+ child = child->GetNextSibling();
+ nc ++;
+ } while(child);
+ fw = 70;
+ fh = UInt_t(nc*2);
+ fDisplayFrame->Resize(fw, fh);
+ TGXYLayout* xyl = new TGXYLayout(fDisplayFrame);
+ fDisplayFrame->SetLayoutManager(xyl);
+ xyl->Layout();
+
+ TGXYLayoutHints* lh;
+ Float_t x,y;
+ y = 0.;
+ nc = 0;
+ child = item->GetFirstChild();
+ do {
+ // generic info
+ wW = 24;
+ x = 0.;
+ TGTextButton* b1 = new TGTextButton( fDisplayFrame, Form("%s",child->GetText()));
+ b1->Resize(wW,wH);
+ b1->SetTextJustify(kTextLeft | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(b1,lh);
+ x += wW;
+ wW = 8;
+ TGCheckButton* b2 = new TGCheckButton(fDisplayFrame, "Draw");
+ b2->Resize(wW,wH);
+ b2->SetTextJustify(kTextLeft | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(b2, lh);
+ x += wW;
+
+ TObject* obj = reinterpret_cast<TObject*>(child->GetUserData());
+ if(obj != 0) {
+ TGXYLayoutHints* lh;
+
+ Track* track = dynamic_cast<Track*>(obj); // (Track*) obj->IsA()->DynamicCast(Track::Class(), obj );
+ PointSet* hcont = dynamic_cast<PointSet*>(obj);
+ TrackList* tcont = dynamic_cast<TrackList*>(obj);
+ TGeoNode* gnode = dynamic_cast<TGeoNode*>(obj);
+
+ // Track
+ //---------
+
+ if(track) {
+ // printf("display children track \n");
+ b2->SetOn(track->GetRnrElement());
+ b2->Connect("Toggled(Bool_t)", "Reve::Track", track, "SetRnrElement(Bool_t)");
+ }
+
+ // PointSet
+ //------------------
+
+ if (hcont) {
+ // connect to toggle signal
+ wW = 8;
+ //printf("add label to %s %d\n", cont->GetName(), cont->GetNPoints());
+ TGLabel* b3 = new TGLabel(fDisplayFrame, Form("%d", hcont->GetN()));
+ b3->SetTextJustify(kTextLeft | kTextCenterY);
+ b3->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(b3, lh);
+ x += wW;
+
+ wW = 5;
+ TGColorSelect* b4 = new TGColorSelect(fDisplayFrame, TColor::Number2Pixel(hcont->GetMainColor()));
+ b4->Resize();
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(b4,lh);
+ b4->Connect("ColorSelected(Pixel_t)",
+ "Reve::PointSet", hcont, "SetMainColor(Pixel_t)");
+
+ x += wW;
+ wW = 8;
+ ReveValuator* ne = new ReveValuator(fDisplayFrame, hcont->GetMarkerStyle());
+ ne->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ ne->Connect("ValueSet(Long_t)", "Reve::RGBrowser", this, "SetMarkerStyle(Long_t)");
+ ne->SetUserData(hcont);
+ fDisplayFrame->AddFrame(ne,lh);
+
+ //connect to container
+ b2->SetUserData(hcont);
+ b2->SetOn(hcont->GetRnrElement());
+ b2->Connect("Toggled(Bool_t)", "Reve::PointSet", hcont, "SetRnrElement(Bool_t)");
+ }
+
+ // TrackList
+ //------------------
+
+ if (tcont) {
+ wW = 8;
+ //printf("add label to %s %d\n", cont->GetName(), cont->GetNPoints());
+ TGLabel* b3 = new TGLabel(fDisplayFrame, Form("%d", tcont->GetNTracks()));
+ b3->SetTextJustify(kTextLeft | kTextCenterY);
+ b3->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(b3, lh);
+ x += wW;
+ // track color
+ wW = 5;
+ TGColorSelect* b4 = new TGColorSelect(fDisplayFrame, TColor::Number2Pixel(tcont->GetMainColor()));
+ b4->Resize();
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(b4,lh);
+ b4->Connect("ColorSelected(Pixel_t)",
+ "Reve::TrackList", tcont, "SetMainColor(Pixel_t)");
+ x += wW;
+ wW = 8;
+ ReveValuator* ne1 = new ReveValuator(fDisplayFrame, tcont->GetRnrStyle()->fMaxR);
+ ne1->SetUserData(tcont);
+ ne1->Connect("ValueSet(Long_t)", "Reve::RGBrowser", this, "SetMaxR(Long_t)");
+ // ne1->SetToolTipText("Maximum radius [cm]");
+ ne1->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(ne1,lh);
+
+ x += wW;
+ wW = 8;
+ ReveValuator* ne2 = new ReveValuator(fDisplayFrame, tcont->GetRnrStyle()->fMaxZ);
+ ne2->SetUserData(tcont);
+ ne2->Connect("ValueSet(Long_t)", "Reve::RGBrowser", this, "SetMaxZ(Long_t)");
+ // ne2->SetToolTipText("Maximum z [cm]");
+ ne2->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(ne2,lh);
+
+ x += wW;
+ wW = 8;
+ ReveValuator* ne3 = new ReveValuator(fDisplayFrame, tcont->GetRnrStyle()->fMaxOrbs);
+ ne3->SetUserData(tcont);
+ ne3->Connect("ValueSet(Long_t)", "Reve::RGBrowser", this, "SetMaxOrbs(Long_t)");
+ // ne3->SetToolTipText("Maximum number of orbits");
+ ne3->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(ne3,lh);
+
+ x += wW;
+ wW = 8;
+ TGCheckButton* dau = new TGCheckButton(fDisplayFrame, "Daughters");
+ dau->SetOn(tcont->GetRnrStyle()->fFitDaughters);
+ dau->SetUserData(tcont);
+ dau->Connect("Toggled(Bool_t)", "Reve::TrackList", tcont, "SetFitDaughters(Bool_t)");
+ dau->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(dau,lh);
+
+ x += wW;
+ wW = 8;
+ TGCheckButton* dec = new TGCheckButton(fDisplayFrame, "Decay");
+ dec->SetOn(tcont->GetRnrStyle()->fFitDaughters);
+ dec->SetUserData(tcont);
+ dec->Connect("Toggled(Bool_t)", "Reve::TrackList", tcont, "SetFitDecay(Bool_t)");
+ dec->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(dec,lh);
+
+ //connect to container
+ b2->SetUserData(tcont);
+ //b2->SetOn(tcont->GetRnrTracks());
+ //b2->Connect("Toggled(Bool_t)", "Reve::TrackList", tcont, "SetRnrTracks(Bool_t)");
+ b2->SetOn(tcont->GetRnrElement());
+ b2->Connect("Toggled(Bool_t)", "Reve::TrackList", tcont, "SetRnrElement(Bool_t)");
+ }
+
+ // TGeoNode
+ //---------
+
+ if(gnode) {
+ TGeoVolume* vol = gnode->GetVolume();
+ b2->SetOn(gnode->IsVisible());
+ b2->Connect("Toggled(Bool_t)", "Reve::RGBrowser", this,"NodeVis(Bool_t)");
+ b2->SetUserData(gnode);
+
+ wW = 11;
+ TGCheckButton* b3 = new TGCheckButton(fDisplayFrame, "VisibleDaughters");
+ b3->SetTextJustify(kTextLeft | kTextCenterY);
+ b3->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(b3,lh);
+ b3->SetOn(vol->IsVisibleDaughters());
+ b3->Connect("Toggled(Bool_t)", "Reve::RGBrowser", this, "VolumeDaughterVis(Bool_t)");
+ b3->SetUserData(vol);
+ x += wW;
+
+ wW = 5;
+ ReveColorSelect* b4 = new ReveColorSelect(fDisplayFrame, TColor::Number2Pixel(vol->GetLineColor()));
+ b4->Resize();
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(b4,lh);
+ b4->Connect("ColorSelected(Pixel_t)", "Reve::RGBrowser", this, "SetVolumeColor(UInt_t)");
+ b4->SetUserData(vol);
+ x += wW;
+
+ wW = 11;
+ ReveValuator* ne = new ReveValuator(fDisplayFrame, vol->GetTransparency());
+ ne->Connect("ValueSet(Long_t)", "Reve::RGBrowser", this, "SetTransparency(Long_t)");
+ ne->SetUserData(vol);
+
+ ne->Resize(wW,wH);
+ lh = new TGXYLayoutHints(x, y, wW, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ fDisplayFrame->AddFrame(ne,lh);
+ x += wW;
+ }
+
+ }
+ y += wH;
+ nc++;
+ child = child->GetNextSibling();
+ } while(child);
+ fDisplayFrame->MapSubwindows();
+ fDisplayFrame->MapWindow();
+ MapSubwindows();
+}
+
+/**************************************************************************/
+// Slots
+/**************************************************************************/
+
+void RGBrowser::SetTransparency(Long_t )
+{
+ ReveValuator& rv = *(ReveValuator*)gTQSender;
+ // printf("VSet idx=%d, double value=%lf, part=%p\n", val, rv.GetNumber(), rv.GetUserData());
+ TGeoVolume* vol = (TGeoVolume*) rv.GetUserData();
+ if(vol) {
+ // printf("set volume user data %d \n",val);
+ vol->SetTransparency(char(rv.GetNumber()));
+ }
+
+
+ TGFrameElement* fel;
+ TList* list = fDisplayFrame->GetList();
+ TIter nextin(list);
+ ReveValuator* cw;
+ while ((fel = (TGFrameElement*)nextin())){
+ // printf("RGBrowser::SetTransparency %s in fDisplayFrame\n", fel->fFrame->GetName());
+ cw = dynamic_cast<ReveValuator*>(fel->fFrame);
+ if(cw) {
+ TGeoVolume* v = dynamic_cast<TGeoVolume*>((TObject*)cw->GetUserData());
+ if(v) {
+ cw->SetNumber(v->GetTransparency());
+ }
+ }
+ }
+ gReve->Redraw3D();
+}
+
+/**************************************************************************/
+
+void RGBrowser::SetVolumeColor(UInt_t pixel)
+{
+ Int_t r, g, b;
+ TColor::Pixel2RGB(pixel, r, g, b);
+
+ TGColorSelect* w = (TGColorSelect*) gTQSender;
+ TGeoVolume* vol = (TGeoVolume*) w->GetUserData();
+ Int_t col = TColor::GetColor(pixel);
+ vol->SetLineColor(col);
+
+ ReveColorSelect* cw;
+ TGFrameElement* fel;
+ TList* list = fDisplayFrame->GetList();
+ TIter nextin(list);
+ while ((fel = (TGFrameElement*)nextin())){
+ // printf("%s in fDisplayFrame\n", fel->fFrame->GetName());
+ cw = dynamic_cast<ReveColorSelect*>(fel->fFrame);
+ if(cw) {
+ TGeoVolume* cv = dynamic_cast<TGeoVolume*>((TObject*)cw->GetUserData());
+ if(cv) {
+ // printf("TGColorSelect %d %d\n",pixel, cv->GetLineColor());
+ cw->UpdateColor(TColor::Number2Pixel(cv->GetLineColor()));
+ }
+ }
+ }
+ gClient->NeedRedraw(fDisplayFrame);
+ gReve->Redraw3D();
+}
+
+void RGBrowser::NodeVis(Bool_t vis)
+{
+ TGCheckButton& rv = *(TGCheckButton*)gTQSender;
+ TGeoNode* node = (TGeoNode*) rv.GetUserData();
+ if(node) {
+ Reve::PadHolder pHolder(false, gReve->GetCC());
+ node->SetVisibility(vis);
+ gReve->Redraw3D();
+ }
+}
+
+void RGBrowser::VolumeDaughterVis(Bool_t vis)
+{
+ TGCheckButton& rv = *(TGCheckButton*)gTQSender;
+ // printf("VSet idx=%d, double value=%lf, part=%p\n", val, rv.GetNumber(), rv.GetUserData());
+ TGeoVolume* vol = (TGeoVolume*) rv.GetUserData();
+ if(vol) {
+ Reve::PadHolder pHolder(false, gReve->GetCC());
+ vol->VisibleDaughters(vis);
+ gReve->Redraw3D();
+ }
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void RGBrowser::SetMaxR(Long_t )
+{
+ ReveValuator* rv = (ReveValuator*) gTQSender;
+ TrackList* tc = (TrackList*) rv->GetUserData();
+ if(tc) {
+ tc->SetMaxR(rv->GetNumber());
+ }
+}
+
+void RGBrowser::SetMaxZ(Long_t )
+{
+ ReveValuator* rv = (ReveValuator*) gTQSender;
+ TrackList* tc = (TrackList*) rv->GetUserData();
+ if(tc) {
+ tc->SetMaxZ(rv->GetNumber());
+ }
+}
+
+void RGBrowser::SetMaxOrbs(Long_t )
+{
+ ReveValuator* rv = (ReveValuator*) gTQSender;
+ TrackList* tc = (TrackList*) rv->GetUserData();
+ if(tc) {
+ tc->SetMaxOrbs(rv->GetNumber());
+ }
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void RGBrowser::SetMarkerStyle(Long_t )
+{
+ ReveValuator* rv = (ReveValuator*) gTQSender;
+ PointSet* pc = (PointSet*) rv->GetUserData();
+ if(pc) {
+ Reve::PadHolder pHolder(false, gReve->GetCC());
+ pc->SetMarkerStyle(short(rv->GetNumber()));
+ gReve->Redraw3D();
+ }
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void RGBrowser::UpdateListItems(TGListTreeItem* item, Int_t )
+{
+ if (item->GetUserData()) {
+ // ListTreeHighlight(item);
+ TObject* obj = (TObject *) item->GetUserData();
+
+ // geometry tree
+ if(obj->IsA()->InheritsFrom("TGeoNode")){
+ // delete exisiting
+ fListTree->DeleteChildren(item);
+ TGeoNode* n = (TGeoNode*) obj->IsA()->DynamicCast( TGeoNode::Class(), obj );
+ //printf("adding items\n");
+ if (n->GetNdaughters()) {
+ for (Int_t i=0; i< n->GetNdaughters(); i++) {
+ TString title;
+ title.Form("%d : %s[%d]", i,
+ n->GetDaughter(i)->GetVolume()->GetName(),
+ n->GetDaughter(i)->GetNdaughters());
+
+ TGListTreeItem* child = fListTree->AddItem( item, title.Data());
+ child->SetUserData( n->GetDaughter(i));
+ }
+ }
+ }
+ }
+}
+
+
+/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+
+/**************************************************************************/
+// ReveValuator
+/**************************************************************************/
+
+ReveValuator::~ReveValuator()
+{}
--- /dev/null
+#ifndef REVE_RGBrowser_H
+#define REVE_RGBrowser_H
+
+#include <TGFrame.h>
+#include <TGButton.h>
+#include <TGListTree.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+
+#include <TParticle.h>
+#include <TTree.h>
+#include <TCanvas.h>
+#include <TGeoVolume.h>
+#include <TContextMenu.h>
+
+namespace Reve {
+
+class RGEditor;
+
+/**************************************************************************/
+// TG wrappers used in detail view.
+/**************************************************************************/
+
+class ReveValuator : public TGNumberEntry
+{
+protected:
+ void* fUserData;
+
+public:
+ ReveValuator(const TGWindow* parent = 0, Double_t val = 0, Int_t digitwidth = 5, Int_t id = -1, TGNumberFormat::EStyle style = kNESReal, TGNumberFormat::EAttribute attr = kNEAAnyNumber, TGNumberFormat::ELimit limits = kNELNoLimits, Double_t min = 0, Double_t max = 1) :
+ TGNumberEntry(parent, val, digitwidth, id, style, attr, limits, min, max),
+ fUserData(0)
+ {}
+ virtual ~ReveValuator();
+
+ void* GetUserData() const { return fUserData; }
+ void SetUserData(void* ud) { fUserData = ud; }
+
+ ClassDef(ReveValuator, 1);
+};
+
+
+class ReveColorSelect: public TGColorSelect
+{
+ public:
+ ReveColorSelect(const TGWindow* p = 0, Pixel_t color = 0, Int_t id = -1) :
+ TGColorSelect(p, color,id)
+ {}
+ virtual ~ReveColorSelect() {}
+
+ void UpdateColor(Pixel_t col){
+ fColor=col;
+ fDrawGC.SetForeground(col);
+ gClient->NeedRedraw(this);
+ }
+
+ ClassDef(ReveColorSelect, 1);
+};
+
+
+/**************************************************************************/
+// RGBrowser
+/**************************************************************************/
+
+class RGBrowser : public TGCompositeFrame
+{
+protected:
+ TGCompositeFrame* fMainFrame;
+ TGVerticalFrame* fV1;
+ TGVerticalFrame* fV2;
+
+ TGCompositeFrame* fSelectionFrame; // in fact list-tree frame
+ TGCanvas* fTreeView;
+
+ TGCanvas* fCanvasWindow;
+ TGCompositeFrame* fDisplayFrame; // detailed-vire frame, used in Classic look
+
+ TGListTree* fListTree;
+ TContextMenu* fCtxMenu;
+
+ protected:
+ void SetupCintExport(TClass* cl);
+
+ public:
+ RGBrowser(const TGWindow *p, UInt_t w, UInt_t h);
+ virtual ~RGBrowser() {}
+
+ void SetupClassicLook();
+ void SetupEditorLook(RGEditor* editor);
+ void SetupGLViewerLook(RGEditor* editor, TVirtualPad* glpad);
+
+ void RedrawListTree();
+
+ void ItemClicked(TGListTreeItem *entry, Int_t btn, Int_t x, Int_t y);
+ void ExportToCINT(Text_t* var_name, TObject* obj);
+ void DisplayChildren(TGListTreeItem *entry, Int_t btn);
+
+ void SetVolumeColor(UInt_t col);
+ void NodeVis(Bool_t vis);
+ void VolumeDaughterVis(Bool_t vis);
+
+ void DbClickListItem(TGListTreeItem* item, Int_t btn);
+ void UpdateListItems(TGListTreeItem* item, Int_t btn);
+ void SetTransparency(Long_t val);
+
+ // TrackRnrStyle
+ void SetMaxR(Long_t);
+ void SetMaxZ(Long_t);
+ void SetMaxOrbs(Long_t);
+
+ // GuiPOintRnrStyle
+ void SetMarkerStyle(Long_t style);
+
+
+ TGListTree* GetListTree() { return fListTree; }
+
+ ClassDef(RGBrowser, 1);
+};
+
+} // namespace Reve
+
+#endif
--- /dev/null
+// $Header$
+
+#include "RGEditor.h"
+
+#include <TGedFrame.h>
+#include <TGCanvas.h>
+#include <TCanvas.h>
+
+//______________________________________________________________________
+// RGEditor
+//
+
+using namespace Reve;
+
+ClassImp(RGEditor)
+
+RGEditor::RGEditor(TCanvas* canvas) : TGedEditor(canvas)
+{}
+
+void RGEditor::DisplayObject(TObject* obj)
+{
+ fModel = obj;
+
+ if(obj) {
+ if(obj->IsA() != fClass && !obj->IsA()->InheritsFrom(fClass)) {
+ fClass = obj->IsA();
+ GetEditors();
+ }
+ } else {
+ fCan->UnmapWindow();
+ return;
+ }
+
+ TGFrameElement *el;
+ TIter next(fStyle->GetList());
+ while ((el = (TGFrameElement *) next())) {
+ if ((el->fFrame)->InheritsFrom(TGedFrame::Class()))
+ ((TGedFrame *)(el->fFrame))->SetModel(fPad, fModel, 0);
+ }
+ fCan->MapWindow();
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_RGEditor_H
+#define REVE_RGEditor_H
+
+#include <TGedEditor.h>
+
+namespace Reve {
+
+class RGEditor : public TGedEditor
+{
+protected:
+
+public:
+ RGEditor(TCanvas* canvas=0);
+ virtual ~RGEditor() {}
+
+ void DisplayObject(TObject* obj);
+ TGCanvas * GetCan() const {return fCan;}
+
+ ClassDef(RGEditor, 1);
+}; // endclass RGEditor
+
+}
+
+#endif
--- /dev/null
+#include "RGTopFrame.h"
+
+#include "RGBrowser.h"
+#include "RGEditor.h"
+#include "VSDSelector.h"
+
+#include <Reve/RenderElement.h>
+
+#include <TGMenu.h>
+#include <TGTab.h>
+#include <TGToolBar.h>
+#include <TGLabel.h>
+#include <TGTextEntry.h>
+#include <TGSplitter.h>
+#include <TRootEmbeddedCanvas.h>
+
+#include <TGLSAViewer.h>
+#include <TH1F.h>
+#include <TView.h>
+
+#include <TROOT.h>
+#include <TFile.h>
+#include <TStyle.h>
+#include <TPad.h>
+#include <TCanvas.h>
+#include <TSystem.h>
+#include <TRint.h>
+#include <TVirtualX.h>
+#include <TPolyLine3D.h>
+#include <TPolyMarker3D.h>
+#include <TEnv.h>
+#include <TStyle.h>
+#include <KeySymbols.h>
+#include "TVirtualGL.h"
+#include "TPluginManager.h"
+
+#include <iostream>
+
+using namespace Reve;
+using namespace Reve;
+
+Reve::RGTopFrame* gReve = 0;
+
+namespace {
+
+enum RGBrowserMT {
+ M_LAYOUT_1,
+ M_LAYOUT_2,
+ M_LAYOUT_3
+};
+
+const char *xpm_names[] = {
+ "lay1.xpm",
+ "lay2.xpm",
+ "lay3.xpm",
+ 0
+};
+
+ToolBarData_t tb_data[] = {
+ { "", "Standard list layout", kFALSE, M_LAYOUT_1, NULL },
+ { "", "TParticle latout", kFALSE, M_LAYOUT_2, NULL },
+ { "", "TGeo layout", kFALSE, M_LAYOUT_3, NULL },
+ { NULL, NULL, 0, 0, NULL }
+};
+
+} // unnamed namespace
+
+/**************************************************************************/
+
+
+void RGTopFrame::Init(){
+ fSelector = 0;
+ fCC = 0;
+ // fVSDFile = "";
+
+ fRedrawDisabled = false;
+ fTimerActive = false;
+ fRedrawTimer.Connect("Timeout()", "Reve::RGTopFrame", this, "DoRedraw3D()");
+}
+
+
+RGTopFrame::RGTopFrame(const TGWindow *p, UInt_t w, UInt_t h, LookType_e look)
+ : TGMainFrame(p, w, h)
+{
+ Init();
+ TGLayoutHints *fL0 = new TGLayoutHints(kLHintsCenterX |kLHintsCenterY | kLHintsExpandY| kLHintsExpandX);
+ TGLayoutHints *fL1 = new TGLayoutHints(kLHintsCenterX |kLHintsCenterY | kLHintsExpandY| kLHintsExpandX,2,0,2,2);
+ TGLayoutHints* fL2 = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY,
+ 2, 2, 2, 2);
+ TGCompositeFrame* fMainFrame = new TGCompositeFrame(this, w, h,kHorizontalFrame | kRaisedFrame);
+ fMainFrame->SetCleanup(kDeepCleanup);
+ TGVerticalFrame* fV2 = new TGVerticalFrame(fMainFrame, GetWidth()-40, GetHeight()-40, kSunkenFrame);
+
+ fMainFrame->AddFrame(fV2, fL1);
+
+ // ??? TGCanvas* fCanvasWindow = new TGCanvas(fV2,w,h);
+ TGTab* fDisplayFrame = new TGTab(fV2, GetWidth(), GetHeight());
+
+ // browser tab
+ TGCompositeFrame* tFrame1 = fDisplayFrame->AddTab("Object Browser");
+ fBrowser = new RGBrowser(tFrame1, w, h);
+ tFrame1->AddFrame(fBrowser, fL2);
+
+ // tree selection tab
+ TGCompositeFrame* tFrame2 = fDisplayFrame->AddTab("Tree Selections");
+ fSelector = new VSDSelector(fBrowser->GetListTree(), tFrame2);
+
+ // canvas
+ Reve::PushPad();
+ TGCompositeFrame* tFrame3 = fDisplayFrame->AddTab("Canvas");
+ TRootEmbeddedCanvas* fEmbeddedCanvas3 = new TRootEmbeddedCanvas("fEmbeddedCanvas3", tFrame3, 580, 360);
+ tFrame3->AddFrame(fEmbeddedCanvas3, fL2);
+ fEmbeddedCanvas3->GetCanvas()->SetBorderMode(0);
+ fCC = fEmbeddedCanvas3->GetCanvas();
+ // fCC->SetFillColor(1);
+
+ { // Workaround for empty scene.
+ TPolyMarker3D* bugmark = new TPolyMarker3D(8);
+ // bugmark->SetMarkerStyle(2);
+ // bugmark->SetMarkerColor(1);
+ const Float_t a = 10.0;
+ bugmark->SetPoint(0, a, a,a);
+ bugmark->SetPoint(1, a, -a,a);
+ bugmark->SetPoint(2, -a, -a,a);
+ bugmark->SetPoint(3, -a, a,a);
+
+ bugmark->SetPoint(4, a, a,-a);
+ bugmark->SetPoint(5, a, -a,-a);
+ bugmark->SetPoint(6, -a, a,-a);
+ bugmark->SetPoint(7, -a, -a,-a);
+ bugmark->Draw();
+ }
+
+ Reve::PopPad();
+
+
+ // histo canvas
+ TGCompositeFrame* frame4 = fDisplayFrame->AddTab("HistoCanvas");
+ TRootEmbeddedCanvas* ecanvas4 = new TRootEmbeddedCanvas("HistoCanvas", frame4, 580, 360);
+ frame4->AddFrame(ecanvas4, fL2);
+ fHistoCanvas = ecanvas4->GetCanvas();
+ fHistoCanvas->SetBorderMode(0);
+
+
+ fV2->AddFrame(fDisplayFrame, fL0);
+ AddFrame(fMainFrame, fL0);
+
+ // Create status bar
+ Int_t parts[] = {45, 45, 10};
+ fStatusBar = new TGStatusBar(this, 50, 10, kHorizontalFrame);
+ fStatusBar->SetParts(parts, 3);
+ TGLayoutHints* fL6 = new TGLayoutHints(kLHintsBottom| kLHintsExpandX, 0, 0, 0, 0);
+ AddFrame(fStatusBar, fL6);
+ fStatusBar->SetText("GUI created", 0);
+
+ MapSubwindows();
+
+ /**************************************************************************/
+ /**************************************************************************/
+
+ fEditor = new RGEditor(fCC);
+ fEditor->GetCan()->ChangeOptions(0);
+
+ switch(look) {
+ case LT_Classic: {
+ fBrowser->SetupClassicLook();
+ // Need push/pop pad around here? Not.
+ fCC->GetViewer3D("ogl");
+ break;
+ }
+
+ case LT_Editor: {
+ fBrowser->SetupEditorLook(fEditor);
+ fCC->GetViewer3D("ogl");
+ break;
+ }
+
+ case LT_GLViewer: {
+ printf("LT_GLViewer this option currently somewhat broken!\n");
+ fBrowser->SetupGLViewerLook(fEditor, fCC);
+ printf("Crap1 %d %d\n", GetWidth(), GetHeight());
+ break;
+ }
+
+ default: {
+ printf("RGTopFrame unknown look-type, ignoring.\n");
+ break;
+ }
+ }
+
+ TGLViewer* glv = dynamic_cast<TGLViewer*>(fCC->GetViewer3D());
+ if(glv) {
+ glv->SetSmartRefresh(true);
+ }
+
+ /**************************************************************************/
+ /**************************************************************************/
+
+ fGeometryLTI = GetListTree()->AddItem(0, "Geometry");
+ GetListTree()->OpenItem(fGeometryLTI);
+
+ Resize(GetDefaultSize()); // this is used here to init layout algorithm
+ SetWindowName("Reve");
+ MapWindow();
+
+ fEditor->DisplayObject(0);
+
+ gSystem->ProcessEvents();
+}
+
+/**************************************************************************/
+
+TGListTree* RGTopFrame::GetListTree()
+{
+ return fBrowser->GetListTree();
+}
+
+TGListTreeItem* RGTopFrame::GetEventTreeItem()
+{
+ // return fBrowser->GetListTree()->FindItemByPathname("Event");
+ return fCurrentEventLTI;
+}
+
+TGListTreeItem* RGTopFrame::GetGlobalTreeItem()
+{
+ return fGeometryLTI;
+}
+
+/**************************************************************************/
+// Editor
+/**************************************************************************/
+
+void RGTopFrame::EditRenderElement(RenderElement* rnr_element)
+{
+ static const Exc_t eH("RGTopFrame::EditRenderElement ");
+
+ TObject* tobj = 0;
+ if(rnr_element) tobj = dynamic_cast<TObject*>(rnr_element);
+ fEditor->DisplayObject(tobj);
+}
+
+/**************************************************************************/
+// 3D Pad management
+/**************************************************************************/
+
+void RGTopFrame::RegisterRedraw3D()
+{
+ fRedrawTimer.Start(0, kTRUE);
+ fTimerActive = true;
+}
+
+void RGTopFrame::DoRedraw3D()
+{
+ // printf("RGTopFrame::DoRedraw3D redraw triggered\n");
+ fCC->Modified();
+ fCC->Update();
+ fTimerActive = false;
+}
+
+/**************************************************************************/
+
+int RGTopFrame::SpawnGuiAndRun(int argc, char **argv)
+{
+ LookType_e revemode = LT_Editor;
+ if(argc >= 3 && strcmp(argv[1], "-revemode")==0) {
+ LookType_e m = LookType_e(atoi(argv[2]));
+ if(m >= LT_Classic && m <= LT_GLViewer)
+ revemode = m;
+ printf("revemode = %d\n", revemode);
+ }
+
+ TRint theApp("App", &argc, argv);
+ Int_t w = 800;
+ Int_t h = 600;
+
+ gReve = new RGTopFrame(gClient->GetRoot(), w, h, revemode);
+ run_loop:
+ try {
+ theApp.Run();
+ }
+ catch(std::string exc) {
+ gReve->GetStatusBar()->SetText(exc.c_str());
+ goto run_loop;
+ }
+ return 0;
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+TGListTreeItem* RGTopFrame::AddEvent(TObject* event)
+{
+ fCurrentEvent = event;
+ fCurrentEventLTI = GetListTree()->AddItem(0, event->GetName());
+ fCurrentEventLTI->SetUserData(event);
+ fCurrentEventLTI->SetTipText(event->GetTitle());
+ GetListTree()->OpenItem(fCurrentEventLTI);
+ return fCurrentEventLTI;
+}
+
+TGListTreeItem* RGTopFrame::AddRenderElement(RenderElement* rnr_element)
+{
+ static const Exc_t eH("RGTopFrame::AddGlobalRenderElement ");
+
+ // Here could route rnr-element to several browsers/pads.
+
+ TGListTreeItem* newitem =
+ rnr_element->AddIntoListTree(GetListTree(), GetEventTreeItem());
+ NotifyBrowser();
+
+ return newitem;
+}
+
+TGListTreeItem* RGTopFrame::AddRenderElement(TGListTreeItem* parent,
+ RenderElement* rnr_element)
+{
+ static const Exc_t eH("RGTopFrame::AddRenderElement ");
+
+ // Here could route rnr-element to several browsers/pads.
+
+ TGListTreeItem* newitem =
+ rnr_element->AddIntoListTree(GetListTree(), parent);
+ NotifyBrowser();
+
+ return newitem;
+}
+
+TGListTreeItem* RGTopFrame::AddGlobalRenderElement(RenderElement* rnr_element)
+{
+ return AddGlobalRenderElement(GetEventTreeItem(), rnr_element);
+}
+
+TGListTreeItem* RGTopFrame::AddGlobalRenderElement(TGListTreeItem* ,
+ RenderElement* rnr_element)
+{
+ static const Exc_t eH("RGTopFrame::AddGlobalRenderElement ");
+
+ // Here could route rnr-element to several browsers/pads.
+
+ TGListTreeItem* newitem =
+ rnr_element->AddIntoListTree(GetListTree(), GetGlobalTreeItem());
+ NotifyBrowser();
+
+ return newitem;
+}
+
+/**************************************************************************/
+
+void RGTopFrame::DrawRenderElement(RenderElement* rnr_element, TVirtualPad* pad)
+{
+ if(pad == 0) pad = GetCC();
+ { Reve::PadHolder pHolder(false, pad);
+ rnr_element->GetObject()->Draw();
+ }
+ Redraw3D();
+}
+
+/**************************************************************************/
+
+void RGTopFrame::RenderElementChecked(TObject* obj, Bool_t state)
+{
+ RenderElement* rnr_element = dynamic_cast<RenderElement*>(obj);
+ // printf("Checked %p %p %d\n", obj, rnr_element, state);
+ if(rnr_element)
+ rnr_element->SetRnrElement(state);
+}
+
+/**************************************************************************/
+
+void RGTopFrame::NotifyBrowser(TGListTreeItem* parent)
+{
+ TGListTree* l_tree = GetListTree();
+ if(parent)
+ l_tree->OpenItem(parent);
+ l_tree->GetClient()->NeedRedraw(l_tree);
+}
+
+/**************************************************************************/
+// GeoManager registration
+/**************************************************************************/
+
+TGeoManager* RGTopFrame::GetGeometry(const TString& filename)
+{
+ static const Exc_t eH("RGTopFrame::GetGeometry ");
+
+ TString exp_filename = filename;
+ gSystem->ExpandPathName(exp_filename);
+ printf("%s loading: '%s' -> '%s'.\n", eH.Data(),
+ filename.Data(), exp_filename.Data());
+
+ std::map<TString, TGeoManager*>::iterator g = fGeometries.find(filename);
+ if(g != fGeometries.end()) {
+ return g->second;
+ } else {
+ if(gSystem->AccessPathName(exp_filename, kReadPermission))
+ throw(eH + "file '" + exp_filename + "' not readable.");
+ gGeoManager = 0;
+ TGeoManager::Import(filename);
+ if(gGeoManager == 0)
+ throw(eH + "GeoManager import failed.");
+ gGeoManager->GetTopVolume()->VisibleDaughters(1);
+
+ // Import colors exported by Gled, if they exist.
+ {
+ TFile f(exp_filename, "READ");
+ TObjArray* collist = (TObjArray*) f.Get("ColorList");
+ f.Close();
+ if(collist != 0) {
+ TSeqCollection* glist = gROOT->GetListOfColors();
+ glist->Clear();
+ glist->AddAll(collist);
+ }
+ }
+
+ fGeometries[filename] = gGeoManager;
+ return gGeoManager;
+ }
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_RGTopFrame_H
+#define REVE_RGTopFrame_H
+
+#include <TGFrame.h>
+#include <TGeoManager.h>
+#include <TGStatusBar.h>
+
+#include <map>
+
+class TCanvas;
+class TGStatusBar;
+class TGListTree;
+class TGListTreeItem;
+
+namespace Reve {
+
+class VSDSelector;
+class RGBrowser;
+class RGEditor;
+class RenderElement;
+
+class RGTopFrame : public TGMainFrame
+{
+public:
+ enum LookType_e { LT_Classic, LT_Editor, LT_GLViewer };
+
+private:
+ void Init();
+ TCanvas *fCC;
+ TCanvas *fHistoCanvas;
+ VSDSelector *fSelector;
+ RGBrowser *fBrowser;
+ TGStatusBar *fStatusBar;
+ const char *fVSDFile;
+
+ RGEditor *fEditor;
+
+ TObject *fCurrentEvent;
+ TGListTreeItem *fCurrentEventLTI;
+
+ TGListTreeItem *fGeometryLTI;
+
+ Bool_t fRedrawDisabled;
+ Bool_t fTimerActive;
+ TTimer fRedrawTimer;
+
+protected:
+ LookType_e fLook;
+
+ std::map<TString, TGeoManager*> fGeometries;
+
+public:
+ RGTopFrame(const TGWindow *p, UInt_t w, UInt_t h, LookType_e look=LT_Classic);
+
+ TCanvas* GetCC() { return fCC; }
+ VSDSelector* GetSelector() { return fSelector; }
+ RGBrowser* GetBrowser() { return fBrowser; }
+ TGStatusBar* GetStatusBar() { return fStatusBar; }
+
+ TGListTree* GetListTree();
+ TGListTreeItem* GetEventTreeItem();
+ TGListTreeItem* GetGlobalTreeItem();
+
+ RGEditor* GetEditor() const { return fEditor; }
+ void EditRenderElement(RenderElement* rnr_element);
+
+ void DisableRedraw() { fRedrawDisabled = true; }
+ void EnableRedraw() { fRedrawDisabled = false; Redraw3D(); }
+
+ void Redraw3D() { if(!fRedrawDisabled && !fTimerActive) RegisterRedraw3D(); }
+ void RegisterRedraw3D();
+ void DoRedraw3D();
+
+ static int SpawnGuiAndRun(int argc, char **argv);
+
+ // These are more like ReveManager stuff.
+ TGListTreeItem* AddEvent(TObject* event); // Could have Reve::Event ...
+ TGListTreeItem* AddRenderElement(RenderElement* rnr_element);
+ TGListTreeItem* AddRenderElement(TGListTreeItem* parent, RenderElement* rnr_element);
+ TGListTreeItem* AddGlobalRenderElement(RenderElement* rnr_element);
+ TGListTreeItem* AddGlobalRenderElement(TGListTreeItem* parent, RenderElement* rnr_element);
+
+ void DrawRenderElement(RenderElement* rnr_element, TVirtualPad* pad=0);
+
+ void RenderElementChecked(TObject* obj, Bool_t state);
+
+ void NotifyBrowser(TGListTreeItem* parent=0);
+
+ // Hmmph ... geometry management?
+ TGeoManager* GetGeometry(const TString& filename);
+
+ ClassDef(RGTopFrame, 0);
+};
+
+} // namespace Reve
+
+extern Reve::RGTopFrame* gReve;
+
+#endif
--- /dev/null
+// $Header$
+
+#include "RGeoNodeEditors.h"
+
+#include <Reve/GeoNode.h>
+#include <TGeoNode.h>
+
+#include <TVirtualPad.h>
+#include <TColor.h>
+
+#include <TGLabel.h>
+#include <TGButton.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+#include <TGDoubleSlider.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// GeoNodeRnrElEditor
+//
+
+ClassImp(GeoNodeRnrElEditor)
+
+GeoNodeRnrElEditor::GeoNodeRnrElEditor(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+ UInt_t options, Pixel_t back) :
+ TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+{
+ fNodeRE = 0;
+ MakeTitle("GeoNode");
+
+ // --- Visibility control
+
+ fVizNode = new TGCheckButton(this, "VizNode");
+ AddFrame(fVizNode, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fVizNode->Connect
+ ("Toggled(Bool_t)",
+ "Reve::GeoNodeRnrElEditor", this, "DoVizNode()");
+
+ fVizNodeDaughters = new TGCheckButton(this, "VizNodeDaughters");
+ AddFrame(fVizNodeDaughters, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fVizNodeDaughters->Connect
+ ("Toggled(Bool_t)",
+ "Reve::GeoNodeRnrElEditor", this, "DoVizNodeDaughters()");
+
+ fVizVolume = new TGCheckButton(this, "VizVolume");
+ AddFrame(fVizVolume, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fVizVolume->Connect
+ ("Toggled(Bool_t)",
+ "Reve::GeoNodeRnrElEditor", this, "DoVizVolume()");
+
+ fVizVolumeDaughters = new TGCheckButton(this, "VizVolumeDaughters");
+ AddFrame(fVizVolumeDaughters, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fVizVolumeDaughters->Connect
+ ("Toggled(Bool_t)",
+ "Reve::GeoNodeRnrElEditor", this, "DoVizVolumeDaughters()");
+
+
+ // --- Color props
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "Transparency:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 2, 1, 1));
+ fTransparency = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative,
+ TGNumberFormat::kNELLimitMinMax, 0, 100);
+ fTransparency->GetNumberEntry()->SetToolTipText("0 is opaque, 100 fully transparent.");
+ f->AddFrame(fTransparency, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fTransparency->Associate(f);
+ fTransparency->Connect("ValueSet(Long_t)",
+ "Reve::GeoNodeRnrElEditor", this, "DoTransparency()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+
+
+ // What is this crap?
+ TClass *cl = GeoNodeRnrEl::Class();
+ TGedElement *ge = new TGedElement;
+ ge->fGedFrame = this;
+ ge->fCanvas = 0;
+ cl->GetEditorList()->Add(ge);
+}
+
+/**************************************************************************/
+
+void GeoNodeRnrElEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
+{
+ fModel = 0;
+ fPad = 0;
+
+ if (!obj || !obj->InheritsFrom(GeoNodeRnrEl::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
+ SetActive(kFALSE);
+ return;
+ }
+
+ fModel = obj;
+ fPad = pad;
+
+ fNodeRE = dynamic_cast<GeoNodeRnrEl*>(fModel);
+ TGeoNode* node = fNodeRE->fNode;
+ TGeoVolume* vol = node->GetVolume();
+
+ fVizNode->SetState(node->TGeoAtt::IsVisible() ? kButtonDown : kButtonUp);
+ fVizNodeDaughters->SetState(node->TGeoAtt::IsVisDaughters() ? kButtonDown : kButtonUp);
+ fVizVolume->SetState(vol->IsVisible() ? kButtonDown : kButtonUp);
+ fVizVolumeDaughters->SetState(vol->IsVisDaughters() ? kButtonDown : kButtonUp);
+
+ fTransparency->SetNumber(vol->GetTransparency());
+
+ SetActive();
+}
+
+/**************************************************************************/
+
+void GeoNodeRnrElEditor::DoVizNode()
+{
+ fNodeRE->fNode->SetVisibility(fVizNode->IsOn());
+ fNodeRE->FullUpdate();
+}
+
+void GeoNodeRnrElEditor::DoVizNodeDaughters()
+{
+ fNodeRE->fNode->VisibleDaughters(fVizNodeDaughters->IsOn());
+ Update();
+}
+
+void GeoNodeRnrElEditor::DoVizVolume()
+{
+ fNodeRE->fNode->GetVolume()->SetVisibility(fVizVolume->IsOn());
+ Update();
+}
+
+void GeoNodeRnrElEditor::DoVizVolumeDaughters()
+{
+ fNodeRE->fNode->GetVolume()->VisibleDaughters(fVizVolumeDaughters->IsOn());
+ Update();
+}
+
+/**************************************************************************/
+
+void GeoNodeRnrElEditor::DoTransparency()
+{
+ fNodeRE->fNode->GetVolume()->SetTransparency(char(fTransparency->GetNumber()));
+ Update();
+}
+
+
+/**************************************************************************/
+/**************************************************************************/
+
+//______________________________________________________________________
+// GeoTopNodeRnrElEditor
+//
+
+ClassImp(GeoTopNodeRnrElEditor)
+
+GeoTopNodeRnrElEditor::GeoTopNodeRnrElEditor(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+ UInt_t options, Pixel_t back) :
+ TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+{
+ fTopNodeRE = 0;
+ MakeTitle("GeoTopNode");
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "VisOption:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 2, 1, 1));
+ fVisOption = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative,
+ TGNumberFormat::kNELLimitMinMax, 0, 3);
+ fVisOption->GetNumberEntry()->SetToolTipText("0 ~ all final nodes, 1 ~ pure leaves only, 2 ~ path (?)");
+ f->AddFrame(fVisOption, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fVisOption->Associate(f);
+ fVisOption->Connect("ValueSet(Long_t)",
+ "Reve::GeoTopNodeRnrElEditor", this, "DoVisOption()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "VisLevel:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 2, 1, 1));
+ fVisLevel = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative,
+ TGNumberFormat::kNELLimitMinMax, 0, 128);
+ fVisLevel->GetNumberEntry()->SetToolTipText("");
+ f->AddFrame(fVisLevel, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fVisLevel->Associate(f);
+ fVisLevel->Connect("ValueSet(Long_t)",
+ "Reve::GeoTopNodeRnrElEditor", this, "DoVisLevel()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+
+
+ // What is this crap?
+ TClass *cl = GeoNodeRnrEl::Class();
+ TGedElement *ge = new TGedElement;
+ ge->fGedFrame = this;
+ ge->fCanvas = 0;
+ cl->GetEditorList()->Add(ge);
+}
+
+/**************************************************************************/
+
+void GeoTopNodeRnrElEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
+{
+ fModel = 0;
+ fPad = 0;
+
+ if (!obj || !obj->InheritsFrom(GeoTopNodeRnrEl::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
+ SetActive(kFALSE);
+ return;
+ }
+
+ fModel = obj;
+ fPad = pad;
+
+ fTopNodeRE = dynamic_cast<GeoTopNodeRnrEl*>(fModel);
+
+ fVisOption->SetNumber(fTopNodeRE->GetVisOption());
+ fVisLevel->SetNumber(fTopNodeRE->GetVisLevel());
+
+ SetActive();
+}
+
+/**************************************************************************/
+
+void GeoTopNodeRnrElEditor::DoVisOption()
+{
+ fTopNodeRE->SetVisOption(Int_t(fVisOption->GetNumber()));
+}
+
+void GeoTopNodeRnrElEditor::DoVisLevel()
+{
+ fTopNodeRE->SetVisLevel(Int_t(fVisLevel->GetNumber()));
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_RGeoNodeEditors_H
+#define REVE_RGeoNodeEditors_H
+
+#include <TGedFrame.h>
+
+class TGCheckButton;
+class TGNumberEntry;
+class TGColorSelect;
+
+namespace Reve {
+
+class GeoNodeRnrEl;
+class GeoTopNodeRnrEl;
+
+
+class GeoNodeRnrElEditor : public TGedFrame
+{
+protected:
+ GeoNodeRnrEl* fNodeRE;
+
+ TGCheckButton* fVizNode;
+ TGCheckButton* fVizNodeDaughters;
+ TGCheckButton* fVizVolume;
+ TGCheckButton* fVizVolumeDaughters;
+
+ TGNumberEntry* fTransparency;
+
+public:
+ GeoNodeRnrElEditor(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+ virtual ~GeoNodeRnrElEditor() {}
+
+ virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
+
+ void DoVizNode();
+ void DoVizNodeDaughters();
+ void DoVizVolume();
+ void DoVizVolumeDaughters();
+
+ void DoTransparency();
+
+ ClassDef(GeoNodeRnrElEditor, 1);
+};
+
+/**************************************************************************/
+
+class GeoTopNodeRnrElEditor : public TGedFrame
+{
+protected:
+ GeoTopNodeRnrEl* fTopNodeRE;
+
+ TGNumberEntry* fVisOption;
+ TGNumberEntry* fVisLevel;
+
+public:
+ GeoTopNodeRnrElEditor(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+ virtual ~GeoTopNodeRnrElEditor() {}
+
+ virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
+
+ void DoVisOption();
+ void DoVisLevel();
+
+ ClassDef(GeoTopNodeRnrElEditor, 1);
+};
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "RenderElement.h"
+#include "RGTopFrame.h"
+
+#include <TColor.h>
+#include <TCanvas.h>
+#include <TGListTree.h>
+#include <THashList.h>
+
+using namespace Reve;
+using namespace Reve;
+
+//______________________________________________________________________
+// Reve
+//
+
+ClassImp(RenderElement)
+
+RenderElement::RenderElement()
+{
+ fRnrElement = true;
+ fMainColorPtr = 0;
+}
+
+RenderElement::RenderElement(Color_t& main_color) : fMainColorPtr(&main_color)
+{
+ fRnrElement = true;
+}
+
+/**************************************************************************/
+
+TObject* RenderElement::GetObject(Exc_t eh)
+{
+ TObject* obj = dynamic_cast<TObject*>(this);
+ if(obj == 0)
+ throw(eh + "not a TObject.");
+ return obj;
+}
+
+/**************************************************************************/
+
+TGListTreeItem* RenderElement::AddIntoListTree(TGListTree* ltree,
+ TGListTreeItem* parent)
+{
+ static const Exc_t eH("RenderElement::AddIntoListTree ");
+
+ TObject* tobj = GetObject(eH);
+ TGListTreeItem* item = ltree->AddItem(parent, tobj->GetName(), tobj,
+ 0, 0, kTRUE);
+ item->CheckItem(GetRnrElement());
+ item->SetColor(GetMainColor());
+ // printf("%s setting title for %s, '%s'\n", eH.Data(), tobj->GetName(), tobj->GetTitle());
+ item->SetTipText(tobj->GetTitle());
+
+ fItems.insert(ListTreeInfo(ltree, item));
+
+ return item;
+}
+
+/**************************************************************************/
+
+void RenderElement::FullUpdate()
+{
+ for(sLTI_i i=fItems.begin(); i!=fItems.end(); ++i) {
+ // Setup name and title/tooltip? Need update calls from setname/title as well.
+ i->fItem->CheckItem(fRnrElement);
+ i->fItem->SetColor(GetMainColor());
+ }
+ gReve->Redraw3D();
+ gReve->NotifyBrowser();
+}
+
+/**************************************************************************/
+
+void RenderElement::SpawnEditor()
+{
+ // Here spawn a sub-class of TGedFrame with special UpdateMethod.
+ gReve->EditRenderElement(this);
+}
+
+void RenderElement::ExportToCINT(Text_t* var_name)
+{
+ static const Exc_t eH("RenderElement::ExportToCINT ");
+
+ TObject* obj = GetObject(eH);
+ const char* cname = obj->IsA()->GetName();
+ gROOT->ProcessLine(Form("%s* %s = (%s*) %p;", cname, var_name, cname, obj));
+}
+
+/**************************************************************************/
+/*
+void RenderElement::DumpSourceObject()
+{
+ TObject* o = GetSourceObject();
+ if(o == 0) {
+ printf("Source object not set.\n");
+ } else {
+ o->Dump();
+ }
+}
+
+void RenderElement::InspectSourceObject()
+{
+ TObject* o = GetSourceObject();
+ if(o == 0) {
+ printf("Source object not set.\n");
+ } else {
+ o->Inspect();
+ }
+}
+*/
+/**************************************************************************/
+
+void RenderElement::SetRnrElement(Bool_t rnr)
+{
+ if(rnr != fRnrElement) {
+ fRnrElement = rnr;
+ FullUpdate();
+ }
+}
+/**************************************************************************/
+
+void RenderElement::SetMainColor(Color_t color)
+{
+ if (fMainColorPtr) {
+ *fMainColorPtr = color;
+ FullUpdate();
+ }
+}
+
+void RenderElement::SetMainColorByPixel(Pixel_t pixel)
+{
+ SetMainColor(Color_t(TColor::GetColor(pixel)));
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+ClassImp(RenderElementListBase)
+
+Int_t RenderElementListBase::ExpandIntoListTree(TGListTree* ltree,
+ TGListTreeItem* parent)
+{
+ // Populates parent with elements.
+ // parent must be an already existing representation of *this*.
+ // Returns number of inserted elements.
+ // If parent already has children, it does nothing.
+ //
+ // RnrEl can be inserted in a list-tree several times, thus we can not
+ // search through fItems to get parent here.
+ // Anyhow, it is probably known as it must have been selected by the user.
+
+ if(parent->GetFirstChild() != 0)
+ return 0;
+ Int_t n = 0;
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ (*i)->AddIntoListTree(ltree, parent);
+ ++n;
+ }
+ return n;
+}
+
+/**************************************************************************/
+
+void RenderElementListBase::EnableListElements()
+{
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i)
+ (*i)->SetRnrElement(true);
+}
+
+void RenderElementListBase::DisableListElements()
+{
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i)
+ (*i)->SetRnrElement(false);
+}
+
+/**************************************************************************/
+
+void RenderElementListBase::SetMainColor(Color_t col)
+{
+ Color_t oldcol = GetMainColor();
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ if((*i)->GetMainColor() == oldcol) (*i)->SetMainColor(col);
+ }
+ RenderElement::SetMainColor(col);
+}
+
+void RenderElementListBase::SetMainColor(Pixel_t pixel)
+{
+ // This one needed for proper calling via CINT (signals).
+
+ SetMainColor(Color_t(TColor::GetColor(pixel)));
+}
+
+/**************************************************************************/
+
+void RenderElementListBase::PaintElements(Option_t* option)
+{
+ if(fRnrElement) {
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ if((*i)->GetRnrElement())
+ (*i)->GetObject()->Paint(option);
+ }
+ }
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+ClassImp(RenderElementList)
--- /dev/null
+// $Header$
+
+#ifndef REVE_RenderElement_H
+#define REVE_RenderElement_H
+
+#include <Reve/Reve.h>
+
+#include <TNamed.h>
+#include <TRef.h>
+
+#include <Gtypes.h>
+#include <GuiTypes.h>
+
+#include <list>
+#include <set>
+
+class TGListTree;
+class TGListTreeItem;
+
+namespace Reve {
+
+class RenderElement
+{
+ friend class RGTopFrame;
+
+protected:
+ // TRef fSource;
+
+ Bool_t fRnrElement;
+ Color_t* fMainColorPtr;
+
+ struct ListTreeInfo {
+ TGListTree* fTree;
+ TGListTreeItem* fItem;
+
+ ListTreeInfo() {}
+ ListTreeInfo(TGListTree* lt, TGListTreeItem* lti) : fTree(lt), fItem(lti) {}
+
+ bool operator==(const ListTreeInfo& x) const
+ { return fTree == x.fTree && fItem == x.fItem; }
+ bool operator<(const ListTreeInfo& x) const
+ { return fTree == x.fTree ? fItem < x.fItem : fTree < x.fTree; }
+
+ ClassDef(ListTreeInfo, 0);
+ };
+ typedef std::set<ListTreeInfo> sLTI_t;
+ typedef std::set<ListTreeInfo>::iterator sLTI_i;
+
+ sLTI_t fItems;
+
+public:
+ RenderElement();
+ RenderElement(Color_t& main_color);
+ virtual ~RenderElement() {}
+
+ TObject* GetObject(Reve::Exc_t eh="RenderElement::GetObject ");
+
+ /*
+ TRef& GetSource() { return fSource; }
+ TObject* GetSourceObject() const { return fSource.GetObject(); }
+ void SetSourceObject(TObject* o) { fSource.SetObject(o); }
+
+ void DumpSourceObject(); // *MENU*
+ void InspectSourceObject(); // *MENU*
+ */
+
+ virtual TGListTreeItem* AddIntoListTree(TGListTree* ltree,
+ TGListTreeItem* parent);
+
+ virtual void FullUpdate();
+
+ void SpawnEditor(); // *MENU*
+ void ExportToCINT(Text_t* var_name); // *MENU*
+
+ virtual Bool_t CanEditRnrElement() { return true; }
+ virtual Bool_t GetRnrElement() const { return fRnrElement; }
+ virtual void SetRnrElement(Bool_t rnr);
+
+ virtual Bool_t CanEditMainColor() { return false; }
+ Color_t* GetMainColorPtr() { return fMainColorPtr; }
+ void SetMainColorPtr(Color_t* color) { fMainColorPtr = color; }
+
+ virtual Color_t GetMainColor() const { return fMainColorPtr ? *fMainColorPtr : 0; }
+ virtual void SetMainColor(Color_t color);
+ void SetMainColorByPixel(Pixel_t pixel);
+
+ ClassDef(RenderElement, 1);
+}; // endclass Reve
+
+/**************************************************************************/
+
+class RenderElementListBase : public RenderElement
+{
+protected:
+ typedef std::list<RenderElement*> lpRE_t;
+ typedef std::list<RenderElement*>::iterator lpRE_i;
+
+ lpRE_t fList;
+
+ void PaintElements(Option_t* option="");
+
+public:
+ RenderElementListBase() {}
+ RenderElementListBase(Color_t& col) : RenderElement(col) {}
+
+ virtual void AddElement(RenderElement* el) { fList.push_back(el); }
+
+ virtual Int_t ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent);
+
+ void EnableListElements(); // *MENU*
+ void DisableListElements(); // *MENU*
+
+ virtual void SetMainColor(Color_t color);
+ virtual void SetMainColor(Pixel_t pixel);
+
+ ClassDef(RenderElementListBase, 1);
+};
+
+/**************************************************************************/
+
+class RenderElementList : public TNamed, public RenderElementListBase
+{
+protected:
+ Color_t fColor;
+
+public:
+ RenderElementList(const Text_t* n="RenderElementList", const Text_t* t="") :
+ TNamed(n, t), RenderElementListBase(fColor), fColor(0)
+ {}
+
+ virtual Bool_t CanEditMainColor() { return true; }
+
+ virtual void Paint(Option_t* option = "") { PaintElements(option); }
+
+ ClassDef(RenderElementList, 1);
+};
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "RenderElementEditor.h"
+#include <Reve/RenderElement.h>
+
+#include <TVirtualPad.h>
+#include <TColor.h>
+
+#include <TGLabel.h>
+#include <TGButton.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+#include <TGDoubleSlider.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// RenderElementEditor
+//
+
+ClassImp(RenderElementEditor)
+
+RenderElementEditor::RenderElementEditor(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+ UInt_t options, Pixel_t back) :
+ TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+{
+ fRE = 0;
+ MakeTitle("RenderElement");
+
+ fHFrame = new TGHorizontalFrame(this);
+
+ fMainColor = new TGColorSelect(fHFrame, 0, -1);
+ fHFrame->AddFrame(fMainColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fMainColor->Associate(fHFrame);
+ fMainColor->Connect
+ ("ColorSelected(Pixel_t)",
+ "Reve::RenderElementEditor", this, "DoMainColor(Pixel_t)");
+
+ fRnrElement = new TGCheckButton(fHFrame, "Render element");
+ fHFrame->AddFrame(fRnrElement, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fRnrElement->Connect
+ ("Toggled(Bool_t)",
+ "Reve::RenderElementEditor", this, "DoRnrElement()");
+
+ AddFrame(fHFrame, new TGLayoutHints(kLHintsTop, 0, 0, 1, 1));
+
+ // Register the editor.
+ TClass *cl = RenderElement::Class();
+ TGedElement *ge = new TGedElement;
+ ge->fGedFrame = this;
+ ge->fCanvas = 0;
+ cl->GetEditorList()->Add(ge);
+}
+
+RenderElementEditor::~RenderElementEditor()
+{}
+
+/**************************************************************************/
+
+void RenderElementEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
+{
+ fModel = 0;
+ fPad = 0;
+
+ if (!obj || !obj->InheritsFrom(RenderElement::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
+ SetActive(kFALSE);
+ return;
+ }
+
+ fModel = obj;
+ fPad = pad;
+
+ fRE = dynamic_cast<RenderElement*>(fModel);
+
+ if (fRE->CanEditRnrElement()) {
+ fRnrElement->SetState(fRE->GetRnrElement() ? kButtonDown : kButtonUp);
+ fRnrElement->MapWindow();
+ } else {
+ fRnrElement->UnmapWindow();
+ }
+
+ if (fRE->CanEditMainColor()) {
+ fMainColor->SetColor(TColor::Number2Pixel(fRE->GetMainColor()), kFALSE);
+ fMainColor->MapWindow();
+ } else {
+ fMainColor->UnmapWindow();
+ }
+
+ fHFrame->Layout();
+
+ SetActive();
+}
+
+/**************************************************************************/
+
+
+void RenderElementEditor::DoRnrElement()
+{
+ Bool_t fd = fRnrElement->IsOn();
+ fRE->SetRnrElement(fd);
+ Update();
+}
+
+void RenderElementEditor::DoMainColor(Pixel_t color)
+{
+ // Slot connected to the axis color.
+
+ fRE->SetMainColor(color);
+ Update();
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_RenderElementEditor_H
+#define REVE_RenderElementEditor_H
+
+#include <TGedFrame.h>
+
+class TGCheckButton;
+class TGNumberEntry;
+class TGColorSelect;
+
+namespace Reve {
+
+class RenderElement;
+
+class RenderElementEditor : public TGedFrame
+{
+protected:
+ RenderElement* fRE; // fModel dynamic-casted to RenderElementEditor
+
+ TGHorizontalFrame* fHFrame;
+ TGCheckButton* fRnrElement;
+ TGColorSelect* fMainColor;
+
+public:
+ RenderElementEditor(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+ ~RenderElementEditor();
+
+ virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
+
+ void DoRnrElement();
+ void DoMainColor(Pixel_t color);
+
+ ClassDef(RenderElementEditor, 1); // Editor for RenderElement
+}; // endclass RenderElementEditor
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "Reve.h"
+
+#include <TError.h>
+#include <TPad.h>
+#include <TGeoManager.h>
+
+#include <TROOT.h>
+
+#include <list>
+
+#include <iostream>
+
+//______________________________________________________________________
+// Reve
+//
+
+namespace Reve {
+
+Exc_t operator+(const Exc_t &s1, const std::string &s2)
+{ return Exc_t((std::string&)s1 + s2); }
+
+Exc_t operator+(const Exc_t &s1, const TString &s2)
+{ return Exc_t((std::string&)s1 + s2.Data()); }
+
+Exc_t operator+(const Exc_t &s1, const char *s2)
+{ return Exc_t((std::string&)s1 + s2); }
+
+
+void WarnCaller(const TString& warning)
+{
+ std::cout << "WRN: " << warning << std::endl;
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void SetupEnvironment()
+{
+ // Check REVESYS exists, try fallback to $ALICE_ROOT/EVE.
+
+ static const Exc_t eH("Reve::SetupEnvironment");
+
+ if(gSystem->Getenv("REVESYS") == 0) {
+ if(gSystem->Getenv("ALICE_ROOT") != 0) {
+ Info(eH.Data(), "setting REVESYS from ALICE_ROOT.");
+ gSystem->Setenv("REVESYS", Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
+ } else {
+ Error(eH.Data(), "REVESYS not defined, neither is ALICE_ROOT.");
+ gSystem->Exit(1);
+ }
+ }
+ if(gSystem->AccessPathName(gSystem->Getenv("REVESYS")) == kTRUE) {
+ Error(eH.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS"));
+ gSystem->Exit(1);
+ }
+}
+
+/**************************************************************************/
+
+namespace {
+ void ChompTail(TString& s, char c='.') {
+ Ssiz_t p = s.Last(c);
+ if(p != kNPOS)
+ s.Remove(p);
+ }
+}
+
+void AssertMacro(const Text_t* mac)
+{
+ // Load and execute macro 'mac' if it has not been loaded yet.
+
+ TString foo(mac); ChompTail(foo);
+ if(gROOT->GetGlobalFunction(foo.Data(), 0, true) == 0) {
+ gROOT->Macro(mac);
+ }
+}
+
+void Macro(const Text_t* mac)
+{
+ // Execute macro 'mac'. Do not reload the macro.
+
+ TString foo(mac); ChompTail(foo);
+ if(gROOT->GetGlobalFunction(foo.Data(), 0, true) == 0)
+ gROOT->LoadMacro(mac);
+
+ foo += "()";
+ gROOT->ProcessLine(foo.Data());
+}
+
+void LoadMacro(const Text_t* mac)
+{
+ // Makes sure that macro 'mac' is loaded, but do not reload it.
+
+ TString foo(mac); ChompTail(foo);
+ if(gROOT->GetGlobalFunction(foo.Data(), 0, true) == 0)
+ gROOT->LoadMacro(mac);
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+// Pad stack for RINT/GUI thread.
+std::list<TVirtualPad*> s_Pad_Stack;
+
+TVirtualPad* PushPad(TVirtualPad* new_gpad, Int_t subpad)
+{
+ // printf("Reve::PushPad old=%p, new=%p\n", gPad, new_gpad);
+ s_Pad_Stack.push_back(gPad);
+ if(new_gpad != 0)
+ new_gpad->cd(subpad);
+ else
+ gPad = 0;
+ return gPad;
+}
+
+TVirtualPad* PopPad(Bool_t modify_update_p)
+{
+ // printf("Reve::PopPad old=%p, new=%p\n", gPad, s_Pad_Stack.empty() ? 0 : s_Pad_Stack.back());
+ if(s_Pad_Stack.empty()) {
+ Warning("Reve::PopTPad", "stack empty.");
+ } else {
+ if(modify_update_p && gPad != 0) {
+ gPad->Modified();
+ gPad->Update();
+ }
+ gPad = s_Pad_Stack.back();
+ s_Pad_Stack.pop_back();
+ }
+ return gPad;
+}
+
+/**************************************************************************/
+//
+/**************************************************************************/
+
+GeoManagerHolder::GeoManagerHolder(TGeoManager* new_gmgr) :
+ fManager(gGeoManager)
+{
+ gGeoManager = new_gmgr;
+}
+
+GeoManagerHolder::~GeoManagerHolder()
+{
+ gGeoManager = fManager;
+}
+
+
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_Reve_H
+#define REVE_Reve_H
+
+#include <string>
+#include <TString.h>
+
+inline bool operator==(const TString& t, const std::string& s)
+{ return (s == t.Data()); }
+
+inline bool operator==(const std::string& s, const TString& t)
+{ return (s == t.Data()); }
+
+class TVirtualPad;
+class TGeoManager;
+
+namespace Reve {
+
+class Exc_t : public std::string
+{
+ public:
+ Exc_t() {}
+ Exc_t(const std::string& s) : std::string(s) {}
+ Exc_t(const char* s) : std::string(s) {}
+
+ virtual ~Exc_t() {}
+
+ const char* Data() const { return c_str(); }
+
+ ClassDef(Reve::Exc_t, 1);
+};
+
+Exc_t operator+(const Exc_t &s1, const std::string &s2);
+Exc_t operator+(const Exc_t &s1, const TString &s2);
+Exc_t operator+(const Exc_t &s1, const char *s2);
+
+void WarnCaller(const TString& warning);
+
+/**************************************************************************/
+/**************************************************************************/
+
+void SetupEnvironment();
+
+void AssertMacro(const Text_t* mac);
+void Macro(const Text_t* mac);
+void LoadMacro(const Text_t* mac);
+
+/**************************************************************************/
+/**************************************************************************/
+
+TVirtualPad* PushPad(TVirtualPad* new_gpad=0, Int_t subpad=0);
+TVirtualPad* PopPad(Bool_t modify_update_p=false);
+
+class PadHolder
+{
+private:
+ Bool_t fModifyUpdateP;
+public:
+ PadHolder(Bool_t modify_update_p, TVirtualPad* new_gpad=0, Int_t subpad=0) :
+ fModifyUpdateP(modify_update_p)
+ { PushPad(new_gpad, subpad); }
+
+ virtual ~PadHolder() { PopPad(fModifyUpdateP); }
+
+ ClassDef(PadHolder, 0);
+};
+
+class GeoManagerHolder
+{
+private:
+ TGeoManager* fManager;
+public:
+ GeoManagerHolder(TGeoManager* new_gmgr=0);
+ virtual ~GeoManagerHolder();
+
+ ClassDef(GeoManagerHolder, 0);
+};
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+//__________________________________________________________________________
+// TTreeTools
+//
+// Collection of classes for TTree interaction.
+
+#include "TTreeTools.h"
+#include <TTree.h>
+#include <TTreeFormula.h>
+
+/**************************************************************************/
+/**************************************************************************/
+
+ClassImp(TSelectorToEventList)
+
+TSelectorToEventList::TSelectorToEventList(TEventList* evl, const Text_t* sel) :
+ TSelectorDraw(), fEvList(evl)
+{
+ fInput.Add(new TNamed("varexp", ""));
+ fInput.Add(new TNamed("selection", sel));
+ SetInputList(&fInput);
+}
+
+Bool_t TSelectorToEventList::Process(Long64_t entry)
+{
+ if(ProcessCut(entry)) { ProcessFill(entry); return true; }
+ return false;
+}
+
+Bool_t TSelectorToEventList::ProcessCut(Long64_t )
+{
+ return GetSelect()->EvalInstance(0) != 0;
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+ClassImp(TTreeQuery)
+
+Int_t TTreeQuery::Select(TTree* t, const Text_t* selection)
+{
+ TSelectorToEventList sel(this, selection);
+ t->Process(&sel, "goff");
+ return GetN();
+}
--- /dev/null
+// $Header
+
+#ifndef REVE_TTreeTools_H
+#define REVE_TTreeTools_H
+
+#include <TSelectorDraw.h>
+#include <TEventList.h>
+
+/**************************************************************************/
+// TSelectorToEventList
+/**************************************************************************/
+
+class TSelectorToEventList : public TSelectorDraw
+{
+protected:
+ TEventList* fEvList;
+ TList fInput;
+public:
+ TSelectorToEventList(TEventList* evl, const Text_t* sel);
+
+ virtual Bool_t Process(Long64_t entry);
+ virtual Bool_t ProcessCut(Long64_t entry);
+ virtual void ProcessFill(Long64_t entry) { fEvList->Enter(entry); }
+
+ ClassDef(TSelectorToEventList, 1)
+};
+
+/**************************************************************************/
+// TTreeQuery
+/**************************************************************************/
+
+class TTreeQuery : public TEventList
+{
+public:
+ TTreeQuery() : TEventList() {}
+
+ Int_t Select(TTree* t, const Text_t* selection);
+
+ ClassDef(TTreeQuery, 1)
+};
+
+/**************************************************************************/
+/**************************************************************************/
+
+#endif
--- /dev/null
+// $Header$
+
+#include "Track.h"
+#include "MCHelixLine.hi"
+
+#include <TPolyLine3D.h>
+#include <TPolyMarker3D.h>
+#include <TColor.h>
+
+// Updates
+#include <Reve/RGTopFrame.h>
+#include <TCanvas.h>
+
+#include <vector>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// Track
+//
+
+ClassImp(Reve::Track)
+
+Track::Track()
+{
+ fRnrStyle = 0;
+}
+
+Track::Track(Reve::MCTrack* t, TrackRnrStyle* rs)
+{
+ fRnrStyle = rs;
+
+ fName = t->GetName();
+ fLineColor = fRnrStyle->GetColor();
+ fMainColorPtr = &fLineColor;
+
+ fV.Set(t->Vx(), t->Vy(), t->Vz());
+ fP.Set(t->Px(), t->Py(), t->Pz());
+ fBeta = t->P()/t->Energy();
+
+ TParticlePDG* pdgp = t->GetPDG();
+ if(pdgp == 0) {
+ t->ResetPdgCode(); pdgp = t->GetPDG();
+ }
+
+ fCharge = (Int_t) pdgp->Charge();
+ fLabel = t->label;
+}
+
+Track::Track(Reve::RecTrack* t, TrackRnrStyle* rs)
+{
+ fRnrStyle = rs;
+ fName = t->GetName();
+ fLineColor = fRnrStyle->GetColor();
+ fMainColorPtr = &fLineColor;
+
+ fV = t->V;
+ fP = t->P;
+ fBeta = t->beta;
+ fCharge = t->sign;
+ fLabel = t->label;
+}
+
+Track::~Track()
+{}
+
+void Track::Reset(Int_t n_points)
+{
+ delete [] TPolyLine3D::fP; TPolyLine3D::fP = 0;
+ fN = n_points;
+ if(fN) TPolyLine3D::fP = new Float_t [3*fN];
+ memset(TPolyLine3D::fP, 0, 3*fN*sizeof(Float_t));
+ fLastPoint = -1;
+}
+
+/**************************************************************************/
+
+void Track::MakeTrack()
+{
+
+ TrackRnrStyle& RS((fRnrStyle != 0) ? *fRnrStyle : TrackRnrStyle::fgDefStyle);
+
+ Float_t px = fP.x, py = fP.y, pz = fP.z;
+
+ MCVertex mc_v0;
+ mc_v0.x = fV.x;
+ mc_v0.y = fV.y;
+ mc_v0.z = fV.z;
+ mc_v0.t = 0;
+
+ std::vector<MCVertex> track_points;
+ Bool_t decay = false;
+
+ if ((TMath::Abs(fV.z) > RS.fMaxZ) || (fV.x*fV.x + fV.y*fV.y > RS.fMaxR*RS.fMaxR))
+ goto make_polyline;
+
+ if (fCharge) { // Charged particle
+
+ Float_t a = 0.2998*RS.fMagField*fCharge/300; // m->cm
+
+ MCHelix helix(fRnrStyle, &mc_v0, TMath::C()*fBeta, &track_points, a); //m->cm
+ helix.Init(TMath::Sqrt(px*px+py*py), pz);
+
+ if(!fPathMarks.empty()){
+ for(std::vector<Reve::PathMark*>::iterator i=fPathMarks.begin(); i!=fPathMarks.end(); ++i) {
+ Reve::PathMark* pm = *i;
+
+ if(RS.fFitDaughters && pm->type == Reve::PathMark::Daughter){
+ if(TMath::Abs(pm->V.z) > RS.fMaxZ
+ || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
+ goto helix_bounds;
+
+ //printf("%s fit daughter \n", fName.Data());
+ helix.LoopToVertex(fP.x, fP.y, fP.z, pm->V.x, pm->V.y, pm->V.z);
+ fP.x -= pm->P.x;
+ fP.y -= pm->P.y;
+ fP.z -= pm->P.z;
+ }
+ if(RS.fFitDecay && pm->type == Reve::PathMark::Decay){
+
+ if(TMath::Abs(pm->V.z) > RS.fMaxZ
+ || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
+ goto helix_bounds;
+ helix.LoopToVertex(fP.x, fP.y, fP.z, pm->V.x, pm->V.y, pm->V.z);
+ decay = true;
+ break;
+ }
+ }
+ }
+ helix_bounds:
+ //go to bounds
+ if(!decay || RS.fFitDecay == false){
+ helix.LoopToBounds(px,py,pz);
+ // printf("%s loop to bounds \n",fName.Data() );
+ }
+
+ } else { // Neutral particle
+
+ MCLine line(fRnrStyle, &mc_v0, TMath::C()*fBeta, &track_points);
+
+ if(!fPathMarks.empty()){
+ for(std::vector<Reve::PathMark*>::iterator i=fPathMarks.begin(); i!=fPathMarks.end(); ++i) {
+ Reve::PathMark* pm = *i;
+
+ if(RS.fFitDaughters && pm->type == Reve::PathMark::Daughter){
+ if(TMath::Abs(pm->V.z) > RS.fMaxZ
+ || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
+ goto line_bounds;
+ line.GotoVertex(pm->V.x, pm->V.y, pm->V.z);
+ fP.x -= pm->P.x;
+ fP.y -= pm->P.y;
+ fP.z -= pm->P.z;
+ }
+
+ if(RS.fFitDecay && pm->type == Reve::PathMark::Decay){
+ if(TMath::Abs(pm->V.z) > RS.fMaxZ
+ || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
+ goto line_bounds;
+ line.GotoVertex(pm->V.x, pm->V.y, pm->V.z);
+ decay = true;
+ break;
+ }
+ }
+ }
+
+ line_bounds:
+ if(!decay || RS.fFitDecay == false)
+ line.GotoBounds(px,py,pz);
+
+ }
+make_polyline:
+ Reset(track_points.size());
+ for(std::vector<MCVertex>::iterator i=track_points.begin(); i!=track_points.end(); ++i)
+ SetNextPoint(i->x, i->y, i->z);
+}
+
+/**************************************************************************/
+
+//______________________________________________________________________
+// TrackRnrStyle
+//
+
+ClassImp(Reve::TrackRnrStyle)
+
+Float_t TrackRnrStyle::fgDefMagField = 0.5;
+TrackRnrStyle TrackRnrStyle::fgDefStyle;
+
+void TrackRnrStyle::Init()
+{
+ fMagField = fgDefMagField;
+
+ fMaxR = 450;
+ fMaxZ = 550;
+
+ fMaxOrbs = 2;
+ fMinAng = 45;
+
+ fFitDaughters = true;
+ fFitDecay = true;
+
+ fDelta = 0.1; //calculate step size depending on helix radius
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+//______________________________________________________________________
+// TrackList
+//
+
+ClassImp(Reve::TrackList)
+
+void TrackList::Init()
+{
+ fMarkerStyle = 6;
+ fMarkerColor = 5;
+ // fMarker->SetMarkerSize(0.05);
+
+ fRnrMarkers = true;
+ fRnrTracks = true;
+
+ mRnrStyle = new TrackRnrStyle;
+ SetMainColorPtr(&mRnrStyle->fColor);
+}
+
+TrackList::TrackList(Int_t n_tracks) :
+ TPolyMarker3D(n_tracks),
+ RenderElementListBase()
+{
+ Init();
+}
+
+TrackList::TrackList(const Text_t* name, Int_t n_tracks) :
+ TPolyMarker3D(n_tracks),
+ RenderElementListBase()
+{
+ Init();
+ SetName(name);
+}
+
+void TrackList::Reset(Int_t n_tracks)
+{
+ delete [] fP; fP = 0;
+ fN = n_tracks;
+ if(fN) fP = new Float_t [3*fN];
+ memset(fP, 0, 3*fN*sizeof(Float_t));
+ fLastPoint = -1;
+}
+
+/**************************************************************************/
+
+void TrackList::Paint(Option_t* option)
+{
+ if(fRnrElement) {
+ if(fRnrMarkers) {
+ TPolyMarker3D::Paint(option);
+ }
+ if(fRnrTracks) {
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ if((*i)->GetRnrElement())
+ (*i)->GetObject()->Paint(option);
+ }
+ }
+ }
+}
+
+/**************************************************************************/
+
+void TrackList::AddElement(RenderElement* el)
+{
+ static const Exc_t eH("TrackList::AddElement ");
+ if (dynamic_cast<Track*>(el) == 0)
+ throw(eH + "new element not a Track.");
+ RenderElementListBase::AddElement(el);
+}
+
+/**************************************************************************/
+
+void TrackList::SetRnrMarkers(Bool_t rnr)
+{
+ fRnrMarkers = rnr;
+ gReve->Redraw3D();
+}
+
+void TrackList::SetRnrTracks(Bool_t rnr)
+{
+
+ fRnrTracks = rnr;
+ gReve->Redraw3D();
+}
+
+/**************************************************************************/
+
+void TrackList::MakeTracks()
+{
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ ((Track*)(*i))->MakeTrack();
+ }
+ gReve->Redraw3D();
+}
+
+
+void TrackList::MakeMarkers()
+{
+ Reset(fList.size());
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ Track& t = *((Track*)(*i));
+ if(t.GetN() > 0)
+ SetNextPoint(t.fV.x, t.fV.y, t.fV.z);
+ }
+ gReve->Redraw3D();
+}
+
+/**************************************************************************/
+/*************************************************************************/
+
+void TrackList::SetMaxR(Float_t x)
+{
+ mRnrStyle->fMaxR = x;
+ MakeTracks();
+ MakeMarkers();
+}
+
+void TrackList::SetMaxZ(Float_t x)
+{
+ mRnrStyle->fMaxZ = x;
+ MakeTracks();
+ MakeMarkers();
+}
+
+void TrackList::SetMaxOrbs(Float_t x)
+{
+ mRnrStyle->fMaxOrbs = x;
+ MakeTracks();
+}
+
+void TrackList::SetMinAng(Float_t x)
+{
+ mRnrStyle->fMinAng = x;
+ MakeTracks();
+}
+
+void TrackList::SetDelta(Float_t x)
+{
+ mRnrStyle->fDelta = x;
+ MakeTracks();
+}
+
+void TrackList::SetFitDaughters(Bool_t x)
+{
+ mRnrStyle->fFitDaughters = x;
+ MakeTracks();
+}
+
+void TrackList::SetFitDecay(Bool_t x)
+{
+ mRnrStyle->fFitDecay = x;
+ MakeTracks();
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void TrackList::SelectByPt(Float_t min_pt, Float_t max_pt)
+{
+ Float_t minptsq = min_pt*min_pt;
+ Float_t maxptsq = max_pt*max_pt;
+ Float_t ptsq;
+
+ for(lpRE_i i=fList.begin(); i!=fList.end(); ++i) {
+ ptsq = ((Track*)(*i))->fP.Perp2();
+ (*i)->SetRnrElement(ptsq >= minptsq && ptsq <= maxptsq);
+ }
+}
+
+/**************************************************************************/
+
+#include <TGFrame.h>
+#include <TGDoubleSlider.h>
+#include <TGXYLayout.h>
+
+void TrackList::MakePtScrollbar()
+{
+ TGMainFrame* mf = new TGMainFrame(gClient->GetRoot(), 320, 60);
+
+ TGDoubleHSlider* hs = new TGDoubleHSlider(mf);
+ hs->SetRange(0.2, 10);
+ hs->SetPosition(0.2, 10);
+ hs->Resize(300, 25);
+ mf->AddFrame(hs, new TGLayoutHints(kLHintsCenterX, 10, 10, 10, 10));
+
+ hs->Connect("PositionChanged()", "Reve::TrackList",
+ this, "HandlePtScrollEvent()");
+
+ mf->SetWindowName("Pt Selector");
+ mf->MapSubwindows();
+ mf->Resize(mf->GetDefaultSize()); // this is used here to init layout algorithm
+ mf->MapWindow();
+}
+
+void TrackList::HandlePtScrollEvent()
+{
+ TGDoubleHSlider* hs = (TGDoubleHSlider*)gTQSender;
+
+ Float_t min = hs->GetMinPosition(), max = hs->GetMaxPosition();
+ printf("hslidor min=%f max=%f\n", min, max);
+ SelectByPt(min, max);
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_Track_H
+#define REVE_Track_H
+
+#include <Reve/PODs.h>
+#include <Reve/RenderElement.h>
+
+#include <TPolyMarker3D.h>
+#include <TPolyLine3D.h>
+
+namespace Reve {
+
+class TrackRnrStyle;
+class TrackList;
+
+class Track : public TPolyLine3D, public RenderElement
+{
+ friend class TrackList;
+
+private:
+ void Init();
+
+protected:
+ Reve::Vector fV;
+ Reve::Vector fP;
+ Double_t fBeta;
+ Int_t fCharge;
+ Int_t fLabel;
+
+ TrackRnrStyle* fRnrStyle;
+
+ TString fName;
+ TString fTitle;
+
+public:
+ Track();
+ Track(Reve::MCTrack* t, TrackRnrStyle* rs);
+ Track(Reve::RecTrack* t, TrackRnrStyle* rs);
+ std::vector<Reve::PathMark*> fPathMarks;
+ virtual ~Track();
+
+ void Reset(Int_t n_points=0);
+
+ virtual void SetLineColor(Color_t col)
+ { SetMainColor(col); }
+
+ virtual void Paint(Option_t* option="")
+ { if(fRnrElement) TPolyLine3D::Paint(option); }
+
+ void MakeTrack();
+
+ TrackRnrStyle* GetRnrStyle() const { return fRnrStyle; }
+
+ virtual const Text_t* GetName() const { return fName; }
+ virtual void SetName(const Text_t* name) { fName = name; }
+
+ virtual const Text_t* GetTitle() const { return fTitle; }
+ virtual void SetTitle(const Text_t* title) { fTitle = title; }
+
+ Int_t GetLabel() const { return fLabel; }
+
+ ClassDef(Track, 1);
+}; // endclass Track
+
+
+/**************************************************************************/
+// TrackRnrStyle
+/**************************************************************************/
+
+// This is decoupled from Track/TrackList to allow sharing of the
+// RnrStyle among several instances. The interface is half cooked and
+// there is no good way to set RnrStyle after the object has been
+// created (shouldn't be too hard to fix).
+//
+// TrackList has Get/Set methods for RnrStlye and
+// TrackListEditor provides editor access to them.
+
+class TrackRnrStyle : public TObject
+{
+private:
+ void Init();
+
+public:
+ Color_t fColor;
+ Float_t fMagField;
+ // track limits
+ Float_t fMaxR;
+ Float_t fMaxZ;
+ // helix limits
+ Float_t fMaxOrbs; // Maximal angular path of tracks' orbits (1 ~ 2Pi).
+ Float_t fMinAng; // Minimal angular step between two helix points.
+ Float_t fDelta; // Maximal error at the mid-point of the line connecting to helix points.
+
+ Bool_t fFitDaughters;
+ Bool_t fFitDecay;
+
+ TrackRnrStyle() { Init(); }
+
+ void SetColor(Color_t c) { fColor = c; }
+ Color_t GetColor() const { return fColor; }
+
+ static Float_t fgDefMagField;
+ static TrackRnrStyle fgDefStyle;
+
+ ClassDef(TrackRnrStyle, 1);
+}; // endclass TrackRnrStyle
+
+
+/**************************************************************************/
+// TrackList
+/**************************************************************************/
+
+class TrackList : public TPolyMarker3D, public RenderElementListBase
+{
+private:
+ void Init();
+
+protected:
+ TString fTitle;
+
+ TrackRnrStyle* mRnrStyle;
+
+ Bool_t fRnrMarkers;
+ Bool_t fRnrTracks;
+
+public:
+ TrackList(Int_t n_tracks=0);
+ TrackList(const Text_t* name, Int_t n_tracks=0);
+
+ void Reset(Int_t n_tracks=0);
+
+ virtual const Text_t* GetTile() const { return fTitle; }
+ virtual void SetTitle(const Text_t* t) { fTitle = t; }
+
+ virtual Bool_t CanEditMainColor() { return true; }
+
+ virtual void Paint(Option_t* option="");
+
+ virtual void AddElement(RenderElement* el);
+
+ void SetRnrStyle(TrackRnrStyle* rst) { mRnrStyle= rst; }
+ TrackRnrStyle* GetRnrStyle() { return mRnrStyle; }
+
+ Bool_t GetRnrTracks() const { return fRnrTracks; }
+ void SetRnrTracks(Bool_t);
+
+ Bool_t GetRnrMarkers() const { return fRnrMarkers; }
+ void SetRnrMarkers(Bool_t);
+
+ void MakeTracks();
+ void MakeMarkers();
+
+ Float_t GetMaxR() const { return mRnrStyle->fMaxZ; }
+ Float_t GetMaxZ() const { return mRnrStyle->fMaxR; }
+ Float_t GetMaxOrbs() const { return mRnrStyle->fMaxOrbs; }
+ Float_t GetMinAng() const { return mRnrStyle->fMinAng; }
+ Float_t GetDelta() const { return mRnrStyle->fDelta; }
+ Bool_t GetFitDaughters() const { return mRnrStyle->fFitDaughters; }
+ Bool_t GetFitDecay() const { return mRnrStyle->fFitDecay; }
+
+ void SetMaxR(Float_t x);
+ void SetMaxZ(Float_t x);
+ void SetMaxOrbs(Float_t x);
+ void SetMinAng(Float_t x);
+ void SetDelta(Float_t x);
+ void SetFitDaughters(Bool_t x);
+ void SetFitDecay(Bool_t x);
+
+
+ // void UpdateBounds();
+ Int_t GetNTracks() { return fN; }
+
+ void SelectByPt(Float_t min_pt=0.2, Float_t max_pt=10); // *MENU*
+
+ void MakePtScrollbar(); // *MENU*
+ void HandlePtScrollEvent();
+
+ ClassDef(TrackList, 1);
+};
+
+
+} // namespace Reve
+
+#endif
--- /dev/null
+// $Header$
+
+#include "TrackEditors.h"
+#include <Reve/Track.h>
+
+#include <TVirtualPad.h>
+#include <TColor.h>
+
+#include <TGLabel.h>
+#include <TGButton.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+#include <TGDoubleSlider.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// TrackListEditor
+//
+
+ClassImp(TrackListEditor)
+
+TrackListEditor::TrackListEditor(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+ UInt_t options, Pixel_t back) :
+ TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+{
+ fTC = 0;
+ MakeTitle("TrackList");
+
+ // --- Limits
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "Max R:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 25, 2, 1, 1));
+ fMaxR = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESRealOne, TGNumberFormat::kNEAPositive,
+ TGNumberFormat::kNELLimitMinMax, 0.1, 2000.0);
+ fMaxR->GetNumberEntry()->SetToolTipText("Maximum radius to which the tracks will be drawn.");
+ f->AddFrame(fMaxR, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fMaxR->Associate(f);
+ fMaxR->Connect("ValueSet(Long_t)", "Reve::TrackListEditor", this, "DoMaxR()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "Max Z:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 24, 2, 1, 1));
+ fMaxZ = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESRealOne, TGNumberFormat::kNEAPositive,
+ TGNumberFormat::kNELLimitMinMax, 0.1, 2000.0);
+ fMaxZ->GetNumberEntry()->SetToolTipText("Maximum z-coordinate to which the tracks will be drawn.");
+ f->AddFrame(fMaxZ, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fMaxZ->Associate(f);
+ fMaxZ->Connect("ValueSet(Long_t)", "Reve::TrackListEditor", this, "DoMaxZ()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "Max Orbits:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsTop | kLHintsCenterY, 0, 2, 1, 1));
+ fMaxOrbits = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESRealOne, TGNumberFormat::kNEAPositive,
+ TGNumberFormat::kNELLimitMinMax, 0.1, 100.0);
+ fMaxOrbits->GetNumberEntry()->SetToolTipText("Maximal angular path of tracks' orbits (1 ~ 2Pi).");
+ f->AddFrame(fMaxOrbits, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fMaxOrbits->Associate(f);
+ fMaxOrbits->Connect("ValueSet(Long_t)", "Reve::TrackListEditor", this, "DoMaxOrbits()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "Min Angle:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsTop | kLHintsCenterY, 3, 2, 1, 1));
+ fMinAng = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESRealOne, TGNumberFormat::kNEAPositive,
+ TGNumberFormat::kNELLimitMinMax, 1, 180.0);
+ fMinAng->GetNumberEntry()->SetToolTipText("Minimal angular step between two helix points.");
+ f->AddFrame(fMinAng, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fMinAng->Associate(f);
+ fMinAng->Connect("ValueSet(Long_t)", "Reve::TrackListEditor", this, "DoMinAng()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ TGLabel *l = new TGLabel(f, "Delta:");
+ f->AddFrame(l, new TGLayoutHints(kLHintsTop | kLHintsCenterY, 32, 2, 1, 1));
+ fDelta = new TGNumberEntry(f, 0., 6, -1,
+ TGNumberFormat::kNESRealOne, TGNumberFormat::kNEAPositive,
+ TGNumberFormat::kNELLimitMinMax, 0.001, 100.0);
+ fDelta->GetNumberEntry()->SetToolTipText("Maximal error at the mid-point of the line connecting to helix points.");
+ f->AddFrame(fDelta, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
+ fDelta->Associate(f);
+ fDelta->Connect("ValueSet(Long_t)", "Reve::TrackListEditor", this, "DoDelta()");
+ AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+ }
+
+ // --- Rendering control
+
+ fRnrTracks = new TGCheckButton(this, "Render tracks");
+ AddFrame(fRnrTracks, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fRnrTracks->Connect
+ ("Toggled(Bool_t)",
+ "Reve::TrackListEditor", this, "DoRnrTracks()");
+
+ fRnrMarkers = new TGCheckButton(this, "Render markers");
+ AddFrame(fRnrMarkers, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fRnrMarkers->Connect
+ ("Toggled(Bool_t)",
+ "Reve::TrackListEditor", this, "DoRnrMarkers()");
+
+ // --- Kinematics fitting
+
+ fFitDaughters = new TGCheckButton(this, "Fit daughters");
+ AddFrame(fFitDaughters, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fFitDaughters->Connect("Toggled(Bool_t)","Reve::TrackListEditor", this, "DoFitDaughters()");
+
+ fFitDecay = new TGCheckButton(this, "Fit decay");
+ AddFrame(fFitDecay, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+ fFitDecay->Connect("Toggled(Bool_t)","Reve::TrackListEditor", this, "DoFitDecay()");
+
+ // --- Selectors
+
+ TGDoubleHSlider* hs = new TGDoubleHSlider(this);
+ hs->SetRange(0.1, 10);
+ hs->SetPosition(0.1, 10);
+ hs->Resize(260, 20);
+ AddFrame(hs, new TGLayoutHints(kLHintsLeft, 0, 5));
+ hs->Connect("PositionChanged()", "Reve::TrackListEditor",
+ this, "DoPtScroll()");
+
+
+ // Register the editor.
+ TClass *cl = TrackList::Class();
+ TGedElement *ge = new TGedElement;
+ ge->fGedFrame = this;
+ ge->fCanvas = 0;
+ cl->GetEditorList()->Add(ge);
+}
+
+TrackListEditor::~TrackListEditor()
+{}
+
+/**************************************************************************/
+
+void TrackListEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
+{
+ fModel = 0;
+ fPad = 0;
+
+ if (!obj || !obj->InheritsFrom(TrackList::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
+ SetActive(kFALSE);
+ return;
+ }
+
+ fModel = obj;
+ fPad = pad;
+
+ fTC = dynamic_cast<TrackList*>(fModel);
+
+ fMaxR->SetNumber(fTC->GetMaxR());
+ fMaxZ->SetNumber(fTC->GetMaxZ());
+ fMaxOrbits->SetNumber(fTC->GetMaxOrbs());
+ fMinAng->SetNumber(fTC->GetMinAng());
+ fDelta->SetNumber(fTC->GetDelta());
+
+ fRnrTracks->SetState(fTC->GetRnrTracks() ? kButtonDown : kButtonUp);
+ fRnrMarkers->SetState(fTC->GetRnrMarkers() ? kButtonDown : kButtonUp);
+
+ fFitDaughters->SetState(fTC->GetFitDaughters() ? kButtonDown : kButtonUp);
+ fFitDecay->SetState(fTC->GetFitDecay() ? kButtonDown : kButtonUp);
+
+ SetActive();
+}
+
+/**************************************************************************/
+
+void TrackListEditor::DoMaxR()
+{
+ Double_t maxr = fMaxR->GetNumber();
+ fTC->SetMaxR(maxr);
+ Update();
+}
+
+void TrackListEditor::DoMaxZ()
+{
+ fTC->SetMaxZ(fMaxZ->GetNumber());
+ Update();
+}
+
+void TrackListEditor::DoMaxOrbits()
+{
+ fTC->SetMaxOrbs(fMaxOrbits->GetNumber());
+ Update();
+}
+
+void TrackListEditor::DoMinAng()
+{
+ fTC->SetMinAng(fMinAng->GetNumber());
+ Update();
+}
+
+void TrackListEditor::DoDelta()
+{
+ fTC->SetDelta(fDelta->GetNumber());
+ Update();
+}
+
+/**************************************************************************/
+
+void TrackListEditor::DoRnrTracks()
+{
+ fTC->SetRnrTracks(fRnrTracks->IsOn());
+ Update();
+}
+
+void TrackListEditor::DoRnrMarkers()
+{
+ fTC->SetRnrMarkers(fRnrMarkers->IsOn());
+ Update();
+}
+
+/**************************************************************************/
+
+void TrackListEditor::DoFitDaughters()
+{
+ fTC->SetFitDaughters(fFitDaughters->IsOn());
+ Update();
+}
+
+void TrackListEditor::DoFitDecay()
+{
+ fTC->SetFitDecay(fFitDecay->IsOn());
+ Update();
+}
+
+/**************************************************************************/
+
+void TrackListEditor::DoPtScroll()
+{
+ TGDoubleHSlider* hs = (TGDoubleHSlider*)gTQSender;
+
+ Double_t min = hs->GetMinPosition(), max = hs->GetMaxPosition();
+ printf("Track pt range: min=%f max=%f\n", min, max);
+ fTC->SelectByPt(min, max);
+}
--- /dev/null
+// $Header$
+
+#ifndef REVE_TrackEditors_H
+#define REVE_TrackEditors_H
+
+#include <TGedFrame.h>
+
+class TGCheckButton;
+class TGNumberEntry;
+class TGColorSelect;
+
+namespace Reve {
+
+class TrackList;
+
+class TrackListEditor : public TGedFrame
+{
+protected:
+ TrackList* fTC; // fModel dynamic-casted to TrackListEditor
+
+ TGNumberEntry* fMaxR;
+ TGNumberEntry* fMaxZ;
+ TGNumberEntry* fMaxOrbits;
+ TGNumberEntry* fMinAng;
+ TGNumberEntry* fDelta;
+
+ TGCheckButton* fRnrTracks;
+ TGCheckButton* fRnrMarkers;
+
+ TGCheckButton* fFitDaughters;
+ TGCheckButton* fFitDecay;
+
+public:
+ TrackListEditor(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+ ~TrackListEditor();
+
+ virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
+
+ void DoMaxR();
+ void DoMaxZ();
+ void DoMaxOrbits();
+ void DoMinAng();
+ void DoDelta();
+
+ void DoRnrTracks();
+ void DoRnrMarkers();
+
+ void DoFitDaughters();
+ void DoFitDecay();
+
+ void DoPtScroll();
+
+ ClassDef(TrackListEditor, 1); // Editor for TrackList
+}; // endclass TrackListEditor
+
+}
+
+#endif
--- /dev/null
+// $Header$
+
+#include "VSD.h"
+#include <TFile.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// VSD
+//
+
+ClassImp(VSD)
+
+VSD::VSD()
+{
+ mFile = 0;
+ mDirectory = 0;
+ InitTreeVars();
+}
+
+VSD::VSD(const Text_t* , const Text_t* )
+{
+ mFile = 0;
+ mDirectory = 0;
+ InitTreeVars();
+}
+
+void VSD::InitTreeVars()
+{
+ fBuffSize = 128*1024;
+
+ mTreeK = 0;
+ //mTreeTR = 0;
+ mTreeH = 0;
+ mTreeC = 0;
+ mTreeR = 0;
+ mTreeKK = 0;
+ mTreeV0 = 0;
+ mTreeGI = 0;
+
+ mpK = &mK;
+ mpH = &mH;
+ mpC = &mC;
+ mpV0 = &mV0;
+ mpKK = &mKK;
+ mpR = &mR;
+ mpGI = &mGI;
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void VSD::SetDirectory(TDirectory* dir)
+{
+ mDirectory = dir;
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void VSD::CreateTrees()
+{
+ mDirectory->cd();
+ // TR missing ...
+ mTreeK = new TTree("Kinematics", "Simulated tracks.");
+ mTreeH = new TTree("Hits", "Combined detector hits.");
+ mTreeC = new TTree("Clusters", "Reconstructed clusters.");
+ mTreeR = new TTree("RecTracks", "Reconstructed tracks.");
+ mTreeKK = new TTree("RecKinks", "Reconstructed kinks.");
+ mTreeV0 = new TTree("RecV0s", "Reconstructed V0s.");
+ mTreeGI = new TTree("GenInfo", "Objects prepared for cross query.");
+}
+
+void VSD::DeleteTrees()
+{
+ delete mTreeK; mTreeK = 0;
+ // delete mTreeTR; mTreeTR = 0;
+ delete mTreeH; mTreeH = 0;
+ delete mTreeC; mTreeC = 0;
+ delete mTreeR; mTreeR = 0;
+ delete mTreeV0; mTreeV0 = 0;
+ delete mTreeKK; mTreeKK = 0;
+ delete mTreeGI; mTreeGI = 0;
+}
+
+void VSD::CreateBranches()
+{
+ // TR missing ...
+ if(mTreeK)
+ mTreeK ->Branch("K", "Reve::MCTrack", &mpK, fBuffSize);
+ if(mTreeH)
+ mTreeH ->Branch("H", "Reve::Hit", &mpH, fBuffSize);
+ if(mTreeC)
+ mTreeC ->Branch("C", "Reve::Cluster", &mpC, fBuffSize);
+ if(mTreeR)
+ mTreeR ->Branch("R", "Reve::RecTrack", &mpR, fBuffSize);
+ if(mTreeKK)
+ mTreeKK->Branch("KK", "Reve::RecKink", &mpKK, fBuffSize);
+ if(mTreeV0)
+ mTreeV0->Branch("V0", "Reve::RecV0", &mpV0, fBuffSize);
+
+ if(mTreeGI) {
+ mTreeGI->Branch("GI", "Reve::GenInfo", &mpGI, fBuffSize);
+ mTreeGI->Branch("K.", "Reve::MCTrack", &mpK);
+ mTreeGI->Branch("R.", "Reve::RecTrack", &mpR);
+ }
+}
+
+void VSD::SetBranchAddresses()
+{
+ // TR missing ...
+ if(mTreeK)
+ mTreeK ->SetBranchAddress("K", &mpK);
+ if(mTreeH)
+ mTreeH ->SetBranchAddress("H", &mpH);
+ if(mTreeC)
+ mTreeC ->SetBranchAddress("C", &mpC);
+ if(mTreeR)
+ mTreeR ->SetBranchAddress("R", &mpR);
+ if(mTreeKK)
+ mTreeKK->SetBranchAddress("KK", &mpKK);
+ if(mTreeV0)
+ mTreeV0->SetBranchAddress("V0", &mpV0);
+
+ if(mTreeGI) {
+ mTreeGI->SetBranchAddress("GI", &mpGI);
+ mTreeGI->SetBranchAddress("K.", &mpK);
+ mTreeGI->SetBranchAddress("R.", &mpR);
+ }
+}
+
+void VSD::WriteTrees()
+{
+ // Does nothing here ...
+}
+
+/**************************************************************************/
+/**************************************************************************/
+
+void VSD::LoadTrees()
+{
+ static const Exc_t eH("VSD::LoadTrees ");
+
+ if(mDirectory == 0)
+ throw(eH + "directory not set.");
+
+ printf("Reading kinematics.\n");
+ mTreeK = (TTree*) mDirectory->Get("Kinematics");
+ if(mTreeK == 0) {
+ printf("%s Kinematics not available in mDirectory %s.\n",
+ eH.Data(), mDirectory->GetName());
+ }
+
+ printf("Reading hits.\n");
+ mTreeH = (TTree*) mDirectory->Get("Hits");
+ if(mTreeH == 0) {
+ printf("%s Hits not available in mDirectory %s.\n",
+ eH.Data(), mDirectory->GetName());
+ }
+
+ printf("Reading clusters.\n");
+ mTreeC = (TTree*) mDirectory->Get("Clusters");
+ if(mTreeC == 0) {
+ printf("%s Clusters not available in mDirectory %s.\n",
+ eH.Data(), mDirectory->GetName());
+ }
+
+ printf("Reading reconstructed tracks.\n");
+ mTreeR = (TTree*) mDirectory->Get("RecTracks");
+ if(mTreeR == 0) {
+ printf("%s RecTracks not available in mDirectory %s.\n",
+ eH.Data(), mDirectory->GetName());
+ }
+
+ printf("Reading reconstructed kinks. \n");
+ mTreeKK = (TTree*) mDirectory->Get("RecKinks");
+ if(mTreeKK == 0) {
+ printf("%s Kinks not available in mDirectory %s.\n",
+ eH.Data(), mDirectory->GetName());
+ }
+
+ printf("Reading Reconstructed V0s.\n");
+ mTreeV0 = (TTree*) mDirectory->Get("RecV0s");
+ if(mTreeV0 == 0) {
+ printf("%s V0 not available in mDirectory %s.\n",
+ eH.Data(), mDirectory->GetName());
+ }
+
+ printf("Reading GenInfo.\n");
+ mTreeGI = (TTree*)mDirectory->Get("GenInfo");
+ if(mTreeGI == 0) {
+ printf("%s GenInfo not available in mDirectory %s.\n",
+ eH.Data(), mDirectory->GetName());
+ }
+
+}
+
+void VSD::LoadVSD(const Text_t* vsd_file_name, const Text_t* dir_name)
+{
+ static const Exc_t eH("VSD::LoadVSD ");
+
+ mFile = TFile::Open(vsd_file_name);
+ if(mFile == 0)
+ throw(eH + "can not open VSD file '" + vsd_file_name + "'.");
+
+ mDirectory = (TDirectory*) mFile->Get(dir_name);
+ if(mDirectory == 0)
+ throw(eH + "directory '" + dir_name + "' not found in VSD file '" + vsd_file_name + "'.");
+ printf("%p\n", (void*)mDirectory);
+ LoadTrees();
+ SetBranchAddresses();
+}
+
+/**************************************************************************/
+/**************************************************************************/
--- /dev/null
+// $Header$
+
+#ifndef REVE_VSD_H
+#define REVE_VSD_H
+
+#include "Reve.h"
+#include "PODs.h"
+#include <TTree.h>
+
+namespace Reve {
+
+class VSDTree : public TTree
+{
+public:
+ ClassDef(VSDTree, 1);
+};
+
+class VSD : public TObject
+{
+protected:
+ Int_t fBuffSize;
+
+ TFile* mFile; //!
+ TDirectory* mDirectory; //!
+
+public:
+ TTree* mTreeK; //! X{g}
+ //TTree* mTreeTR; //! X{g}
+ TTree* mTreeH; //! X{g}
+ TTree* mTreeC; //! X{g}
+ TTree* mTreeR; //! X{g}
+ TTree* mTreeKK; //! X{g}
+ TTree* mTreeV0; //! X{g}
+ TTree* mTreeGI; //! X{g}
+
+ MCTrack mK, *mpK; //!
+ //MCTrackRef mTR, *mpTR; //!
+ Hit mH, *mpH; //!
+ Cluster mC, *mpC; //!
+ RecTrack mR, *mpR; //!
+ RecKink mKK, *mpKK; //!
+ RecV0 mV0, *mpV0; //!
+ GenInfo mGI, *mpGI; //!
+
+public:
+ VSD();
+ VSD(const Text_t* name, const Text_t* title="");
+ virtual void InitTreeVars();
+
+ virtual void SetDirectory(TDirectory* dir);
+
+ virtual void CreateTrees();
+ virtual void DeleteTrees();
+
+ virtual void CreateBranches();
+ virtual void SetBranchAddresses();
+
+ virtual void WriteTrees();
+ virtual void LoadTrees();
+
+ virtual void LoadVSD(const Text_t* vsd_file_name,
+ const Text_t* dir_name="Event0");
+
+ ClassDef(VSD, 1);
+}; // endclass VSD
+
+}
+
+#endif
--- /dev/null
+
+#include "VSDSelector.h"
+#include "RGTopFrame.h"
+
+#include <Reve/Track.h>
+#include <Reve/PointSet.h>
+
+#include <Reve/PODs.h>
+#include <Reve/TTreeTools.h>
+
+#include <TEventList.h>
+#include <TGLabel.h>
+#include <TGXYLayout.h>
+#include <TGClient.h>
+
+using namespace Reve;
+
+using Reve::Exc_t;
+
+VSDSelector::VSDSelector(TGListTree* lt, TGCompositeFrame *tFrame)
+{
+ fListTree = lt;
+
+ //create gui
+ TGGroupFrame *gframe = new TGGroupFrame(tFrame, "Options", kVerticalFrame);
+ TGLayoutHints* lh0 = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY , 5, 5, 5, 5);
+ gframe->SetTitlePos(TGGroupFrame::kRight); // right aligned
+ tFrame->AddFrame(gframe, lh0);
+
+
+ TGXYLayout* xyl = new TGXYLayout(gframe);
+ gframe->SetLayoutManager(xyl);
+ xyl->Layout();
+
+ TGXYLayoutHints* lh;
+ Float_t x,y;
+ y = 0.;
+
+ UInt_t wH = 2;
+ UInt_t labelw = 15;
+ UInt_t entryw = 39;
+ UInt_t butw = 10;
+
+ x = 2.;
+ y = 2.;
+ {
+ // particles
+ TGLabel* label = new TGLabel(gframe, "ParticleSelection");
+ label->Resize(labelw, wH);
+ label->SetTextJustify(kTextLeft | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, labelw, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ gframe->AddFrame(label,lh);
+ x += labelw ;
+
+ mParticleSelection = new TGTextEntry(gframe, "fMother[0] == -1 && Pt() > 1");
+ mParticleSelection->Resize(entryw, wH);
+ lh = new TGXYLayoutHints(x, y, entryw, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ gframe->AddFrame(mParticleSelection,lh);
+ x += entryw+1;
+
+ TGTextButton* but = new TGTextButton(gframe, "Select");
+ but->Resize(butw, wH);
+ but->SetTextJustify(kTextCenterX | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, butw, wH,0); lh->SetPadLeft(4); lh->SetPadRight(2);
+ gframe->AddFrame(but,lh);
+ but->Connect("Pressed()", "Reve::VSDSelector", this, "SelectParticles()");
+
+ UInt_t rbw = 11;
+ x = x + butw + 0.5;
+ fRecursiveSelect = new TGCheckButton(gframe, "Recursive");
+ fRecursiveSelect->Resize(rbw, wH);
+ lh = new TGXYLayoutHints(x, y, rbw, wH,0); lh->SetPadLeft(4); lh->SetPadRight(2);
+ gframe->AddFrame(fRecursiveSelect,lh);
+ }
+ x = 2.;
+ y+= wH; y+= 1.;
+
+
+ { // hits
+ TGLabel* label = new TGLabel(gframe, "HitSelection");
+ label->Resize(labelw, wH);
+ label->SetTextJustify(kTextLeft | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, labelw, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ gframe->AddFrame(label,lh);
+ x += labelw;
+
+ mHitSelection = new TGTextEntry(gframe, "det_id == 0");
+ mHitSelection->Resize(entryw, wH);
+ lh = new TGXYLayoutHints(x, y, entryw, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ gframe->AddFrame(mHitSelection,lh);
+ x += entryw +1;
+
+ TGTextButton* but = new TGTextButton(gframe, "Select");
+ but->Resize(butw, wH);
+ but->SetTextJustify(kTextCenterX | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, butw, wH,0); lh->SetPadLeft(4); lh->SetPadRight(2);
+ gframe->AddFrame(but,lh);
+ but->Connect("Pressed()", "Reve::VSDSelector", this, "SelectHits()");
+
+ }
+
+ x = 2.;
+ y+= wH; y+= 1.;
+
+ { // particle selection
+ TGLabel* label = new TGLabel(gframe, "ClusterSelection");
+ label->Resize(labelw, wH);
+ label->SetTextJustify(kTextLeft | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, labelw, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ gframe->AddFrame(label,lh);
+ x += labelw;
+
+ mClusterSelection = new TGTextEntry(gframe, "R()< 70");
+ mClusterSelection->Resize(entryw, wH);
+ lh = new TGXYLayoutHints(x, y, entryw, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ gframe->AddFrame(mClusterSelection,lh);
+ x += entryw +1;
+
+ TGTextButton* but = new TGTextButton(gframe, "Select");
+ but->Resize(butw, wH);
+ but->SetTextJustify(kTextCenterX | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, butw, wH,0); lh->SetPadLeft(4); lh->SetPadRight(2);
+ gframe->AddFrame(but,lh);
+ but->Connect("Pressed()", "Reve::VSDSelector", this, "SelectClusters()");
+ } x = 2.;
+ y+= wH; y+= 1.;
+
+ { // reconstructed tracks selection
+ TGLabel* label = new TGLabel(gframe, "RecSelection");
+ label->Resize(labelw, wH);
+ label->SetTextJustify(kTextLeft | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, labelw, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ gframe->AddFrame(label,lh);
+ x += labelw;
+
+ mRecSelection = new TGTextEntry(gframe, "Pt() > 1");
+ mRecSelection->Resize(entryw, wH);
+ lh = new TGXYLayoutHints(x, y, entryw, wH,0); lh->SetPadLeft(2); lh->SetPadRight(2);
+ gframe->AddFrame(mRecSelection,lh);
+ x += entryw +1;
+
+ TGTextButton* but = new TGTextButton(gframe, "Select");
+ but->Resize(butw, wH);
+ but->SetTextJustify(kTextCenterX | kTextCenterY);
+ lh = new TGXYLayoutHints(x, y, butw, wH,0); lh->SetPadLeft(4); lh->SetPadRight(2);
+ gframe->AddFrame(but,lh);
+ but->Connect("Pressed()", "Reve::VSDSelector", this, "SelectRecTracks()");
+ }
+
+ gframe->Resize(60, 30); // resize to default size
+ gframe->MapSubwindows();
+ gframe->MapWindow();
+ tFrame->MapSubwindows();
+
+}
+
+/**************************************************************************/
+
+void VSDSelector::LoadVSD(const Text_t* vsd_file_name,
+ const Text_t* dir_name)
+{
+ VSD::LoadVSD(vsd_file_name, dir_name);
+ fListTree->AddItem(0, dir_name);
+}
+
+/**************************************************************************/
+// selection methods
+/**************************************************************************/
+
+void VSDSelector::SelectParticles(const Text_t* selection)
+{
+ static const Exc_t eH("VSDSelector::SelectParticles ");
+
+ if(mTreeK == 0)
+ throw (eH + "kinematics not available.");
+
+ if(selection == 0)
+ selection = mParticleSelection->GetText();
+
+
+ TGListTreeItem* parent = fListTree->FindItemByPathname("Event0");
+ if(parent == 0) return;
+
+
+ TTreeQuery evl;
+ Int_t n = evl.Select(mTreeK, selection);
+ // printf("%d entries in selection '%s'.\n", n, selection);
+
+ if(n == 0)
+ throw (eH + "no entries found for selection in kinematics.");
+
+
+ TrackList* cont = new TrackList();
+ TrackRnrStyle* rs = new TrackRnrStyle();
+ cont->SetRnrStyle(rs);
+ rs->SetColor(4);
+ TGListTreeItem *holder = fListTree->AddItem(parent, Form("MCTracks %s [%d]",selection,n));
+ holder->SetUserData(cont);
+ // printf("%d entries in selection '%s'.\n", n, selection);
+
+ if(n > 0) {
+ Reve::PadHolder pHolder(true, gReve->GetCC());
+ for(Int_t i=0; i<n; i++) {
+ Int_t label = evl.GetEntry(i);
+ mTreeK->GetEntry(label);
+ Track* track = new Track(mpK, cont->GetRnrStyle());
+
+ TGListTreeItem* di = fListTree->AddItem
+ (holder, Form("%s daughters:%d", mK.GetName(), mK.GetNDaughters()), track);
+ di->SetUserData(track);
+ cont->AddElement(track);
+ // printf("select daugters %s selection %s\n",mpK->GetName(),Form("fMother[0] == %d", track->GetLabel()));
+ if(fRecursiveSelect->IsOn()) {
+ if(mK.GetNDaughters())
+ ImportDaughtersRec(di, cont, mK.GetFirstDaughter(), mK.GetLastDaughter());
+ // add decay point to path marks
+ if(mK.decayed) {
+ Reve::PathMark* pm = new Reve::PathMark(Reve::PathMark::Decay);
+ pm->V.x = mK.V_decay.x;
+ pm->V.y = mK.V_decay.y;
+ pm->V.z = mK.V_decay.z;
+ track->fPathMarks.push_back(pm);
+ }
+ }
+ track->MakeTrack();
+ }
+ cont->MakeMarkers();
+ NotifyBrowser(parent);
+ }
+}
+
+/**************************************************************************/
+
+void VSDSelector::ImportDaughtersRec(TGListTreeItem* parent, TrackList* cont,
+ Int_t first, Int_t last)
+{
+ Track* mother = (Track*)parent->GetUserData();
+
+ for(Int_t i=first; i<=last; i++) {
+ mTreeK->GetEntry(i);
+ Track* track = new Track(mpK, cont->GetRnrStyle());
+
+ TGListTreeItem* di = fListTree->AddItem
+ (parent, Form("%s daughters:%d", mK.GetName(), mK.GetNDaughters()), track);
+ di->SetUserData(track);
+ cont->AddElement(track);
+ if(mK.GetNDaughters())
+ ImportDaughtersRec(di, cont, mK.GetFirstDaughter(), mK.GetLastDaughter());
+
+ // add daughter mark to mother
+ Reve::PathMark* dam = new Reve::PathMark(Reve::PathMark::Daughter);
+ dam->V.x = mK.Vx();
+ dam->V.y = mK.Vy();
+ dam->V.z = mK.Vz();
+ mother->fPathMarks.push_back(dam);
+
+ if(mK.decayed) {
+ Reve::PathMark* decm = new Reve::PathMark(Reve::PathMark::Decay);
+ decm->V.x = mK.V_decay.x;
+ decm->V.y = mK.V_decay.y;
+ decm->V.z = mK.V_decay.z;
+ track->fPathMarks.push_back(decm);
+
+ }
+ track->MakeTrack();
+ }
+}
+/**************************************************************************/
+
+void VSDSelector::SelectHits()
+{
+ static const Exc_t eH("VSDSelector::SelectHits ");
+
+ if(mTreeH == 0)
+ throw (eH + "hits not available.");
+
+ const Text_t* selection;
+ if(mHitSelection)
+ selection = mHitSelection->GetText();
+ else
+ selection ="det_id == 0";
+
+ TTreeQuery evl;
+ Int_t n = evl.Select(mTreeH, selection);
+ // printf("ImportHitsWithSelection %d entries for selection %s\n", n, selection);
+
+ if(n==0)
+ throw(eH + "no hits matching selection.");
+
+ PointSet* container = new PointSet
+ (Form("Hits %s", selection), n);
+ for(Int_t i=0; i<n; i++) {
+ const Int_t entry = evl.GetEntry(i);
+ mTreeH->GetEntry(entry);
+ container->SetPoint(i, mH.V.x, mH.V.y, mH.V.z);
+ }
+
+ container->SetMarkerColor((Color_t)2);
+ container->SetMarkerStyle((Style_t)6);
+ gReve->AddRenderElement(container);
+
+ return; //!!!! this is commenting-out old impl below
+
+ {
+ Reve::PadHolder pHolder(true, gReve->GetCC());
+ container->SetMarkerColor((Color_t)2);
+ container->SetMarkerStyle((Style_t)6);
+ container->Draw();
+ }
+
+ TGListTreeItem* parent = fListTree->FindItemByPathname("Event0");
+ TGListTreeItem* iholder = fListTree->AddItem(parent, Form("Hits %s", selection) ,container);
+ iholder->SetUserData(container);
+ NotifyBrowser(parent);
+}
+
+/**************************************************************************/
+
+void VSDSelector::SelectClusters()
+{
+ static const Exc_t eH("VSDSelector::SelectClusters ");
+
+ if(mTreeC == 0)
+ throw (eH + "clusters not available.");
+
+ const Text_t* selection;
+ if (mClusterSelection)
+ selection = mClusterSelection->GetText();
+ else
+ selection ="V.R()<70";
+
+ TTreeQuery evl;
+ Int_t n = evl.Select(mTreeC, selection);
+ printf(" cluster Selection %d entries for selection %s\n", n, selection);
+
+ if(n==0)
+ throw(eH + "no clusters matching selection.");
+
+ PointSet* container = new PointSet
+ (Form("Clusters %s", selection), n);
+ for(Int_t i=0; i<n; i++) {
+ const Int_t entry = evl.GetEntry(i);
+ mTreeC->GetEntry(entry);
+ container->SetPoint(i, mC.V.x, mC.V.y, mC.V.z);
+ }
+
+ {
+ Reve::PadHolder pHolder(true, gReve->GetCC());
+ container->SetMarkerColor((Color_t)9);
+ container->SetMarkerStyle((Style_t)7);
+ container->Draw();
+ }
+
+ TGListTreeItem* parent = fListTree->FindItemByPathname("Event0");
+ TGListTreeItem* iholder = fListTree->AddItem(parent, Form("Clusters %s", selection) ,container);
+ iholder->SetUserData(container);
+ NotifyBrowser(parent);
+}
+/**************************************************************************/
+
+void VSDSelector::SelectRecTracks()
+{
+ static const Exc_t eH("VSDSelector::SelectRecTracks ");
+
+ if(mTreeR == 0)
+ throw (eH + "reconstructed tracks not available.");
+
+ const Text_t* selection;
+ if(mRecSelection)
+ selection = mRecSelection->GetText();
+ else
+ selection = "Pt() > 1";
+
+ TTreeQuery evl;
+ Int_t n = evl.Select(mTreeR, selection);
+ // printf("%d entries in selection %s \n", n, selection);
+
+ if (n == 0)
+ throw (eH + "No entries found in ESD data.");
+
+ if(n > 0) {
+ Reve::PadHolder pHolder(true, gReve->GetCC());
+
+ TGListTreeItem* parent = fListTree->FindItemByPathname("Event0");
+ TrackList* cont = new TrackList();
+ TrackRnrStyle* rs = new TrackRnrStyle();
+ cont->SetRnrStyle(rs);
+ rs->SetColor(6);
+ TGListTreeItem *holder = fListTree->AddItem(parent, Form("RecTracks %s [%d]",selection, n));
+ holder->SetUserData(cont);
+ for (Int_t i=0; i<n; i++) {
+ Int_t label = evl.GetEntry(i);
+ mTreeR->GetEntry(label);
+ Track* track = new Track(mpR, cont->GetRnrStyle());
+ track->MakeTrack();
+ track->Draw();
+
+ TGListTreeItem* di =
+ fListTree->AddItem(holder, "RecTrack", track);
+ di->SetUserData(track);
+ cont->AddElement(track);
+ }
+
+ cont->MakeMarkers();
+ NotifyBrowser(parent);
+ }
+}
+
+/**************************************************************************/
+
+void VSDSelector::NotifyBrowser(TGListTreeItem* parent)
+{
+ Long_t args[2];
+ args[0] = (Long_t)parent;
+ args[1] = 0;
+
+ fListTree->Emit("Clicked(TGListTreeItem*, Int_t)", args);
+ fListTree->OpenItem(parent);
+}
--- /dev/null
+#ifndef REVE_VSDSelector_H
+#define REVE_VSDSelector_H
+
+#include "RGBrowser.h"
+#include <Reve/VSD.h>
+
+#include <TGTextEntry.h>
+
+namespace Reve {
+
+ class TrackRnrStyle;
+ class TrackList;
+
+ class VSDSelector : public ::Reve::VSD
+ {
+ private:
+ void NotifyBrowser(TGListTreeItem* parent);
+ TGListTree* fListTree;
+
+ protected:
+ TGTextEntry* mParticleSelection;
+ TGTextEntry* mHitSelection;
+ TGTextEntry* mClusterSelection;
+ TGTextEntry* mRecSelection;
+
+ public:
+ TGCheckButton* fRecursiveSelect;
+ VSDSelector(TGListTree* lt, TGCompositeFrame *tFrame);
+
+ virtual void LoadVSD(const Text_t* vsd_file_name,
+ const Text_t* dir_name="Event0");
+
+ void SelectParticles (const Text_t* selection=0);
+ void ImportDaughtersRec(TGListTreeItem* parent, TrackList* cont, Int_t first, Int_t last);
+ void SelectHits();
+ void SelectClusters();
+ void SelectRecTracks();
+
+ void SetRecursiveSelection(Bool_t rec){fRecursiveSelect->SetOn(rec,1);}
+ // printf("SetRecursiveSelection is %d on %d \n", rec?1:0,fRecursiveSelect->IsOn()?1:0);}
+ Bool_t GetRecursiveSelection(){return fRecursiveSelect->IsOn();}
+ ClassDef(VSDSelector, 1);
+ };
+
+}
+
+#endif
--- /dev/null
+#include <Reve/Reve.h>
+#include <Reve/RGTopFrame.h>
+
+#include <TInterpreter.h>
+#include <Getline.h>
+
+int main(int argc, char **argv)
+{
+ Reve::SetupEnvironment();
+
+ gROOT->SetMacroPath(Form(".:%s/macros", gSystem->Getenv("REVESYS")));
+ gInterpreter->AddIncludePath(Form("%s/macros", gSystem->Getenv("REVESYS")));
+
+ int r = Reve::RGTopFrame::SpawnGuiAndRun(argc, argv);
+ Getlinem(kCleanUp, 0);
+ return r;
+}
--- /dev/null
+//Comment lines begin with two //, one #, or one !
+#Blank lines are skipped including /* and */ sections.
+!and, in principle the order of the lines is not important
+/* In AliITSgeom.h are defined an enumerated type called
+ AliITSDetectors These are kSPD=0, kSDD=1, kSSD=2, kSSDp=3, and kSDDp=4*/
+Version test
+fTrans 0
+fNmodules 2198
+fNlayers 6
+fNladers 20 40 14 22 34 38
+fNdetectors 4 4 6 8 22 25
+fNDetectorTypes 3
+fShape 0 TBRIK 6.3999998569488525e-01 9.9999997764825821e-03 3.4800000190734863e+00 256 160 -6.3999950885772705e-01 -6.3499951362609863e-01 -6.2999951839447021e-01 -6.2499952316284180e-01 -6.1999952793121338e-01 -6.1499953269958496e-01 -6.0999953746795654e-01 -6.0499954223632812e-01 -5.9999954700469971e-01 -5.9499955177307129e-01 -5.8999955654144287e-01 -5.8499956130981445e-01 -5.7999956607818604e-01 -5.7499957084655762e-01 -5.6999957561492920e-01 -5.6499958038330078e-01 -5.5999958515167236e-01 -5.5499958992004395e-01 -5.4999959468841553e-01 -5.4499959945678711e-01 -5.3999960422515869e-01 -5.3499960899353027e-01 -5.2999961376190186e-01 -5.2499961853027344e-01 -5.1999962329864502e-01 -5.1499962806701660e-01 -5.0999963283538818e-01 -5.0499963760375977e-01 -4.9999964237213135e-01 -4.9499964714050293e-01 -4.8999965190887451e-01 -4.8499965667724609e-01 -4.7999966144561768e-01 -4.7499966621398926e-01 -4.6999967098236084e-01 -4.6499967575073242e-01 -4.5999968051910400e-01 -4.5499968528747559e-01 -4.4999969005584717e-01 -4.4499969482421875e-01 -4.3999969959259033e-01 -4.3499970436096191e-01 -4.2999970912933350e-01 -4.2499971389770508e-01 -4.1999971866607666e-01 -4.1499972343444824e-01 -4.0999972820281982e-01 -4.0499973297119141e-01 -3.9999973773956299e-01 -3.9499974250793457e-01 -3.8999974727630615e-01 -3.8499975204467773e-01 -3.7999975681304932e-01 -3.7499976158142090e-01 -3.6999976634979248e-01 -3.6499977111816406e-01 -3.5999977588653564e-01 -3.5499978065490723e-01 -3.4999978542327881e-01 -3.4499979019165039e-01 -3.3999979496002197e-01 -3.3499979972839355e-01 -3.2999980449676514e-01 -3.2499980926513672e-01 -3.1999981403350830e-01 -3.1499981880187988e-01 -3.0999982357025146e-01 -3.0499982833862305e-01 -2.9999983310699463e-01 -2.9499983787536621e-01 -2.8999984264373779e-01 -2.8499984741210938e-01 -2.7999985218048096e-01 -2.7499985694885254e-01 -2.6999986171722412e-01 -2.6499986648559570e-01 -2.5999987125396729e-01 -2.5499987602233887e-01 -2.4999988079071045e-01 -2.4499988555908203e-01 -2.3999989032745361e-01 -2.3499989509582520e-01 -2.2999989986419678e-01 -2.2499990463256836e-01 -2.1999990940093994e-01 -2.1499991416931152e-01 -2.0999991893768311e-01 -2.0499992370605469e-01 -1.9999992847442627e-01 -1.9499993324279785e-01 -1.8999993801116943e-01 -1.8499994277954102e-01 -1.7999994754791260e-01 -1.7499995231628418e-01 -1.6999995708465576e-01 -1.6499996185302734e-01 -1.5999996662139893e-01 -1.5499997138977051e-01 -1.4999997615814209e-01 -1.4499998092651367e-01 -1.3999998569488525e-01 -1.3499999046325684e-01 -1.2999999523162842e-01 -1.2499999254941940e-01 -1.1999998986721039e-01 -1.1499998718500137e-01 -1.0999998450279236e-01 -1.0499998182058334e-01 -9.9999979138374329e-02 -9.4999976456165314e-02 -8.9999973773956299e-02 -8.4999971091747284e-02 -7.9999968409538269e-02 -7.4999965727329254e-02 -6.9999963045120239e-02 -6.4999960362911224e-02 -5.9999961405992508e-02 -5.4999962449073792e-02 -4.9999963492155075e-02 -4.4999964535236359e-02 -3.9999965578317642e-02 -3.4999966621398926e-02 -2.9999967664480209e-02 -2.4999968707561493e-02 -1.9999969750642776e-02 -1.4999969862401485e-02 -9.9999699741601944e-03 -4.9999700859189034e-03 2.9802322387695312e-08 5.0000296905636787e-03 1.0000029578804970e-02 1.5000029467046261e-02 2.0000029355287552e-02 2.5000028312206268e-02 3.0000027269124985e-02 3.5000026226043701e-02 4.0000025182962418e-02 4.5000024139881134e-02 5.0000023096799850e-02 5.5000022053718567e-02 6.0000021010637283e-02 6.5000019967556000e-02 7.0000022649765015e-02 7.5000025331974030e-02 8.0000028014183044e-02 8.5000030696392059e-02 9.0000033378601074e-02 9.5000036060810089e-02 1.0000003874301910e-01 1.0500004142522812e-01 1.1000004410743713e-01 1.1500004678964615e-01 1.2000004947185516e-01 1.2500004470348358e-01 1.3000003993511200e-01 1.3500003516674042e-01 1.4000003039836884e-01 1.4500002562999725e-01 1.5000002086162567e-01 1.5500001609325409e-01 1.6000001132488251e-01 1.6500000655651093e-01 1.7000000178813934e-01 1.7499999701976776e-01 1.7999999225139618e-01 1.8499998748302460e-01 1.8999998271465302e-01 1.9499997794628143e-01 1.9999997317790985e-01 2.0499996840953827e-01 2.0999996364116669e-01 2.1499995887279510e-01 2.1999995410442352e-01 2.2499994933605194e-01 2.2999994456768036e-01 2.3499993979930878e-01 2.3999993503093719e-01 2.4499993026256561e-01 2.4999992549419403e-01 2.5499993562698364e-01 2.5999993085861206e-01 2.6499992609024048e-01 2.6999992132186890e-01 2.7499991655349731e-01 2.7999991178512573e-01 2.8499990701675415e-01 2.8999990224838257e-01 2.9499989748001099e-01 2.9999989271163940e-01 3.0499988794326782e-01 3.0999988317489624e-01 3.1499987840652466e-01 3.1999987363815308e-01 3.2499986886978149e-01 3.2999986410140991e-01 3.3499985933303833e-01 3.3999985456466675e-01 3.4499984979629517e-01 3.4999984502792358e-01 3.5499984025955200e-01 3.5999983549118042e-01 3.6499983072280884e-01 3.6999982595443726e-01 3.7499982118606567e-01 3.7999981641769409e-01 3.8499981164932251e-01 3.8999980688095093e-01 3.9499980211257935e-01 3.9999979734420776e-01 4.0499979257583618e-01 4.0999978780746460e-01 4.1499978303909302e-01 4.1999977827072144e-01 4.2499977350234985e-01 4.2999976873397827e-01 4.3499976396560669e-01 4.3999975919723511e-01 4.4499975442886353e-01 4.4999974966049194e-01 4.5499974489212036e-01 4.5999974012374878e-01 4.6499973535537720e-01 4.6999973058700562e-01 4.7499972581863403e-01 4.7999972105026245e-01 4.8499971628189087e-01 4.8999971151351929e-01 4.9499970674514771e-01 4.9999970197677612e-01 5.0499969720840454e-01 5.0999969244003296e-01 5.1499968767166138e-01 5.1999968290328979e-01 5.2499967813491821e-01 5.2999967336654663e-01 5.3499966859817505e-01 5.3999966382980347e-01 5.4499965906143188e-01 5.4999965429306030e-01 5.5499964952468872e-01 5.5999964475631714e-01 5.6499963998794556e-01 5.6999963521957397e-01 5.7499963045120239e-01 5.7999962568283081e-01 5.8499962091445923e-01 5.8999961614608765e-01 5.9499961137771606e-01 5.9999960660934448e-01 6.0499960184097290e-01 6.0999959707260132e-01 6.1499959230422974e-01 6.1999958753585815e-01 6.2499958276748657e-01 6.2999957799911499e-01 6.3499957323074341e-01 6.3999956846237183e-01 -3.4800012111663818e+00 -3.4375011920928955e+00 -3.3950011730194092e+00 -3.3525011539459229e+00 -3.3100011348724365e+00 -3.2675011157989502e+00 -3.2250010967254639e+00 -3.1825010776519775e+00 -3.1400010585784912e+00 -3.0975010395050049e+00 -3.0550010204315186e+00 -3.0125010013580322e+00 -2.9700009822845459e+00 -2.9275009632110596e+00 -2.8850009441375732e+00 -2.8425009250640869e+00 -2.8000009059906006e+00 -2.7575008869171143e+00 -2.7150008678436279e+00 -2.6725008487701416e+00 -2.6300008296966553e+00 -2.5875008106231689e+00 -2.5450007915496826e+00 -2.5025007724761963e+00 -2.4600007534027100e+00 -2.4175007343292236e+00 -2.3750007152557373e+00 -2.3325006961822510e+00 -2.2900006771087646e+00 -2.2475006580352783e+00 -2.2050006389617920e+00 -2.1625006198883057e+00 -2.1000006198883057e+00 -2.0375006198883057e+00 -1.9950006008148193e+00 -1.9525005817413330e+00 -1.9100005626678467e+00 -1.8675005435943604e+00 -1.8250005245208740e+00 -1.7825005054473877e+00 -1.7400004863739014e+00 -1.6975004673004150e+00 -1.6550004482269287e+00 -1.6125004291534424e+00 -1.5700004100799561e+00 -1.5275003910064697e+00 -1.4850003719329834e+00 -1.4425003528594971e+00 -1.4000003337860107e+00 -1.3575003147125244e+00 -1.3150002956390381e+00 -1.2725002765655518e+00 -1.2300002574920654e+00 -1.1875002384185791e+00 -1.1450002193450928e+00 -1.1025002002716064e+00 -1.0600001811981201e+00 -1.0175001621246338e+00 -9.7500014305114746e-01 -9.3250012397766113e-01 -8.9000010490417480e-01 -8.4750008583068848e-01 -8.0500006675720215e-01 -7.6250004768371582e-01 -7.0000004768371582e-01 -6.3750004768371582e-01 -5.9500002861022949e-01 -5.5250000953674316e-01 -5.0999999046325684e-01 -4.6750000119209290e-01 -4.2500001192092896e-01 -3.8250002264976501e-01 -3.4000003337860107e-01 -2.9750004410743713e-01 -2.5500005483627319e-01 -2.1250005066394806e-01 -1.7000004649162292e-01 -1.2750004231929779e-01 -8.5000038146972656e-02 -4.2500037699937820e-02 -3.7252902984619141e-08 4.2499963194131851e-02 8.4999963641166687e-02 1.2749996781349182e-01 1.6999997198581696e-01 2.1249997615814209e-01 2.5499996542930603e-01 2.9749995470046997e-01 3.3999994397163391e-01 3.8249993324279785e-01 4.2499992251396179e-01 4.6749991178512573e-01 5.0999993085861206e-01 5.5249994993209839e-01 5.9499996900558472e-01 6.3749998807907104e-01 6.9999998807907104e-01 7.6249998807907104e-01 8.0500000715255737e-01 8.4750002622604370e-01 8.9000004529953003e-01 9.3250006437301636e-01 9.7500008344650269e-01 1.0175000429153442e+00 1.0600000619888306e+00 1.1025000810623169e+00 1.1450001001358032e+00 1.1875001192092896e+00 1.2300001382827759e+00 1.2725001573562622e+00 1.3150001764297485e+00 1.3575001955032349e+00 1.4000002145767212e+00 1.4425002336502075e+00 1.4850002527236938e+00 1.5275002717971802e+00 1.5700002908706665e+00 1.6125003099441528e+00 1.6550003290176392e+00 1.6975003480911255e+00 1.7400003671646118e+00 1.7825003862380981e+00 1.8250004053115845e+00 1.8675004243850708e+00 1.9100004434585571e+00 1.9525004625320435e+00 1.9950004816055298e+00 2.0375003814697266e+00 2.1000003814697266e+00 2.1625003814697266e+00 2.2050004005432129e+00 2.2475004196166992e+00 2.2900004386901855e+00 2.3325004577636719e+00 2.3750004768371582e+00 2.4175004959106445e+00 2.4600005149841309e+00 2.5025005340576172e+00 2.5450005531311035e+00 2.5875005722045898e+00 2.6300005912780762e+00 2.6725006103515625e+00 2.7150006294250488e+00 2.7575006484985352e+00 2.8000006675720215e+00 2.8425006866455078e+00 2.8850007057189941e+00 2.9275007247924805e+00 2.9700007438659668e+00 3.0125007629394531e+00 3.0550007820129395e+00 3.0975008010864258e+00 3.1400008201599121e+00 3.1825008392333984e+00 3.2250008583068848e+00 3.2675008773803711e+00 3.3100008964538574e+00 3.3525009155273438e+00 3.3950009346008301e+00 3.4375009536743164e+00 3.4800009727478027e+00
+fShape 1 TBRIK 3.5085000991821289e+00 1.4990000054240227e-02 3.7632000446319580e+00 2.5000000292152436e-08 5.4687500000000000e+03 257 257 -3.5085000991821289e+00 3.5085000991821289e+00 -3.7485001087188721e+00 -3.7190999984741211e+00 -3.6896998882293701e+00 -3.6602997779846191e+00 -3.6308996677398682e+00 -3.6014995574951172e+00 -3.5720994472503662e+00 -3.5426993370056152e+00 -3.5132992267608643e+00 -3.4838991165161133e+00 -3.4544990062713623e+00 -3.4250988960266113e+00 -3.3956987857818604e+00 -3.3662986755371094e+00 -3.3368985652923584e+00 -3.3074984550476074e+00 -3.2780983448028564e+00 -3.2486982345581055e+00 -3.2192981243133545e+00 -3.1898980140686035e+00 -3.1604979038238525e+00 -3.1310977935791016e+00 -3.1016976833343506e+00 -3.0722975730895996e+00 -3.0428974628448486e+00 -3.0134973526000977e+00 -2.9840972423553467e+00 -2.9546971321105957e+00 -2.9252970218658447e+00 -2.8958969116210938e+00 -2.8664968013763428e+00 -2.8370966911315918e+00 -2.8076965808868408e+00 -2.7782964706420898e+00 -2.7488963603973389e+00 -2.7194962501525879e+00 -2.6900961399078369e+00 -2.6606960296630859e+00 -2.6312959194183350e+00 -2.6018958091735840e+00 -2.5724956989288330e+00 -2.5430955886840820e+00 -2.5136954784393311e+00 -2.4842953681945801e+00 -2.4548952579498291e+00 -2.4254951477050781e+00 -2.3960950374603271e+00 -2.3666949272155762e+00 -2.3372948169708252e+00 -2.3078947067260742e+00 -2.2784945964813232e+00 -2.2490944862365723e+00 -2.2196943759918213e+00 -2.1902942657470703e+00 -2.1608941555023193e+00 -2.1314940452575684e+00 -2.1020939350128174e+00 -2.0726938247680664e+00 -2.0432937145233154e+00 -2.0138936042785645e+00 -1.9844936132431030e+00 -1.9550936222076416e+00 -1.9256936311721802e+00 -1.8962936401367188e+00 -1.8668936491012573e+00 -1.8374936580657959e+00 -1.8080936670303345e+00 -1.7786936759948730e+00 -1.7492936849594116e+00 -1.7198936939239502e+00 -1.6904937028884888e+00 -1.6610937118530273e+00 -1.6316937208175659e+00 -1.6022937297821045e+00 -1.5728937387466431e+00 -1.5434937477111816e+00 -1.5140937566757202e+00 -1.4846937656402588e+00 -1.4552937746047974e+00 -1.4258937835693359e+00 -1.3964937925338745e+00 -1.3670938014984131e+00 -1.3376938104629517e+00 -1.3082938194274902e+00 -1.2788938283920288e+00 -1.2494938373565674e+00 -1.2200938463211060e+00 -1.1906938552856445e+00 -1.1612938642501831e+00 -1.1318938732147217e+00 -1.1024938821792603e+00 -1.0730938911437988e+00 -1.0436939001083374e+00 -1.0142939090728760e+00 -9.8489391803741455e-01 -9.5549392700195312e-01 -9.2609393596649170e-01 -8.9669394493103027e-01 -8.6729395389556885e-01 -8.3789396286010742e-01 -8.0849397182464600e-01 -7.7909398078918457e-01 -7.4969398975372314e-01 -7.2029399871826172e-01 -6.9089400768280029e-01 -6.6149401664733887e-01 -6.3209402561187744e-01 -6.0269403457641602e-01 -5.7329404354095459e-01 -5.4389405250549316e-01 -5.1449406147003174e-01 -4.8509407043457031e-01 -4.5569407939910889e-01 -4.2629408836364746e-01 -3.9689409732818604e-01 -3.6749410629272461e-01 -3.3809411525726318e-01 -3.0869412422180176e-01 -2.7929413318634033e-01 -2.4989412724971771e-01 -2.2049412131309509e-01 -1.9109411537647247e-01 -1.6169410943984985e-01 -1.3229410350322723e-01 -1.0289410501718521e-01 -7.3494106531143188e-02 -4.4094108045101166e-02 -1.4694107696413994e-02 1.4705892652273178e-02 4.4105894863605499e-02 7.3505893349647522e-02 1.0290589183568954e-01 1.3230589032173157e-01 1.6170589625835419e-01 1.9110590219497681e-01 2.2050590813159943e-01 2.4990591406822205e-01 2.7930590510368347e-01 3.0870589613914490e-01 3.3810588717460632e-01 3.6750587821006775e-01 3.9690586924552917e-01 4.2630586028099060e-01 4.5570585131645203e-01 4.8510584235191345e-01 5.1450586318969727e-01 5.4390585422515869e-01 5.7330584526062012e-01 6.0270583629608154e-01 6.3210582733154297e-01 6.6150581836700439e-01 6.9090580940246582e-01 7.2030580043792725e-01 7.4970579147338867e-01 7.7910578250885010e-01 8.0850577354431152e-01 8.3790576457977295e-01 8.6730575561523438e-01 8.9670574665069580e-01 9.2610573768615723e-01 9.5550572872161865e-01 9.8490571975708008e-01 1.0143057107925415e+00 1.0437057018280029e+00 1.0731056928634644e+00 1.1025056838989258e+00 1.1319056749343872e+00 1.1613056659698486e+00 1.1907056570053101e+00 1.2201056480407715e+00 1.2495056390762329e+00 1.2789056301116943e+00 1.3083056211471558e+00 1.3377056121826172e+00 1.3671056032180786e+00 1.3965055942535400e+00 1.4259055852890015e+00 1.4553055763244629e+00 1.4847055673599243e+00 1.5141055583953857e+00 1.5435055494308472e+00 1.5729055404663086e+00 1.6023055315017700e+00 1.6317055225372314e+00 1.6611055135726929e+00 1.6905055046081543e+00 1.7199054956436157e+00 1.7493054866790771e+00 1.7787054777145386e+00 1.8081054687500000e+00 1.8375054597854614e+00 1.8669054508209229e+00 1.8963054418563843e+00 1.9257054328918457e+00 1.9551054239273071e+00 1.9845054149627686e+00 2.0139055252075195e+00 2.0433056354522705e+00 2.0727057456970215e+00 2.1021058559417725e+00 2.1315059661865234e+00 2.1609060764312744e+00 2.1903061866760254e+00 2.2197062969207764e+00 2.2491064071655273e+00 2.2785065174102783e+00 2.3079066276550293e+00 2.3373067378997803e+00 2.3667068481445312e+00 2.3961069583892822e+00 2.4255070686340332e+00 2.4549071788787842e+00 2.4843072891235352e+00 2.5137073993682861e+00 2.5431075096130371e+00 2.5725076198577881e+00 2.6019077301025391e+00 2.6313078403472900e+00 2.6607079505920410e+00 2.6901080608367920e+00 2.7195081710815430e+00 2.7489082813262939e+00 2.7783083915710449e+00 2.8077085018157959e+00 2.8371086120605469e+00 2.8665087223052979e+00 2.8959088325500488e+00 2.9253089427947998e+00 2.9547090530395508e+00 2.9841091632843018e+00 3.0135092735290527e+00 3.0429093837738037e+00 3.0723094940185547e+00 3.1017096042633057e+00 3.1311097145080566e+00 3.1605098247528076e+00 3.1899099349975586e+00 3.2193100452423096e+00 3.2487101554870605e+00 3.2781102657318115e+00 3.3075103759765625e+00 3.3369104862213135e+00 3.3663105964660645e+00 3.3957107067108154e+00 3.4251108169555664e+00 3.4545109272003174e+00 3.4839110374450684e+00 3.5133111476898193e+00 3.5427112579345703e+00 3.5721113681793213e+00 3.6015114784240723e+00 3.6309115886688232e+00 3.6603116989135742e+00 3.6897118091583252e+00 3.7191119194030762e+00 3.7485120296478271e+00 3.7779121398925781e+00 -3.7485001087188721e+00 -3.7190999984741211e+00 -3.6896998882293701e+00 -3.6602997779846191e+00 -3.6308996677398682e+00 -3.6014995574951172e+00 -3.5720994472503662e+00 -3.5426993370056152e+00 -3.5132992267608643e+00 -3.4838991165161133e+00 -3.4544990062713623e+00 -3.4250988960266113e+00 -3.3956987857818604e+00 -3.3662986755371094e+00 -3.3368985652923584e+00 -3.3074984550476074e+00 -3.2780983448028564e+00 -3.2486982345581055e+00 -3.2192981243133545e+00 -3.1898980140686035e+00 -3.1604979038238525e+00 -3.1310977935791016e+00 -3.1016976833343506e+00 -3.0722975730895996e+00 -3.0428974628448486e+00 -3.0134973526000977e+00 -2.9840972423553467e+00 -2.9546971321105957e+00 -2.9252970218658447e+00 -2.8958969116210938e+00 -2.8664968013763428e+00 -2.8370966911315918e+00 -2.8076965808868408e+00 -2.7782964706420898e+00 -2.7488963603973389e+00 -2.7194962501525879e+00 -2.6900961399078369e+00 -2.6606960296630859e+00 -2.6312959194183350e+00 -2.6018958091735840e+00 -2.5724956989288330e+00 -2.5430955886840820e+00 -2.5136954784393311e+00 -2.4842953681945801e+00 -2.4548952579498291e+00 -2.4254951477050781e+00 -2.3960950374603271e+00 -2.3666949272155762e+00 -2.3372948169708252e+00 -2.3078947067260742e+00 -2.2784945964813232e+00 -2.2490944862365723e+00 -2.2196943759918213e+00 -2.1902942657470703e+00 -2.1608941555023193e+00 -2.1314940452575684e+00 -2.1020939350128174e+00 -2.0726938247680664e+00 -2.0432937145233154e+00 -2.0138936042785645e+00 -1.9844936132431030e+00 -1.9550936222076416e+00 -1.9256936311721802e+00 -1.8962936401367188e+00 -1.8668936491012573e+00 -1.8374936580657959e+00 -1.8080936670303345e+00 -1.7786936759948730e+00 -1.7492936849594116e+00 -1.7198936939239502e+00 -1.6904937028884888e+00 -1.6610937118530273e+00 -1.6316937208175659e+00 -1.6022937297821045e+00 -1.5728937387466431e+00 -1.5434937477111816e+00 -1.5140937566757202e+00 -1.4846937656402588e+00 -1.4552937746047974e+00 -1.4258937835693359e+00 -1.3964937925338745e+00 -1.3670938014984131e+00 -1.3376938104629517e+00 -1.3082938194274902e+00 -1.2788938283920288e+00 -1.2494938373565674e+00 -1.2200938463211060e+00 -1.1906938552856445e+00 -1.1612938642501831e+00 -1.1318938732147217e+00 -1.1024938821792603e+00 -1.0730938911437988e+00 -1.0436939001083374e+00 -1.0142939090728760e+00 -9.8489391803741455e-01 -9.5549392700195312e-01 -9.2609393596649170e-01 -8.9669394493103027e-01 -8.6729395389556885e-01 -8.3789396286010742e-01 -8.0849397182464600e-01 -7.7909398078918457e-01 -7.4969398975372314e-01 -7.2029399871826172e-01 -6.9089400768280029e-01 -6.6149401664733887e-01 -6.3209402561187744e-01 -6.0269403457641602e-01 -5.7329404354095459e-01 -5.4389405250549316e-01 -5.1449406147003174e-01 -4.8509407043457031e-01 -4.5569407939910889e-01 -4.2629408836364746e-01 -3.9689409732818604e-01 -3.6749410629272461e-01 -3.3809411525726318e-01 -3.0869412422180176e-01 -2.7929413318634033e-01 -2.4989412724971771e-01 -2.2049412131309509e-01 -1.9109411537647247e-01 -1.6169410943984985e-01 -1.3229410350322723e-01 -1.0289410501718521e-01 -7.3494106531143188e-02 -4.4094108045101166e-02 -1.4694107696413994e-02 1.4705892652273178e-02 4.4105894863605499e-02 7.3505893349647522e-02 1.0290589183568954e-01 1.3230589032173157e-01 1.6170589625835419e-01 1.9110590219497681e-01 2.2050590813159943e-01 2.4990591406822205e-01 2.7930590510368347e-01 3.0870589613914490e-01 3.3810588717460632e-01 3.6750587821006775e-01 3.9690586924552917e-01 4.2630586028099060e-01 4.5570585131645203e-01 4.8510584235191345e-01 5.1450586318969727e-01 5.4390585422515869e-01 5.7330584526062012e-01 6.0270583629608154e-01 6.3210582733154297e-01 6.6150581836700439e-01 6.9090580940246582e-01 7.2030580043792725e-01 7.4970579147338867e-01 7.7910578250885010e-01 8.0850577354431152e-01 8.3790576457977295e-01 8.6730575561523438e-01 8.9670574665069580e-01 9.2610573768615723e-01 9.5550572872161865e-01 9.8490571975708008e-01 1.0143057107925415e+00 1.0437057018280029e+00 1.0731056928634644e+00 1.1025056838989258e+00 1.1319056749343872e+00 1.1613056659698486e+00 1.1907056570053101e+00 1.2201056480407715e+00 1.2495056390762329e+00 1.2789056301116943e+00 1.3083056211471558e+00 1.3377056121826172e+00 1.3671056032180786e+00 1.3965055942535400e+00 1.4259055852890015e+00 1.4553055763244629e+00 1.4847055673599243e+00 1.5141055583953857e+00 1.5435055494308472e+00 1.5729055404663086e+00 1.6023055315017700e+00 1.6317055225372314e+00 1.6611055135726929e+00 1.6905055046081543e+00 1.7199054956436157e+00 1.7493054866790771e+00 1.7787054777145386e+00 1.8081054687500000e+00 1.8375054597854614e+00 1.8669054508209229e+00 1.8963054418563843e+00 1.9257054328918457e+00 1.9551054239273071e+00 1.9845054149627686e+00 2.0139055252075195e+00 2.0433056354522705e+00 2.0727057456970215e+00 2.1021058559417725e+00 2.1315059661865234e+00 2.1609060764312744e+00 2.1903061866760254e+00 2.2197062969207764e+00 2.2491064071655273e+00 2.2785065174102783e+00 2.3079066276550293e+00 2.3373067378997803e+00 2.3667068481445312e+00 2.3961069583892822e+00 2.4255070686340332e+00 2.4549071788787842e+00 2.4843072891235352e+00 2.5137073993682861e+00 2.5431075096130371e+00 2.5725076198577881e+00 2.6019077301025391e+00 2.6313078403472900e+00 2.6607079505920410e+00 2.6901080608367920e+00 2.7195081710815430e+00 2.7489082813262939e+00 2.7783083915710449e+00 2.8077085018157959e+00 2.8371086120605469e+00 2.8665087223052979e+00 2.8959088325500488e+00 2.9253089427947998e+00 2.9547090530395508e+00 2.9841091632843018e+00 3.0135092735290527e+00 3.0429093837738037e+00 3.0723094940185547e+00 3.1017096042633057e+00 3.1311097145080566e+00 3.1605098247528076e+00 3.1899099349975586e+00 3.2193100452423096e+00 3.2487101554870605e+00 3.2781102657318115e+00 3.3075103759765625e+00 3.3369104862213135e+00 3.3663105964660645e+00 3.3957107067108154e+00 3.4251108169555664e+00 3.4545109272003174e+00 3.4839110374450684e+00 3.5133111476898193e+00 3.5427112579345703e+00 3.5721113681793213e+00 3.6015114784240723e+00 3.6309115886688232e+00 3.6603116989135742e+00 3.6897118091583252e+00 3.7191119194030762e+00 3.7485120296478271e+00 3.7779121398925781e+00
+fShape 2 TBRIK 3.6500000953674316e+00 1.4999999664723873e-02 2.0000000000000000e+00 769 769 2.7499999850988388e-02 7.4999998323619366e-03 -3.6500000953674316e+00 -3.6384999752044678e+00 -3.6289999485015869e+00 -3.6194999217987061e+00 -3.6099998950958252e+00 -3.6004998683929443e+00 -3.5909998416900635e+00 -3.5814998149871826e+00 -3.5719997882843018e+00 -3.5624997615814209e+00 -3.5529997348785400e+00 -3.5434997081756592e+00 -3.5339996814727783e+00 -3.5244996547698975e+00 -3.5149996280670166e+00 -3.5054996013641357e+00 -3.4959995746612549e+00 -3.4864995479583740e+00 -3.4769995212554932e+00 -3.4674994945526123e+00 -3.4579994678497314e+00 -3.4484994411468506e+00 -3.4389994144439697e+00 -3.4294993877410889e+00 -3.4199993610382080e+00 -3.4104993343353271e+00 -3.4009993076324463e+00 -3.3914992809295654e+00 -3.3819992542266846e+00 -3.3724992275238037e+00 -3.3629992008209229e+00 -3.3534991741180420e+00 -3.3439991474151611e+00 -3.3344991207122803e+00 -3.3249990940093994e+00 -3.3154990673065186e+00 -3.3059990406036377e+00 -3.2964990139007568e+00 -3.2869989871978760e+00 -3.2774989604949951e+00 -3.2679989337921143e+00 -3.2584989070892334e+00 -3.2489988803863525e+00 -3.2394988536834717e+00 -3.2299988269805908e+00 -3.2204988002777100e+00 -3.2109987735748291e+00 -3.2014987468719482e+00 -3.1919987201690674e+00 -3.1824986934661865e+00 -3.1729986667633057e+00 -3.1634986400604248e+00 -3.1539986133575439e+00 -3.1444985866546631e+00 -3.1349985599517822e+00 -3.1254985332489014e+00 -3.1159985065460205e+00 -3.1064984798431396e+00 -3.0969984531402588e+00 -3.0874984264373779e+00 -3.0779983997344971e+00 -3.0684983730316162e+00 -3.0589983463287354e+00 -3.0494983196258545e+00 -3.0399982929229736e+00 -3.0304982662200928e+00 -3.0209982395172119e+00 -3.0114982128143311e+00 -3.0019981861114502e+00 -2.9924981594085693e+00 -2.9829981327056885e+00 -2.9734981060028076e+00 -2.9639980792999268e+00 -2.9544980525970459e+00 -2.9449980258941650e+00 -2.9354979991912842e+00 -2.9259979724884033e+00 -2.9164979457855225e+00 -2.9069979190826416e+00 -2.8974978923797607e+00 -2.8879978656768799e+00 -2.8784978389739990e+00 -2.8689978122711182e+00 -2.8594977855682373e+00 -2.8499977588653564e+00 -2.8404977321624756e+00 -2.8309977054595947e+00 -2.8214976787567139e+00 -2.8119976520538330e+00 -2.8024976253509521e+00 -2.7929975986480713e+00 -2.7834975719451904e+00 -2.7739975452423096e+00 -2.7644975185394287e+00 -2.7549974918365479e+00 -2.7454974651336670e+00 -2.7359974384307861e+00 -2.7264974117279053e+00 -2.7169973850250244e+00 -2.7074973583221436e+00 -2.6979973316192627e+00 -2.6884973049163818e+00 -2.6789972782135010e+00 -2.6694972515106201e+00 -2.6599972248077393e+00 -2.6504971981048584e+00 -2.6409971714019775e+00 -2.6314971446990967e+00 -2.6219971179962158e+00 -2.6124970912933350e+00 -2.6029970645904541e+00 -2.5934970378875732e+00 -2.5839970111846924e+00 -2.5744969844818115e+00 -2.5649969577789307e+00 -2.5554969310760498e+00 -2.5459969043731689e+00 -2.5364968776702881e+00 -2.5269968509674072e+00 -2.5174968242645264e+00 -2.5079967975616455e+00 -2.4984967708587646e+00 -2.4889967441558838e+00 -2.4794967174530029e+00 -2.4699966907501221e+00 -2.4604966640472412e+00 -2.4509966373443604e+00 -2.4414966106414795e+00 -2.4319965839385986e+00 -2.4224965572357178e+00 -2.4129965305328369e+00 -2.4034965038299561e+00 -2.3939964771270752e+00 -2.3844964504241943e+00 -2.3749964237213135e+00 -2.3654963970184326e+00 -2.3559963703155518e+00 -2.3464963436126709e+00 -2.3369963169097900e+00 -2.3274962902069092e+00 -2.3179962635040283e+00 -2.3084962368011475e+00 -2.2989962100982666e+00 -2.2894961833953857e+00 -2.2799961566925049e+00 -2.2704961299896240e+00 -2.2609961032867432e+00 -2.2514960765838623e+00 -2.2419960498809814e+00 -2.2324960231781006e+00 -2.2229959964752197e+00 -2.2134959697723389e+00 -2.2039959430694580e+00 -2.1944959163665771e+00 -2.1849958896636963e+00 -2.1754958629608154e+00 -2.1659958362579346e+00 -2.1564958095550537e+00 -2.1469957828521729e+00 -2.1374957561492920e+00 -2.1279957294464111e+00 -2.1184957027435303e+00 -2.1089956760406494e+00 -2.0994956493377686e+00 -2.0899956226348877e+00 -2.0804955959320068e+00 -2.0709955692291260e+00 -2.0614955425262451e+00 -2.0519955158233643e+00 -2.0424954891204834e+00 -2.0329954624176025e+00 -2.0234954357147217e+00 -2.0139954090118408e+00 -2.0044953823089600e+00 -1.9949953556060791e+00 -1.9854953289031982e+00 -1.9759953022003174e+00 -1.9664952754974365e+00 -1.9569952487945557e+00 -1.9474952220916748e+00 -1.9379951953887939e+00 -1.9284951686859131e+00 -1.9189951419830322e+00 -1.9094951152801514e+00 -1.8999950885772705e+00 -1.8904950618743896e+00 -1.8809950351715088e+00 -1.8714950084686279e+00 -1.8619949817657471e+00 -1.8524949550628662e+00 -1.8429949283599854e+00 -1.8334949016571045e+00 -1.8239948749542236e+00 -1.8144948482513428e+00 -1.8049948215484619e+00 -1.7954947948455811e+00 -1.7859947681427002e+00 -1.7764947414398193e+00 -1.7669947147369385e+00 -1.7574946880340576e+00 -1.7479946613311768e+00 -1.7384946346282959e+00 -1.7289946079254150e+00 -1.7194945812225342e+00 -1.7099945545196533e+00 -1.7004945278167725e+00 -1.6909945011138916e+00 -1.6814944744110107e+00 -1.6719944477081299e+00 -1.6624944210052490e+00 -1.6529943943023682e+00 -1.6434943675994873e+00 -1.6339943408966064e+00 -1.6244943141937256e+00 -1.6149942874908447e+00 -1.6054942607879639e+00 -1.5959942340850830e+00 -1.5864942073822021e+00 -1.5769941806793213e+00 -1.5674941539764404e+00 -1.5579941272735596e+00 -1.5484941005706787e+00 -1.5389940738677979e+00 -1.5294940471649170e+00 -1.5199940204620361e+00 -1.5104939937591553e+00 -1.5009939670562744e+00 -1.4914939403533936e+00 -1.4819939136505127e+00 -1.4724938869476318e+00 -1.4629938602447510e+00 -1.4534938335418701e+00 -1.4439938068389893e+00 -1.4344937801361084e+00 -1.4249937534332275e+00 -1.4154937267303467e+00 -1.4059937000274658e+00 -1.3964936733245850e+00 -1.3869936466217041e+00 -1.3774936199188232e+00 -1.3679935932159424e+00 -1.3584935665130615e+00 -1.3489935398101807e+00 -1.3394935131072998e+00 -1.3299934864044189e+00 -1.3204934597015381e+00 -1.3109934329986572e+00 -1.3014934062957764e+00 -1.2919933795928955e+00 -1.2824933528900146e+00 -1.2729933261871338e+00 -1.2634932994842529e+00 -1.2539932727813721e+00 -1.2444932460784912e+00 -1.2349932193756104e+00 -1.2254931926727295e+00 -1.2159931659698486e+00 -1.2064931392669678e+00 -1.1969931125640869e+00 -1.1874930858612061e+00 -1.1779930591583252e+00 -1.1684930324554443e+00 -1.1589930057525635e+00 -1.1494929790496826e+00 -1.1399929523468018e+00 -1.1304929256439209e+00 -1.1209928989410400e+00 -1.1114928722381592e+00 -1.1019928455352783e+00 -1.0924928188323975e+00 -1.0829927921295166e+00 -1.0734927654266357e+00 -1.0639927387237549e+00 -1.0544927120208740e+00 -1.0449926853179932e+00 -1.0354926586151123e+00 -1.0259926319122314e+00 -1.0164926052093506e+00 -1.0069925785064697e+00 -9.9749255180358887e-01 -9.8799252510070801e-01 -9.7849249839782715e-01 -9.6899247169494629e-01 -9.5949244499206543e-01 -9.4999241828918457e-01 -9.4049239158630371e-01 -9.3099236488342285e-01 -9.2149233818054199e-01 -9.1199231147766113e-01 -9.0249228477478027e-01 -8.9299225807189941e-01 -8.8349223136901855e-01 -8.7399220466613770e-01 -8.6449217796325684e-01 -8.5499215126037598e-01 -8.4549212455749512e-01 -8.3599209785461426e-01 -8.2649207115173340e-01 -8.1699204444885254e-01 -8.0749201774597168e-01 -7.9799199104309082e-01 -7.8849196434020996e-01 -7.7899193763732910e-01 -7.6949191093444824e-01 -7.5999188423156738e-01 -7.5049185752868652e-01 -7.4099183082580566e-01 -7.3149180412292480e-01 -7.2199177742004395e-01 -7.1249175071716309e-01 -7.0299172401428223e-01 -6.9349169731140137e-01 -6.8399167060852051e-01 -6.7449164390563965e-01 -6.6499161720275879e-01 -6.5549159049987793e-01 -6.4599156379699707e-01 -6.3649153709411621e-01 -6.2699151039123535e-01 -6.1749148368835449e-01 -6.0799145698547363e-01 -5.9849143028259277e-01 -5.8899140357971191e-01 -5.7949137687683105e-01 -5.6999135017395020e-01 -5.6049132347106934e-01 -5.5099129676818848e-01 -5.4149127006530762e-01 -5.3199124336242676e-01 -5.2249121665954590e-01 -5.1299118995666504e-01 -5.0349116325378418e-01 -4.9399116635322571e-01 -4.8449116945266724e-01 -4.7499117255210876e-01 -4.6549117565155029e-01 -4.5599117875099182e-01 -4.4649118185043335e-01 -4.3699118494987488e-01 -4.2749118804931641e-01 -4.1799119114875793e-01 -4.0849119424819946e-01 -3.9899119734764099e-01 -3.8949120044708252e-01 -3.7999120354652405e-01 -3.7049120664596558e-01 -3.6099120974540710e-01 -3.5149121284484863e-01 -3.4199121594429016e-01 -3.3249121904373169e-01 -3.2299122214317322e-01 -3.1349122524261475e-01 -3.0399122834205627e-01 -2.9449123144149780e-01 -2.8499123454093933e-01 -2.7549123764038086e-01 -2.6599124073982239e-01 -2.5649124383926392e-01 -2.4699124693870544e-01 -2.3749125003814697e-01 -2.2799125313758850e-01 -2.1849125623703003e-01 -2.0899125933647156e-01 -1.9949126243591309e-01 -1.8999126553535461e-01 -1.8049126863479614e-01 -1.7099127173423767e-01 -1.6149127483367920e-01 -1.5199127793312073e-01 -1.4249128103256226e-01 -1.3299128413200378e-01 -1.2349128723144531e-01 -1.1399129033088684e-01 -1.0449129343032837e-01 -9.4991296529769897e-02 -8.5491299629211426e-02 -7.5991302728652954e-02 -6.6491305828094482e-02 -5.6991305202245712e-02 -4.7491304576396942e-02 -3.7991303950548172e-02 -2.8491303324699402e-02 -1.8991302698850632e-02 -9.4913030043244362e-03 8.6966902017593384e-06 9.5086963847279549e-03 1.9008696079254150e-02 2.8508696705102921e-02 3.8008697330951691e-02 4.7508697956800461e-02 5.7008698582649231e-02 6.6508695483207703e-02 7.6008692383766174e-02 8.5508689284324646e-02 9.5008686184883118e-02 1.0450868308544159e-01 1.1400867998600006e-01 1.2350867688655853e-01 1.3300867378711700e-01 1.4250867068767548e-01 1.5200866758823395e-01 1.6150866448879242e-01 1.7100866138935089e-01 1.8050865828990936e-01 1.9000865519046783e-01 1.9950865209102631e-01 2.0900864899158478e-01 2.1850864589214325e-01 2.2800864279270172e-01 2.3750863969326019e-01 2.4700863659381866e-01 2.5650864839553833e-01 2.6600864529609680e-01 2.7550864219665527e-01 2.8500863909721375e-01 2.9450863599777222e-01 3.0400863289833069e-01 3.1350862979888916e-01 3.2300862669944763e-01 3.3250862360000610e-01 3.4200862050056458e-01 3.5150861740112305e-01 3.6100861430168152e-01 3.7050861120223999e-01 3.8000860810279846e-01 3.8950860500335693e-01 3.9900860190391541e-01 4.0850859880447388e-01 4.1800859570503235e-01 4.2750859260559082e-01 4.3700858950614929e-01 4.4650858640670776e-01 4.5600858330726624e-01 4.6550858020782471e-01 4.7500857710838318e-01 4.8450857400894165e-01 4.9400857090950012e-01 5.0350856781005859e-01 5.1300859451293945e-01 5.2250862121582031e-01 5.3200864791870117e-01 5.4150867462158203e-01 5.5100870132446289e-01 5.6050872802734375e-01 5.7000875473022461e-01 5.7950878143310547e-01 5.8900880813598633e-01 5.9850883483886719e-01 6.0800886154174805e-01 6.1750888824462891e-01 6.2700891494750977e-01 6.3650894165039062e-01 6.4600896835327148e-01 6.5550899505615234e-01 6.6500902175903320e-01 6.7450904846191406e-01 6.8400907516479492e-01 6.9350910186767578e-01 7.0300912857055664e-01 7.1250915527343750e-01 7.2200918197631836e-01 7.3150920867919922e-01 7.4100923538208008e-01 7.5050926208496094e-01 7.6000928878784180e-01 7.6950931549072266e-01 7.7900934219360352e-01 7.8850936889648438e-01 7.9800939559936523e-01 8.0750942230224609e-01 8.1700944900512695e-01 8.2650947570800781e-01 8.3600950241088867e-01 8.4550952911376953e-01 8.5500955581665039e-01 8.6450958251953125e-01 8.7400960922241211e-01 8.8350963592529297e-01 8.9300966262817383e-01 9.0250968933105469e-01 9.1200971603393555e-01 9.2150974273681641e-01 9.3100976943969727e-01 9.4050979614257812e-01 9.5000982284545898e-01 9.5950984954833984e-01 9.6900987625122070e-01 9.7850990295410156e-01 9.8800992965698242e-01 9.9750995635986328e-01 1.0070099830627441e+00 1.0165100097656250e+00 1.0260100364685059e+00 1.0355100631713867e+00 1.0450100898742676e+00 1.0545101165771484e+00 1.0640101432800293e+00 1.0735101699829102e+00 1.0830101966857910e+00 1.0925102233886719e+00 1.1020102500915527e+00 1.1115102767944336e+00 1.1210103034973145e+00 1.1305103302001953e+00 1.1400103569030762e+00 1.1495103836059570e+00 1.1590104103088379e+00 1.1685104370117188e+00 1.1780104637145996e+00 1.1875104904174805e+00 1.1970105171203613e+00 1.2065105438232422e+00 1.2160105705261230e+00 1.2255105972290039e+00 1.2350106239318848e+00 1.2445106506347656e+00 1.2540106773376465e+00 1.2635107040405273e+00 1.2730107307434082e+00 1.2825107574462891e+00 1.2920107841491699e+00 1.3015108108520508e+00 1.3110108375549316e+00 1.3205108642578125e+00 1.3300108909606934e+00 1.3395109176635742e+00 1.3490109443664551e+00 1.3585109710693359e+00 1.3680109977722168e+00 1.3775110244750977e+00 1.3870110511779785e+00 1.3965110778808594e+00 1.4060111045837402e+00 1.4155111312866211e+00 1.4250111579895020e+00 1.4345111846923828e+00 1.4440112113952637e+00 1.4535112380981445e+00 1.4630112648010254e+00 1.4725112915039062e+00 1.4820113182067871e+00 1.4915113449096680e+00 1.5010113716125488e+00 1.5105113983154297e+00 1.5200114250183105e+00 1.5295114517211914e+00 1.5390114784240723e+00 1.5485115051269531e+00 1.5580115318298340e+00 1.5675115585327148e+00 1.5770115852355957e+00 1.5865116119384766e+00 1.5960116386413574e+00 1.6055116653442383e+00 1.6150116920471191e+00 1.6245117187500000e+00 1.6340117454528809e+00 1.6435117721557617e+00 1.6530117988586426e+00 1.6625118255615234e+00 1.6720118522644043e+00 1.6815118789672852e+00 1.6910119056701660e+00 1.7005119323730469e+00 1.7100119590759277e+00 1.7195119857788086e+00 1.7290120124816895e+00 1.7385120391845703e+00 1.7480120658874512e+00 1.7575120925903320e+00 1.7670121192932129e+00 1.7765121459960938e+00 1.7860121726989746e+00 1.7955121994018555e+00 1.8050122261047363e+00 1.8145122528076172e+00 1.8240122795104980e+00 1.8335123062133789e+00 1.8430123329162598e+00 1.8525123596191406e+00 1.8620123863220215e+00 1.8715124130249023e+00 1.8810124397277832e+00 1.8905124664306641e+00 1.9000124931335449e+00 1.9095125198364258e+00 1.9190125465393066e+00 1.9285125732421875e+00 1.9380125999450684e+00 1.9475126266479492e+00 1.9570126533508301e+00 1.9665126800537109e+00 1.9760127067565918e+00 1.9855127334594727e+00 1.9950127601623535e+00 2.0045127868652344e+00 2.0140128135681152e+00 2.0235128402709961e+00 2.0330128669738770e+00 2.0425128936767578e+00 2.0520129203796387e+00 2.0615129470825195e+00 2.0710129737854004e+00 2.0805130004882812e+00 2.0900130271911621e+00 2.0995130538940430e+00 2.1090130805969238e+00 2.1185131072998047e+00 2.1280131340026855e+00 2.1375131607055664e+00 2.1470131874084473e+00 2.1565132141113281e+00 2.1660132408142090e+00 2.1755132675170898e+00 2.1850132942199707e+00 2.1945133209228516e+00 2.2040133476257324e+00 2.2135133743286133e+00 2.2230134010314941e+00 2.2325134277343750e+00 2.2420134544372559e+00 2.2515134811401367e+00 2.2610135078430176e+00 2.2705135345458984e+00 2.2800135612487793e+00 2.2895135879516602e+00 2.2990136146545410e+00 2.3085136413574219e+00 2.3180136680603027e+00 2.3275136947631836e+00 2.3370137214660645e+00 2.3465137481689453e+00 2.3560137748718262e+00 2.3655138015747070e+00 2.3750138282775879e+00 2.3845138549804688e+00 2.3940138816833496e+00 2.4035139083862305e+00 2.4130139350891113e+00 2.4225139617919922e+00 2.4320139884948730e+00 2.4415140151977539e+00 2.4510140419006348e+00 2.4605140686035156e+00 2.4700140953063965e+00 2.4795141220092773e+00 2.4890141487121582e+00 2.4985141754150391e+00 2.5080142021179199e+00 2.5175142288208008e+00 2.5270142555236816e+00 2.5365142822265625e+00 2.5460143089294434e+00 2.5555143356323242e+00 2.5650143623352051e+00 2.5745143890380859e+00 2.5840144157409668e+00 2.5935144424438477e+00 2.6030144691467285e+00 2.6125144958496094e+00 2.6220145225524902e+00 2.6315145492553711e+00 2.6410145759582520e+00 2.6505146026611328e+00 2.6600146293640137e+00 2.6695146560668945e+00 2.6790146827697754e+00 2.6885147094726562e+00 2.6980147361755371e+00 2.7075147628784180e+00 2.7170147895812988e+00 2.7265148162841797e+00 2.7360148429870605e+00 2.7455148696899414e+00 2.7550148963928223e+00 2.7645149230957031e+00 2.7740149497985840e+00 2.7835149765014648e+00 2.7930150032043457e+00 2.8025150299072266e+00 2.8120150566101074e+00 2.8215150833129883e+00 2.8310151100158691e+00 2.8405151367187500e+00 2.8500151634216309e+00 2.8595151901245117e+00 2.8690152168273926e+00 2.8785152435302734e+00 2.8880152702331543e+00 2.8975152969360352e+00 2.9070153236389160e+00 2.9165153503417969e+00 2.9260153770446777e+00 2.9355154037475586e+00 2.9450154304504395e+00 2.9545154571533203e+00 2.9640154838562012e+00 2.9735155105590820e+00 2.9830155372619629e+00 2.9925155639648438e+00 3.0020155906677246e+00 3.0115156173706055e+00 3.0210156440734863e+00 3.0305156707763672e+00 3.0400156974792480e+00 3.0495157241821289e+00 3.0590157508850098e+00 3.0685157775878906e+00 3.0780158042907715e+00 3.0875158309936523e+00 3.0970158576965332e+00 3.1065158843994141e+00 3.1160159111022949e+00 3.1255159378051758e+00 3.1350159645080566e+00 3.1445159912109375e+00 3.1540160179138184e+00 3.1635160446166992e+00 3.1730160713195801e+00 3.1825160980224609e+00 3.1920161247253418e+00 3.2015161514282227e+00 3.2110161781311035e+00 3.2205162048339844e+00 3.2300162315368652e+00 3.2395162582397461e+00 3.2490162849426270e+00 3.2585163116455078e+00 3.2680163383483887e+00 3.2775163650512695e+00 3.2870163917541504e+00 3.2965164184570312e+00 3.3060164451599121e+00 3.3155164718627930e+00 3.3250164985656738e+00 3.3345165252685547e+00 3.3440165519714355e+00 3.3535165786743164e+00 3.3630166053771973e+00 3.3725166320800781e+00 3.3820166587829590e+00 3.3915166854858398e+00 3.4010167121887207e+00 3.4105167388916016e+00 3.4200167655944824e+00 3.4295167922973633e+00 3.4390168190002441e+00 3.4485168457031250e+00 3.4580168724060059e+00 3.4675168991088867e+00 3.4770169258117676e+00 3.4865169525146484e+00 3.4960169792175293e+00 3.5055170059204102e+00 3.5150170326232910e+00 3.5245170593261719e+00 3.5340170860290527e+00 3.5435171127319336e+00 3.5530171394348145e+00 3.5625171661376953e+00 3.5720171928405762e+00 3.5815172195434570e+00 3.5910172462463379e+00 3.6005172729492188e+00 3.6100172996520996e+00 3.6195173263549805e+00 3.6290173530578613e+00 3.6385173797607422e+00 3.6500000953674316e+00 3.6500000953674316e+00 3.6384999752044678e+00 3.6289999485015869e+00 3.6194999217987061e+00 3.6099998950958252e+00 3.6004998683929443e+00 3.5909998416900635e+00 3.5814998149871826e+00 3.5719997882843018e+00 3.5624997615814209e+00 3.5529997348785400e+00 3.5434997081756592e+00 3.5339996814727783e+00 3.5244996547698975e+00 3.5149996280670166e+00 3.5054996013641357e+00 3.4959995746612549e+00 3.4864995479583740e+00 3.4769995212554932e+00 3.4674994945526123e+00 3.4579994678497314e+00 3.4484994411468506e+00 3.4389994144439697e+00 3.4294993877410889e+00 3.4199993610382080e+00 3.4104993343353271e+00 3.4009993076324463e+00 3.3914992809295654e+00 3.3819992542266846e+00 3.3724992275238037e+00 3.3629992008209229e+00 3.3534991741180420e+00 3.3439991474151611e+00 3.3344991207122803e+00 3.3249990940093994e+00 3.3154990673065186e+00 3.3059990406036377e+00 3.2964990139007568e+00 3.2869989871978760e+00 3.2774989604949951e+00 3.2679989337921143e+00 3.2584989070892334e+00 3.2489988803863525e+00 3.2394988536834717e+00 3.2299988269805908e+00 3.2204988002777100e+00 3.2109987735748291e+00 3.2014987468719482e+00 3.1919987201690674e+00 3.1824986934661865e+00 3.1729986667633057e+00 3.1634986400604248e+00 3.1539986133575439e+00 3.1444985866546631e+00 3.1349985599517822e+00 3.1254985332489014e+00 3.1159985065460205e+00 3.1064984798431396e+00 3.0969984531402588e+00 3.0874984264373779e+00 3.0779983997344971e+00 3.0684983730316162e+00 3.0589983463287354e+00 3.0494983196258545e+00 3.0399982929229736e+00 3.0304982662200928e+00 3.0209982395172119e+00 3.0114982128143311e+00 3.0019981861114502e+00 2.9924981594085693e+00 2.9829981327056885e+00 2.9734981060028076e+00 2.9639980792999268e+00 2.9544980525970459e+00 2.9449980258941650e+00 2.9354979991912842e+00 2.9259979724884033e+00 2.9164979457855225e+00 2.9069979190826416e+00 2.8974978923797607e+00 2.8879978656768799e+00 2.8784978389739990e+00 2.8689978122711182e+00 2.8594977855682373e+00 2.8499977588653564e+00 2.8404977321624756e+00 2.8309977054595947e+00 2.8214976787567139e+00 2.8119976520538330e+00 2.8024976253509521e+00 2.7929975986480713e+00 2.7834975719451904e+00 2.7739975452423096e+00 2.7644975185394287e+00 2.7549974918365479e+00 2.7454974651336670e+00 2.7359974384307861e+00 2.7264974117279053e+00 2.7169973850250244e+00 2.7074973583221436e+00 2.6979973316192627e+00 2.6884973049163818e+00 2.6789972782135010e+00 2.6694972515106201e+00 2.6599972248077393e+00 2.6504971981048584e+00 2.6409971714019775e+00 2.6314971446990967e+00 2.6219971179962158e+00 2.6124970912933350e+00 2.6029970645904541e+00 2.5934970378875732e+00 2.5839970111846924e+00 2.5744969844818115e+00 2.5649969577789307e+00 2.5554969310760498e+00 2.5459969043731689e+00 2.5364968776702881e+00 2.5269968509674072e+00 2.5174968242645264e+00 2.5079967975616455e+00 2.4984967708587646e+00 2.4889967441558838e+00 2.4794967174530029e+00 2.4699966907501221e+00 2.4604966640472412e+00 2.4509966373443604e+00 2.4414966106414795e+00 2.4319965839385986e+00 2.4224965572357178e+00 2.4129965305328369e+00 2.4034965038299561e+00 2.3939964771270752e+00 2.3844964504241943e+00 2.3749964237213135e+00 2.3654963970184326e+00 2.3559963703155518e+00 2.3464963436126709e+00 2.3369963169097900e+00 2.3274962902069092e+00 2.3179962635040283e+00 2.3084962368011475e+00 2.2989962100982666e+00 2.2894961833953857e+00 2.2799961566925049e+00 2.2704961299896240e+00 2.2609961032867432e+00 2.2514960765838623e+00 2.2419960498809814e+00 2.2324960231781006e+00 2.2229959964752197e+00 2.2134959697723389e+00 2.2039959430694580e+00 2.1944959163665771e+00 2.1849958896636963e+00 2.1754958629608154e+00 2.1659958362579346e+00 2.1564958095550537e+00 2.1469957828521729e+00 2.1374957561492920e+00 2.1279957294464111e+00 2.1184957027435303e+00 2.1089956760406494e+00 2.0994956493377686e+00 2.0899956226348877e+00 2.0804955959320068e+00 2.0709955692291260e+00 2.0614955425262451e+00 2.0519955158233643e+00 2.0424954891204834e+00 2.0329954624176025e+00 2.0234954357147217e+00 2.0139954090118408e+00 2.0044953823089600e+00 1.9949953556060791e+00 1.9854953289031982e+00 1.9759953022003174e+00 1.9664952754974365e+00 1.9569952487945557e+00 1.9474952220916748e+00 1.9379951953887939e+00 1.9284951686859131e+00 1.9189951419830322e+00 1.9094951152801514e+00 1.8999950885772705e+00 1.8904950618743896e+00 1.8809950351715088e+00 1.8714950084686279e+00 1.8619949817657471e+00 1.8524949550628662e+00 1.8429949283599854e+00 1.8334949016571045e+00 1.8239948749542236e+00 1.8144948482513428e+00 1.8049948215484619e+00 1.7954947948455811e+00 1.7859947681427002e+00 1.7764947414398193e+00 1.7669947147369385e+00 1.7574946880340576e+00 1.7479946613311768e+00 1.7384946346282959e+00 1.7289946079254150e+00 1.7194945812225342e+00 1.7099945545196533e+00 1.7004945278167725e+00 1.6909945011138916e+00 1.6814944744110107e+00 1.6719944477081299e+00 1.6624944210052490e+00 1.6529943943023682e+00 1.6434943675994873e+00 1.6339943408966064e+00 1.6244943141937256e+00 1.6149942874908447e+00 1.6054942607879639e+00 1.5959942340850830e+00 1.5864942073822021e+00 1.5769941806793213e+00 1.5674941539764404e+00 1.5579941272735596e+00 1.5484941005706787e+00 1.5389940738677979e+00 1.5294940471649170e+00 1.5199940204620361e+00 1.5104939937591553e+00 1.5009939670562744e+00 1.4914939403533936e+00 1.4819939136505127e+00 1.4724938869476318e+00 1.4629938602447510e+00 1.4534938335418701e+00 1.4439938068389893e+00 1.4344937801361084e+00 1.4249937534332275e+00 1.4154937267303467e+00 1.4059937000274658e+00 1.3964936733245850e+00 1.3869936466217041e+00 1.3774936199188232e+00 1.3679935932159424e+00 1.3584935665130615e+00 1.3489935398101807e+00 1.3394935131072998e+00 1.3299934864044189e+00 1.3204934597015381e+00 1.3109934329986572e+00 1.3014934062957764e+00 1.2919933795928955e+00 1.2824933528900146e+00 1.2729933261871338e+00 1.2634932994842529e+00 1.2539932727813721e+00 1.2444932460784912e+00 1.2349932193756104e+00 1.2254931926727295e+00 1.2159931659698486e+00 1.2064931392669678e+00 1.1969931125640869e+00 1.1874930858612061e+00 1.1779930591583252e+00 1.1684930324554443e+00 1.1589930057525635e+00 1.1494929790496826e+00 1.1399929523468018e+00 1.1304929256439209e+00 1.1209928989410400e+00 1.1114928722381592e+00 1.1019928455352783e+00 1.0924928188323975e+00 1.0829927921295166e+00 1.0734927654266357e+00 1.0639927387237549e+00 1.0544927120208740e+00 1.0449926853179932e+00 1.0354926586151123e+00 1.0259926319122314e+00 1.0164926052093506e+00 1.0069925785064697e+00 9.9749255180358887e-01 9.8799252510070801e-01 9.7849249839782715e-01 9.6899247169494629e-01 9.5949244499206543e-01 9.4999241828918457e-01 9.4049239158630371e-01 9.3099236488342285e-01 9.2149233818054199e-01 9.1199231147766113e-01 9.0249228477478027e-01 8.9299225807189941e-01 8.8349223136901855e-01 8.7399220466613770e-01 8.6449217796325684e-01 8.5499215126037598e-01 8.4549212455749512e-01 8.3599209785461426e-01 8.2649207115173340e-01 8.1699204444885254e-01 8.0749201774597168e-01 7.9799199104309082e-01 7.8849196434020996e-01 7.7899193763732910e-01 7.6949191093444824e-01 7.5999188423156738e-01 7.5049185752868652e-01 7.4099183082580566e-01 7.3149180412292480e-01 7.2199177742004395e-01 7.1249175071716309e-01 7.0299172401428223e-01 6.9349169731140137e-01 6.8399167060852051e-01 6.7449164390563965e-01 6.6499161720275879e-01 6.5549159049987793e-01 6.4599156379699707e-01 6.3649153709411621e-01 6.2699151039123535e-01 6.1749148368835449e-01 6.0799145698547363e-01 5.9849143028259277e-01 5.8899140357971191e-01 5.7949137687683105e-01 5.6999135017395020e-01 5.6049132347106934e-01 5.5099129676818848e-01 5.4149127006530762e-01 5.3199124336242676e-01 5.2249121665954590e-01 5.1299118995666504e-01 5.0349116325378418e-01 4.9399116635322571e-01 4.8449116945266724e-01 4.7499117255210876e-01 4.6549117565155029e-01 4.5599117875099182e-01 4.4649118185043335e-01 4.3699118494987488e-01 4.2749118804931641e-01 4.1799119114875793e-01 4.0849119424819946e-01 3.9899119734764099e-01 3.8949120044708252e-01 3.7999120354652405e-01 3.7049120664596558e-01 3.6099120974540710e-01 3.5149121284484863e-01 3.4199121594429016e-01 3.3249121904373169e-01 3.2299122214317322e-01 3.1349122524261475e-01 3.0399122834205627e-01 2.9449123144149780e-01 2.8499123454093933e-01 2.7549123764038086e-01 2.6599124073982239e-01 2.5649124383926392e-01 2.4699124693870544e-01 2.3749125003814697e-01 2.2799125313758850e-01 2.1849125623703003e-01 2.0899125933647156e-01 1.9949126243591309e-01 1.8999126553535461e-01 1.8049126863479614e-01 1.7099127173423767e-01 1.6149127483367920e-01 1.5199127793312073e-01 1.4249128103256226e-01 1.3299128413200378e-01 1.2349128723144531e-01 1.1399129033088684e-01 1.0449129343032837e-01 9.4991296529769897e-02 8.5491299629211426e-02 7.5991302728652954e-02 6.6491305828094482e-02 5.6991305202245712e-02 4.7491304576396942e-02 3.7991303950548172e-02 2.8491303324699402e-02 1.8991302698850632e-02 9.4913030043244362e-03 -8.6966902017593384e-06 -9.5086963847279549e-03 -1.9008696079254150e-02 -2.8508696705102921e-02 -3.8008697330951691e-02 -4.7508697956800461e-02 -5.7008698582649231e-02 -6.6508695483207703e-02 -7.6008692383766174e-02 -8.5508689284324646e-02 -9.5008686184883118e-02 -1.0450868308544159e-01 -1.1400867998600006e-01 -1.2350867688655853e-01 -1.3300867378711700e-01 -1.4250867068767548e-01 -1.5200866758823395e-01 -1.6150866448879242e-01 -1.7100866138935089e-01 -1.8050865828990936e-01 -1.9000865519046783e-01 -1.9950865209102631e-01 -2.0900864899158478e-01 -2.1850864589214325e-01 -2.2800864279270172e-01 -2.3750863969326019e-01 -2.4700863659381866e-01 -2.5650864839553833e-01 -2.6600864529609680e-01 -2.7550864219665527e-01 -2.8500863909721375e-01 -2.9450863599777222e-01 -3.0400863289833069e-01 -3.1350862979888916e-01 -3.2300862669944763e-01 -3.3250862360000610e-01 -3.4200862050056458e-01 -3.5150861740112305e-01 -3.6100861430168152e-01 -3.7050861120223999e-01 -3.8000860810279846e-01 -3.8950860500335693e-01 -3.9900860190391541e-01 -4.0850859880447388e-01 -4.1800859570503235e-01 -4.2750859260559082e-01 -4.3700858950614929e-01 -4.4650858640670776e-01 -4.5600858330726624e-01 -4.6550858020782471e-01 -4.7500857710838318e-01 -4.8450857400894165e-01 -4.9400857090950012e-01 -5.0350856781005859e-01 -5.1300859451293945e-01 -5.2250862121582031e-01 -5.3200864791870117e-01 -5.4150867462158203e-01 -5.5100870132446289e-01 -5.6050872802734375e-01 -5.7000875473022461e-01 -5.7950878143310547e-01 -5.8900880813598633e-01 -5.9850883483886719e-01 -6.0800886154174805e-01 -6.1750888824462891e-01 -6.2700891494750977e-01 -6.3650894165039062e-01 -6.4600896835327148e-01 -6.5550899505615234e-01 -6.6500902175903320e-01 -6.7450904846191406e-01 -6.8400907516479492e-01 -6.9350910186767578e-01 -7.0300912857055664e-01 -7.1250915527343750e-01 -7.2200918197631836e-01 -7.3150920867919922e-01 -7.4100923538208008e-01 -7.5050926208496094e-01 -7.6000928878784180e-01 -7.6950931549072266e-01 -7.7900934219360352e-01 -7.8850936889648438e-01 -7.9800939559936523e-01 -8.0750942230224609e-01 -8.1700944900512695e-01 -8.2650947570800781e-01 -8.3600950241088867e-01 -8.4550952911376953e-01 -8.5500955581665039e-01 -8.6450958251953125e-01 -8.7400960922241211e-01 -8.8350963592529297e-01 -8.9300966262817383e-01 -9.0250968933105469e-01 -9.1200971603393555e-01 -9.2150974273681641e-01 -9.3100976943969727e-01 -9.4050979614257812e-01 -9.5000982284545898e-01 -9.5950984954833984e-01 -9.6900987625122070e-01 -9.7850990295410156e-01 -9.8800992965698242e-01 -9.9750995635986328e-01 -1.0070099830627441e+00 -1.0165100097656250e+00 -1.0260100364685059e+00 -1.0355100631713867e+00 -1.0450100898742676e+00 -1.0545101165771484e+00 -1.0640101432800293e+00 -1.0735101699829102e+00 -1.0830101966857910e+00 -1.0925102233886719e+00 -1.1020102500915527e+00 -1.1115102767944336e+00 -1.1210103034973145e+00 -1.1305103302001953e+00 -1.1400103569030762e+00 -1.1495103836059570e+00 -1.1590104103088379e+00 -1.1685104370117188e+00 -1.1780104637145996e+00 -1.1875104904174805e+00 -1.1970105171203613e+00 -1.2065105438232422e+00 -1.2160105705261230e+00 -1.2255105972290039e+00 -1.2350106239318848e+00 -1.2445106506347656e+00 -1.2540106773376465e+00 -1.2635107040405273e+00 -1.2730107307434082e+00 -1.2825107574462891e+00 -1.2920107841491699e+00 -1.3015108108520508e+00 -1.3110108375549316e+00 -1.3205108642578125e+00 -1.3300108909606934e+00 -1.3395109176635742e+00 -1.3490109443664551e+00 -1.3585109710693359e+00 -1.3680109977722168e+00 -1.3775110244750977e+00 -1.3870110511779785e+00 -1.3965110778808594e+00 -1.4060111045837402e+00 -1.4155111312866211e+00 -1.4250111579895020e+00 -1.4345111846923828e+00 -1.4440112113952637e+00 -1.4535112380981445e+00 -1.4630112648010254e+00 -1.4725112915039062e+00 -1.4820113182067871e+00 -1.4915113449096680e+00 -1.5010113716125488e+00 -1.5105113983154297e+00 -1.5200114250183105e+00 -1.5295114517211914e+00 -1.5390114784240723e+00 -1.5485115051269531e+00 -1.5580115318298340e+00 -1.5675115585327148e+00 -1.5770115852355957e+00 -1.5865116119384766e+00 -1.5960116386413574e+00 -1.6055116653442383e+00 -1.6150116920471191e+00 -1.6245117187500000e+00 -1.6340117454528809e+00 -1.6435117721557617e+00 -1.6530117988586426e+00 -1.6625118255615234e+00 -1.6720118522644043e+00 -1.6815118789672852e+00 -1.6910119056701660e+00 -1.7005119323730469e+00 -1.7100119590759277e+00 -1.7195119857788086e+00 -1.7290120124816895e+00 -1.7385120391845703e+00 -1.7480120658874512e+00 -1.7575120925903320e+00 -1.7670121192932129e+00 -1.7765121459960938e+00 -1.7860121726989746e+00 -1.7955121994018555e+00 -1.8050122261047363e+00 -1.8145122528076172e+00 -1.8240122795104980e+00 -1.8335123062133789e+00 -1.8430123329162598e+00 -1.8525123596191406e+00 -1.8620123863220215e+00 -1.8715124130249023e+00 -1.8810124397277832e+00 -1.8905124664306641e+00 -1.9000124931335449e+00 -1.9095125198364258e+00 -1.9190125465393066e+00 -1.9285125732421875e+00 -1.9380125999450684e+00 -1.9475126266479492e+00 -1.9570126533508301e+00 -1.9665126800537109e+00 -1.9760127067565918e+00 -1.9855127334594727e+00 -1.9950127601623535e+00 -2.0045127868652344e+00 -2.0140128135681152e+00 -2.0235128402709961e+00 -2.0330128669738770e+00 -2.0425128936767578e+00 -2.0520129203796387e+00 -2.0615129470825195e+00 -2.0710129737854004e+00 -2.0805130004882812e+00 -2.0900130271911621e+00 -2.0995130538940430e+00 -2.1090130805969238e+00 -2.1185131072998047e+00 -2.1280131340026855e+00 -2.1375131607055664e+00 -2.1470131874084473e+00 -2.1565132141113281e+00 -2.1660132408142090e+00 -2.1755132675170898e+00 -2.1850132942199707e+00 -2.1945133209228516e+00 -2.2040133476257324e+00 -2.2135133743286133e+00 -2.2230134010314941e+00 -2.2325134277343750e+00 -2.2420134544372559e+00 -2.2515134811401367e+00 -2.2610135078430176e+00 -2.2705135345458984e+00 -2.2800135612487793e+00 -2.2895135879516602e+00 -2.2990136146545410e+00 -2.3085136413574219e+00 -2.3180136680603027e+00 -2.3275136947631836e+00 -2.3370137214660645e+00 -2.3465137481689453e+00 -2.3560137748718262e+00 -2.3655138015747070e+00 -2.3750138282775879e+00 -2.3845138549804688e+00 -2.3940138816833496e+00 -2.4035139083862305e+00 -2.4130139350891113e+00 -2.4225139617919922e+00 -2.4320139884948730e+00 -2.4415140151977539e+00 -2.4510140419006348e+00 -2.4605140686035156e+00 -2.4700140953063965e+00 -2.4795141220092773e+00 -2.4890141487121582e+00 -2.4985141754150391e+00 -2.5080142021179199e+00 -2.5175142288208008e+00 -2.5270142555236816e+00 -2.5365142822265625e+00 -2.5460143089294434e+00 -2.5555143356323242e+00 -2.5650143623352051e+00 -2.5745143890380859e+00 -2.5840144157409668e+00 -2.5935144424438477e+00 -2.6030144691467285e+00 -2.6125144958496094e+00 -2.6220145225524902e+00 -2.6315145492553711e+00 -2.6410145759582520e+00 -2.6505146026611328e+00 -2.6600146293640137e+00 -2.6695146560668945e+00 -2.6790146827697754e+00 -2.6885147094726562e+00 -2.6980147361755371e+00 -2.7075147628784180e+00 -2.7170147895812988e+00 -2.7265148162841797e+00 -2.7360148429870605e+00 -2.7455148696899414e+00 -2.7550148963928223e+00 -2.7645149230957031e+00 -2.7740149497985840e+00 -2.7835149765014648e+00 -2.7930150032043457e+00 -2.8025150299072266e+00 -2.8120150566101074e+00 -2.8215150833129883e+00 -2.8310151100158691e+00 -2.8405151367187500e+00 -2.8500151634216309e+00 -2.8595151901245117e+00 -2.8690152168273926e+00 -2.8785152435302734e+00 -2.8880152702331543e+00 -2.8975152969360352e+00 -2.9070153236389160e+00 -2.9165153503417969e+00 -2.9260153770446777e+00 -2.9355154037475586e+00 -2.9450154304504395e+00 -2.9545154571533203e+00 -2.9640154838562012e+00 -2.9735155105590820e+00 -2.9830155372619629e+00 -2.9925155639648438e+00 -3.0020155906677246e+00 -3.0115156173706055e+00 -3.0210156440734863e+00 -3.0305156707763672e+00 -3.0400156974792480e+00 -3.0495157241821289e+00 -3.0590157508850098e+00 -3.0685157775878906e+00 -3.0780158042907715e+00 -3.0875158309936523e+00 -3.0970158576965332e+00 -3.1065158843994141e+00 -3.1160159111022949e+00 -3.1255159378051758e+00 -3.1350159645080566e+00 -3.1445159912109375e+00 -3.1540160179138184e+00 -3.1635160446166992e+00 -3.1730160713195801e+00 -3.1825160980224609e+00 -3.1920161247253418e+00 -3.2015161514282227e+00 -3.2110161781311035e+00 -3.2205162048339844e+00 -3.2300162315368652e+00 -3.2395162582397461e+00 -3.2490162849426270e+00 -3.2585163116455078e+00 -3.2680163383483887e+00 -3.2775163650512695e+00 -3.2870163917541504e+00 -3.2965164184570312e+00 -3.3060164451599121e+00 -3.3155164718627930e+00 -3.3250164985656738e+00 -3.3345165252685547e+00 -3.3440165519714355e+00 -3.3535165786743164e+00 -3.3630166053771973e+00 -3.3725166320800781e+00 -3.3820166587829590e+00 -3.3915166854858398e+00 -3.4010167121887207e+00 -3.4105167388916016e+00 -3.4200167655944824e+00 -3.4295167922973633e+00 -3.4390168190002441e+00 -3.4485168457031250e+00 -3.4580168724060059e+00 -3.4675168991088867e+00 -3.4770169258117676e+00 -3.4865169525146484e+00 -3.4960169792175293e+00 -3.5055170059204102e+00 -3.5150170326232910e+00 -3.5245170593261719e+00 -3.5340170860290527e+00 -3.5435171127319336e+00 -3.5530171394348145e+00 -3.5625171661376953e+00 -3.5720171928405762e+00 -3.5815172195434570e+00 -3.5910172462463379e+00 -3.6005172729492188e+00 -3.6100172996520996e+00 -3.6195173263549805e+00 -3.6290173530578613e+00 -3.6385173797607422e+00 -3.6500000953674316e+00
+Matrix 0 0 1 1 1 -1.4963742494583130e+00 3.8011395931243896e+00 -1.0708000183105469e+01 9.5105659961700439e-01 3.0901715159416199e-01 7.1775829724174400e-08 3.0901712179183960e-01 -9.5105648040771484e-01 9.8790948754867713e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 1 0 1 1 2 -1.4963735342025757e+00 3.8011395931243896e+00 -3.5360002517700195e+00 9.5105659961700439e-01 3.0901715159416199e-01 7.1775829724174400e-08 3.0901712179183960e-01 -9.5105648040771484e-01 9.8790948754867713e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 2 0 1 1 3 -1.4963729381561279e+00 3.8011395931243896e+00 3.5359997749328613e+00 9.5105659961700439e-01 3.0901715159416199e-01 7.1775829724174400e-08 3.0901712179183960e-01 -9.5105648040771484e-01 9.8790948754867713e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 3 0 1 1 4 -1.4963723421096802e+00 3.8011395931243896e+00 1.0708000183105469e+01 9.5105659961700439e-01 3.0901715159416199e-01 7.1775829724174400e-08 3.0901712179183960e-01 -9.5105648040771484e-01 9.8790948754867713e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 4 0 1 2 1 -2.4850109219551086e-01 3.8206000328063965e+00 -1.0708000183105469e+01 1.0000000000000000e+00 0.0000000000000000e+00 8.7422776573475858e-08 3.1786509424591713e-08 -1.0000000000000000e+00 8.7422776573475858e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 5 0 1 2 2 -2.4850046634674072e-01 3.8206000328063965e+00 -3.5360002517700195e+00 1.0000000000000000e+00 0.0000000000000000e+00 8.7422776573475858e-08 3.1786509424591713e-08 -1.0000000000000000e+00 8.7422776573475858e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 6 0 1 2 3 -2.4849984049797058e-01 3.8206000328063965e+00 3.5359997749328613e+00 1.0000000000000000e+00 0.0000000000000000e+00 8.7422776573475858e-08 3.1786509424591713e-08 -1.0000000000000000e+00 8.7422776573475858e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 7 0 1 2 4 -2.4849921464920044e-01 3.8206000328063965e+00 1.0708000183105469e+01 1.0000000000000000e+00 0.0000000000000000e+00 8.7422776573475858e-08 3.1786509424591713e-08 -1.0000000000000000e+00 8.7422776573475858e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 8 0 1 3 1 1.0236613750457764e+00 3.9547333717346191e+00 -1.0708000183105469e+01 9.5105665922164917e-01 -3.0901688337326050e-01 7.0726514422858600e-08 -3.0901682376861572e-01 -9.5105671882629395e-01 1.6696267479687776e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 9 0 1 3 2 1.0236619710922241e+00 3.9547333717346191e+00 -3.5360000133514404e+00 9.5105665922164917e-01 -3.0901688337326050e-01 7.0726514422858600e-08 -3.0901682376861572e-01 -9.5105671882629395e-01 1.6696267479687776e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 10 0 1 3 3 1.0236626863479614e+00 3.9547333717346191e+00 3.5360000133514404e+00 9.5105665922164917e-01 -3.0901688337326050e-01 7.0726514422858600e-08 -3.0901682376861572e-01 -9.5105671882629395e-01 1.6696267479687776e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 11 0 1 3 4 1.0236632823944092e+00 3.9547333717346191e+00 1.0708000183105469e+01 9.5105665922164917e-01 -3.0901688337326050e-01 7.0726514422858600e-08 -3.0901682376861572e-01 -9.5105671882629395e-01 1.6696267479687776e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 12 0 1 4 1 2.0446505546569824e+00 3.2369956970214844e+00 -1.0708000183105469e+01 8.0901694297790527e-01 -5.8778524398803711e-01 6.1056155686856073e-08 -5.8778518438339233e-01 -8.0901718139648438e-01 9.6703480778614903e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 13 0 1 4 2 2.0446512699127197e+00 3.2369956970214844e+00 -3.5359997749328613e+00 8.0901694297790527e-01 -5.8778524398803711e-01 6.1056155686856073e-08 -5.8778518438339233e-01 -8.0901718139648438e-01 9.6703480778614903e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 14 0 1 4 3 2.0446517467498779e+00 3.2369956970214844e+00 3.5360002517700195e+00 8.0901694297790527e-01 -5.8778524398803711e-01 6.1056155686856073e-08 -5.8778518438339233e-01 -8.0901718139648438e-01 9.6703480778614903e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 15 0 1 4 4 2.0446524620056152e+00 3.2369956970214844e+00 1.0708000183105469e+01 8.0901694297790527e-01 -5.8778524398803711e-01 6.1056155686856073e-08 -5.8778518438339233e-01 -8.0901718139648438e-01 9.6703480778614903e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 16 0 1 5 1 3.1526522636413574e+00 2.5978021621704102e+00 -1.0708000183105469e+01 5.8779805898666382e-01 -8.0900776386260986e-01 7.6703273066414113e-08 -8.0900770425796509e-01 -5.8779817819595337e-01 -2.1037557473846391e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 17 0 1 5 2 3.1526527404785156e+00 2.5978021621704102e+00 -3.5359997749328613e+00 5.8779805898666382e-01 -8.0900776386260986e-01 7.6703273066414113e-08 -8.0900770425796509e-01 -5.8779817819595337e-01 -2.1037557473846391e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 18 0 1 5 3 3.1526534557342529e+00 2.5978021621704102e+00 3.5360002517700195e+00 5.8779805898666382e-01 -8.0900776386260986e-01 7.6703273066414113e-08 -8.0900770425796509e-01 -5.8779817819595337e-01 -2.1037557473846391e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 19 0 1 5 4 3.1526539325714111e+00 2.5978021621704102e+00 1.0708000183105469e+01 5.8779805898666382e-01 -8.0900776386260986e-01 7.6703273066414113e-08 -8.0900770425796509e-01 -5.8779817819595337e-01 -2.1037557473846391e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 20 0 1 6 1 3.5567927360534668e+00 1.4170243740081787e+00 -1.0708000183105469e+01 3.0903187394142151e-01 -9.5105165243148804e-01 5.5079997451912277e-08 -9.5105165243148804e-01 -3.0903208255767822e-01 -2.8063574575298844e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 21 0 1 6 2 3.5567932128906250e+00 1.4170243740081787e+00 -3.5359997749328613e+00 3.0903187394142151e-01 -9.5105165243148804e-01 5.5079997451912277e-08 -9.5105165243148804e-01 -3.0903208255767822e-01 -2.8063574575298844e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 22 0 1 6 3 3.5567939281463623e+00 1.4170243740081787e+00 3.5360002517700195e+00 3.0903187394142151e-01 -9.5105165243148804e-01 5.5079997451912277e-08 -9.5105165243148804e-01 -3.0903208255767822e-01 -2.8063574575298844e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 23 0 1 6 4 3.5567946434020996e+00 1.4170243740081787e+00 1.0708000183105469e+01 3.0903187394142151e-01 -9.5105165243148804e-01 5.5079997451912277e-08 -9.5105165243148804e-01 -3.0903208255767822e-01 -2.8063574575298844e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 24 0 1 7 1 4.0775022506713867e+00 2.4851918220520020e-01 -1.0708000183105469e+01 1.6369877897659535e-08 -1.0000001192092896e+00 5.9358342241466744e-08 -1.0000000000000000e+00 -2.3171577367975260e-07 -5.5079560468129785e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 25 0 1 7 2 4.0775032043457031e+00 2.4851918220520020e-01 -3.5359995365142822e+00 1.6369877897659535e-08 -1.0000001192092896e+00 5.9358342241466744e-08 -1.0000000000000000e+00 -2.3171577367975260e-07 -5.5079560468129785e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 26 0 1 7 3 4.0775036811828613e+00 2.4851918220520020e-01 3.5360004901885986e+00 1.6369877897659535e-08 -1.0000001192092896e+00 5.9358342241466744e-08 -1.0000000000000000e+00 -2.3171577367975260e-07 -5.5079560468129785e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 27 0 1 7 4 4.0775041580200195e+00 2.4851918220520020e-01 1.0708000183105469e+01 1.6369877897659535e-08 -1.0000001192092896e+00 5.9358342241466744e-08 -1.0000000000000000e+00 -2.3171577367975260e-07 -5.5079560468129785e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 28 0 1 8 1 3.7103965282440186e+00 -9.4429242610931396e-01 -1.0708000183105469e+01 -3.0901712179183960e-01 -9.5105659961700439e-01 2.8064427226581756e-08 -9.5105654001235962e-01 3.0901688337326050e-01 -5.5079560468129785e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 29 0 1 8 2 3.7103972434997559e+00 -9.4429242610931396e-01 -3.5359995365142822e+00 -3.0901712179183960e-01 -9.5105659961700439e-01 2.8064427226581756e-08 -9.5105654001235962e-01 3.0901688337326050e-01 -5.5079560468129785e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 30 0 1 8 3 3.7103977203369141e+00 -9.4429242610931396e-01 3.5360004901885986e+00 -3.0901712179183960e-01 -9.5105659961700439e-01 2.8064427226581756e-08 -9.5105654001235962e-01 3.0901688337326050e-01 -5.5079560468129785e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 31 0 1 8 4 3.7103984355926514e+00 -9.4429242610931396e-01 1.0708000183105469e+01 -3.0901712179183960e-01 -9.5105659961700439e-01 2.8064427226581756e-08 -9.5105654001235962e-01 3.0901688337326050e-01 -5.5079560468129785e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 32 0 1 9 1 3.4448437690734863e+00 -2.1956410408020020e+00 -1.0708000183105469e+01 -5.8778542280197144e-01 -8.0901712179183960e-01 2.5317296703519787e-08 -8.0901694297790527e-01 5.8778524398803711e-01 -7.2424342079102644e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 33 0 1 9 2 3.4448442459106445e+00 -2.1956410408020020e+00 -3.5359995365142822e+00 -5.8778542280197144e-01 -8.0901712179183960e-01 2.5317296703519787e-08 -8.0901694297790527e-01 5.8778524398803711e-01 -7.2424342079102644e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 34 0 1 9 3 3.4448449611663818e+00 -2.1956410408020020e+00 3.5360004901885986e+00 -5.8778542280197144e-01 -8.0901712179183960e-01 2.5317296703519787e-08 -8.0901694297790527e-01 5.8778524398803711e-01 -7.2424342079102644e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 35 0 1 9 4 3.4448454380035400e+00 -2.1956410408020020e+00 1.0708000183105469e+01 -5.8778542280197144e-01 -8.0901712179183960e-01 2.5317296703519787e-08 -8.0901694297790527e-01 5.8778524398803711e-01 -7.2424342079102644e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 36 0 1 10 1 2.4467318058013916e+00 -2.9448659420013428e+00 -1.0708000183105469e+01 -8.0901712179183960e-01 -5.8778518438339233e-01 -9.6703622887162055e-09 -5.8778512477874756e-01 8.0901706218719482e-01 -6.1056162792283430e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 37 0 1 10 2 2.4467325210571289e+00 -2.9448659420013428e+00 -3.5359995365142822e+00 -8.0901712179183960e-01 -5.8778518438339233e-01 -9.6703622887162055e-09 -5.8778512477874756e-01 8.0901706218719482e-01 -6.1056162792283430e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 38 0 1 10 3 2.4467329978942871e+00 -2.9448659420013428e+00 3.5360004901885986e+00 -8.0901712179183960e-01 -5.8778518438339233e-01 -9.6703622887162055e-09 -5.8778512477874756e-01 8.0901706218719482e-01 -6.1056162792283430e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 39 0 1 10 4 2.4467337131500244e+00 -2.9448659420013428e+00 1.0708000183105469e+01 -8.0901712179183960e-01 -5.8778518438339233e-01 -9.6703622887162055e-09 -5.8778512477874756e-01 8.0901706218719482e-01 -6.1056162792283430e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 40 0 1 11 1 1.4954624176025391e+00 -3.8014976978302002e+00 -1.0708000183105469e+01 -9.5113056898117065e-01 -3.0878964066505432e-01 -1.2430668050456006e-08 -3.0878946185112000e-01 9.5113039016723633e-01 -6.6441025126096065e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 41 0 1 11 2 1.4954630136489868e+00 -3.8014976978302002e+00 -3.5359995365142822e+00 -9.5113056898117065e-01 -3.0878964066505432e-01 -1.2430668050456006e-08 -3.0878946185112000e-01 9.5113039016723633e-01 -6.6441025126096065e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 42 0 1 11 3 1.4954636096954346e+00 -3.8014976978302002e+00 3.5360004901885986e+00 -9.5113056898117065e-01 -3.0878964066505432e-01 -1.2430668050456006e-08 -3.0878946185112000e-01 9.5113039016723633e-01 -6.6441025126096065e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 43 0 1 11 4 1.4954642057418823e+00 -3.8014976978302002e+00 1.0708000183105469e+01 -9.5113056898117065e-01 -3.0878964066505432e-01 -1.2430668050456006e-08 -3.0878946185112000e-01 9.5113039016723633e-01 -6.6441025126096065e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 44 0 1 12 1 2.4758462607860565e-01 -3.8206596374511719e+00 -1.0708000183105469e+01 -1.0000000000000000e+00 2.3922124819364399e-04 -4.3721854581235675e-08 2.3935237550176680e-04 1.0000000000000000e+00 -4.3700929097667540e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 45 0 1 12 2 2.4758525192737579e-01 -3.8206596374511719e+00 -3.5359997749328613e+00 -1.0000000000000000e+00 2.3922124819364399e-04 -4.3721854581235675e-08 2.3935237550176680e-04 1.0000000000000000e+00 -4.3700929097667540e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 46 0 1 12 3 2.4758587777614594e-01 -3.8206596374511719e+00 3.5360002517700195e+00 -1.0000000000000000e+00 2.3922124819364399e-04 -4.3721854581235675e-08 2.3935237550176680e-04 1.0000000000000000e+00 -4.3700929097667540e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 47 0 1 12 4 2.4758650362491608e-01 -3.8206596374511719e+00 1.0708000183105469e+01 -1.0000000000000000e+00 2.3922124819364399e-04 -4.3721854581235675e-08 2.3935237550176680e-04 1.0000000000000000e+00 -4.3700929097667540e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 48 0 1 13 1 -1.0236626863479614e+00 -3.9547336101531982e+00 -1.0708000183105469e+01 -9.5105654001235962e-01 3.0901700258255005e-01 -3.9432617171542006e-08 3.0901667475700378e-01 9.5105671882629395e-01 -3.9432634935110400e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 49 0 1 13 2 -1.0236620903015137e+00 -3.9547336101531982e+00 -3.5359997749328613e+00 -9.5105654001235962e-01 3.0901700258255005e-01 -3.9432617171542006e-08 3.0901667475700378e-01 9.5105671882629395e-01 -3.9432634935110400e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 50 0 1 13 3 -1.0236613750457764e+00 -3.9547336101531982e+00 3.5360002517700195e+00 -9.5105654001235962e-01 3.0901700258255005e-01 -3.9432617171542006e-08 3.0901667475700378e-01 9.5105671882629395e-01 -3.9432634935110400e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 51 0 1 13 4 -1.0236607789993286e+00 -3.9547336101531982e+00 1.0708000183105469e+01 -9.5105654001235962e-01 3.0901700258255005e-01 -3.9432617171542006e-08 3.0901667475700378e-01 9.5105671882629395e-01 -3.9432634935110400e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 52 0 1 14 1 -2.0446517467498779e+00 -3.2369956970214844e+00 -1.0708000183105469e+01 -8.0901688337326050e-01 5.8778536319732666e-01 -6.1056177003138146e-08 5.8778500556945801e-01 8.0901718139648438e-01 -9.6703587360025267e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 53 0 1 14 2 -2.0446510314941406e+00 -3.2369956970214844e+00 -3.5359997749328613e+00 -8.0901688337326050e-01 5.8778536319732666e-01 -6.1056177003138146e-08 5.8778500556945801e-01 8.0901718139648438e-01 -9.6703587360025267e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 54 0 1 14 3 -2.0446505546569824e+00 -3.2369956970214844e+00 3.5360002517700195e+00 -8.0901688337326050e-01 5.8778536319732666e-01 -6.1056177003138146e-08 5.8778500556945801e-01 8.0901718139648438e-01 -9.6703587360025267e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 55 0 1 14 4 -2.0446498394012451e+00 -3.2369956970214844e+00 1.0708000183105469e+01 -8.0901688337326050e-01 5.8778536319732666e-01 -6.1056177003138146e-08 5.8778500556945801e-01 8.0901718139648438e-01 -9.6703587360025267e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 56 0 1 15 1 -3.1527180671691895e+00 -2.5977256298065186e+00 -1.0708000183105469e+01 -5.8777809143066406e-01 8.0902218818664551e-01 -4.5409127125140003e-08 8.0902218818664551e-01 5.8777850866317749e-01 -1.6973054073332605e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 57 0 1 15 2 -3.1527175903320312e+00 -2.5977256298065186e+00 -3.5359997749328613e+00 -5.8777809143066406e-01 8.0902218818664551e-01 -4.5409127125140003e-08 8.0902218818664551e-01 5.8777850866317749e-01 -1.6973054073332605e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 58 0 1 15 3 -3.1527168750762939e+00 -2.5977256298065186e+00 3.5360002517700195e+00 -5.8777809143066406e-01 8.0902218818664551e-01 -4.5409127125140003e-08 8.0902218818664551e-01 5.8777850866317749e-01 -1.6973054073332605e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 59 0 1 15 4 -3.1527161598205566e+00 -2.5977256298065186e+00 1.0708000183105469e+01 -5.8777809143066406e-01 8.0902218818664551e-01 -4.5409127125140003e-08 8.0902218818664551e-01 5.8777850866317749e-01 -1.6973054073332605e-09 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 60 0 1 16 1 -3.5568296909332275e+00 -1.4169375896453857e+00 -1.0708000183105469e+01 -3.0900841951370239e-01 9.5105928182601929e-01 -5.5079311778172269e-08 9.5105928182601929e-01 3.0900889635086060e-01 2.8064915724712591e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 61 0 1 16 2 -3.5568289756774902e+00 -1.4169375896453857e+00 -3.5360000133514404e+00 -3.0900841951370239e-01 9.5105928182601929e-01 -5.5079311778172269e-08 9.5105928182601929e-01 3.0900889635086060e-01 2.8064915724712591e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 62 0 1 16 3 -3.5568282604217529e+00 -1.4169375896453857e+00 3.5360000133514404e+00 -3.0900841951370239e-01 9.5105928182601929e-01 -5.5079311778172269e-08 9.5105928182601929e-01 3.0900889635086060e-01 2.8064915724712591e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 63 0 1 16 4 -3.5568277835845947e+00 -1.4169375896453857e+00 1.0708000183105469e+01 -3.0900841951370239e-01 9.5105928182601929e-01 -5.5079311778172269e-08 9.5105928182601929e-01 3.0900889635086060e-01 2.8064915724712591e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 64 0 1 17 1 -4.0775041580200195e+00 -2.4851888418197632e-01 -1.0708000183105469e+01 4.3234773983158448e-08 1.0000000000000000e+00 -2.8064430779295435e-08 1.0000000000000000e+00 1.7356975945403974e-07 3.2343212552632394e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 65 0 1 17 2 -4.0775036811828613e+00 -2.4851888418197632e-01 -3.5360000133514404e+00 4.3234773983158448e-08 1.0000000000000000e+00 -2.8064430779295435e-08 1.0000000000000000e+00 1.7356975945403974e-07 3.2343212552632394e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 66 0 1 17 3 -4.0775032043457031e+00 -2.4851888418197632e-01 3.5360000133514404e+00 4.3234773983158448e-08 1.0000000000000000e+00 -2.8064430779295435e-08 1.0000000000000000e+00 1.7356975945403974e-07 3.2343212552632394e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 67 0 1 17 4 -4.0775022506713867e+00 -2.4851888418197632e-01 1.0708000183105469e+01 4.3234773983158448e-08 1.0000000000000000e+00 -2.8064430779295435e-08 1.0000000000000000e+00 1.7356975945403974e-07 3.2343212552632394e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 68 0 1 18 1 -3.7103984355926514e+00 9.4429254531860352e-01 -1.0708000183105469e+01 3.0901718139648438e-01 9.5105648040771484e-01 -2.8064427226581756e-08 9.5105654001235962e-01 -3.0901691317558289e-01 5.5079564020843463e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 69 0 1 18 2 -3.7103977203369141e+00 9.4429254531860352e-01 -3.5360000133514404e+00 3.0901718139648438e-01 9.5105648040771484e-01 -2.8064427226581756e-08 9.5105654001235962e-01 -3.0901691317558289e-01 5.5079564020843463e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 70 0 1 18 3 -3.7103972434997559e+00 9.4429254531860352e-01 3.5360000133514404e+00 3.0901718139648438e-01 9.5105648040771484e-01 -2.8064427226581756e-08 9.5105654001235962e-01 -3.0901691317558289e-01 5.5079564020843463e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 71 0 1 18 4 -3.7103965282440186e+00 9.4429254531860352e-01 1.0708000183105469e+01 3.0901718139648438e-01 9.5105648040771484e-01 -2.8064427226581756e-08 9.5105654001235962e-01 -3.0901691317558289e-01 5.5079564020843463e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 72 0 1 19 1 -3.4448459148406982e+00 2.1956403255462646e+00 -1.0708000183105469e+01 5.8778524398803711e-01 8.0901718139648438e-01 5.9765987714399671e-09 8.0901706218719482e-01 -5.8778506517410278e-01 4.9687983505464217e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 73 0 1 19 2 -3.4448454380035400e+00 2.1956403255462646e+00 -3.5360000133514404e+00 5.8778524398803711e-01 8.0901718139648438e-01 5.9765987714399671e-09 8.0901706218719482e-01 -5.8778506517410278e-01 4.9687983505464217e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 74 0 1 19 3 -3.4448447227478027e+00 2.1956403255462646e+00 3.5360000133514404e+00 5.8778524398803711e-01 8.0901718139648438e-01 5.9765987714399671e-09 8.0901706218719482e-01 -5.8778506517410278e-01 4.9687983505464217e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 75 0 1 19 4 -3.4448442459106445e+00 2.1956403255462646e+00 1.0708000183105469e+01 5.8778524398803711e-01 8.0901718139648438e-01 5.9765987714399671e-09 8.0901706218719482e-01 -5.8778506517410278e-01 4.9687983505464217e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 76 0 1 20 1 -2.4467341899871826e+00 2.9448654651641846e+00 -1.0708000183105469e+01 8.0901700258255005e-01 5.8778530359268188e-01 9.6703409724341327e-09 5.8778530359268188e-01 -8.0901694297790527e-01 6.1056162792283430e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 77 0 1 20 2 -2.4467334747314453e+00 2.9448654651641846e+00 -3.5360000133514404e+00 8.0901700258255005e-01 5.8778530359268188e-01 9.6703409724341327e-09 5.8778530359268188e-01 -8.0901694297790527e-01 6.1056162792283430e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 78 0 1 20 3 -2.4467329978942871e+00 2.9448654651641846e+00 3.5360000133514404e+00 8.0901700258255005e-01 5.8778530359268188e-01 9.6703409724341327e-09 5.8778530359268188e-01 -8.0901694297790527e-01 6.1056162792283430e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 79 0 1 20 4 -2.4467322826385498e+00 2.9448654651641846e+00 1.0708000183105469e+01 8.0901700258255005e-01 5.8778530359268188e-01 9.6703409724341327e-09 5.8778530359268188e-01 -8.0901694297790527e-01 6.1056162792283430e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 80 0 2 1 1 -2.9881544113159180e+00 6.5491542816162109e+00 -1.0708000183105469e+01 -6.4278751611709595e-01 -7.6604467630386353e-01 4.9099128318630392e-08 -7.6604455709457397e-01 6.4278757572174072e-01 -1.7870615209858443e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 81 0 2 1 2 -2.9881536960601807e+00 6.5491542816162109e+00 -3.5360004901885986e+00 -6.4278751611709595e-01 -7.6604467630386353e-01 4.9099128318630392e-08 -7.6604455709457397e-01 6.4278757572174072e-01 -1.7870615209858443e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 82 0 2 1 3 -2.9881532192230225e+00 6.5491542816162109e+00 3.5359995365142822e+00 -6.4278751611709595e-01 -7.6604467630386353e-01 4.9099128318630392e-08 -7.6604455709457397e-01 6.4278757572174072e-01 -1.7870615209858443e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 83 0 2 1 4 -2.9881525039672852e+00 6.5491542816162109e+00 1.0708000183105469e+01 -6.4278751611709595e-01 -7.6604467630386353e-01 4.9099128318630392e-08 -7.6604455709457397e-01 6.4278757572174072e-01 -1.7870615209858443e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 84 0 2 2 1 -1.9268620014190674e+00 6.9360504150390625e+00 -1.0708000183105469e+01 -7.5470954179763794e-01 -6.5605914592742920e-01 3.9399239426529675e-08 -6.5605914592742920e-01 7.5470960140228271e-01 -1.7955269271396901e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 85 0 2 2 2 -1.9268614053726196e+00 6.9360504150390625e+00 -3.5360004901885986e+00 -7.5470954179763794e-01 -6.5605914592742920e-01 3.9399239426529675e-08 -6.5605914592742920e-01 7.5470960140228271e-01 -1.7955269271396901e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 86 0 2 2 3 -1.9268608093261719e+00 6.9360504150390625e+00 3.5359995365142822e+00 -7.5470954179763794e-01 -6.5605914592742920e-01 3.9399239426529675e-08 -6.5605914592742920e-01 7.5470960140228271e-01 -1.7955269271396901e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 87 0 2 2 4 -1.9268600940704346e+00 6.9360504150390625e+00 1.0708000183105469e+01 -7.5470954179763794e-01 -6.5605914592742920e-01 3.9399239426529675e-08 -6.5605914592742920e-01 7.5470960140228271e-01 -1.7955269271396901e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 88 0 2 3 1 -8.1811505556106567e-01 7.1520113945007324e+00 -1.0708000183105469e+01 -8.4804809093475342e-01 -5.2991932630538940e-01 2.9805534040860948e-08 -5.2991932630538940e-01 8.4804803133010864e-01 -1.6521475743047631e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 89 0 2 3 2 -8.1811439990997314e-01 7.1520113945007324e+00 -3.5360002517700195e+00 -8.4804809093475342e-01 -5.2991932630538940e-01 2.9805534040860948e-08 -5.2991932630538940e-01 8.4804803133010864e-01 -1.6521475743047631e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 90 0 2 3 3 -8.1811380386352539e-01 7.1520113945007324e+00 3.5359997749328613e+00 -8.4804809093475342e-01 -5.2991932630538940e-01 2.9805534040860948e-08 -5.2991932630538940e-01 8.4804803133010864e-01 -1.6521475743047631e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 91 0 2 3 4 -8.1811320781707764e-01 7.1520113945007324e+00 1.0708000183105469e+01 -8.4804809093475342e-01 -5.2991932630538940e-01 2.9805534040860948e-08 -5.2991932630538940e-01 8.4804803133010864e-01 -1.6521475743047631e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 92 0 2 4 1 3.1078168749809265e-01 7.1919779777526855e+00 -1.0708000183105469e+01 -9.2050498723983765e-01 -3.9073121547698975e-01 2.0554240975911853e-08 -3.9073109626770020e-01 9.2050480842590332e-01 -1.3604555704205268e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 93 0 2 4 2 3.1078231334686279e-01 7.1919779777526855e+00 -3.5360002517700195e+00 -9.2050498723983765e-01 -3.9073121547698975e-01 2.0554240975911853e-08 -3.9073109626770020e-01 9.2050480842590332e-01 -1.3604555704205268e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 94 0 2 4 3 3.1078293919563293e-01 7.1919779777526855e+00 3.5359997749328613e+00 -9.2050498723983765e-01 -3.9073121547698975e-01 2.0554240975911853e-08 -3.9073109626770020e-01 9.2050480842590332e-01 -1.3604555704205268e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 95 0 2 4 4 3.1078356504440308e-01 7.1919779777526855e+00 1.0708000183105469e+01 -9.2050498723983765e-01 -3.9073121547698975e-01 2.0554240975911853e-08 -3.9073109626770020e-01 9.2050480842590332e-01 -1.3604555704205268e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 96 0 2 5 1 1.4320285320281982e+00 7.0547709465026855e+00 -1.0708000183105469e+01 -9.7029578685760498e-01 -2.4192222952842712e-01 6.4854326353724900e-09 -2.4192200601100922e-01 9.7029590606689453e-01 5.2305679787423287e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 97 0 2 5 2 1.4320291280746460e+00 7.0547709465026855e+00 -3.5359997749328613e+00 -9.7029578685760498e-01 -2.4192222952842712e-01 6.4854326353724900e-09 -2.4192200601100922e-01 9.7029590606689453e-01 5.2305679787423287e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 98 0 2 5 3 1.4320297241210938e+00 7.0547709465026855e+00 3.5360002517700195e+00 -9.7029578685760498e-01 -2.4192222952842712e-01 6.4854326353724900e-09 -2.4192200601100922e-01 9.7029590606689453e-01 5.2305679787423287e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 99 0 2 5 4 1.4320303201675415e+00 7.0547709465026855e+00 1.0708000183105469e+01 -9.7029578685760498e-01 -2.4192222952842712e-01 6.4854326353724900e-09 -2.4192200601100922e-01 9.7029590606689453e-01 5.2305679787423287e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 100 0 2 6 1 2.5180437564849854e+00 6.7439646720886230e+00 -1.0708000183105469e+01 -9.9619466066360474e-01 -8.7155982851982117e-02 8.2881861374062282e-09 -8.7155811488628387e-02 9.9619489908218384e-01 5.8023296389819734e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 101 0 2 6 2 2.5180444717407227e+00 6.7439646720886230e+00 -3.5359997749328613e+00 -9.9619466066360474e-01 -8.7155982851982117e-02 8.2881861374062282e-09 -8.7155811488628387e-02 9.9619489908218384e-01 5.8023296389819734e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 102 0 2 6 3 2.5180449485778809e+00 6.7439646720886230e+00 3.5360002517700195e+00 -9.9619466066360474e-01 -8.7155982851982117e-02 8.2881861374062282e-09 -8.7155811488628387e-02 9.9619489908218384e-01 5.8023296389819734e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 103 0 2 6 4 2.5180456638336182e+00 6.7439646720886230e+00 1.0708000183105469e+01 -9.9619466066360474e-01 -8.7155982851982117e-02 8.2881861374062282e-09 -8.7155811488628387e-02 9.9619489908218384e-01 5.8023296389819734e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 104 0 2 7 1 3.5419774055480957e+00 6.2669749259948730e+00 -1.0708000183105469e+01 -9.9756401777267456e-01 6.9756306707859039e-02 1.0963184138290671e-08 6.9756396114826202e-02 9.9756419658660889e-01 6.3388498006133887e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 105 0 2 7 2 3.5419778823852539e+00 6.2669749259948730e+00 -3.5359997749328613e+00 -9.9756401777267456e-01 6.9756306707859039e-02 1.0963184138290671e-08 6.9756396114826202e-02 9.9756419658660889e-01 6.3388498006133887e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 106 0 2 7 3 3.5419785976409912e+00 6.2669749259948730e+00 3.5360002517700195e+00 -9.9756401777267456e-01 6.9756306707859039e-02 1.0963184138290671e-08 6.9756396114826202e-02 9.9756419658660889e-01 6.3388498006133887e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 107 0 2 7 4 3.5419793128967285e+00 6.2669749259948730e+00 1.0708000183105469e+01 -9.9756401777267456e-01 6.9756306707859039e-02 1.0963184138290671e-08 6.9756396114826202e-02 9.9756419658660889e-01 6.3388498006133887e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 108 0 2 8 1 4.4787659645080566e+00 5.6357603073120117e+00 -1.0708000183105469e+01 -9.7437018156051636e-01 2.2495099902153015e-01 1.4444545115566143e-08 2.2495104372501373e-01 9.7437018156051636e-01 6.8269187636360584e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 109 0 2 8 2 4.4787664413452148e+00 5.6357603073120117e+00 -3.5359997749328613e+00 -9.7437018156051636e-01 2.2495099902153015e-01 1.4444545115566143e-08 2.2495104372501373e-01 9.7437018156051636e-01 6.8269187636360584e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 110 0 2 8 3 4.4787673950195312e+00 5.6357603073120117e+00 3.5360002517700195e+00 -9.7437018156051636e-01 2.2495099902153015e-01 1.4444545115566143e-08 2.2495104372501373e-01 9.7437018156051636e-01 6.8269187636360584e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 111 0 2 8 4 4.4787678718566895e+00 5.6357603073120117e+00 1.0708000183105469e+01 -9.7437018156051636e-01 2.2495099902153015e-01 1.4444545115566143e-08 2.2495104372501373e-01 9.7437018156051636e-01 6.8269187636360584e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 112 0 2 9 1 5.3051486015319824e+00 4.8657870292663574e+00 -1.0708000183105469e+01 -9.2718988656997681e-01 3.7459182739257812e-01 -1.8579040528265978e-08 3.7459197640419006e-01 9.2718994617462158e-01 8.1138580299011664e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 113 0 2 9 2 5.3051495552062988e+00 4.8657870292663574e+00 -3.5359995365142822e+00 -9.2718988656997681e-01 3.7459182739257812e-01 -1.8579040528265978e-08 3.7459197640419006e-01 9.2718994617462158e-01 8.1138580299011664e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 114 0 2 9 3 5.3051500320434570e+00 4.8657870292663574e+00 3.5360004901885986e+00 -9.2718988656997681e-01 3.7459182739257812e-01 -1.8579040528265978e-08 3.7459197640419006e-01 9.2718994617462158e-01 8.1138580299011664e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 115 0 2 9 4 5.3051505088806152e+00 4.8657870292663574e+00 1.0708000183105469e+01 -9.2718988656997681e-01 3.7459182739257812e-01 -1.8579040528265978e-08 3.7459197640419006e-01 9.2718994617462158e-01 8.1138580299011664e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 116 0 2 10 1 6.0010805130004883e+00 3.9760065078735352e+00 -1.0708000183105469e+01 -8.5717546939849854e-01 5.1502448320388794e-01 -1.1957229872905373e-08 5.1502466201782227e-01 8.5717558860778809e-01 9.0422162202230538e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 117 0 2 10 2 6.0010809898376465e+00 3.9760065078735352e+00 -3.5359995365142822e+00 -8.5717546939849854e-01 5.1502448320388794e-01 -1.1957229872905373e-08 5.1502466201782227e-01 8.5717558860778809e-01 9.0422162202230538e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 118 0 2 10 3 6.0010814666748047e+00 3.9760065078735352e+00 3.5360004901885986e+00 -8.5717546939849854e-01 5.1502448320388794e-01 -1.1957229872905373e-08 5.1502466201782227e-01 8.5717558860778809e-01 9.0422162202230538e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 119 0 2 10 4 6.0010824203491211e+00 3.9760065078735352e+00 1.0708000183105469e+01 -8.5717546939849854e-01 5.1502448320388794e-01 -1.1957229872905373e-08 5.1502466201782227e-01 8.5717558860778809e-01 9.0422162202230538e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 120 0 2 11 1 6.5491075515747070e+00 2.9882695674896240e+00 -1.0707999229431152e+01 -7.6605457067489624e-01 6.4277547597885132e-01 -3.9646792515668494e-09 6.4277553558349609e-01 7.6605463027954102e-01 9.8555560157365107e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 121 0 2 11 2 6.5491085052490234e+00 2.9882695674896240e+00 -3.5359995365142822e+00 -7.6605457067489624e-01 6.4277547597885132e-01 -3.9646792515668494e-09 6.4277553558349609e-01 7.6605463027954102e-01 9.8555560157365107e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 122 0 2 11 3 6.5491089820861816e+00 2.9882695674896240e+00 3.5360004901885986e+00 -7.6605457067489624e-01 6.4277547597885132e-01 -3.9646792515668494e-09 6.4277553558349609e-01 7.6605463027954102e-01 9.8555560157365107e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 123 0 2 11 4 6.5491094589233398e+00 2.9882695674896240e+00 1.0708001136779785e+01 -7.6605457067489624e-01 6.4277547597885132e-01 -3.9646792515668494e-09 6.4277553558349609e-01 7.6605463027954102e-01 9.8555560157365107e-08 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 124 0 2 12 1 6.9359836578369141e+00 1.9269812107086182e+00 -1.0707999229431152e+01 -6.5607094764709473e-01 7.5469934940338135e-01 5.2018123142261175e-09 7.5469928979873657e-01 6.5607094764709473e-01 1.0533852190519610e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 125 0 2 12 2 6.9359841346740723e+00 1.9269812107086182e+00 -3.5359995365142822e+00 -6.5607094764709473e-01 7.5469934940338135e-01 5.2018123142261175e-09 7.5469928979873657e-01 6.5607094764709473e-01 1.0533852190519610e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 126 0 2 12 3 6.9359850883483887e+00 1.9269812107086182e+00 3.5360004901885986e+00 -6.5607094764709473e-01 7.5469934940338135e-01 5.2018123142261175e-09 7.5469928979873657e-01 6.5607094764709473e-01 1.0533852190519610e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 127 0 2 12 4 6.9359855651855469e+00 1.9269812107086182e+00 1.0708001136779785e+01 -6.5607094764709473e-01 7.5469934940338135e-01 5.2018123142261175e-09 7.5469928979873657e-01 6.5607094764709473e-01 1.0533852190519610e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 128 0 2 13 1 7.1520061492919922e+00 8.1810349225997925e-01 -1.0707999229431152e+01 -5.2991944551467896e-01 8.4804809093475342e-01 -2.1909219327653773e-08 8.4804821014404297e-01 5.2991950511932373e-01 1.1919925668735232e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 129 0 2 13 2 7.1520066261291504e+00 8.1810349225997925e-01 -3.5359992980957031e+00 -5.2991944551467896e-01 8.4804809093475342e-01 -2.1909219327653773e-08 8.4804821014404297e-01 5.2991950511932373e-01 1.1919925668735232e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 130 0 2 13 3 7.1520071029663086e+00 8.1810349225997925e-01 3.5360007286071777e+00 -5.2991944551467896e-01 8.4804809093475342e-01 -2.1909219327653773e-08 8.4804821014404297e-01 5.2991950511932373e-01 1.1919925668735232e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 131 0 2 13 4 7.1520080566406250e+00 8.1810349225997925e-01 1.0708001136779785e+01 -5.2991944551467896e-01 8.4804809093475342e-01 -2.1909219327653773e-08 8.4804821014404297e-01 5.2991950511932373e-01 1.1919925668735232e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 132 0 2 14 1 7.1920080184936523e+00 -3.1080317497253418e-01 -1.0707999229431152e+01 -3.9073118567466736e-01 9.2050480842590332e-01 -9.2924068439970142e-09 9.2050498723983765e-01 3.9073133468627930e-01 1.2853520559019671e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 133 0 2 14 2 7.1920084953308105e+00 -3.1080317497253418e-01 -3.5359992980957031e+00 -3.9073118567466736e-01 9.2050480842590332e-01 -9.2924068439970142e-09 9.2050498723983765e-01 3.9073133468627930e-01 1.2853520559019671e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 134 0 2 14 3 7.1920094490051270e+00 -3.1080317497253418e-01 3.5360007286071777e+00 -3.9073118567466736e-01 9.2050480842590332e-01 -9.2924068439970142e-09 9.2050498723983765e-01 3.9073133468627930e-01 1.2853520559019671e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 135 0 2 14 4 7.1920099258422852e+00 -3.1080317497253418e-01 1.0708001136779785e+01 -3.9073118567466736e-01 9.2050480842590332e-01 -9.2924068439970142e-09 9.2050498723983765e-01 3.9073133468627930e-01 1.2853520559019671e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 136 0 2 15 1 7.0547771453857422e+00 -1.4320195913314819e+00 -1.0707999229431152e+01 -2.4192188680171967e-01 9.7029572725296021e-01 4.6295305367038964e-09 9.7029578685760498e-01 2.4192202091217041e-01 1.3578248569956486e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 137 0 2 15 2 7.0547780990600586e+00 -1.4320195913314819e+00 -3.5359992980957031e+00 -2.4192188680171967e-01 9.7029572725296021e-01 4.6295305367038964e-09 9.7029578685760498e-01 2.4192202091217041e-01 1.3578248569956486e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 138 0 2 15 3 7.0547785758972168e+00 -1.4320195913314819e+00 3.5360007286071777e+00 -2.4192188680171967e-01 9.7029572725296021e-01 4.6295305367038964e-09 9.7029578685760498e-01 2.4192202091217041e-01 1.3578248569956486e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 139 0 2 15 4 7.0547790527343750e+00 -1.4320195913314819e+00 1.0708001136779785e+01 -2.4192188680171967e-01 9.7029572725296021e-01 4.6295305367038964e-09 9.7029578685760498e-01 2.4192202091217041e-01 1.3578248569956486e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 140 0 2 16 1 6.7439398765563965e+00 -2.5180149078369141e+00 -1.0707999229431152e+01 -8.7155669927597046e-02 9.9619483947753906e-01 1.9513789695224659e-08 9.9619472026824951e-01 8.7155818939208984e-02 1.4076269394536212e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 141 0 2 16 2 6.7439403533935547e+00 -2.5180149078369141e+00 -3.5359992980957031e+00 -8.7155669927597046e-02 9.9619483947753906e-01 1.9513789695224659e-08 9.9619472026824951e-01 8.7155818939208984e-02 1.4076269394536212e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 142 0 2 16 3 6.7439413070678711e+00 -2.5180149078369141e+00 3.5360007286071777e+00 -8.7155669927597046e-02 9.9619483947753906e-01 1.9513789695224659e-08 9.9619472026824951e-01 8.7155818939208984e-02 1.4076269394536212e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 143 0 2 16 4 6.7439417839050293e+00 -2.5180149078369141e+00 1.0708001136779785e+01 -8.7155669927597046e-02 9.9619483947753906e-01 1.9513789695224659e-08 9.9619472026824951e-01 8.7155818939208984e-02 1.4076269394536212e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 144 0 2 17 1 6.2669615745544434e+00 -3.5419857501983643e+00 -1.0707999229431152e+01 6.9756455719470978e-02 9.9756419658660889e-01 -2.2321096082578151e-09 9.9756413698196411e-01 -6.9756463170051575e-02 1.5194746083579957e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 145 0 2 17 2 6.2669620513916016e+00 -3.5419857501983643e+00 -3.5359990596771240e+00 6.9756455719470978e-02 9.9756419658660889e-01 -2.2321096082578151e-09 9.9756413698196411e-01 -6.9756463170051575e-02 1.5194746083579957e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 146 0 2 17 3 6.2669630050659180e+00 -3.5419857501983643e+00 3.5360009670257568e+00 6.9756455719470978e-02 9.9756419658660889e-01 -2.2321096082578151e-09 9.9756413698196411e-01 -6.9756463170051575e-02 1.5194746083579957e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 147 0 2 17 4 6.2669634819030762e+00 -3.5419857501983643e+00 1.0708001136779785e+01 6.9756455719470978e-02 9.9756419658660889e-01 -2.2321096082578151e-09 9.9756413698196411e-01 -6.9756463170051575e-02 1.5194746083579957e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 148 0 2 18 1 5.6357698440551758e+00 -4.4788031578063965e+00 -1.0707999229431152e+01 2.2495110332965851e-01 9.7437012195587158e-01 1.5265394281982481e-08 9.7437006235122681e-01 -2.2495114803314209e-01 1.5780204876136850e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 149 0 2 18 2 5.6357703208923340e+00 -4.4788031578063965e+00 -3.5359992980957031e+00 2.2495110332965851e-01 9.7437012195587158e-01 1.5265394281982481e-08 9.7437006235122681e-01 -2.2495114803314209e-01 1.5780204876136850e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 150 0 2 18 3 5.6357707977294922e+00 -4.4788031578063965e+00 3.5360007286071777e+00 2.2495110332965851e-01 9.7437012195587158e-01 1.5265394281982481e-08 9.7437006235122681e-01 -2.2495114803314209e-01 1.5780204876136850e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 151 0 2 18 4 5.6357717514038086e+00 -4.4788031578063965e+00 1.0708001136779785e+01 2.2495110332965851e-01 9.7437012195587158e-01 1.5265394281982481e-08 9.7437006235122681e-01 -2.2495114803314209e-01 1.5780204876136850e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 152 0 2 19 1 4.8657126426696777e+00 -5.3052239418029785e+00 -1.0707999229431152e+01 3.7460672855377197e-01 9.2718386650085449e-01 3.3463329884853010e-08 9.2718380689620972e-01 -3.7460663914680481e-01 1.6084732123999856e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 153 0 2 19 2 4.8657131195068359e+00 -5.3052239418029785e+00 -3.5359992980957031e+00 3.7460672855377197e-01 9.2718386650085449e-01 3.3463329884853010e-08 9.2718380689620972e-01 -3.7460663914680481e-01 1.6084732123999856e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 154 0 2 19 3 4.8657140731811523e+00 -5.3052239418029785e+00 3.5360007286071777e+00 3.7460672855377197e-01 9.2718386650085449e-01 3.3463329884853010e-08 9.2718380689620972e-01 -3.7460663914680481e-01 1.6084732123999856e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 155 0 2 19 4 4.8657145500183105e+00 -5.3052239418029785e+00 1.0708001136779785e+01 3.7460672855377197e-01 9.2718386650085449e-01 3.3463329884853010e-08 9.2718380689620972e-01 -3.7460663914680481e-01 1.6084732123999856e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 156 0 2 20 1 3.9759080410003662e+00 -6.0011067390441895e+00 -1.0707999229431152e+01 5.1503831148147583e-01 8.5716742277145386e-01 5.1913605858544543e-08 8.5716718435287476e-01 -5.1503819227218628e-01 1.6100833022392180e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 157 0 2 20 2 3.9759087562561035e+00 -6.0011067390441895e+00 -3.5359992980957031e+00 5.1503831148147583e-01 8.5716742277145386e-01 5.1913605858544543e-08 8.5716718435287476e-01 -5.1503819227218628e-01 1.6100833022392180e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 158 0 2 20 3 3.9759094715118408e+00 -6.0011067390441895e+00 3.5360007286071777e+00 5.1503831148147583e-01 8.5716742277145386e-01 5.1913605858544543e-08 8.5716718435287476e-01 -5.1503819227218628e-01 1.6100833022392180e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 159 0 2 20 4 3.9759099483489990e+00 -6.0011067390441895e+00 1.0708001136779785e+01 5.1503831148147583e-01 8.5716742277145386e-01 5.1913605858544543e-08 8.5716718435287476e-01 -5.1503819227218628e-01 1.6100833022392180e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 160 0 2 21 1 2.9865849018096924e+00 -6.5498690605163574e+00 -1.0707999229431152e+01 6.4297091960906982e-01 7.6589089632034302e-01 3.2950655537433704e-08 7.6589071750640869e-01 -6.4297080039978027e-01 1.6687670267856447e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 161 0 2 21 2 2.9865856170654297e+00 -6.5498690605163574e+00 -3.5359992980957031e+00 6.4297091960906982e-01 7.6589089632034302e-01 3.2950655537433704e-08 7.6589071750640869e-01 -6.4297080039978027e-01 1.6687670267856447e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 162 0 2 21 3 2.9865863323211670e+00 -6.5498690605163574e+00 3.5360007286071777e+00 6.4297091960906982e-01 7.6589089632034302e-01 3.2950655537433704e-08 7.6589071750640869e-01 -6.4297080039978027e-01 1.6687670267856447e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 163 0 2 21 4 2.9865868091583252e+00 -6.5498690605163574e+00 1.0708001136779785e+01 6.4297091960906982e-01 7.6589089632034302e-01 3.2950655537433704e-08 7.6589071750640869e-01 -6.4297080039978027e-01 1.6687670267856447e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 164 0 2 22 1 1.9251997470855713e+00 -6.9365115165710449e+00 -1.0707999229431152e+01 7.5486654043197632e-01 6.5587860345840454e-01 5.2350440427062495e-08 6.5587842464447021e-01 -7.5486654043197632e-01 1.6704368022146809e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 165 0 2 22 2 1.9252003431320190e+00 -6.9365115165710449e+00 -3.5359992980957031e+00 7.5486654043197632e-01 6.5587860345840454e-01 5.2350440427062495e-08 6.5587842464447021e-01 -7.5486654043197632e-01 1.6704368022146809e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 166 0 2 22 3 1.9252010583877563e+00 -6.9365115165710449e+00 3.5360007286071777e+00 7.5486654043197632e-01 6.5587860345840454e-01 5.2350440427062495e-08 6.5587842464447021e-01 -7.5486654043197632e-01 1.6704368022146809e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 167 0 2 22 4 1.9252016544342041e+00 -6.9365115165710449e+00 1.0708001136779785e+01 7.5486654043197632e-01 6.5587860345840454e-01 5.2350440427062495e-08 6.5587842464447021e-01 -7.5486654043197632e-01 1.6704368022146809e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 168 0 2 23 1 8.1640112400054932e-01 -7.1522073745727539e+00 -1.0707999229431152e+01 8.4817492961883545e-01 5.2971649169921875e-01 7.1537499479745748e-08 5.2971631288528442e-01 -8.4817481040954590e-01 1.6417379811173305e-07 -8.7422776573475858e-08 0.0000000000000000e+00 -1.0000000000000000e+00
+Matrix 169 0 2 23 2 8.1640177965164185e-01 -7.1522073745727539e+00 -3.5359992980957031e+00 8.4817492961883545e-01 5.2971649169921875e-01 7.1537499479745748e-08 5.297163