]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDpid.h
Using TMath::Abs instead of fabs
[u/mrichter/AliRoot.git] / TRD / AliTRDpid.h
CommitLineData
a2b90f83 1#ifndef ALITRDPID_H
2#define ALITRDPID_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
16bf9884 6/* $Id$ */
0a29d0f1 7///////////////////////////////////////////////////////////////////////////////
8// //
9// The TRD particle identification base class //
10// //
11// Its main purposes are: //
12// - Provide I/O framework for all neccessary files //
13// - Assignment of a e/pi propability to a given track //
14// //
15///////////////////////////////////////////////////////////////////////////////
16
a2b90f83 17#include <TNamed.h>
18
19class TObjArray;
20class TFile;
21
22class AliTRDgeometry;
23class AliTRDtrack;
24
25class AliTRDpid : public TNamed {
26
27 public:
28
29 AliTRDpid();
30 AliTRDpid(const char* name, const char* title);
31 AliTRDpid(const AliTRDpid &p);
32 virtual ~AliTRDpid();
33 AliTRDpid &operator=(const AliTRDpid &p);
34
35 virtual void Copy(TObject &p);
36 virtual Bool_t Init();
16bf9884 37 virtual Bool_t AssignLikelihood();
38 virtual Bool_t AssignLikelihood(TObjArray *tarray);
39 virtual Bool_t AssignLikelihood(AliTRDtrack *t) = 0;
40 virtual Bool_t FillSpectra();
41 virtual Bool_t FillSpectra(TObjArray *tarray);
42 virtual Bool_t FillSpectra(const AliTRDtrack *t) = 0;
a2b90f83 43 virtual Bool_t Open(const Char_t *name, Int_t event = 0);
44 virtual Bool_t Open(const Char_t *namekine
45 , const Char_t *namecluster
46 , const Char_t *nametracks, Int_t event = 0);
16bf9884 47 virtual Int_t MCpid(const AliTRDtrack *t);
48 virtual Int_t MCpid(const AliTRDtrack *t, Int_t *pdg, Int_t *nFound, Int_t *indices);
a2b90f83 49 virtual Bool_t ReadCluster(const Char_t *name);
50 virtual Bool_t ReadTracks(const Char_t *name);
51 virtual Bool_t ReadKine(const Char_t *name, Int_t event);
16bf9884 52 virtual Bool_t SumCharge(const AliTRDtrack *t, Float_t *charge, Int_t *nCluster);
a2b90f83 53
16bf9884 54 virtual Int_t GetIndex(const AliTRDtrack *t) = 0;
a2b90f83 55
16bf9884 56 void SetGeometry(AliTRDgeometry *geo) { fGeometry = geo; };
57 void SetTrackArray(TObjArray *tarray) { fTrackArray = tarray; };
58 void SetClusterArray(TObjArray *carray) { fClusterArray = carray; };
a2b90f83 59
16bf9884 60 void SetPIDratioMin(Float_t min) { fPIDratioMin = min; };
61 void SetPIDpurePoints(Bool_t pure) { fPIDpurePoints = pure; };
62 void SetPIDindexMin(Int_t min) { fPIDindexMin = min; };
63 void SetPIDindexMax(Int_t max) { fPIDindexMax = max; };
64
65 void SetThreePadOnly(Bool_t only) { fThreePadOnly = only; };
abaf1f1d 66 void SetEvent(Int_t event) { fEvent = event; };
16bf9884 67
0a29d0f1 68 TObjArray *GetTrackArray() const { return fTrackArray; };
69 TObjArray *GetClusterArray() const { return fClusterArray; };
16bf9884 70
0a29d0f1 71 Float_t GetPIDratioMin() const { return fPIDratioMin; };
72 Bool_t GetPIDpurePoints() const { return fPIDpurePoints; };
73 Float_t GetPIDindexMin() const { return fPIDindexMin; };
74 Float_t GetPIDindexMax() const { return fPIDindexMax; };
16bf9884 75
0a29d0f1 76 Bool_t GetThreePadOnly() const { return fThreePadOnly; };
a2b90f83 77
78 protected:
79
80 enum {
81 kNpid = 2, // Number of pid types (pion + electron)
82 kElectron = 0, // Electron pid
83 kPion = 1 // Pion pid
84 };
85
16bf9884 86 Float_t fPIDratioMin; // Minimum fraction of cluster from one particle
87 Bool_t fPIDpurePoints; // Require pure (nono overlapping) cluster
88 Int_t fPIDindexMin; // Lower index MC particles to be considered
89 Int_t fPIDindexMax; // Upper index MC particles to be considered
90
91 Bool_t fThreePadOnly; // Use only three pad cluster in the charge sum
92
abaf1f1d 93 Int_t fEvent; // Event number
94
a2b90f83 95 TObjArray *fTrackArray; //! Array containing the tracks
96 TObjArray *fClusterArray; //! Array containing the cluster
97 AliTRDgeometry *fGeometry; //! The TRD geometry
16bf9884 98 TFile *fFileKine; //! The kine input file
a2b90f83 99
16bf9884 100 ClassDef(AliTRDpid,1) // Assigns the e/pi propability to the tracks
a2b90f83 101
102};
103#endif