ROOT logo
#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TFile.h>
#include <TGLViewer.h>
#include <TEveManager.h>
#include <TEveElement.h>
#include <TEveGeoShape.h>
#include <TEveGeoShapeExtract.h>

#include <AliEveEventManager.h>
#include <AliEveMultiView.h>
#endif

void geom_gentle_notransparency(Bool_t register_as_global=kTRUE)
{
  TEveGeoShape* gsre1;
  TEveGeoShape* gsre2;
  TEveGeoShape* gsre3;
  
{
    TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
    TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
    gsre1 = TEveGeoShape::ImportShapeExtract(gse);
    f.Close();

    if (register_as_global)
    {
      gEve->AddGlobalElement(gsre1);
    }

    // Fix visibility, color and transparency

    gsre1->SetRnrSelf(kFALSE);
    TEveElement::List_i i = gsre1->BeginChildren();

  //ITS
    {
      TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
      lvl1->SetRnrSelf(kFALSE);
      TEveElement::List_i j = lvl1->BeginChildren();

      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
      lvl2->SetRnrSelf(kFALSE);
      TEveElement::List_i k = lvl2->BeginChildren();

      TEveGeoShape* its1 = (TEveGeoShape*) *k;
      its1->SetRnrSelf(kTRUE);
      its1->SetMainTransparency(5);
      k++;

      TEveGeoShape* its2 = (TEveGeoShape*) *k;
      its2->SetRnrSelf(kTRUE);
      its2->SetMainTransparency(5);
      k++;

      TEveGeoShape* its3 = (TEveGeoShape*) *k;
      its3->SetRnrSelf(kTRUE);
      its3->SetMainTransparency(5);
    }
  //TPC

    i++;
    {
      TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
      lvl1->SetRnrSelf(kFALSE);
      TEveElement::List_i j = lvl1->BeginChildren();

      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
      lvl2->SetRnrSelf(kFALSE);
      TEveElement::List_i k = lvl2->BeginChildren();

      TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
      lvl3->SetRnrSelf(kTRUE);
      lvl3->SetMainTransparency(5);
      TEveElement::List_i l = lvl3->BeginChildren();

      TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
      lvl4->SetRnrSelf(kFALSE);
      TEveElement::List_i m = lvl4->BeginChildren();

      TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
      tpc1->SetRnrSelf(kTRUE);
      tpc1->SetMainTransparency(5);
      m++;

      TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
      tpc2->SetMainColor(kGray);
      tpc2->SetMainTransparency(5);
      m++;

      TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
      tpc3->SetRnrSelf(kTRUE);
      tpc3->SetMainTransparency(5);
      m++;
    }

  //TRD+TOF

    i++;
    {
    TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
    lvl1->SetRnrSelf(kFALSE);
    TEveElement::List_i j = lvl1->BeginChildren();

    TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
    lvl2->SetRnrSelf(kTRUE);
    lvl2->SetMainTransparency(5);
    j++;

    TEveGeoShape* lvl3 = (TEveGeoShape*) *j;
    lvl3->SetRnrSelf(kTRUE);
    lvl3->SetMainTransparency(5);
    j++;
    }

  //PHOS

    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->SetMainTransparency(5);
      }
    }
    
  //HMPID

    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->SetMainTransparency(5);
      }
    }
}

{
  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
  gsre2 = TEveGeoShape::ImportShapeExtract(gse);
  f.Close();
}

{
  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
  gsre3 = TEveGeoShape::ImportShapeExtract(gse);
  f.Close();
}

  TEveElement* top = gEve->GetCurrentEvent();

  AliEveMultiView *mv = AliEveMultiView::Instance();

  mv->InitGeomGentle(gsre1, gsre2, gsre3, 0);

  gEve->FullRedraw3D(kTRUE, kTRUE);

}

 geom_gentle_notransparency.C:1
 geom_gentle_notransparency.C:2
 geom_gentle_notransparency.C:3
 geom_gentle_notransparency.C:4
 geom_gentle_notransparency.C:5
 geom_gentle_notransparency.C:6
 geom_gentle_notransparency.C:7
 geom_gentle_notransparency.C:8
 geom_gentle_notransparency.C:9
 geom_gentle_notransparency.C:10
 geom_gentle_notransparency.C:11
 geom_gentle_notransparency.C:12
 geom_gentle_notransparency.C:13
 geom_gentle_notransparency.C:14
 geom_gentle_notransparency.C:15
 geom_gentle_notransparency.C:16
 geom_gentle_notransparency.C:17
 geom_gentle_notransparency.C:18
 geom_gentle_notransparency.C:19
 geom_gentle_notransparency.C:20
 geom_gentle_notransparency.C:21
 geom_gentle_notransparency.C:22
 geom_gentle_notransparency.C:23
 geom_gentle_notransparency.C:24
 geom_gentle_notransparency.C:25
 geom_gentle_notransparency.C:26
 geom_gentle_notransparency.C:27
 geom_gentle_notransparency.C:28
 geom_gentle_notransparency.C:29
 geom_gentle_notransparency.C:30
 geom_gentle_notransparency.C:31
 geom_gentle_notransparency.C:32
 geom_gentle_notransparency.C:33
 geom_gentle_notransparency.C:34
 geom_gentle_notransparency.C:35
 geom_gentle_notransparency.C:36
 geom_gentle_notransparency.C:37
 geom_gentle_notransparency.C:38
 geom_gentle_notransparency.C:39
 geom_gentle_notransparency.C:40
 geom_gentle_notransparency.C:41
 geom_gentle_notransparency.C:42
 geom_gentle_notransparency.C:43
 geom_gentle_notransparency.C:44
 geom_gentle_notransparency.C:45
 geom_gentle_notransparency.C:46
 geom_gentle_notransparency.C:47
 geom_gentle_notransparency.C:48
 geom_gentle_notransparency.C:49
 geom_gentle_notransparency.C:50
 geom_gentle_notransparency.C:51
 geom_gentle_notransparency.C:52
 geom_gentle_notransparency.C:53
 geom_gentle_notransparency.C:54
 geom_gentle_notransparency.C:55
 geom_gentle_notransparency.C:56
 geom_gentle_notransparency.C:57
 geom_gentle_notransparency.C:58
 geom_gentle_notransparency.C:59
 geom_gentle_notransparency.C:60
 geom_gentle_notransparency.C:61
 geom_gentle_notransparency.C:62
 geom_gentle_notransparency.C:63
 geom_gentle_notransparency.C:64
 geom_gentle_notransparency.C:65
 geom_gentle_notransparency.C:66
 geom_gentle_notransparency.C:67
 geom_gentle_notransparency.C:68
 geom_gentle_notransparency.C:69
 geom_gentle_notransparency.C:70
 geom_gentle_notransparency.C:71
 geom_gentle_notransparency.C:72
 geom_gentle_notransparency.C:73
 geom_gentle_notransparency.C:74
 geom_gentle_notransparency.C:75
 geom_gentle_notransparency.C:76
 geom_gentle_notransparency.C:77
 geom_gentle_notransparency.C:78
 geom_gentle_notransparency.C:79
 geom_gentle_notransparency.C:80
 geom_gentle_notransparency.C:81
 geom_gentle_notransparency.C:82
 geom_gentle_notransparency.C:83
 geom_gentle_notransparency.C:84
 geom_gentle_notransparency.C:85
 geom_gentle_notransparency.C:86
 geom_gentle_notransparency.C:87
 geom_gentle_notransparency.C:88
 geom_gentle_notransparency.C:89
 geom_gentle_notransparency.C:90
 geom_gentle_notransparency.C:91
 geom_gentle_notransparency.C:92
 geom_gentle_notransparency.C:93
 geom_gentle_notransparency.C:94
 geom_gentle_notransparency.C:95
 geom_gentle_notransparency.C:96
 geom_gentle_notransparency.C:97
 geom_gentle_notransparency.C:98
 geom_gentle_notransparency.C:99
 geom_gentle_notransparency.C:100
 geom_gentle_notransparency.C:101
 geom_gentle_notransparency.C:102
 geom_gentle_notransparency.C:103
 geom_gentle_notransparency.C:104
 geom_gentle_notransparency.C:105
 geom_gentle_notransparency.C:106
 geom_gentle_notransparency.C:107
 geom_gentle_notransparency.C:108
 geom_gentle_notransparency.C:109
 geom_gentle_notransparency.C:110
 geom_gentle_notransparency.C:111
 geom_gentle_notransparency.C:112
 geom_gentle_notransparency.C:113
 geom_gentle_notransparency.C:114
 geom_gentle_notransparency.C:115
 geom_gentle_notransparency.C:116
 geom_gentle_notransparency.C:117
 geom_gentle_notransparency.C:118
 geom_gentle_notransparency.C:119
 geom_gentle_notransparency.C:120
 geom_gentle_notransparency.C:121
 geom_gentle_notransparency.C:122
 geom_gentle_notransparency.C:123
 geom_gentle_notransparency.C:124
 geom_gentle_notransparency.C:125
 geom_gentle_notransparency.C:126
 geom_gentle_notransparency.C:127
 geom_gentle_notransparency.C:128
 geom_gentle_notransparency.C:129
 geom_gentle_notransparency.C:130
 geom_gentle_notransparency.C:131
 geom_gentle_notransparency.C:132
 geom_gentle_notransparency.C:133
 geom_gentle_notransparency.C:134
 geom_gentle_notransparency.C:135
 geom_gentle_notransparency.C:136
 geom_gentle_notransparency.C:137
 geom_gentle_notransparency.C:138
 geom_gentle_notransparency.C:139
 geom_gentle_notransparency.C:140
 geom_gentle_notransparency.C:141
 geom_gentle_notransparency.C:142
 geom_gentle_notransparency.C:143
 geom_gentle_notransparency.C:144
 geom_gentle_notransparency.C:145
 geom_gentle_notransparency.C:146
 geom_gentle_notransparency.C:147
 geom_gentle_notransparency.C:148
 geom_gentle_notransparency.C:149
 geom_gentle_notransparency.C:150
 geom_gentle_notransparency.C:151
 geom_gentle_notransparency.C:152
 geom_gentle_notransparency.C:153
 geom_gentle_notransparency.C:154
 geom_gentle_notransparency.C:155
 geom_gentle_notransparency.C:156
 geom_gentle_notransparency.C:157
 geom_gentle_notransparency.C:158
 geom_gentle_notransparency.C:159
 geom_gentle_notransparency.C:160
 geom_gentle_notransparency.C:161
 geom_gentle_notransparency.C:162
 geom_gentle_notransparency.C:163
 geom_gentle_notransparency.C:164
 geom_gentle_notransparency.C:165
 geom_gentle_notransparency.C:166
 geom_gentle_notransparency.C:167
 geom_gentle_notransparency.C:168
 geom_gentle_notransparency.C:169
 geom_gentle_notransparency.C:170