1 #ifndef ALIPIDCOMBINED_H
2 #define ALIPIDCOMBINED_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //---------------------------------------------------------------//
7 // Base class for combining PID response of //
8 // of different detectors //
9 // and compute Bayesian probabilities //
11 // Origin: Pietro Antonioli, INFN-BO, pietro.antonioli@cern.ch //
13 //---------------------------------------------------------------//
19 #include "AliPIDResponse.h"
26 class AliPIDCombined : public TNamed {
29 AliPIDCombined(const TString& name, const TString& title);
30 virtual ~AliPIDCombined();
32 void SetDetectorMask(Int_t mask) {fDetectorMask=mask;}
33 Int_t GetDetectorMask() const {return fDetectorMask;}
34 void SetRejectMismatchMask(Int_t mask) {fRejectMismatchMask=mask;}
35 Int_t GetRejectMismatchMask() const {return fRejectMismatchMask;}
36 void SetEnablePriors(Bool_t flag) {fEnablePriors=flag;}
37 Bool_t GetEnablePriors() const {return fEnablePriors;}
38 void SetPriorDistribution(AliPID::EParticleType type,TH1F *prior);
39 // const TH1* GetPriorDistribution(AliPID::EParticleType type) const {return (TH1*)fPriorsDistributions[type];}
40 TH1* GetPriorDistribution(AliPID::EParticleType type) const {return (TH1*)fPriorsDistributions[type];}
42 void GetPriors(const AliVTrack *track,Double_t* p,const AliPIDResponse *response,UInt_t detUsed) const;
44 void SetDefaultTPCPriors();
46 UInt_t ComputeProbabilities(const AliVTrack *track, const AliPIDResponse *response, Double_t* bayesProbabilities) const;
47 void SetSelectedSpecies(Int_t selectedSpecies) {fSelectedSpecies = selectedSpecies;}
48 Int_t GetSelectedSpecies() const {return fSelectedSpecies;}
50 static Float_t GetTOFmismatchProb() {return fTOFmismProb;}
53 void GetPriors(const AliVTrack *track,Double_t* priors,Float_t centrality=-1) const;
54 void ComputeBayesProbabilities(Double_t* bayesProbabilities,const Double_t* probDensity, const Double_t* priors, Double_t* probDensityMism=NULL) const;
55 void SetCombinedStatus(const AliPIDResponse::EDetPidStatus status,UInt_t *mask, const AliPIDResponse::EDetCode bit) const;
56 void SetCombinedStatus(const AliPIDResponse::EDetPidStatus status,UInt_t *mask, const AliPIDResponse::EDetCode bit, Double_t* p,const Float_t probMis) const;
59 AliPIDCombined(const AliPIDCombined&);
60 AliPIDCombined &operator=(const AliPIDCombined&);
62 Int_t fDetectorMask; // Detectors included in combined pid
63 Int_t fRejectMismatchMask; // Detectors set return flat prob. if mismatch detected
64 Bool_t fEnablePriors; // Enable bayesian PID (if kFALSE priors set flat)
65 Int_t fSelectedSpecies; // Number of selected species to study
66 TH1F *fPriorsDistributions[AliPID::kSPECIESC]; // priors
67 Bool_t fUseDefaultTPCPriors; // switch to use Defaul TPC Priors
68 static TH2F *fDefaultPriorsTPC[AliPID::kSPECIES]; // Default priors for TPC tracks
69 static Float_t fTOFmismProb; //TOF mismatch probability
71 ClassDef(AliPIDCombined, 3); // Combined PID using priors