Skip to content

Commit 0fb2c17

Browse files
committed
change_define_to_variable__move_table_definitions_to_own_header
1 parent d5cd1a9 commit 0fb2c17

File tree

2 files changed

+137
-112
lines changed

2 files changed

+137
-112
lines changed
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
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+
/// \brief table definitions for photon-hadron correlation analyses
14+
///
15+
/// \author Julius Kinner
16+
/// \file PhotonChargedTriggerCorrelation.h
17+
18+
#ifndef PWGJE_DATAMODEL_PHOTONCHARGEDTRIGGERCORRELATION_H_
19+
#define PWGJE_DATAMODEL_PHOTONCHARGEDTRIGGERCORRELATION_H_
20+
21+
#include "Framework/AnalysisDataModel.h"
22+
#include "PWGJE/Core/JetDerivedDataUtilities.h"
23+
#include "PWGJE/DataModel/Jet.h"
24+
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
25+
#include "PWGEM/PhotonMeson/Utils/PCMUtilities.h"
26+
27+
namespace o2::aod
28+
{
29+
30+
// basic correlation particle columns
31+
namespace corr_particle
32+
{
33+
DECLARE_SOA_INDEX_COLUMN_FULL(JetCollision, jetCollision, int, JCollisions, "");
34+
DECLARE_SOA_INDEX_COLUMN_FULL(JetMcCollision, jetMcCollision, int, JMcCollisions, "");
35+
DECLARE_SOA_COLUMN(Pt, pt, float);
36+
DECLARE_SOA_COLUMN(Phi, phi, float);
37+
DECLARE_SOA_COLUMN(Eta, eta, float);
38+
} // namespace corr_particle
39+
40+
// reco
41+
42+
// collision extension
43+
namespace collision_extra_corr
44+
{
45+
DECLARE_SOA_COLUMN(SelEv, selEv, bool);
46+
DECLARE_SOA_COLUMN(TrigEv, trigEv, bool);
47+
} // namespace collision_extra_corr
48+
DECLARE_SOA_TABLE(CollisionsExtraCorr, "AOD", "COLLISIONSEXTRACORR",
49+
collision_extra_corr::SelEv, collision_extra_corr::TrigEv);
50+
51+
// trigger
52+
namespace trigger
53+
{
54+
DECLARE_SOA_INDEX_COLUMN_FULL(JetTrack, jetTrack, int, JetTracks, "");
55+
} // namespace trigger
56+
DECLARE_SOA_TABLE(Triggers, "AOD", "TRIGGERS",
57+
o2::soa::Index<>, corr_particle::JetCollisionId, trigger::JetTrackId,
58+
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
59+
using Trigger = Triggers::iterator;
60+
61+
// hadrons (global tracks)
62+
namespace hadron
63+
{
64+
DECLARE_SOA_INDEX_COLUMN_FULL(JetTrack, jetTrack, int, JetTracks, "");
65+
} // namespace hadron
66+
DECLARE_SOA_TABLE(Hadrons, "AOD", "HADRONS",
67+
o2::soa::Index<>, corr_particle::JetCollisionId, hadron::JetTrackId,
68+
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
69+
using Hadron = Hadrons::iterator;
70+
71+
// pipm
72+
namespace pipm
73+
{
74+
DECLARE_SOA_INDEX_COLUMN_FULL(JetTrack, jetTrack, int, JetTracks, "");
75+
} // namespace pipm
76+
DECLARE_SOA_TABLE(Pipms, "AOD", "PIPMS",
77+
o2::soa::Index<>, corr_particle::JetCollisionId, pipm::JetTrackId,
78+
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
79+
using Pipm = Pipms::iterator;
80+
81+
// photonPCM
82+
namespace photon_pcm
83+
{
84+
DECLARE_SOA_INDEX_COLUMN_FULL(V0PhotonKF, v0PhotonKF, int, V0PhotonsKF, "");
85+
DECLARE_SOA_COLUMN(PosTrackId, posTrackId, int);
86+
DECLARE_SOA_COLUMN(NegTrackId, negTrackId, int);
87+
} // namespace photon_pcm
88+
DECLARE_SOA_TABLE(PhotonPCMs, "AOD", "PHOTONPCMS",
89+
o2::soa::Index<>, corr_particle::JetCollisionId, photon_pcm::V0PhotonKFId,
90+
photon_pcm::PosTrackId, photon_pcm::NegTrackId,
91+
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
92+
using PhotonPCM = PhotonPCMs::iterator;
93+
94+
// photonPCM pairs (pi0)
95+
namespace photon_pcm_pair
96+
{
97+
DECLARE_SOA_INDEX_COLUMN_FULL(V0PhotonKF1, v0PhotonKF1, int, V0PhotonsKF, "_1");
98+
DECLARE_SOA_INDEX_COLUMN_FULL(V0PhotonKF2, v0PhotonKF2, int, V0PhotonsKF, "_2");
99+
DECLARE_SOA_COLUMN(PosTrack1Id, posTrack1Id, int);
100+
DECLARE_SOA_COLUMN(NegTrack1Id, negTrack1Id, int);
101+
DECLARE_SOA_COLUMN(PosTrack2Id, posTrack2Id, int);
102+
DECLARE_SOA_COLUMN(NegTrack2Id, negTrack2Id, int);
103+
DECLARE_SOA_COLUMN(Mgg, mgg, float);
104+
} // namespace photon_pcm_pair
105+
DECLARE_SOA_TABLE(PhotonPCMPairs, "AOD", "PHOTONPCMPAIRS",
106+
o2::soa::Index<>, corr_particle::JetCollisionId, photon_pcm_pair::V0PhotonKF1Id, photon_pcm_pair::V0PhotonKF2Id,
107+
photon_pcm_pair::PosTrack1Id, photon_pcm_pair::NegTrack1Id, photon_pcm_pair::PosTrack2Id, photon_pcm_pair::NegTrack2Id,
108+
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta, photon_pcm_pair::Mgg);
109+
using PhotonPCMPair = PhotonPCMPairs::iterator;
110+
111+
// mc
112+
113+
// mcCollision extension
114+
namespace mc_collision_extra_corr
115+
{
116+
DECLARE_SOA_COLUMN(TrigEv, trigEv, bool);
117+
} // namespace mc_collision_extra_corr
118+
DECLARE_SOA_TABLE(McCollisionsExtraCorr, "AOD", "MCCOLLISIONSEXTRACORR",
119+
mc_collision_extra_corr::TrigEv);
120+
121+
// trigger
122+
namespace trigger_particle
123+
{
124+
DECLARE_SOA_INDEX_COLUMN_FULL(JetMcParticle, jetMcParticle, int, JetParticles, "");
125+
} // namespace trigger_particle
126+
DECLARE_SOA_TABLE(TriggerParticles, "AOD", "TRIGGERPARTICLES",
127+
o2::soa::Index<>, corr_particle::JetMcCollisionId, trigger_particle::JetMcParticleId,
128+
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
129+
using TriggerParticle = TriggerParticles::iterator;
130+
} // namespace o2::aod
131+
132+
#endif // PWGJE_DATAMODEL_PHOTONCHARGEDTRIGGERCORRELATION_H_

PWGJE/Tasks/photonChargedTriggerCorrelation.cxx

Lines changed: 5 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
/// Also contains checks and monte-carlo (efficiency, purity, mc-true correlation,...)
1919
/// End goal of studying correlations between direct photons and jets
2020

21-
#define ETA_MAX_DEFAULT 0.8
22-
#define DPHI_SCALE constants::math::TwoPI - constants::math::PIHalf
23-
#define DETA_SCALE 4 * ETA_MAX_DEFAULT - 2 * ETA_MAX_DEFAULT
24-
2521
#include <cmath>
2622
#include <deque>
2723
#include <string>
@@ -51,114 +47,11 @@
5147
#include "PWGEM/PhotonMeson/Utils/PCMUtilities.h"
5248

5349
#include "PWGJE/DataModel/Jet.h"
50+
#include "PWGJE/DataModel/PhotonChargedTriggerCorrelation.h"
5451

55-
// derived data for correlations (on-the-fly)
56-
// should be more efficient due to usage in correlations and event mixing
57-
58-
namespace o2::aod
59-
{
60-
61-
// basic correlation particle columns
62-
namespace corr_particle
63-
{
64-
DECLARE_SOA_INDEX_COLUMN_FULL(JetCollision, jetCollision, int, JCollisions, "");
65-
DECLARE_SOA_INDEX_COLUMN_FULL(JetMcCollision, jetMcCollision, int, JMcCollisions, "");
66-
DECLARE_SOA_COLUMN(Pt, pt, float);
67-
DECLARE_SOA_COLUMN(Phi, phi, float);
68-
DECLARE_SOA_COLUMN(Eta, eta, float);
69-
} // namespace corr_particle
70-
71-
// reco
72-
73-
// collision extension
74-
namespace collision_extra_corr
75-
{
76-
DECLARE_SOA_COLUMN(SelEv, selEv, bool);
77-
DECLARE_SOA_COLUMN(TrigEv, trigEv, bool);
78-
} // namespace collision_extra_corr
79-
DECLARE_SOA_TABLE(CollisionsExtraCorr, "AOD", "COLLISIONSEXTRACORR",
80-
collision_extra_corr::SelEv, collision_extra_corr::TrigEv);
81-
82-
// trigger
83-
namespace trigger
84-
{
85-
DECLARE_SOA_INDEX_COLUMN_FULL(JetTrack, jetTrack, int, JetTracks, "");
86-
} // namespace trigger
87-
DECLARE_SOA_TABLE(Triggers, "AOD", "TRIGGERS",
88-
o2::soa::Index<>, corr_particle::JetCollisionId, trigger::JetTrackId,
89-
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
90-
using Trigger = Triggers::iterator;
91-
92-
// hadrons (global tracks)
93-
namespace hadron
94-
{
95-
DECLARE_SOA_INDEX_COLUMN_FULL(JetTrack, jetTrack, int, JetTracks, "");
96-
} // namespace hadron
97-
DECLARE_SOA_TABLE(Hadrons, "AOD", "HADRONS",
98-
o2::soa::Index<>, corr_particle::JetCollisionId, hadron::JetTrackId,
99-
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
100-
using Hadron = Hadrons::iterator;
101-
102-
// pipm
103-
namespace pipm
104-
{
105-
DECLARE_SOA_INDEX_COLUMN_FULL(JetTrack, jetTrack, int, JetTracks, "");
106-
} // namespace pipm
107-
DECLARE_SOA_TABLE(Pipms, "AOD", "PIPMS",
108-
o2::soa::Index<>, corr_particle::JetCollisionId, pipm::JetTrackId,
109-
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
110-
using Pipm = Pipms::iterator;
111-
112-
// photonPCM
113-
namespace photon_pcm
114-
{
115-
DECLARE_SOA_INDEX_COLUMN_FULL(V0PhotonKF, v0PhotonKF, int, V0PhotonsKF, "");
116-
DECLARE_SOA_COLUMN(PosTrackId, posTrackId, int);
117-
DECLARE_SOA_COLUMN(NegTrackId, negTrackId, int);
118-
} // namespace photon_pcm
119-
DECLARE_SOA_TABLE(PhotonPCMs, "AOD", "PHOTONPCMS",
120-
o2::soa::Index<>, corr_particle::JetCollisionId, photon_pcm::V0PhotonKFId,
121-
photon_pcm::PosTrackId, photon_pcm::NegTrackId,
122-
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
123-
using PhotonPCM = PhotonPCMs::iterator;
124-
125-
// photonPCM pairs (pi0)
126-
namespace photon_pcm_pair
127-
{
128-
DECLARE_SOA_INDEX_COLUMN_FULL(V0PhotonKF1, v0PhotonKF1, int, V0PhotonsKF, "_1");
129-
DECLARE_SOA_INDEX_COLUMN_FULL(V0PhotonKF2, v0PhotonKF2, int, V0PhotonsKF, "_2");
130-
DECLARE_SOA_COLUMN(PosTrack1Id, posTrack1Id, int);
131-
DECLARE_SOA_COLUMN(NegTrack1Id, negTrack1Id, int);
132-
DECLARE_SOA_COLUMN(PosTrack2Id, posTrack2Id, int);
133-
DECLARE_SOA_COLUMN(NegTrack2Id, negTrack2Id, int);
134-
DECLARE_SOA_COLUMN(Mgg, mgg, float);
135-
} // namespace photon_pcm_pair
136-
DECLARE_SOA_TABLE(PhotonPCMPairs, "AOD", "PHOTONPCMPAIRS",
137-
o2::soa::Index<>, corr_particle::JetCollisionId, photon_pcm_pair::V0PhotonKF1Id, photon_pcm_pair::V0PhotonKF2Id,
138-
photon_pcm_pair::PosTrack1Id, photon_pcm_pair::NegTrack1Id, photon_pcm_pair::PosTrack2Id, photon_pcm_pair::NegTrack2Id,
139-
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta, photon_pcm_pair::Mgg);
140-
using PhotonPCMPair = PhotonPCMPairs::iterator;
141-
142-
// mc
143-
144-
// mcCollision extension
145-
namespace mc_collision_extra_corr
146-
{
147-
DECLARE_SOA_COLUMN(TrigEv, trigEv, bool);
148-
} // namespace mc_collision_extra_corr
149-
DECLARE_SOA_TABLE(McCollisionsExtraCorr, "AOD", "MCCOLLISIONSEXTRACORR",
150-
mc_collision_extra_corr::TrigEv);
151-
152-
// trigger
153-
namespace trigger_particle
154-
{
155-
DECLARE_SOA_INDEX_COLUMN_FULL(JetMcParticle, jetMcParticle, int, JetParticles, "");
156-
} // namespace trigger_particle
157-
DECLARE_SOA_TABLE(TriggerParticles, "AOD", "TRIGGERPARTICLES",
158-
o2::soa::Index<>, corr_particle::JetMcCollisionId, trigger_particle::JetMcParticleId,
159-
corr_particle::Pt, corr_particle::Phi, corr_particle::Eta);
160-
using TriggerParticle = TriggerParticles::iterator;
161-
} // namespace o2::aod
52+
const double absEtaMax = 0.8;
53+
#define DPHI_SCALE constants::math::TwoPI - constants::math::PIHalf
54+
#define DETA_SCALE 4 * absEtaMax - 2 * absEtaMax
16255

16356
using namespace o2;
16457
using namespace o2::framework;
@@ -189,7 +82,7 @@ struct CorrelationTableProducer {
18982
Configurable<double> zPvMax{"zPvMax", 7, "maximum absZ primary-vertex cut"};
19083
Configurable<int> occupancyMin{"occupancyMin", 0, "minimum occupancy cut"};
19184
Configurable<int> occupancyMax{"occupancyMax", 2000, "maximum occupancy cut"};
192-
Configurable<double> etaMax{"etaMax", ETA_MAX_DEFAULT, "maximum absEta cut"};
85+
Configurable<double> etaMax{"etaMax", 1 * absEtaMax, "maximum absEta cut"};
19386

19487
Configurable<std::string> eventSelections{"eventSelections", "sel8", "JE framework - event selection"};
19588
Configurable<std::string> trackSelections{"trackSelections", "globalTracks", "JE framework - track selections"};

0 commit comments

Comments
 (0)