4545
4646#include " Math/Vector3D.h"
4747#include < Math/Vector4D.h>
48- #include < TDatabasePDG.h>
4948#include < TFile.h>
5049#include < TH2F.h>
51- #include < TLorentzVector.h>
5250#include < TPDGCode.h>
5351#include < TProfile.h>
5452
@@ -875,8 +873,9 @@ struct sigma0builder {
875873 // Calculate properties and fill struct
876874 info.DCADau = (cross.Mag2 () > 0 ) ? std::abs (posdiff.Dot (cross)) / cross.R () : 999 .f ;
877875 info.CosPA = v01momentumNorm.Dot (v02momentumNorm);
878-
879- if (d < 1e-5f ) { // Parallel or nearly parallel lines
876+
877+ float Min_threshold = 1e-5f ; // Threshold to consider lines as parallel, can be tuned
878+ if (d < Min_threshold) { // Parallel or nearly parallel lines
880879 info.X = info.Y = info.Z = 0 .f ; // should we use another dummy value? Perhaps 999.f?
881880 return info;
882881 }
@@ -1540,7 +1539,7 @@ struct sigma0builder {
15401539
15411540 auto v0MC = v0.template v0MCCore_as <soa::Join<aod::V0MCCores, aod::V0MCCollRefs>>();
15421541
1543- float V0MCpT = RecoDecay::pt (array<float , 2 >{v0MC.pxMC (), v0MC.pyMC ()});
1542+ float V0MCpT = RecoDecay::pt (std:: array<float , 2 >{v0MC.pxMC (), v0MC.pyMC ()});
15441543 float V0PA = TMath::ACos (v0.v0cosPA ());
15451544 bool fIsV0CorrectlyAssigned = (v0MC.straMCCollisionId () == v0MCCollision.globalIndex ());
15461545 bool isPrimary = v0MC.isPhysicalPrimary ();
@@ -1604,7 +1603,7 @@ struct sigma0builder {
16041603 histos.fill (HIST (" GenQA/h2dSigma0MCSourceVsPDGMother" ), GenInfo.IsProducedByGenerator , GenInfo.PDGCodeMother );
16051604
16061605 // Checking decay modes and getting daughter pTs
1607- for (auto & daughter : daughters) {
1606+ for (auto const & daughter : daughters) {
16081607 histos.fill (HIST (" GenQA/h2dSigma0NDaughtersVsPDG" ), daughters.size (), daughter.pdgCode ());
16091608
16101609 if (GenInfo.NDaughters == 2 ) {
@@ -1619,13 +1618,13 @@ struct sigma0builder {
16191618
16201619 if ((GenInfo.IsKStar ) && genSelections.doQA ) {
16211620 histos.fill (HIST (" GenQA/h2dKStarMCSourceVsPDGMother" ), GenInfo.IsProducedByGenerator , GenInfo.PDGCodeMother );
1622- for (auto & daughter : daughters) // checking decay modes
1621+ for (auto const & daughter : daughters) // checking decay modes
16231622 histos.fill (HIST (" GenQA/h2dKStarNDaughtersVsPDG" ), daughters.size (), daughter.pdgCode ());
16241623 }
16251624
16261625 if (GenInfo.IsPi0 && genSelections.doQA ) {
16271626 histos.fill (HIST (" GenQA/h2dPi0MCSourceVsPDGMother" ), GenInfo.IsProducedByGenerator , GenInfo.PDGCodeMother );
1628- for (auto & daughter : daughters) // checking decay modes
1627+ for (auto const & daughter : daughters) // checking decay modes
16291628 histos.fill (HIST (" GenQA/h2dPi0NDaughtersVsPDG" ), daughters.size (), daughter.pdgCode ());
16301629 }
16311630 }
@@ -1735,7 +1734,7 @@ struct sigma0builder {
17351734 template <typename TMCParticles>
17361735 void genProcess (TMCParticles const & mcParticles)
17371736 {
1738- for (auto & mcParticle : mcParticles) {
1737+ for (auto const & mcParticle : mcParticles) {
17391738 // Rapidity selection
17401739 if ((mcParticle.y () < genSelections.mc_rapidityMin ) || (mcParticle.y () > genSelections.mc_rapidityMax ))
17411740 continue ;
@@ -1791,7 +1790,7 @@ struct sigma0builder {
17911790 static constexpr std::string_view MainDir2[] = {" EMCalPhotonBeforeSel" , " EMCalPhotonSel" };
17921791
17931792 // calculate pT for cluster assuming they are photons (so no mass)
1794- float gammapT = sqrt (cluster.energy () * cluster.energy ()) / std::cosh (cluster.eta ());
1793+ float gammapT = std:: sqrt (cluster.energy () * cluster.energy ()) / std::cosh (cluster.eta ());
17951794
17961795 histos.fill (HIST (MainDir2[mode]) + HIST (" /hDefinition" ), cluster.definition ());
17971796 histos.fill (HIST (MainDir2[mode]) + HIST (" /h2dNCells" ), gammapT, cluster.nCells ());
@@ -2401,7 +2400,7 @@ struct sigma0builder {
24012400 bool buildEMCalSigma0 (TV0Object const & lambda, TEMCalClsObject const & gamma, TCollision const & collision, TMCParticles const & mcparticles, std::vector<bool > const & emcaltracksmatched)
24022401 {
24032402 // calculate pT for cluster assuming they are photons (so no mass)
2404- float gammapT = sqrt (gamma.energy () * gamma.energy ()) / std::cosh (gamma.eta ());
2403+ float gammapT = std:: sqrt (gamma.energy () * gamma.energy ()) / std::cosh (gamma.eta ());
24052404
24062405 // Momentum components
24072406 float gammapx = gammapT * std::cos (gamma.phi ());
0 commit comments