--- /dev/null
+// $Id: geom_gentle.C 24242 2008-03-02 02:23:52Z mtadel $
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
+ * full copyright notice. *
+ **************************************************************************/
+
+TEveGeoShape* geom_gentle_trd()
+{
+ TFile f("$REVESYS/alice-data/gentle_geo_trd.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle TRD");
+ TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
+ gEve->AddGlobalElement(gsre);
+ f.Close();
+
+ // Fix visibility, color and transparency
+ gsre->SetRnrSelf(kFALSE);
+ for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i)
+ {
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor((Color_t)3);
+ lvl2->SetMainTransparency(80);
+ }
+
+ }
+
+ return gsre;
+}
TClonesArray *cl = clrow->GetArray();
Int_t ncl = cl->GetEntriesFast();
- printf("%d: %d\n", i, ncl);
-
while (ncl--)
{
AliCluster *c = (AliCluster*) cl->UncheckedAt(ncl);
#include "AliRunLoader.h"
#include "AliCluster.h"
-#include "AliTRDcluster.h"
+#include "TRD/AliTRDcluster.h"
#endif
-TEvePointSet* trd_clusters(TEveElement *cont = 0){
- const Int_t kMaxClusters = 18 * 6 * 24 *10;
- AliEveEventManager::AssertGeometry();
+TEvePointSet* trd_clusters(TEveElement *cont = 0)
+{
+ const Int_t kMaxClusters = 18 * 6 * 24 *10;
+ AliEveEventManager::AssertGeometry();
- TEvePointSet *clusters = new TEvePointSet(kMaxClusters);
- clusters->SetOwnIds(kTRUE);
+ TEvePointSet *clusters = new TEvePointSet(kMaxClusters);
+ clusters->SetOwnIds(kTRUE);
- AliRunLoader *rl = AliEveEventManager::AssertRunLoader();
- rl->LoadRecPoints("TRD");
+ AliRunLoader *rl = AliEveEventManager::AssertRunLoader();
+ rl->LoadRecPoints("TRD");
- TObjArray *TRDcluster = 0x0;
- TTree *recPoints = rl->GetTreeR("TRD", kFALSE);
- recPoints->SetBranchAddress("TRDcluster", &TRDcluster);
+ TObjArray *TRDcluster = 0x0;
+ TTree *recPoints = rl->GetTreeR("TRD", kFALSE);
+ recPoints->SetBranchAddress("TRDcluster", &TRDcluster);
Int_t nentr=(Int_t)recPoints->GetEntries();
for (Int_t i=0; i<nentr; i++) {
AliTRDcluster *c = (AliTRDcluster*)TRDcluster->UncheckedAt(ncl);
Float_t g[3]; //global coordinates
c->GetGlobalXYZ(g);
- clusters->SetNextPoint(g[0], g[1], g[2]);
- AliCluster *atp = new AliCluster(*c);
- clusters->SetPointId(atp);
+ clusters->SetNextPoint(g[0], g[1], g[2]);
+ AliCluster *atp = new AliCluster(*c);
+ clusters->SetPointId(atp);
}
TRDcluster->Clear();
}
R__EXTERN TEveProjectionManager *gRPhiMgr;
R__EXTERN TEveProjectionManager *gRhoZMgr;
-TEveGeoShape *gGeomGentle = 0;
+TEveGeoShape *gGeomGentle = 0;
+TEveGeoShape *gGeomGentleTRD = 0;
+
+Bool_t gShowTRD = kFALSE;
void visscan_init()
{
alieve_init(".", -1);
TEveUtil::LoadMacro("geom_gentle.C");
+ if (gShowTRD) TEveUtil::LoadMacro("geom_gentle_trd.C");
TEveUtil::LoadMacro("primary_vertex.C");
TEveUtil::LoadMacro("esd_tracks.C");
TEveUtil::LoadMacro("its_clusters.C+");
TEveUtil::LoadMacro("tpc_clusters.C+");
+ TEveUtil::LoadMacro("trd_clusters.C+");
TEveLine::SetDefaultSmooth(1);
// geometry
- gGeomGentle = geom_gentle();
+ gGeomGentle = geom_gentle();
+ if (gShowTRD) gGeomGentleTRD = geom_gentle_trd();
gROOT->ProcessLine(".L SplitGLView.C+g"); // !!!! debug-mode
a->SetFontFile("comicbd");
a->SetFontSize(10);
gEve->GetScenes()->FindChild("R-Phi Projection")->AddElement(a);
- gRPhiMgr->ImportElements(gGeomGentle);
}
if (gRhoZMgr) {
TEveProjectionAxes* a = new TEveProjectionAxes(gRhoZMgr);
a->SetFontFile("comicbd");
a->SetFontSize(10);
gEve->GetScenes()->FindChild("Rho-Z Projection")->AddElement(a);
- gRhoZMgr->ImportElements(gGeomGentle);
}
// event
TEvePointSet* tpcc = tpc_clusters();
tpcc->SetMarkerColor(4);
+
+ TEvePointSet* trdc = trd_clusters();
+ trdc->SetMarkerColor(7);
+ trdc->SetMarkerStyle(4);
+ trdc->SetMarkerSize(0.5);
}
catch(TEveException& exc) {
printf("Exception loading ITS/TPC clusters: %s\n", exc.Data());
gRPhiMgr->DestroyElements();
gRPhiMgr->SetCenter(x[0], x[1], x[2]);
gRPhiMgr->ImportElements(gGeomGentle);
+ if (gShowTRD) gRPhiMgr->ImportElements(gGeomGentleTRD);
gRPhiMgr->ImportElements(top);
}
if (gRhoZMgr && top) {
gRhoZMgr->DestroyElements();
gRhoZMgr->SetCenter(x[0], x[1], x[2]);
gRhoZMgr->ImportElements(gGeomGentle);
+ if (gShowTRD) gRhoZMgr->ImportElements(gGeomGentleTRD);
gRhoZMgr->ImportElements(top);
}
--- /dev/null
+// $Id: geom_trd_tof.C 23442 2008-01-21 16:02:24Z mtadel $
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
+ * full copyright notice. *
+ **************************************************************************/
+
+void geom_extr_trd()
+{
+ // Extract reasonably top-level mother-volumes of TRD and
+ // store them as geo-shape-extract.
+
+ gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+
+ TGeoNode* tnode = gGeoManager->GetTopVolume()->FindNode("B077_1");
+
+ TEveGeoTopNode* eve_tnode = new TEveGeoTopNode(gGeoManager, tnode);
+
+
+ for (Int_t i = 0; i < 18; ++i)
+ {
+ TGeoNode * node1 = tnode->GetVolume()->FindNode(Form("BSEGMO%d_1", i));
+ printf("%2d - node1 = %p\n", i, node1);
+ TEveGeoNode * eve_node1 = new TEveGeoNode(node1);
+ eve_tnode->AddElement(eve_node1);
+
+ TGeoNode * node2 = node1->GetVolume()->FindNode(Form("BTRD%d_1", i));
+ printf("%2d - node2 = %p\n", i, node2);
+ TEveGeoNode * eve_node2 = new TEveGeoNode(node2);
+ eve_node1->AddElement(eve_node2);
+ }
+
+ eve_tnode->Save("gentle_geo_trd.root", "Gentle TRD");
+
+}