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