1 //*************************************************************************
3 // Visualization of an EMCAL super module.
5 // Author: Magali Estienne (magali.estienne@cern.ch)
7 //*************************************************************************
9 #ifndef ALIEVEEMCALSMODULE_H
10 #define ALIEVEEMCALSMODULE_H
12 #include <TEveQuadSet.h>
13 #include <TEveElement.h>
14 #include <TEveBoxSet.h>
15 #include <TEveFrameBox.h>
16 #include <TEvePointSet.h>
17 #include <TClonesArray.h>
20 #include <TGedFrame.h>
22 class AliEveEMCALData;
23 class AliEveEMCALSModuleData;
26 class AliEveEMCALSModule : public TEveElement,
33 AliEveEMCALSModule(Int_t smodid, const Text_t* n, const Text_t* t);
34 ~AliEveEMCALSModule();
38 virtual void ComputeBBox();
39 virtual UInt_t IncRTS() { return ++fRTS; };
40 virtual Bool_t CanEditMainColor() const { return kTRUE; }
42 void SetDataSource(AliEveEMCALData *data);
43 void SetSModuleID(Int_t id);
44 void SetFrameColor(Color_t col) { fFrameColor = col; IncRTS(); };
45 AliEveEMCALData* GetData() const { return fEMCALData; };
46 AliEveEMCALSModuleData* GetSModuleData() const;
47 Int_t GetID() const { return fSModuleID; };
48 void SetThreshold(Short_t t);
49 void SetMaxVal(Int_t mv);
50 void SetClusterSize(Int_t size);
51 void SetHitSize(Int_t size);
56 AliEveEMCALData *fEMCALData; // Data for the current event
57 AliEveEMCALSModuleData *fEMCALSModuleData; // Data of Super Module (SM)
58 Color_t fFrameColor; // Main coloring
59 UInt_t fRTS; //! Rendering Time Stamp
60 Int_t fSModuleID; // Id of super module, 0 to 11
61 TEveQuadSet *fQuadSet; // Digit container
62 TEveQuadSet *fQuadSet2; // Cluster container
63 TEvePointSet *fPointSet; // Hit container
64 Short_t fThreshold; // Digit amplitude threshold
65 Int_t fMaxVal; // Digit amplitude maximum value
66 Int_t fClusterSize; // Cluster point size
67 Int_t fHitSize; // Hit point size
68 mutable UChar_t *fColorArray; // Color-cache
69 Int_t fDebug; // Debug option
71 Float_t fSMBigBBox[3]; // Bounding Box of full SM
72 Float_t fSMSmallBBox[3]; // Bounding Box of half SM
73 Float_t fSMBBoxCenter[3]; // Bounding Box Center of full SM
75 static Bool_t fStaticInit; // Flag for static variable initialization.
76 static TEveFrameBox *fFrameBigBox; // Frame box per full SM
77 static TEveFrameBox *fFrameSmallBox; // Frame box per half SM
78 static TEveRGBAPalette *fFrameDigPalette; // Signal to color mapping for EMCAL digits
79 static TEveRGBAPalette *fFrameCluPalette; // Signal to color mapping for EMCAL clusters
81 void SetupColor(Int_t val, UChar_t* pix) const;
83 //****** Not used yet **************
84 void ClearColorArray();
85 void SetupColorArray() const;
86 UChar_t* ColorFromArray(Int_t val) const;
87 void ColorFromArray(Int_t val, UChar_t* pix) const;
88 Int_t ColorIndex(Int_t val) const;
89 //**********************************
92 AliEveEMCALSModule(const AliEveEMCALSModule&);
93 AliEveEMCALSModule& operator=(const AliEveEMCALSModule&); // Not implemented
95 ClassDef(AliEveEMCALSModule, 0); // Base class for TRD hits visualisation