-// $Id$
-// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
-
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
* See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
* full copyright notice. *
**************************************************************************/
-#include "AliEveTOFSector.h"
+
+// $Id$
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
+//
+// Class to visualize the TOF digit information
+// in TOF sector frame
+//
+// Author: A. De Caro (email: decaro@sa.infn.t)
+//
+
+#include <TGeoManager.h>
+#include <TClonesArray.h>
+#include <TTree.h>
+
+#include <TEveTrans.h>
#include <AliTOFdigit.h>
#include <AliTOFGeometry.h>
-#include <TEveTrans.h>
-#include <TEveManager.h>
-#include <TStyle.h>
+#include "AliEveTOFSector.h"
Bool_t AliEveTOFSector::fgStaticInitDone = kFALSE;
TEveFrameBox* AliEveTOFSector::fgTOFsectorFrameBox = 0;
fGeoManager(0)
{
+ // default ctr
+
fPlateFlag = new Bool_t[5];
for (Int_t ii=0; ii<5; ii++) fPlateFlag[ii]=kTRUE;
fGeoManager(localGeoManager)
{
+ // ctr
+
fPlateFlag = new Bool_t[5];
for (Int_t ii=0; ii<5; ii++) fPlateFlag[ii]=kTRUE;
fGeoManager(localGeoManager)
{
+ // ctr
+
fPlateFlag = new Bool_t[5];
for (Int_t ii=0; ii<5; ii++) fPlateFlag[ii]=kTRUE;
fGeoManager(localGeoManager)
{
+ // ctr
+
fPlateFlag = new Bool_t[5];
for (Int_t ii=0; ii<5; ii++) fPlateFlag[ii]=kTRUE;
AliEveTOFSector::~AliEveTOFSector()
{
+
+ // dtr
+
/*
fGeoManager = 0x0;
delete fGeoManager;
/* ************************************************************************ */
void AliEveTOFSector::InitStatics()
{
+ //
+ // To initialize statistic variables
+ //
+
if (fgStaticInitDone) return;
Float_t dx = 124.5;
Float_t dz = 29.;
Float_t dy = 370.6*2.;
fgTOFsectorFrameBox = new TEveFrameBox();
-
fgTOFsectorFrameBox->SetAABox(-dx*0.5, -dy*0.5, -dz*0.5, dx, dy, dz);
- fgTOFsectorFrameBox->SetFrameColor(32);//31);
+ fgTOFsectorFrameBox->SetFrameColor(Color_t(32));
+ fgTOFsectorFrameBox->IncRefCount();
//fgTOFsectorPalette = new TEveRGBAPalette(0, 2048); // TOT
//fgTOFsectorPalette->SetLimits(0, 2048);
fgTOFsectorPalette = new TEveRGBAPalette(0, 100000); // TDC
fgTOFsectorPalette->SetOverflowAction(2);
fgTOFsectorPalette->SetUnderflowAction(2);
+ fgTOFsectorPalette->IncRefCount();
fgStaticInitDone = kTRUE;
}
/* ************************************************************************ */
void AliEveTOFSector::InitModule()
{
+ //
+ // To initialize TOF sector frame variables
+ //
fDx = fTOFgeometry->XPad()*fTOFgeometry->NpadX();
//fDy = fTOFgeometry->XPad()*fTOFgeometry->NpadX();
/* ************************************************************************ */
void AliEveTOFSector::LoadQuads()
{
+ //
+ // Load TOF digit as illuminated pad
+ //
//Int_t n_col = gStyle->GetNumberOfColors();
Int_t tdc = -1;
Int_t tot = -1;
- Double_t **coord = new Double_t*[4];
- for (Int_t ii=0; ii<4; ii++) coord[ii] = new Double_t[3];
+ Double_t coord[4][3];
Reset(kQT_FreeQuad, kFALSE, 32);
/* ************************************************************ */
void AliEveTOFSector::SetTrans()
{
+ //
+ // Set the translation matrix for TOF sector
+ //
+
InitMainTrans();
TEveTrans& t = RefMainTrans();
void AliEveTOFSector::SetSectorID(Int_t id)
{
+ //
+ // Set TOF sector ID to be visualized
+ //
+
fSectorID = id;
fSector = id;
if (fAutoTrans)
void AliEveTOFSector::SetPlate(Int_t nPlate, Bool_t r)
{
+ //
+ // Set visualization flag to visualize TOF modules
+ //
fPlateFlag[nPlate] = r;
void AliEveTOFSector::SetThreshold(Short_t t)
{
+ //
+ // Set visualization threshold
+ //
+
fThreshold = TMath::Min(t, (Short_t)(fMaxVal - 1));
// ClearColorArray();
}
void AliEveTOFSector::SetMaxVal(Int_t mv)
{
+ //
+ // Set visualization max value
+ //
+
fMaxVal = TMath::Max(mv, (Int_t)(fThreshold + 1));
//ClearColorArray();
}
void AliEveTOFSector::DigitSelected(Int_t idx)
{
+ //
// Override control-click from TEveQuadSet
+ //
- DigitBase_t* qb = GetDigit(idx);
- TObject* obj = qb->fId.GetObject();
+ TObject* obj = GetId(idx);
AliTOFdigit* digs = dynamic_cast<AliTOFdigit*>(obj);
// printf("AliEveTOFSector::QuadSelected "); Print();
- /*
- printf(" idx = %5i, value = %5d, obj = 0x%lx, digit = 0x%lx ",
- idx, qb->fValue, (ULong_t)obj, (ULong_t)digs);
- */
if (digs)
printf("\n Sector = %2i Plate = %1i Strip = %2i PadZ = %1i PadX = %2i ToT = %3i Tof = %5i\n",
fSector , digs->GetPlate(), digs->GetStrip(), digs->GetPadz(), digs->GetPadx(), digs->GetToT(), digs->GetTdc());