1313// / \file jetChargedV2.cxx
1414// / \brief This file contains the implementation for the Charged Jet v2 analysis in the ALICE experiment
1515
16- #include < chrono>
17- #include < string>
18- #include < vector>
19- #include < cmath>
20- #include < TRandom3.h>
21- #include < THn.h>
22- #include < THnSparse.h>
23- #include < algorithm>
24- #include < TComplex.h>
25- #include < TH1F.h>
26- #include < TH2D.h>
27- #include < TMath.h>
28- #include < TVector2.h>
29-
30- #include " Framework/ASoA.h"
31- #include " Framework/AnalysisDataModel.h"
32- #include " Framework/AnalysisTask.h"
33- #include " Framework/O2DatabasePDGPlugin.h"
34- #include " Framework/HistogramRegistry.h"
35- #include " Framework/runDataProcessing.h"
36-
3716#include " PWGJE/Core/FastJetUtilities.h"
17+ #include " PWGJE/Core/JetDerivedDataUtilities.h"
3818#include " PWGJE/Core/JetFinder.h"
3919#include " PWGJE/Core/JetFindingUtilities.h"
4020#include " PWGJE/DataModel/Jet.h"
41- #include " PWGJE/Core/JetDerivedDataUtilities.h"
4221
22+ #include " Common/Core/EventPlaneHelper.h"
4323#include " Common/Core/TrackSelection.h"
4424#include " Common/Core/TrackSelectionDefaults.h"
4525#include " Common/DataModel/EventSelection.h"
26+ #include " Common/DataModel/Qvectors.h"
4627#include " Common/DataModel/TrackSelectionTables.h"
47-
48- #include " Framework/ASoAHelpers.h"
4928#include " EventFiltering/filterTables.h"
5029
30+ #include " CommonConstants/PhysicsConstants.h"
31+ #include " Framework/ASoA.h"
32+ #include " Framework/ASoAHelpers.h"
33+ #include " Framework/AnalysisDataModel.h"
34+ #include " Framework/AnalysisTask.h"
35+ #include " Framework/HistogramRegistry.h"
36+ #include " Framework/O2DatabasePDGPlugin.h"
5137#include " Framework/RunningWorkflowInfo.h"
5238#include " Framework/StaticFor.h"
53- #include " Common/DataModel/Qvectors.h"
54- #include " Common/Core/EventPlaneHelper.h"
55- #include " CommonConstants/PhysicsConstants.h"
39+ #include " Framework/runDataProcessing.h"
40+
41+ #include < TComplex.h>
42+ #include < TH1F.h>
43+ #include < TH2D.h>
44+ #include < THn.h>
45+ #include < THnSparse.h>
46+ #include < TMath.h>
47+ #include < TRandom3.h>
48+ #include < TVector2.h>
49+
50+ #include < algorithm>
51+ #include < chrono>
52+ #include < cmath>
53+ #include < string>
54+ #include < vector>
5655
5756using namespace o2 ;
5857using namespace o2 ::framework;
@@ -1406,17 +1405,17 @@ struct JetChargedV2 {
14061405 }
14071406 }
14081407 }
1409-
1408+
14101409 const char * fitFunctionV2v3P = " [0] * (1. + 2. * ([1] * std::cos(2. * (x - [2])) + [3] * std::cos(3. * (x - [4]))))" ;
14111410 fFitModulationV2v3P = new TF1 (" fit_kV3" , fitFunctionV2v3P, 0 , o2::constants::math::TwoPI);
14121411 // =========================< set parameter >=========================//
14131412 fFitModulationV2v3P ->SetParameter (0 , 1 .);
14141413 fFitModulationV2v3P ->SetParameter (1 , 0.01 );
14151414 fFitModulationV2v3P ->SetParameter (3 , 0.01 );
1416-
1415+
14171416 double ep2fix = 0 .;
14181417 double ep3fix = 0 .;
1419-
1418+
14201419 if (ep2 < 0 ) {
14211420 ep2fix = RecoDecay::constrainAngle (ep2);
14221421 fFitModulationV2v3P ->FixParameter (2 , ep2fix);
@@ -1429,9 +1428,9 @@ struct JetChargedV2 {
14291428 } else {
14301429 fFitModulationV2v3P ->FixParameter (4 , ep3);
14311430 }
1432-
1431+
14331432 hPtsumSumptFitMCP->Fit (fFitModulationV2v3P , " Q" , " ep" , 0 , o2::constants::math::TwoPI);
1434-
1433+
14351434 double temppara[5 ];
14361435 temppara[0 ] = fFitModulationV2v3P ->GetParameter (0 );
14371436 temppara[1 ] = fFitModulationV2v3P ->GetParameter (1 );
@@ -1446,15 +1445,15 @@ struct JetChargedV2 {
14461445 registry.fill (HIST (" h_mcp_fitparaPsi2_evtnum" ), evtnum, temppara[2 ]);
14471446 registry.fill (HIST (" h_mcp_fitparav3obs_evtnum" ), evtnum, temppara[3 ]);
14481447 registry.fill (HIST (" h_mcp_fitparaPsi3_evtnum" ), evtnum, temppara[4 ]);
1449-
1448+
14501449 registry.fill (HIST (" h_mcp_v2obs_centrality" ), collision.centrality (), temppara[1 ]);
14511450 registry.fill (HIST (" h_mcp_v3obs_centrality" ), collision.centrality (), temppara[3 ]);
14521451 registry.fill (HIST (" h_mcp_evtnum_centrlity" ), evtnum, collision.centrality ());
1453-
1452+
14541453 for (uint i = 0 ; i < cfgnMods->size (); i++) {
14551454 int nmode = cfgnMods->at (i);
14561455 int detInd = detId * 4 + cfgnTotalSystem * 4 * (nmode - 2 );
1457-
1456+
14581457 for (auto const & jet : jets) {
14591458 if (!jetfindingutilities::isInEtaAcceptance (jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
14601459 continue ;
@@ -1465,22 +1464,22 @@ struct JetChargedV2 {
14651464 if (jet.r () != round (selectedJetsRadius * 100 .0f )) {
14661465 continue ;
14671466 }
1468-
1467+
14691468 double integralValue = fFitModulationV2v3P ->Integral (jet.phi () - jetRadius, jet.phi () + jetRadius);
14701469 double rholocal = collision.rho () / (2 * jetRadius * temppara[0 ]) * integralValue;
14711470 registry.fill (HIST (" h3_mcp_centrality_localrho_phi" ), collision.centrality (), rholocal, jet.phi () - ep2);
1472-
1471+
14731472 if (nmode == cfgNmodA) {
14741473 registry.fill (HIST (" h_mcp_jet_pt_rholocal" ), jet.pt () - (rholocal * jet.area ()), 1.0 );
1475-
1474+
14761475 double phiMinusPsi2;
14771476 if (collision.qvecAmp ()[detId] < collQvecAmpDetId) {
14781477 continue ;
14791478 }
14801479 phiMinusPsi2 = jet.phi () - ep2;
1481-
1480+
14821481 registry.fill (HIST (" h2_mcp_phi_rholocal" ), jet.phi () - ep2, rholocal, 1.0 );
1483-
1482+
14841483 if ((phiMinusPsi2 < o2::constants::math::PIQuarter) || (phiMinusPsi2 >= evtPlnAngleA * o2::constants::math::PIQuarter) || (phiMinusPsi2 >= evtPlnAngleB * o2::constants::math::PIQuarter && phiMinusPsi2 < evtPlnAngleC * o2::constants::math::PIQuarter)) {
14851484 registry.fill (HIST (" h_mcp_jet_pt_in_plane_v2_rho" ), jet.pt () - (rholocal * jet.area ()), 1.0 );
14861485 registry.fill (HIST (" h2_mcp_centrality_jet_pt_in_plane_v2_rho" ), collision.centrality (), jet.pt () - (rholocal * jet.area ()), 1.0 );
@@ -1495,7 +1494,7 @@ struct JetChargedV2 {
14951494 }
14961495 ep3 = helperEP.GetEventPlane (collision.qvecRe ()[detInd], collision.qvecIm ()[detInd], nmode);
14971496 phiMinusPsi3 = jet.phi () - ep3;
1498-
1497+
14991498 if ((phiMinusPsi3 < o2::constants::math::PIQuarter) || (phiMinusPsi3 >= evtPlnAngleA * o2::constants::math::PIQuarter) || (phiMinusPsi3 >= evtPlnAngleB * o2::constants::math::PIQuarter && phiMinusPsi3 < evtPlnAngleC * o2::constants::math::PIQuarter)) {
15001499 registry.fill (HIST (" h_mcp_jet_pt_in_plane_v3_rho" ), jet.pt () - (rholocal * jet.area ()), 1.0 );
15011500 registry.fill (HIST (" h2_mcp_centrality_jet_pt_in_plane_v3_rho" ), collision.centrality (), jet.pt () - (rholocal * jet.area ()), 1.0 );
@@ -1514,12 +1513,12 @@ struct JetChargedV2 {
15141513 float randomConePt = 0 ;
15151514 double integralValueRC = fFitModulationV2v3P ->Integral (randomConePhi - randomConeR, randomConePhi + randomConeR);
15161515 double rholocalRC = collision.rho () / (2 * randomConeR * temppara[0 ]) * integralValueRC;
1517-
1516+
15181517 int nmode = cfgnMods->at (i);
15191518 if (nmode == cfgNmodA) {
15201519 double rcPhiPsi2;
15211520 rcPhiPsi2 = randomConePhi - ep2;
1522-
1521+
15231522 for (auto const & track : tracks) {
15241523 if (jetderiveddatautilities::selectTrack (track, trackSelection)) {
15251524 float dPhi = RecoDecay::constrainAngle (track.phi () - randomConePhi, static_cast <float >(-o2::constants::math::PI));
@@ -1530,12 +1529,12 @@ struct JetChargedV2 {
15301529 }
15311530 }
15321531 registry.fill (HIST (" h3_mcp_centrality_deltapT_RandomCornPhi_localrhovsphi" ), collision.centrality (), randomConePt - o2::constants::math::PI * randomConeR * randomConeR * rholocalRC, rcPhiPsi2, 1.0 );
1533-
1532+
15341533 // removing the leading jet from the random cone
15351534 if (jets.size () > 0 ) { // if there are no jets in the acceptance (from the jetfinder cuts) then there can be no leading jet
15361535 float dPhiLeadingJet = RecoDecay::constrainAngle (jets.iteratorAt (0 ).phi () - randomConePhi, static_cast <float >(-o2::constants::math::PI));
15371536 float dEtaLeadingJet = jets.iteratorAt (0 ).eta () - randomConeEta;
1538-
1537+
15391538 bool jetWasInCone = false ;
15401539 while ((randomConeLeadJetDeltaR <= 0 && (std::sqrt (dEtaLeadingJet * dEtaLeadingJet + dPhiLeadingJet * dPhiLeadingJet) < jets.iteratorAt (0 ).r () / 100.0 + randomConeR)) || (randomConeLeadJetDeltaR > 0 && (std::sqrt (dEtaLeadingJet * dEtaLeadingJet + dPhiLeadingJet * dPhiLeadingJet) < randomConeLeadJetDeltaR))) {
15411540 jetWasInCone = true ;
0 commit comments