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