Skip to content

Commit 0e13018

Browse files
authored
[PWGEM,PWGEM-36] Pi0 Flow task: make option for the EMCalMapLevel dif… (#9625)
1 parent e49653e commit 0e13018

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ struct TaskPi0FlowEMC {
9191
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
9292
Configurable<bool> cfgDoRotation{"cfgDoRotation", true, "Flag to enable rotation background method"};
9393
Configurable<int> cfgDownsampling{"cfgDownsampling", 1, "Calculate rotation background only for every <value> collision"};
94-
Configurable<int> cfgEMCalMapLevel{"cfgEMCalMapLevel", 2, "Different levels of correction for the rotation background, the smaller number includes the level of the higher number (4: none, 3: only inside EMCal, 2: exclude bad channels, 1: remove edges)"};
94+
Configurable<int> cfgEMCalMapLevelBackground{"cfgEMCalMapLevelBackground", 2, "Different levels of correction for the background, the smaller number includes the level of the higher number (4: none, 3: only inside EMCal, 2: exclude bad channels, 1: remove edges)"};
95+
Configurable<int> cfgEMCalMapLevelSameEvent{"cfgEMCalMapLevelSameEvent", 1, "Different levels of correction for the same event, the smaller number includes the level of the higher number (4: none, 3: only inside EMCal, 2: exclude bad channels, 1: remove edges)"};
9596
Configurable<float> cfgRotAngle{"cfgRotAngle", std::move(const_cast<float&>(o2::constants::math::PIHalf)), "Angle used for the rotation method"};
9697
Configurable<int> cfgDistanceToEdge{"cfgDistanceToEdge", 1, "Distance to edge in cells required for rotated cluster to be accepted"};
9798

@@ -376,7 +377,7 @@ struct TaskPi0FlowEMC {
376377

377378
if (correctionConfig.doEMCalCalib) {
378379
registry.add("hSparseCalibSE", "THn for Calib same event", HistType::kTHnSparseF, {thnAxisInvMass, thAxisEnergyCalib, thnAxisCent});
379-
registry.add("hSparseCalibBack", "THn for Calib background", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisCent, thnAxisScalarProd});
380+
registry.add("hSparseCalibBack", "THn for Calib background", HistType::kTHnSparseF, {thnAxisInvMass, thAxisEnergyCalib, thnAxisCent});
380381
}
381382

382383
ccdb->setURL(ccdbUrl);
@@ -651,12 +652,12 @@ struct TaskPi0FlowEMC {
651652
registry.fill(HIST("mesonQA/hClusterBackEtaPhiBefore"), RecoDecay::constrainAngle(photon2.Phi()), photon2.Eta()); // before check but after rotation
652653
}
653654

654-
if (checkEtaPhi1D(photon1.Eta(), RecoDecay::constrainAngle(photon1.Phi())) >= cfgEMCalMapLevel.value) {
655+
if (checkEtaPhi1D(photon1.Eta(), RecoDecay::constrainAngle(photon1.Phi())) >= cfgEMCalMapLevelBackground.value) {
655656
iCellIDPhoton1 = -1;
656657
} else if (emccuts.cfgEnableQA) {
657658
registry.fill(HIST("mesonQA/hClusterBackEtaPhiAfter"), RecoDecay::constrainAngle(photon1.Phi()), photon1.Eta()); // after check
658659
}
659-
if (checkEtaPhi1D(photon2.Eta(), RecoDecay::constrainAngle(photon2.Phi())) >= cfgEMCalMapLevel.value) {
660+
if (checkEtaPhi1D(photon2.Eta(), RecoDecay::constrainAngle(photon2.Phi())) >= cfgEMCalMapLevelBackground.value) {
660661
iCellIDPhoton2 = -1;
661662
} else if (emccuts.cfgEnableQA) {
662663
registry.fill(HIST("mesonQA/hClusterBackEtaPhiAfter"), RecoDecay::constrainAngle(photon2.Phi()), photon2.Eta()); // after check
@@ -672,7 +673,7 @@ struct TaskPi0FlowEMC {
672673
if (!(fEMCCut.IsSelected<EMCalPhotons::iterator>(photon))) {
673674
continue;
674675
}
675-
if (checkEtaPhi1D(photon.eta(), RecoDecay::constrainAngle(photon.phi())) >= cfgEMCalMapLevel.value) {
676+
if (checkEtaPhi1D(photon.eta(), RecoDecay::constrainAngle(photon.phi())) >= cfgEMCalMapLevelBackground.value) {
676677
continue;
677678
}
678679
ROOT::Math::PtEtaPhiMVector photon3(photon.pt(), photon.eta(), photon.phi(), 0.);
@@ -743,10 +744,10 @@ struct TaskPi0FlowEMC {
743744
photon1 = rotationMatrix * photon1;
744745
photon2 = rotationMatrix * photon2;
745746

746-
if (checkEtaPhi1D(photon1.Eta(), RecoDecay::constrainAngle(photon1.Phi())) >= cfgEMCalMapLevel.value) {
747+
if (checkEtaPhi1D(photon1.Eta(), RecoDecay::constrainAngle(photon1.Phi())) >= cfgEMCalMapLevelBackground.value) {
747748
iCellIDPhoton1 = -1;
748749
}
749-
if (checkEtaPhi1D(photon2.Eta(), RecoDecay::constrainAngle(photon2.Phi())) >= cfgEMCalMapLevel.value) {
750+
if (checkEtaPhi1D(photon2.Eta(), RecoDecay::constrainAngle(photon2.Phi())) >= cfgEMCalMapLevelBackground.value) {
750751
iCellIDPhoton2 = -1;
751752
}
752753

@@ -761,7 +762,7 @@ struct TaskPi0FlowEMC {
761762
if (!(fEMCCut.IsSelected<EMCalPhotons::iterator>(photon))) {
762763
continue;
763764
}
764-
if (checkEtaPhi1D(photon.eta(), RecoDecay::constrainAngle(photon.phi())) >= cfgEMCalMapLevel.value) {
765+
if (checkEtaPhi1D(photon.eta(), RecoDecay::constrainAngle(photon.phi())) >= cfgEMCalMapLevelBackground.value) {
765766
continue;
766767
}
767768
ROOT::Math::PtEtaPhiMVector photon3(photon.pt(), photon.eta(), photon.phi(), 0.);
@@ -897,7 +898,7 @@ struct TaskPi0FlowEMC {
897898
if (!(fEMCCut.IsSelected<EMCalPhotons::iterator>(photon))) {
898899
continue;
899900
}
900-
if (cfgDistanceToEdge.value && (checkEtaPhi1D(photon.eta(), RecoDecay::constrainAngle(photon.phi())) >= 2)) {
901+
if (cfgDistanceToEdge.value && (checkEtaPhi1D(photon.eta(), RecoDecay::constrainAngle(photon.phi())) >= cfgEMCalMapLevelSameEvent.value)) {
901902
continue;
902903
}
903904
registry.fill(HIST("hEClusterAfter"), photon.e()); // accepted after cuts
@@ -911,10 +912,10 @@ struct TaskPi0FlowEMC {
911912

912913
// Cut edge clusters away, similar to rotation method to ensure same acceptance is used
913914
if (cfgDistanceToEdge.value) {
914-
if (checkEtaPhi1D(g1.eta(), RecoDecay::constrainAngle(g1.phi())) >= 2) {
915+
if (checkEtaPhi1D(g1.eta(), RecoDecay::constrainAngle(g1.phi())) >= cfgEMCalMapLevelSameEvent.value) {
915916
continue;
916917
}
917-
if (checkEtaPhi1D(g2.eta(), RecoDecay::constrainAngle(g2.phi())) >= 2) {
918+
if (checkEtaPhi1D(g2.eta(), RecoDecay::constrainAngle(g2.phi())) >= cfgEMCalMapLevelSameEvent.value) {
918919
continue;
919920
}
920921
}
@@ -1007,6 +1008,15 @@ struct TaskPi0FlowEMC {
10071008
if (!(fEMCCut.IsSelected<EMCalPhotons::iterator>(g1)) || !(fEMCCut.IsSelected<EMCalPhotons::iterator>(g2))) {
10081009
continue;
10091010
}
1011+
// Cut edge clusters away, similar to rotation method to ensure same acceptance is used
1012+
if (cfgDistanceToEdge.value) {
1013+
if (checkEtaPhi1D(g1.eta(), RecoDecay::constrainAngle(g1.phi())) >= cfgEMCalMapLevelBackground.value) {
1014+
continue;
1015+
}
1016+
if (checkEtaPhi1D(g2.eta(), RecoDecay::constrainAngle(g2.phi())) >= cfgEMCalMapLevelBackground.value) {
1017+
continue;
1018+
}
1019+
}
10101020
ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.);
10111021
ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.);
10121022
ROOT::Math::PtEtaPhiMVector vMeson = v1 + v2;
@@ -1216,10 +1226,10 @@ struct TaskPi0FlowEMC {
12161226

12171227
// Cut edge clusters away, similar to rotation method to ensure same acceptance is used
12181228
if (cfgDistanceToEdge.value) {
1219-
if (checkEtaPhi1D(g1.eta(), RecoDecay::constrainAngle(g1.phi())) >= 2) {
1229+
if (checkEtaPhi1D(g1.eta(), RecoDecay::constrainAngle(g1.phi())) >= cfgEMCalMapLevelSameEvent.value) {
12201230
continue;
12211231
}
1222-
if (checkEtaPhi1D(g2.eta(), RecoDecay::constrainAngle(g2.phi())) >= 2) {
1232+
if (checkEtaPhi1D(g2.eta(), RecoDecay::constrainAngle(g2.phi())) >= cfgEMCalMapLevelSameEvent.value) {
12231233
continue;
12241234
}
12251235
}

0 commit comments

Comments
 (0)