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_tpc(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->SetMainColor(kRed);
    k++;

    TEveGeoShape* its2 = (TEveGeoShape*) *k;
    its2->SetRnrSelf(kTRUE);
    its2->SetMainColor(kRed+2);
    k++;

    TEveGeoShape* its3 = (TEveGeoShape*) *k;
    its3->SetRnrSelf(kTRUE);
    its3->SetMainColor(kRed+4);
  }
//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->SetMainColor(kBlue);
    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->SetMainColor(kGray);
    m++;

    TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
    tpc2->SetRnrSelf(kTRUE);
    tpc2->SetMainColor(kGray);
    m++;

    TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
    tpc3->SetRnrSelf(kTRUE);
    tpc3->SetMainColor(kGray);
    m++;
  }
//TRD+TOF

  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(kFALSE);

      }
  }
//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(kFALSE);
      }
  }
//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(kFALSE);
      }
  }
}

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

  // Fix visibility, color and transparency

  gsre2->SetRnrSelf(kFALSE);
  TEveElement::List_i i = gsre2->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->SetMainColor(kRed);
    k++;

    TEveGeoShape* its2 = (TEveGeoShape*) *k;
    its2->SetRnrSelf(kTRUE);
    its2->SetMainColor(kRed+2);
    k++;

    TEveGeoShape* its3 = (TEveGeoShape*) *k;
    its3->SetRnrSelf(kTRUE);
    its3->SetMainColor(kRed+4);
  }
//TPC

  i++;
  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(kFALSE);

      }
  }
//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(kFALSE);
      }
  }
//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(kFALSE);
      }
  }
  
}

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

  // Fix visibility, color and transparency

  gsre3->SetRnrSelf(kFALSE);
  TEveElement::List_i i = gsre3->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->SetMainColor(kRed);
    k++;

    TEveGeoShape* its2 = (TEveGeoShape*) *k;
    its2->SetRnrSelf(kTRUE);
    its2->SetMainColor(kRed+2);
    k++;

    TEveGeoShape* its3 = (TEveGeoShape*) *k;
    its3->SetRnrSelf(kTRUE);
    its3->SetMainColor(kRed+4);
  }
//TPC

  i++;
  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(kFALSE);

      }
  }

//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(kFALSE);
      }
  }
//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(kFALSE);
      }
  }
}

  TEveElement* top = gEve->GetCurrentEvent();

  AliEveMultiView *mv = AliEveMultiView::Instance();

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

  gEve->FullRedraw3D(kTRUE, kTRUE);   

}
 geom_gentle_tpc.C:1
 geom_gentle_tpc.C:2
 geom_gentle_tpc.C:3
 geom_gentle_tpc.C:4
 geom_gentle_tpc.C:5
 geom_gentle_tpc.C:6
 geom_gentle_tpc.C:7
 geom_gentle_tpc.C:8
 geom_gentle_tpc.C:9
 geom_gentle_tpc.C:10
 geom_gentle_tpc.C:11
 geom_gentle_tpc.C:12
 geom_gentle_tpc.C:13
 geom_gentle_tpc.C:14
 geom_gentle_tpc.C:15
 geom_gentle_tpc.C:16
 geom_gentle_tpc.C:17
 geom_gentle_tpc.C:18
 geom_gentle_tpc.C:19
 geom_gentle_tpc.C:20
 geom_gentle_tpc.C:21
 geom_gentle_tpc.C:22
 geom_gentle_tpc.C:23
 geom_gentle_tpc.C:24
 geom_gentle_tpc.C:25
 geom_gentle_tpc.C:26
 geom_gentle_tpc.C:27
 geom_gentle_tpc.C:28
 geom_gentle_tpc.C:29
 geom_gentle_tpc.C:30
 geom_gentle_tpc.C:31
 geom_gentle_tpc.C:32
 geom_gentle_tpc.C:33
 geom_gentle_tpc.C:34
 geom_gentle_tpc.C:35
 geom_gentle_tpc.C:36
 geom_gentle_tpc.C:37
 geom_gentle_tpc.C:38
 geom_gentle_tpc.C:39
 geom_gentle_tpc.C:40
 geom_gentle_tpc.C:41
 geom_gentle_tpc.C:42
 geom_gentle_tpc.C:43
 geom_gentle_tpc.C:44
 geom_gentle_tpc.C:45
 geom_gentle_tpc.C:46
 geom_gentle_tpc.C:47
 geom_gentle_tpc.C:48
 geom_gentle_tpc.C:49
 geom_gentle_tpc.C:50
 geom_gentle_tpc.C:51
 geom_gentle_tpc.C:52
 geom_gentle_tpc.C:53
 geom_gentle_tpc.C:54
 geom_gentle_tpc.C:55
 geom_gentle_tpc.C:56
 geom_gentle_tpc.C:57
 geom_gentle_tpc.C:58
 geom_gentle_tpc.C:59
 geom_gentle_tpc.C:60
 geom_gentle_tpc.C:61
 geom_gentle_tpc.C:62
 geom_gentle_tpc.C:63
 geom_gentle_tpc.C:64
 geom_gentle_tpc.C:65
 geom_gentle_tpc.C:66
 geom_gentle_tpc.C:67
 geom_gentle_tpc.C:68
 geom_gentle_tpc.C:69
 geom_gentle_tpc.C:70
 geom_gentle_tpc.C:71
 geom_gentle_tpc.C:72
 geom_gentle_tpc.C:73
 geom_gentle_tpc.C:74
 geom_gentle_tpc.C:75
 geom_gentle_tpc.C:76
 geom_gentle_tpc.C:77
 geom_gentle_tpc.C:78
 geom_gentle_tpc.C:79
 geom_gentle_tpc.C:80
 geom_gentle_tpc.C:81
 geom_gentle_tpc.C:82
 geom_gentle_tpc.C:83
 geom_gentle_tpc.C:84
 geom_gentle_tpc.C:85
 geom_gentle_tpc.C:86
 geom_gentle_tpc.C:87
 geom_gentle_tpc.C:88
 geom_gentle_tpc.C:89
 geom_gentle_tpc.C:90
 geom_gentle_tpc.C:91
 geom_gentle_tpc.C:92
 geom_gentle_tpc.C:93
 geom_gentle_tpc.C:94
 geom_gentle_tpc.C:95
 geom_gentle_tpc.C:96
 geom_gentle_tpc.C:97
 geom_gentle_tpc.C:98
 geom_gentle_tpc.C:99
 geom_gentle_tpc.C:100
 geom_gentle_tpc.C:101
 geom_gentle_tpc.C:102
 geom_gentle_tpc.C:103
 geom_gentle_tpc.C:104
 geom_gentle_tpc.C:105
 geom_gentle_tpc.C:106
 geom_gentle_tpc.C:107
 geom_gentle_tpc.C:108
 geom_gentle_tpc.C:109
 geom_gentle_tpc.C:110
 geom_gentle_tpc.C:111
 geom_gentle_tpc.C:112
 geom_gentle_tpc.C:113
 geom_gentle_tpc.C:114
 geom_gentle_tpc.C:115
 geom_gentle_tpc.C:116
 geom_gentle_tpc.C:117
 geom_gentle_tpc.C:118
 geom_gentle_tpc.C:119
 geom_gentle_tpc.C:120
 geom_gentle_tpc.C:121
 geom_gentle_tpc.C:122
 geom_gentle_tpc.C:123
 geom_gentle_tpc.C:124
 geom_gentle_tpc.C:125
 geom_gentle_tpc.C:126
 geom_gentle_tpc.C:127
 geom_gentle_tpc.C:128
 geom_gentle_tpc.C:129
 geom_gentle_tpc.C:130
 geom_gentle_tpc.C:131
 geom_gentle_tpc.C:132
 geom_gentle_tpc.C:133
 geom_gentle_tpc.C:134
 geom_gentle_tpc.C:135
 geom_gentle_tpc.C:136
 geom_gentle_tpc.C:137
 geom_gentle_tpc.C:138
 geom_gentle_tpc.C:139
 geom_gentle_tpc.C:140
 geom_gentle_tpc.C:141
 geom_gentle_tpc.C:142
 geom_gentle_tpc.C:143
 geom_gentle_tpc.C:144
 geom_gentle_tpc.C:145
 geom_gentle_tpc.C:146
 geom_gentle_tpc.C:147
 geom_gentle_tpc.C:148
 geom_gentle_tpc.C:149
 geom_gentle_tpc.C:150
 geom_gentle_tpc.C:151
 geom_gentle_tpc.C:152
 geom_gentle_tpc.C:153
 geom_gentle_tpc.C:154
 geom_gentle_tpc.C:155
 geom_gentle_tpc.C:156
 geom_gentle_tpc.C:157
 geom_gentle_tpc.C:158
 geom_gentle_tpc.C:159
 geom_gentle_tpc.C:160
 geom_gentle_tpc.C:161
 geom_gentle_tpc.C:162
 geom_gentle_tpc.C:163
 geom_gentle_tpc.C:164
 geom_gentle_tpc.C:165
 geom_gentle_tpc.C:166
 geom_gentle_tpc.C:167
 geom_gentle_tpc.C:168
 geom_gentle_tpc.C:169
 geom_gentle_tpc.C:170
 geom_gentle_tpc.C:171
 geom_gentle_tpc.C:172
 geom_gentle_tpc.C:173
 geom_gentle_tpc.C:174
 geom_gentle_tpc.C:175
 geom_gentle_tpc.C:176
 geom_gentle_tpc.C:177
 geom_gentle_tpc.C:178
 geom_gentle_tpc.C:179
 geom_gentle_tpc.C:180
 geom_gentle_tpc.C:181
 geom_gentle_tpc.C:182
 geom_gentle_tpc.C:183
 geom_gentle_tpc.C:184
 geom_gentle_tpc.C:185
 geom_gentle_tpc.C:186
 geom_gentle_tpc.C:187
 geom_gentle_tpc.C:188
 geom_gentle_tpc.C:189
 geom_gentle_tpc.C:190
 geom_gentle_tpc.C:191
 geom_gentle_tpc.C:192
 geom_gentle_tpc.C:193
 geom_gentle_tpc.C:194
 geom_gentle_tpc.C:195
 geom_gentle_tpc.C:196
 geom_gentle_tpc.C:197
 geom_gentle_tpc.C:198
 geom_gentle_tpc.C:199
 geom_gentle_tpc.C:200
 geom_gentle_tpc.C:201
 geom_gentle_tpc.C:202
 geom_gentle_tpc.C:203
 geom_gentle_tpc.C:204
 geom_gentle_tpc.C:205
 geom_gentle_tpc.C:206
 geom_gentle_tpc.C:207
 geom_gentle_tpc.C:208
 geom_gentle_tpc.C:209
 geom_gentle_tpc.C:210
 geom_gentle_tpc.C:211
 geom_gentle_tpc.C:212
 geom_gentle_tpc.C:213
 geom_gentle_tpc.C:214
 geom_gentle_tpc.C:215
 geom_gentle_tpc.C:216
 geom_gentle_tpc.C:217
 geom_gentle_tpc.C:218
 geom_gentle_tpc.C:219
 geom_gentle_tpc.C:220
 geom_gentle_tpc.C:221
 geom_gentle_tpc.C:222
 geom_gentle_tpc.C:223
 geom_gentle_tpc.C:224
 geom_gentle_tpc.C:225
 geom_gentle_tpc.C:226
 geom_gentle_tpc.C:227
 geom_gentle_tpc.C:228
 geom_gentle_tpc.C:229
 geom_gentle_tpc.C:230
 geom_gentle_tpc.C:231
 geom_gentle_tpc.C:232
 geom_gentle_tpc.C:233
 geom_gentle_tpc.C:234
 geom_gentle_tpc.C:235
 geom_gentle_tpc.C:236
 geom_gentle_tpc.C:237
 geom_gentle_tpc.C:238
 geom_gentle_tpc.C:239
 geom_gentle_tpc.C:240
 geom_gentle_tpc.C:241
 geom_gentle_tpc.C:242
 geom_gentle_tpc.C:243
 geom_gentle_tpc.C:244
 geom_gentle_tpc.C:245
 geom_gentle_tpc.C:246
 geom_gentle_tpc.C:247
 geom_gentle_tpc.C:248
 geom_gentle_tpc.C:249
 geom_gentle_tpc.C:250
 geom_gentle_tpc.C:251
 geom_gentle_tpc.C:252
 geom_gentle_tpc.C:253
 geom_gentle_tpc.C:254
 geom_gentle_tpc.C:255
 geom_gentle_tpc.C:256
 geom_gentle_tpc.C:257
 geom_gentle_tpc.C:258
 geom_gentle_tpc.C:259
 geom_gentle_tpc.C:260
 geom_gentle_tpc.C:261
 geom_gentle_tpc.C:262
 geom_gentle_tpc.C:263
 geom_gentle_tpc.C:264
 geom_gentle_tpc.C:265
 geom_gentle_tpc.C:266
 geom_gentle_tpc.C:267
 geom_gentle_tpc.C:268
 geom_gentle_tpc.C:269
 geom_gentle_tpc.C:270
 geom_gentle_tpc.C:271
 geom_gentle_tpc.C:272
 geom_gentle_tpc.C:273
 geom_gentle_tpc.C:274
 geom_gentle_tpc.C:275
 geom_gentle_tpc.C:276
 geom_gentle_tpc.C:277
 geom_gentle_tpc.C:278
 geom_gentle_tpc.C:279
 geom_gentle_tpc.C:280
 geom_gentle_tpc.C:281
 geom_gentle_tpc.C:282
 geom_gentle_tpc.C:283
 geom_gentle_tpc.C:284
 geom_gentle_tpc.C:285
 geom_gentle_tpc.C:286
 geom_gentle_tpc.C:287
 geom_gentle_tpc.C:288
 geom_gentle_tpc.C:289
 geom_gentle_tpc.C:290
 geom_gentle_tpc.C:291
 geom_gentle_tpc.C:292
 geom_gentle_tpc.C:293
 geom_gentle_tpc.C:294
 geom_gentle_tpc.C:295
 geom_gentle_tpc.C:296
 geom_gentle_tpc.C:297
 geom_gentle_tpc.C:298
 geom_gentle_tpc.C:299
 geom_gentle_tpc.C:300
 geom_gentle_tpc.C:301
 geom_gentle_tpc.C:302
 geom_gentle_tpc.C:303
 geom_gentle_tpc.C:304
 geom_gentle_tpc.C:305