]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONPadInfo.h
added missing declaration in TriggerOnJet for AliHLTScalars
[u/mrichter/AliRoot.git] / MUON / AliMUONPadInfo.h
CommitLineData
faa8d921 1#ifndef ALIMUONPADINFO_H
2#define ALIMUONPADINFO_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id$
8
81f1d3ae 9/// \ingroup calign
faa8d921 10/// \class AliMUONPadInfo
81f1d3ae 11/// \brief Class to summarize ESD data at pad
faa8d921 12// Author Philippe Pillot, Subatech
13
14
15#include <TObject.h>
16
17class AliMUONPadInfo : public TObject {
18public:
19 AliMUONPadInfo(); // Constructor
20 virtual ~AliMUONPadInfo(); //< Destructor
21 AliMUONPadInfo(const AliMUONPadInfo& pad);
22 AliMUONPadInfo& operator=(const AliMUONPadInfo& pad);
23
24 /// Clear method (used by TClonesArray)
25 virtual void Clear(Option_t* = "") {}
26
27 void Print(Option_t * option = "") const;
28
29
30 // ------ pad info ------
31 /// Set pad ID
32 void SetPadId(UInt_t padId) {fPadId = padId; SetUniqueID(fPadId);}
33 /// Return pad ID
34 UInt_t GetPadId() const {return fPadId;}
35
36 /// Return detection element id, part of the uniqueID
37 Int_t GetDetElemId() const {return (fPadId & 0x00000FFF);}
38 /// Return electronic card id, part of the uniqueID
39 Int_t GetManuId() const {return (fPadId & 0x00FFF000) >> 12;}
40 /// Return the channel within ManuId(), part of the uniqueID
41 Int_t GetManuChannel() const {return (fPadId & 0x3F000000) >> 24;}
42 /// Return the cathode number, part of the uniqueID
43 Int_t GetCathode() const {return (fPadId & 0x40000000) >> 30;}
41c52850 44 /// Return the plane type 0=Bending 1=NonBending
45 Int_t GetPadPlaneType() const {return fPadPlaneType;}
46 /// Set the plane type 0=Bending 1=NonBending
47 void SetPadPlaneType(Int_t planeType) {fPadPlaneType = planeType;}
faa8d921 48
49 /// Set pad coordinates (cm)
50 void SetPadXY(Double_t x, Double_t y) {fPadX = x; fPadY = y;}
51 /// Return pad X-position (cm)
52 Double_t GetPadX() const {return fPadX;}
53 /// Return pad Y-position (cm)
54 Double_t GetPadY() const {return fPadY;}
55
56 /// Set pad dimension (cm)
57 void SetPadDimXY(Double_t dX, Double_t dY) {fPadDimX = dX; fPadDimY = dY;}
58 /// Return pad X-dimension (cm)
59 Double_t GetPadDimX() const {return fPadDimX;}
60 /// Return pad Y-dimension (cm)
61 Double_t GetPadDimY() const {return fPadDimY;}
62
63 /// Set the calibrated charge
64 void SetPadCharge(Double_t charge) {fPadCharge = charge;}
65 /// Return the calibrated charge
66 Double_t GetPadCharge() const {return fPadCharge;}
67
68 /// Set the raw charge
69 void SetPadADC(Int_t adc) {fPadADC = adc;}
70 /// Return the raw charge
71 Int_t GetPadADC() const {return fPadADC;}
72
73 /// Set the pad as being calibrated or not
74 void SetCalibrated(Bool_t calibrated = kTRUE) {fPadCalibrated = calibrated;}
75 /// Return kTRUE if the pad is calibrated
76 Bool_t IsCalibrated() const {return fPadCalibrated;}
77 /// Set the pad as being saturated or not
78 void SetSaturated(Bool_t saturated = kTRUE) {fPadSaturated = saturated;}
79 /// Return kTRUE if the pad is saturated
80 Bool_t IsSaturated() const {return fPadSaturated;}
81
82
83 // ------ calibration parameters ------
84 /// Set pedestal parameters
85 void SetPedestal(Float_t mean, Float_t sigma) {fPedMean = mean; fPedSigma = sigma;}
86 /// Return the mean value of the pedestal
87 Float_t GetPedMean() const {return fPedMean;}
88 /// Return the sigma of the pedestal
89 Float_t GetPedSigma() const {return fPedSigma;}
90
91 /// Set gain parameters
92 void SetGain(Float_t a0, Float_t a1, Int_t thres, Int_t qual) {fGainA0 = a0; fGainA1 = a1; fGainThres = thres; fGainQual = qual;}
93 /// Return the linear parameter of the gain
94 Float_t GetGainA0() const {return fGainA0;}
95 /// Return the quadratic parameter of the gain
96 Float_t GetGainA1() const {return fGainA1;}
97 /// Return the threshold of the quadratic behaviour of the gain
98 Int_t GetGainThres() const {return fGainThres;}
99 /// Return the quality of the gain parameters
100 Int_t GetGainQual() const {return fGainQual;}
101
102
103protected:
104
105 // pad info
106 UInt_t fPadId; ///< pad ID
41c52850 107 Int_t fPadPlaneType; ///< pad plane tye (0=Bending; 1=NonBending)
faa8d921 108 Double32_t fPadX; ///< pad X position
109 Double32_t fPadY; ///< pad Y position
110 Double32_t fPadDimX; ///< pad X dimension
111 Double32_t fPadDimY; ///< pad Y dimension
112 Double32_t fPadCharge; ///< pad calibrated charge
113 Int_t fPadADC; ///< pad raw charge
114 Bool_t fPadSaturated; ///< pad saturation flag
115 Bool_t fPadCalibrated; ///< pad calibration flag
116
117 // calibration parameters
118 Float_t fPedMean; ///< mean value of pedestal
119 Float_t fPedSigma; ///< sigma of pedestal
120 Float_t fGainA0; ///< linear parameter of gain
121 Float_t fGainA1; ///< quadratic parameter of gain
122 Int_t fGainThres; ///< threshold of quadratic behaviour of gain
123 Int_t fGainQual; ///< quality of gain parameters
124
81f1d3ae 125 ClassDef(AliMUONPadInfo, 2) //Class to summarize ESD data at pad
faa8d921 126};
127
128#endif