fPtMaxSpecialCuts(9999.),
fmaxPtrackForPID(9999),
fCombPID(kFALSE),
-fWeightsPositive(new Double_t[AliPID::kSPECIES]),
-fWeightsNegative(new Double_t[AliPID::kSPECIES]),
+fnSpecies(AliPID::kSPECIES),
+fWeightsPositive(0),
+fWeightsNegative(0),
fBayesianStrategy(0)
{
//
Float_t limits[2]={0,999999999.};
SetPtBins(2,limits);
+ fWeightsNegative = new Double_t[AliPID::kSPECIES];
+ fWeightsPositive = new Double_t[AliPID::kSPECIES];
+
for (Int_t i = 0; i<AliPID::kSPECIES; i++) {
fWeightsPositive[i] = 0.;
fWeightsNegative[i] = 0.;
fPtMaxSpecialCuts(source.fPtMaxSpecialCuts),
fmaxPtrackForPID(source.fmaxPtrackForPID),
fCombPID(source.fCombPID),
+ fnSpecies(source.fnSpecies),
fWeightsPositive(source.fWeightsPositive),
fWeightsNegative(source.fWeightsNegative),
fBayesianStrategy(source.fBayesianStrategy)
fPtMaxSpecialCuts=source.fPtMaxSpecialCuts;
fmaxPtrackForPID=source.fmaxPtrackForPID;
fCombPID = source.fCombPID;
+ fnSpecies = source.fnSpecies;
fWeightsPositive = source.fWeightsPositive;
fWeightsNegative = source.fWeightsNegative;
fBayesianStrategy = source.fBayesianStrategy;
{
//Function to compute weights for Bayesian method
- Double_t *prob0;
- prob0 = new Double_t[AliPID::kSPECIES];
-
AliAODTrack *aodtrack[2] = {(AliAODTrack*)d->GetDaughter(0), (AliAODTrack*)d->GetDaughter(1)};
if ((aodtrack[0]->Charge() * aodtrack[1]->Charge()) != -1) {
}
- // identify kaon
- fPidHF->GetPidCombined()->ComputeProbabilities(aodtrack[daught], fPidHF->GetPidResponse(), prob0);
-
+ // identify kaon, define weights
if (aodtrack[daught]->Charge() == +1) {
- SetWeightsPositive(prob0);
+ fPidHF->GetPidCombined()->ComputeProbabilities(aodtrack[daught], fPidHF->GetPidResponse(), fWeightsPositive);
}
+
if (aodtrack[daught]->Charge() == -1) {
- SetWeightsNegative(prob0);
+ fPidHF->GetPidCombined()->ComputeProbabilities(aodtrack[daught], fPidHF->GetPidResponse(), fWeightsNegative);
}
-
}
}
{
public:
+
AliRDHFCutsD0toKpi(const char* name="CutsD0toKpi");
virtual ~AliRDHFCutsD0toKpi();
kBayesWeightNoFilter,
kBayesSimple
};
-
+
void SetCombPID(Bool_t CombPID){fCombPID=CombPID;}
Bool_t GetCombPID() const {return fCombPID;}
-
-
protected:
+
Int_t IsSelectedKF(AliAODRecoDecayHF2Prong* d,AliAODEvent* aod) const;
Bool_t fUseSpecialCuts; // flag to switch on/off special cuts
Double_t fmaxPtrackForPID; // max momentum for applying PID
Bool_t fCombPID; //switch for Bayesian
-
- Double_t* fWeightsPositive; //Bayesian weights for positive track
- Double_t* fWeightsNegative; //Bayesian weights for negative track
+ Int_t fnSpecies; //number of species (used only for array declaration)
+ Double_t* fWeightsPositive; //[fnSpecies] Bayesian weights for positive track
+ Double_t* fWeightsNegative; //[fnSpecies] Bayesian weights for negative track
Int_t fBayesianStrategy;
- ClassDef(AliRDHFCutsD0toKpi,9); // class for cuts on AOD reconstructed D0->Kpi
+ ClassDef(AliRDHFCutsD0toKpi,10); // class for cuts on AOD reconstructed D0->Kpi
};
#endif