From cd27786c75fb35810f4b628cdb06572b4ca3fa57 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 25 Nov 2024 20:42:04 -0500 Subject: [PATCH] * rename Particle_t enum Unknown to UnknownParticle, to coordinate with the current release of HDDM. It is too confusing to have this constant named Unknown floating around in the global namespace. [rtj] --- src/libraries/ANALYSIS/ANALYSIS_init.cc | 10 +-- src/libraries/ANALYSIS/DAnalysisUtilities.cc | 8 +- src/libraries/ANALYSIS/DAnalysisUtilities.h | 2 +- src/libraries/ANALYSIS/DCutActions.cc | 36 ++++---- src/libraries/ANALYSIS/DCutActions.h | 22 ++--- src/libraries/ANALYSIS/DEventWriterROOT.cc | 8 +- .../ANALYSIS/DHistogramActions_Independent.cc | 4 +- .../ANALYSIS/DHistogramActions_Reaction.cc | 12 +-- .../ANALYSIS/DHistogramActions_Reaction.h | 2 +- src/libraries/ANALYSIS/DKinFitUtils_GlueX.cc | 4 +- src/libraries/ANALYSIS/DReaction.cc | 4 +- src/libraries/ANALYSIS/DReaction.h | 4 +- src/libraries/ANALYSIS/DReactionStep.cc | 14 ++-- src/libraries/ANALYSIS/DReactionStep.h | 24 +++--- .../ANALYSIS/DReactionVertexInfo_factory.cc | 4 +- .../ANALYSIS/DReaction_factory_Thrown.cc | 2 +- src/libraries/ANALYSIS/DSourceCombo.h | 16 ++-- .../ANALYSIS/DSourceComboP4Handler.cc | 34 ++++---- .../ANALYSIS/DSourceComboTimeHandler.cc | 20 ++--- .../ANALYSIS/DSourceComboVertexer.cc | 6 +- src/libraries/ANALYSIS/DSourceComboer.cc | 82 +++++++++---------- src/libraries/HDDM/DEventSourceHDDM.cc | 12 +-- src/libraries/HDGEOMETRY/DMaterial.cc | 2 +- src/libraries/PID/DKinematicData.h | 4 +- src/libraries/include/particleType.h | 36 ++++---- .../DReaction_factory_ReactionFilter.cc | 24 +++--- .../dirc_tree/DReaction_factory_dirc_tree.cc | 4 +- .../DReaction_factory_p2gamma_hists.cc | 6 +- .../DReaction_factory_p2pi0_hists.cc | 6 +- .../p2pi_hists/DCustomAction_p2pi_cuts.cc | 2 +- .../p2pi_hists/DCustomAction_p2pi_hists.cc | 2 +- .../DReaction_factory_track_skimmer.cc | 6 +- .../DCustomAction_CutNoDetectorHit.cc | 4 +- .../DCustomAction_TrackingEfficiency.cc | 4 +- .../DReaction_factory_trackeff_missing.cc | 6 +- .../JEventProcessor_FCAL_Hadronic_Eff.cc | 2 +- .../TOF_Eff/JEventProcessor_TOF_Eff.cc | 2 +- 37 files changed, 220 insertions(+), 220 deletions(-) diff --git a/src/libraries/ANALYSIS/ANALYSIS_init.cc b/src/libraries/ANALYSIS/ANALYSIS_init.cc index 3175ebc6c4..04ef058842 100644 --- a/src/libraries/ANALYSIS/ANALYSIS_init.cc +++ b/src/libraries/ANALYSIS/ANALYSIS_init.cc @@ -58,7 +58,7 @@ jerror_t ANALYSIS_init(JEventLoop *loop) DHistogramAction_TrackVertexComparison(NULL); DHistogramAction_ParticleComboKinematics(NULL, false); DHistogramAction_TruePID(NULL); - DHistogramAction_InvariantMass(NULL, Unknown, false, 0, 0.0, 0.0); + DHistogramAction_InvariantMass(NULL, UnknownParticle, false, 0, 0.0, 0.0); DHistogramAction_MissingMass(NULL, false, 0, 0.0, 0.0); DHistogramAction_MissingMassSquared(NULL, false, 0, 0.0, 0.0); DHistogramAction_KinFitResults(NULL, 0.0); @@ -69,19 +69,19 @@ jerror_t ANALYSIS_init(JEventLoop *loop) DCutAction_MinTrackHits(NULL, 0); DCutAction_ThrownTopology(NULL, true); - DCutAction_PIDFOM(NULL, Unknown, Unknown, 0.0); + DCutAction_PIDFOM(NULL, UnknownParticle, UnknownParticle, 0.0); DCutAction_AllTracksHaveDetectorMatch(NULL); DCutAction_CombinedPIDFOM(NULL, 0.0); DCutAction_EachPIDFOM(NULL, 0.0); DCutAction_CombinedTrackingFOM(NULL, 0.0); DCutAction_MissingMass(NULL, false, 0.0, 0.0); DCutAction_MissingMassSquared(NULL, false, 0.0, 0.0); - DCutAction_InvariantMass(NULL, Unknown, false, 0.0, 0.0); + DCutAction_InvariantMass(NULL, UnknownParticle, false, 0.0, 0.0); DCutAction_AllVertexZ(NULL, 0.0, 0.0); DCutAction_ProductionVertexZ(NULL, 0.0, 0.0); - DCutAction_MaxTrackDOCA(NULL, Unknown, 0.0); + DCutAction_MaxTrackDOCA(NULL, UnknownParticle, 0.0); DCutAction_KinFitFOM(NULL, 0.0); - DCutAction_TruePID(NULL, Unknown, Unknown, 0.0); + DCutAction_TruePID(NULL, UnknownParticle, UnknownParticle, 0.0); DCutAction_AllTruePID(NULL, 0.0); DCutAction_GoodEventRFBunch(NULL, false); DCutAction_TransverseMomentum(NULL, 0.0); diff --git a/src/libraries/ANALYSIS/DAnalysisUtilities.cc b/src/libraries/ANALYSIS/DAnalysisUtilities.cc index a85db422c5..51ca445dc3 100644 --- a/src/libraries/ANALYSIS/DAnalysisUtilities.cc +++ b/src/libraries/ANALYSIS/DAnalysisUtilities.cc @@ -674,7 +674,7 @@ void DAnalysisUtilities::Get_ThrownParticleSteps(JEventLoop* locEventLoop, deque if(IsResonance(locMCThrowns[loc_i]->PID())) continue; //don't include resonances in DReaction!! - if(locMCThrowns[loc_i]->PID() == Unknown) + if(locMCThrowns[loc_i]->PID() == UnknownParticle) continue; //could be some weird pythia "resonance" like a diquark: just ignore them all //initial checks of parent id @@ -690,7 +690,7 @@ void DAnalysisUtilities::Get_ThrownParticleSteps(JEventLoop* locEventLoop, deque //initial checks of parent pid Particle_t locParentPID = locIDMap[locParentID]->PID(); bool locDoneFlag = false; - while(((locParentPID == Unknown) || IsResonance(locParentPID)) && (!locDoneFlag)) + while(((locParentPID == UnknownParticle) || IsResonance(locParentPID)) && (!locDoneFlag)) { //intermediate particle, continue towards the source locParentID = locIDMap[locParentID]->parentid; //parent's parent @@ -831,7 +831,7 @@ DLorentzVector DAnalysisUtilities::Calc_MissingP4(const DReaction* locReaction, //target particle Particle_t locPID = locReactionStep->Get_TargetPID(); - if(locPID != Unknown) + if(locPID != UnknownParticle) { double locMass = ParticleMass(locPID); locMissingP4 += DLorentzVector(DVector3(0.0, 0.0, 0.0), locMass); @@ -949,7 +949,7 @@ DLorentzVector DAnalysisUtilities::Calc_FinalStateP4(const DReaction* locReactio if(locStepIndex != 0) { Particle_t locPID = locReactionStep->Get_TargetPID(); - if(locPID != Unknown) + if(locPID != UnknownParticle) locFinalStateP4 -= DLorentzVector(DVector3(0.0, 0.0, 0.0), ParticleMass(locPID)); } diff --git a/src/libraries/ANALYSIS/DAnalysisUtilities.h b/src/libraries/ANALYSIS/DAnalysisUtilities.h index 9daeadd7c1..5077f47125 100644 --- a/src/libraries/ANALYSIS/DAnalysisUtilities.h +++ b/src/libraries/ANALYSIS/DAnalysisUtilities.h @@ -75,7 +75,7 @@ class DAnalysisUtilities : public JObject void Get_UnusedTOFPoints(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo, vector& locUnusedTOFPoints) const; void Get_ThrownParticleSteps(JEventLoop* locEventLoop, deque > >& locThrownSteps) const; - bool Are_ThrownPIDsSameAsDesired(JEventLoop* locEventLoop, const deque& locDesiredPIDs, Particle_t locMissingPID = Unknown) const; + bool Are_ThrownPIDsSameAsDesired(JEventLoop* locEventLoop, const deque& locDesiredPIDs, Particle_t locMissingPID = UnknownParticle) const; double Calc_DOCAVertex(const DVector3 &locUnitDir1, const DVector3 &locUnitDir2, const DVector3 &locVertex1, const DVector3 &locVertex2, DVector3& locDOCAPoint) const; double Calc_DOCA(const DVector3 &locUnitDir1, const DVector3 &locUnitDir2, const DVector3 &locVertex1, const DVector3 &locVertex2) const; diff --git a/src/libraries/ANALYSIS/DCutActions.cc b/src/libraries/ANALYSIS/DCutActions.cc index 3cc0b71744..6c51c363e8 100644 --- a/src/libraries/ANALYSIS/DCutActions.cc +++ b/src/libraries/ANALYSIS/DCutActions.cc @@ -93,12 +93,12 @@ bool DCutAction_PIDFOM::Perform_Action(JEventLoop* locEventLoop, const DParticle auto locSteps = locParticleCombo->Get_ParticleComboSteps(); for(size_t loc_i = 0; loc_i < locSteps.size(); ++loc_i) { - if((dStepPID != Unknown) && (Get_Reaction()->Get_ReactionStep(loc_i)->Get_InitialPID() != dStepPID)) + if((dStepPID != UnknownParticle) && (Get_Reaction()->Get_ReactionStep(loc_i)->Get_InitialPID() != dStepPID)) continue; auto locParticles = locSteps[loc_i]->Get_FinalParticles_Measured(Get_Reaction()->Get_ReactionStep(loc_i), d_AllCharges); for(size_t loc_j = 0; loc_j < locParticles.size(); ++loc_j) { - if((locParticles[loc_j]->PID() != dParticleID) && (dParticleID != Unknown)) + if((locParticles[loc_j]->PID() != dParticleID) && (dParticleID != UnknownParticle)) continue; if(ParticleCharge(dParticleID) == 0) { @@ -304,7 +304,7 @@ bool DCutAction_InvariantMass::Perform_Action(JEventLoop* locEventLoop, const DP for(size_t loc_i = 0; loc_i < locParticleCombo->Get_NumParticleComboSteps(); ++loc_i) { const DReactionStep* locReactionStep = Get_Reaction()->Get_ReactionStep(loc_i); - if((dInitialPID != Unknown) && (locReactionStep->Get_InitialPID() != dInitialPID)) + if((dInitialPID != UnknownParticle) && (locReactionStep->Get_InitialPID() != dInitialPID)) continue; if((dStepIndex != -1) && (int(loc_i) != dStepIndex)) continue; @@ -388,7 +388,7 @@ bool DCutAction_MaxTrackDOCA::Perform_Action(JEventLoop* locEventLoop, const DPa auto locSteps = locParticleCombo->Get_ParticleComboSteps(); for(size_t loc_i = 0; loc_i < locSteps.size(); ++loc_i) { - if((dInitialPID != Unknown) && (Get_Reaction()->Get_ReactionStep(loc_i)->Get_InitialPID() != dInitialPID)) + if((dInitialPID != UnknownParticle) && (Get_Reaction()->Get_ReactionStep(loc_i)->Get_InitialPID() != dInitialPID)) continue; auto locParticles = locSteps[loc_i]->Get_FinalParticles_Measured(Get_Reaction()->Get_ReactionStep(loc_i), d_Charged); for(size_t loc_j = 0; loc_j < locParticles.size(); ++loc_j) @@ -540,7 +540,7 @@ bool DCutAction_BDTSignalCombo::Perform_Action(JEventLoop* locEventLoop, const D const DMCThrown* locMCThrownParent = locMCThrownMyIDMap[locParentID]; Particle_t locPID = locMCThrownParent->PID(); - if((locPID == Unknown) || IsResonance(locPID) || (locPID == omega) || (locPID == phiMeson)) + if((locPID == UnknownParticle) || IsResonance(locPID) || (locPID == omega) || (locPID == phiMeson)) { //intermediate (unknown, resonance, phi, or omega) particle: go to its parent locParentID = locMCThrownParent->parentid; @@ -676,7 +676,7 @@ bool DCutAction_TrueCombo::Perform_Action(JEventLoop* locEventLoop, const DParti const DMCThrown* locMCThrownParent = locMCThrownMyIDMap[locParentID]; Particle_t locPID = locMCThrownParent->PID(); - if((locPID == Unknown) || IsResonance(locPID)) + if((locPID == UnknownParticle) || IsResonance(locPID)) { //intermediate (unknown or resonance) particle: go to its parent locParentID = locMCThrownParent->parentid; @@ -741,12 +741,12 @@ bool DCutAction_TruePID::Perform_Action(JEventLoop* locEventLoop, const DParticl auto locSteps = locParticleCombo->Get_ParticleComboSteps(); for(size_t loc_i = 0; loc_i < locSteps.size(); ++loc_i) { - if((dInitialPID != Unknown) && (Get_Reaction()->Get_ReactionStep(loc_i)->Get_InitialPID() != dInitialPID)) + if((dInitialPID != UnknownParticle) && (Get_Reaction()->Get_ReactionStep(loc_i)->Get_InitialPID() != dInitialPID)) continue; auto locParticles = locSteps[loc_i]->Get_FinalParticles_Measured(Get_Reaction()->Get_ReactionStep(loc_i), d_AllCharges); for(size_t loc_j = 0; loc_j < locParticles.size(); ++loc_j) { - if((locParticles[loc_j]->PID() != dTruePID) && (dTruePID != Unknown)) + if((locParticles[loc_j]->PID() != dTruePID) && (dTruePID != UnknownParticle)) continue; for(size_t loc_i = 0; loc_i < locParticles.size(); ++loc_i) @@ -1120,13 +1120,13 @@ string DCutAction_PIDDeltaT::Get_ActionName(void) const bool DCutAction_PIDDeltaT::Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo) { - //if dPID = Unknown, apply cut to all PIDs + //if dPID = UnknownParticle, apply cut to all PIDs //if dSystem = SYS_NULL, apply cut to all systems auto locParticles = Get_UseKinFitResultsFlag() ? locParticleCombo->Get_FinalParticles(Get_Reaction(), false, false, d_AllCharges) : locParticleCombo->Get_FinalParticles_Measured(Get_Reaction(), d_AllCharges); for(size_t loc_i = 0; loc_i < locParticles.size(); ++loc_i) { - if((dPID != Unknown) && (locParticles[loc_i]->PID() != dPID)) + if((dPID != UnknownParticle) && (locParticles[loc_i]->PID() != dPID)) continue; auto locChargedHypo = dynamic_cast(locParticles[loc_i]); @@ -1164,13 +1164,13 @@ string DCutAction_PIDTimingBeta::Get_ActionName(void) const bool DCutAction_PIDTimingBeta::Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo) { - //if dPID = Unknown, apply cut to all PIDs + //if dPID = UnknownParticle, apply cut to all PIDs //if dSystem = SYS_NULL, apply cut to all systems auto locParticles = locParticleCombo->Get_FinalParticles_Measured(Get_Reaction(), d_AllCharges); for(size_t loc_i = 0; loc_i < locParticles.size(); ++loc_i) { - if((dPID != Unknown) && (locParticles[loc_i]->PID() != dPID)) + if((dPID != UnknownParticle) && (locParticles[loc_i]->PID() != dPID)) continue; auto locChargedHypo = dynamic_cast(locParticles[loc_i]); @@ -1207,12 +1207,12 @@ string DCutAction_NoPIDHit::Get_ActionName(void) const bool DCutAction_NoPIDHit::Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo) { - //if dPID = Unknown, apply cut to all PIDs + //if dPID = UnknownParticle, apply cut to all PIDs auto locParticles = locParticleCombo->Get_FinalParticles_Measured(Get_Reaction(), d_Charged); for(size_t loc_i = 0; loc_i < locParticles.size(); ++loc_i) { - if((dPID != Unknown) && (locParticles[loc_i]->PID() != dPID)) + if((dPID != UnknownParticle) && (locParticles[loc_i]->PID() != dPID)) continue; auto locChargedHypo = static_cast(locParticles[loc_i]); if(locChargedHypo->t1_detector() == SYS_NULL) @@ -1231,7 +1231,7 @@ string DCutAction_FlightDistance::Get_ActionName(void) const bool DCutAction_FlightDistance::Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo) { - //if dPID = Unknown, apply cut to all PIDs + //if dPID = UnknownParticle, apply cut to all PIDs // unused variable DKinFitType locKinFitType = Get_Reaction()->Get_KinFitType(); // for now, require a kinematic fit to make these selections, assuming that the common decay vertex @@ -1258,7 +1258,7 @@ bool DCutAction_FlightDistance::Perform_Action(JEventLoop* locEventLoop, const D const DParticleComboStep* locParticleComboStep = locParticleCombo->Get_ParticleComboStep(loc_i); //auto locParticles = Get_UseKinFitResultsFlag() ? locParticleComboStep->Get_FinalParticles(Get_Reaction()->Get_ReactionStep(loc_i), false, false, d_AllCharges) : locParticleComboStep->Get_FinalParticles_Measured(Get_Reaction()->Get_ReactionStep(loc_i), d_AllCharges); - if((dPID != Unknown) && (locParticleComboStep->Get_InitialParticle()->PID() != dPID)) + if((dPID != UnknownParticle) && (locParticleComboStep->Get_InitialParticle()->PID() != dPID)) continue; // fill info on decaying particles, which is on the particle combo step level @@ -1298,7 +1298,7 @@ string DCutAction_FlightSignificance::Get_ActionName(void) const bool DCutAction_FlightSignificance::Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo) { - //if dPID = Unknown, apply cut to all PIDs + //if dPID = UnknownParticle, apply cut to all PIDs // unused variable DKinFitType locKinFitType = Get_Reaction()->Get_KinFitType(); // for now, require a kinematic fit to make these selections, assuming that the common decay vertex @@ -1325,7 +1325,7 @@ bool DCutAction_FlightSignificance::Perform_Action(JEventLoop* locEventLoop, con const DParticleComboStep* locParticleComboStep = locParticleCombo->Get_ParticleComboStep(loc_i); //auto locParticles = Get_UseKinFitResultsFlag() ? locParticleComboStep->Get_FinalParticles(Get_Reaction()->Get_ReactionStep(loc_i), false, false, d_AllCharges) : locParticleComboStep->Get_FinalParticles_Measured(Get_Reaction()->Get_ReactionStep(loc_i), d_AllCharges); - if((dPID != Unknown) && (locParticleComboStep->Get_InitialParticle()->PID() != dPID)) + if((dPID != UnknownParticle) && (locParticleComboStep->Get_InitialParticle()->PID() != dPID)) continue; // fill info on decaying particles, which is on the particle combo step level diff --git a/src/libraries/ANALYSIS/DCutActions.h b/src/libraries/ANALYSIS/DCutActions.h index 81b37b19e2..29d946f736 100644 --- a/src/libraries/ANALYSIS/DCutActions.h +++ b/src/libraries/ANALYSIS/DCutActions.h @@ -481,7 +481,7 @@ class DCutAction_InvariantMass : public DAnalysisAction //call with step = 0, PIDs = pi+, pi-, and will histogram rho mass DCutAction_InvariantMass(const DReaction* locReaction, size_t locStepIndex, deque locToIncludePIDs, bool locUseKinFitResultsFlag, double locMinMass, double locMaxMass, string locActionUniqueString = "") : DAnalysisAction(locReaction, "Cut_InvariantMass", locUseKinFitResultsFlag, locActionUniqueString), - dInitialPID(Unknown), dStepIndex(locStepIndex), dToIncludePIDs(locToIncludePIDs), dMinMass(locMinMass), dMaxMass(locMaxMass){} + dInitialPID(UnknownParticle), dStepIndex(locStepIndex), dToIncludePIDs(locToIncludePIDs), dMinMass(locMinMass), dMaxMass(locMaxMass){} string Get_ActionName(void) const; void Initialize(JEventLoop* locEventLoop); @@ -650,12 +650,12 @@ class DCutAction_TrackShowerEOverP : public DAnalysisAction class DCutAction_PIDDeltaT : public DAnalysisAction { - //if dPID = Unknown, apply cut to all PIDs + //if dPID = UnknownParticle, apply cut to all PIDs //if dSystem = SYS_NULL, apply cut to all systems public: - DCutAction_PIDDeltaT(const DReaction* locReaction, bool locUseKinFitResultsFlag, double locDeltaTCut, Particle_t locPID = Unknown, DetectorSystem_t locSystem = SYS_NULL, string locActionUniqueString = "") : + DCutAction_PIDDeltaT(const DReaction* locReaction, bool locUseKinFitResultsFlag, double locDeltaTCut, Particle_t locPID = UnknownParticle, DetectorSystem_t locSystem = SYS_NULL, string locActionUniqueString = "") : DAnalysisAction(locReaction, "Cut_PIDDeltaT", locUseKinFitResultsFlag, locActionUniqueString), dDeltaTCut(locDeltaTCut), dPID(locPID), dSystem(locSystem){} @@ -674,13 +674,13 @@ class DCutAction_PIDDeltaT : public DAnalysisAction class DCutAction_PIDTimingBeta : public DAnalysisAction { - //if dPID = Unknown, apply cut to all PIDs + //if dPID = UnknownParticle, apply cut to all PIDs //if dSystem = SYS_NULL, apply cut to all systems //RECOMMENDED ONLY FOR CUTTING ON NEUTRALS (e.g. separating photons and neutrons) public: - DCutAction_PIDTimingBeta(const DReaction* locReaction, double locMinBeta, double locMaxBeta, Particle_t locPID = Unknown, DetectorSystem_t locSystem = SYS_NULL, string locActionUniqueString = "") : + DCutAction_PIDTimingBeta(const DReaction* locReaction, double locMinBeta, double locMaxBeta, Particle_t locPID = UnknownParticle, DetectorSystem_t locSystem = SYS_NULL, string locActionUniqueString = "") : DAnalysisAction(locReaction, "Cut_PIDTimingBeta", false, locActionUniqueString), dMinBeta(locMinBeta), dMaxBeta(locMaxBeta), dPID(locPID), dSystem(locSystem){} @@ -700,11 +700,11 @@ class DCutAction_PIDTimingBeta : public DAnalysisAction class DCutAction_NoPIDHit : public DAnalysisAction { - //if dPID = Unknown, apply cut to all PIDs + //if dPID = UnknownParticle, apply cut to all PIDs public: - DCutAction_NoPIDHit(const DReaction* locReaction, Particle_t locPID = Unknown, string locActionUniqueString = "") : + DCutAction_NoPIDHit(const DReaction* locReaction, Particle_t locPID = UnknownParticle, string locActionUniqueString = "") : DAnalysisAction(locReaction, "Cut_NoPIDHit", false, locActionUniqueString), dPID(locPID){} @@ -752,11 +752,11 @@ class DCutAction_OneVertexKinFit : public DAnalysisAction class DCutAction_FlightDistance : public DAnalysisAction { - //if dPID = Unknown, apply cut to all relevant PIDs + //if dPID = UnknownParticle, apply cut to all relevant PIDs public: - DCutAction_FlightDistance(const DReaction* locReaction, bool locUseKinFitResultsFlag, double locMinFlightDistance, Particle_t locPID = Unknown, string locActionUniqueString = "") : + DCutAction_FlightDistance(const DReaction* locReaction, bool locUseKinFitResultsFlag, double locMinFlightDistance, Particle_t locPID = UnknownParticle, string locActionUniqueString = "") : DAnalysisAction(locReaction, "Cut_FlightDistance", locUseKinFitResultsFlag, locActionUniqueString), dMinFlightDistance(locMinFlightDistance), dPID(locPID) {} @@ -775,11 +775,11 @@ class DCutAction_FlightDistance : public DAnalysisAction class DCutAction_FlightSignificance : public DAnalysisAction { - //if dPID = Unknown, apply cut to all relevant PIDs + //if dPID = UnknownParticle, apply cut to all relevant PIDs public: - DCutAction_FlightSignificance(const DReaction* locReaction, bool locUseKinFitResultsFlag, double locMinFlightSignificance, Particle_t locPID = Unknown, string locActionUniqueString = "") : + DCutAction_FlightSignificance(const DReaction* locReaction, bool locUseKinFitResultsFlag, double locMinFlightSignificance, Particle_t locPID = UnknownParticle, string locActionUniqueString = "") : DAnalysisAction(locReaction, "Cut_FlightSignificance", locUseKinFitResultsFlag, locActionUniqueString), dMinFlightSignificance(locMinFlightSignificance), dPID(locPID) {} diff --git a/src/libraries/ANALYSIS/DEventWriterROOT.cc b/src/libraries/ANALYSIS/DEventWriterROOT.cc index c1118a06aa..5838edf221 100644 --- a/src/libraries/ANALYSIS/DEventWriterROOT.cc +++ b/src/libraries/ANALYSIS/DEventWriterROOT.cc @@ -316,7 +316,7 @@ TMap* DEventWriterROOT::Create_UserInfoMaps(DTreeBranchRegister& locBranchRegist auto locFinalParticleIDs = locReactionStep->Get_FinalPIDs(); auto locTargetPID = locReactionStep->Get_TargetPID(); - if(locTargetPID != Unknown) + if(locTargetPID != UnknownParticle) { if(locTargetParticleNumberMap.find(locTargetPID) == locTargetParticleNumberMap.end()) locTargetParticleNumberMap[locTargetPID] = 1; @@ -351,7 +351,7 @@ TMap* DEventWriterROOT::Create_UserInfoMaps(DTreeBranchRegister& locBranchRegist //Create map objects map locParticleNumberMap_Current, locDecayingParticleNumberMap_Current, locTargetParticleNumberMap_Current; - Particle_t locTargetPID = Unknown; + Particle_t locTargetPID = UnknownParticle; TObjString *locObjString_PID, *locObjString_Position, *locObjString_ParticleName; map locDecayingParticleNames; //key is step index where they decay for(size_t loc_i = 0; loc_i < locReaction->Get_NumReactionSteps(); ++loc_i) @@ -395,7 +395,7 @@ TMap* DEventWriterROOT::Create_UserInfoMaps(DTreeBranchRegister& locBranchRegist //target particle Particle_t locTempTargetPID = locReactionStep->Get_TargetPID(); - if(locTempTargetPID != Unknown) + if(locTempTargetPID != UnknownParticle) { locTargetPID = locTempTargetPID; @@ -861,7 +861,7 @@ void DEventWriterROOT::Create_Branches_Combo(DTreeBranchRegister& locBranchRegis //initial particle Particle_t locInitialPID = locReactionStep->Get_InitialPID(); //should check to make sure the beam particle isn't missing... - if((loc_i == 0) && (locReactionStep->Get_InitialPID() != Unknown)) + if((loc_i == 0) && (locReactionStep->Get_InitialPID() != UnknownParticle)) Create_Branches_BeamComboParticle(locBranchRegister, locInitialPID, locKinFitType); else //decaying { diff --git a/src/libraries/ANALYSIS/DHistogramActions_Independent.cc b/src/libraries/ANALYSIS/DHistogramActions_Independent.cc index 10217a8361..7317711120 100644 --- a/src/libraries/ANALYSIS/DHistogramActions_Independent.cc +++ b/src/libraries/ANALYSIS/DHistogramActions_Independent.cc @@ -3047,7 +3047,7 @@ bool DHistogramAction_DetectedParticleKinematics::Perform_Action(JEventLoop* loc double locBeta_Timing = locChargedTrackHypothesis->measuredBeta(); double locDeltaBeta = locBeta_Timing - locChargedTrackHypothesis->lorentzMomentum().Beta(); - Particle_t locPID = (locChargedTrackHypothesis->Get_FOM() < dMinPIDFOM) ? Unknown : locChargedTrackHypothesis->PID(); + Particle_t locPID = (locChargedTrackHypothesis->Get_FOM() < dMinPIDFOM) ? UnknownParticle : locChargedTrackHypothesis->PID(); if(dHistMap_P.find(locPID) == dHistMap_P.end()) continue; //not interested in histogramming @@ -3327,7 +3327,7 @@ bool DHistogramAction_TrackShowerErrors::Perform_Action(JEventLoop* locEventLoop { const DChargedTrackHypothesis* locChargedTrackHypothesis = locPreSelectChargedTracks[loc_i]->Get_BestFOM(); - Particle_t locPID = (locChargedTrackHypothesis->Get_FOM() < dMinPIDFOM) ? Unknown : locChargedTrackHypothesis->PID(); + Particle_t locPID = (locChargedTrackHypothesis->Get_FOM() < dMinPIDFOM) ? UnknownParticle : locChargedTrackHypothesis->PID(); if(dHistMap_TrackPxErrorVsP.find(locPID) == dHistMap_TrackPxErrorVsP.end()) continue; //not interested in histogramming diff --git a/src/libraries/ANALYSIS/DHistogramActions_Reaction.cc b/src/libraries/ANALYSIS/DHistogramActions_Reaction.cc index 395ca9f6b4..9226a113ed 100644 --- a/src/libraries/ANALYSIS/DHistogramActions_Reaction.cc +++ b/src/libraries/ANALYSIS/DHistogramActions_Reaction.cc @@ -380,7 +380,7 @@ void DHistogramAction_PID::Initialize(JEventLoop* locEventLoop) for(size_t loc_j = 0; loc_j < dThrownPIDs.size(); ++loc_j) { locPID2 = dThrownPIDs[loc_j]; - if((ParticleCharge(locPID2) != ParticleCharge(locPID)) && (locPID2 != Unknown)) + if((ParticleCharge(locPID2) != ParticleCharge(locPID)) && (locPID2 != UnknownParticle)) continue; locParticleName2 = ParticleType(locPID2); locParticleROOTName2 = ParticleName_ROOT(locPID2); @@ -711,7 +711,7 @@ void DHistogramAction_PID::Fill_ChargedHists(const DChargedTrackHypothesis* locC dHistMap_dEdXFOMVsP[locPID][SYS_FDC]->Fill(locP, locdEdXFOM); } - pair locPIDPair(locPID, Unknown); //default unless matched + pair locPIDPair(locPID, UnknownParticle); //default unless matched if(locMCThrown != NULL) //else bogus track (not matched to any thrown tracks) locPIDPair.second = (Particle_t)(locMCThrown->type); //matched if(dHistMap_PIDFOMForTruePID.find(locPIDPair) != dHistMap_PIDFOMForTruePID.end()) //else hist not created or PID is weird @@ -761,7 +761,7 @@ void DHistogramAction_PID::Fill_NeutralHists(const DNeutralParticleHypothesis* l dHistMap_TimePullVsP[locPID][locSystem]->Fill(locP, locTimePull); dHistMap_TimeFOMVsP[locPID][locSystem]->Fill(locP, locNeutralParticleHypothesis->Get_FOM()); - pair locPIDPair(locPID, Unknown); //default unless matched + pair locPIDPair(locPID, UnknownParticle); //default unless matched if(locMCThrown != NULL) //else bogus track (not matched to any thrown tracks) locPIDPair.second = (Particle_t)(locMCThrown->type); //matched if(dHistMap_PIDFOMForTruePID.find(locPIDPair) != dHistMap_PIDFOMForTruePID.end()) //else hist not created or PID is weird @@ -1120,7 +1120,7 @@ void DHistogramAction_ParticleComboKinematics::Initialize(JEventLoop* locEventLo locPIDs.insert(locPIDs.begin(), locInitialPID); Particle_t locMissingPID = locReactionStep->Get_MissingPID(); - if(locMissingPID != Unknown) + if(locMissingPID != UnknownParticle) { locPIDs.push_back(locMissingPID); locLastPIDMissingFlag = true; @@ -1451,7 +1451,7 @@ void DHistogramAction_InvariantMass::Initialize(JEventLoop* locEventLoop) Run_Update(locEventLoop); string locParticleNamesForHist = ""; - if(dInitialPID != Unknown) + if(dInitialPID != UnknownParticle) { auto locChainPIDs = DAnalysis::Get_ChainPIDs(Get_Reaction(), dInitialPID, !Get_UseKinFitResultsFlag(), true); locParticleNamesForHist = DAnalysis::Convert_PIDsToROOTName(locChainPIDs); @@ -1514,7 +1514,7 @@ bool DHistogramAction_InvariantMass::Perform_Action(JEventLoop* locEventLoop, co for(size_t loc_i = 0; loc_i < locParticleCombo->Get_NumParticleComboSteps(); ++loc_i) { const DReactionStep* locReactionStep = Get_Reaction()->Get_ReactionStep(loc_i); - if((dInitialPID != Unknown) && (locReactionStep->Get_InitialPID() != dInitialPID)) + if((dInitialPID != UnknownParticle) && (locReactionStep->Get_InitialPID() != dInitialPID)) continue; if((dStepIndex != -1) && (int(loc_i) != dStepIndex)) continue; diff --git a/src/libraries/ANALYSIS/DHistogramActions_Reaction.h b/src/libraries/ANALYSIS/DHistogramActions_Reaction.h index 7551c4469e..51d4831230 100644 --- a/src/libraries/ANALYSIS/DHistogramActions_Reaction.h +++ b/src/libraries/ANALYSIS/DHistogramActions_Reaction.h @@ -301,7 +301,7 @@ class DHistogramAction_InvariantMass : public DAnalysisAction //call with step = 0, PIDs = pi+, pi-, and will histogram rho mass DHistogramAction_InvariantMass(const DReaction* locReaction, size_t locStepIndex, deque locToIncludePIDs, bool locUseKinFitResultsFlag, unsigned int locNumMassBins, double locMinMass, double locMaxMass, string locActionUniqueString = "", bool locSubtractAccidentals = false) : DAnalysisAction(locReaction, "Hist_InvariantMass", locUseKinFitResultsFlag, locActionUniqueString), - dInitialPID(Unknown), dStepIndex(locStepIndex), dToIncludePIDs(locToIncludePIDs), + dInitialPID(UnknownParticle), dStepIndex(locStepIndex), dToIncludePIDs(locToIncludePIDs), dNumMassBins(locNumMassBins), dMinMass(locMinMass), dMaxMass(locMaxMass), dNum2DMassBins(locNumMassBins/2), dNum2DBeamEBins(600), dMinBeamE(0.0), dMaxBeamE(12.0), dSubtractAccidentals(locSubtractAccidentals) {} void Initialize(JEventLoop* locEventLoop); diff --git a/src/libraries/ANALYSIS/DKinFitUtils_GlueX.cc b/src/libraries/ANALYSIS/DKinFitUtils_GlueX.cc index 6e61ada3a1..fb2c4e2cf7 100644 --- a/src/libraries/ANALYSIS/DKinFitUtils_GlueX.cc +++ b/src/libraries/ANALYSIS/DKinFitUtils_GlueX.cc @@ -422,7 +422,7 @@ shared_ptr DKinFitUtils_GlueX::Make_KinFitChainStep(const DRea //target particle Particle_t locTargetPID = locReactionStep->Get_TargetPID(); - if(locTargetPID != Unknown) + if(locTargetPID != UnknownParticle) { size_t locTargetInstance = 0; for(size_t loc_i = 0; loc_i < locStepIndex; ++loc_i) @@ -720,7 +720,7 @@ string DKinFitUtils_GlueX::Get_ConstraintInfo(const DReactionVertexInfo* locReac set locP4ConstrainedParticleSteps; //check if initial & final states if have non-zero cov errors: - if((locP4StepIndex == 0) && (locReactionStep->Get_TargetPID() != Unknown) && dWillBeamHaveErrorsFlag) + if((locP4StepIndex == 0) && (locReactionStep->Get_TargetPID() != UnknownParticle) && dWillBeamHaveErrorsFlag) locNonZeroErrorFlag = true; //beam: we're good else if((locP4StepIndex != 0) && (locMassConstraintStrings.find(locP4StepIndex) == locMassConstraintStrings.end())) locNonZeroErrorFlag = true; //decaying particle, but mass not constrained: we're good (unless it's e.g. an omega. ugh.) diff --git a/src/libraries/ANALYSIS/DReaction.cc b/src/libraries/ANALYSIS/DReaction.cc index 1da799c3e4..d49431e1ad 100644 --- a/src/libraries/ANALYSIS/DReaction.cc +++ b/src/libraries/ANALYSIS/DReaction.cc @@ -223,14 +223,14 @@ vector Get_DefinedParticleStepIndex(const DReaction* locReaction) auto locReactionStep = locReaction->Get_ReactionStep(loc_i); //check for open-ended-decaying particle - if((loc_i == 0) && (locReactionStep->Get_TargetPID() == Unknown)) + if((loc_i == 0) && (locReactionStep->Get_TargetPID() == UnknownParticle)) { locDefinedParticleStepIndices.push_back(loc_i); continue; } //check for missing particle - if(locReactionStep->Get_IsInclusiveFlag() || (locReactionStep->Get_MissingPID() != Unknown)) + if(locReactionStep->Get_IsInclusiveFlag() || (locReactionStep->Get_MissingPID() != UnknownParticle)) { locDefinedParticleStepIndices.push_back(loc_i); continue; diff --git a/src/libraries/ANALYSIS/DReaction.h b/src/libraries/ANALYSIS/DReaction.h index 6a6284cb1b..49f5a527ff 100644 --- a/src/libraries/ANALYSIS/DReaction.h +++ b/src/libraries/ANALYSIS/DReaction.h @@ -180,7 +180,7 @@ inline bool Get_IsFirstStepBeam(const DReaction* locReaction) { //impossible for first step to be rescattering: makes no sense: if has target, treat as beam. else treat as decaying & don't care about production mechanism auto locFirstStep = locReaction->Get_ReactionStep(0); - return ((locFirstStep->Get_TargetPID() != Unknown) || (locFirstStep->Get_SecondBeamPID() != Unknown)); + return ((locFirstStep->Get_TargetPID() != UnknownParticle) || (locFirstStep->Get_SecondBeamPID() != UnknownParticle)); } inline bool Check_ChannelEquality(const DReaction* lhs, const DReaction* rhs, bool locSameOrderFlag = true, bool locRightSubsetOfLeftFlag = false) @@ -243,7 +243,7 @@ inline vector> Get_MissingDecayProductIndices(const DReaction* lo auto locReactionStep = locReaction->Get_ReactionStep(locStepIndex); if(locReactionStep->Get_IsInclusiveFlag()) locMissingDecayProductIndices.emplace_back(locStepIndex, DReactionStep::Get_ParticleIndex_Inclusive()); - if(locReactionStep->Get_MissingPID() != Unknown) + if(locReactionStep->Get_MissingPID() != UnknownParticle) locMissingDecayProductIndices.emplace_back(locStepIndex, locReactionStep->Get_MissingParticleIndex()); for(size_t loc_i = 0; loc_i < locReactionStep->Get_NumFinalPIDs(); ++loc_i) diff --git a/src/libraries/ANALYSIS/DReactionStep.cc b/src/libraries/ANALYSIS/DReactionStep.cc index d0ed1ab0cc..a6409da1c4 100644 --- a/src/libraries/ANALYSIS/DReactionStep.cc +++ b/src/libraries/ANALYSIS/DReactionStep.cc @@ -7,13 +7,13 @@ namespace DAnalysis int DReactionStep::Prepare_InfoArguments(vector& locFinalPIDs, Particle_t locMissingFinalPID, bool locInclusiveFlag, bool locBeamMissingFlag, bool locSecondBeamMissingFlag) const { - if((locInclusiveFlag || locBeamMissingFlag) && (locMissingFinalPID != Unknown)) + if((locInclusiveFlag || locBeamMissingFlag) && (locMissingFinalPID != UnknownParticle)) { cout << "ERROR: CANNOT HAVE MISSING PID + MISSING BEAM OR INCLUSIVE. ABORTING." << endl; abort(); } - if(locMissingFinalPID != Unknown) + if(locMissingFinalPID != UnknownParticle) { locFinalPIDs.push_back(locMissingFinalPID); return locFinalPIDs.size() - 1; @@ -34,7 +34,7 @@ void DReactionStep::Add_FinalParticleID(Particle_t locPID, bool locIsMissingFlag if(!locIsMissingFlag) { - if(locPID == Unknown) + if(locPID == UnknownParticle) { cout << "ERROR: CANNOT SET UNKNOWN PID AS NON-MISSING FINAL PARTICLE. ABORTING." << endl; abort(); @@ -51,7 +51,7 @@ void DReactionStep::Add_FinalParticleID(Particle_t locPID, bool locIsMissingFlag } //if unknown, instead set as inclusive - if(locPID == Unknown) + if(locPID == UnknownParticle) dReactionStepInfo->dMissingParticleIndex = DReactionStep::Get_ParticleIndex_Inclusive(); else { @@ -87,8 +87,8 @@ string Get_InitialParticlesName(const DReactionStep* locStep, bool locTLatexFlag Particle_t locSecondBeamPID = locStep->Get_SecondBeamPID(); Particle_t locTargetPID = locStep->Get_TargetPID(); - Particle_t locSecondPID = (locTargetPID != Unknown) ? locTargetPID : locSecondBeamPID; - if(locSecondPID != Unknown) + Particle_t locSecondPID = (locTargetPID != UnknownParticle) ? locTargetPID : locSecondBeamPID; + if(locSecondPID != UnknownParticle) { if(!locTLatexFlag) locStepName += "_"; @@ -117,7 +117,7 @@ vector Get_FinalParticleNames(const DReactionStep* locStep, bool locIncl } Particle_t locMissingPID = locStep->Get_MissingPID(); - if(locMissingPID != Unknown) + if(locMissingPID != UnknownParticle) locParticleNames.push_back(string("(") + locGetNameFunc(locMissingPID) + string(")")); return locParticleNames; diff --git a/src/libraries/ANALYSIS/DReactionStep.h b/src/libraries/ANALYSIS/DReactionStep.h index ef674f77e7..7bcb1761e7 100644 --- a/src/libraries/ANALYSIS/DReactionStep.h +++ b/src/libraries/ANALYSIS/DReactionStep.h @@ -55,13 +55,13 @@ class DReactionStep //CONSTRUCTORS //if fixed-target production or rescattering: - DReactionStep(Particle_t locScatteringPID, Particle_t locTargetPID, vector locNonMissingFinalPIDs, Particle_t locMissingFinalPID = Unknown, + DReactionStep(Particle_t locScatteringPID, Particle_t locTargetPID, vector locNonMissingFinalPIDs, Particle_t locMissingFinalPID = UnknownParticle, bool locInclusiveFlag = false, bool locBeamMissingFlag = false); //if 2 beams: collider experiment - DReactionStep(pair locBeamPIDs, vector locNonMissingFinalPIDs, Particle_t locMissingFinalPID = Unknown, + DReactionStep(pair locBeamPIDs, vector locNonMissingFinalPIDs, Particle_t locMissingFinalPID = UnknownParticle, bool locInclusiveFlag = false, bool locFirstBeamMissingFlag = false, bool locSecondBeamMissingFlag = false); //decaying particle - DReactionStep(Particle_t locDecayingPID, vector locNonMissingFinalPIDs, Particle_t locMissingFinalPID = Unknown, bool locInclusiveFlag = false); + DReactionStep(Particle_t locDecayingPID, vector locNonMissingFinalPIDs, Particle_t locMissingFinalPID = UnknownParticle, bool locInclusiveFlag = false); // default DReactionStep(void); //DEPRECATED @@ -118,9 +118,9 @@ class DReactionStep bool operator<(const DReactionStepInfo& locInfo) const; //ignores dKinFitConstrainInitMassFlag!!! //not ideal, but in a hurry: for DParticleComboCreator::dComboStepMap // PID MEMBERS: - Particle_t dInitialPID = Unknown; //e.g. lambda, gamma - Particle_t dSecondBeamPID = Unknown; //second beam, Unknown if not present - Particle_t dTargetPID = Unknown; //unknown if none + Particle_t dInitialPID = UnknownParticle; //e.g. lambda, gamma + Particle_t dSecondBeamPID = UnknownParticle; //second beam, UnknownParticle if not present + Particle_t dTargetPID = UnknownParticle; //unknown if none vector dFinalPIDs; //if inclusive, there is no indication of it here! // CONTROL MEMBERS: @@ -149,7 +149,7 @@ inline DReactionStep::DReactionStep(Particle_t locScatteringPID, Particle_t locT { //Prepare arguments int locMissingParticleIndex = Prepare_InfoArguments(locNonMissingFinalPIDs, locMissingFinalPID, locInclusiveFlag, locBeamMissingFlag, false); - dReactionStepInfo = std::make_shared(locScatteringPID, Unknown, locTargetPID, locNonMissingFinalPIDs, locMissingParticleIndex); + dReactionStepInfo = std::make_shared(locScatteringPID, UnknownParticle, locTargetPID, locNonMissingFinalPIDs, locMissingParticleIndex); } //if 2 beams: collider experiment @@ -158,7 +158,7 @@ inline DReactionStep::DReactionStep(pair locBeamPIDs, ve { //Prepare arguments int locMissingParticleIndex = Prepare_InfoArguments(locNonMissingFinalPIDs, locMissingFinalPID, locInclusiveFlag, locFirstBeamMissingFlag, locSecondBeamMissingFlag); - dReactionStepInfo = std::make_shared(locBeamPIDs.first, locBeamPIDs.second, Unknown, locNonMissingFinalPIDs, locMissingParticleIndex); + dReactionStepInfo = std::make_shared(locBeamPIDs.first, locBeamPIDs.second, UnknownParticle, locNonMissingFinalPIDs, locMissingParticleIndex); } //decaying particle @@ -166,7 +166,7 @@ inline DReactionStep::DReactionStep(Particle_t locDecayingPID, vector(locDecayingPID, Unknown, Unknown, locNonMissingFinalPIDs, locMissingParticleIndex); + dReactionStepInfo = std::make_shared(locDecayingPID, UnknownParticle, UnknownParticle, locNonMissingFinalPIDs, locMissingParticleIndex); } // default @@ -239,7 +239,7 @@ inline void DReactionStep::Set_InitialParticleID(Particle_t locPID, bool locIsMi inline Particle_t DReactionStep::Get_MissingPID(void) const { - return (dReactionStepInfo->dMissingParticleIndex < 0) ? Unknown : dReactionStepInfo->dFinalPIDs[dReactionStepInfo->dMissingParticleIndex]; + return (dReactionStepInfo->dMissingParticleIndex < 0) ? UnknownParticle : dReactionStepInfo->dFinalPIDs[dReactionStepInfo->dMissingParticleIndex]; } inline Particle_t DReactionStep::Get_PID(int locParticlceIndex) const @@ -252,7 +252,7 @@ inline Particle_t DReactionStep::Get_PID(int locParticlceIndex) const case Get_ParticleIndex_Initial(): return dReactionStepInfo->dInitialPID; case Get_ParticleIndex_SecondBeam(): return dReactionStepInfo->dSecondBeamPID; case Get_ParticleIndex_Target(): return dReactionStepInfo->dTargetPID; - default: return Unknown; + default: return UnknownParticle; } } @@ -322,7 +322,7 @@ inline bool Check_ChannelEquality(const DReactionStep* lhs, const DReactionStep* auto locMissingIndex_rhs = rhs->Get_MissingParticleIndex(); //if it's not, then ... one must be inclusive, the other none - if((lhs->Get_MissingPID() == Unknown) && (locMissingIndex_lhs != locMissingIndex_rhs)) + if((lhs->Get_MissingPID() == UnknownParticle) && (locMissingIndex_lhs != locMissingIndex_rhs)) { if(!locRightSubsetOfLeftFlag) return false; diff --git a/src/libraries/ANALYSIS/DReactionVertexInfo_factory.cc b/src/libraries/ANALYSIS/DReactionVertexInfo_factory.cc index a5b3527a5e..ddb51c100d 100644 --- a/src/libraries/ANALYSIS/DReactionVertexInfo_factory.cc +++ b/src/libraries/ANALYSIS/DReactionVertexInfo_factory.cc @@ -153,7 +153,7 @@ void DReactionVertexInfo_factory::Group_VertexParticles(DReactionStepVertexInfo* } //beam 2 - if(locStep->Get_SecondBeamPID() != Unknown) + if(locStep->Get_SecondBeamPID() != UnknownParticle) { if(locStep->Get_IsBeamMissingFlag()) { @@ -174,7 +174,7 @@ void DReactionVertexInfo_factory::Group_VertexParticles(DReactionStepVertexInfo* locDecayingParticles.emplace_back(locStepIndex, DReactionStep::Get_ParticleIndex_Initial()); //target - if(locStep->Get_TargetPID() != Unknown) //target + if(locStep->Get_TargetPID() != UnknownParticle) //target { locNoConstrainParticles_Fit.emplace_back(locStepIndex, DReactionStep::Get_ParticleIndex_Target()); locNoConstrainParticles_Recon.emplace_back(locStepIndex, DReactionStep::Get_ParticleIndex_Target()); diff --git a/src/libraries/ANALYSIS/DReaction_factory_Thrown.cc b/src/libraries/ANALYSIS/DReaction_factory_Thrown.cc index abd8a489ac..2712f00a13 100644 --- a/src/libraries/ANALYSIS/DReaction_factory_Thrown.cc +++ b/src/libraries/ANALYSIS/DReaction_factory_Thrown.cc @@ -83,7 +83,7 @@ DReaction* DReaction_factory_Thrown::Build_ThrownReaction(JEventLoop* locEventLo { locReactionStep = Get_ReactionStepResource(); locReactionStep->Set_InitialParticleID(locThrownSteps[loc_i].first->PID()); - locReactionStep->Set_TargetParticleID(Unknown); //default (disabled) + locReactionStep->Set_TargetParticleID(UnknownParticle); //default (disabled) } for(size_t loc_j = 0; loc_j < locThrownSteps[loc_i].second.size(); ++loc_j) locReactionStep->Add_FinalParticleID(locThrownSteps[loc_i].second[loc_j]->PID()); diff --git a/src/libraries/ANALYSIS/DSourceCombo.h b/src/libraries/ANALYSIS/DSourceCombo.h index e3fd94bfa5..cbd524baa2 100644 --- a/src/libraries/ANALYSIS/DSourceCombo.h +++ b/src/libraries/ANALYSIS/DSourceCombo.h @@ -27,15 +27,15 @@ namespace DAnalysis class DSourceComboInfo; class DSourceCombo; -//DSourceComboUse is what the combo is USED for (the decay of Particle_t (if Unknown then is just a grouping) +//DSourceComboUse is what the combo is USED for (the decay of Particle_t (if UnknownParticle then is just a grouping) //signed char: vertex-z bin of the final state (combo contents) -//bool: true/false if has/doesn't-have missing decay product (is always false if decay pid == Unknown) -//last pid: Rescattering Target PID (target excluded for 1st step) //is always Unknown if decay pid == Unknown) -using DSourceComboUse = tuple; //e.g. Pi0, zbin, -> 2g, false, Unknown +//bool: true/false if has/doesn't-have missing decay product (is always false if decay pid == UnknownParticle) +//last pid: Rescattering Target PID (target excluded for 1st step) //is always UnknownParticle if decay pid == UnknownParticle) +using DSourceComboUse = tuple; //e.g. Pi0, zbin, -> 2g, false, UnknownParticle using DSourceCombosByUse_Small = vector>>; //DECLARE NAMESPACE-SCOPE FUNCTIONS -vector Get_SourceParticles(const vector>& locSourceParticles, Particle_t locPID = Unknown); +vector Get_SourceParticles(const vector>& locSourceParticles, Particle_t locPID = UnknownParticle); vector> Get_SourceParticles_ThisVertex(const DSourceCombo* locSourceCombo, Charge_t locCharge = d_AllCharges); vector Get_SourceCombos_ThisVertex(const DSourceCombo* locSourceCombo); vector>> Get_SourceCombosAndUses_ThisVertex(const DSourceCombo* locSourceCombo); @@ -207,7 +207,7 @@ struct DSourceComboChecker_ReusedParticle //returns true if a particle WAS reused bool operator()(const DSourceCombo* locCombo) const { - auto locParticles = DAnalysis::Get_SourceParticles(locCombo->Get_SourceParticles(true), Unknown); //all pids + auto locParticles = DAnalysis::Get_SourceParticles(locCombo->Get_SourceParticles(true), UnknownParticle); //all pids std::sort(locParticles.begin(), locParticles.end()); auto locUniqueIterator = std::unique(locParticles.begin(), locParticles.end()); return (locUniqueIterator != locParticles.end()); @@ -372,7 +372,7 @@ inline vector Get_SourceParticles(const vector locOutputParticles; for(const auto& locParticlePair : locSourceParticles) { - if((locPID == Unknown) || (locParticlePair.first == locPID)) + if((locPID == UnknownParticle) || (locParticlePair.first == locPID)) locOutputParticles.push_back(locParticlePair.second); } return locOutputParticles; @@ -543,7 +543,7 @@ inline const JObject* Get_SourceParticle_ThisStep(const DSourceCombo* locSourceC for(const auto& locDecayPair : locSourceCombo->Get_FurtherDecayCombos()) { - if(std::get<0>(locDecayPair.first) != Unknown) + if(std::get<0>(locDecayPair.first) != UnknownParticle) continue; //a new step! for(const auto& locDecayCombo : locDecayPair.second) { diff --git a/src/libraries/ANALYSIS/DSourceComboP4Handler.cc b/src/libraries/ANALYSIS/DSourceComboP4Handler.cc index 54b30e21e9..73b0952b4d 100644 --- a/src/libraries/ANALYSIS/DSourceComboP4Handler.cc +++ b/src/libraries/ANALYSIS/DSourceComboP4Handler.cc @@ -169,11 +169,11 @@ void DSourceComboP4Handler::Define_DefaultCuts(void) //DEFAULT MISSING MASS SQUARED CUT VALUES //vs p //pair of vectors: params for low bound, high bound - //Unknown: None missing - dMissingMassSquaredCuts_TF1Params[Unknown] = std::make_pair(vector{-0.1}, vector{0.1}); + //UnknownParticle: None missing + dMissingMassSquaredCuts_TF1Params[UnknownParticle] = std::make_pair(vector{-0.1}, vector{0.1}); //Photon - dMissingMassSquaredCuts_TF1Params.emplace(Gamma, dMissingMassSquaredCuts_TF1Params[Unknown]); + dMissingMassSquaredCuts_TF1Params.emplace(Gamma, dMissingMassSquaredCuts_TF1Params[UnknownParticle]); //e+/- dMissingMassSquaredCuts_TF1Params[Electron] = std::make_pair(vector{-1.0}, vector{1.0}); @@ -617,11 +617,11 @@ DSourceComboP4Handler::DSourceComboP4Handler(DSourceComboer* locSourceComboer, b { auto locPID = locPIDPair.first; auto& locMassPair = locPIDPair.second; - string locHistName = string("MissingMassVsBeamEnergy_") + ((locPID != Unknown) ? ParticleType(locPID) : "None"); + string locHistName = string("MissingMassVsBeamEnergy_") + ((locPID != UnknownParticle) ? ParticleType(locPID) : "None"); auto locHist = gDirectory->Get(locHistName.c_str()); if(locHist == nullptr) { - string locHistTitle = string("From All Production Mechanisms;Beam Energy (GeV);") + string((locPID != Unknown) ? ParticleName_ROOT(locPID) : "None") + string(" Missing Mass Squared (GeV/c^{2})^{2}"); + string locHistTitle = string("From All Production Mechanisms;Beam Energy (GeV);") + string((locPID != UnknownParticle) ? ParticleName_ROOT(locPID) : "None") + string(" Missing Mass Squared (GeV/c^{2})^{2}"); auto locMinMass = locMassPair.first->Eval(12.0) - 0.2; //assume widest at highest energy auto locMaxMass = locMassPair.second->Eval(12.0) + 0.2; auto locNumBins = 1000.0*(locMaxMass - locMinMass); @@ -769,7 +769,7 @@ DLorentzVector DSourceComboP4Handler::Calc_P4_NoMassiveNeutrals(const DSourceCom //Subtract target p4 if necessary (e.g. Lambda, p -> p, p, pi-) auto locTargetPIDToSubtract = std::get<4>(locCombosByUsePair.first); - if(locTargetPIDToSubtract != Unknown) + if(locTargetPIDToSubtract != UnknownParticle) locTotalP4 -= DLorentzVector(TVector3(), ParticleMass(locTargetPIDToSubtract)); } @@ -935,7 +935,7 @@ bool DSourceComboP4Handler::Calc_P4_HasMassiveNeutrals(bool locIsProductionVerte //Subtract target p4 if necessary (e.g. Lambda, p -> p, p, pi-) auto locTargetPIDToSubtract = std::get<4>(locCombosByUsePair.first); - if(locTargetPIDToSubtract != Unknown) + if(locTargetPIDToSubtract != UnknownParticle) locTotalP4 -= DLorentzVector(TVector3(), ParticleMass(locTargetPIDToSubtract)); } @@ -975,10 +975,10 @@ bool DSourceComboP4Handler::Cut_InvariantMass_NoMassiveNeutrals(const DSourceCom if(!locVertexCombo->Get_IsComboingZIndependent() && (locVertexZBin == DSourceComboInfo::Get_VertexZIndex_Unknown()) && !locAccuratePhotonsFlag) return true; //don't cut yet: will cut later when vertex known or accurate photons - auto locFinalStateP4 = Calc_P4_NoMassiveNeutrals(nullptr, locVertexCombo, locVertex, locVertexZBin, nullptr, DSourceComboUse(Unknown, 0, nullptr, false, Unknown), 1, locAccuratePhotonsFlag); + auto locFinalStateP4 = Calc_P4_NoMassiveNeutrals(nullptr, locVertexCombo, locVertex, locVertexZBin, nullptr, DSourceComboUse(UnknownParticle, 0, nullptr, false, UnknownParticle), 1, locAccuratePhotonsFlag); //Subtract target p4 if necessary (e.g. Lambda, p -> p, p, pi-) - if(locTargetPIDToSubtract != Unknown) + if(locTargetPIDToSubtract != UnknownParticle) locFinalStateP4 -= DLorentzVector(TVector3(), ParticleMass(locTargetPIDToSubtract)); auto locInvariantMass = locFinalStateP4.M(); @@ -1020,11 +1020,11 @@ bool DSourceComboP4Handler::Cut_InvariantMass_HasMassiveNeutral(bool locIsProduc auto locRFVertexTime = dSourceComboTimeHandler->Calc_PropagatedRFTime(locPrimaryVertexZ, locRFBunch, locTimeOffset); DLorentzVector locTotalP4(0.0, 0.0, 0.0, 0.0); - if(!Calc_P4_HasMassiveNeutrals(locIsProductionVertex, locIsPrimaryProductionVertex, locReactionFullCombo, locVertexCombo, locVertex, locTimeOffset, locRFBunch, locRFVertexTime, DSourceComboUse(Unknown, 0, nullptr, false, Unknown), 1, locTotalP4, locBeamParticle, locAccuratePhotonsFlag)) + if(!Calc_P4_HasMassiveNeutrals(locIsProductionVertex, locIsPrimaryProductionVertex, locReactionFullCombo, locVertexCombo, locVertex, locTimeOffset, locRFBunch, locRFVertexTime, DSourceComboUse(UnknownParticle, 0, nullptr, false, UnknownParticle), 1, locTotalP4, locBeamParticle, locAccuratePhotonsFlag)) return true; //can't cut it yet! //Subtract target p4 if necessary (e.g. Lambda, p -> p, p, pi-) - if(locTargetPIDToSubtract != Unknown) + if(locTargetPIDToSubtract != UnknownParticle) locTotalP4 -= DLorentzVector(TVector3(), ParticleMass(locTargetPIDToSubtract)); auto locInvariantMass = locTotalP4.M(); @@ -1102,7 +1102,7 @@ bool DSourceComboP4Handler::Cut_InvariantMass_HasMassiveNeutral_OrPhotonVertex(c { auto locDecayComboUse = locIterator->first; auto locDecayPID = std::get<0>(locDecayComboUse); - if((locDecayPID == Unknown) || std::get<3>(locDecayComboUse)) + if((locDecayPID == UnknownParticle) || std::get<3>(locDecayComboUse)) continue; //no mass cut to place! auto locDecayHasMassiveNeutrals = dSourceComboer->Get_HasMassiveNeutrals(std::get<2>(locDecayComboUse)); @@ -1162,7 +1162,7 @@ bool DSourceComboP4Handler::Cut_InvariantMass_MissingMassVertex(const DReactionV { auto locDecayComboUse = locIterator->first; auto locDecayPID = std::get<0>(locDecayComboUse); - if((locDecayPID == Unknown) || std::get<3>(locDecayComboUse)) + if((locDecayPID == UnknownParticle) || std::get<3>(locDecayComboUse)) continue; //no mass cut to place! auto locDecayHasMassiveNeutrals = dSourceComboer->Get_HasMassiveNeutrals(std::get<2>(locDecayComboUse)); @@ -1208,7 +1208,7 @@ bool DSourceComboP4Handler::Cut_MissingMassSquared(const DReaction* locReaction, if((locNumMissingParticles == 0) && (locNumInclusiveSteps == 0)) { DLorentzVector locMissingP4; - if(!Cut_MissingMassSquared(locReaction, locReactionVertexInfo, locReactionFullComboUse, locReactionFullCombo, Unknown, 0, -1, locInitialStateP4, locRFBunch, locBeamParticle, locMissingP4)) + if(!Cut_MissingMassSquared(locReaction, locReactionVertexInfo, locReactionFullComboUse, locReactionFullCombo, UnknownParticle, 0, -1, locInitialStateP4, locRFBunch, locBeamParticle, locMissingP4)) return false; } @@ -1293,7 +1293,7 @@ bool DSourceComboP4Handler::Cut_MissingMassSquared(const DReaction* locReaction, auto locVertex = dSourceComboVertexer->Get_Vertex(locStepVertexInfo, locFullCombo, locBeamParticle, false); auto locTimeOffset = dSourceComboVertexer->Get_TimeOffset(locReactionVertexInfo, locStepVertexInfo, locFullCombo, locBeamParticle); auto locRFVertexTime = dSourceComboTimeHandler->Calc_PropagatedRFTime(locPrimaryVertexZ, locRFBunch, locTimeOffset); - auto locToExcludeUsePair = (locDecayStepIndex > 0) ? dSourceComboer->Get_StepSourceComboUse(locReaction, locDecayStepIndex, locReactionFullComboUse, 0) : std::make_pair(DSourceComboUse(Unknown, 0, nullptr, false, Unknown), size_t(1)); + auto locToExcludeUsePair = (locDecayStepIndex > 0) ? dSourceComboer->Get_StepSourceComboUse(locReaction, locDecayStepIndex, locReactionFullComboUse, 0) : std::make_pair(DSourceComboUse(UnknownParticle, 0, nullptr, false, UnknownParticle), size_t(1)); //compute final-state p4 DLorentzVector locFinalStateP4(0.0, 0.0, 0.0, 0.0); @@ -1320,7 +1320,7 @@ bool DSourceComboP4Handler::Cut_MissingMassSquared(const DReaction* locReaction, //save and cut dMissingMassPairs[locMissingPID].emplace_back(locBeamEnergy, locMissingP4.M2()); auto locPassCutFlag = ((locMissingP4.M2() >= locMissingMassSquared_Min) && (locMissingP4.M2() <= locMissingMassSquared_Max)); - if(locMissingPID == Unknown) + if(locMissingPID == UnknownParticle) { dMissingEVsBeamEnergy_PreMissMassSqCut.emplace_back(locBeamEnergy, locMissingP4.E()); dMissingPtVsMissingE_PreMissMassSqCut.emplace_back(locMissingP4.E(), locMissingP4.Perp()); @@ -1371,7 +1371,7 @@ bool DSourceComboP4Handler::Cut_InvariantMass_AccuratePhotonKinematics(const DRe { auto locDecayComboUse = locIterator->first; auto locDecayPID = std::get<0>(locDecayComboUse); - if((locDecayPID == Unknown) || std::get<3>(locDecayComboUse)) + if((locDecayPID == UnknownParticle) || std::get<3>(locDecayComboUse)) continue; //no mass cut to place! auto locDecayHasMassiveNeutrals = dSourceComboer->Get_HasMassiveNeutrals(std::get<2>(locDecayComboUse)); diff --git a/src/libraries/ANALYSIS/DSourceComboTimeHandler.cc b/src/libraries/ANALYSIS/DSourceComboTimeHandler.cc index ec27e97321..57aae04318 100644 --- a/src/libraries/ANALYSIS/DSourceComboTimeHandler.cc +++ b/src/libraries/ANALYSIS/DSourceComboTimeHandler.cc @@ -175,8 +175,8 @@ void DSourceComboTimeHandler::Define_DefaultCuts(void) dPIDTimingCuts_TF1Params[Gamma][SYS_FCAL] = {2.5}; dPIDTimingCuts_TF1Params[Gamma][SYS_CCAL] = {10.0}; - //Unknown: initial RF selection for photons (at beginning of event, prior to vertex) //can be separate cut function - dPIDTimingCuts_TF1Params.emplace(Unknown, dPIDTimingCuts_TF1Params[Gamma]); + //UnknownParticle: initial RF selection for photons (at beginning of event, prior to vertex) //can be separate cut function + dPIDTimingCuts_TF1Params.emplace(UnknownParticle, dPIDTimingCuts_TF1Params[Gamma]); //Electrons dPIDTimingCuts_TF1Params[Electron][SYS_BCAL] = {1.0}; @@ -421,7 +421,7 @@ DSourceComboTimeHandler::DSourceComboTimeHandler(JEventLoop* locEventLoop, DSour vector locTimingSystems_Charged {SYS_TOF, SYS_BCAL, SYS_FCAL, SYS_START}; vector locTimingSystems_Neutral {SYS_BCAL, SYS_FCAL, SYS_CCAL}; - vector locPIDs {Unknown, Gamma, Electron, Positron, MuonPlus, MuonMinus, PiPlus, PiMinus, KPlus, KMinus, Proton, AntiProton}; + vector locPIDs {UnknownParticle, Gamma, Electron, Positron, MuonPlus, MuonMinus, PiPlus, PiMinus, KPlus, KMinus, Proton, AntiProton}; //CREATE HISTOGRAMS japp->RootWriteLock(); //to prevent undefined behavior due to directory changes, etc. @@ -449,7 +449,7 @@ DSourceComboTimeHandler::DSourceComboTimeHandler(JEventLoop* locEventLoop, DSour for(auto locPID : locPIDs) { - auto locPIDString = string((locPID != Unknown) ? ParticleType(locPID) : "Photons_PreVertex"); + auto locPIDString = string((locPID != UnknownParticle) ? ParticleType(locPID) : "Photons_PreVertex"); locDirName = locPIDString; locDirectoryFile = static_cast(gDirectory->GetDirectory(locDirName.c_str())); @@ -466,21 +466,21 @@ DSourceComboTimeHandler::DSourceComboTimeHandler(JEventLoop* locEventLoop, DSour auto locHist = gDirectory->Get(locHistName.c_str()); if(locHist == nullptr) { - auto locHistTitle = string((locPID != Unknown) ? ParticleName_ROOT(locPID) : "Photons_PreVertex"); + auto locHistTitle = string((locPID != UnknownParticle) ? ParticleName_ROOT(locPID) : "Photons_PreVertex"); locHistTitle += string(" Candidates, ") + string(SystemName(locSystem)) + string(";p (GeV/c);#Deltat_{Particle - All RFs}"); dHistMap_RFDeltaTVsP_AllRFs[locPID][locSystem] = new TH2I(locHistName.c_str(), locHistTitle.c_str(), 400, 0.0, 12.0, 1400, -7.0, 7.0); } else dHistMap_RFDeltaTVsP_AllRFs[locPID][locSystem] = static_cast(locHist); } - if(locPID == Unknown) + if(locPID == UnknownParticle) continue; auto locHistName = string("Best_RFDeltaTVsP_") + string(SystemName(locSystem)); auto locHist = gDirectory->Get(locHistName.c_str()); if(locHist == nullptr) { - auto locHistTitle = string((locPID != Unknown) ? ParticleName_ROOT(locPID) : "Photons_PreVertex"); + auto locHistTitle = string((locPID != UnknownParticle) ? ParticleName_ROOT(locPID) : "Photons_PreVertex"); locHistTitle += string(" Candidates, ") + string(SystemName(locSystem)) + string(";p (GeV/c);#Deltat_{Particle - Best RF}"); dHistMap_RFDeltaTVsP_BestRF[locPID][locSystem] = new TH2I(locHistName.c_str(), locHistTitle.c_str(), 400, 0.0, 12.0, 1400, -7.0, 7.0); } @@ -638,7 +638,7 @@ void DSourceComboTimeHandler::Calc_PhotonBeamBunchShifts(const DNeutralShower* l auto locVertexTime = locKinematicData->time(); if(dDebugLevel >= 10) cout << "eval time shifts for shower, system, zbin: " << locNeutralShower << ", " << SystemName(locSystem) << ", " << int(locZBin) << endl; - auto locRFShifts = Calc_BeamBunchShifts(locVertexTime, locRFTime, locDeltaTCut, true, Unknown, locSystem, locNeutralShower->dEnergy); + auto locRFShifts = Calc_BeamBunchShifts(locVertexTime, locRFTime, locDeltaTCut, true, UnknownParticle, locSystem, locNeutralShower->dEnergy); auto locJObject = static_cast(locNeutralShower); if(locSystem == SYS_FCAL) @@ -1074,7 +1074,7 @@ int DSourceComboTimeHandler::Select_RFBunch_Full(const DReactionVertexInfo* locR auto locIsPrimaryProductionVertex = locReactionVertexInfo->Get_StepVertexInfo(0)->Get_ProductionVertexFlag(); if(dDebugLevel >= 10) cout << "primary vertex z: " << locPrimaryVertexZ << endl; - map>>>> locRFDeltaTsForHisting; //first float is p, 2nd is delta-t //PID Unknown: photons prior to vertex selection + map>>>> locRFDeltaTsForHisting; //first float is p, 2nd is delta-t //PID UnknownParticle: photons prior to vertex selection for(const auto& locStepVertexInfo : locReactionVertexInfo->Get_StepVertexInfos()) { if(dDebugLevel >= 10) @@ -1492,7 +1492,7 @@ bool DSourceComboTimeHandler::Cut_PhotonPID(const DNeutralShower* locNeutralShow { //get delta-t cut auto locSystem = locNeutralShower->dDetectorSystem; - auto locPID = locTargetCenterFlag ? Unknown : Gamma; + auto locPID = locTargetCenterFlag ? UnknownParticle : Gamma; auto locCutFunc = Get_TimeCutFunction(locPID, locSystem); if(locCutFunc == nullptr) return true; diff --git a/src/libraries/ANALYSIS/DSourceComboVertexer.cc b/src/libraries/ANALYSIS/DSourceComboVertexer.cc index 149455534c..1f4ffd0c93 100644 --- a/src/libraries/ANALYSIS/DSourceComboVertexer.cc +++ b/src/libraries/ANALYSIS/DSourceComboVertexer.cc @@ -504,7 +504,7 @@ void DSourceComboVertexer::Construct_DecayingParticle_InvariantMass(const DReact //only create kinematic data for detached PIDs auto locDecayPID = std::get<0>(locSourceComboUse); if(!IsDetachedVertex(locDecayPID)) - continue; //either not detached (we don't care!), or is Unknown (missing decay product: can't compute) + continue; //either not detached (we don't care!), or is UnknownParticle (missing decay product: can't compute) if(dDebugLevel >= 10) cout << "detached decaying pid = " << locDecayPID << endl; @@ -519,7 +519,7 @@ void DSourceComboVertexer::Construct_DecayingParticle_InvariantMass(const DReact } //create a new one - auto locP4 = dSourceComboP4Handler->Calc_P4_NoMassiveNeutrals(nullptr, locVertexCombo, locVertex, std::get<1>(locSourceComboUse), nullptr, DSourceComboUse(Unknown, 0, nullptr, false, Unknown), 1, false); + auto locP4 = dSourceComboP4Handler->Calc_P4_NoMassiveNeutrals(nullptr, locVertexCombo, locVertex, std::get<1>(locSourceComboUse), nullptr, DSourceComboUse(UnknownParticle, 0, nullptr, false, UnknownParticle), 1, false); auto locKinematicData = dResourcePool_KinematicData.Get_Resource(); locKinematicData->Reset(); locKinematicData->Set_Members(locDecayPID, locP4.Vect(), locVertex, 0.0); @@ -735,7 +735,7 @@ void DSourceComboVertexer::Calc_TimeOffsets(const DReactionVertexInfo* locReacti //compute and save result auto locVertexZBin = Get_VertexZBin_NoBeam(false, locActiveVertexCombo, false); //2nd false: if true, then we're on the charged stage and we can't calc the time offset: wouldn't be here anyway - auto locP4 = dSourceComboP4Handler->Calc_P4_NoMassiveNeutrals(nullptr, locActiveVertexCombo, locVertex, locVertexZBin, nullptr, DSourceComboUse(Unknown, 0, nullptr, false, Unknown), 1, false); + auto locP4 = dSourceComboP4Handler->Calc_P4_NoMassiveNeutrals(nullptr, locActiveVertexCombo, locVertex, locVertexZBin, nullptr, DSourceComboUse(UnknownParticle, 0, nullptr, false, UnknownParticle), 1, false); auto locTimeOffset = locPathLength/(locP4.Beta()*SPEED_OF_LIGHT) + locParentTimeOffset; if(dDebugLevel >= 10) diff --git a/src/libraries/ANALYSIS/DSourceComboer.cc b/src/libraries/ANALYSIS/DSourceComboer.cc index b8a5d5478b..40d7a26382 100644 --- a/src/libraries/ANALYSIS/DSourceComboer.cc +++ b/src/libraries/ANALYSIS/DSourceComboer.cc @@ -928,12 +928,12 @@ void DSourceComboer::Create_SourceComboInfos(const DReactionVertexInfo* locReact locIncludeParentFlag = false; //create combo uses for each case - auto locInitPID = locIncludeParentFlag ? locStep->Get_InitialPID() : Unknown; + auto locInitPID = locIncludeParentFlag ? locStep->Get_InitialPID() : UnknownParticle; bool locNoChargedFlag = (locChargedParticleMap.empty() && locFurtherDecays_Charged.empty()); bool locNoNeutralFlag = (locNeutralParticleMap.empty() && locFurtherDecays_Neutral.empty()); //determine if we need to subtract a target particle when calculating the invariant mass (e.g. rescattering) - auto locTargetToInclude = (locStepIndex != 0) ? locStep->Get_TargetPID() : Unknown; + auto locTargetToInclude = (locStepIndex != 0) ? locStep->Get_TargetPID() : UnknownParticle; //determine if there is a missing decay product, such that we can't do invariant mass cuts bool locMissingDecayProductFlag = false; @@ -944,7 +944,7 @@ void DSourceComboer::Create_SourceComboInfos(const DReactionVertexInfo* locReact cout << "locIncludeParentFlag, init pid, missing-product flag, to-include target pid: " << locIncludeParentFlag << ", " << locInitPID << ", " << locMissingDecayProductFlag << ", " << locTargetToInclude << endl; //default to unknown use - DSourceComboUse locPrimaryComboUse(Unknown, DSourceComboInfo::Get_VertexZIndex_ZIndependent(), nullptr, false, Unknown); + DSourceComboUse locPrimaryComboUse(UnknownParticle, DSourceComboInfo::Get_VertexZIndex_ZIndependent(), nullptr, false, UnknownParticle); if(locNoChargedFlag && locNoNeutralFlag) //only mixed locPrimaryComboUse = Make_ComboUse(locInitPID, {}, locFurtherDecays_Mixed, locMissingDecayProductFlag, locTargetToInclude); else if(locNoNeutralFlag && locFurtherDecays_Mixed.empty()) //only charged @@ -963,7 +963,7 @@ void DSourceComboer::Create_SourceComboInfos(const DReactionVertexInfo* locReact locFurtherDecays_All.emplace(locFurtherDecays_Charged.begin()->first, 1); else //multiple Charged decaying particles, group together separately (own use) { - auto locComboUse_Charged = Make_ComboUse(Unknown, locChargedParticleMap, locFurtherDecays_Charged, false, Unknown); + auto locComboUse_Charged = Make_ComboUse(UnknownParticle, locChargedParticleMap, locFurtherDecays_Charged, false, UnknownParticle); locFurtherDecays_All.emplace(locComboUse_Charged, 1); } } @@ -976,7 +976,7 @@ void DSourceComboer::Create_SourceComboInfos(const DReactionVertexInfo* locReact locParticleMap_All.emplace(locNeutralParticleMap.begin()->first, locNeutralParticleMap.begin()->second); //detected else //multiple neutral particles, group together separately (own use) { - auto locComboUse_Neutral = Make_ComboUse(Unknown, locNeutralParticleMap, locFurtherDecays_Neutral, false, Unknown); + auto locComboUse_Neutral = Make_ComboUse(UnknownParticle, locNeutralParticleMap, locFurtherDecays_Neutral, false, UnknownParticle); locFurtherDecays_All.emplace(locComboUse_Neutral, 1); } } @@ -1188,7 +1188,7 @@ DSourceComboUse DSourceComboer::Build_NewZDependentUse(const DReaction* locReact { const auto& locOrigDecayUse = locDecayPair.first; auto locDecayPID = std::get<0>(locOrigDecayUse); - if(locDecayPID != Unknown) + if(locDecayPID != UnknownParticle) { //these decays are represented by other steps, and have already been saved for(unsigned char locInstance = 1; locInstance <= locDecayPair.second; ++locInstance) @@ -1992,9 +1992,9 @@ void DSourceComboer::Create_SourceCombos(const DSourceComboUse& locComboUseToCre return; //we're done! } - //we will create these combos for an "Unknown" decay (i.e. no decay, just a direct grouping) (unless already created!) + //we will create these combos for an "UnknownParticle" decay (i.e. no decay, just a direct grouping) (unless already created!) //then, when we return from this function, we can cut on the invariant mass of the system for any decay we might need it for - DSourceComboUse locUnknownComboUse(Unknown, locVertexZBin, locSourceComboInfo, false, Unknown); + DSourceComboUse locUnknownComboUse(UnknownParticle, locVertexZBin, locSourceComboInfo, false, UnknownParticle); if(locSourceCombosByUseSoFar.find(locUnknownComboUse) == locSourceCombosByUseSoFar.end()) Create_SourceCombos_Unknown(locUnknownComboUse, locComboingStage, locChargedCombo_Presiding, locNumTabs); @@ -2005,7 +2005,7 @@ void DSourceComboer::Create_SourceCombos(const DSourceComboUse& locComboUseToCre } //if all we want is a direct grouping (unknown), then the combos have already been made: return - if(locDecayPID == Unknown) + if(locDecayPID == UnknownParticle) return; //get the combos that we just created @@ -2216,7 +2216,7 @@ void DSourceComboer::Combo_Vertically_AllDecays(const DSourceComboUse& locComboU auto locNumParticlesNeeded = locComboInfo->Get_NumParticles(); auto locFurtherDecays = locComboInfo->Get_FurtherDecays(); - //for each further decay map entry (e.g. pi0, 3), this is a collection of the uses representing those groupings //e.g. Unknown -> 3pi0 + //for each further decay map entry (e.g. pi0, 3), this is a collection of the uses representing those groupings //e.g. UnknownParticle -> 3pi0 for(const auto& locFurtherDecayPair : locFurtherDecays) { auto& locSourceComboDecayUse = locFurtherDecayPair.first; //e.g. pi0, -> 2g @@ -2250,13 +2250,13 @@ void DSourceComboer::Combo_Vertically_AllDecays(const DSourceComboUse& locComboU } //OK, so we need a grouping of N > 1 decays (e.g. pi0s) - //so, let's create a use of Unknown -> N pi0s (e.g.) + //so, let's create a use of UnknownParticle -> N pi0s (e.g.) //if we can just utilize the use from the input combo-info, then we will. if not, we'll make a new one auto locNeededGroupingUse = locComboUseToCreate; if((locFurtherDecays.size() > 1) || !locNumParticlesNeeded.empty()) //if true: can't use the input { auto locGroupingComboInfo = GetOrMake_SourceComboInfo({}, {std::make_pair(locSourceComboDecayUse, locNumDecaysNeeded)}, locNumTabs); // -> N pi0s (e.g.) - locNeededGroupingUse = std::make_tuple(Unknown, locVertexZBin, locGroupingComboInfo, false, Unknown); // Unknown -> Npi0s (e.g.) + locNeededGroupingUse = std::make_tuple(UnknownParticle, locVertexZBin, locGroupingComboInfo, false, UnknownParticle); // UnknownParticle -> Npi0s (e.g.) } // Now, see whether the combos for this grouping have already been done @@ -2274,7 +2274,7 @@ void DSourceComboer::Combo_Vertically_AllDecays(const DSourceComboUse& locComboU if(locNumDecaysNeeded > 2) { auto locNMinus1Info = GetOrMake_SourceComboInfo({}, {std::make_pair(locSourceComboDecayUse, locNumDecaysNeeded - 1)}, locNumTabs); // 0 detected particles, N - 1 pi0s (e.g.) - locNMinus1ComboUse = std::make_tuple(Unknown, locVertexZBin, locNMinus1Info, false, Unknown); // Unknown -> N - 1 pi0s (e.g.) + locNMinus1ComboUse = std::make_tuple(UnknownParticle, locVertexZBin, locNMinus1Info, false, UnknownParticle); // UnknownParticle -> N - 1 pi0s (e.g.) } // Now, see whether the combos for the direct N - 1 grouping have already been done. If not, create them @@ -2492,7 +2492,7 @@ void DSourceComboer::Combo_Vertically_AllParticles(const DSourceComboUse& locCom //Get combos so far //guaranteed not to be mixed auto& locSourceCombosByUseSoFar = Get_CombosSoFar(locComboingStage, d_Neutral); //if not neutral then is on charged stage: argument doesn't matter - //for each further decay map entry (e.g. pi0, 3), this is a collection of the uses representing those groupings //e.g. Unknown -> 3pi0 + //for each further decay map entry (e.g. pi0, 3), this is a collection of the uses representing those groupings //e.g. UnknownParticle -> 3pi0 for(const auto& locParticlePair : locNumParticlesNeeded) { //get PID information @@ -2508,13 +2508,13 @@ void DSourceComboer::Combo_Vertically_AllParticles(const DSourceComboUse& locCom continue; //already done! //OK, so we need a grouping of N > 1 particles with the same PID (e.g. g's) - //so, let's create a use of Unknown -> N g's (e.g.) + //so, let's create a use of UnknownParticle -> N g's (e.g.) //if we can just utilize the use from the input combo-info, then we will. if not, we'll make a new one DSourceComboUse locNeededGroupingUse = locComboUseToCreate; if((locNumParticlesNeeded.size() > 1) || !locFurtherDecays.empty()) //if true: can't use the input { auto locGroupingComboInfo = GetOrMake_SourceComboInfo({std::make_pair(locPID, locNumPIDNeeded)}, {}, locNumTabs); // -> N g's (e.g.) - locNeededGroupingUse = std::make_tuple(Unknown, locVertexZBin, locGroupingComboInfo, false, Unknown); // Unknown -> N g's (e.g.) + locNeededGroupingUse = std::make_tuple(UnknownParticle, locVertexZBin, locGroupingComboInfo, false, UnknownParticle); // UnknownParticle -> N g's (e.g.) } //See whether the combos for this grouping have already been done @@ -2535,7 +2535,7 @@ void DSourceComboer::Combo_Vertically_AllParticles(const DSourceComboUse& locCom //build an info and a use for a direct grouping of N - 1 particles //e.g. 3 g's auto locNMinus1Info = GetOrMake_SourceComboInfo({std::make_pair(locPID, locNumPIDNeeded - 1)}, {}, locNumTabs); // N - 1 g's (e.g.), no decaying particles - DSourceComboUse locNMinus1ComboUse(Unknown, locVertexZBin, locNMinus1Info, false, Unknown); // Unknown -> N - 1 g's (e.g.) + DSourceComboUse locNMinus1ComboUse(UnknownParticle, locVertexZBin, locNMinus1Info, false, UnknownParticle); // UnknownParticle -> N - 1 g's (e.g.) // Now, see whether the combos for the direct N - 1 grouping have already been done. If not, create them if(locSourceCombosByUseSoFar.find(locNMinus1ComboUse) == locSourceCombosByUseSoFar.end()) @@ -2580,7 +2580,7 @@ void DSourceComboer::Combo_Vertically_NParticles(const DSourceComboUse& locCombo { if(locZBin == locVertexZBin) continue; - auto locZBinUse = DSourceComboUse{Unknown, locZBin, locComboInfo, false, Unknown}; + auto locZBinUse = DSourceComboUse{UnknownParticle, locZBin, locComboInfo, false, UnknownParticle}; if(locSourceCombosByUseSoFar.find(locZBinUse) == locSourceCombosByUseSoFar.end()) continue; @@ -2818,8 +2818,8 @@ void DSourceComboer::Combo_Horizontally_All(const DSourceComboUse& locComboUseTo //2pi0s, one photon: if exists, just combo with one omega //etc. - DSourceComboUse locComboUse_SubsetToBuild(Unknown, locVertexZBin, nullptr, false, Unknown); - DSourceComboUse locComboUse_SubsetToAdd(Unknown, locVertexZBin, nullptr, false, Unknown); + DSourceComboUse locComboUse_SubsetToBuild(UnknownParticle, locVertexZBin, nullptr, false, UnknownParticle); + DSourceComboUse locComboUse_SubsetToAdd(UnknownParticle, locVertexZBin, nullptr, false, UnknownParticle); auto locChargedCombo_SubsetToBuildPresiding = locChargedCombo_Presiding; //First test the case: 1 set of particles, 1 decay @@ -2864,7 +2864,7 @@ void DSourceComboer::Combo_Horizontally_All(const DSourceComboUse& locComboUseTo auto locAllBut1ComboInfo = GetOrMake_SourceComboInfo(locNumParticlesNeeded, {}, locNumTabs); auto locAllBut1ZBin = (Get_ChargeContent(locAllBut1ComboInfo) != d_Charged) ? locVertexZBin : DSourceComboInfo::Get_VertexZIndex_ZIndependent(); - DSourceComboUse locAllBut1ComboUse{Unknown, locAllBut1ZBin, locAllBut1ComboInfo, false, Unknown}; //Unknown -> particles + DSourceComboUse locAllBut1ComboUse{UnknownParticle, locAllBut1ZBin, locAllBut1ComboInfo, false, UnknownParticle}; //UnknownParticle -> particles //Get combos so far //not mixed charge: with-now is nullptr auto& locSourceCombosByUseSoFar = Get_CombosSoFar(locComboingStage, dComboInfoChargeContent[locAllBut1ComboInfo], nullptr); @@ -2874,7 +2874,7 @@ void DSourceComboer::Combo_Horizontally_All(const DSourceComboUse& locComboUseTo auto locToAddComboInfo = (locFurtherDecays[0].second == 1) ? std::get<2>(locFurtherDecays[0].first) : GetOrMake_SourceComboInfo({}, {std::make_pair(locFurtherDecays[0].first, locFurtherDecays[0].second)}, locNumTabs); auto locToAddChargeContent = dComboInfoChargeContent[locToAddComboInfo]; auto locToAddZBin = (locToAddChargeContent != d_Charged) ? locVertexZBin : DSourceComboInfo::Get_VertexZIndex_ZIndependent(); - auto locToAddComboUse = (locFurtherDecays[0].second == 1) ? locFurtherDecays[0].first : DSourceComboUse{Unknown, locToAddZBin, locToAddComboInfo, false, Unknown}; + auto locToAddComboUse = (locFurtherDecays[0].second == 1) ? locFurtherDecays[0].first : DSourceComboUse{UnknownParticle, locToAddZBin, locToAddComboInfo, false, UnknownParticle}; // Now, see whether the combos for this grouping have already been done if(locSourceCombosByUseSoFar.find(locAllBut1ComboUse) == locSourceCombosByUseSoFar.end()) //if true: not yet @@ -2893,7 +2893,7 @@ void DSourceComboer::Combo_Horizontally_All(const DSourceComboUse& locComboUseTo } else //at least 2 of one type (decays / particles) needed: { - //for each further decay map entry (e.g. pi0, 3), this is a collection of the uses representing those groupings //e.g. Unknown -> 3pi0 + //for each further decay map entry (e.g. pi0, 3), this is a collection of the uses representing those groupings //e.g. UnknownParticle -> 3pi0 //decays are sorted by: mixed-charge first, then fully-neutral, then fully-charged //within a charge: loop from heaviest-mass to least (most likely to be missing) for(auto locDecayIterator = locFurtherDecays.begin(); locDecayIterator != locFurtherDecays.end(); ++locDecayIterator) @@ -2918,22 +2918,22 @@ void DSourceComboer::Combo_Horizontally_All(const DSourceComboUse& locComboUseTo auto locToAddComboInfo = (locDecayIterator->second == 1) ? std::get<2>(locSourceComboUse_ThisDecay) : GetOrMake_SourceComboInfo({}, {std::make_pair(locSourceComboUse_ThisDecay, locDecayIterator->second)}, locNumTabs); auto locToAddChargeContent = dComboInfoChargeContent[locToAddComboInfo]; auto locToAddZBin = (locToAddChargeContent != d_Charged) ? locVertexZBin : DSourceComboInfo::Get_VertexZIndex_ZIndependent(); - auto locToAddComboUse = (locDecayIterator->second == 1) ? locSourceComboUse_ThisDecay : DSourceComboUse{Unknown, locToAddZBin, locToAddComboInfo, false, Unknown}; + auto locToAddComboUse = (locDecayIterator->second == 1) ? locSourceComboUse_ThisDecay : DSourceComboUse{UnknownParticle, locToAddZBin, locToAddComboInfo, false, UnknownParticle}; //guard against special cases for the all-but-1 combo use //must be after check on whether all-but-1 is charged (it itself is special case) - auto locAllBut1ComboUse = DSourceComboUse{Unknown, locVertexZBin, locAllBut1ComboInfo, false, Unknown}; //may change below + auto locAllBut1ComboUse = DSourceComboUse{UnknownParticle, locVertexZBin, locAllBut1ComboInfo, false, UnknownParticle}; //may change below auto locChargedCombo_PresidingToUse = locChargedCombo_Presiding; //may change below if((locFurtherDecaysToSearchFor.size() > 1) || !locNumParticlesNeeded.empty()) { locAllBut1ComboInfo = GetOrMake_SourceComboInfo(locNumParticlesNeeded, locFurtherDecaysToSearchFor, locNumTabs); auto locAllBut1ZBin = (Get_ChargeContent(locAllBut1ComboInfo) != d_Charged) ? locVertexZBin : DSourceComboInfo::Get_VertexZIndex_ZIndependent(); - locAllBut1ComboUse = DSourceComboUse{Unknown, locAllBut1ZBin, locAllBut1ComboInfo, false, Unknown}; + locAllBut1ComboUse = DSourceComboUse{UnknownParticle, locAllBut1ZBin, locAllBut1ComboInfo, false, UnknownParticle}; } else if((locFurtherDecaysToSearchFor.size() == 1) && (locFurtherDecaysToSearchFor[0].second > 1)) { locAllBut1ComboInfo = GetOrMake_SourceComboInfo({}, {std::make_pair(locSourceComboUse_ThisDecay, locDecayIterator->second)}, locNumTabs); auto locAllBut1ZBin = (Get_ChargeContent(locAllBut1ComboInfo) != d_Charged) ? locVertexZBin : DSourceComboInfo::Get_VertexZIndex_ZIndependent(); - locAllBut1ComboUse = DSourceComboUse{Unknown, locAllBut1ZBin, locAllBut1ComboInfo, false, Unknown}; + locAllBut1ComboUse = DSourceComboUse{UnknownParticle, locAllBut1ZBin, locAllBut1ComboInfo, false, UnknownParticle}; } else if(locFurtherDecaysToSearchFor.size() == 1) { @@ -3023,7 +3023,7 @@ void DSourceComboer::Combo_Horizontally_All(const DSourceComboUse& locComboUseTo continue; //this won't be done yet! auto locChargedContentAllBut1 = Get_ChargeContent(locAllBut1ComboInfo); auto locAllBut1ZBin = (locChargedContentAllBut1 != d_Charged) ? locVertexZBin : DSourceComboInfo::Get_VertexZIndex_ZIndependent(); - DSourceComboUse locAllBut1ComboUse(Unknown, locAllBut1ZBin, locAllBut1ComboInfo, false, Unknown); // Unknown -> everything but these particles + DSourceComboUse locAllBut1ComboUse(UnknownParticle, locAllBut1ZBin, locAllBut1ComboInfo, false, UnknownParticle); // UnknownParticle -> everything but these particles //Get combos so far auto locChargedCombo_PresidingToUse = locChargedCombo_Presiding; @@ -3047,7 +3047,7 @@ void DSourceComboer::Combo_Horizontally_All(const DSourceComboUse& locComboUseTo //yes, it's already been done! //just combo the All-but-1 combos to those from this particle and return the results bool locExpandAllBut1Flag = false; //changed if following conditions hold - if(std::get<0>(locAllBut1ComboUse) == Unknown) //check other conditions + if(std::get<0>(locAllBut1ComboUse) == UnknownParticle) //check other conditions locExpandAllBut1Flag = (locAllBut1ComboInfo->Get_NumParticles().size() + locAllBut1ComboInfo->Get_FurtherDecays().size()) > 1; //true: has already been comboed horizontally once Combo_Horizontally_AddParticles(locComboUseToCreate, locAllBut1ComboUse, locParticlePair, locComboingStage, locChargedCombo_Presiding, locExpandAllBut1Flag, locNumTabs); return; @@ -3081,7 +3081,7 @@ void DSourceComboer::Combo_Horizontally_All(const DSourceComboUse& locComboUseTo bool DSourceComboer::Get_ExpandAllBut1Flag(ComboingStage_t locComboingStage, const DSourceComboUse& locAllBut1ComboUse, Charge_t locToAddChargeContent) { - if(std::get<0>(locAllBut1ComboUse) != Unknown) + if(std::get<0>(locAllBut1ComboUse) != UnknownParticle) return false; auto locAllBut1ComboInfo = std::get<2>(locAllBut1ComboUse); @@ -3161,7 +3161,7 @@ void DSourceComboer::Combo_Horizontally_AddParticles(const DSourceComboUse& locC auto locSourceInfoToAdd = GetOrMake_SourceComboInfo({locParticlePairToAdd}, {}, locNumTabs); auto locChargeContentUseToAdd = Get_ChargeContent(locSourceInfoToAdd); auto locToAddZBin = (locChargeContentUseToAdd != d_Charged) ? std::get<1>(locComboUseToCreate) : DSourceComboInfo::Get_VertexZIndex_ZIndependent(); - DSourceComboUse locComboUseToAdd(Unknown, locToAddZBin, locSourceInfoToAdd, false, Unknown); + DSourceComboUse locComboUseToAdd(UnknownParticle, locToAddZBin, locSourceInfoToAdd, false, UnknownParticle); //create the combos for the use-to-add if they haven't been created yet auto locChargedCombo_NextPresiding = Get_NextChargedCombo(locChargedCombo_Presiding, locComboUseToAdd, locComboingStage, true, 1); @@ -3208,7 +3208,7 @@ void DSourceComboer::Create_Combo_OneParticle(const DSourceComboUse& locComboUse { if(locZBin == locVertexZBin) continue; - auto locZBinUse = DSourceComboUse{Unknown, locZBin, locComboInfo, false, Unknown}; + auto locZBinUse = DSourceComboUse{UnknownParticle, locZBin, locComboInfo, false, UnknownParticle}; if(locSourceCombosByUseSoFar.find(locZBinUse) == locSourceCombosByUseSoFar.end()) continue; @@ -3425,7 +3425,7 @@ void DSourceComboer::Combo_Horizontally_AddCombo(const DSourceComboUse& locCombo //determine whether we should promote the contents of the combos we are combining up to the new combo (else set combo as decay of new combo) auto locComboInfo_UseToCreate = std::get<2>(locComboUseToCreate); - DSourceComboUse locNonNeutralUse{Unknown, 0, nullptr, false, Unknown}; + DSourceComboUse locNonNeutralUse{UnknownParticle, 0, nullptr, false, UnknownParticle}; bool locPromoteToAddFlag = Get_PromoteFlag(locComboingStage, locDecayPID_UseToAdd, locComboInfo_UseToCreate, locComboInfo_UseToAdd, locNonNeutralUse); //is ignored if charged bool locPromoteAllBut1Flag = Get_PromoteFlag(locComboingStage, std::get<0>(locAllBut1ComboUse), locComboInfo_UseToCreate, locComboInfo_AllBut1, locNonNeutralUse); if(dDebugLevel >= 20) @@ -4077,7 +4077,7 @@ const DSourceCombo* DSourceComboer::Find_Combo_AtThisStep(const DSourceCombo* lo if(locDecayUse == locUseToFind) //good, do stuff return locDecayPair.second[locDecayInstanceIndex]; - if(std::get<0>(locDecayUse) != Unknown) + if(std::get<0>(locDecayUse) != UnknownParticle) continue; //is another step! //vector of combos is guaranteed to be size 1, and it's guaranteed that none of ITS further decays are unknown @@ -4143,7 +4143,7 @@ pair DSourceComboer::Get_StepSourceComboUse(const DReac return std::make_pair(locVertexPrimaryComboUse, size_t(locInstanceIndexToFind + 1)); locParticleIndices.pop_back(); } - return std::make_pair(DSourceComboUse(Unknown, 0, nullptr, 0, Unknown), size_t(1)); + return std::make_pair(DSourceComboUse(UnknownParticle, 0, nullptr, 0, UnknownParticle), size_t(1)); } DSourceComboUse DSourceComboer::Find_ZDependentUse_AtThisStep(const DSourceComboUse& locSourceComboUse, DSourceComboUse locUseToFind, size_t locDecayInstanceIndex) const @@ -4172,7 +4172,7 @@ DSourceComboUse DSourceComboer::Find_ZDependentUse_AtThisStep(const DSourceCombo if(locZIndependentDecayUse == locUseToFind) //good, do stuff return locDecayUse; - if(std::get<0>(locDecayUse) != Unknown) + if(std::get<0>(locDecayUse) != UnknownParticle) continue; //is another step! //check other uses at this step (further depth guaranteed to be only 1) @@ -4196,7 +4196,7 @@ DSourceComboUse DSourceComboer::Find_ZDependentUse_AtThisStep(const DSourceCombo } //Not found: Either invalid request, OR the input is a fully-charged combo being used for a Use that contains neutrals (created during charged-only stage): Return the input, it is already what you want - return DSourceComboUse(Unknown, 0, nullptr, 0, Unknown); + return DSourceComboUse(UnknownParticle, 0, nullptr, 0, UnknownParticle); } /* * For K0, Sigma+, p the full combos will be: @@ -4231,7 +4231,7 @@ const DSourceCombo* DSourceComboer::Get_ChargedCombo_WithNow(const DSourceCombo* return nullptr; //find the charged use what use we want - DSourceComboUse locWithNowComboUse{Unknown, 0, nullptr, false, Unknown}; + DSourceComboUse locWithNowComboUse{UnknownParticle, 0, nullptr, false, UnknownParticle}; for(const auto& locDecayComboPair : locToCreateComboInfo->Get_FurtherDecays()) { if(Get_ChargeContent(std::get<2>(locDecayComboPair.first)) != d_Charged) @@ -4330,8 +4330,8 @@ const DSourceCombo* DSourceComboer::Get_NextChargedCombo(const DSourceCombo* loc bool DSourceComboer::Get_PromoteFlag(ComboingStage_t locComboingStage, Particle_t locDecayPID_UseToCheck, const DSourceComboInfo* locComboInfo_UseToCreate, const DSourceComboInfo* locComboInfo_UseToCheck, DSourceComboUse& locNonNeutralUse) const { - locNonNeutralUse = DSourceComboUse{Unknown, 0, nullptr, false, Unknown}; - if(locDecayPID_UseToCheck != Unknown) + locNonNeutralUse = DSourceComboUse{UnknownParticle, 0, nullptr, false, UnknownParticle}; + if(locDecayPID_UseToCheck != UnknownParticle) return false; auto locFurtherDecayInfo_UseToCheck = locComboInfo_UseToCheck->Get_FurtherDecays(); @@ -4353,7 +4353,7 @@ bool DSourceComboer::Get_PromoteFlag(ComboingStage_t locComboingStage, Particle_ } if((locNumNeutralUses >= 1) && (locNumNonNeutralUses == 1)) return false; //merely a promoted charged combo - locNonNeutralUse = DSourceComboUse{Unknown, 0, nullptr, false, Unknown}; //reset in case > 1 + locNonNeutralUse = DSourceComboUse{UnknownParticle, 0, nullptr, false, UnknownParticle}; //reset in case > 1 } //we must: ungroup all-but-1 use: save the existing combo under the charged/mixed use & ditch the neutral decay uses diff --git a/src/libraries/HDDM/DEventSourceHDDM.cc b/src/libraries/HDDM/DEventSourceHDDM.cc index d5466dd916..b07b1cf9f9 100644 --- a/src/libraries/HDDM/DEventSourceHDDM.cc +++ b/src/libraries/HDDM/DEventSourceHDDM.cc @@ -1274,17 +1274,17 @@ jerror_t DEventSourceHDDM::Extract_DMCThrown(hddm_s::HDDM *record, const Particle_t pTypeFromPdgType = PDGtoPType(mcthrown->pdgtype); if (mcthrown->type != (int)pTypeFromPdgType) { // GEANT type and PDG type information are inconsistent - if ((mcthrown->type == 0) and (pTypeFromPdgType != Unknown)) { - // Workaround for cases where `type` is 0, i.e. Unknown, but the `pgdtype` is valid + if ((mcthrown->type == 0) and (pTypeFromPdgType != UnknownParticle)) { + // Workaround for cases where `type` is 0, i.e. UnknownParticle, but the `pgdtype` is valid // This may happen, for example, when EvtGen is used to decay particles // Assume that the PDG type info is correct and set the GEANT type accordingly mcthrown->type = (int)pTypeFromPdgType; - } else if ((pTypeFromPdgType == Unknown) and (PDGtype((Particle_t)mcthrown->type) != 0)) { - // Workaround for cases where the `pgdtype` is Unknown, but `type` is not Unknown + } else if ((pTypeFromPdgType == UnknownParticle) and (PDGtype((Particle_t)mcthrown->type) != 0)) { + // Workaround for cases where the `pgdtype` is UnknownParticle, but `type` is not UnknownParticle // Assume that the GEANT type info is correct and set the PDG type accordingly mcthrown->pdgtype = PDGtype((Particle_t)mcthrown->type); } else { - // Both types inconsistent but also not Unknown; not clear which is correct + // Both types inconsistent but also not UnknownParticle; not clear which is correct jerr << std::endl << "WARNING: type mismatch for MC-thrown particle with myid = " << mcthrown->myid << ": GEANT type = " << mcthrown->type @@ -2905,7 +2905,7 @@ Particle_t DEventSourceHDDM::IDTrack(float locCharge, float locMass) const if (fabs(locMass - ParticleMass(Gamma)) < locMassTolerance) return Gamma; if (fabs(locMass - ParticleMass(Neutron)) < locMassTolerance) return Neutron; } - return Unknown; + return UnknownParticle; } //------------------ diff --git a/src/libraries/HDGEOMETRY/DMaterial.cc b/src/libraries/HDGEOMETRY/DMaterial.cc index cc529f3115..2215dcaa23 100644 --- a/src/libraries/HDGEOMETRY/DMaterial.cc +++ b/src/libraries/HDGEOMETRY/DMaterial.cc @@ -21,7 +21,7 @@ DMaterial::DMaterial(string &name, double A, double Z, double density, double ra this->kdensity = density; this->kXo = radlen; - last_ptype = Unknown; + last_ptype = UnknownParticle; last_p = -1.0; last_dEdx = -1.0; } diff --git a/src/libraries/PID/DKinematicData.h b/src/libraries/PID/DKinematicData.h index b76a4e4b57..ea065f1e9d 100644 --- a/src/libraries/PID/DKinematicData.h +++ b/src/libraries/PID/DKinematicData.h @@ -101,7 +101,7 @@ class DKinematicData : public JObject, public DResettable void Release(void){}; //MEMBERS - Particle_t dPID = Unknown; + Particle_t dPID = UnknownParticle; DVector3 dMomentum; DVector3 dPosition; double dTime = 0.0; // Time of the track propagated at dPosition @@ -199,7 +199,7 @@ inline void DKinematicData::Release(void) inline void DKinematicData::DKinematicInfo::Reset(void) { - dPID = Unknown; + dPID = UnknownParticle; dMomentum = DVector3(); dPosition = DVector3(); dTime = 0.0; diff --git a/src/libraries/include/particleType.h b/src/libraries/include/particleType.h index c10cbc9033..c5fae56d6e 100644 --- a/src/libraries/include/particleType.h +++ b/src/libraries/include/particleType.h @@ -16,7 +16,7 @@ typedef enum { * http://wwwasdoc.web.cern.ch/wwwasdoc/geant/node72.html */ - Unknown = 0, + UnknownParticle = 0, Gamma = 1, Positron = 2, Electron = 3, @@ -199,7 +199,7 @@ inline static char* ParticleType(Particle_t p) p = RemapParticleID(p); switch (p) { - case Unknown: + case UnknownParticle: return (char*)"Unknown"; case Gamma: return (char*)"Photon"; @@ -460,7 +460,7 @@ inline static char* EnumString(Particle_t p) p = RemapParticleID(p); switch (p) { - case Unknown: + case UnknownParticle: return (char*)"Unknown"; case Gamma: return (char*)"Gamma"; @@ -721,7 +721,7 @@ inline static char* EvtGenString(Particle_t p) p = RemapParticleID(p); switch (p) { - case Unknown: + case UnknownParticle: return (char*)"Unknown"; case Gamma: return (char*)"gamma"; @@ -982,7 +982,7 @@ inline static char* ShortName(Particle_t locPID) locPID = RemapParticleID(locPID); switch (locPID) { - case Unknown: + case UnknownParticle: return (char*)"x"; case Gamma: return (char*)"g"; @@ -1243,7 +1243,7 @@ inline static char* ShortName(Particle_t locPID) inline static Particle_t ParticleEnum(const char* locParticleName) { if(strcmp(locParticleName, "Unknown") == 0) - return Unknown; + return UnknownParticle; else if(strcmp(locParticleName, "Photon") == 0) return Gamma; else if(strcmp(locParticleName, "Positron") == 0) @@ -1493,7 +1493,7 @@ inline static Particle_t ParticleEnum(const char* locParticleName) else if(strcmp(locParticleName, "SigmaC++") == 0) return Sigma_cPlusPlus; else - return Unknown; + return UnknownParticle; } inline static unsigned short int IsFixedMass(Particle_t p) @@ -1616,7 +1616,7 @@ inline static unsigned short int IsResonance(Particle_t p) if(IsFixedMass(p) == 1) return 0; - if(p == Unknown) + if(p == UnknownParticle) return 0; if(p == phiMeson) return 0; @@ -1664,7 +1664,7 @@ inline static char* ParticleName_ROOT(Particle_t p) p = RemapParticleID(p); switch (p) { - case Unknown: + case UnknownParticle: return (char*)"X"; case Gamma: return (char*)"#gamma"; @@ -1925,7 +1925,7 @@ inline static double ParticleMass(Particle_t p) p = RemapParticleID(p); switch (p) { - case Unknown: return HUGE_VAL; + case UnknownParticle: return HUGE_VAL; case Gamma: return 0; case Positron: return 0.000510998928; case Electron: return 0.000510998928; @@ -2062,7 +2062,7 @@ inline static int ParticleCharge(Particle_t p) p = RemapParticleID(p); switch (p) { - case Unknown: return 0; + case UnknownParticle: return 0; case Gamma: return 0; case Positron: return +1; case Electron: return -1; @@ -2200,7 +2200,7 @@ inline static int PDGtype(Particle_t p) p = RemapParticleID(p); switch (p) { - case Unknown: return 0; + case UnknownParticle: return 0; case Gamma: return 22; case Positron: return -11; case Electron: return 11; @@ -2332,7 +2332,7 @@ inline static int PDGtype(Particle_t p) inline static Particle_t PDGtoPType(int locPDG_PID) { switch (locPDG_PID) { - case 0: return Unknown; + case 0: return UnknownParticle; case 22: return Gamma; case -11: return Positron; case 11: return Electron; @@ -2456,7 +2456,7 @@ inline static Particle_t PDGtoPType(int locPDG_PID) case -413: return DstarMinus; case 4122: return Lambda_c; case 4222: return Sigma_cPlusPlus; - default: return Unknown; + default: return UnknownParticle; } } @@ -2864,7 +2864,7 @@ inline static Particle_t DemultiplexPID(int locBit, int locIsDecayingFlag) case 13: return Proton; case 14: return AntiProton; case 15: return AntiNeutron; - default: return Unknown; + default: return UnknownParticle; } } @@ -2922,7 +2922,7 @@ inline static Particle_t DemultiplexPID(int locBit, int locIsDecayingFlag) case 48: return DMinus; case 49: return DstarMinus; case 50: return Sigma_cPlusPlus; - default: return Unknown; + default: return UnknownParticle; } } @@ -2937,7 +2937,7 @@ typedef enum inline static int Is_CorrectCharge(Particle_t locPID, Charge_t locCharge) { - if(locPID == Unknown) + if(locPID == UnknownParticle) return (locCharge == d_AllCharges); int locIntCharge = ParticleCharge(locPID); switch(locCharge) @@ -2984,7 +2984,7 @@ inline static Particle_t IDTrack(float locCharge, float locMass) if (fabs(locMass - ParticleMass(Gamma)) < locMassTolerance) return Gamma; if (fabs(locMass - ParticleMass(Neutron)) < locMassTolerance) return Neutron; } - return Unknown; + return UnknownParticle; } diff --git a/src/plugins/Analysis/ReactionFilter/DReaction_factory_ReactionFilter.cc b/src/plugins/Analysis/ReactionFilter/DReaction_factory_ReactionFilter.cc index b0d0fa704d..32991c1d00 100644 --- a/src/plugins/Analysis/ReactionFilter/DReaction_factory_ReactionFilter.cc +++ b/src/plugins/Analysis/ReactionFilter/DReaction_factory_ReactionFilter.cc @@ -12,7 +12,7 @@ * To distinguish between forms 1 & 2: If first step, form 1 is assumed * * PID: Geant PID - * parentheses around any means missing, Unknown means inclusive + * parentheses around any means missing, UnknownParticle means inclusive * * CONTROL MODE EXAMPLES: * -PReaction1=1_14__14_8_9 #g, p -> p, pi+, pi- @@ -244,7 +244,7 @@ DReactionStep* DReaction_factory_ReactionFilter::Create_ReactionStep(const DReac auto locBeamMissingFlag = (std::get<4>(locStepTuple) == DReactionStep::Get_ParticleIndex_Initial()); // auto locSecondBeamMissingFlag = (std::get<4>(locStepTuple) == DReactionStep::Get_ParticleIndex_SecondBeam()); - if(std::get<1>(locStepTuple) == Unknown) //no target or 2nd beam: pure decay + if(std::get<1>(locStepTuple) == UnknownParticle) //no target or 2nd beam: pure decay return (new DReactionStep(std::get<0>(locStepTuple), std::get<2>(locStepTuple), std::get<3>(locStepTuple), locInclusiveFlag)); else //rescattering decay //2nd beam is not allowed for now (and in fact, is undistinguishable in input scheme) return (new DReactionStep(std::get<0>(locStepTuple), std::get<1>(locStepTuple), std::get<2>(locStepTuple), std::get<3>(locStepTuple), locInclusiveFlag, locBeamMissingFlag)); @@ -449,7 +449,7 @@ void DReaction_factory_ReactionFilter::Add_MassHistograms(DReaction* locReaction //if nothing missing, overall missing mass squared if((locNumMissingParticles == 0) && (locNumInclusiveSteps == 0) && (!locUseKinFitResultsFlag || !locP4Fit)) - Create_MissingMassSquaredHistogram(locReaction, Unknown, locUseKinFitResultsFlag, locBaseUniqueName, 0, {}); + Create_MissingMassSquaredHistogram(locReaction, UnknownParticle, locUseKinFitResultsFlag, locBaseUniqueName, 0, {}); } void DReaction_factory_ReactionFilter::Add_PostKinfitTimingCuts(DReaction* locReaction) @@ -504,11 +504,11 @@ void DReaction_factory_ReactionFilter::Create_MissingMassSquaredHistogram(DReact //build name string ostringstream locActionUniqueNameStream; - if((locPID == Unknown) && (locMissingMassOffOfStepIndex == 0)) + if((locPID == UnknownParticle) && (locMissingMassOffOfStepIndex == 0)) locActionUniqueNameStream << locBaseUniqueName; else if(locMissingMassOffOfStepIndex == 0) locActionUniqueNameStream << ParticleType(locPID) << "_" << locBaseUniqueName; - else if(locPID == Unknown) + else if(locPID == UnknownParticle) locActionUniqueNameStream << "Step" << locMissingMassOffOfStepIndex << "_" << locBaseUniqueName; else locActionUniqueNameStream << ParticleType(locPID) << "_Step" << locMissingMassOffOfStepIndex << "_" << locBaseUniqueName; @@ -549,12 +549,12 @@ bool DReaction_factory_ReactionFilter::Convert_StringToPID(string locString, Par string DReaction_factory_ReactionFilter::Create_StepNameString(const DReactionStepTuple& locStepTuple, bool locFirstStepFlag) { string locNameString = ""; - auto locFirstStepTargetPID = locFirstStepFlag ? std::get<1>(locStepTuple) : Unknown; + auto locFirstStepTargetPID = locFirstStepFlag ? std::get<1>(locStepTuple) : UnknownParticle; if(!locFirstStepFlag || locFirstStepTargetPID != 14) //use initial state if target is not a proton { locNameString = ShortName(std::get<0>(locStepTuple)); auto locSecondPID = std::get<1>(locStepTuple); - if(locSecondPID != Unknown) + if(locSecondPID != UnknownParticle) locNameString += ShortName(locSecondPID); locNameString += "_"; } @@ -565,7 +565,7 @@ string DReaction_factory_ReactionFilter::Create_StepNameString(const DReactionSt locNameString += ShortName(locFinalPID); } auto locMissFinalPID = std::get<3>(locStepTuple); - if(locMissFinalPID != Unknown) + if(locMissFinalPID != UnknownParticle) locNameString += string("miss") + ShortName(locMissFinalPID); if(std::get<4>(locStepTuple) == DReactionStep::Get_ParticleIndex_Inclusive()) @@ -633,7 +633,7 @@ map>> DReaction_factory_Rea bool DReaction_factory_ReactionFilter::Parse_StepPIDString(string locStepString, DReactionStepTuple& locStepTuple) { //return tuple: initial pid, target/2nd-beam pid, detected final pids, missing final pid (if any), missing particle index - locStepTuple = std::make_tuple(Unknown, Unknown, vector{}, Unknown, DReactionStep::Get_ParticleIndex_None()); + locStepTuple = std::make_tuple(UnknownParticle, UnknownParticle, vector{}, UnknownParticle, DReactionStep::Get_ParticleIndex_None()); //find separator auto locStateSeparationIndex = locStepString.find("__"); @@ -673,7 +673,7 @@ bool DReaction_factory_ReactionFilter::Parse_StepPIDString(string locStepString, if(dDebugFlag) cout << "remaining string, underscore index, particle string: " << locRemainingStepString << ", " << locUnderscoreIndex << ", " << locParticleString << endl; - Particle_t locPID = Unknown; + Particle_t locPID = UnknownParticle; bool locIsMissingFlag = false; if(!Convert_StringToPID(locParticleString, locPID, locIsMissingFlag)) { @@ -682,7 +682,7 @@ bool DReaction_factory_ReactionFilter::Parse_StepPIDString(string locStepString, } if(locIsMissingFlag) { - if(locPID != Unknown) + if(locPID != UnknownParticle) std::get<3>(locStepTuple) = locPID; else std::get<4>(locStepTuple) = DReactionStep::Get_ParticleIndex_Inclusive(); @@ -695,7 +695,7 @@ bool DReaction_factory_ReactionFilter::Parse_StepPIDString(string locStepString, locRemainingStepString = locRemainingStepString.substr(locUnderscoreIndex + 1); } - if(std::get<3>(locStepTuple) != Unknown) + if(std::get<3>(locStepTuple) != UnknownParticle) std::get<4>(locStepTuple) = std::get<2>(locStepTuple).size(); if(dDebugFlag) diff --git a/src/plugins/Analysis/dirc_tree/DReaction_factory_dirc_tree.cc b/src/plugins/Analysis/dirc_tree/DReaction_factory_dirc_tree.cc index ab53bf8560..556bbce7cc 100644 --- a/src/plugins/Analysis/dirc_tree/DReaction_factory_dirc_tree.cc +++ b/src/plugins/Analysis/dirc_tree/DReaction_factory_dirc_tree.cc @@ -60,7 +60,7 @@ jerror_t DReaction_factory_dirc_tree::evnt(JEventLoop* locEventLoop, uint64_t lo // Kinematic Fit Results locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction, 5.73303E-7)); // confidence level cut //+/- 5 sigma - // locReaction->Add_AnalysisAction(new DCutAction_InvariantMass(locReaction, Unknown, false, 0.77-0.15, 0.77+0.15)); + // locReaction->Add_AnalysisAction(new DCutAction_InvariantMass(locReaction, UnknownParticle, false, 0.77-0.15, 0.77+0.15)); // locReaction->Add_AnalysisAction(new DCutAction_MissingMassSquared(locReaction, false, -0.02, 0.02)); // MASSES, POST-KINFIT @@ -107,7 +107,7 @@ jerror_t DReaction_factory_dirc_tree::evnt(JEventLoop* locEventLoop, uint64_t lo // Kinematic Fit Results locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction, 5.73303E-7)); // confidence level cut //+/- 5 sigma - // locReaction->Add_AnalysisAction(new DCutAction_InvariantMass(locReaction, Unknown, false, 0.95, 1.05)); + // locReaction->Add_AnalysisAction(new DCutAction_InvariantMass(locReaction, UnknownParticle, false, 0.95, 1.05)); // locReaction->Add_AnalysisAction(new DCutAction_MissingMassSquared(locReaction, false, -0.02, 0.02)); diff --git a/src/plugins/Analysis/p2gamma_hists/DReaction_factory_p2gamma_hists.cc b/src/plugins/Analysis/p2gamma_hists/DReaction_factory_p2gamma_hists.cc index d323e12118..09725ffe5f 100644 --- a/src/plugins/Analysis/p2gamma_hists/DReaction_factory_p2gamma_hists.cc +++ b/src/plugins/Analysis/p2gamma_hists/DReaction_factory_p2gamma_hists.cc @@ -59,9 +59,9 @@ jerror_t DReaction_factory_p2gamma_hists::init(void) // PID locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction, false)); - locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Unknown, SYS_TOF)); //false: measured data //Unknown: All PIDs - locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_BCAL)); //false: measured data //Unknown: All PIDs - locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_FCAL)); //false: measured data //Unknown: All PIDs + locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, UnknownParticle, SYS_TOF)); //false: measured data //UnknownParticle: All PIDs + locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, UnknownParticle, SYS_BCAL)); //false: measured data //UnknownParticle: All PIDs + locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, UnknownParticle, SYS_FCAL)); //false: measured data //UnknownParticle: All PIDs // Custom histograms (after PID) locReaction->Add_AnalysisAction(new DCustomAction_p2gamma_hists(locReaction, false, "TimingCut_Measured")); diff --git a/src/plugins/Analysis/p2pi0_hists/DReaction_factory_p2pi0_hists.cc b/src/plugins/Analysis/p2pi0_hists/DReaction_factory_p2pi0_hists.cc index 5e35b20d6b..03cf99a960 100644 --- a/src/plugins/Analysis/p2pi0_hists/DReaction_factory_p2pi0_hists.cc +++ b/src/plugins/Analysis/p2pi0_hists/DReaction_factory_p2pi0_hists.cc @@ -71,9 +71,9 @@ jerror_t DReaction_factory_p2pi0_hists::init(void) // PID locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction, false)); - locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Unknown, SYS_TOF)); //false: measured data //Unknown: All PIDs - locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_BCAL)); //false: measured data //Unknown: All PIDs - locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_FCAL)); //false: measured data //Unknown: All PIDs + locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, UnknownParticle, SYS_TOF)); //false: measured data //UnknownParticle: All PIDs + locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, UnknownParticle, SYS_BCAL)); //false: measured data //UnknownParticle: All PIDs + locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, UnknownParticle, SYS_FCAL)); //false: measured data //UnknownParticle: All PIDs // Custom histograms for p2pi0 (no KinFit cut) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false,500,0.,1., "NoKinFit_Measured")); diff --git a/src/plugins/Analysis/p2pi_hists/DCustomAction_p2pi_cuts.cc b/src/plugins/Analysis/p2pi_hists/DCustomAction_p2pi_cuts.cc index b3f35c43c1..ed7e654e5c 100644 --- a/src/plugins/Analysis/p2pi_hists/DCustomAction_p2pi_cuts.cc +++ b/src/plugins/Analysis/p2pi_hists/DCustomAction_p2pi_cuts.cc @@ -11,7 +11,7 @@ void DCustomAction_p2pi_cuts::Initialize(JEventLoop* locEventLoop) { // check if a particle is missing auto locMissingPIDs = Get_Reaction()->Get_MissingPIDs(); - dMissingPID = (locMissingPIDs.size() == 1) ? locMissingPIDs[0] : Unknown; + dMissingPID = (locMissingPIDs.size() == 1) ? locMissingPIDs[0] : UnknownParticle; } bool DCustomAction_p2pi_cuts::Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo) diff --git a/src/plugins/Analysis/p2pi_hists/DCustomAction_p2pi_hists.cc b/src/plugins/Analysis/p2pi_hists/DCustomAction_p2pi_hists.cc index f986a746ce..5a93ca05c5 100644 --- a/src/plugins/Analysis/p2pi_hists/DCustomAction_p2pi_hists.cc +++ b/src/plugins/Analysis/p2pi_hists/DCustomAction_p2pi_hists.cc @@ -58,7 +58,7 @@ void DCustomAction_p2pi_hists::Initialize(JEventLoop* locEventLoop) // check if a particle is missing auto locMissingPIDs = Get_Reaction()->Get_MissingPIDs(); - dMissingPID = (locMissingPIDs.size() == 1) ? locMissingPIDs[0] : Unknown; + dMissingPID = (locMissingPIDs.size() == 1) ? locMissingPIDs[0] : UnknownParticle; //CREATE THE HISTOGRAMS //Since we are creating histograms, the contents of gDirectory will be modified: must use JANA-wide ROOT lock diff --git a/src/plugins/Utilities/track_skimmer/DReaction_factory_track_skimmer.cc b/src/plugins/Utilities/track_skimmer/DReaction_factory_track_skimmer.cc index 6b1a064d61..21a888e091 100644 --- a/src/plugins/Utilities/track_skimmer/DReaction_factory_track_skimmer.cc +++ b/src/plugins/Utilities/track_skimmer/DReaction_factory_track_skimmer.cc @@ -42,7 +42,7 @@ jerror_t DReaction_factory_track_skimmer::init(void) //X -> 2pi0 locReactionStep = new DReactionStep(); - locReactionStep->Set_InitialParticleID(Unknown); + locReactionStep->Set_InitialParticleID(UnknownParticle); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Pi0); locReaction->Add_ReactionStep(locReactionStep); @@ -68,7 +68,7 @@ jerror_t DReaction_factory_track_skimmer::init(void) //X -> 3pi0 locReactionStep = new DReactionStep(); - locReactionStep->Set_InitialParticleID(Unknown); + locReactionStep->Set_InitialParticleID(UnknownParticle); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Pi0); @@ -508,7 +508,7 @@ jerror_t DReaction_factory_track_skimmer::init(void) //X -> e+ e- DReactionStep* locReactionStep_ee = new DReactionStep(); - locReactionStep_ee->Set_InitialParticleID(Unknown); + locReactionStep_ee->Set_InitialParticleID(UnknownParticle); locReactionStep_ee->Add_FinalParticleID(Electron); locReactionStep_ee->Add_FinalParticleID(Positron); locReaction->Add_ReactionStep(locReactionStep_ee); diff --git a/src/plugins/Utilities/trackeff_missing/DCustomAction_CutNoDetectorHit.cc b/src/plugins/Utilities/trackeff_missing/DCustomAction_CutNoDetectorHit.cc index e94f0b7d56..7eddd8f00a 100644 --- a/src/plugins/Utilities/trackeff_missing/DCustomAction_CutNoDetectorHit.cc +++ b/src/plugins/Utilities/trackeff_missing/DCustomAction_CutNoDetectorHit.cc @@ -15,7 +15,7 @@ void DCustomAction_CutNoDetectorHit::Initialize(JEventLoop* locEventLoop) //NEVER: Get anything from the JEventLoop while in a lock: May deadlock auto locMissingPIDs = Get_Reaction()->Get_MissingPIDs(); - dMissingPID = (locMissingPIDs.size() == 1) ? locMissingPIDs[0] : Unknown; + dMissingPID = (locMissingPIDs.size() == 1) ? locMissingPIDs[0] : UnknownParticle; if(locMissingPIDs.size() != 1) return; //invalid reaction setup @@ -94,7 +94,7 @@ bool DCustomAction_CutNoDetectorHit::Perform_Action(JEventLoop* locEventLoop, co //NEVER: Grab objects that are created post-kinfit (e.g. DKinFitResults, etc.) from the JEventLoop if Get_UseKinFitResultsFlag() == false: CAN CAUSE INFINITE DEPENDENCY LOOP //NEVER: Get anything from the JEventLoop while in a lock: May deadlock - if(dMissingPID == Unknown) + if(dMissingPID == UnknownParticle) return false; //invalid reaction setup if(ParticleCharge(dMissingPID) == 0) return false; //NOT SUPPORTED diff --git a/src/plugins/Utilities/trackeff_missing/DCustomAction_TrackingEfficiency.cc b/src/plugins/Utilities/trackeff_missing/DCustomAction_TrackingEfficiency.cc index 933ebf82b7..2c3447288f 100644 --- a/src/plugins/Utilities/trackeff_missing/DCustomAction_TrackingEfficiency.cc +++ b/src/plugins/Utilities/trackeff_missing/DCustomAction_TrackingEfficiency.cc @@ -17,7 +17,7 @@ void DCustomAction_TrackingEfficiency::Initialize(JEventLoop* locEventLoop) const DReaction* locReaction = Get_Reaction(); auto locMissingPIDs = Get_Reaction()->Get_MissingPIDs(); - dMissingPID = (locMissingPIDs.size() == 1) ? locMissingPIDs[0] : Unknown; + dMissingPID = (locMissingPIDs.size() == 1) ? locMissingPIDs[0] : UnknownParticle; if(locMissingPIDs.size() != 1) return; //invalid reaction setup @@ -109,7 +109,7 @@ bool DCustomAction_TrackingEfficiency::Perform_Action(JEventLoop* locEventLoop, /*********************************************** MISSING PARTICLE INFO ***********************************************/ - if(dMissingPID == Unknown) + if(dMissingPID == UnknownParticle) return true; //invalid reaction setup if(ParticleCharge(dMissingPID) == 0) return true; //NOT SUPPORTED diff --git a/src/plugins/Utilities/trackeff_missing/DReaction_factory_trackeff_missing.cc b/src/plugins/Utilities/trackeff_missing/DReaction_factory_trackeff_missing.cc index dd19f52a0e..7b4ffcede3 100644 --- a/src/plugins/Utilities/trackeff_missing/DReaction_factory_trackeff_missing.cc +++ b/src/plugins/Utilities/trackeff_missing/DReaction_factory_trackeff_missing.cc @@ -242,7 +242,7 @@ void DReaction_factory_trackeff_missing::Add_MassHistograms(DReaction* locReacti //if nothing missing, overall missing mass squared if((locNumMissingParticles == 0) && (locNumInclusiveSteps == 0) && (!locUseKinFitResultsFlag || !locP4Fit)) - Create_MissingMassSquaredHistogram(locReaction, Unknown, locUseKinFitResultsFlag, locBaseUniqueName, 0, {}); + Create_MissingMassSquaredHistogram(locReaction, UnknownParticle, locUseKinFitResultsFlag, locBaseUniqueName, 0, {}); } void DReaction_factory_trackeff_missing::Add_PostKinfitTimingCuts(DReaction* locReaction) @@ -297,11 +297,11 @@ void DReaction_factory_trackeff_missing::Create_MissingMassSquaredHistogram(DRea //build name string ostringstream locActionUniqueNameStream; - if((locPID == Unknown) && (locMissingMassOffOfStepIndex == 0)) + if((locPID == UnknownParticle) && (locMissingMassOffOfStepIndex == 0)) locActionUniqueNameStream << locBaseUniqueName; else if(locMissingMassOffOfStepIndex == 0) locActionUniqueNameStream << ParticleType(locPID) << "_" << locBaseUniqueName; - else if(locPID == Unknown) + else if(locPID == UnknownParticle) locActionUniqueNameStream << "Step" << locMissingMassOffOfStepIndex << "_" << locBaseUniqueName; else locActionUniqueNameStream << ParticleType(locPID) << "_Step" << locMissingMassOffOfStepIndex << "_" << locBaseUniqueName; diff --git a/src/plugins/monitoring/FCAL_Hadronic_Eff/JEventProcessor_FCAL_Hadronic_Eff.cc b/src/plugins/monitoring/FCAL_Hadronic_Eff/JEventProcessor_FCAL_Hadronic_Eff.cc index ac82e2f560..a7a272bb80 100644 --- a/src/plugins/monitoring/FCAL_Hadronic_Eff/JEventProcessor_FCAL_Hadronic_Eff.cc +++ b/src/plugins/monitoring/FCAL_Hadronic_Eff/JEventProcessor_FCAL_Hadronic_Eff.cc @@ -238,7 +238,7 @@ jerror_t JEventProcessor_FCAL_Hadronic_Eff::evnt(jana::JEventLoop* locEventLoop, japp->RootFillUnLock(this); //RELEASE ROOT FILL LOCK //TRACK - Particle_t locPID = (locChargedTrackHypothesis->t1_detector() == SYS_TOF) ? locChargedTrackHypothesis->PID() : Unknown; + Particle_t locPID = (locChargedTrackHypothesis->t1_detector() == SYS_TOF) ? locChargedTrackHypothesis->PID() : UnknownParticle; dTreeFillData.Fill_Single("PID_PDG", PDGtype(locPID)); dTreeFillData.Fill_Single("TrackVertexZ", locChargedTrackHypothesis->position().Z()); dTreeFillData.Fill_Single("TrackCDCRings", locTrackTimeBased->dCDCRings); diff --git a/src/plugins/monitoring/TOF_Eff/JEventProcessor_TOF_Eff.cc b/src/plugins/monitoring/TOF_Eff/JEventProcessor_TOF_Eff.cc index 5d64e4a232..3ec1f99737 100644 --- a/src/plugins/monitoring/TOF_Eff/JEventProcessor_TOF_Eff.cc +++ b/src/plugins/monitoring/TOF_Eff/JEventProcessor_TOF_Eff.cc @@ -337,7 +337,7 @@ jerror_t JEventProcessor_TOF_Eff::evnt(jana::JEventLoop* locEventLoop, uint64_t japp->RootFillUnLock(this); //RELEASE ROOT FILL LOCK //TRACK - Particle_t locPID = (locChargedTrackHypothesis->Get_FCALShowerMatchParams() != NULL) ? locChargedTrackHypothesis->PID() : Unknown; + Particle_t locPID = (locChargedTrackHypothesis->Get_FCALShowerMatchParams() != NULL) ? locChargedTrackHypothesis->PID() : UnknownParticle; dTreeFillData.Fill_Single("PID_PDG", PDGtype(locPID)); dTreeFillData.Fill_Single("TrackVertexZ", locChargedTrackHypothesis->position().Z()); dTreeFillData.Fill_Single("TrackCDCRings", locTrackTimeBased->dCDCRings);