]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPadInfo.cxx
change of copyright notice
[u/mrichter/AliRoot.git] / MUON / AliMUONPadInfo.cxx
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 *                                                                        *
4 * Author: The ALICE Off-line Project.                                    *
5 * Contributors are mentioned in the code where appropriate.              *
6 *                                                                        *
7 * Permission to use, copy, modify and distribute this software and its   *
8 * documentation strictly for non-commercial purposes is hereby granted   *
9 * without fee, provided that the above copyright notice appears in all   *
10 * copies and that both the copyright notice and this permission notice   *
11 * appear in the supporting documentation. The authors make no claims     *
12 * about the suitability of this software for any purpose. It is          *
13 * provided "as is" without express or implied warranty.                  *
14 **************************************************************************/
15
16 // $Id$
17
18 //-----------------------------------------------------------------------------
19 /// \ingroup evaluation
20 /// \class AliMUONPadInfo
21 ///
22 /// Class to summarize ESD data at pad
23 ///
24 /// \author Philippe Pillot, Subatech
25 //-----------------------------------------------------------------------------
26
27 #include "AliMUONPadInfo.h"
28
29 #include "AliLog.h"
30
31 #include <Riostream.h>
32
33 /// \cond CLASSIMP
34 ClassImp(AliMUONPadInfo)
35 /// \endcond
36
37 //_____________________________________________________________________________
38 AliMUONPadInfo::AliMUONPadInfo()
39 : TObject(),
40   fPadId(0),
41   fPadX(0.),
42   fPadY(0.),
43   fPadDimX(0.),
44   fPadDimY(0.),
45   fPadCharge(0.),
46   fPadADC(0),
47   fPadSaturated(0),
48   fPadCalibrated(0),
49   fPedMean(0.),
50   fPedSigma(0.),
51   fGainA0(0.),
52   fGainA1(0.),
53   fGainThres(0),
54   fGainQual(0)
55 {
56   /// default constructor
57 }
58
59 //_____________________________________________________________________________
60 AliMUONPadInfo::AliMUONPadInfo (const AliMUONPadInfo& padInfo)
61 : TObject(padInfo),
62   fPadId(padInfo.fPadId),
63   fPadX(padInfo.fPadX),
64   fPadY(padInfo.fPadY),
65   fPadDimX(padInfo.fPadDimX),
66   fPadDimY(padInfo.fPadDimY),
67   fPadCharge(padInfo.fPadCharge),
68   fPadADC(padInfo.fPadADC),
69   fPadSaturated(padInfo.fPadSaturated),
70   fPadCalibrated(padInfo.fPadCalibrated),
71   fPedMean(padInfo.fPedMean),
72   fPedSigma(padInfo.fPedSigma),
73   fGainA0(padInfo.fGainA0),
74   fGainA1(padInfo.fGainA1),
75   fGainThres(padInfo.fGainThres),
76   fGainQual(padInfo.fGainQual)
77 {
78   /// Copy constructor
79 }
80
81 //_____________________________________________________________________________
82 AliMUONPadInfo& AliMUONPadInfo::operator=(const AliMUONPadInfo& padInfo)
83 {
84   /// Equal operator
85   if (this == &padInfo) return *this;
86   
87   TObject::operator=(padInfo); // don't forget to invoke the base class' assignment operator
88   
89   fPadId = padInfo.fPadId;
90   fPadX = padInfo.fPadX;
91   fPadY = padInfo.fPadY;
92   fPadDimX = padInfo.fPadDimX;
93   fPadDimY = padInfo.fPadDimY;
94   fPadCharge = padInfo.fPadCharge;
95   fPadADC = padInfo.fPadADC;
96   fPadSaturated = padInfo.fPadSaturated;
97   fPadCalibrated = padInfo.fPadCalibrated;
98   fPedMean = padInfo.fPedMean;
99   fPedSigma = padInfo.fPedSigma;
100   fGainA0 = padInfo.fGainA0;
101   fGainA1 = padInfo.fGainA1;
102   fGainThres = padInfo.fGainThres;
103   fGainQual = padInfo.fGainQual;
104     
105   return *this;
106 }
107
108 //__________________________________________________________________________
109 AliMUONPadInfo::~AliMUONPadInfo()
110 {
111   /// Destructor
112 }
113
114 //_____________________________________________________________________________
115 void AliMUONPadInfo::Print(Option_t* option) const
116 {
117   /// print pad info content
118   /// also print calibration parameters if option=FULL
119     
120   cout<<Form("- padID=%u (det=%d, manuI=%d, manuC=%d, cath=%d)",
121              GetPadId(), GetDetElemId(), GetManuId(), GetManuChannel(), GetCathode())<<endl;
122   
123   cout<<Form("    position=(%5.2f, %5.2f), dimension=(%5.2f, %5.2f)",
124              GetPadX(), GetPadY(), GetPadDimX(), GetPadDimY())<<endl;
125   
126   cout<<Form("    charge=%5.2f, ADC=%d", GetPadCharge(), GetPadADC())<<endl;
127     
128   if (strstr(option,"FULL")) {
129     cout<<Form("    pedestal (mean=%5.2f, sigma=%5.2f)", GetPedMean(), GetPedSigma())<<endl;
130     cout<<Form("    gain (a0=%5.2f, a1=%5.2f, thres=%d, qual=%d)",
131                GetGainA0(), GetGainA1(), GetGainThres(), GetGainQual())<<endl;
132   }
133   
134 }
135