]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalPID.h
updates in the default momentum binnings for PID reference histograms
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalPID.h
CommitLineData
720a0a16 1#ifndef ALITRDCALPID_H
2#define ALITRDCALPID_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////////////////
9// //
720a0a16 10// Authors: //
44dbae42 11// //
12// Alex Bercuci <A.Bercuci@gsi.de> //
13// Alex Wilk <wilka@uni-muenster.de> //
14// Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de> //
720a0a16 15// //
16///////////////////////////////////////////////////////////////////////////////
17
18#ifndef ROOT_TNamed
19#include <TNamed.h>
20#endif
21
5d6dc395 22#ifndef ALIPID_H
23#include "AliPID.h"
24#endif
25
44dbae42 26class AliTRDCalPID : public TNamed
27{
28
29 public:
30
31 enum {
5d6dc395 32 kNMom = 11
44dbae42 33 };
720a0a16 34
35 AliTRDCalPID();
36 AliTRDCalPID(const Text_t *name, const Text_t *title);
44dbae42 37 virtual ~AliTRDCalPID();
38
39 virtual Bool_t LoadReferences(Char_t *refFile) = 0;
5d6dc395 40 static Double_t GetMomentum(Int_t ip) {
41 return (ip<0 || ip>=kNMom) ? -1.0 : fTrackMomentum[ip]; }
52bb079b 42 static Double_t GetMomentumBinning(Int_t ip) {
43 return (ip<0 || ip>=kNMom+1) ? -1.0 : fTrackMomentumBinning[ip]; }
44dbae42 44 virtual TObject *GetModel(Int_t ip, Int_t iType, Int_t iPlane) const = 0;
45 virtual Double_t GetProbability(Int_t spec, Float_t mom, Float_t *dedx
46 , Float_t length, Int_t plane) const = 0;
5d6dc395 47 static Color_t GetPartColor(Int_t i) { return fPartColor[i]; }
48 static Int_t GetPartIndex(Int_t pdg);
a6e0ebfe 49 static const Char_t *GetPartName(Int_t i) { return fPartName[i]; }
50 static const Char_t *GetPartSymb(Int_t i) { return fPartSymb[i]; }
44dbae42 51
a6e0ebfe 52 void SetPartName(Int_t i, const Char_t *name) { fPartName[i] = name; }
53 void SetPartSymb(Int_t i, const Char_t *symb) { fPartSymb[i] = symb; }
720a0a16 54
55 protected:
56
44dbae42 57 virtual void Init() = 0;
58 virtual Int_t GetModelID(Int_t mom, Int_t spec, Int_t plane) const = 0;
59
60 private:
61
62 AliTRDCalPID(const AliTRDCalPID& pd);
63 AliTRDCalPID &operator=(const AliTRDCalPID &c);
64
720a0a16 65 protected:
720a0a16 66
a6e0ebfe 67 static const Char_t *fPartName[AliPID::kSPECIES]; //! Names of particle species
68 static const Char_t *fPartSymb[AliPID::kSPECIES]; //! Symbols of particle species
5d6dc395 69 static Color_t fPartColor[AliPID::kSPECIES]; //! Colors of particle species
44dbae42 70 static Float_t fTrackMomentum[kNMom]; // Track momenta for which response functions are available
52bb079b 71 static Float_t fTrackMomentumBinning[kNMom+1]; // Defines the start and the endpoints of the momentum bins
44dbae42 72 TObjArray *fModel; // Model for probability estimate
720a0a16 73
44dbae42 74 ClassDef(AliTRDCalPID, 3) // Base class for TRD PID methods
720a0a16 75
44dbae42 76};
77#endif