@@ -89,7 +89,7 @@ struct FullJetSpectra {
8989 Configurable<float> jetNoFidPartEtaMax{"jetNoFidPartEtaMax", 0.9, "maximum jet eta for MCP w/o Fid"};
9090 Configurable<float> emcalPhiMin{"emcalPhiMin", 1.3962634, "minimum emcal phi"};
9191 Configurable<float> emcalPhiMax{"emcalPhiMax", 3.2836100, "maximum emcal phi"};
92- Configurable<float> jetPhiMin{"jetPhiMin", 1.8, "minimum emcal Fid phi"}; //For R = 0.4, jetPhiMin = emcalPhiMin + R
92+ Configurable<float> jetPhiMin{"jetPhiMin", 1.8, "minimum emcal Fid phi"}; // For R = 0.4, jetPhiMin = emcalPhiMin + R
9393 Configurable<float> jetPhiMax{"jetPhiMax", 2.86, "maximum emcal Fid phi"};
9494 Configurable<float> jetAreaFractionMin{"jetAreaFractionMin", -99.0, "used to make a cut on the jet areas"};
9595
@@ -716,10 +716,10 @@ struct FullJetSpectra {
716716 // using JetTableMCPWeightedJoined = soa::Join<aod::FullMCParticleLevelJets, aod::FullMCParticleLevelJetConstituents, aod::FullMCParticleLevelJetEventWeights>;
717717
718718 using JetTableMCDMatchedJoined = soa::Join<aod::FullMCDetectorLevelJets, aod::FullMCDetectorLevelJetConstituents,
719- aod::FullMCDetectorLevelJetsMatchedToFullMCParticleLevelJets>;
719+ aod::FullMCDetectorLevelJetsMatchedToFullMCParticleLevelJets>;
720720
721721 using JetTableMCPMatchedJoined = soa::Join<aod::FullMCParticleLevelJets, aod::FullMCParticleLevelJetConstituents,
722- aod::FullMCParticleLevelJetsMatchedToFullMCDetectorLevelJets>;
722+ aod::FullMCParticleLevelJetsMatchedToFullMCDetectorLevelJets>;
723723
724724 // Commenting these out for now to avoid dependency of the task on JE EventWeights tables
725725 /*using JetTableMCDMatchedWeightedJoined = soa::Join<aod::FullMCDetectorLevelJets, aod::FullMCDetectorLevelJetConstituents,
@@ -744,36 +744,36 @@ struct FullJetSpectra {
744744 template <typename T, typename S, typename U>
745745 bool isAcceptedRecoJet(U const& jet, double& filteredTrackPt, double& filteredClusterPt)
746746 {
747- //Reset filtered pT accumulators (for QA if needed)
747+ // Reset filtered pT accumulators (for QA if needed)
748748 filteredTrackPt = 0.0;
749749 filteredClusterPt = 0.0;
750750
751751 // --- Track cuts: ALL tracks must satisfy 0.15 <= pT <= 200 or 150 GeV/c---
752752 // if (leadingTrackPtMin > kLeadingTrackPtMinThreshold || leadingTrackPtMax < kLeadingTrackPtMaxThreshold) {
753- bool hasValidTrack = false;
754- for (const auto& constituent : jet.template tracks_as<T>()) {
755- const float pt = constituent.pt();
756- if ((minTrackPt > kLeadingTrackPtMinThreshold && pt < minTrackPt) ||
757- (maxTrackPt < kLeadingTrackPtMaxThreshold && pt > maxTrackPt)) {
758- continue; //SKIP this invalid track
759- }
760- filteredTrackPt += pt; //Accumulate valid track pT
761- hasValidTrack = true; // At least one track exists (if needed)
753+ bool hasValidTrack = false;
754+ for (const auto& constituent : jet.template tracks_as<T>()) {
755+ const float pt = constituent.pt();
756+ if ((minTrackPt > kLeadingTrackPtMinThreshold && pt < minTrackPt) ||
757+ (maxTrackPt < kLeadingTrackPtMaxThreshold && pt > maxTrackPt)) {
758+ continue; // SKIP this invalid track
759+ }
760+ filteredTrackPt += pt; // Accumulate valid track pT
761+ hasValidTrack = true; // At least one track exists (if needed)
762762 }
763763 // Reject jets without valid tracks (edge case)
764764 if (!hasValidTrack) {
765765 return false;
766766 }
767- // }
767+ // }
768768
769- // --- Cluster cuts: ALL clusters must satisfy min <= pT <= max == 0.3 <= pT <= 250
770- // if (leadingClusterPtMin > kLeadingClusterPtMinThreshold || leadingClusterPtMax < kLeadingClusterPtMaxThreshold) {
769+ // --- Cluster cuts: ALL clusters must satisfy min <= pT <= max == 0.3 <= pT <= 250
770+ // if (leadingClusterPtMin > kLeadingClusterPtMinThreshold || leadingClusterPtMax < kLeadingClusterPtMaxThreshold) {
771771 bool hasValidCluster = false;
772772 for (const auto& cluster : jet.template clusters_as<S>()) {
773773 const double pt = cluster.energy() / std::cosh(cluster.eta());
774774 if ((minClusterPt > kLeadingClusterPtMinThreshold && pt < minClusterPt) ||
775775 (maxClusterPt < kLeadingClusterPtMaxThreshold && pt > maxClusterPt)) {
776- continue; //SKIP this invalid cluster
776+ continue; // SKIP this invalid cluster
777777 }
778778 filteredClusterPt += pt;
779779 hasValidCluster = true; // At least one cluster exists
@@ -782,37 +782,37 @@ struct FullJetSpectra {
782782 if (!hasValidCluster) {
783783 return false;
784784 }
785- // }
786- return true; //Valid Jet
785+ // }
786+ return true; // Valid Jet
787787 } // isAcceptedRecoJet ends
788788
789- /* template <typename T, typename U>
790- bool isAcceptedPartJet(U const& jet)
791- {
792- // if (jetAreaFractionMin > kJetAreaFractionMinThreshold) {
793- // if (jet.area() < jetAreaFractionMin * o2::constants::math::PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {
794- // return false;
795- // }
796- // }
797- // track pt Min cut at the Part level: 0 < pT <= 200 or 150 GeV/c
798- if (leadingTrackPtMin > kLeadingTrackPtMinThreshold || leadingTrackPtMax < kLeadingTrackPtMaxThreshold) {
799- bool hasValidParticle = false;
800- for (const auto& constituent : jet.template tracks_as<T>()) {
801- const float pt = constituent.pt();
802- // Reject if ANY particle fails min or max cut
803- if ((leadingTrackPtMin > kLeadingTrackPtMinThreshold && pt < leadingTrackPtMin) ||
804- (leadingTrackPtMax < kLeadingTrackPtMaxThreshold && pt > leadingTrackPtMax)) {
789+ /* template <typename T, typename U>
790+ bool isAcceptedPartJet(U const& jet)
791+ {
792+ // if (jetAreaFractionMin > kJetAreaFractionMinThreshold) {
793+ // if (jet.area() < jetAreaFractionMin * o2::constants::math::PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {
794+ // return false;
795+ // }
796+ // }
797+ // track pt Min cut at the Part level: 0 < pT <= 200 or 150 GeV/c
798+ if (leadingTrackPtMin > kLeadingTrackPtMinThreshold || leadingTrackPtMax < kLeadingTrackPtMaxThreshold) {
799+ bool hasValidParticle = false;
800+ for (const auto& constituent : jet.template tracks_as<T>()) {
801+ const float pt = constituent.pt();
802+ // Reject if ANY particle fails min or max cut
803+ if ((leadingTrackPtMin > kLeadingTrackPtMinThreshold && pt < leadingTrackPtMin) ||
804+ (leadingTrackPtMax < kLeadingTrackPtMaxThreshold && pt > leadingTrackPtMax)) {
805+ return false;
806+ }
807+ hasValidParticle = true; // At least one track exists (if needed)
808+ }
809+ // Reject if no particle exist (edge case)
810+ if (leadingTrackPtMin > kLeadingTrackPtMinThreshold && !hasValidParticle) {
805811 return false;
806812 }
807- hasValidParticle = true; // At least one track exists (if needed)
808813 }
809- // Reject if no particle exist (edge case)
810- if (leadingTrackPtMin > kLeadingTrackPtMinThreshold && !hasValidParticle) {
811- return false;
812- }
813- }
814- return true;
815- }*/
814+ return true;
815+ }*/
816816
817817 template <typename T>
818818 bool isInPhiAcceptance(T const& jet) const
@@ -827,8 +827,10 @@ struct FullJetSpectra {
827827
828828 // normalize to [0, 2pi)
829829 auto norm = [&](double a) {
830- while (a < 0) a += twoPi;
831- while (a >= twoPi) a -= twoPi;
830+ while (a < 0)
831+ a += twoPi;
832+ while (a >= twoPi)
833+ a -= twoPi;
832834 return a;
833835 };
834836
@@ -957,7 +959,7 @@ struct FullJetSpectra {
957959 template <typename T>
958960 void fillMCPHistograms(T const& jet, float weight = 1.0)
959961 {
960- auto isInFiducial = [&](auto const& jet) { //For QA purposes only
962+ auto isInFiducial = [&](auto const& jet) { // For QA purposes only
961963 return jet.eta() >= jetEtaMin && jet.eta() <= jetEtaMax &&
962964 jet.phi() >= jetPhiMin && jet.phi() <= jetPhiMax;
963965 };
@@ -1134,7 +1136,6 @@ struct FullJetSpectra {
11341136 } // jetBase
11351137 }
11361138
1137-
11381139 void processDummy(aod::JetCollisions const&)
11391140 {
11401141 }
@@ -1210,8 +1211,7 @@ struct FullJetSpectra {
12101211
12111212 if (!eventAccepted) {
12121213 for (auto const& jet : jets) {
1213- if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax))
1214- {
1214+ if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
12151215 fillRejectedJetHistograms(jet, 1.0);
12161216 }
12171217 }
@@ -1227,8 +1227,8 @@ struct FullJetSpectra {
12271227 // if (jet.phi() < jetPhiMin || jet.phi() > jetPhiMax) {
12281228 // continue;
12291229 // }
1230- if (!isInPhiAcceptance(jet)) { // Using the new phi acceptance function
1231- continue;
1230+ if (!isInPhiAcceptance(jet)) { // Using the new phi acceptance function
1231+ continue;
12321232 }
12331233 fillJetHistograms(jet);
12341234 }
@@ -1354,8 +1354,8 @@ struct FullJetSpectra {
13541354 if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
13551355 continue;
13561356 }
1357- if (!isInPhiAcceptance(jet)) { // Using the new phi acceptance function
1358- continue;
1357+ if (!isInPhiAcceptance(jet)) { // Using the new phi acceptance function
1358+ continue;
13591359 }
13601360 fillJetHistograms(jet);
13611361 }
@@ -1448,8 +1448,8 @@ struct FullJetSpectra {
14481448 if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
14491449 continue;
14501450 }
1451- if (!isInPhiAcceptance(jet)) { // Using the new phi acceptance function
1452- continue;
1451+ if (!isInPhiAcceptance(jet)) { // Using the new phi acceptance function
1452+ continue;
14531453 }
14541454 fillJetHistograms(jet);
14551455 }
@@ -1541,8 +1541,8 @@ struct FullJetSpectra {
15411541 if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
15421542 continue;
15431543 }
1544- if (!isInPhiAcceptance(jet)) { // Using the new phi acceptance function
1545- continue;
1544+ if (!isInPhiAcceptance(jet)) { // Using the new phi acceptance function
1545+ continue;
15461546 }
15471547 fillJetHistograms(jet, collision.mcCollision().weight());
15481548 }
@@ -1857,7 +1857,7 @@ struct FullJetSpectra {
18571857 PROCESS_SWITCH(FullJetSpectra, processJetsMCPMCDMatched, "Full Jet finder MCP matched to MCD", false);
18581858
18591859 void processJetsNoFidMCPMCDMatchedWeighted(soa::Filtered<EMCCollisionsMCD>::iterator const& collision, JetTableMCDMatchedJoined const& mcdjets, JetTableMCPMatchedJoined const& mcpjets, aod::JMcCollisions const&,
1860- aod::JetTracks const&, ClusterWithCorrections const&, aod::JetParticles const&)
1860+ aod::JetTracks const&, ClusterWithCorrections const&, aod::JetParticles const&)
18611861 {
18621862 bool eventAccepted = false;
18631863 int fakeMcdJet = 0;
@@ -1869,7 +1869,7 @@ struct FullJetSpectra {
18691869 const auto mcpJetsPerMcCollision = mcpjets.sliceBy(JetMCPPerMcCollision, collision.mcCollisionId());
18701870
18711871 registry.fill(HIST("hMatchedNoFidcollisionCounter"), 0.5, eventWeight); // allDetColl
1872- if (std::fabs(collision.posZ()) > vertexZCut) { // making double sure this condition is satisfied
1872+ if (std::fabs(collision.posZ()) > vertexZCut) { // making double sure this condition is satisfied
18731873 return;
18741874 }
18751875 registry.fill(HIST("hMatchedNoFidcollisionCounter"), 1.5, eventWeight); // DetCollWithVertexZ
@@ -1929,8 +1929,8 @@ struct FullJetSpectra {
19291929 allMatchedPartJets++;
19301930 registry.fill(HIST("h_allMatchedNoFidPartJetsPt"), mcpjet.pt(), eventWeight);
19311931
1932- //Not applying any emcal fiducial cuts in eta and phi on MCP jets when matching.
1933- //Keeping jet eta here open = |0.9| and no cut in phi at all.
1932+ // Not applying any emcal fiducial cuts in eta and phi on MCP jets when matching.
1933+ // Keeping jet eta here open = |0.9| and no cut in phi at all.
19341934 if (!jetfindingutilities::isInEtaAcceptance(mcpjet, jetNoFidPartEtaMin, jetNoFidPartEtaMax, trackEtaMin, trackEtaMax)) {
19351935 fakeMcpJet++;
19361936 registry.fill(HIST("h2_full_NoFidfakemcpjets"), mcpjet.pt(), fakeMcpJet, eventWeight);
@@ -1944,13 +1944,12 @@ struct FullJetSpectra {
19441944 registry.fill(HIST("h_full_NoFidmatchedmcpjet_phi"), mcpjet.phi(), eventWeight);
19451945 }
19461946 } // mcpjet
1947- // Fill the total matched particle jets histogram after processing all MCP jets for the MCD jet
1948- registry.fill(HIST("h_allMatchedNoFidPartJetsCounter"), allMatchedPartJets, eventWeight);
1947+ // Fill the total matched particle jets histogram after processing all MCP jets for the MCD jet
1948+ registry.fill(HIST("h_allMatchedNoFidPartJetsCounter"), allMatchedPartJets, eventWeight);
19491949 } // mcdjet
19501950 }
19511951 PROCESS_SWITCH(FullJetSpectra, processJetsNoFidMCPMCDMatchedWeighted, "Full Jet finder No Fid MCP matched to MCD on weighted events", false);
19521952
1953-
19541953 void processJetsMCPMCDMatchedWeighted(soa::Filtered<EMCCollisionsMCD>::iterator const& collision, JetTableMCDMatchedJoined const& mcdjets, JetTableMCPMatchedJoined const& mcpjets, aod::JMcCollisions const&,
19551954 aod::JetTracks const&, ClusterWithCorrections const&, aod::JetParticles const&)
19561955 {
@@ -2071,8 +2070,8 @@ struct FullJetSpectra {
20712070 registry.fill(HIST("h_full_matchedmcpjet_phi"), mcpjet.phi(), eventWeight);
20722071 }
20732072 } // mcpjet
2074- // Fill the total matched particle jets histogram after processing all MCP jets for the MCD jet
2075- registry.fill(HIST("h_allMatchedPartJetsCounter"), allMatchedPartJets, eventWeight);
2073+ // Fill the total matched particle jets histogram after processing all MCP jets for the MCD jet
2074+ registry.fill(HIST("h_allMatchedPartJetsCounter"), allMatchedPartJets, eventWeight);
20762075 } // mcdjet
20772076 }
20782077 PROCESS_SWITCH(FullJetSpectra, processJetsMCPMCDMatchedWeighted, "Full Jet finder MCP matched to MCD on weighted events", false);
0 commit comments