]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCclusterKr.cxx
Fix in documentation
[u/mrichter/AliRoot.git] / TPC / AliTPCclusterKr.cxx
CommitLineData
9a1e27fe 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: AliTPCclusterKr.cxx,v 1.7 2008/01/22 17:24:53 matyja Exp $ */
17
18//-----------------------------------------------------------------
19// Implementation of the TPC Kr cluster class
20//
21// Origin: Adam Matyja, INP PAN, adam.matyja@ifj.edu.pl
22//-----------------------------------------------------------------
23
24#include "AliTPCclusterKr.h"
25#include "TObject.h"
26#include <vector>
27#include "AliTPCvtpr.h"
28
29ClassImp(AliTPCclusterKr)
30
31
32AliTPCclusterKr::AliTPCclusterKr()
33:fMax(),
b67657b5 34 fADCcluster(0),
35 fSec(0),
36 fNPads(0),
37 fNRows(0),
38 fSize(0),
39 fCenterX(0),
40 fCenterY(0),
41 fCenterT(0)
9a1e27fe 42{
43//
44// default constructor
45//
46}
47
48AliTPCclusterKr::AliTPCclusterKr(const AliTPCclusterKr &param)
49:fMax(),
b67657b5 50 fADCcluster(0),
51 fSec(0),
52 fNPads(0),
53 fNRows(0),
54 fSize(0),
55 fCenterX(0),
56 fCenterY(0),
57 fCenterT(0)
9a1e27fe 58{
59//
60// copy constructor
61//
62 fADCcluster = param.fADCcluster;
b67657b5 63 fSec = param.fSec ;
64 fNPads = param.fNPads;
65 fNRows = param.fNRows;
9a1e27fe 66 fMax = param.fMax;
b67657b5 67 fCluster = param.fCluster;
68 fSize = param.fSize;
69 fCenterX = param.fCenterX;
70 fCenterY = param.fCenterY;
71 fCenterT = param.fCenterT;
9a1e27fe 72}
73
74AliTPCclusterKr &AliTPCclusterKr::operator = (const AliTPCclusterKr & param)
75{
76 fADCcluster = param.fADCcluster;
b67657b5 77 fSec = param.fSec ;
78 fNPads = param.fNPads;
79 fNRows = param.fNRows;
9a1e27fe 80 fMax = param.fMax;
81 fCluster=param.fCluster;
82 fSize=param.fSize;
b67657b5 83 fCenterX = param.fCenterX;
84 fCenterY = param.fCenterY;
85 fCenterT = param.fCenterT;
9a1e27fe 86 return (*this);
87}
88
89AliTPCclusterKr::~AliTPCclusterKr()
90{
91 //
92 // destructor
93 //
94}
b67657b5 95
96////____________________________________________________________________________
97void AliTPCclusterKr::SetCenter(){
98 Double_t rX=0;
99 Double_t rY=0;
100 Double_t rT=0;
101
102 Short_t adc;
103 fADCcluster=0;
104 for( std::vector<AliTPCvtpr*>::iterator iclus = fCluster.begin();
105 iclus != fCluster.end(); ++iclus ) {
106 adc = (*iclus)->GetAdc();
107 fADCcluster+=adc;
108 rX += ((*iclus)->GetX() * adc);
109 rY += ((*iclus)->GetY() * adc);
110 rT += ((*iclus)->GetTime() * adc);
111 }
112 fCenterX=rX/fADCcluster;
113 fCenterY=rY/fADCcluster;
114 fCenterT=rT/fADCcluster;
115
116 return;
117}