Flexible pt range for the efficiency histogramming
[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 /// \class AliMUONPadInfo
20 ///
21 /// Class to summarize ESD data at pad
22 ///
23 /// \author Philippe Pillot, Subatech
24 //-----------------------------------------------------------------------------
25
26 #include "AliMUONPadInfo.h"
27
28 #include "AliLog.h"
29
30 #include <Riostream.h>
31
32 using std::cout;
33 using std::endl;
34 /// \cond CLASSIMP
35 ClassImp(AliMUONPadInfo)
36 /// \endcond
37
38 //_____________________________________________________________________________
39 AliMUONPadInfo::AliMUONPadInfo()
40 : TObject(),
41   fPadId(0),
42   fPadPlaneType(0),
43   fPadX(0.),
44   fPadY(0.),
45   fPadDimX(0.),
46   fPadDimY(0.),
47   fPadCharge(0.),
48   fPadADC(0),
49   fPadSaturated(0),
50   fPadCalibrated(0),
51   fPedMean(0.),
52   fPedSigma(0.),
53   fGainA0(0.),
54   fGainA1(0.),
55   fGainThres(0),
56   fGainQual(0)
57 {
58   /// default constructor
59 }
60
61 //_____________________________________________________________________________
62 AliMUONPadInfo::AliMUONPadInfo (const AliMUONPadInfo& padInfo)
63 : TObject(padInfo),
64   fPadId(padInfo.fPadId),
65   fPadPlaneType(padInfo.fPadPlaneType),
66   fPadX(padInfo.fPadX),
67   fPadY(padInfo.fPadY),
68   fPadDimX(padInfo.fPadDimX),
69   fPadDimY(padInfo.fPadDimY),
70   fPadCharge(padInfo.fPadCharge),
71   fPadADC(padInfo.fPadADC),
72   fPadSaturated(padInfo.fPadSaturated),
73   fPadCalibrated(padInfo.fPadCalibrated),
74   fPedMean(padInfo.fPedMean),
75   fPedSigma(padInfo.fPedSigma),
76   fGainA0(padInfo.fGainA0),
77   fGainA1(padInfo.fGainA1),
78   fGainThres(padInfo.fGainThres),
79   fGainQual(padInfo.fGainQual)
80 {
81   /// Copy constructor
82 }
83
84 //_____________________________________________________________________________
85 AliMUONPadInfo& AliMUONPadInfo::operator=(const AliMUONPadInfo& padInfo)
86 {
87   /// Equal operator
88   if (this == &padInfo) return *this;
89   
90   TObject::operator=(padInfo); // don't forget to invoke the base class' assignment operator
91   
92   fPadId = padInfo.fPadId;
93   fPadPlaneType = padInfo.fPadPlaneType;
94   fPadX = padInfo.fPadX;
95   fPadY = padInfo.fPadY;
96   fPadDimX = padInfo.fPadDimX;
97   fPadDimY = padInfo.fPadDimY;
98   fPadCharge = padInfo.fPadCharge;
99   fPadADC = padInfo.fPadADC;
100   fPadSaturated = padInfo.fPadSaturated;
101   fPadCalibrated = padInfo.fPadCalibrated;
102   fPedMean = padInfo.fPedMean;
103   fPedSigma = padInfo.fPedSigma;
104   fGainA0 = padInfo.fGainA0;
105   fGainA1 = padInfo.fGainA1;
106   fGainThres = padInfo.fGainThres;
107   fGainQual = padInfo.fGainQual;
108     
109   return *this;
110 }
111
112 //__________________________________________________________________________
113 AliMUONPadInfo::~AliMUONPadInfo()
114 {
115   /// Destructor
116 }
117
118 //_____________________________________________________________________________
119 void AliMUONPadInfo::Print(Option_t* option) const
120 {
121   /// print pad info content
122   /// also print calibration parameters if option=FULL
123     
124   cout<<Form("- padID=%u (det=%d, manuI=%d, manuC=%d, cath=%d)",
125              GetPadId(), GetDetElemId(), GetManuId(), GetManuChannel(), GetCathode())<<endl;
126   
127   cout<<Form("    position=(%5.2f, %5.2f), dimension=(%5.2f, %5.2f)",
128              GetPadX(), GetPadY(), GetPadDimX(), GetPadDimY())<<endl;
129   
130   cout<<Form("    charge=%5.2f, ADC=%d", GetPadCharge(), GetPadADC())<<endl;
131     
132   if (strstr(option,"FULL")) {
133     cout<<Form("    pedestal (mean=%5.2f, sigma=%5.2f)", GetPedMean(), GetPedSigma())<<endl;
134     cout<<Form("    gain (a0=%5.2f, a1=%5.2f, thres=%d, qual=%d)",
135                GetGainA0(), GetGainA1(), GetGainThres(), GetGainQual())<<endl;
136   }
137   
138 }
139