]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AOD/AliAODCluster.h
https://savannah.cern.ch/bugs/index.php?96629
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODCluster.h
CommitLineData
a9255000 1#ifndef AliAODCluster_H
2#define AliAODCluster_H
df9db588 3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//-------------------------------------------------------------------------
a9255000 9// AOD cluster base class
df9db588 10// Author: Markus Oldenburg, CERN
11//-------------------------------------------------------------------------
12
c8fe2783 13#include <AliVCluster.h>
df9db588 14
c8fe2783 15class AliAODCluster : public AliVCluster {
df9db588 16
17 public:
18
a9255000 19 AliAODCluster();
20 AliAODCluster(Int_t id,
4cfedff1 21 UInt_t nLabel,
22 Int_t *label,
df9db588 23 Double_t energy,
24 Double_t x[3],
83dd7da3 25 Double_t pid[13],
4cfedff1 26 Char_t ttype=kUndef,
27 UInt_t selectInfo=0);
df9db588 28
a9255000 29 AliAODCluster(Int_t id,
4cfedff1 30 UInt_t nLabel,
31 Int_t *label,
df9db588 32 Float_t energy,
33 Float_t x[3],
83dd7da3 34 Float_t pid[13],
4cfedff1 35 Char_t ttype=kUndef,
36 UInt_t selectInfo=0);
c8fe2783 37
a9255000 38 virtual ~AliAODCluster();
4cfedff1 39 AliAODCluster(const AliAODCluster& clus);
40 AliAODCluster& operator=(const AliAODCluster& clus);
8dd6eba0 41 void Clear(const Option_t*);
42
df9db588 43 Double_t Chi2() const { return fChi2; }
c8fe2783 44
45 Double_t E() const { return fEnergy; }
46
df9db588 47 // PID
c8fe2783 48
49 UShort_t GetMostProbablePID() const;
50 const Double_t *GetPID() const { return fPID; }//{ for(Int_t i=0; i<13; ++i) pid[i]=fPID[i]; }
51 Int_t GetID() const { return fID; }
52 Int_t GetLabel() const {
53 if( fLabel && fNLabel > 0) return fLabel[0];
54 else return -1;} //Most likely the track associated to the cluster
55 Int_t GetLabelAt(UInt_t i) const;
78902954 56 Int_t * GetLabels() const {return fLabel ; }
c8fe2783 57 UInt_t GetNLabels() const { return (UInt_t)fNLabel; }
4cfedff1 58 Bool_t TestFilterBit(UInt_t filterBit) const { return (Bool_t) ((filterBit & fFilterMap) != 0); }
59 Char_t GetType() const { return fType; }
c8fe2783 60
61 void GetPosition(Float_t *x) const {
62 x[0]=fPosition[0]; x[1]=fPosition[1]; x[2]=fPosition[2];}
63
64 Bool_t IsEMCAL() const {if(fType == kEMCALClusterv1) return kTRUE;
4cfedff1 65 else return kFALSE;}
c8fe2783 66 Bool_t IsPHOS() const {if(fType == kPHOSCharged || fType == kPHOSNeutral) return kTRUE;
4cfedff1 67 else return kFALSE;}
c8fe2783 68
df9db588 69 // print
70 void Print(const Option_t *opt = "") const;
c8fe2783 71
df9db588 72 // setters
4858e81a 73 void SetE(Double32_t energy) {fEnergy = energy ; }
14b34be5 74 void SetID(Int_t id) { fID = id; }
c8fe2783 75 void SetType(Char_t ttype) { fType=ttype; }
4cfedff1 76 void SetLabel(Int_t *label, UInt_t size);
14b34be5 77 void SetChi2(Double_t chi2) { fChi2 = chi2; }
c8fe2783 78
79 void SetPosition(Float_t *x);
80 void SetPositionAt(Float_t x,Int_t i) { if(i>=0 && i<3) fPosition[i] = x ;
81 else printf("Bad index for position array, i = %d\n",i);}
82
83 void SetPIDAt(Float_t x,Int_t i) { if(i>=0 && i<13) fPID[i] = x ;
84 else printf("Bad index for PID array, i = %d\n",i);}
85 void SetPID(const Float_t *pid) {
86 if(pid) for(Int_t i=0; i<13; ++i) fPID[i]=pid[i];
87 else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;}
88 template <class T> void SetPIDFromESD(const T *pid) {
89 if(pid) {for(Int_t i=0; i<11; ++i) fPID[i]=pid[i]; fPID[11]=0; fPID[12]=0;}
90 else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;}
91
92 void RemoveLabel();
93
94
df9db588 95 private :
c8fe2783 96
df9db588 97 // Energy & position
98 Double32_t fEnergy; // energy
01afc3fc 99 Double32_t fPosition[3]; // position of the cluster
c8fe2783 100
1e2eced6 101 Double32_t fChi2; // chi2 (probably not necessary for PMD)
83dd7da3 102 Double32_t fPID[13]; // [0.,1.,8] pointer to PID object
c8fe2783 103
1e2eced6 104 Int_t fID; // unique cluster ID, points back to the ESD cluster
4cfedff1 105 Int_t fNLabel; // number of original track for this cluster
106 Int_t *fLabel; // [fNLabel] particle label, points back to MC tracks
107 UInt_t fFilterMap; // filter information, one bit per set of cuts
df9db588 108
9333290e 109 Char_t fType; // cluster type
c8fe2783 110
111 ClassDef(AliAODCluster,6);
df9db588 112};
113
114#endif