]>
Commit | Line | Data |
---|---|---|
d88f97cc | 1 | #ifndef ALICALORIMETER_H |
2 | #define ALICALORIMETER_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
f531a546 | 6 | // $Id$ |
3da30618 | 7 | |
d88f97cc | 8 | #include <math.h> |
9 | ||
10 | #include "TObject.h" | |
11 | #include "TObjArray.h" | |
12 | #include "TH2.h" | |
13 | #include "TString.h" | |
f40f8fbd | 14 | |
1fbffa23 | 15 | #include "AliObjMatrix.h" |
d88f97cc | 16 | #include "AliCalmodule.h" |
17 | #include "AliCalcluster.h" | |
18 | #include "AliSignal.h" | |
1fbffa23 | 19 | #include "AliPositionObj.h" |
20 | #include "AliAttribObj.h" | |
d88f97cc | 21 | |
959fbac5 | 22 | class AliCalorimeter : public TObject |
d88f97cc | 23 | { |
24 | public: | |
25 | AliCalorimeter(); // Default constructor | |
26 | AliCalorimeter(Int_t nrow,Int_t ncol); // Create a calorimeter matrix | |
c72198f1 | 27 | virtual ~AliCalorimeter(); // Destructor |
28 | AliCalorimeter(AliCalorimeter& c); // Copy constructor | |
d88f97cc | 29 | Int_t GetNrows(); // Return number of rows of the matrix |
30 | Int_t GetNcolumns(); // Return number of columns of the matrix | |
31 | void SetSignal(Int_t row,Int_t col,Float_t s); // Set signal for a certain module | |
32 | void AddSignal(Int_t row,Int_t col,Float_t s); // Add signal to a certain module | |
f40f8fbd | 33 | void AddSignal(AliCalmodule* m); // Add module signal to current calorimeter |
d88f97cc | 34 | void Reset(Int_t row,Int_t col); // Reset signal for a certain module |
a0fd4097 | 35 | void Reset(Int_t mode=0); // Reset the complete calorimeter |
1fbffa23 | 36 | Float_t GetSignal(Int_t row,Int_t col,Int_t mode=0); // Provide signal of a certain module |
d88f97cc | 37 | Int_t GetNsignals(); // Return number of modules with a signal |
1fbffa23 | 38 | void Group(Int_t n=1,Int_t mode=1); // Group modules into clusters (n rings) |
d88f97cc | 39 | Int_t GetNclusters(); // Return number of clusters |
40 | Float_t GetClusteredSignal(Int_t row,Int_t col); // Provide module signal after clustering | |
41 | AliCalcluster* GetCluster(Int_t j); // Access to cluster number j | |
42 | AliCalmodule* GetModule(Int_t j); // Access to 'fired' module number j | |
959fbac5 | 43 | AliCalmodule* GetModule(Int_t row,Int_t col); // Access to module at (row,col) |
d88f97cc | 44 | void SetEdgeOn(Int_t row,Int_t col); // Indicate module as 'edge module' |
45 | void SetEdgeOff(Int_t row,Int_t col); // Indicate module as 'non-edge module' | |
46 | Int_t GetEdgeValue(Int_t row,Int_t col); // Provide the edge flag of a module | |
47 | void SetDead(Int_t row,Int_t col); // Indicate module as 'dead module' | |
48 | void SetAlive(Int_t row,Int_t col); // Indicate module as 'active module' | |
49 | Int_t GetDeadValue(Int_t row,Int_t col); // Provide the dead flag of a module | |
50 | void SetGain(Int_t row,Int_t col,Float_t g); // Set the gain value for a module | |
1fbffa23 | 51 | void SetOffset(Int_t row,Int_t col,Float_t o); // Set the offset value for a module |
d88f97cc | 52 | Float_t GetGain(Int_t row,Int_t col); // Provide the gain value of a module |
1fbffa23 | 53 | Int_t GetGainFlag(Int_t row,Int_t col); // Provide the gain flag value of a module |
54 | Float_t GetOffset(Int_t row,Int_t col); // Provide the offset value of a module | |
55 | Int_t GetOffsetFlag(Int_t row,Int_t col); // Provide the offset flag value of a module | |
d88f97cc | 56 | void SetPosition(Int_t row,Int_t col,Float_t* r,TString f); // Set module position |
f40f8fbd | 57 | void SetPosition(Int_t row,Int_t col,Ali3Vector& r); // Set module position |
d88f97cc | 58 | void GetPosition(Int_t row,Int_t col,Float_t* r,TString f); // Return module position |
f40f8fbd | 59 | AliPosition* GetPosition(Int_t row,Int_t col); // Access to module position |
1fbffa23 | 60 | TH2F* DrawModules(Float_t thresh=0.,Int_t mode=0); // Lego plot of module (corrected) signals above threshold |
61 | TH2F* DrawClusters(Float_t thresh=0.); // Lego plot of cluster signals above threshold | |
8e8e6c7f | 62 | void AddVetoSignal(AliSignal& s); // Associate (extrapolated) signal |
63 | void AddVetoSignal(AliSignal* s) { AddVetoSignal(*s); } | |
d88f97cc | 64 | AliSignal* GetVetoSignal(Int_t j); // Access to veto signal number j |
65 | Int_t GetNvetos(); // Provide the number of veto signals | |
f34f4acb | 66 | void SetName(TString name); // Set the name of the calorimeter system |
67 | TString GetName(); // Provide the name of the calorimeter system | |
1fbffa23 | 68 | void SetSwapMode(Int_t swap=1); // Set the swapmode for the storage of the matrices |
69 | Int_t GetSwapMode(); // Provide the swapmode for the storage of the matrices | |
d88f97cc | 70 | |
71 | protected: | |
72 | Int_t fNrows; // The number of rows | |
73 | Int_t fNcolumns; // The number of columns | |
1fbffa23 | 74 | AliObjMatrix* fMatrix; // The matrix of module pointers |
75 | Int_t fSwap; // The swapmode for the module and position matrices | |
76 | void SortM(AliCalmodule** a,Int_t& n); // Order the modules with decreasing signal (matrix search) | |
77 | void SortA(AliCalmodule** a,Int_t& n); // Order the modules with decreasing signal (fired array search) | |
d88f97cc | 78 | TObjArray* fClusters; // The array of clusters |
79 | void AddRing(Int_t row,Int_t col,Int_t n); // add signals of n rings around cluster center | |
d88f97cc | 80 | void Ungroup(); // Restore module matrix as before clustering |
f40f8fbd | 81 | TH2F* fHmodules; //! The module 2-D histogram for event display |
82 | TH2F* fHclusters; //! The cluster 2-D histogram for event display | |
d88f97cc | 83 | TObjArray* fVetos; // The array of associated (extrapolated) veto signals |
1fbffa23 | 84 | TObjArray* fAttributes; //! Matrix with module attributes (e.g. gain, offset etc...) |
85 | AliObjMatrix* fPositions; //! The matrix of module position pointers | |
f34f4acb | 86 | TString fName; // Name of the calorimeter system |
d88f97cc | 87 | |
1fbffa23 | 88 | ClassDef(AliCalorimeter,4) // Description of a modular calorimeter system. |
d88f97cc | 89 | }; |
90 | #endif |