, fEtaAbsCutLow(0.0)
, fEtaAbsCutUp(0.9)
, fDoAnySystematicStudiesOnTheExpectedSignal(kFALSE)
- , fSystematicScalingSplines(1.0)
+ , fSystematicScalingSplinesThreshold(50.)
+ , fSystematicScalingSplinesBelowThreshold(1.0)
+ , fSystematicScalingSplinesAboveThreshold(1.0)
, fSystematicScalingEtaCorrectionMomentumThr(0.35)
, fSystematicScalingEtaCorrectionLowMomenta(1.0)
, fSystematicScalingEtaCorrectionHighMomenta(1.0)
, fEtaAbsCutLow(0.0)
, fEtaAbsCutUp(0.9)
, fDoAnySystematicStudiesOnTheExpectedSignal(kFALSE)
- , fSystematicScalingSplines(1.0)
+ , fSystematicScalingSplinesThreshold(50.)
+ , fSystematicScalingSplinesBelowThreshold(1.0)
+ , fSystematicScalingSplinesAboveThreshold(1.0)
, fSystematicScalingEtaCorrectionMomentumThr(0.35)
, fSystematicScalingEtaCorrectionLowMomenta(1.0)
, fSystematicScalingEtaCorrectionHighMomenta(1.0)
fDoAnySystematicStudiesOnTheExpectedSignal = kFALSE;
- if (TMath::Abs(fSystematicScalingSplines - 1.0) > fgkEpsilon) {
+
+ if ((TMath::Abs(fSystematicScalingSplinesBelowThreshold - 1.0) > fgkEpsilon) ||
+ (TMath::Abs(fSystematicScalingSplinesAboveThreshold - 1.0) > fgkEpsilon)) {
fDoAnySystematicStudiesOnTheExpectedSignal = kTRUE;
return;
}
// Print current settings for systematic studies.
printf("\n\nSettings for systematics for task %s:\n", GetName());
- printf("Splines:\t%f\n", GetSystematicScalingSplines());
+ printf("SplinesThr:\t%f\n", GetSystematicScalingSplinesThreshold());
+ printf("SplinesBelowThr:\t%f\n", GetSystematicScalingSplinesBelowThreshold());
+ printf("SplinesAboveThr:\t%f\n", GetSystematicScalingSplinesAboveThreshold());
printf("EtaCorrMomThr:\t%f\n", GetSystematicScalingEtaCorrectionMomentumThr());
printf("EtaCorrLowP:\t%f\n", GetSystematicScalingEtaCorrectionLowMomenta());
printf("EtaCorrHighP:\t%f\n", GetSystematicScalingEtaCorrectionHighMomenta());
dEdxPr = fPIDResponse->GetTPCResponse().GetExpectedSignal(track, AliPID::kProton, AliTPCPIDResponse::kdEdxDefault, kFALSE, kFALSE);
// Scale splines, if desired
- if (TMath::Abs(fSystematicScalingSplines - 1.0) > fgkEpsilon) {
- dEdxEl *= fSystematicScalingSplines;
- dEdxKa *= fSystematicScalingSplines;
- dEdxPi *= fSystematicScalingSplines;
- dEdxMu *= fTakeIntoAccountMuons ? fSystematicScalingSplines : 1.;
- dEdxPr *= fSystematicScalingSplines;
+ if ((TMath::Abs(fSystematicScalingSplinesBelowThreshold - 1.0) > fgkEpsilon) ||
+ (TMath::Abs(fSystematicScalingSplinesAboveThreshold - 1.0) > fgkEpsilon)) {
+
+ // Tune turn-on of correction for pions (not so relevant for the other species, since at very large momenta)
+ const Double_t pTPC = track->GetTPCmomentum();
+ Double_t bg = 0;
+ Double_t scaleFactor = 1.;
+ Double_t usedSystematicScalingSplines = 1.;
+
+ bg = pTPC / AliPID::ParticleMass(AliPID::kElectron);
+ scaleFactor = 0.5 * (1. + TMath::Erf((bg - fSystematicScalingSplinesThreshold) / 4.));
+ usedSystematicScalingSplines = fSystematicScalingSplinesBelowThreshold * (1 - scaleFactor)
+ + fSystematicScalingSplinesAboveThreshold * scaleFactor;
+ dEdxEl *= usedSystematicScalingSplines;
+
+ bg = pTPC / AliPID::ParticleMass(AliPID::kKaon);
+ scaleFactor = 0.5 * (1. + TMath::Erf((bg - fSystematicScalingSplinesThreshold) / 4.));
+ usedSystematicScalingSplines = fSystematicScalingSplinesBelowThreshold * (1 - scaleFactor)
+ + fSystematicScalingSplinesAboveThreshold * scaleFactor;
+ dEdxKa *= usedSystematicScalingSplines;
+
+ bg = pTPC / AliPID::ParticleMass(AliPID::kPion);
+ scaleFactor = 0.5 * (1. + TMath::Erf((bg - fSystematicScalingSplinesThreshold) / 4.));
+ usedSystematicScalingSplines = fSystematicScalingSplinesBelowThreshold * (1 - scaleFactor)
+ + fSystematicScalingSplinesAboveThreshold * scaleFactor;
+ dEdxPi *= usedSystematicScalingSplines;
+
+ if (fTakeIntoAccountMuons) {
+ bg = pTPC / AliPID::ParticleMass(AliPID::kMuon);
+ scaleFactor = 0.5 * (1. + TMath::Erf((bg - fSystematicScalingSplinesThreshold) / 4.));
+ usedSystematicScalingSplines = fSystematicScalingSplinesBelowThreshold * (1 - scaleFactor)
+ + fSystematicScalingSplinesAboveThreshold * scaleFactor;
+ dEdxMu *= usedSystematicScalingSplines;
+ }
+
+
+ bg = pTPC / AliPID::ParticleMass(AliPID::kProton);
+ scaleFactor = 0.5 * (1. + TMath::Erf((bg - fSystematicScalingSplinesThreshold) / 4.));
+ usedSystematicScalingSplines = fSystematicScalingSplinesBelowThreshold * (1 - scaleFactor)
+ + fSystematicScalingSplinesAboveThreshold * scaleFactor;
+ dEdxPr *= usedSystematicScalingSplines;
}
// Get the eta correction factors for the (modified) expected dEdx
Bool_t IsInAcceptedEtaRange(Double_t etaAbs) const { return (etaAbs >= fEtaAbsCutLow && etaAbs <= fEtaAbsCutUp); };
- Double_t GetSystematicScalingSplines() const { return fSystematicScalingSplines; };
- void SetSystematicScalingSplines(Double_t scaleFactor)
- { fSystematicScalingSplines = scaleFactor; CheckDoAnyStematicStudiesOnTheExpectedSignal(); };
+ Double_t GetSystematicScalingSplinesThreshold() const { return fSystematicScalingSplinesThreshold; };
+ void SetSystematicScalingSplinesThreshold(Double_t threshold) { fSystematicScalingSplinesThreshold = threshold; };
+
+ Double_t GetSystematicScalingSplinesBelowThreshold() const { return fSystematicScalingSplinesBelowThreshold; };
+ void SetSystematicScalingSplinesBelowThreshold(Double_t scaleFactor)
+ { fSystematicScalingSplinesBelowThreshold = scaleFactor; CheckDoAnyStematicStudiesOnTheExpectedSignal(); };
+
+ Double_t GetSystematicScalingSplinesAboveThreshold() const { return fSystematicScalingSplinesAboveThreshold; };
+ void SetSystematicScalingSplinesAboveThreshold(Double_t scaleFactor)
+ { fSystematicScalingSplinesAboveThreshold = scaleFactor; CheckDoAnyStematicStudiesOnTheExpectedSignal(); };
Double_t GetSystematicScalingEtaCorrectionMomentumThr() const { return fSystematicScalingEtaCorrectionMomentumThr; };
void SetSystematicScalingEtaCorrectionMomentumThr(Double_t threshold) { fSystematicScalingEtaCorrectionMomentumThr = threshold; };
// For systematic studies
Bool_t fDoAnySystematicStudiesOnTheExpectedSignal; // Internal flag indicating whether any systematic studies are going to be performed
- Double_t fSystematicScalingSplines; // Systematic scale factor for the splines (1. = no systematics)
+ Double_t fSystematicScalingSplinesThreshold; // beta-gamma threshold for the systematic spline scale factor
+ Double_t fSystematicScalingSplinesBelowThreshold; // Systematic scale factor for the splines (1. = no systematics) below threshold
+ Double_t fSystematicScalingSplinesAboveThreshold; // Systematic scale factor for the splines (1. = no systematics) above threshold
Double_t fSystematicScalingEtaCorrectionMomentumThr; // Momentum threshold for the systematic scale factor for the eta correction (separates low-p from high-p
Double_t fSystematicScalingEtaCorrectionLowMomenta; // Systematic scale factor for the eta correction (1. = no systematics) at low momenta
Double_t fSystematicScalingEtaCorrectionHighMomenta; // Systematic scale factor for the eta correction (1. = no systematics) at high momenta
AliAnalysisTaskPID(const AliAnalysisTaskPID&); // not implemented
AliAnalysisTaskPID& operator=(const AliAnalysisTaskPID&); // not implemented
- ClassDef(AliAnalysisTaskPID, 15);
+ ClassDef(AliAnalysisTaskPID, 16);
};