]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDcluster.cxx
one more branch added to TreeR
[u/mrichter/AliRoot.git] / PMD / AliPMDcluster.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 //                                                     //
17 //  Date   : August 05 2003                            //
18 //                                                     //
19 //  Store cluster information                          //
20 //                                                     //
21 //-----------------------------------------------------//
22 #include "Riostream.h"
23 #include "Rtypes.h"
24 #include "AliPMDcluster.h"
25 #include <stdio.h>
26
27 ClassImp(AliPMDcluster)
28
29 AliPMDcluster::AliPMDcluster():
30   fDet(0),
31   fSMN(0)
32 {
33   // Default constructor
34   //  fDet = 0;
35   //  fSMN = 0;
36   for (Int_t i = 0; i < 5; i++)
37     {
38       fClusData[i] = 0.;
39     }
40 }
41 AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata)
42 {
43   // Constructor
44   fDet = idet;
45   fSMN = ismn;
46   for (Int_t i = 0; i < 5; i++)
47     {
48       fClusData[i] = clusdata[i];
49     }
50 }
51 AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):TObject(pmdcluster)
52 {
53   //Copy Constructor 
54   if(&pmdcluster == this) return;
55   this->fDet = pmdcluster.fDet;
56   this->fSMN = pmdcluster.fSMN;
57   for(Int_t i=0; i<5; i++)
58     {
59       this->fClusData[i] = pmdcluster.fClusData[i];
60     }
61   return;
62 }
63
64 AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
65 {
66   // Assignment operator 
67   if(&pmdcluster == this) return *this;
68   this->fDet = pmdcluster.fDet;
69   this->fSMN = pmdcluster.fSMN;
70   for(Int_t i=0; i<5; i++)
71     {
72       this->fClusData[i] = pmdcluster.fClusData[i];
73     }
74   return *this;
75 }
76
77 AliPMDcluster::~AliPMDcluster()
78 {
79   // Destructor
80 }
81
82 Int_t AliPMDcluster::GetDetector() const
83 {
84   return fDet;
85 }
86 Int_t AliPMDcluster::GetSMN() const
87 {
88   return fSMN;
89 }
90 Float_t AliPMDcluster::GetClusX() const
91 {
92   return fClusData[0];
93 }
94 Float_t AliPMDcluster::GetClusY() const
95 {
96   return fClusData[1];
97 }
98 Float_t AliPMDcluster::GetClusADC() const
99 {
100   return fClusData[2];
101 }
102 Float_t AliPMDcluster::GetClusCells() const
103 {
104   return fClusData[3];
105 }
106 Float_t AliPMDcluster::GetClusRadius() const
107 {
108   return fClusData[4];
109 }