From eafa51b5f86df853c282f2b857fe0b12010d97c3 Mon Sep 17 00:00:00 2001 From: Jens Wiechula Date: Wed, 8 Jan 2014 23:40:42 +0100 Subject: [PATCH] don't use multiplicity correction for MC (Benjamin) --- STEER/STEERBase/AliPIDResponse.cxx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/STEER/STEERBase/AliPIDResponse.cxx b/STEER/STEERBase/AliPIDResponse.cxx index 81274ba2346..3b0422d9a86 100644 --- a/STEER/STEERBase/AliPIDResponse.cxx +++ b/STEER/STEERBase/AliPIDResponse.cxx @@ -1309,15 +1309,19 @@ void AliPIDResponse::SetTPCParametrisation() // PbPb 2010, period 10h.pass2 //TODO Needs further development const Bool_t is10hpass2 = period.Contains("LHC10H") && recopass == 2; + + // In case of MC without(!) tune on data activated for the TPC, don't use the multiplicity correction for the moment + Bool_t isMCandNotTPCtuneOnData = fIsMC && !(fTuneMConData && ((fTuneMConDataMask & kDetTPC) == kDetTPC)); + // If correction is available, but disabled (highly NOT recommended!), print warning - if (!fUseTPCMultiplicityCorrection && !isPP) { + if (!fUseTPCMultiplicityCorrection && !isPP && !isMCandNotTPCtuneOnData) { //TODO: Needs further development if (is10hpass2 || isPPb2013LowLuminosity) { if (isPPb2013LowLuminosity) { AliWarning("Mulitplicity correction disabled, but correction parameters for this period exist. It is highly recommended to use enable the correction. Otherwise the splines might be off!"); } } - if (fUseTPCMultiplicityCorrection && !isPP) { + if (fUseTPCMultiplicityCorrection && !isPP && !isMCandNotTPCtuneOnData) { AliInfo("Multiplicity correction enabled!"); //TODO After testing, load parameters from outside @@ -1407,8 +1411,16 @@ void AliPIDResponse::SetTPCParametrisation() // directly and use it for calculations - which should still give valid results, even if // the multiplicity correction is explicitely enabled in such expert calls. + TString reasonForDisabling = "requested by user"; + if (fUseTPCMultiplicityCorrection) { + if (isPP) + reasonForDisabling = "pp collisions"; + else + reasonForDisabling = "MC w/o tune on data"; + } + AliInfo(Form("Multiplicity correction %sdisabled (%s)!", fUseTPCMultiplicityCorrection ? "automatically " : "", - fUseTPCMultiplicityCorrection ? "pp collisions" : "requested by user")); + reasonForDisabling.Data())); fUseTPCMultiplicityCorrection = kFALSE; fTPCResponse.ResetMultiplicityCorrectionFunctions(); -- 2.43.0