99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
1111
12+ // / \file FlowPtContainer.cxx
13+ // / \brief Task to analyse angular and transverse momentum correlations with GFW
14+ // / \author Emil Gorm Nielsen, NBI, [email protected] 15+
1216#include < CCDB/BasicCCDBManager.h>
1317#include < DataFormatsParameters/GRPObject.h>
1418#include < DataFormatsParameters/GRPMagField.h>
@@ -125,7 +129,7 @@ struct GenericFramework {
125129 // Define output
126130 OutputObj<FlowContainer> fFC {FlowContainer (" FlowContainer" )};
127131 OutputObj<FlowPtContainer> fFCpt {FlowPtContainer (" FlowPtContainer" )};
128- OutputObj<FlowContainer> fFC_gen {FlowContainer (" FlowContainer_gen" )};
132+ OutputObj<FlowContainer> fFCgen {FlowContainer (" FlowContainer_gen" )};
129133 OutputObj<TList> fWeightList {" WeightList" , OutputObjHandlingPolicy::AnalysisObject};
130134 HistogramRegistry registry{" registry" };
131135
@@ -286,9 +290,9 @@ struct GenericFramework {
286290 fFC ->Initialize (oba, multAxis, cfgNbootstrap);
287291 }
288292 if (doprocessMCGen) {
289- fFC_gen ->SetName (" FlowContainer_gen" );
290- fFC_gen ->SetXAxis (fPtAxis );
291- fFC_gen ->Initialize (oba, multAxis, cfgNbootstrap);
293+ fFCgen ->SetName (" FlowContainer_gen" );
294+ fFCgen ->SetXAxis (fPtAxis );
295+ fFCgen ->Initialize (oba, multAxis, cfgNbootstrap);
292296 }
293297 delete oba;
294298 fFCpt ->setUseCentralMoments (cfgUseCentralMoments);
@@ -594,7 +598,7 @@ struct GenericFramework {
594598 return true ;
595599 }
596600
597- enum datatype {
601+ enum DataType {
598602 kReco ,
599603 kGen
600604 };
@@ -655,7 +659,7 @@ struct GenericFramework {
655659 return ;
656660 }
657661
658- template <datatype dt>
662+ template <DataType dt>
659663 void fillOutputContainers (const float & centmult, const double & rndm)
660664 {
661665 fFCpt ->calculateCorrelations ();
@@ -670,25 +674,25 @@ struct GenericFramework {
670674 continue ;
671675 auto val = fGFW ->Calculate (corrconfigs.at (l_ind), 0 , kFALSE ).real () / dnx;
672676 if (std::abs (val) < 1 ) {
673- (dt == kGen ) ? fFC_gen ->FillProfile (corrconfigs.at (l_ind).Head .c_str (), centmult, val, dnx, rndm) : fFC ->FillProfile (corrconfigs.at (l_ind).Head .c_str (), centmult, val, dnx, rndm);
677+ (dt == kGen ) ? fFCgen ->FillProfile (corrconfigs.at (l_ind).Head .c_str (), centmult, val, dnx, rndm) : fFC ->FillProfile (corrconfigs.at (l_ind).Head .c_str (), centmult, val, dnx, rndm);
674678 if (cfgUseGapMethod)
675679 fFCpt ->fillVnPtProfiles (centmult, val, dnx, rndm, configs.GetpTCorrMasks ()[l_ind]);
676680 }
677681 continue ;
678682 }
679- for (Int_t i = 1 ; i <= fPtAxis ->GetNbins (); i++) {
683+ for (int i = 1 ; i <= fPtAxis ->GetNbins (); i++) {
680684 auto dnx = fGFW ->Calculate (corrconfigs.at (l_ind), i - 1 , kTRUE ).real ();
681685 if (dnx == 0 )
682686 continue ;
683687 auto val = fGFW ->Calculate (corrconfigs.at (l_ind), i - 1 , kFALSE ).real () / dnx;
684688 if (std::abs (val) < 1 )
685- (dt == kGen ) ? fFC_gen ->FillProfile (Form (" %s_pt_%i" , corrconfigs.at (l_ind).Head .c_str (), i), centmult, val, dnx, rndm) : fFC ->FillProfile (Form (" %s_pt_%i" , corrconfigs.at (l_ind).Head .c_str (), i), centmult, val, dnx, rndm);
689+ (dt == kGen ) ? fFCgen ->FillProfile (Form (" %s_pt_%i" , corrconfigs.at (l_ind).Head .c_str (), i), centmult, val, dnx, rndm) : fFC ->FillProfile (Form (" %s_pt_%i" , corrconfigs.at (l_ind).Head .c_str (), i), centmult, val, dnx, rndm);
686690 }
687691 }
688692 return ;
689693 }
690694
691- template <datatype dt, typename TCollision, typename TTracks>
695+ template <DataType dt, typename TCollision, typename TTracks>
692696 void processCollision (TCollision collision, TTracks tracks, const float & centrality, const int & field)
693697 {
694698 if (tracks.size () < 1 )
@@ -699,12 +703,12 @@ struct GenericFramework {
699703 float vtxz = collision.posZ ();
700704 fGFW ->Clear ();
701705 fFCpt ->clearVector ();
702- float l_Random = fRndm ->Rndm ();
706+ float lRandom = fRndm ->Rndm ();
703707 for (const auto & track : tracks) {
704708 processTrack (track, centrality, vtxz, field);
705709 }
706710 if (!cfgFillWeights)
707- fillOutputContainers<dt>((cfgUseNch) ? tracks.size () : centrality, l_Random );
711+ fillOutputContainers<dt>((cfgUseNch) ? tracks.size () : centrality, lRandom );
708712 }
709713
710714 template <typename TTrack>
@@ -726,21 +730,21 @@ struct GenericFramework {
726730 if (cfgUseAdditionalTrackCut && !trackSelected (track, field))
727731 return ;
728732
729- int pid_index = 0 ;
733+ int pidIndex = 0 ;
730734 if (cfgUsePID) {
731735 if (mcParticle.pdgCode () == 211 )
732- pid_index = 1 ;
736+ pidIndex = 1 ;
733737 if (mcParticle.pdgCode () == 321 )
734- pid_index = 2 ;
738+ pidIndex = 2 ;
735739 if (mcParticle.pdgCode () == 2212 )
736- pid_index = 3 ;
740+ pidIndex = 3 ;
737741 }
738742
739743 if (cfgFillWeights) {
740744 fillWeights (mcParticle, vtxz, centrality, 0 );
741745 } else {
742746 fillPtSums<kReco >(track, vtxz);
743- fillGFW<kReco >(mcParticle, vtxz, pid_index );
747+ fillGFW<kReco >(mcParticle, vtxz, pidIndex );
744748 }
745749
746750 if (cfgFillQA)
@@ -755,18 +759,18 @@ struct GenericFramework {
755759 if (track.eta () < etalow || track.eta () > etaup || track.pt () < ptlow || track.pt () > ptup)
756760 return ;
757761
758- int pid_index = 0 ;
762+ int pidIndex = 0 ;
759763 if (cfgUsePID) {
760764 if (track.pdgCode () == 211 )
761- pid_index = 1 ;
765+ pidIndex = 1 ;
762766 if (track.pdgCode () == 321 )
763- pid_index = 2 ;
767+ pidIndex = 2 ;
764768 if (track.pdgCode () == 2212 )
765- pid_index = 3 ;
769+ pidIndex = 3 ;
766770 }
767771
768772 fillPtSums<kGen >(track, vtxz);
769- fillGFW<kGen >(track, vtxz, pid_index );
773+ fillGFW<kGen >(track, vtxz, pidIndex );
770774
771775 if (cfgFillQA)
772776 fillTrackQA<kGen , kAfter >(track, vtxz);
@@ -779,23 +783,23 @@ struct GenericFramework {
779783 if (cfgUseAdditionalTrackCut && !trackSelected (track, field))
780784 return ;
781785
782- int pid_index = 0 ;
786+ int pidIndex = 0 ;
783787 if (cfgUsePID) {
784788 // pid_index = getBayesPIDIndex(track);
785- pid_index = getNsigmaPID (track);
789+ pidIndex = getNsigmaPID (track);
786790 }
787791 if (cfgFillWeights) {
788- fillWeights (track, vtxz, centrality, pid_index );
792+ fillWeights (track, vtxz, centrality, pidIndex );
789793 } else {
790794 fillPtSums<kReco >(track, vtxz);
791- fillGFW<kReco >(track, vtxz, pid_index );
795+ fillGFW<kReco >(track, vtxz, pidIndex );
792796 }
793797 if (cfgFillQA)
794798 fillTrackQA<kReco , kAfter >(track, vtxz);
795799 }
796800 }
797801
798- template <datatype dt, typename TTrack>
802+ template <DataType dt, typename TTrack>
799803 inline void fillPtSums (TTrack track, const double & vtxz)
800804 {
801805 double wacc = (dt == kGen ) ? 1 . : getAcceptance (track, vtxz, -1 );
@@ -813,32 +817,32 @@ struct GenericFramework {
813817 }
814818 }
815819
816- template <datatype dt, typename TTrack>
820+ template <DataType dt, typename TTrack>
817821 inline void fillGFW (TTrack track, const double & vtxz, int pid_index)
818822 {
819823 if (cfgUsePID) { // Analysing POI flow with id'ed particles
820824 double ptmins[] = {ptpoilow, ptpoilow, 0.3 , 0.5 };
821825 double ptmaxs[] = {ptpoiup, ptpoiup, 6.0 , 6.0 };
822- bool WithinPtRef = (track.pt () > ptreflow && track.pt () < ptrefup);
823- bool WithinPtPOI = (track.pt () > ptmins[pid_index] && track.pt () < ptmaxs[pid_index]);
824- bool WithinPtNch = (track.pt () > ptmins[0 ] && track.pt () < ptmaxs[0 ]);
825- if (!WithinPtPOI && !WithinPtRef )
826+ bool withinPtRef = (track.pt () > ptreflow && track.pt () < ptrefup);
827+ bool withinPtPOI = (track.pt () > ptmins[pid_index] && track.pt () < ptmaxs[pid_index]);
828+ bool withinPtNch = (track.pt () > ptmins[0 ] && track.pt () < ptmaxs[0 ]);
829+ if (!withinPtPOI && !withinPtRef )
826830 return ;
827- double wacc_ref = (dt == kGen ) ? 1 . : getAcceptance (track, vtxz, -1 );
828- double wacc_poi = (dt == kGen ) ? 1 . : WithinPtPOI ? getAcceptance (track, vtxz, pid_index)
831+ double waccRef = (dt == kGen ) ? 1 . : getAcceptance (track, vtxz, -1 );
832+ double waccPOI = (dt == kGen ) ? 1 . : withinPtPOI ? getAcceptance (track, vtxz, pid_index)
829833 : getAcceptance (track, vtxz, 0 ); //
830- if (WithinPtRef && WithinPtPOI && pid_index)
831- wacc_ref = wacc_poi ; // if particle is both (then it's overlap), override ref with POI
832- if (WithinPtRef )
833- fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc_ref , 1 );
834- if (WithinPtPOI && pid_index)
835- fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc_poi , (1 << (pid_index + 1 )));
836- if (WithinPtNch )
837- fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc_poi , 2 );
838- if (WithinPtPOI && WithinPtRef && pid_index)
839- fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc_poi , (1 << (pid_index + 5 )));
840- if (WithinPtNch && WithinPtRef )
841- fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc_poi , 32 );
834+ if (withinPtRef && withinPtPOI && pid_index)
835+ waccRef = waccPOI ; // if particle is both (then it's overlap), override ref with POI
836+ if (withinPtRef )
837+ fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), waccRef , 1 );
838+ if (withinPtPOI && pid_index)
839+ fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), waccPOI , (1 << (pid_index + 1 )));
840+ if (withinPtNch )
841+ fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), waccPOI , 2 );
842+ if (withinPtPOI && withinPtRef && pid_index)
843+ fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), waccPOI , (1 << (pid_index + 5 )));
844+ if (withinPtNch && withinPtRef )
845+ fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), waccPOI , 32 );
842846 } else { // Analysing only integrated flow
843847 double weff = (dt == kGen ) ? 1 . : getEfficiency (track);
844848 if (weff < 0 )
@@ -849,7 +853,7 @@ struct GenericFramework {
849853 return ;
850854 }
851855
852- template <datatype dt, QAFillTime ft, typename TTrack>
856+ template <DataType dt, QAFillTime ft, typename TTrack>
853857 inline void fillTrackQA (TTrack track, const float vtxz)
854858 {
855859 if constexpr (dt == kGen ) {
@@ -881,9 +885,9 @@ struct GenericFramework {
881885
882886 Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ;
883887 Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz;
884- using myTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA, aod::pidTOFPi, aod::pidTPCPi, aod::pidTOFKa, aod::pidTPCKa, aod::pidTOFPr, aod::pidTPCPr>>;
888+ using GFWTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA, aod::pidTOFPi, aod::pidTPCPi, aod::pidTOFKa, aod::pidTPCKa, aod::pidTOFPr, aod::pidTPCPr>>;
885889
886- void processData (soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs>>::iterator const & collision, aod::BCsWithTimestamps const &, myTracks const & tracks)
890+ void processData (soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs>>::iterator const & collision, aod::BCsWithTimestamps const &, GFWTracks const & tracks)
887891 {
888892 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
889893 int run = bc.runNumber ();
@@ -957,7 +961,7 @@ struct GenericFramework {
957961 }
958962 PROCESS_SWITCH (GenericFramework, processMCGen, " Process analysis for MC generated events" , false );
959963
960- void processRun2 (soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentRun2V0Ms>>::iterator const & collision, aod::BCsWithTimestamps const &, myTracks const & tracks)
964+ void processRun2 (soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentRun2V0Ms>>::iterator const & collision, aod::BCsWithTimestamps const &, GFWTracks const & tracks)
961965 {
962966 if (!collision.sel7 ())
963967 return ;
0 commit comments