]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/tof_digits_strips.C
Clarify cluster loop. Add check for cluster being 0 (seen in online reco-viz).
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_digits_strips.C
index e8a426abed70a3f2eb8f708e9116888443a59e11..6be8c4b74528c7d2ca5b61cfd783f5b6826af751 100644 (file)
@@ -4,15 +4,17 @@
 /**************************************************************************
  * 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.                                                 *
  **************************************************************************/
-void tof_digits_strips()
+
+void tof_digits_strips(Int_t selectedSector=-1)
 {
   TClonesArray *array = 0x0;
 
   Int_t nDigitsInVolume[3] = {-1, -1, -1};
   Int_t nStrips=19;
-  TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
+  TGeoManager *localGeoManager = gEve->GetGeometry("./geometry.root");//  gGeoManager = gEve->GetDefaultGeometry();
+
   if (!localGeoManager) {
     printf("ERROR: no TGeo\n");
   }
@@ -26,53 +28,51 @@ void tof_digits_strips()
   di->LoadDigits();
   di->Dump();
 
-  AliTOFGeometry* g = di->fGeom;
+  AliTOFGeometry* g = di->GetTOFgeometry();
 
   gStyle->SetPalette(1, 0);
   gEve->DisableRedraw();
 
   TString sPlate;
   TString bsPlate="Plate";
-  TString sStrip;
-  TString bsStrip="Strip";
-  TString sPadZ;
-  TString bsPadZ="PadZ";
-  TString sPadX;
-  TString bsPadX="PadX";
-  
+
   Char_t sectorName[100];
   Char_t sectorTitle[200];
 
   TEveElementList* ll = new TEveElementList("TOF");
   ll->SetTitle("TOF detector");
-  ll->SetMainColor((Color_t)2);
+  ll->SetMainColor(2);
   gEve->AddElement(ll);
 
   for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
-
+    if (selectedSector!=-1 && iSector!=selectedSector) continue;
     sprintf(sectorName,"Sector%2i",iSector);
     TEveElementList* l = new TEveElementList(sectorName);
     l->SetTitle(sectorTitle);
-    l->SetMainColor((Color_t)2);
+    l->SetMainColor(2);
     gEve->AddElement(l, ll);
 
 
     for(Int_t iPlate=0; iPlate<g->NPlates(); iPlate++) {
+      if ((iSector==13 || iSector==14 || iSector==15) &&
+         (iPlate==2) )continue; // staging TOF geometry with holes
+
       if(iPlate==2) nStrips=15;
       else nStrips=19;
 
       sPlate=bsPlate;
       sPlate+=iPlate;
       TEveElementList* relPlate = new TEveElementList(sPlate.Data());
-      relPlate->SetMainColor((Color_t)2);
-      gEve->AddElement(relPlaete, l);
+      relPlate->SetMainColor(2);
+      gEve->AddElement(relPlate, l);
 
 
       for(Int_t iStrip=0; iStrip<nStrips; iStrip++) {
 
        array = di->GetDigits(iSector,iPlate, iStrip);
 
-       AliEveTOFStrip* m = new AliEveTOFStrip(localGeoManager,iSector,iPlate,iStrip,array);
+       AliEveTOFStrip* m = new AliEveTOFStrip(localGeoManager,
+                                              iSector,iPlate,iStrip,array);
        gEve->AddElement(m, relPlate);
 
       }