@@ -203,43 +203,43 @@ struct TauEventTableProducer {
203203
204204 } // end init
205205
206- template <typename C>
207- bool isGoodFITtime (C const & coll, float maxFITtime)
208- {
206+ template <typename C>
207+ bool isGoodFITtime (C const & coll, float maxFITtime)
208+ {
209209
210- // FTOA
211- if ((std::abs (coll.timeFT0A ()) > maxFITtime) && coll.timeFT0A () > -998 .)
212- return false ;
210+ // FTOA
211+ if ((std::abs (coll.timeFT0A ()) > maxFITtime) && coll.timeFT0A () > -998 .)
212+ return false ;
213213
214- // FTOC
215- if ((std::abs (coll.timeFT0C ()) > maxFITtime) && coll.timeFT0A () > -998 .)
216- return false ;
214+ // FTOC
215+ if ((std::abs (coll.timeFT0C ()) > maxFITtime) && coll.timeFT0A () > -998 .)
216+ return false ;
217217
218- return true ;
219- }
218+ return true ;
219+ }
220220
221- template <typename C>
222- bool isGoodROFtime (C const & coll)
223- {
221+ template <typename C>
222+ bool isGoodROFtime (C const & coll)
223+ {
224224
225- // Occupancy
226- if (coll.occupancyInTime () > cutSample.cutEvOccupancy )
227- return false ;
225+ // Occupancy
226+ if (coll.occupancyInTime () > cutSample.cutEvOccupancy )
227+ return false ;
228228
229- // kNoCollInTimeRangeStandard
230- if (cutSample.cutEvTrs && !coll.trs ())
231- return false ;
229+ // kNoCollInTimeRangeStandard
230+ if (cutSample.cutEvTrs && !coll.trs ())
231+ return false ;
232232
233- // kNoCollInRofStandard
234- if (cutSample.cutEvTrofs && !coll.trofs ())
235- return false ;
233+ // kNoCollInRofStandard
234+ if (cutSample.cutEvTrofs && !coll.trofs ())
235+ return false ;
236236
237- // kNoHighMultCollInPrevRof
238- if (cutSample.cutEvHmpr && !coll.hmpr ())
239- return false ;
237+ // kNoHighMultCollInPrevRof
238+ if (cutSample.cutEvHmpr && !coll.hmpr ())
239+ return false ;
240240
241- return true ;
242- }
241+ return true ;
242+ }
243243
244244 std::vector<std::pair<int8_t , std::set<uint8_t >>> cutMyRequiredITSHits{};
245245
@@ -365,7 +365,7 @@ struct TauEventTableProducer {
365365 return false ;
366366 return true ;
367367 }
368-
368+
369369 void processDataSG (FullSGUDCollision const & collision,
370370 FullUDTracks const & tracks)
371371 {
@@ -391,84 +391,84 @@ struct TauEventTableProducer {
391391 if (cutSample.useRecoFlag && (collision.flags () != cutSample.cutRecoFlag ))
392392 return ;
393393
394- int countTracksPerCollision = 0 ;
395- int countGoodNonPVtracks = 0 ;
396- int countGoodPVtracks = 0 ;
397- std::vector<int > vecTrkIdx;
398- // Loop over tracks with selections
399- for (const auto & track : tracks) {
400- countTracksPerCollision++;
401- if (!isGlobalTrackReinstatement (track))
402- continue ;
403- if (!track.isPVContributor ()) {
404- countGoodNonPVtracks++;
405- continue ;
406- }
407- countGoodPVtracks++;
408- vecTrkIdx.push_back (track.index ());
409- } // Loop over tracks with selections
410-
411- // Apply weak condition on track PID
412- int countPVGTel = 0 ;
413- int countPVGTmupi = 0 ;
414- if (countGoodPVtracks == 2 ) {
415- for (const auto & vecMember : vecTrkIdx) {
416- const auto & thisTrk = tracks.iteratorAt (vecMember);
417- if (isElectronCandidate (thisTrk)) {
418- countPVGTel++;
419- continue ;
420- }
421- if (isMuPionCandidate (thisTrk)) {
422- countPVGTmupi++;
423- }
424- }
425- }
426-
427- if (cutPreselect.preselUseTrackPID ? ((countPVGTel == 2 && countPVGTmupi == 0 ) || (countPVGTel == 1 && countPVGTmupi == 1 )) : countGoodPVtracks == cutPreselect.preselNgoodPVtracs ) {
428- const auto & trk1 = tracks.iteratorAt (vecTrkIdx[0 ]);
429- const auto & trk2 = tracks.iteratorAt (vecTrkIdx[1 ]);
430-
431- float px[2 ] = {trk1.px (), trk2.px ()};
432- float py[2 ] = {trk1.py (), trk2.py ()};
433- float pz[2 ] = {trk1.pz (), trk2.pz ()};
434- int sign[2 ] = {trk1.sign (), trk2.sign ()};
435- float dcaxy[2 ] = {trk1.dcaXY (), trk2.dcaXY ()};
436- float dcaz[2 ] = {trk1.dcaZ (), trk2.dcaZ ()};
437- float trkTimeRes[2 ] = {trk1.trackTimeRes (), trk2.trackTimeRes ()};
438- uint32_t itsClusterSizesTrk1 = trk1.itsClusterSizes ();
439- uint32_t itsClusterSizesTrk2 = trk2.itsClusterSizes ();
440- float tpcSignal[2 ] = {trk1.tpcSignal (), trk2.tpcSignal ()};
441- float tpcEl[2 ] = {trk1.tpcNSigmaEl (), trk2.tpcNSigmaEl ()};
442- float tpcMu[2 ] = {trk1.tpcNSigmaMu (), trk2.tpcNSigmaMu ()};
443- float tpcPi[2 ] = {trk1.tpcNSigmaPi (), trk2.tpcNSigmaPi ()};
444- float tpcKa[2 ] = {trk1.tpcNSigmaKa (), trk2.tpcNSigmaKa ()};
445- float tpcPr[2 ] = {trk1.tpcNSigmaPr (), trk2.tpcNSigmaPr ()};
446- float tpcIP[2 ] = {trk1.tpcInnerParam (), trk2.tpcInnerParam ()};
447- float tofSignal[2 ] = {trk1.tofSignal (), trk2.tofSignal ()};
448- float tofEl[2 ] = {trk1.tofNSigmaEl (), trk2.tofNSigmaEl ()};
449- float tofMu[2 ] = {trk1.tofNSigmaMu (), trk2.tofNSigmaMu ()};
450- float tofPi[2 ] = {trk1.tofNSigmaPi (), trk2.tofNSigmaPi ()};
451- float tofKa[2 ] = {trk1.tofNSigmaKa (), trk2.tofNSigmaKa ()};
452- float tofPr[2 ] = {trk1.tofNSigmaPr (), trk2.tofNSigmaPr ()};
453- float tofEP[2 ] = {trk1.tofExpMom (), trk2.tofExpMom ()};
454- float infoZDC[4 ] = {-999 ., -999 ., -999 ., -999 .};
455- if constexpr (requires { collision.udZdcsReduced (); }) {
456- infoZDC[0 ] = collision.energyCommonZNA ();
457- infoZDC[1 ] = collision.energyCommonZNC ();
458- infoZDC[2 ] = collision.timeZNA ();
459- infoZDC[3 ] = collision.timeZNC ();
460- }
461-
462- tauTwoTracks (collision.runNumber (), collision.globalBC (), countTracksPerCollision, collision.numContrib (), countGoodNonPVtracks, collision.posX (), collision.posY (), collision.posZ (),
463- collision.flags (), collision.occupancyInTime (), collision.hadronicRate (), collision.trs (), collision.trofs (), collision.hmpr (),
464- collision.tfb (), collision.itsROFb (), collision.sbp (), collision.zVtxFT0vPV (), collision.vtxITSTPC (),
465- collision.totalFT0AmplitudeA (), collision.totalFT0AmplitudeC (), collision.totalFV0AmplitudeA (), infoZDC[0 ], infoZDC[1 ],
466- collision.timeFT0A (), collision.timeFT0C (), collision.timeFV0A (), infoZDC[2 ], infoZDC[3 ],
467- px, py, pz, sign, dcaxy, dcaz, trkTimeRes,
468- itsClusterSizesTrk1, itsClusterSizesTrk2,
469- tpcSignal, tpcEl, tpcMu, tpcPi, tpcKa, tpcPr, tpcIP,
470- tofSignal, tofEl, tofMu, tofPi, tofKa, tofPr, tofEP);
471- }
394+ int countTracksPerCollision = 0 ;
395+ int countGoodNonPVtracks = 0 ;
396+ int countGoodPVtracks = 0 ;
397+ std::vector<int > vecTrkIdx;
398+ // Loop over tracks with selections
399+ for (const auto & track : tracks) {
400+ countTracksPerCollision++;
401+ if (!isGlobalTrackReinstatement (track))
402+ continue ;
403+ if (!track.isPVContributor ()) {
404+ countGoodNonPVtracks++;
405+ continue ;
406+ }
407+ countGoodPVtracks++;
408+ vecTrkIdx.push_back (track.index ());
409+ } // Loop over tracks with selections
410+
411+ // Apply weak condition on track PID
412+ int countPVGTel = 0 ;
413+ int countPVGTmupi = 0 ;
414+ if (countGoodPVtracks == 2 ) {
415+ for (const auto & vecMember : vecTrkIdx) {
416+ const auto & thisTrk = tracks.iteratorAt (vecMember);
417+ if (isElectronCandidate (thisTrk)) {
418+ countPVGTel++;
419+ continue ;
420+ }
421+ if (isMuPionCandidate (thisTrk)) {
422+ countPVGTmupi++;
423+ }
424+ }
425+ }
426+
427+ if (cutPreselect.preselUseTrackPID ? ((countPVGTel == 2 && countPVGTmupi == 0 ) || (countPVGTel == 1 && countPVGTmupi == 1 )) : countGoodPVtracks == cutPreselect.preselNgoodPVtracs ) {
428+ const auto & trk1 = tracks.iteratorAt (vecTrkIdx[0 ]);
429+ const auto & trk2 = tracks.iteratorAt (vecTrkIdx[1 ]);
430+
431+ float px[2 ] = {trk1.px (), trk2.px ()};
432+ float py[2 ] = {trk1.py (), trk2.py ()};
433+ float pz[2 ] = {trk1.pz (), trk2.pz ()};
434+ int sign[2 ] = {trk1.sign (), trk2.sign ()};
435+ float dcaxy[2 ] = {trk1.dcaXY (), trk2.dcaXY ()};
436+ float dcaz[2 ] = {trk1.dcaZ (), trk2.dcaZ ()};
437+ float trkTimeRes[2 ] = {trk1.trackTimeRes (), trk2.trackTimeRes ()};
438+ uint32_t itsClusterSizesTrk1 = trk1.itsClusterSizes ();
439+ uint32_t itsClusterSizesTrk2 = trk2.itsClusterSizes ();
440+ float tpcSignal[2 ] = {trk1.tpcSignal (), trk2.tpcSignal ()};
441+ float tpcEl[2 ] = {trk1.tpcNSigmaEl (), trk2.tpcNSigmaEl ()};
442+ float tpcMu[2 ] = {trk1.tpcNSigmaMu (), trk2.tpcNSigmaMu ()};
443+ float tpcPi[2 ] = {trk1.tpcNSigmaPi (), trk2.tpcNSigmaPi ()};
444+ float tpcKa[2 ] = {trk1.tpcNSigmaKa (), trk2.tpcNSigmaKa ()};
445+ float tpcPr[2 ] = {trk1.tpcNSigmaPr (), trk2.tpcNSigmaPr ()};
446+ float tpcIP[2 ] = {trk1.tpcInnerParam (), trk2.tpcInnerParam ()};
447+ float tofSignal[2 ] = {trk1.tofSignal (), trk2.tofSignal ()};
448+ float tofEl[2 ] = {trk1.tofNSigmaEl (), trk2.tofNSigmaEl ()};
449+ float tofMu[2 ] = {trk1.tofNSigmaMu (), trk2.tofNSigmaMu ()};
450+ float tofPi[2 ] = {trk1.tofNSigmaPi (), trk2.tofNSigmaPi ()};
451+ float tofKa[2 ] = {trk1.tofNSigmaKa (), trk2.tofNSigmaKa ()};
452+ float tofPr[2 ] = {trk1.tofNSigmaPr (), trk2.tofNSigmaPr ()};
453+ float tofEP[2 ] = {trk1.tofExpMom (), trk2.tofExpMom ()};
454+ float infoZDC[4 ] = {-999 ., -999 ., -999 ., -999 .};
455+ if constexpr (requires { collision.udZdcsReduced (); }) {
456+ infoZDC[0 ] = collision.energyCommonZNA ();
457+ infoZDC[1 ] = collision.energyCommonZNC ();
458+ infoZDC[2 ] = collision.timeZNA ();
459+ infoZDC[3 ] = collision.timeZNC ();
460+ }
461+
462+ tauTwoTracks (collision.runNumber (), collision.globalBC (), countTracksPerCollision, collision.numContrib (), countGoodNonPVtracks, collision.posX (), collision.posY (), collision.posZ (),
463+ collision.flags (), collision.occupancyInTime (), collision.hadronicRate (), collision.trs (), collision.trofs (), collision.hmpr (),
464+ collision.tfb (), collision.itsROFb (), collision.sbp (), collision.zVtxFT0vPV (), collision.vtxITSTPC (),
465+ collision.totalFT0AmplitudeA (), collision.totalFT0AmplitudeC (), collision.totalFV0AmplitudeA (), infoZDC[0 ], infoZDC[1 ],
466+ collision.timeFT0A (), collision.timeFT0C (), collision.timeFV0A (), infoZDC[2 ], infoZDC[3 ],
467+ px, py, pz, sign, dcaxy, dcaz, trkTimeRes,
468+ itsClusterSizesTrk1, itsClusterSizesTrk2,
469+ tpcSignal, tpcEl, tpcMu, tpcPi, tpcKa, tpcPr, tpcIP,
470+ tofSignal, tofEl, tofMu, tofPi, tofKa, tofPr, tofEP);
471+ }
472472
473473 } // end processDataSG
474474
0 commit comments