Skip to content

Commit 55512eb

Browse files
authored
PWGEM/PhotonMeson: separate pi0eta task into subsystems (#6333)
1 parent c9ab87e commit 55512eb

5 files changed

Lines changed: 157 additions & 32 deletions

File tree

PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGamma.cxx renamed to PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@
1414
// This code loops over photons and makes pairs for neutral mesons analyses.
1515
// Please write to: daiki.sekihata@cern.ch
1616

17+
#ifndef PWGEM_PHOTONMESON_CORE_PI0ETATOGAMMAGAMMA_H_
18+
#define PWGEM_PHOTONMESON_CORE_PI0ETATOGAMMAGAMMA_H_
19+
1720
#include <cstring>
1821
#include <iterator>
22+
#include <string>
23+
#include <map>
24+
#include <vector>
25+
#include <tuple>
26+
#include <utility>
1927

2028
#include "TString.h"
2129
#include "Math/Vector4D.h"
@@ -91,14 +99,17 @@ struct Pi0EtaToGammaGamma {
9199
ConfigurableAxis ConfEPBins{"ConfEPBins", {VARIABLE_WIDTH, -M_PI / 2, -M_PI / 4, 0.0f, +M_PI / 4, +M_PI / 2}, "Mixing bins - event plane angle"};
92100

93101
EMEventCut fEMEventCut;
94-
Configurable<float> cfgZvtxMax{"cfgZvtxMax", 10.f, "max. Zvtx"};
95-
Configurable<bool> cfgRequireSel8{"cfgRequireSel8", true, "require sel8 in event cut"};
96-
Configurable<bool> cfgRequireFT0AND{"cfgRequireFT0AND", true, "require FT0AND in event cut"};
97-
Configurable<bool> cfgRequireNoTFB{"cfgRequireNoTFB", false, "require No time frame border in event cut"};
98-
Configurable<bool> cfgRequireNoITSROFB{"cfgRequireNoITSROFB", false, "require no ITS readout frame border in event cut"};
99-
Configurable<bool> cfgRequireNoSameBunchPileup{"cfgRequireNoSameBunchPileup", false, "require no same bunch pileup in event cut"};
100-
Configurable<bool> cfgRequireVertexITSTPC{"cfgRequireVertexITSTPC", false, "require Vertex ITSTPC in event cut"}; // ITS-TPC matched track contributes PV.
101-
Configurable<bool> cfgRequireGoodZvtxFT0vsPV{"cfgRequireGoodZvtxFT0vsPV", false, "require good Zvtx between FT0 vs. PV in event cut"};
102+
struct : ConfigurableGroup {
103+
std::string prefix = "eventcut_group";
104+
Configurable<float> cfgZvtxMax{"cfgZvtxMax", 10.f, "max. Zvtx"};
105+
Configurable<bool> cfgRequireSel8{"cfgRequireSel8", true, "require sel8 in event cut"};
106+
Configurable<bool> cfgRequireFT0AND{"cfgRequireFT0AND", true, "require FT0AND in event cut"};
107+
Configurable<bool> cfgRequireNoTFB{"cfgRequireNoTFB", false, "require No time frame border in event cut"};
108+
Configurable<bool> cfgRequireNoITSROFB{"cfgRequireNoITSROFB", false, "require no ITS readout frame border in event cut"};
109+
Configurable<bool> cfgRequireNoSameBunchPileup{"cfgRequireNoSameBunchPileup", false, "require no same bunch pileup in event cut"};
110+
Configurable<bool> cfgRequireVertexITSTPC{"cfgRequireVertexITSTPC", false, "require Vertex ITSTPC in event cut"}; // ITS-TPC matched track contributes PV.
111+
Configurable<bool> cfgRequireGoodZvtxFT0vsPV{"cfgRequireGoodZvtxFT0vsPV", false, "require good Zvtx between FT0 vs. PV in event cut"};
112+
} eventcuts;
102113

103114
V0PhotonCut fV0PhotonCut;
104115
struct : ConfigurableGroup {
@@ -253,14 +264,14 @@ struct Pi0EtaToGammaGamma {
253264
void DefineEMEventCut()
254265
{
255266
fEMEventCut = EMEventCut("fEMEventCut", "fEMEventCut");
256-
fEMEventCut.SetRequireSel8(cfgRequireSel8);
257-
fEMEventCut.SetRequireFT0AND(cfgRequireFT0AND);
258-
fEMEventCut.SetZvtxRange(-cfgZvtxMax, +cfgZvtxMax);
259-
fEMEventCut.SetRequireNoTFB(cfgRequireNoTFB);
260-
fEMEventCut.SetRequireNoITSROFB(cfgRequireNoITSROFB);
261-
fEMEventCut.SetRequireNoSameBunchPileup(cfgRequireNoSameBunchPileup);
262-
fEMEventCut.SetRequireVertexITSTPC(cfgRequireVertexITSTPC);
263-
fEMEventCut.SetRequireGoodZvtxFT0vsPV(cfgRequireGoodZvtxFT0vsPV);
267+
fEMEventCut.SetRequireSel8(eventcuts.cfgRequireSel8);
268+
fEMEventCut.SetRequireFT0AND(eventcuts.cfgRequireFT0AND);
269+
fEMEventCut.SetZvtxRange(-eventcuts.cfgZvtxMax, +eventcuts.cfgZvtxMax);
270+
fEMEventCut.SetRequireNoTFB(eventcuts.cfgRequireNoTFB);
271+
fEMEventCut.SetRequireNoITSROFB(eventcuts.cfgRequireNoITSROFB);
272+
fEMEventCut.SetRequireNoSameBunchPileup(eventcuts.cfgRequireNoSameBunchPileup);
273+
fEMEventCut.SetRequireVertexITSTPC(eventcuts.cfgRequireVertexITSTPC);
274+
fEMEventCut.SetRequireGoodZvtxFT0vsPV(eventcuts.cfgRequireGoodZvtxFT0vsPV);
264275
}
265276

266277
void DefinePCMCut()
@@ -855,16 +866,4 @@ struct Pi0EtaToGammaGamma {
855866
void processDummy(MyCollisions const&) {}
856867
PROCESS_SWITCH(Pi0EtaToGammaGamma, processDummy, "Dummy function", true);
857868
};
858-
859-
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
860-
{
861-
return WorkflowSpec{
862-
adaptAnalysisTask<Pi0EtaToGammaGamma<PairType::kPCMPCM, MyV0Photons, aod::V0Legs>>(cfgc, TaskName{"pi0eta-to-gammagamma-pcmpcm"}),
863-
adaptAnalysisTask<Pi0EtaToGammaGamma<PairType::kPCMDalitzEE, MyV0Photons, aod::V0Legs, MyPrimaryElectrons>>(cfgc, TaskName{"pi0eta-to-gammagamma-pcmdalitzee"}),
864-
adaptAnalysisTask<Pi0EtaToGammaGamma<PairType::kPCMDalitzMuMu, MyV0Photons, aod::V0Legs, MyPrimaryMuons>>(cfgc, TaskName{"pi0eta-to-gammagamma-pcmdalitzmumu"}),
865-
adaptAnalysisTask<Pi0EtaToGammaGamma<PairType::kEMCEMC, MyEMCClusters, aod::SkimEMCMTs>>(cfgc, TaskName{"pi0eta-to-gammagamma-emcemc"}),
866-
adaptAnalysisTask<Pi0EtaToGammaGamma<PairType::kPHOSPHOS, MyPHOSClusters>>(cfgc, TaskName{"pi0eta-to-gammagamma-phosphos"}),
867-
// adaptAnalysisTask<Pi0EtaToGammaGamma2<PairType::kPCMEMC, MyV0Photons, aod::V0Legs, MyEMCClusters, aod::SkimEMCMTs>>(cfgc, TaskName{"pi0eta-to-gammagamma-pcmemc"}),
868-
// adaptAnalysisTask<Pi0EtaToGammaGamma2<PairType::kPCMPHOS, MyV0Photons, aod::V0Legs, MyPHOSClusters>>(cfgc, TaskName{"pi0eta-to-gammagamma-pcmphos"}),
869-
};
870-
}
869+
#endif // PWGEM_PHOTONMESON_CORE_PI0ETATOGAMMAGAMMA_H_

PWGEM/PhotonMeson/Tasks/CMakeLists.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,22 @@ o2physics_add_dpl_workflow(single-photon-mc
7474
PUBLIC_LINK_LIBRARIES O2::Framework O2::EMCALBase O2::EMCALCalib O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore
7575
COMPONENT_NAME Analysis)
7676

77-
o2physics_add_dpl_workflow(pi0eta-to-gammagamma
78-
SOURCES Pi0EtaToGammaGamma.cxx
79-
PUBLIC_LINK_LIBRARIES O2::Framework O2::EMCALBase O2::EMCALCalib O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore O2Physics::MLCore
77+
o2physics_add_dpl_workflow(pi0eta-to-gammagamma-pcmpcm
78+
SOURCES Pi0EtaToGammaGammaPCMPCM.cxx
79+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore O2Physics::MLCore
80+
COMPONENT_NAME Analysis)
81+
82+
o2physics_add_dpl_workflow(pi0eta-to-gammagamma-pcmdalitzee
83+
SOURCES Pi0EtaToGammaGammaPCMDalitzEE.cxx
84+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore O2Physics::MLCore
8085
COMPONENT_NAME Analysis)
8186

87+
o2physics_add_dpl_workflow(pi0eta-to-gammagamma-emcemc
88+
SOURCES Pi0EtaToGammaGammaPCMPCM.cxx
89+
PUBLIC_LINK_LIBRARIES O2::Framework O2::EMCALBase O2::EMCALCalib O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore
90+
COMPONENT_NAME Analysis)
91+
92+
8293
o2physics_add_dpl_workflow(pi0eta-to-gammagamma-mc
8394
SOURCES Pi0EtaToGammaGammaMC.cxx
8495
PUBLIC_LINK_LIBRARIES O2::Framework O2::EMCALBase O2::EMCALCalib O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore O2Physics::MLCore
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
//
12+
// ========================
13+
//
14+
// This code loops over photons and makes pairs for neutral mesons analyses.
15+
// Please write to: daiki.sekihata@cern.ch
16+
17+
#include "Framework/runDataProcessing.h"
18+
#include "Framework/AnalysisTask.h"
19+
#include "Framework/AnalysisDataModel.h"
20+
#include "Framework/ASoAHelpers.h"
21+
22+
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
23+
#include "PWGEM/PhotonMeson/Utils/PairUtilities.h"
24+
#include "PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h"
25+
26+
using namespace o2;
27+
using namespace o2::aod;
28+
29+
using MyEMCClusters = soa::Join<aod::SkimEMCClusters, aod::EMCEMEventIds>;
30+
using MyEMCCluster = MyEMCClusters::iterator;
31+
32+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
33+
{
34+
return WorkflowSpec{
35+
adaptAnalysisTask<Pi0EtaToGammaGamma<PairType::kEMCEMC, MyEMCClusters, aod::SkimEMCMTs>>(cfgc, TaskName{"pi0eta-to-gammagamma-emcemc"}),
36+
};
37+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
//
12+
// ========================
13+
//
14+
// This code loops over photons and makes pairs for neutral mesons analyses.
15+
// Please write to: daiki.sekihata@cern.ch
16+
17+
#include "Framework/runDataProcessing.h"
18+
#include "Framework/AnalysisTask.h"
19+
#include "Framework/AnalysisDataModel.h"
20+
#include "Framework/ASoAHelpers.h"
21+
22+
#include "Common/Core/RecoDecay.h"
23+
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
24+
#include "PWGEM/PhotonMeson/Utils/PairUtilities.h"
25+
#include "PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h"
26+
27+
using namespace o2;
28+
using namespace o2::aod;
29+
30+
using MyV0Photons = soa::Join<aod::V0PhotonsKF, aod::V0KFEMEventIds>;
31+
using MyV0Photon = MyV0Photons::iterator;
32+
33+
using MyPrimaryElectrons = soa::Join<aod::EMPrimaryElectrons, aod::EMPrimaryElectronEMEventIds, aod::EMPrimaryElectronsPrefilterBit>;
34+
using MyPrimaryElectron = MyPrimaryElectrons::iterator;
35+
36+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
37+
{
38+
return WorkflowSpec{
39+
adaptAnalysisTask<Pi0EtaToGammaGamma<PairType::kPCMDalitzEE, MyV0Photons, aod::V0Legs, MyPrimaryElectrons>>(cfgc, TaskName{"pi0eta-to-gammagamma-pcmdalitzee"}),
40+
};
41+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
//
12+
// ========================
13+
//
14+
// This code loops over photons and makes pairs for neutral mesons analyses.
15+
// Please write to: daiki.sekihata@cern.ch
16+
17+
#include "Framework/runDataProcessing.h"
18+
#include "Framework/AnalysisTask.h"
19+
#include "Framework/AnalysisDataModel.h"
20+
#include "Framework/ASoAHelpers.h"
21+
22+
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
23+
#include "PWGEM/PhotonMeson/Utils/PairUtilities.h"
24+
#include "PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h"
25+
26+
using namespace o2;
27+
using namespace o2::aod;
28+
29+
using MyV0Photons = soa::Join<aod::V0PhotonsKF, aod::V0KFEMEventIds>;
30+
using MyV0Photon = MyV0Photons::iterator;
31+
32+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
33+
{
34+
return WorkflowSpec{
35+
adaptAnalysisTask<Pi0EtaToGammaGamma<PairType::kPCMPCM, MyV0Photons, aod::V0Legs>>(cfgc, TaskName{"pi0eta-to-gammagamma-pcmpcm"}),
36+
};
37+
}

0 commit comments

Comments
 (0)