|
26 | 26 | #include "PWGMM/Mult/DataModel/bestCollisionTable.h" |
27 | 27 |
|
28 | 28 | #include "Common/CCDB/EventSelectionParams.h" |
| 29 | +#include "Common/CCDB/RCTSelectionFlags.h" |
29 | 30 | #include "Common/Core/RecoDecay.h" |
30 | 31 | #include "Common/DataModel/EventSelection.h" |
31 | 32 | #include "Common/DataModel/Multiplicity.h" |
|
74 | 75 | using namespace o2; |
75 | 76 | using namespace o2::analysis; |
76 | 77 | using namespace o2::aod::pid_tpc_tof_utils; |
| 78 | +using namespace o2::aod::rctsel; |
77 | 79 | using namespace o2::aod::track; |
78 | 80 | using namespace o2::constants::math; |
79 | 81 | using namespace o2::framework; |
@@ -193,14 +195,19 @@ struct HfTaskFlow { |
193 | 195 | std::string prefix = "ConfigCollision_group"; |
194 | 196 | Configurable<bool> isApplyGoodItsLayersAll{"isApplyGoodItsLayersAll", false, "Enable GoodITSLayersAll"}; |
195 | 197 | Configurable<bool> isApplyGoodZvtxFT0vsPV{"isApplyGoodZvtxFT0vsPV", false, "Enable GoodZvtxFT0vsPV cut"}; |
196 | | - Configurable<bool> isApplySameBunchPileup{"isApplySameBunchPileup", false, "Enable SameBunchPileup cut"}; |
197 | | - Configurable<int> maxMultiplicity{"maxMultiplicity", 300, "maximum multiplicity selection for collision"}; |
198 | | - Configurable<int> minMultiplicity{"minMultiplicity", 0, "minimum multiplicity selection for collision"}; |
199 | | - Configurable<int> multiplicityEstimator{"multiplicityEstimator", 0, "0: multNTracksPV, 1: numContrib, 2: multFT0C, 3: multFT0M, 4: centFT0C, 5: centFT0CVariants1s, 6: centFT0M, 7: centFV0A, 8: centNTracksPV, 9: centNGlobal, 10: centMFT"}; |
200 | 198 | Configurable<bool> isApplyNoCollInRofStandard{"isApplyNoCollInRofStandard", false, ""}; |
201 | 199 | Configurable<bool> isApplyNoCollInRofStrict{"isApplyNoCollInRofStrict", false, ""}; |
202 | 200 | Configurable<bool> isApplyNoCollInTimeRangeStandard{"isApplyNoCollInTimeRangeStandard", false, ""}; |
203 | 201 | Configurable<bool> isApplyNoCollInTimeRangeStrict{"isApplyNoCollInTimeRangeStrict", false, ""}; |
| 202 | + Configurable<bool> isApplySameBunchPileup{"isApplySameBunchPileup", false, "Enable SameBunchPileup cut"}; |
| 203 | + Configurable<int> maxMultiplicity{"maxMultiplicity", 300, "maximum multiplicity selection for collision"}; |
| 204 | + Configurable<int> minMultiplicity{"minMultiplicity", 0, "minimum multiplicity selection for collision"}; |
| 205 | + Configurable<int> multiplicityEstimator{"multiplicityEstimator", 0, "0: multNTracksPV, 1: numContrib, 2: multFT0C, 3: multFT0M, 4: centFT0C, 5: centFT0CVariants1s, 6: centFT0M, 7: centFV0A, 8: centNTracksPV, 9: centNGlobal, 10: centMFT"}; |
| 206 | + Configurable<bool> requireRCTFlagChecker{"requireRCTFlagChecker", false, "Check event quality in run condition table"}; |
| 207 | + Configurable<std::string> setRCTFlagCheckerLabel{"setRCTFlagCheckerLabel", "CBT_muon_global", "Evt sel: RCT flag checker label"}; |
| 208 | + Configurable<bool> requireRCTFlagCheckerLimitAcceptanceAsBad{"requireRCTFlagCheckerLimitAcceptanceAsBad", true, "Evt sel: RCT flag checker treat Limited Acceptance As Bad"}; |
| 209 | + Configurable<bool> requireZDCCheck{"requireZDCCheck", false, "Evt sel: RCT flag checker ZDC check"}; |
| 210 | + Configurable<std::string> rctFlagCheckerLabel{"rctFlagCheckerLabel", "CBT_fw", "Evt sel: RCT flag checker label"}; |
204 | 211 | Configurable<float> zVertexMax{"zVertexMax", 10.0f, "Accepted z-vertex range"}; |
205 | 212 | } configCollision; |
206 | 213 |
|
@@ -273,6 +280,7 @@ struct HfTaskFlow { |
273 | 280 | o2::ft0::Geometry ft0Det; |
274 | 281 | o2::fv0::Geometry* fv0Det{}; |
275 | 282 | std::vector<float> cstFT0RelGain{}; |
| 283 | + RCTFlagsChecker rctChecker; |
276 | 284 |
|
277 | 285 | // ========================= |
278 | 286 | // using declarations : DATA |
@@ -445,13 +453,14 @@ struct HfTaskFlow { |
445 | 453 | LOGF(info, "Offset for FT0C: x = %.3f y = %.3f z = %.3f\n", (*offsetFT0)[1].getX(), (*offsetFT0)[1].getY(), (*offsetFT0)[1].getZ()); |
446 | 454 | LOGF(info, "Offset for FV0-left: x = %.3f y = %.3f z = %.3f\n", (*offsetFV0)[0].getX(), (*offsetFV0)[0].getY(), (*offsetFV0)[0].getZ()); |
447 | 455 | LOGF(info, "Offset for FV0-right: x = %.3f y = %.3f z = %.3f\n", (*offsetFV0)[1].getX(), (*offsetFV0)[1].getY(), (*offsetFV0)[1].getZ()); |
448 | | - |
449 | 456 | fv0Det = o2::fv0::Geometry::instance(o2::fv0::Geometry::eUninitialized); |
450 | 457 |
|
451 | 458 | // ========================= |
452 | 459 | // Event histograms |
453 | 460 | // ========================= |
454 | 461 |
|
| 462 | + rctChecker.init(configCollision.setRCTFlagCheckerLabel, configCollision.requireZDCCheck, configCollision.requireRCTFlagCheckerLimitAcceptanceAsBad); |
| 463 | + |
455 | 464 | registry.add("Data/hVtxZ", "v_{z} (cm)", {HistType::kTH1D, {configAxis.axisVertex}}); |
456 | 465 | registry.add("Data/hNTracks", "", {HistType::kTH1F, {configAxis.axisMultiplicity}}); |
457 | 466 | registry.add(Form("Data/hMultiplicity_%s", WhatMultiplicityEstimator[configCollision.multiplicityEstimator].data()), "", {HistType::kTH1D, {configAxis.axisMultiplicity}}); |
@@ -498,18 +507,21 @@ struct HfTaskFlow { |
498 | 507 |
|
499 | 508 | if (doprocessSameTpcTpcChCh) { |
500 | 509 | addHistograms<Data, TpcTpc, ChPartChPart>(); |
| 510 | + |
501 | 511 | sameEvent.setObject(new CorrelationContainer("sameEvent", "sameEvent", corrAxis, effAxis, userAxis)); |
502 | 512 | mixedEvent.setObject(new CorrelationContainer("mixedEvent", "mixedEvent", corrAxis, effAxis, userAxis)); |
503 | 513 | } |
504 | 514 |
|
505 | 515 | if (doprocessSameTpcTpcD0Ch) { |
506 | 516 | addHistograms<Data, TpcTpc, D0ChPart>(); |
| 517 | + |
507 | 518 | sameEventHf.setObject(new CorrelationContainer("sameEventHf", "sameEventHf", corrAxis, effAxis, hfUserAxis)); |
508 | 519 | mixedEventHf.setObject(new CorrelationContainer("mixedEventHf", "mixedEventHf", corrAxis, effAxis, hfUserAxis)); |
509 | 520 | } |
510 | 521 |
|
511 | 522 | if (doprocessSameTpcTpcLcCh) { |
512 | 523 | addHistograms<Data, TpcTpc, LcChPart>(); |
| 524 | + |
513 | 525 | sameEventHf.setObject(new CorrelationContainer("sameEventHf", "sameEventHf", corrAxis, effAxis, hfUserAxis)); |
514 | 526 | mixedEventHf.setObject(new CorrelationContainer("mixedEventHf", "mixedEventHf", corrAxis, effAxis, hfUserAxis)); |
515 | 527 | } |
@@ -937,6 +949,9 @@ struct HfTaskFlow { |
937 | 949 | if (configCollision.isApplyGoodItsLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { |
938 | 950 | return false; |
939 | 951 | } |
| 952 | + if (configCollision.requireRCTFlagChecker && !rctChecker(collision)) { |
| 953 | + return false; |
| 954 | + } |
940 | 955 |
|
941 | 956 | if (fillHistograms) { |
942 | 957 | registry.fill(HIST("Data/hEventCounter"), EventSelectionStep::AfterEventSelection); |
|
0 commit comments