@@ -110,7 +110,7 @@ struct JetSubstructureOutputTask {
110110 jetMapping.insert (std::make_pair (jet.globalIndex (), jetOutputTable.lastIndex ()));
111111 }
112112
113- template <bool isMc , typename T, typename U, typename V, typename M, typename N>
113+ template <bool isMCP , typename T, typename U, typename V, typename M, typename N>
114114 void analyseCharged (T const & collision, U const & jets, V& collisionOutputTable, M& jetOutputTable, N& jetSubstructureOutputTable, std::map<int32_t , int32_t >& jetMapping, float jetPtMin, float eventWeight)
115115 {
116116 int nJetInCollision = 0 ;
@@ -124,13 +124,17 @@ struct JetSubstructureOutputTask {
124124 }
125125 for (const auto & jetRadiiValue : jetRadiiValues) {
126126 if (jet.r () == round (jetRadiiValue * 100 .0f )) {
127- if constexpr (!isMc) {
128- if (nJetInCollision == 0 ) {
129- collisionOutputTable (collision.posZ (), collision.centrality (), collision.eventSel (), eventWeight);
130- collisionIndex = collisionOutputTable.lastIndex ();
127+ if (nJetInCollision == 0 ) {
128+ float centrality = -1.0 ;
129+ uint8_t eventSel = 0.0 ;
130+ if constexpr (!isMCP) {
131+ centrality = collision.centrality ();
132+ eventSel = collision.eventSel ();
131133 }
132- nJetInCollision++;
134+ collisionOutputTable (collision.posZ (), centrality, eventSel, eventWeight);
135+ collisionIndex = collisionOutputTable.lastIndex ();
133136 }
137+ nJetInCollision++;
134138 fillJetTables (jet, collisionIndex, jetOutputTable, jetSubstructureOutputTable, jetMapping);
135139 }
136140 }
0 commit comments