]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/STEERBase/AliTOFPIDResponse.h
#99157: change in STEER dir for TOF trigger
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliTOFPIDResponse.h
CommitLineData
10d100d4 1#ifndef ALITOFPIDRESPONSE_H
2#define ALITOFPIDRESPONSE_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//-------------------------------------------------------
8// TOF PID class
9// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
10//-------------------------------------------------------
11
12#include "TObject.h"
13#include "AliPID.h"
67376d1d 14#include "AliVParticle.h"
15#include "AliVTrack.h"
10d100d4 16
b79db598 17class AliTOFPIDParams;
18
10d100d4 19class AliTOFPIDResponse : public TObject {
20public:
f858b00e 21
10d100d4 22 AliTOFPIDResponse();
23 AliTOFPIDResponse(Double_t *param);
f858b00e 24 ~AliTOFPIDResponse(){}
10d100d4 25
26 void SetTimeResolution(Float_t res) { fSigma = res; }
27 void SetTimeZero(Double_t t0) { fTime0=t0; }
28 Double_t GetTimeZero() const { return fTime0; }
29
30 void SetMaxMismatchProbability(Double_t p) {fPmax=p;}
31 Double_t GetMaxMismatchProbability() const {return fPmax;}
32
67376d1d 33 Double_t GetExpectedSigma(Float_t mom, Float_t tof, Float_t massZ) const;
34 Double_t GetExpectedSigma(Float_t mom, Float_t tof, AliPID::EParticleType type) const;
35 Double_t GetExpectedSignal(const AliVTrack *track, AliPID::EParticleType type) const;
10d100d4 36
37 Double_t GetMismatchProbability(Double_t p,Double_t mass) const;
38
6c68754e 39 void SetT0event(Float_t *t0event){for(Int_t i=0;i < fNmomBins;i++) fT0event[i] = t0event[i];};
40 void SetT0resolution(Float_t *t0resolution){for(Int_t i=0;i < fNmomBins;i++) fT0resolution[i] = t0resolution[i];};
d4d15b21 41 void ResetT0info(){ for(Int_t i=0;i < fNmomBins;i++){ fT0event[i] = 0.0; fT0resolution[i] = 0.0; fMaskT0[i] = 0;} };
6c68754e 42 void SetMomBoundary();
43 Int_t GetMomBin(Float_t p) const;
44 Int_t GetNmomBins(){return fNmomBins;};
cbc50aad 45 Float_t GetMinMom(Int_t ibin) const {if(ibin >=0 && ibin < fNmomBins) return fPCutMin[ibin]; else return 0.0;}; // overrun static array - coverity
46 Float_t GetMaxMom(Int_t ibin) const {if(ibin >=0 && ibin < fNmomBins) return fPCutMin[ibin+1]; else return 0.0;}; // overrun static array - coverity
47 void SetT0bin(Int_t ibin,Float_t t0bin){if(ibin >=0 && ibin < fNmomBins) fT0event[ibin] = t0bin;}; // overrun static array - coverity
48 void SetT0binRes(Int_t ibin,Float_t t0binRes){if(ibin >=0 && ibin < fNmomBins) fT0resolution[ibin] = t0binRes;}; // overrun static array - coverity
49 void SetT0binMask(Int_t ibin,Int_t t0binMask){if(ibin >=0 && ibin < fNmomBins) fMaskT0[ibin] = t0binMask;}; // overrun static array - coverity
50 Float_t GetT0bin(Int_t ibin) const {if(ibin >=0 && ibin < fNmomBins) return fT0event[ibin]; else return 0.0;}; // overrun static array - coverity
51 Float_t GetT0binRes(Int_t ibin) const {if(ibin >=0 && ibin < fNmomBins) return fT0resolution[ibin]; else return 0.0;}; // overrun static array - coverity
52 Int_t GetT0binMask(Int_t ibin) const {if(ibin >=0 && ibin < fNmomBins) return fMaskT0[ibin]; else return 0;}; // overrun static array - coverity
f858b00e 53
54 // Get Start Time for a track
7170298c 55 Float_t GetStartTime(Float_t mom) const;
56 Float_t GetStartTimeRes(Float_t mom) const;
d4d15b21 57 Int_t GetStartTimeMask(Float_t mom) const;
6c68754e 58
95ad1018 59 // Tracking resolution for expected times
60 void SetTrackParameter(Int_t ip,Float_t value){if(ip>=0 && ip < 4) fPar[ip] = value;};
61 Float_t GetTrackParameter(Int_t ip){if(ip>=0 && ip < 4) return fPar[ip]; else return -1.0;};
62
10d100d4 63 private:
64 Double_t fSigma; // intrinsic TOF resolution
f858b00e 65
66 // obsolete
10d100d4 67 Double_t fPmax; // "maximal" probability of mismathing (at ~0.5 GeV/c)
68 Double_t fTime0; // time zero
f858b00e 69 //--------------
10d100d4 70
6c68754e 71 // About event time (t0) info
72 static const Int_t fNmomBins = 10; // number of momentum bin
73 Float_t fT0event[fNmomBins]; // t0 (best, T0, T0-TOF, ...) of the event as a function of p
74 Float_t fT0resolution[fNmomBins]; // t0 (best, T0, T0-TOF, ...) resolution as a function of p
75 Float_t fPCutMin[fNmomBins+1]; // min values for p bins
d4d15b21 76 Int_t fMaskT0[fNmomBins]; // mask withthe T0 used (0x1=T0-TOF,0x2=T0A,0x3=TOC) for p bins
95ad1018 77 Float_t fPar[4]; // parameter for expected times resolution
d4d15b21 78
95ad1018 79 ClassDef(AliTOFPIDResponse,4) // TOF PID class
10d100d4 80};
81
82#endif