]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/STEERBase/AliTPCPIDResponse.h
Coding conventions fixed
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliTPCPIDResponse.h
CommitLineData
10d100d4 1#ifndef ALITPCPIDRESPONSE_H
2#define ALITPCPIDRESPONSE_H
8c6a71ab 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//-------------------------------------------------------
7// TPC PID class
8// A very naive design... Should be made better by the detector experts...
9// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
aea7a46d 10// With many additions and modifications suggested by
11// Alexander Kalweit, GSI, alexander.philipp.kalweit@cern.ch
12// Dariusz Miskowiec, GSI, D.Miskowiec@gsi.de
8c6a71ab 13//-------------------------------------------------------
14#include <Rtypes.h>
d2aa6df0 15#include <TObjArray.h>
8c6a71ab 16
aea7a46d 17#include "AliPID.h"
18
10d100d4 19class AliTPCPIDResponse {
8c6a71ab 20public:
10d100d4 21 AliTPCPIDResponse();
d2aa6df0 22 AliTPCPIDResponse(const Double_t *param);
10d100d4 23 virtual ~AliTPCPIDResponse() {}
24 void SetSigma(Float_t res0, Float_t resN2);
aea7a46d 25 void SetBetheBlochParameters(Double_t kp1,
26 Double_t kp2,
27 Double_t kp3,
28 Double_t kp4,
29 Double_t kp5
30 );
10d100d4 31 void SetMip(Float_t mip) { fMIP = mip; } // Set overall normalisation; mean dE/dx for MIP
aea7a46d 32 Double_t Bethe(Double_t bg) const;
d2aa6df0 33 void SetUseDatabase(Bool_t useDatabase) { fUseDatabase = useDatabase;}
34
35 void SetResponseFunction(AliPID::EParticleType type, TObject * const o) { fResponseFunctions.AddAt(o,(Int_t)type); }
deae51a8 36 const TObject * GetResponseFunction(AliPID::EParticleType type) { return fResponseFunctions.At((Int_t)type); }
d2aa6df0 37
10d100d4 38 Double_t GetExpectedSignal(const Float_t mom,
aea7a46d 39 AliPID::EParticleType n=AliPID::kKaon) const;
10d100d4 40 Double_t GetExpectedSigma(const Float_t mom, const Int_t nPoints,
aea7a46d 41 AliPID::EParticleType n=AliPID::kKaon) const;
10d100d4 42 Float_t GetNumberOfSigmas(const Float_t mom, const Float_t dEdx,
43 const Int_t nPoints,
44 AliPID::EParticleType n=AliPID::kKaon) const {
45
46 Double_t bethe=GetExpectedSignal(mom,n);
47 Double_t sigma=GetExpectedSigma(mom,nPoints,n);
48 return (dEdx-bethe)/sigma;
49 }
aea7a46d 50
10d100d4 51 Double_t GetMIP() const { return fMIP;}
b981edcd 52 Float_t GetRes0() const { return fRes0; }
53 Float_t GetResN2() const { return fResN2; }
54
8c6a71ab 55private:
10d100d4 56 Float_t fMIP; // dEdx for MIP
57 Float_t fRes0; // relative dEdx resolution rel sigma = fRes0*sqrt(1+fResN2/npoint)
58 Float_t fResN2; // relative Npoint dependence rel sigma = fRes0*sqrt(1+fResN2/npoint)
aea7a46d 59
60 Double_t fKp1; // Parameters
61 Double_t fKp2; // of
62 Double_t fKp3; // the ALEPH
63 Double_t fKp4; // Bethe-Bloch
64 Double_t fKp5; // formula
65
d2aa6df0 66 Bool_t fUseDatabase; // flag if fine-tuned database-response or simple ALEPH BB should be used
67 TObjArray fResponseFunctions; //! ObjArray of response functions individually for each particle
68
69 ClassDef(AliTPCPIDResponse,3) // TPC PID class
8c6a71ab 70};
71
72#endif
73
74