]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPadInfo.cxx
Updated READMEmapping
[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   fPadPlaneType(0),
42   fPadX(0.),
43   fPadY(0.),
44   fPadDimX(0.),
45   fPadDimY(0.),
46   fPadCharge(0.),
47   fPadADC(0),
48   fPadSaturated(0),
49   fPadCalibrated(0),
50   fPedMean(0.),
51   fPedSigma(0.),
52   fGainA0(0.),
53   fGainA1(0.),
54   fGainThres(0),
55   fGainQual(0)
56 {
57   /// default constructor
58 }
59
60 //_____________________________________________________________________________
61 AliMUONPadInfo::AliMUONPadInfo (const AliMUONPadInfo& padInfo)
62 : TObject(padInfo),
63   fPadId(padInfo.fPadId),
64   fPadPlaneType(padInfo.fPadPlaneType),
65   fPadX(padInfo.fPadX),
66   fPadY(padInfo.fPadY),
67   fPadDimX(padInfo.fPadDimX),
68   fPadDimY(padInfo.fPadDimY),
69   fPadCharge(padInfo.fPadCharge),
70   fPadADC(padInfo.fPadADC),
71   fPadSaturated(padInfo.fPadSaturated),
72   fPadCalibrated(padInfo.fPadCalibrated),
73   fPedMean(padInfo.fPedMean),
74   fPedSigma(padInfo.fPedSigma),
75   fGainA0(padInfo.fGainA0),
76   fGainA1(padInfo.fGainA1),
77   fGainThres(padInfo.fGainThres),
78   fGainQual(padInfo.fGainQual)
79 {
80   /// Copy constructor
81 }
82
83 //_____________________________________________________________________________
84 AliMUONPadInfo& AliMUONPadInfo::operator=(const AliMUONPadInfo& padInfo)
85 {
86   /// Equal operator
87   if (this == &padInfo) return *this;
88   
89   TObject::operator=(padInfo); // don't forget to invoke the base class' assignment operator
90   
91   fPadId = padInfo.fPadId;
92   fPadPlaneType = padInfo.fPadPlaneType;
93   fPadX = padInfo.fPadX;
94   fPadY = padInfo.fPadY;
95   fPadDimX = padInfo.fPadDimX;
96   fPadDimY = padInfo.fPadDimY;
97   fPadCharge = padInfo.fPadCharge;
98   fPadADC = padInfo.fPadADC;
99   fPadSaturated = padInfo.fPadSaturated;
100   fPadCalibrated = padInfo.fPadCalibrated;
101   fPedMean = padInfo.fPedMean;
102   fPedSigma = padInfo.fPedSigma;
103   fGainA0 = padInfo.fGainA0;
104   fGainA1 = padInfo.fGainA1;
105   fGainThres = padInfo.fGainThres;
106   fGainQual = padInfo.fGainQual;
107     
108   return *this;
109 }
110
111 //__________________________________________________________________________
112 AliMUONPadInfo::~AliMUONPadInfo()
113 {
114   /// Destructor
115 }
116
117 //_____________________________________________________________________________
118 void AliMUONPadInfo::Print(Option_t* option) const
119 {
120   /// print pad info content
121   /// also print calibration parameters if option=FULL
122     
123   cout<<Form("- padID=%u (det=%d, manuI=%d, manuC=%d, cath=%d)",
124              GetPadId(), GetDetElemId(), GetManuId(), GetManuChannel(), GetCathode())<<endl;
125   
126   cout<<Form("    position=(%5.2f, %5.2f), dimension=(%5.2f, %5.2f)",
127              GetPadX(), GetPadY(), GetPadDimX(), GetPadDimY())<<endl;
128   
129   cout<<Form("    charge=%5.2f, ADC=%d", GetPadCharge(), GetPadADC())<<endl;
130     
131   if (strstr(option,"FULL")) {
132     cout<<Form("    pedestal (mean=%5.2f, sigma=%5.2f)", GetPedMean(), GetPedSigma())<<endl;
133     cout<<Form("    gain (a0=%5.2f, a1=%5.2f, thres=%d, qual=%d)",
134                GetGainA0(), GetGainA1(), GetGainThres(), GetGainQual())<<endl;
135   }
136   
137 }
138