Skip to content

Commit ecc2e3c

Browse files
fmazzascFrancesco Mazzaschi
andauthored
[Common] ITS PID: set MC parametrisations and fix resolution term for Z=2 (#11050)
Co-authored-by: Francesco Mazzaschi <fmazzasc@alipap1.cern.ch>
1 parent c658df9 commit ecc2e3c

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

Common/DataModel/PIDResponseITS.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ struct ITSResponse {
7373
// static constexpr float charge = static_cast<float>(o2::track::pid_constants::sCharges[id]);
7474
const float bg = momentum * inverseMass;
7575
if (id == o2::track::PID::Helium3 || id == o2::track::PID::Alpha) {
76-
return mResolutionParamsZ2[0] * std::erf((bg - mResolutionParamsZ2[1]) / mResolutionParamsZ2[2]);
76+
return mResolutionParamsZ2[1] > -999.0 ? mResolutionParamsZ2[0] * std::erf((bg - mResolutionParamsZ2[1]) / mResolutionParamsZ2[2]) : mResolutionParamsZ2[0];
7777
}
78-
return mResolutionParams[0] * std::erf((bg - mResolutionParams[1]) / mResolutionParams[2]);
78+
return mResolutionParams[1] > -999.0 ? mResolutionParams[0] * std::erf((bg - mResolutionParams[1]) / mResolutionParams[2]) : mResolutionParams[0];
7979
}
8080

8181
template <o2::track::PID::ID id>
@@ -117,6 +117,14 @@ struct ITSResponse {
117117
mResolutionParamsZ2[2] = p2_res_Z2;
118118
}
119119

120+
static void setMCDefaultParameters()
121+
{
122+
setParameters(1.63806, 1.58847, 2.52275,
123+
2.66505, 1.48405, 6.90453,
124+
1.40487e-01, -4.31078e-01, 1.50052,
125+
0.09, -999., -999.);
126+
}
127+
120128
private:
121129
static std::array<float, 3> mITSRespParams;
122130
static std::array<float, 3> mITSRespParamsZ2;
@@ -129,7 +137,7 @@ std::array<float, 3> ITSResponse::mITSRespParams = {1.18941, 1.53792, 1.69961};
129137
std::array<float, 3> ITSResponse::mITSRespParamsZ2 = {2.35117, 1.80347, 5.14355};
130138
// relative resolution is modelled with an erf function: [0]*TMath::Erf((x-[1])/[2])
131139
std::array<float, 3> ITSResponse::mResolutionParams = {1.94669e-01, -2.08616e-01, 1.30753};
132-
std::array<float, 3> ITSResponse::mResolutionParamsZ2 = {8.74371e-02, -1.82804, 5.06449e-01};
140+
std::array<float, 3> ITSResponse::mResolutionParamsZ2 = {0.09, -999., -999.};
133141
bool ITSResponse::mIsInitialized = false;
134142

135143
namespace pidits

Common/TableProducer/PID/pidITS.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ static const std::vector<std::string> parameterNames{"RespITSPar1", "RespITSPar2
5151
"ResolutionPar1_Z2", "ResolutionPar2_Z2", "ResolutionPar3_Z2"};
5252

5353
static constexpr float defaultParameters[nCases][nParameters] = {
54-
{1.18941, 1.53792, 1.69961, 2.35117, 1.80347, 5.14355, 1.94669e-01, -2.08616e-01, 1.30753, 8.74371e-02, -1.82804, 5.06449e-01},
55-
{1.18941, 1.53792, 1.69961, 2.35117, 1.80347, 5.14355, 1.94669e-01, -2.08616e-01, 1.30753, 8.74371e-02, -1.82804, 5.06449e-01}};
54+
{1.18941, 1.53792, 1.69961, 2.35117, 1.80347, 5.14355, 1.94669e-01, -2.08616e-01, 1.30753, 0.09, -999., -999.},
55+
{1.63806, 1.58847, 2.52275, 2.66505, 1.48405, 6.90453, 1.40487e-01, -4.31078e-01, 1.50052, 0.09, -999., -999.}};
5656

5757
/// Task to produce the ITS PID information for each particle species
5858
/// The parametrization is: [p0/(bg)**p1 + p2] being bg = p/m. Different parametrizations are used for He3 and Alpha particles.
59-
/// The resolution depends on the bg and is modelled with an erf function: p0*TMath::Erf((bg-p1)/p2)
59+
/// The resolution depends on the bg and is modelled with an erf function: p0*TMath::Erf((bg-p1)/p2). If p1/p2 is -999, the resolution is set to p0.
6060
struct itsPid {
6161

6262
Configurable<LabeledArray<float>> itsParams{"itsParams",

0 commit comments

Comments
 (0)