3131#include " Framework/runDataProcessing.h"
3232
3333// O2Physics headers
34- #include " PWGUD/Core/SGSelector.h"
35- #include " PWGUD/Core/UPCTauCentralBarrelHelperRL.h"
36- #include " PWGUD/DataModel/TauEventTables.h"
37- #include " PWGUD/DataModel/UDTables.h"
38-
3934#include " Common/CCDB/EventSelectionParams.h"
4035#include " Common/Core/TrackSelection.h"
4136#include " Common/Core/TrackSelectionDefaults.h"
4237#include " Common/Core/trackUtilities.h"
4338#include " Common/DataModel/EventSelection.h"
4439#include " Common/DataModel/PIDResponse.h"
4540#include " Common/DataModel/TrackSelectionTables.h"
41+ #include " PWGUD/Core/SGSelector.h"
42+ #include " PWGUD/Core/UPCTauCentralBarrelHelperRL.h"
43+ #include " PWGUD/DataModel/TwoTracksEventTables.h"
44+ #include " PWGUD/DataModel/UDTables.h"
4645
4746// ROOT
4847#include " Math/Vector4D.h"
@@ -54,7 +53,7 @@ using namespace o2::framework;
5453using namespace o2 ::framework::expressions;
5554using namespace o2 ::constants::physics;
5655
57- struct TauEventTableProducer {
56+ struct TwoTracksEventTableProducer {
5857 Produces<o2::aod::TwoTracks> twoTracks;
5958 Produces<o2::aod::TrueTwoTracks> trueTwoTracks;
6059
@@ -482,7 +481,7 @@ struct TauEventTableProducer {
482481 tpcSignal, tpcEl, tpcMu, tpcPi, tpcKa, tpcPr, tpcIP,
483482 tofSignal, tofEl, tofMu, tofPi, tofKa, tofPr, tofEP);
484483 }
485- PROCESS_SWITCH (TauEventTableProducer , processDataSG, " Iterate UD tables with measured data created by SG-Candidate-Producer." , false );
484+ PROCESS_SWITCH (TwoTracksEventTableProducer , processDataSG, " Iterate UD tables with measured data created by SG-Candidate-Producer." , false );
486485
487486 PresliceUnsorted<aod::UDMcParticles> partPerMcCollision = aod::udmcparticle::udMcCollisionId;
488487 PresliceUnsorted<FullMCSGUDCollisions> colPerMcCollision = aod::udcollision::udMcCollisionId;
@@ -535,9 +534,9 @@ struct TauEventTableProducer {
535534
536535 int trueChannel = -1 ;
537536 bool trueHasRecoColl = false ;
538- float trueTauX [2 ] = {-999 ., -999 .};
539- float trueTauY [2 ] = {-999 ., -999 .};
540- float trueTauZ [2 ] = {-999 ., -999 .};
537+ float trueMotherX [2 ] = {-999 ., -999 .};
538+ float trueMotherY [2 ] = {-999 ., -999 .};
539+ float trueMotherZ [2 ] = {-999 ., -999 .};
541540 float trueDaugX[2 ] = {-999 ., -999 .};
542541 float trueDaugY[2 ] = {-999 ., -999 .};
543542 float trueDaugZ[2 ] = {-999 ., -999 .};
@@ -602,22 +601,22 @@ struct TauEventTableProducer {
602601 auto const & partsFromMcColl = parts.sliceBy (partPerMcCollision, mccoll.globalIndex ());
603602 int countMothers = 0 ;
604603 for (const auto & particle : partsFromMcColl) {
605- // select only tauons with checking if particle has no mother
604+ // select only mothers with checking if particle has no mother
606605 if (particle.has_mothers ())
607606 continue ;
608607 countMothers++;
609- // check the generated collision does not have more than 2 tauons
608+ // check the generated collision does not have more than 2 mothers
610609 if (countMothers > 2 ) {
611610 if (verboseInfo)
612611 printLargeMessage (" Truth collision has more than 2 no mother particles. Breaking the particle loop." );
613612 histos.get <TH1>(HIST (" Truth/hTroubles" ))->Fill (2 );
614613 problem = true ;
615614 break ;
616615 }
617- // fill info for each tau
618- trueTauX [countMothers - 1 ] = particle.px ();
619- trueTauY [countMothers - 1 ] = particle.py ();
620- trueTauZ [countMothers - 1 ] = particle.pz ();
616+ // fill info for each mother
617+ trueMotherX [countMothers - 1 ] = particle.px ();
618+ trueMotherY [countMothers - 1 ] = particle.py ();
619+ trueMotherZ [countMothers - 1 ] = particle.pz ();
621620
622621 // get daughters of the tau
623622 const auto & daughters = particle.daughters_as <aod::UDMcParticles>();
@@ -690,7 +689,7 @@ struct TauEventTableProducer {
690689 if (particle.has_mothers ())
691690 continue ;
692691 countMothers++;
693- // check the generated collision does not have more than 2 tauons
692+ // check the generated collision does not have more than 2 mothers
694693 if (countMothers > 2 ) {
695694 if (verboseInfo)
696695 printLargeMessage (" Truth collision has more than 2 no mother particles. Breaking the particle loop." );
@@ -699,9 +698,9 @@ struct TauEventTableProducer {
699698 break ;
700699 }
701700 // fill info for each tau
702- trueTauX [countMothers - 1 ] = particle.px ();
703- trueTauY [countMothers - 1 ] = particle.py ();
704- trueTauZ [countMothers - 1 ] = particle.pz ();
701+ trueMotherX [countMothers - 1 ] = particle.px ();
702+ trueMotherY [countMothers - 1 ] = particle.py ();
703+ trueMotherZ [countMothers - 1 ] = particle.pz ();
705704
706705 // get daughters of the tau
707706 const auto & daughters = particle.daughters_as <aod::UDMcParticles>();
@@ -746,16 +745,15 @@ struct TauEventTableProducer {
746745 tpcSignal, tpcEl, tpcMu, tpcPi, tpcKa, tpcPr, tpcIP,
747746 tofSignal, tofEl, tofMu, tofPi, tofKa, tofPr, tofEP,
748747 trueChannel, trueHasRecoColl, mccoll.posX (), mccoll.posY (), mccoll.posZ (),
749- trueTauX, trueTauY, trueTauZ , trueDaugX, trueDaugY, trueDaugZ, trueDaugPdgCode, problem);
748+ trueMotherX, trueMotherY, trueMotherZ , trueDaugX, trueDaugY, trueDaugZ, trueDaugPdgCode, problem);
750749 } // mccollisions
751750 }
752- PROCESS_SWITCH (TauEventTableProducer , processMonteCarlo, " Iterate UD tables with simulated data created by SG-Candidate-Producer." , false );
751+ PROCESS_SWITCH (TwoTracksEventTableProducer , processMonteCarlo, " Iterate UD tables with simulated data created by SG-Candidate-Producer." , false );
753752};
754753
755754WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
756755{
757756 return WorkflowSpec{
758- adaptAnalysisTask<TauEventTableProducer >(cfgc)};
757+ adaptAnalysisTask<TwoTracksEventTableProducer >(cfgc)};
759758}
760759
761- #pragma clang diagnostic pop
0 commit comments