X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=EVE%2Falice-macros%2Fits_digits.C;h=74a38e1cc6a69ead92536eb4c77130e82260ce78;hb=25b4bdb293e97f4d327f8b1fb7569740cda31723;hp=6d7584480666530cc0c48ab3657d0eebb601be20;hpb=d810d0de85db24ed8bd73f51aad50e97da98c374;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVE/alice-macros/its_digits.C b/EVE/alice-macros/its_digits.C index 6d758448066..74a38e1cc6a 100644 --- a/EVE/alice-macros/its_digits.C +++ b/EVE/alice-macros/its_digits.C @@ -4,9 +4,11 @@ /************************************************************************** * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * - * full copyright notice. * + * full copyright notice. * **************************************************************************/ +#include // bypass a cint problem in root-5.20 + // Load ITS digits. // Argument mode is a bitwise or determining which layers to import: // 1, 2 : SPD @@ -14,169 +16,21 @@ // 16, 32 : SSD // By default import all layers. -void its_digits(Int_t mode=63) +void its_digits(Int_t mode = 63, + Bool_t check_empty = kTRUE, + Bool_t scaled_modules = kFALSE) { AliRunLoader* rl = AliEveEventManager::AssertRunLoader(); rl->LoadDigits("ITS"); TTree* dt = rl->GetTreeD("ITS", false); + TEveUtil::LoadMacro("its_common_foos.C"); + AliEveITSDigitsInfo* di = new AliEveITSDigitsInfo(); di->SetTree(dt); - di->Dump(); - // Could initialize AliEveITSModule statics (?) - - AliITSgeom* g = di->fGeom; + // di->Dump(); gStyle->SetPalette(1, 0); - // Initialize palettes (?) - - gEve->DisableRedraw(); - - TString sSector; - TString bsSector="Sector"; - TString sStave; - TString bsStave="Stave"; - TString sLadder; - TString bsLadder="Ladder"; - - Int_t i=0; - Int_t nsec, nstave, nlad, nMod; - - if (mode & 1) { - TEveElementList* l = new TEveElementList("SPD0"); - l->SetTitle("SPDs' first layer"); - l->SetMainColor((Color_t)2); - gEve->AddElement(l); - for (nsec=0; nsec<10; nsec++) { - sSector = bsSector; - sSector += nsec; - TEveElementList* relSector = new TEveElementList(sSector.Data()); - relSector->SetMainColor((Color_t)2); - gEve->AddElement(relSector, l); - for (nstave=0; nstave<2; nstave++){ - sStave = bsStave; - sStave += nstave; - TEveElementList* relStave = new TEveElementList(sStave.Data()); - relStave->SetMainColor((Color_t)2); - gEve->AddElement(relStave, relSector); - for (nMod=0; nMod<4; nMod++) { - AliEveITSModule* m = new AliEveITSModule(i++, di); - gEve->AddElement(m, relStave); - } - } - } - } else { - i += 10*2*4; - } - - if (mode & 2) { - TEveElementList* l = new TEveElementList("SPD1"); - l->SetTitle("SPDs' second layer"); - l->SetMainColor((Color_t)2); - gEve->AddElement(l); - - for (nsec=0; nsec<10; nsec++) { - sSector = bsSector; - sSector += nsec; - TEveElementList* relSector = new TEveElementList(sSector.Data()); - relSector->SetMainColor((Color_t)2); - gEve->AddElement(relSector, l); - for (nstave=0; nstave<4; nstave++){ - sStave = bsStave; - sStave += nstave; - TEveElementList* relStave = new TEveElementList(sStave.Data()); - relStave->SetMainColor((Color_t)2); - gEve->AddElement(relStave, relSector); - for (nMod=0; nMod<4; nMod++) { - AliEveITSModule* m = new AliEveITSModule(i++, di); - gEve->AddElement(m, relStave); - } - } - } - } else { - i += 10*4*4; - } - - if (mode & 4) { - TEveElementList* l = new TEveElementList("SDD2"); - l->SetTitle("SDDs' first layer"); - l->SetMainColor((Color_t)3); - gEve->AddElement(l); - - for (nlad=0; nlad<14; nlad++) { - sLadder = bsLadder; - sLadder += nlad; - TEveElementList* relLadder = new TEveElementList(sLadder.Data()); - relLadder->SetMainColor((Color_t)3); - gEve->AddElement(relLadder, l); - for (nMod=0; nMod<6; nMod++) { - AliEveITSModule* m = new AliEveITSModule(i++, di); - gEve->AddElement(m, relLadder); - } - } - } else { - i += 14*6; - } - - if (mode & 8) { - TEveElementList* l = new TEveElementList("SDD3"); - l->SetTitle("SDDs' second layer"); - l->SetMainColor((Color_t)3); - gEve->AddElement(l); - for (nlad=0; nlad<22; nlad++) { - sLadder = bsLadder; - sLadder += nlad; - TEveElementList* relLadder = new TEveElementList(sLadder.Data()); - relLadder->SetMainColor((Color_t)3); - gEve->AddElement(relLadder, l); - for (nMod=0; nMod<8; nMod++) { - AliEveITSModule* m = new AliEveITSModule(i++, di); - gEve->AddElement(m, relLadder); - } - } - } else { - i += 22*8; - } - - if (mode & 16) { - TEveElementList* l = new TEveElementList("SSD4"); - l->SetTitle("SSDs' first layer"); - l->SetMainColor((Color_t)4); - gEve->AddElement(l); - for (nlad=0; nlad<34; nlad++) { - sLadder = bsLadder; - sLadder += nlad; - TEveElementList* relLadder = new TEveElementList(sLadder.Data()); - relLadder->SetMainColor((Color_t)4); - gEve->AddElement(relLadder, l); - for (nMod=0; nMod<22; nMod++) { - AliEveITSModule* m = new AliEveITSModule(i++, di); - gEve->AddElement(m, relLadder); - } - } - } else { - i += 34*22; - } - - if (mode & 32) { - TEveElementList* l = new TEveElementList("SSD5"); - l->SetTitle("SSDs' second layer"); - l->SetMainColor((Color_t)4); - gEve->AddElement(l); - for (nlad=0; nlad<38; nlad++) { - sLadder = bsLadder; - sLadder += nlad; - TEveElementList* relLadder = new TEveElementList(sLadder.Data()); - relLadder->SetMainColor((Color_t)4); - gEve->AddElement(relLadder, l); - for (nMod=0; nMod<25; nMod++) { - AliEveITSModule* m = new AliEveITSModule(i++, di); - gEve->AddElement(m, relLadder); - } - } - } else { - i += 38*25; - } - gEve->EnableRedraw(); + its_display_raw_digits(di, mode, check_empty, scaled_modules); }