void SetMinDiffProb(Bool_t check1, Double_t mindiff1, Bool_t check2, Double_t mindiff2)
{fCutNeg->SetMinDiffProb(check1,mindiff1); fCutPos->SetMinDiffProb(check2,mindiff2);} //set checking at probability level
void SetAODmode(Bool_t mode) {fCutNeg->SetAODmode(mode); fCutPos->SetAODmode(mode);}
+ void SetProbThreshold(Double_t value1, Double_t value2) {fCutNeg->SetProbThreshold(value1); fCutPos->SetProbThreshold(value2);}
Bool_t IsSelected(TObject *obj); //boolean for detectors
Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
fNbins(101),
fDetRestr(-1),
fiPartRestr(-1),
- fDetProbRestr(1)
+ fDetProbRestr(1),
+ fProbThreshold(0.)
{
//
//Default constructor
fNbins(101),
fDetRestr(-1),
fiPartRestr(-1),
- fDetProbRestr(1)
+ fDetProbRestr(1),
+ fProbThreshold(0.)
{
//
//Constructor
fNbins(c.fNbins),
fDetRestr(c.fDetRestr),
fiPartRestr(c.fiPartRestr),
- fDetProbRestr(c.fDetProbRestr)
+ fDetProbRestr(c.fDetProbRestr),
+ fProbThreshold(c.fProbThreshold)
{
//
//Copy constructor
this->fDetRestr=c.fDetRestr;
this->fiPartRestr=c.fiPartRestr;
this->fDetProbRestr=c.fDetProbRestr;
+ this->fProbThreshold=c.fProbThreshold;
for(Int_t i=0; i< kNdets ; i++ ) {
this->fDets[i]=c.fDets[i];
if(fIsQAOn) fhCombProb[iP]->Fill(probability[iP]);
}
- AliPID::EParticleType sel = getpid.GetMostProbable();
- if(getpid.GetProbability(sel,fPriors)>fCut) iPart= (Int_t)sel;
- AliDebug(2,Form("probabilities : %f %f %f %f %f",probability[0],probability[1],probability[2],probability[3],probability[4]));
+
+ if (fProbThreshold > 0.) {
+ if (probability[fgParticleType] >= fProbThreshold) iPart=fgParticleType;
+ }
+ else {
+ AliPID::EParticleType sel = getpid.GetMostProbable();
+ if(getpid.GetProbability(sel,fPriors)>fCut) iPart= (Int_t)sel;
+ AliDebug(2,Form("probabilities : %f %f %f %f %f",probability[0],probability[1],probability[2],probability[3],probability[4]));
+ }
if(fCheckResponse && !Check(pid,iPart, fMinDiffResponse)) iPart=kCheckResp;
if(fCheckSelection && !Check(probability,iPart,fMinDiffProbability)) iPart=kCheckProb;
void SetDetectorProbabilityRestriction(TString det, Int_t iPart, Double_t upperprob);
void SetHistogramAxis(Int_t nbins, Double_t xmin, Double_t xmax) {fNbins=nbins; fXmin = xmin; fXmax = xmax;}
void SetAODmode(Bool_t isaod = kFALSE) {fgIsAOD=isaod;}
+ void SetProbThreshold(Double_t value) {fProbThreshold=value;}
//returns the track identification number
Int_t GetID(ULong_t status[kNdets+1], Double_t pid[kNdets+1][AliPID::kSPECIES]) const;
Int_t fDetRestr; // id of the detector for the restriction
Int_t fiPartRestr; // id of the particle for the restriction
Double_t fDetProbRestr; // probability restriction value
+ Double_t fProbThreshold; // if different from 0, the assigned PID will be set to
+ // fgParticleType if the probability is larger than this threshold,
+ // regardless it is the highest or not (!)
Double_t fPriors[AliPID::kSPECIES]; // a priori concentrations
TF1 *fPriorsFunc[AliPID::kSPECIES]; // momentum dependent priors