1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 // PID Response class for the TRD detector
17 // Based on 1D Likelihood approach
18 // For further information see implementation file
20 #ifndef ALITRDPIDRESPONSE_H
21 #define ALITRDPIDRESPONSE_H
33 class AliTRDPIDResponseObject;
35 class AliTRDPIDResponse : public TObject {
37 enum ETRDPIDResponseStatus {
40 enum ETRDPIDResponseDef {
58 AliTRDPIDResponse(const AliTRDPIDResponse &ref);
59 AliTRDPIDResponse& operator=(const AliTRDPIDResponse &ref);
62 Bool_t GetResponse(Int_t n, const Double_t * const dedx, const Float_t * const p, Double_t prob[AliPID::kSPECIES],ETRDPIDMethod PIDmethod=kLQ1D, Bool_t kNorm=kTRUE) const;
63 inline ETRDNslices GetNumberOfSlices(ETRDPIDMethod PIDmethod=kLQ1D) const;
65 Bool_t IsOwner() const {return TestBit(kIsOwner);}
68 void SetGainNormalisationFactor(Double_t gainFactor) { fGainNormalisationFactor = gainFactor; }
70 Bool_t SetPIDResponseObject(const AliTRDPIDResponseObject * obj);
72 Bool_t Load(const Char_t *filename = NULL);
74 Bool_t IdentifiedAsElectron(Int_t nTracklets, const Double_t *like, Double_t p, Double_t level,Double_t centrality=-1,ETRDPIDMethod PIDmethod=kLQ1D) const;
77 Bool_t CookdEdx(Int_t nSlice, const Double_t * const in, Double_t *out,ETRDPIDMethod PIDmethod=kLQ1D) const;
78 Double_t GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t *dEdx,ETRDPIDMethod PIDmethod=kLQ1D) const;
80 const AliTRDPIDResponseObject *fkPIDResponseObject; // PID References and Params
81 Double_t fGainNormalisationFactor; // Gain normalisation factor
84 ClassDef(AliTRDPIDResponse, 3) // Tool for TRD PID
87 AliTRDPIDResponse::ETRDNslices AliTRDPIDResponse::GetNumberOfSlices(ETRDPIDMethod PIDmethod) const {
88 // Get the current number of slices
89 ETRDNslices slices = kNslicesLQ1D;
91 case kLQ1D: slices = kNslicesLQ1D; break;
92 case kLQ2D: slices = kNslicesLQ2D; break;
93 case kNN: slices = kNslicesNN; break;