@@ -260,14 +260,13 @@ struct statPromptPhoton {
260260 using filteredMCCollisions = soa::Filtered<selectedMCCollisions>;
261261 */
262262
263-
264263 Filter PosZFilter_JE = nabs(aod::jcollision::posZ) < cfgVtxCut;
265264 Filter clusterDefinitionSelection_JE = (o2::aod::jcluster::definition == cfgClusterDefinition) && (o2::aod::jcluster::time >= cfgMinTime) && (o2::aod::jcluster::time <= cfgMaxTime) && (o2::aod::jcluster::energy > cfgMinClusterEnergy) && (o2::aod::jcluster::nCells >= cfgMinNCells) && (o2::aod::jcluster::nlm <= cfgMaxNLM) && (o2::aod::jcluster::isExotic == cfgExoticContribution);
266265
267266 using selectedMCCollisions = aod::JMcCollisions;
268- using filteredMCCollisions = soa::Filtered<selectedMCCollisions>;
267+ using filteredMCCollisions = soa::Filtered<selectedMCCollisions>;
269268 using TrackCandidates = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection>;
270- using BcCandidates = soa::Join<aod::JBCs, aod::JBCPIs>;
269+ using BcCandidates = soa::Join<aod::JBCs, aod::JBCPIs>;
271270
272271 // using jTrackCandidates = soa::Join<aod::JTracks, aod::JTrackPIs, aod::McTrackLabels>;
273272 using jTrackCandidates = soa::Join<aod::JTracks, aod::JTrackPIs, aod::JMcTrackLbs>;
@@ -433,9 +432,9 @@ struct statPromptPhoton {
433432 void processMCGen (filteredMCCollisions::iterator const & collision, soa::SmallGroups<soa::Join<aod::JMcCollisionLbs, jfilteredCollisions>> const & recocolls, aod::JMcParticles const & mcParticles, jfilteredMCClusters const &)
434433 {
435434 nEventsGenMC++;
436- if (cfgDebug){
435+ if (cfgDebug) {
437436 if ((nEventsGenMC + 1 ) % 10000 == 0 ) {
438- std::cout << " Processed Gen MC Events: " << nEventsGenMC << std::endl;
437+ std::cout << " Processed Gen MC Events: " << nEventsGenMC << std::endl;
439438 }
440439 }
441440 histos.fill (HIST (" GEN_nEvents" ), 0.5 );
@@ -568,25 +567,25 @@ struct statPromptPhoton {
568567 } // 3rd photon loop
569568 } // 2nd photon check
570569
571- if (cfgDebug){
572- std::cout << " We have a GEN prompt photon" << std::endl;
573- std::cout << " Photon gen status code chain: " << std::endl;
574- std::cout << " Photon stat: " << mcPhoton.getGenStatusCode () << std::endl;
575- std::cout << " Photon index: " << mcPhoton.globalIndex () << std::endl;
576- std::cout << " Photon mompdg 1: " << mompdg1 << std::endl;
577- std::cout << " Photon momstatus 1: " << momstatus1 << std::endl;
578- std::cout << " Photon momindex 1: " << momindex1 << std::endl;
579- std::cout << " Photon mompdg 2: " << mompdg2 << std::endl;
580- std::cout << " Photon momstatus 2: " << momstatus2 << std::endl;
581- std::cout << " Photon momindex 2: " << momindex2 << std::endl;
582- std::cout << " Photon mompdg 3: " << mompdg3 << std::endl;
583- std::cout << " Photon momstatus 3: " << momstatus3 << std::endl;
584- std::cout << " Photon momindex 3: " << momindex3 << std::endl;
585- }
570+ if (cfgDebug) {
571+ std::cout << " We have a GEN prompt photon" << std::endl;
572+ std::cout << " Photon gen status code chain: " << std::endl;
573+ std::cout << " Photon stat: " << mcPhoton.getGenStatusCode () << std::endl;
574+ std::cout << " Photon index: " << mcPhoton.globalIndex () << std::endl;
575+ std::cout << " Photon mompdg 1: " << mompdg1 << std::endl;
576+ std::cout << " Photon momstatus 1: " << momstatus1 << std::endl;
577+ std::cout << " Photon momindex 1: " << momindex1 << std::endl;
578+ std::cout << " Photon mompdg 2: " << mompdg2 << std::endl;
579+ std::cout << " Photon momstatus 2: " << momstatus2 << std::endl;
580+ std::cout << " Photon momindex 2: " << momindex2 << std::endl;
581+ std::cout << " Photon mompdg 3: " << mompdg3 << std::endl;
582+ std::cout << " Photon momstatus 3: " << momstatus3 << std::endl;
583+ std::cout << " Photon momindex 3: " << momindex3 << std::endl;
584+ }
586585 } // check for mother of OG
587- else {
588- continue ;
589- }
586+ else {
587+ continue ;
588+ }
590589
591590 if (std::abs (mcPhoton.getGenStatusCode ()) > 19 && std::abs (mcPhoton.getGenStatusCode ()) < 90 ) {
592591 if (mcPhoton.isPhysicalPrimary ()) {
@@ -613,9 +612,9 @@ struct statPromptPhoton {
613612 {
614613
615614 nEventsRecMC_JE++;
616- if (cfgDebug){
615+ if (cfgDebug) {
617616 if ((nEventsRecMC_JE + 1 ) % 10000 == 0 ) {
618- std::cout << " Processed JE Rec MC Events: " << nEventsRecMC_JE << std::endl;
617+ std::cout << " Processed JE Rec MC Events: " << nEventsRecMC_JE << std::endl;
619618 }
620619 }
621620 histos.fill (HIST (" REC_nEvents" ), 0.5 );
@@ -715,35 +714,34 @@ struct statPromptPhoton {
715714 continue ;
716715 }
717716
718- // bool nodoublecount = false;
717+ // bool nodoublecount = false;
719718 double etaT = ogtrack.trackEtaEmcal ();
720719 double etaC = mccluster.eta ();
721720 double phiT = ogtrack.trackPhiEmcal ();
722721 double phiC = mccluster.phi ();
723- double ptT = ctrack.pt ();
722+ double ptT = ctrack.pt ();
724723 bool etatrigger = false ;
725- bool phitrigger = false ;
724+ bool phitrigger = false ;
726725 double phidiff = TVector2::Phi_mpi_pi (mccluster.phi () - ogtrack.phi ());
727726 double etadiff = mccluster.eta () - ogtrack.eta ();
728727
729- if (cfgPtClusterCut){
730- if (fabs (etaT - etaC) < (0.010 + pow (ptT+ 4.07 ,-2.5 )) ) {
728+ if (cfgPtClusterCut) {
729+ if (fabs (etaT - etaC) < (0.010 + pow (ptT + 4.07 , -2.5 ))) {
731730 etatrigger = true ;
732- }
731+ }
733732
734- if (fabs (TVector2::Phi_mpi_pi (phiT - phiC)) < (0.015 + pow (ptT+ 3.65 ,-2.0 )) ) {
733+ if (fabs (TVector2::Phi_mpi_pi (phiT - phiC)) < (0.015 + pow (ptT + 3.65 , -2.0 ))) {
735734 phitrigger = true ;
736- }
737- }
738- else {
739- if (fabs (etadiff) < 0.05 ) {
740- etatrigger = true ;
741- }
742-
743- if (fabs (phidiff) < 0.05 ) {
744- phitrigger = true ;
745- }
746- }
735+ }
736+ } else {
737+ if (fabs (etadiff) < 0.05 ) {
738+ etatrigger = true ;
739+ }
740+
741+ if (fabs (phidiff) < 0.05 ) {
742+ phitrigger = true ;
743+ }
744+ }
747745
748746 if (etatrigger && phitrigger) {
749747 chargetrigger = true ;
@@ -792,29 +790,29 @@ struct statPromptPhoton {
792790 if (!ogtrack.isGlobalTrack ()) {
793791 continue ;
794792 }
795- bool etatrigger = false ;
796- bool phitrigger = false ;
793+ bool etatrigger = false ;
794+ bool phitrigger = false ;
797795 // double ptT = ctrack.pt();
798- double phidiff = TVector2::Phi_mpi_pi (mccluster.phi () - ogtrack.phi ());
799- double etadiff = mccluster.eta () - ogtrack.eta ();
800- if (fabs (etadiff) < 0.05 ) {
801- etatrigger = true ;
802- }
796+ double phidiff = TVector2::Phi_mpi_pi (mccluster.phi () - ogtrack.phi ());
797+ double etadiff = mccluster.eta () - ogtrack.eta ();
798+ if (fabs (etadiff) < 0.05 ) {
799+ etatrigger = true ;
800+ }
803801
804- if (fabs (phidiff) < 0.05 ) {
805- phitrigger = true ;
806- }
802+ if (fabs (phidiff) < 0.05 ) {
803+ phitrigger = true ;
804+ }
807805
808806 if (chargetrigger) {
809807 histos.fill (HIST (" REC_Track_v_Cluster_Phi_C" ), phidiff);
810808 histos.fill (HIST (" REC_Track_v_Cluster_Eta_C" ), etadiff);
811809 histos.fill (HIST (" REC_Track_v_Cluster_Phi_Eta_C" ), phidiff, etadiff);
812810 } else {
813- if (etatrigger && chargetrigger) {
814- if (cfgDebug){
815- std::cout << " ????????????????????" << std::endl;
816- }
817- }
811+ if (etatrigger && chargetrigger) {
812+ if (cfgDebug) {
813+ std::cout << " ????????????????????" << std::endl;
814+ }
815+ }
818816 histos.fill (HIST (" REC_Track_v_Cluster_Phi_AC" ), phidiff);
819817 histos.fill (HIST (" REC_Track_v_Cluster_Eta_AC" ), etadiff);
820818 histos.fill (HIST (" REC_Track_v_Cluster_Phi_Eta_AC" ), phidiff, etadiff);
@@ -833,7 +831,7 @@ struct statPromptPhoton {
833831 histos.fill (HIST (" REC_PtHadSum_Photon" ), pthadsum);
834832 histos.fill (HIST (" REC_Trigger_Energy" ), mccluster.energy ());
835833 }
836-
834+
837835 auto ClusterParticles = mccluster.mcParticles_as <aod::JMcParticles>();
838836
839837 // now we check the realness of our prompt photons
@@ -952,12 +950,12 @@ struct statPromptPhoton {
952950 if (std::fabs (mom1) > 40 && std::fabs (mom1) > 0 )
953951 continue ;
954952
955- if (cfgDebug){
956- std::cout<< " We have a REC prompt photon" << std::endl;
957- std::cout<< " Photon gen status code: " << clusterparticle.getGenStatusCode ()<< std::endl;
958- std::cout<< " Photon mom 1: " << mom1<< std::endl;
959- std::cout<< " Photon mom 2: " << mom2<< std::endl;
960- }
953+ if (cfgDebug) {
954+ std::cout << " We have a REC prompt photon" << std::endl;
955+ std::cout << " Photon gen status code: " << clusterparticle.getGenStatusCode () << std::endl;
956+ std::cout << " Photon mom 1: " << mom1 << std::endl;
957+ std::cout << " Photon mom 2: " << mom2 << std::endl;
958+ }
961959 if (std::abs (clusterparticle.getGenStatusCode ()) > 19 && std::abs (clusterparticle.getGenStatusCode ()) < 90 ) {
962960 histos.fill (HIST (" REC_True_Prompt_Trigger_Energy" ), clusterparticle.e ());
963961 TLorentzVector lRealPhoton;
@@ -969,12 +967,12 @@ struct statPromptPhoton {
969967 } // photon check
970968 } // clusterparticle loop
971969 /*
972- if(chPe>0){
973- if(photontrigger){
974- if(chPe/mccluster.energy() < 0.50){
975- goodgentrigger=true;
976- }
977- }
970+ if(chPe>0){
971+ if(photontrigger){
972+ if(chPe/mccluster.energy() < 0.50){
973+ goodgentrigger=true;
974+ }
975+ }
978976 */
979977 if (goodgentrigger && photontrigger) {
980978 histos.fill (HIST (" REC_Trigger_Purity" ), 0.5 );
@@ -1094,12 +1092,12 @@ struct statPromptPhoton {
10941092 {
10951093
10961094 nEventsData++;
1097- if (cfgDebug){
1098- if (nEventsData== 1 ) {
1099- std::cout << " Starting Data Processing: " << nEventsData << std::endl;
1095+ if (cfgDebug) {
1096+ if (nEventsData == 1 ) {
1097+ std::cout << " Starting Data Processing: " << nEventsData << std::endl;
11001098 }
11011099 if ((nEventsData + 1 ) % 10000 == 0 ) {
1102- std::cout << " Processed Data Events: " << nEventsData << std::endl;
1100+ std::cout << " Processed Data Events: " << nEventsData << std::endl;
11031101 }
11041102 }
11051103 histos.fill (HIST (" DATA_nEvents" ), 0.5 );
@@ -1208,25 +1206,24 @@ struct statPromptPhoton {
12081206 bool phitrigger = false ;
12091207 double phidiff = TVector2::Phi_mpi_pi (cluster.phi () - ogtrack.phi ());
12101208 double etadiff = cluster.eta () - ogtrack.eta ();
1211- if (cfgPtClusterCut){
1212- if (fabs (etaT - etaC) < (0.010 + pow (ptT + 4.07 , -2.5 ))) {
1213- etatrigger = true ;
1214- }
1215-
1216- if (fabs (TVector2::Phi_mpi_pi (phiT - phiC)) < (0.015 + pow (ptT + 3.65 , -2.0 ))) {
1217- phitrigger = true ;
1218- }
1219- }
1220- else {
1221- if (fabs (etadiff) < 0.05 ) {
1222- etatrigger = true ;
1223- }
1224-
1225- if (fabs (phidiff) < 0.05 ) {
1226- phitrigger = true ;
1227- }
1228- }
1229-
1209+ if (cfgPtClusterCut) {
1210+ if (fabs (etaT - etaC) < (0.010 + pow (ptT + 4.07 , -2.5 ))) {
1211+ etatrigger = true ;
1212+ }
1213+
1214+ if (fabs (TVector2::Phi_mpi_pi (phiT - phiC)) < (0.015 + pow (ptT + 3.65 , -2.0 ))) {
1215+ phitrigger = true ;
1216+ }
1217+ } else {
1218+ if (fabs (etadiff) < 0.05 ) {
1219+ etatrigger = true ;
1220+ }
1221+
1222+ if (fabs (phidiff) < 0.05 ) {
1223+ phitrigger = true ;
1224+ }
1225+ }
1226+
12301227 if (etatrigger && phitrigger) {
12311228 chargetrigger = true ;
12321229 sumptT += ptT;
0 commit comments