Corrected warnings
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDATreeCluster.h
CommitLineData
c335b3c5 1#ifndef AliPHOSDATreeCluster_H
2#define AliPHOSDATreeCluster_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
e7386040 6/* $Id$ */
c335b3c5 7
12f6dd57 8// --
9// --
10// Implementation for TTree output in PHOS DA
11// for calibrating energy by pi0 and MIP.
12// --
13// -- Author: Hisayuki Torii (Hiroshima Univ.)
14// --
15
12f6dd57 16#include <iostream>
17#include "AliPHOSDATreeDigit.h"
18
19class AliPHOSDATreeCluster{
20
21 friend std::ostream& operator<<(std::ostream& out,const AliPHOSDATreeCluster& cluster);
22
23 public:
24
25 //AliPHOSDATreeCluster():fEnergy(0),fX(0),fY(0),fZ(0),fNDigits(0),fDigits(0){/**/};
26 //AliPHOSDATreeCluster(float energy,float x,float y,float z):fEnergy(energy),fX(x),fY(y),fZ(z),fNDigits(0),fDigits(0){/**/};
27 //void Set(float energy,float x,float y,float z){fEnergy=energy; fX=x; fY=y; fZ=z;};
28 //float GetX(){ return fX; };
29 //float GetY(){ return fY; };
30 //float GetZ(){ return fZ; };
31 AliPHOSDATreeCluster():fEnergy(0),fRow(-100),fCol(-100),fNDigits(0),fDigits(0){/**/};
32 AliPHOSDATreeCluster(float energy,float row,float col):fEnergy(energy),fRow(row),fCol(col),fNDigits(0),fDigits(0){/**/};
33 virtual ~AliPHOSDATreeCluster(){ if(fNDigits>0) delete[] fDigits; };
34 AliPHOSDATreeCluster(const AliPHOSDATreeCluster& cluster);
35 AliPHOSDATreeCluster& operator=(const AliPHOSDATreeCluster& cluster);
36 void Set(float energy,float row,float col){fEnergy=energy; fRow=row; fCol=col; };
37 void SetEnergy(float energy){fEnergy=energy;};
38 float GetEnergy() const{ return fEnergy; };
39 float GetRow() const{ return fRow; };
40 float GetCol() const{ return fCol; };
41 bool CalculateProperty();
42 int GetNDigits() const{ return fNDigits; };
43 AliPHOSDATreeDigit& GetDigit(int ndigit){
c335b3c5 44 return fDigits[ndigit];
12f6dd57 45 };
46 AliPHOSDATreeDigit& GetMaxDigit(){
c335b3c5 47 return fDigits[0];
12f6dd57 48 };
49 bool Append(AliPHOSDATreeDigit& digit);
50 bool Append(AliPHOSDATreeCluster& cluster);
51 bool IsNeighbor(const AliPHOSDATreeDigit& digit) const;
52 bool IsNeighbor(const AliPHOSDATreeCluster& cluster) const;
53 void Reset();
c335b3c5 54 void Print(Option_t *option="") const;
12f6dd57 55
56 private:
57
58 float fEnergy; // Energy in GeV
59 float fRow; // PHOS Internal Coordinates, 0 - 63
60 float fCol; // PHOS Internal Coordinates, 0 - 55
61 //float fX, fY, fZ;
62 int fNDigits; // Number of digits
63 AliPHOSDATreeDigit* fDigits; //[fNDigits]
64
65 ClassDef(AliPHOSDATreeCluster,1) // Simple Cluster Structure for PHOS DA
66};
67
68#endif