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