]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliAODCluster.h
For Pythia with tune don't switch off MI in ConfigHeavyFlavor
[u/mrichter/AliRoot.git] / STEER / 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
4cfedff1 13#include <TObject.h>
df9db588 14
4cfedff1 15class AliAODCluster : public TObject {
df9db588 16
17 public:
18
14d55e62 19 enum AODClu_t {kUndef = -1,
20 kPHOSNeutral,
21 kPHOSCharged,
14d55e62 22 kEMCALClusterv1,
23 kPMDNeutral,
24 kPMDCharged};
df9db588 25
a9255000 26 enum AODCluPID_t {
83dd7da3 27 kElectron = 0,
28 kMuon = 1,
29 kPion = 2,
30 kKaon = 3,
31 kProton = 4,
32 kPhoton = 5,
33 kPi0 = 6,
34 kNeutron = 7,
35 kKaon0 = 8,
36 kEleCon = 9,
37 kUnknown = 10,
38 kCharged = 11, //For PMD?
39 kNeutral =12 //For PMD?
40 };
df9db588 41
a9255000 42 AliAODCluster();
43 AliAODCluster(Int_t id,
4cfedff1 44 UInt_t nLabel,
45 Int_t *label,
df9db588 46 Double_t energy,
47 Double_t x[3],
83dd7da3 48 Double_t pid[13],
4cfedff1 49 Char_t ttype=kUndef,
50 UInt_t selectInfo=0);
df9db588 51
a9255000 52 AliAODCluster(Int_t id,
4cfedff1 53 UInt_t nLabel,
54 Int_t *label,
df9db588 55 Float_t energy,
56 Float_t x[3],
83dd7da3 57 Float_t pid[13],
4cfedff1 58 Char_t ttype=kUndef,
59 UInt_t selectInfo=0);
df9db588 60
a9255000 61 virtual ~AliAODCluster();
4cfedff1 62 AliAODCluster(const AliAODCluster& clus);
63 AliAODCluster& operator=(const AliAODCluster& clus);
df9db588 64
65 Double_t Chi2() const { return fChi2; }
66
67 virtual Double_t E() const { return fEnergy; }
df9db588 68
69 // PID
70 virtual const Double_t *PID() const { return fPID; }
14d55e62 71 AODCluPID_t GetMostProbablePID() const;
72
df9db588 73 template <class T> void GetPID(T *pid) const {
83dd7da3 74 for(Int_t i=0; i<13; ++i) pid[i]=fPID[i];}
df9db588 75
76 template <class T> void SetPID(const T *pid) {
83dd7da3 77 if(pid) for(Int_t i=0; i<13; ++i) fPID[i]=pid[i];
f12d42ce 78 else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;}
83dd7da3 79
80 template <class T> void SetPIDFromESD(const T *pid) {
81 if(pid) {for(Int_t i=0; i<11; ++i) fPID[i]=pid[i]; fPID[11]=0; fPID[12]=0;}
f12d42ce 82 else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;}
df9db588 83
4cfedff1 84 Int_t GetID() const { return fID; }
85 Int_t GetLabel(UInt_t i) const;
78902954 86 Int_t * GetLabels() const {return fLabel ; }
4cfedff1 87 UInt_t GetNLabel() const { return (UInt_t)fNLabel; }
88 Bool_t TestFilterBit(UInt_t filterBit) const { return (Bool_t) ((filterBit & fFilterMap) != 0); }
89 Char_t GetType() const { return fType; }
df9db588 90
91 template <class T> Bool_t GetPosition(T *x) const {
92 x[0]=fPosition[0]; x[1]=fPosition[1]; x[2]=fPosition[2];
01afc3fc 93 return kTRUE;}
df9db588 94
4cfedff1 95 Bool_t IsEMCALCluster() {if(fType == kEMCALClusterv1) return kTRUE;
96 else return kFALSE;}
97 Bool_t IsPHOSCluster() {if(fType == kPHOSCharged || fType == kPHOSNeutral) return kTRUE;
98 else return kFALSE;}
df9db588 99
df9db588 100 // print
101 void Print(const Option_t *opt = "") const;
102
103 // setters
4858e81a 104 void SetE(Double32_t energy) {fEnergy = energy ; }
105 void SetPosition(Int_t ipos, Double32_t pos) {fPosition[ipos] = pos ;}
14b34be5 106 void SetID(Int_t id) { fID = id; }
4cfedff1 107 void SetType(AODClu_t ttype) { fType=ttype; }
108 void SetLabel(Int_t *label, UInt_t size);
109 void RemoveLabel();
110
01afc3fc 111 template <class T> void SetPosition(const T *x);
df9db588 112
14b34be5 113 void SetChi2(Double_t chi2) { fChi2 = chi2; }
df9db588 114
df9db588 115 private :
116
117 // Energy & position
118 Double32_t fEnergy; // energy
01afc3fc 119 Double32_t fPosition[3]; // position of the cluster
df9db588 120
1e2eced6 121 Double32_t fChi2; // chi2 (probably not necessary for PMD)
83dd7da3 122 Double32_t fPID[13]; // [0.,1.,8] pointer to PID object
df9db588 123
1e2eced6 124 Int_t fID; // unique cluster ID, points back to the ESD cluster
4cfedff1 125 Int_t fNLabel; // number of original track for this cluster
126 Int_t *fLabel; // [fNLabel] particle label, points back to MC tracks
127 UInt_t fFilterMap; // filter information, one bit per set of cuts
df9db588 128
9333290e 129 Char_t fType; // cluster type
130
83dd7da3 131 ClassDef(AliAODCluster,5);
df9db588 132};
133
134#endif