|
9 | 9 | // granted to it by virtue of its status as an Intergovernmental Organization |
10 | 10 | // or submit itself to any jurisdiction. |
11 | 11 |
|
12 | | -/// \author ZhengqingWang(zhengqing.wang@cern.ch) |
| 12 | +/// \author ZhengqingWang(zhengqing.wang@cern.ch), KegangXiong(kxiong@cern.ch) |
13 | 13 | /// \file flowPidCme.cxx |
14 | 14 | /// \brief task to calculate the pikp cme signal and bacground. |
15 | 15 | // C++/ROOT includes. |
@@ -158,6 +158,7 @@ struct FillPIDcolums { |
158 | 158 | Configurable<bool> cfgOpenITSCut{"cfgOpenITSCut", true, "open ITSnsigma cut"}; |
159 | 159 | Configurable<bool> cfgOpenITSCutQAPlots{"cfgOpenITSCutQAPlots", true, "open QA plots after ITS nsigma cut"}; |
160 | 160 | Configurable<bool> cfgOpenDetailPlotsTPCITSContaimination{"cfgOpenDetailPlotsTPCITSContaimination", false, "open detail TH3D plots for nSigmaTPC-ITS Pt-eta-Phi nSigmaITS-clustersize"}; |
| 161 | + Configurable<bool> cfgUseStrictPID{"cfgUseStrictPID", true, "More strict pid strategy"}; |
161 | 162 | Configurable<bool> cfgOpenAllowCrossTrack{"cfgOpenAllowCrossTrack", false, "Allow one track to be identified as different kind of PID particles"}; |
162 | 163 | Configurable<bool> cfgOpenCrossTrackQAPlots{"cfgOpenCrossTrackQAPlots", true, "open cross pid track QA plots"}; |
163 | 164 | Configurable<bool> cfgOpenTOFOnlyPID{"cfgOpenTOFOnlyPID", true, "only accept tracks who has TOF infomation and use TOFnsigma for PID(priority greater than TPConly and combined"}; |
@@ -311,9 +312,17 @@ struct FillPIDcolums { |
311 | 312 | pidVectorUpper = pidVectorTPCPtUpper; |
312 | 313 | pidVectorLower = pidVectorTPCPtLower; |
313 | 314 | } else { |
314 | | - nSigmaToUse = (candidate.pt() > cfgPtMaxforTPCOnlyPID && candidate.hasTOF()) ? nSigmaCombined : nSigmaTPC; |
315 | | - pidVectorUpper = (candidate.pt() > cfgPtMaxforTPCOnlyPID && candidate.hasTOF()) ? cfgnSigmaCutRMSUpper.value : cfgnSigmaCutTPCUpper.value; |
316 | | - pidVectorLower = (candidate.pt() > cfgPtMaxforTPCOnlyPID && candidate.hasTOF()) ? cfgnSigmaCutRMSLower.value : cfgnSigmaCutTPCLower.value; |
| 315 | + if(candidate.pt() > cfgPtMaxforTPCOnlyPID && candidate.hasTOF()){ |
| 316 | + nSigmaToUse = nSigmaCombined; |
| 317 | + pidVectorUpper = cfgnSigmaCutRMSUpper.value; |
| 318 | + pidVectorLower = cfgnSigmaCutRMSLower.value; |
| 319 | + }else if(candidate.pt() > cfgPtMaxforTPCOnlyPID && !candidate.hasTOF() && cfgUseStrictPID){ |
| 320 | + return 0; |
| 321 | + }else{ |
| 322 | + nSigmaToUse = nSigmaTPC; |
| 323 | + pidVectorUpper = cfgnSigmaCutTPCUpper.value; |
| 324 | + pidVectorLower = cfgnSigmaCutTPCLower.value; |
| 325 | + } |
317 | 326 | } |
318 | 327 | float nsigma = 9999.99; |
319 | 328 | const int nPOI = 3; |
@@ -448,20 +457,27 @@ struct FillPIDcolums { |
448 | 457 | } |
449 | 458 | } |
450 | 459 | } |
451 | | - if (cfgOpenAllowCrossTrack) { |
452 | | - // one track can be recognized as different PID particles |
| 460 | + if(cfgUseStrictPID){ |
| 461 | + // Only use the track which was recognized as an unique PID particle |
453 | 462 | int index = (kIsPr << 2) | (kIsKa << 1) | kIsPi; |
454 | | - const int map[] = {0, 1, 2, 7, 3, 8, 9, 10}; |
| 463 | + const int map[] = {0, 1, 2, 0, 3, 0, 0, 0}; |
455 | 464 | return map[index]; |
456 | | - } else { |
457 | | - // Select particle with the lowest nsigma (If not allow cross track) |
458 | | - for (int i = 0; i < nPOI; ++i) { |
459 | | - if (std::abs(nSigmaToUse[i]) < nsigma && (nSigmaToUse[i] > pidVectorLower[i] && nSigmaToUse[i] < pidVectorUpper[i])) { |
460 | | - pid = i; |
461 | | - nsigma = std::abs(nSigmaToUse[i]); |
| 465 | + }else{ |
| 466 | + if (cfgOpenAllowCrossTrack) { |
| 467 | + // one track can be recognized as different PID particles |
| 468 | + int index = (kIsPr << 2) | (kIsKa << 1) | kIsPi; |
| 469 | + const int map[] = {0, 1, 2, 7, 3, 8, 9, 10}; |
| 470 | + return map[index]; |
| 471 | + } else { |
| 472 | + // Select particle with the lowest nsigma (If not allow cross track) |
| 473 | + for (int i = 0; i < nPOI; ++i) { |
| 474 | + if (std::abs(nSigmaToUse[i]) < nsigma && (nSigmaToUse[i] > pidVectorLower[i] && nSigmaToUse[i] < pidVectorUpper[i])) { |
| 475 | + pid = i; |
| 476 | + nsigma = std::abs(nSigmaToUse[i]); |
| 477 | + } |
462 | 478 | } |
| 479 | + return pid + 1; // shift the pid by 1, 1 = pion, 2 = kaon, 3 = proton |
463 | 480 | } |
464 | | - return pid + 1; // shift the pid by 1, 1 = pion, 2 = kaon, 3 = proton |
465 | 481 | } |
466 | 482 | // Clear the vectors |
467 | 483 | std::vector<float>().swap(pidVectorLower); |
|
0 commit comments