]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/AliCalorimeter.h
08-jan-2003 NvE Delete statements for fMatrix[i] and fPositions[i] added in the dtor of
[u/mrichter/AliRoot.git] / RALICE / AliCalorimeter.h
CommitLineData
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
9f8f3e10 8#include "Riostream.h"
d88f97cc 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 21class 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
a0fd4097 33 void Reset(Int_t mode=0); // Reset the complete calorimeter
d88f97cc 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
8e8e6c7f 56 void AddVetoSignal(AliSignal& s); // Associate (extrapolated) signal
57 void AddVetoSignal(AliSignal* s) { AddVetoSignal(*s); }
d88f97cc 58 AliSignal* GetVetoSignal(Int_t j); // Access to veto signal number j
59 Int_t GetNvetos(); // Provide the number of veto signals
f34f4acb 60 void SetName(TString name); // Set the name of the calorimeter system
61 TString GetName(); // Provide the name of the calorimeter system
d88f97cc 62
63 protected:
64 Int_t fNrows; // The number of rows
65 Int_t fNcolumns; // The number of columns
66 Int_t fNsignals; // The number of modules with a signal
67 Int_t fNclusters; // The number of clusters
f40f8fbd 68 AliCalmodule ***fMatrix; //! The matrix of module pointers for internal use
959fbac5 69 void Sortm(AliCalmodule** a,Int_t& n); // Order the modules with decreasing signal
d88f97cc 70 TObjArray* fClusters; // The array of clusters
71 void AddRing(Int_t row,Int_t col,Int_t n); // add signals of n rings around cluster center
72 TObjArray* fModules; // The array of modules for output
73 void LoadMatrix(); // Load calorimeter matrix data from input
74 void Ungroup(); // Restore module matrix as before clustering
f40f8fbd 75 TH2F* fHmodules; //! The module 2-D histogram for event display
76 TH2F* fHclusters; //! The cluster 2-D histogram for event display
d88f97cc 77 Int_t fNvetos; // The number of associated veto signals
78 TObjArray* fVetos; // The array of associated (extrapolated) veto signals
f40f8fbd 79 TMatrix* fAttributes; // Matrix with module attributes (dead+10*edge)
80 TMatrix* fGains; // Matrix with module gains
81 AliPosition ***fPositions; //! Matrix of module position pointers for internal use
f34f4acb 82 TString fName; // Name of the calorimeter system
d88f97cc 83
a0fd4097 84 ClassDef(AliCalorimeter,3) // Description of a modular calorimeter system.
d88f97cc 85};
86#endif