]>
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 | ||
6 | /* $Id$ */ | |
7 | ||
d88f97cc | 8 | #include <iostream.h> |
9 | #include <math.h> | |
10 | ||
11 | #include "TObject.h" | |
12 | #include "TObjArray.h" | |
13 | #include "TH2.h" | |
14 | #include "TString.h" | |
f40f8fbd | 15 | #include "TMatrix.h" |
16 | ||
d88f97cc | 17 | #include "AliCalmodule.h" |
18 | #include "AliCalcluster.h" | |
19 | #include "AliSignal.h" | |
20 | ||
959fbac5 | 21 | class AliCalorimeter : public TObject |
d88f97cc | 22 | { |
23 | public: | |
24 | AliCalorimeter(); // Default constructor | |
25 | AliCalorimeter(Int_t nrow,Int_t ncol); // Create a calorimeter matrix | |
26 | ~AliCalorimeter(); // Destructor | |
27 | Int_t GetNrows(); // Return number of rows of the matrix | |
28 | Int_t GetNcolumns(); // Return number of columns of the matrix | |
29 | void SetSignal(Int_t row,Int_t col,Float_t s); // Set signal for a certain module | |
30 | void AddSignal(Int_t row,Int_t col,Float_t s); // Add signal to a certain module | |
f40f8fbd | 31 | void AddSignal(AliCalmodule* m); // Add module signal to current calorimeter |
d88f97cc | 32 | void Reset(Int_t row,Int_t col); // Reset signal for a certain module |
33 | void Reset(); // Reset the complete calorimeter | |
34 | Float_t GetSignal(Int_t row,Int_t col); // Provide signal of a certain module | |
35 | Int_t GetNsignals(); // Return number of modules with a signal | |
36 | void Group(Int_t n); // Group modules into clusters (n rings) | |
37 | Int_t GetNclusters(); // Return number of clusters | |
38 | Float_t GetClusteredSignal(Int_t row,Int_t col); // Provide module signal after clustering | |
39 | AliCalcluster* GetCluster(Int_t j); // Access to cluster number j | |
40 | AliCalmodule* GetModule(Int_t j); // Access to 'fired' module number j | |
959fbac5 | 41 | AliCalmodule* GetModule(Int_t row,Int_t col); // Access to module at (row,col) |
d88f97cc | 42 | void SetEdgeOn(Int_t row,Int_t col); // Indicate module as 'edge module' |
43 | void SetEdgeOff(Int_t row,Int_t col); // Indicate module as 'non-edge module' | |
44 | Int_t GetEdgeValue(Int_t row,Int_t col); // Provide the edge flag of a module | |
45 | void SetDead(Int_t row,Int_t col); // Indicate module as 'dead module' | |
46 | void SetAlive(Int_t row,Int_t col); // Indicate module as 'active module' | |
47 | Int_t GetDeadValue(Int_t row,Int_t col); // Provide the dead flag of a module | |
48 | void SetGain(Int_t row,Int_t col,Float_t g); // Set the gain value for a module | |
49 | Float_t GetGain(Int_t row,Int_t col); // Provide the gain value of a module | |
50 | void SetPosition(Int_t row,Int_t col,Float_t* r,TString f); // Set module position | |
f40f8fbd | 51 | void SetPosition(Int_t row,Int_t col,Ali3Vector& r); // Set module position |
d88f97cc | 52 | void GetPosition(Int_t row,Int_t col,Float_t* r,TString f); // Return module position |
f40f8fbd | 53 | AliPosition* GetPosition(Int_t row,Int_t col); // Access to module position |
d88f97cc | 54 | TH2F* DrawModules(); // Draw lego plot of module signals |
55 | TH2F* DrawClusters(); // Draw lego plot of cluster signals | |
56 | void AddVetoSignal(Float_t* r,TString f,Float_t s=0); // Associate (extrapolated) signal | |
57 | AliSignal* GetVetoSignal(Int_t j); // Access to veto signal number j | |
58 | Int_t GetNvetos(); // Provide the number of veto signals | |
59 | ||
60 | protected: | |
61 | Int_t fNrows; // The number of rows | |
62 | Int_t fNcolumns; // The number of columns | |
63 | Int_t fNsignals; // The number of modules with a signal | |
64 | Int_t fNclusters; // The number of clusters | |
f40f8fbd | 65 | AliCalmodule ***fMatrix; //! The matrix of module pointers for internal use |
959fbac5 | 66 | void Sortm(AliCalmodule** a,Int_t& n); // Order the modules with decreasing signal |
d88f97cc | 67 | TObjArray* fClusters; // The array of clusters |
68 | void AddRing(Int_t row,Int_t col,Int_t n); // add signals of n rings around cluster center | |
69 | TObjArray* fModules; // The array of modules for output | |
70 | void LoadMatrix(); // Load calorimeter matrix data from input | |
71 | void Ungroup(); // Restore module matrix as before clustering | |
f40f8fbd | 72 | TH2F* fHmodules; //! The module 2-D histogram for event display |
73 | TH2F* fHclusters; //! The cluster 2-D histogram for event display | |
d88f97cc | 74 | Int_t fNvetos; // The number of associated veto signals |
75 | TObjArray* fVetos; // The array of associated (extrapolated) veto signals | |
f40f8fbd | 76 | TMatrix* fAttributes; // Matrix with module attributes (dead+10*edge) |
77 | TMatrix* fGains; // Matrix with module gains | |
78 | AliPosition ***fPositions; //! Matrix of module position pointers for internal use | |
d88f97cc | 79 | |
959fbac5 | 80 | ClassDef(AliCalorimeter,1) // Description of a modular calorimeter system. |
d88f97cc | 81 | }; |
82 | #endif |