3636#include < Framework/HistogramSpec.h>
3737#include < Framework/runDataProcessing.h>
3838
39+ #include < map>
40+
3941using namespace o2 ;
4042using namespace o2 ::analysis;
4143using namespace o2 ::framework;
@@ -60,6 +62,7 @@ static const int CinnerFV0 = 32;
6062std::array<float , nCellsFV0> rhoLatticeFV0{0 };
6163std::array<float , nCellsFV0> fv0AmplitudeWoCalib{0 };
6264float calib[48 ] = {1.01697 , 1.122 , 1.03854 , 1.108 , 1.11634 , 1.14971 , 1.19321 , 1.06866 , 0.954675 , 0.952695 , 0.969853 , 0.957557 , 0.989784 , 1.01549 , 1.02182 , 0.976005 , 1.01865 , 1.06871 , 1.06264 , 1.02969 , 1.07378 , 1.06622 , 1.15057 , 1.0433 , 0.83654 , 0.847178 , 0.890027 , 0.920814 , 0.888271 , 1.04662 , 0.8869 , 0.856348 , 0.863181 , 0.906312 , 0.902166 , 1.00122 , 1.03303 , 0.887866 , 0.892437 , 0.906278 , 0.884976 , 0.864251 , 0.917221 , 1.10618 , 1.04028 , 0.893184 , 0.915734 , 0.892676 };
65+ std::map<int , int > ChannelsToRings = {{0 ,0 },{1 ,1 },{2 ,2 },{3 ,3 },{4 ,7 },{5 ,6 },{6 ,5 },{7 ,4 },{8 ,8 },{9 ,9 },{10 ,10 },{11 ,11 },{12 ,15 },{13 ,14 },{14 ,13 },{15 ,12 },{16 ,16 },{17 ,17 },{18 ,18 },{19 ,19 },{20 ,23 },{21 ,22 },{22 ,21 },{23 ,20 },{24 ,24 },{25 ,25 },{26 ,26 },{27 ,27 },{28 ,31 },{29 ,30 },{30 ,29 },{31 ,28 },{32 ,32 },{33 ,34 },{34 ,36 },{35 ,38 },{36 ,47 },{37 ,45 },{38 ,43 },{39 ,41 },{40 ,33 },{41 ,35 },{42 ,37 },{43 ,39 },{44 ,46 },{45 ,44 },{46 ,42 },{47 ,40 }};
6366
6467struct HfTaskFlattenicityD0Lc {
6568 Configurable<int > selectionFlagD0{" selectionFlagD0" , 1 , " Selection Flag for D0" };
@@ -429,7 +432,7 @@ struct HfTaskFlattenicityD0Lc {
429432 {
430433 runAnalysisData (collisions, selectedD0Candidates, selectedLcCandidates, bcs, tracks);
431434 }
432- PROCESS_SWITCH (FlattenicityD0Lc , processData, " Process data" , false );
435+ PROCESS_SWITCH (HfTaskFlattenicityD0Lc , processData, " Process data" , true );
433436
434437 void processMCD0 (D0CandidatesMc const &,
435438 soa::Join<aod::McParticles, aod::HfCand2ProngMcGen> const & mcParticles2prong,
@@ -441,7 +444,7 @@ struct HfTaskFlattenicityD0Lc {
441444 {
442445 runAnalysisMCD0<aod::hf_cand::VertexerType::DCAFitter>(selectedD0CandidatesMc, mcParticles2prong, tracks, collisions, mcCollisions, bcs);
443446 }
444- PROCESS_SWITCH (FlattenicityD0Lc , processMCD0, " Process MC D0 with DCAFitter" , true );
447+ PROCESS_SWITCH (HfTaskFlattenicityD0Lc , processMCD0, " Process MC D0 with DCAFitter" , false );
445448
446449 void processMCLc (soa::Join<aod::McParticles, aod::HfCand3ProngMcGen> const & mcParticles3prong,
447450 TracksSelQuality const & tracks,
@@ -453,7 +456,7 @@ struct HfTaskFlattenicityD0Lc {
453456 {
454457 runAnalysisMCLc<aod::hf_cand::VertexerType::DCAFitter>(selectedLcCandidatesMc, mcParticles3prong, tracks, collisions, mcCollisions, bcs);
455458 }
456- PROCESS_SWITCH (FlattenicityD0Lc , processMCLc, " Process MC Lc with DCAFitter" , true );
459+ PROCESS_SWITCH (HfTaskFlattenicityD0Lc , processMCLc, " Process MC Lc with DCAFitter" , false );
457460
458461 template <typename CollType, typename CandTypeD0, typename CandTypeLc, typename BCsType>
459462 void runAnalysisData (CollType const & collisions,
@@ -1055,7 +1058,7 @@ struct HfTaskFlattenicityD0Lc {
10551058 for (std::size_t ich = 0 ; ich < fv0.channel ().size (); ich++) {
10561059 float amplCh = fv0.amplitude ()[ich];
10571060 int chv0 = fv0.channel ()[ich];
1058- int chv0phi = getFV0IndexPhi (chv0);
1061+ int chv0phi = ChannelsToRings. at (chv0);
10591062 if (amplCh > 0.0 ) {
10601063 if (chv0phi > 0.0 ) {
10611064 fv0AmplitudeWoCalib[chv0phi] = amplCh;
@@ -1121,105 +1124,9 @@ struct HfTaskFlattenicityD0Lc {
11211124 }
11221125 return flat;
11231126 }
1124-
1125- int getFV0IndexPhi (int i_ch)
1126- {
1127- int iRing = -1 ;
1128-
1129- if (i_ch >= 0 && i_ch < 8 ) {
1130- if (i_ch < 4 ) {
1131- iRing = i_ch;
1132- } else {
1133- if (i_ch == 7 ) {
1134- iRing = 4 ;
1135- } else if (i_ch == 6 ) {
1136- iRing = 5 ;
1137- } else if (i_ch == 5 ) {
1138- iRing = 6 ;
1139- } else if (i_ch == 4 ) {
1140- iRing = 7 ;
1141- }
1142- }
1143- } else if (i_ch >= 8 && i_ch < 16 ) {
1144- if (i_ch < 12 ) {
1145- iRing = i_ch;
1146- } else {
1147- if (i_ch == 15 ) {
1148- iRing = 12 ;
1149- } else if (i_ch == 14 ) {
1150- iRing = 13 ;
1151- } else if (i_ch == 13 ) {
1152- iRing = 14 ;
1153- } else if (i_ch == 12 ) {
1154- iRing = 15 ;
1155- }
1156- }
1157- } else if (i_ch >= 16 && i_ch < 24 ) {
1158- if (i_ch < 20 ) {
1159- iRing = i_ch;
1160- } else {
1161- if (i_ch == 23 ) {
1162- iRing = 20 ;
1163- } else if (i_ch == 22 ) {
1164- iRing = 21 ;
1165- } else if (i_ch == 21 ) {
1166- iRing = 22 ;
1167- } else if (i_ch == 20 ) {
1168- iRing = 23 ;
1169- }
1170- }
1171- } else if (i_ch >= 24 && i_ch < 32 ) {
1172- if (i_ch < 28 ) {
1173- iRing = i_ch;
1174- } else {
1175- if (i_ch == 31 ) {
1176- iRing = 28 ;
1177- } else if (i_ch == 30 ) {
1178- iRing = 29 ;
1179- } else if (i_ch == 29 ) {
1180- iRing = 30 ;
1181- } else if (i_ch == 28 ) {
1182- iRing = 31 ;
1183- }
1184- }
1185- } else if (i_ch == 32 ) {
1186- iRing = 32 ;
1187- } else if (i_ch == 40 ) {
1188- iRing = 33 ;
1189- } else if (i_ch == 33 ) {
1190- iRing = 34 ;
1191- } else if (i_ch == 41 ) {
1192- iRing = 35 ;
1193- } else if (i_ch == 34 ) {
1194- iRing = 36 ;
1195- } else if (i_ch == 42 ) {
1196- iRing = 37 ;
1197- } else if (i_ch == 35 ) {
1198- iRing = 38 ;
1199- } else if (i_ch == 43 ) {
1200- iRing = 39 ;
1201- } else if (i_ch == 47 ) {
1202- iRing = 40 ;
1203- } else if (i_ch == 39 ) {
1204- iRing = 41 ;
1205- } else if (i_ch == 46 ) {
1206- iRing = 42 ;
1207- } else if (i_ch == 38 ) {
1208- iRing = 43 ;
1209- } else if (i_ch == 45 ) {
1210- iRing = 44 ;
1211- } else if (i_ch == 37 ) {
1212- iRing = 45 ;
1213- } else if (i_ch == 44 ) {
1214- iRing = 46 ;
1215- } else if (i_ch == 36 ) {
1216- iRing = 47 ;
1217- }
1218- return iRing;
1219- }
12201127};
12211128
12221129WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
12231130{
1224- return WorkflowSpec{adaptAnalysisTask<FlattenicityD0Lc >(cfgc)};
1131+ return WorkflowSpec{adaptAnalysisTask<HfTaskFlattenicityD0Lc >(cfgc)};
12251132}
0 commit comments