99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
1111
12- #include " Framework/runDataProcessing.h"
13- #include " Framework/AnalysisTask.h"
14- #include " Framework/HistogramRegistry.h"
15- #include " Framework/Configurable.h"
16-
1712#include " PWGJE/DataModel/Jet.h"
1813#include " PWGJE/DataModel/JetMatching.h"
19- # include " Common/DataModel/TrackSelectionTables.h "
14+
2015#include " Common/DataModel/MCTruthContainer.h"
16+ #include " Common/DataModel/TrackSelectionTables.h"
17+
18+ #include " Framework/AnalysisTask.h"
19+ #include " Framework/Configurable.h"
20+ #include " Framework/HistogramRegistry.h"
21+ #include " Framework/runDataProcessing.h"
2122
2223#include < cmath>
2324
@@ -96,7 +97,6 @@ int getInitiatingParton(auto const& particle,
9697// main task
9798// ------------------------------------------------
9899struct QGTreeCreator {
99-
100100 Configurable<float > jetPtMin{" jetPtMin" , 10 .f };
101101 Configurable<float > maxMatchDeltaR{" maxMatchDeltaR" , 0 .3f };
102102
@@ -108,9 +108,9 @@ struct QGTreeCreator {
108108 aod::McParticles const & mcParticles)
109109 {
110110 for (auto const & jet : recoJets) {
111-
112- if (jet.pt () < jetPtMin)
111+ if (jet.pt () < jetPtMin) {
113112 continue ;
113+ }
114114
115115 // ----------------------------------
116116 // compute jet observables
@@ -132,6 +132,7 @@ struct QGTreeCreator {
132132
133133 float girth = sumPt > 0 ? sumPtDr / sumPt : -1 ;
134134 float ptd = sumPt > 0 ? std::sqrt (sumPt2) / sumPt : -1 ;
135+
135136 // ----------------------------------
136137 // matching block
137138 // ----------------------------------
@@ -140,19 +141,19 @@ struct QGTreeCreator {
140141 int qg = -1 ;
141142
142143 for (auto const & match : matches) {
143-
144-
145- if (match.chargedMCDetectorLevelJetId () != jet.globalIndex ())
144+ if (match.chargedMCDetectorLevelJetId () != jet.globalIndex ()) {
146145 continue ;
146+ }
147147
148- auto truthJet = truthJets.iteratorAt (
148+ auto truthJet = truthJets.iteratorAt (
149149 match.chargedMCParticleLevelJetId ());
150150
151151 matchDr = deltaR (jet.eta (), jet.phi (),
152152 truthJet.eta (), truthJet.phi ());
153153
154- if (matchDr > maxMatchDeltaR)
154+ if (matchDr > maxMatchDeltaR) {
155155 continue ;
156+ }
156157
157158 ptResp = jet.pt () / truthJet.pt ();
158159
@@ -163,10 +164,10 @@ struct QGTreeCreator {
163164 int pdg = 0 ;
164165
165166 for (auto const & tc :
166- truthJet.tracks_as <aod::ChargedMCParticleLevelJetConstituent>()) {
167-
168- if (!tc.has_mcParticle ())
167+ truthJet.tracks_as <aod::ChargedMCParticleLevelJetConstituent>()) {
168+ if (!tc.has_mcParticle ()) {
169169 continue ;
170+ }
170171
171172 auto mc = tc.mcParticle ();
172173
@@ -175,20 +176,19 @@ struct QGTreeCreator {
175176 pdg = getInitiatingParton (mc, mcParticles);
176177 }
177178 }
179+
178180 // ----------------------------------
179181 // assign q/g label
180182 // ----------------------------------
181- if (std::abs (pdg) == 21 )
183+ if (std::abs (pdg) == 21 ) {
182184 qg = 1 ; // gluon
183- else if (std::abs (pdg) >= 1 && std::abs (pdg) <= 6 )
185+ } else if (std::abs (pdg) >= 1 && std::abs (pdg) <= 6 ) {
184186 qg = 0 ; // quark
187+ }
185188
186189 break ;
187190 }
188191
189- // ----------------------------------
190- // store
191- // ----------------------------------
192192 qgjets (jet.pt (),
193193 jet.eta (),
194194 jet.phi (),
0 commit comments