* hmpid_digits.C, hmpid_raw.C
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Nov 2009 12:13:04 +0000 (12:13 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Nov 2009 12:13:04 +0000 (12:13 +0000)
  With Giacomo Volpe: new macros for display of HMPID digits and raw.

* geom_hmpid.C
  Update for changed HMPID geometry.

* hmpid_clusters.C
  Remove unnecessary argument and check.

* visscan_init.C
  Add hmpid_raw/digits, tof_raw/digits and tpc_digits to the data selection.
  All disabled by default.

EVE/alice-macros/geom_hmpid.C
EVE/alice-macros/hmpid_clusters.C
EVE/alice-macros/hmpid_digits.C [new file with mode: 0644]
EVE/alice-macros/hmpid_raw.C [new file with mode: 0644]
EVE/macros/visscan_init.C

index 48ee52c..512139a 100644 (file)
@@ -20,7 +20,7 @@ void geom_hmpid()
     //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
     //PH TGeoNode* node = gGeoManager->GetTopVolume()->FindNode(Form("HMPID_%d", i));
     char form[1000];
-    sprintf(form, "HMPID_%d", i);
+    sprintf(form, "Hmp%d_0", i);
     TGeoNode* node = gGeoManager->GetTopVolume()->FindNode(form);
 
     TEveGeoTopNode* re = new TEveGeoTopNode(gGeoManager, node);
index 241089d..cd2f2d7 100644 (file)
@@ -24,7 +24,7 @@ class TEvePointSet;
 
 #endif
 
-TEvePointSet* hmpid_clusters(TEveElement* cont=0, Float_t maxR=1000)
+TEvePointSet* hmpid_clusters(TEveElement* cont=0)
 {
   const Int_t nCh=7;
   TClonesArray *cl[nCh] = {0,0,0,0,0,0,0};
@@ -63,17 +63,13 @@ TEvePointSet* hmpid_clusters(TEveElement* cont=0, Float_t maxR=1000)
     TClonesArray *arr=cl[i];
     Int_t ncl=arr->GetEntriesFast();
 
-    Float_t maxRsqr = maxR*maxR;
     while (ncl--) {
       AliCluster3D *c=(AliCluster3D*)arr->UncheckedAt(ncl);
       Float_t g[3]; //global coordinates
       c->GetGlobalXYZ(g);
-      if (g[0]*g[0]+g[1]*g[1] < maxRsqr)
-      {
-       clusters->SetNextPoint(g[0], g[1], g[2]);
-       AliCluster3D *atp = new AliCluster3D(*c);
-       clusters->SetPointId(atp);
-      }
+      clusters->SetNextPoint(g[0], g[1], g[2]);
+      AliCluster3D *atp = new AliCluster3D(*c);
+      clusters->SetPointId(atp);
     }
   }
 
diff --git a/EVE/alice-macros/hmpid_digits.C b/EVE/alice-macros/hmpid_digits.C
new file mode 100644 (file)
index 0000000..16cb5fd
--- /dev/null
@@ -0,0 +1,65 @@
+void hmpid_digits()
+{
+  const Char_t *name[]={ "HMPID0", "HMPID1", "HMPID2", "HMPID3",
+                        "HMPID4", "HMPID5", "HMPID6" };
+
+  AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
+  rl->LoadDigits("HMPID");
+
+  TTree *dTree = rl->GetTreeD("HMPID", kFALSE);
+  if (!dTree) return 0;
+
+  TEveElementList* list = new TEveElementList("HMPID Digits");
+  gEve->AddElement(list);
+
+  gStyle->SetPalette(1, 0);
+
+  TEveRGBAPalette *pal = new TEveRGBAPalette(0, 3000);
+  pal->SetMax(1000);
+  TEveFrameBox    *box = new TEveFrameBox();
+  box->SetAAQuadXY(0, 0, 0, 144, 121);
+  box->SetFrameColor(kGray);
+
+  TClonesArray* digits = new TClonesArray("AliHMPIDDigit");
+  for (Int_t iCh = 0; iCh < 7; ++iCh)
+  {
+    TBranch *br = dTree->GetBranch(name[iCh]);
+    br->SetAddress(&digits);
+    br->GetEntry(0);
+
+    TEveQuadSet* q = new TEveQuadSet(Form("Chamber %d", iCh));
+    q->SetOwnIds(kTRUE);
+    q->SetPalette(pal);
+    q->SetFrame(box);
+    q->SetAntiFlick(kTRUE);
+    q->SetPickable(kTRUE);
+
+    q->Reset(TEveQuadSet::kQT_RectangleXYFixedDimZ, kFALSE, 64);
+    q->SetDefCoord(0);
+    q->SetDefHeight(0.84f);
+    q->SetDefWidth(0.8f);
+
+    for(Int_t iDig = 0; iDig < digits->GetEntriesFast(); ++iDig)
+    {
+      AliHMPIDDigit *pDig = (AliHMPIDDigit*) digits->At(iDig);
+
+      q->AddQuad(pDig->PadChX()*0.8f,  pDig->PadChY()*0.84f);
+      q->QuadValue(TMath::Nint(pDig->Q()));
+      q->QuadId(new AliHMPIDDigit(*pDig));
+    }
+
+    q->RefitPlex();
+
+    TGeoHMatrix mat;
+    AliHMPIDv3::IdealPosition(iCh, &mat);
+    q->RefMainTrans().SetFrom(mat);
+    q->RefMainTrans().Move3LF(-0.5f*144, -0.5f*121, 0);
+
+    list->AddElement(q);
+  }
+
+  delete digits;
+  rl->UnloadDigits("HMPID");
+
+  gEve->Redraw3D();
+}
diff --git a/EVE/alice-macros/hmpid_raw.C b/EVE/alice-macros/hmpid_raw.C
new file mode 100644 (file)
index 0000000..d557caa
--- /dev/null
@@ -0,0 +1,68 @@
+void hmpid_raw()
+{
+  const Char_t *name[] = { "HMPID0", "HMPID1", "HMPID2", "HMPID3",
+                          "HMPID4", "HMPID5", "HMPID6" };
+
+  AliRawReader *rawReader = AliEveEventManager::AssertRawReader();
+  AliHMPIDRawStream stream(rawReader);    
+
+  TEveElementList* list = new TEveElementList("HMPID Raw");
+  gEve->AddElement(list);
+
+  gStyle->SetPalette(1, 0);
+
+  TEveRGBAPalette *pal = new TEveRGBAPalette(0, 3000);
+  pal->SetMax(1000);
+  TEveFrameBox    *box = new TEveFrameBox();
+  box->SetAAQuadXY(0, 0, 0, 144, 121);
+  box->SetFrameColor(kGray);
+
+  TEveQuadSet* ms[7];
+  for (Int_t iCh = 0; iCh < 7; ++iCh)
+  {
+    ms[iCh] = new TEveQuadSet(Form("Chamber %d", iCh));
+
+    TEveQuadSet* q = ms[iCh];
+    q->SetOwnIds(kTRUE);
+    q->SetPalette(pal);
+    q->SetFrame(box);
+    q->SetAntiFlick(kTRUE);
+    q->SetPickable(kTRUE);
+
+    q->Reset(TEveQuadSet::kQT_RectangleXYFixedDimZ, kFALSE, 64);
+    q->SetDefCoord(0);
+    q->SetDefHeight(0.84f);
+    q->SetDefWidth(0.8f);
+  }
+
+  while (stream.Next())
+  {
+    Int_t ch = AliHMPIDParam::DDL2C(stream.GetDDLNumber());
+    TEveQuadSet* q = ms[ch];
+
+    for (Int_t iPad = 0; iPad < stream.GetNPads(); ++iPad)
+    {
+      AliHMPIDDigit dig(stream.GetPadArray()[iPad],stream.GetChargeArray()[iPad]);
+
+      q->AddQuad(dig.PadChX()*0.8f,  dig.PadChY()*0.84f);
+      q->QuadValue(TMath::Nint(dig.Q()));
+      q->QuadId(new AliHMPIDDigit(dig));
+    }
+  }
+
+  for (Int_t iCh = 0; iCh < 7; ++iCh)
+  {
+    TEveQuadSet* q = ms[iCh];
+
+    q->RefitPlex();
+
+    TGeoHMatrix mat;
+    AliHMPIDv3::IdealPosition(iCh, &mat);
+    q->RefMainTrans().SetFrom(mat);
+    q->RefMainTrans().Move3LF(-0.5*144, -0.5*121, 0);
+
+    list->AddElement(q);
+  }
+
+  gEve->Redraw3D();
+}
index caf6a67..7291a78 100644 (file)
@@ -89,10 +89,15 @@ void visscan_init(const TString& cdburi = "",
   exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hit FMD", "fmd_hits.C",    "fmd_hits",    "", kFALSE));
 
   exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG ITS",     "its_digits.C",  "its_digits",  "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG TPC",     "tpc_digits.C",  "tpc_digits",  "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG TOF",     "tof_digits.C",  "tof_digits",  "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG HMPID",   "hmpid_digits.C","hmpid_digits","", kFALSE));
   exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG FMD",     "fmd_digits.C",  "fmd_digits",  "", kFALSE));
 
   exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ITS",     "its_raw.C",     "its_raw",     "", kFALSE));
   exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TPC",     "tpc_raw.C",     "tpc_raw",     "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TOF",     "tof_raw.C",     "tof_raw",     "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW HMPID",   "hmpid_raw.C",   "hmpid_raw",   "", kFALSE));
   exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW T0",      "t0_raw.C",      "t0_raw",      "", kFALSE));
   exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW FMD",     "fmd_raw.C",     "fmd_raw",     "", kFALSE));
   exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW VZERO",   "vzero_raw.C",   "vzero_raw",   "", kFALSE));