1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /* $Id: AliTPCclusterKr.cxx,v 1.7 2008/01/22 17:24:53 matyja Exp $ */
18 //-----------------------------------------------------------------
19 // Implementation of the TPC Kr cluster class
21 // Origin: Adam Matyja, INP PAN, adam.matyja@ifj.edu.pl
22 //-----------------------------------------------------------------
24 #include "AliTPCclusterKr.h"
27 #include "AliTPCvtpr.h"
29 ClassImp(AliTPCclusterKr)
32 AliTPCclusterKr::AliTPCclusterKr()
44 // default constructor
48 AliTPCclusterKr::AliTPCclusterKr(const AliTPCclusterKr ¶m)
62 fADCcluster = param.fADCcluster;
64 fNPads = param.fNPads;
65 fNRows = param.fNRows;
67 fCluster = param.fCluster;
69 fCenterX = param.fCenterX;
70 fCenterY = param.fCenterY;
71 fCenterT = param.fCenterT;
74 AliTPCclusterKr &AliTPCclusterKr::operator = (const AliTPCclusterKr & param)
76 fADCcluster = param.fADCcluster;
78 fNPads = param.fNPads;
79 fNRows = param.fNRows;
81 fCluster=param.fCluster;
83 fCenterX = param.fCenterX;
84 fCenterY = param.fCenterY;
85 fCenterT = param.fCenterT;
89 AliTPCclusterKr::~AliTPCclusterKr()
96 ////____________________________________________________________________________
97 void AliTPCclusterKr::SetCenter(){
104 for( std::vector<AliTPCvtpr*>::iterator iclus = fCluster.begin();
105 iclus != fCluster.end(); ++iclus ) {
106 adc = (*iclus)->GetAdc();
108 rX += ((*iclus)->GetX() * adc);
109 rY += ((*iclus)->GetY() * adc);
110 rT += ((*iclus)->GetTime() * adc);
112 fCenterX=rX/fADCcluster;
113 fCenterY=rY/fADCcluster;
114 fCenterT=rT/fADCcluster;