@@ -50,7 +50,6 @@ namespace o2::aod
5050using FemtoFullCollision = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms>::iterator;
5151using FemtoFullCollisionMC = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms, aod::McCollisionLabels>::iterator;
5252using FemtoFullCollision_noCent_MC = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::McCollisionLabels>::iterator;
53- using FemtoFullCollision_CentPbPb = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms, aod::CentFT0Cs, aod::CentFV0As, aod::QvectorFT0CVecs>::iterator;
5453
5554using FemtoFullTracks = soa::Join<aod::FullTracks, aod::TracksDCA,
5655 aod::pidTPCFullEl, aod::pidTPCFullMu, aod::pidTPCFullPi, aod::pidTPCFullKa,
@@ -62,7 +61,6 @@ using FemtoFullTracks = soa::Join<aod::FullTracks, aod::TracksDCA,
6261struct femtoDreamProducerReducedTask {
6362
6463 Produces<aod::FDCollisions> outputCollision;
65- Produces<aod::FDExtQnCollisions> outputExtQnCollision;
6664 Produces<aod::FDParticles> outputParts;
6765 Produces<aod::FDMCParticles> outputPartsMC;
6866 Produces<aod::FDExtParticles> outputDebugParts;
@@ -101,47 +99,14 @@ struct femtoDreamProducerReducedTask {
10199 Configurable<std::vector<float >> ConfTrkITSnclsIbMin{FemtoDreamTrackSelection::getSelectionName (femtoDreamTrackSelection::kITSnClsIbMin , " ConfTrk" ), std::vector<float >{-1 .f , 1 .f }, FemtoDreamTrackSelection::getSelectionHelper (femtoDreamTrackSelection::kITSnClsIbMin , " Track selection: " )};
102100 Configurable<std::vector<float >> ConfTrkDCAxyMax{FemtoDreamTrackSelection::getSelectionName (femtoDreamTrackSelection::kDCAxyMax , " ConfTrk" ), std::vector<float >{0 .1f , 0 .5f }, FemtoDreamTrackSelection::getSelectionHelper (femtoDreamTrackSelection::kDCAxyMax , " Track selection: " )}; // / here we need an open cut to do the DCA fits later on!
103101 Configurable<std::vector<float >> ConfTrkDCAzMax{FemtoDreamTrackSelection::getSelectionName (femtoDreamTrackSelection::kDCAzMax , " ConfTrk" ), std::vector<float >{0 .2f , 0 .5f }, FemtoDreamTrackSelection::getSelectionHelper (femtoDreamTrackSelection::kDCAzMax , " Track selection: " )};
104- Configurable<std::vector<float >> ConfTrkPIDnSigmaMax{FemtoDreamTrackSelection::getSelectionName (femtoDreamTrackSelection::kPIDnSigmaMax , " ConfTrk " ), std::vector<float >{3 .5f , 3 .f , 2 .5f }, FemtoDreamTrackSelection::getSelectionHelper (femtoDreamTrackSelection::kPIDnSigmaMax , " Track selection: " )};
102+ Configurable<std::vector<float >> ConfTrkPIDnSigmaMax{FemtoDreamTrackSelection::getSelectionName (femtoDreamTrackSelection::kPIDnSigmaMax , " Conf " ), std::vector<float >{3 .5f , 3 .f , 2 .5f }, FemtoDreamTrackSelection::getSelectionHelper (femtoDreamTrackSelection::kPIDnSigmaMax , " Track selection: " )};
105103 // off set the center of the nsigma distribution to deal with bad TPC/TOF calibration
106104 Configurable<float > ConfTrkPIDnSigmaOffsetTPC{" ConfTrkPIDnSigmaOffsetTPC" , 0 ., " Offset for TPC nSigma because of bad calibration" };
107105 Configurable<float > ConfTrkPIDnSigmaOffsetTOF{" ConfTrkPIDnSigmaOffsetTOF" , 0 ., " Offset for TOF nSigma because of bad calibration" };
108106 Configurable<std::vector<int >> ConfTrkPIDspecies{" ConfTrkPIDspecies" , std::vector<int >{o2::track::PID::Pion, o2::track::PID::Kaon, o2::track::PID::Proton, o2::track::PID::Deuteron}, " Trk sel: Particles species for PID" };
109107
110- struct : o2::framework::ConfigurableGroup {
111- Configurable<bool > ConfgFlowCalculate{" ConfgFlowCalculate" , false , " Evt sel: Cumulant of flow" }; // To do
112- Configurable<bool > ConfgQnSeparation{" ConfgQnSeparation" , false , " Evt sel: Qn of event" };
113- Configurable<std::vector<float >> ConfQnBinSeparator{" ConfQnBinSeparator" , std::vector<float >{-999 .f , -999 .f , -999 .f }, " Qn bin separator" };
114- Configurable<float > ConfCentralityMax{" ConfCentralityMax" , 80 .f , " Evt sel: Maximum Centrality cut" };
115- Configurable<float > ConfCentBinWidth{" ConfCentBinWidth" , 1 .f , " Centrality bin length for qn separator" };
116- Configurable<int > ConfQnBinMin{" ConfQnBinMin" , 0 , " Minimum qn bin" };
117- Configurable<int > ConfQnBinMax{" ConfQnBinMax" , 10 , " Maximum qn bin" };
118- } qnCal;
119-
120- struct : o2::framework::ConfigurableGroup {
121- Configurable<bool > ConfIsPbPb{" ConfIsPbPb" , false , " Running on Run3 or Run2" }; // Choose if running on PbPb data
122- Configurable<bool > ConfIsUsePileUp{" ConfIsUsePileUp" , false , " Required for choosing whether to run the pile-up cuts" };
123- Configurable<bool > ConfEvNoSameBunchPileup{" ConfEvNoSameBunchPileup" , false , " Require kNoSameBunchPileup selection on Events." };
124- Configurable<bool > ConfEvIsGoodZvtxFT0vsPV{" ConfEvIsGoodZvtxFT0vsPV" , false , " Require kIsGoodZvtxFT0vsPV selection on Events." };
125- Configurable<bool > ConfEvIsGoodITSLayersAll{" ConfEvIsGoodITSLayersAll" , false , " Require kIsGoodITSLayersAll selection on Events." };
126- Configurable<bool > ConfEvNoCollInRofStandard{" ConfEvNoCollInRofStandard" , false , " Require kNoCollInRofStandard selection on Events." };
127- Configurable<bool > ConfEvNoHighMultCollInPrevRof{" ConfEvNoHighMultCollInPrevRof" , false , " Require kNoHighMultCollInPrevRof selection on Events." };
128- Configurable<bool > ConfEvNoCollInTimeRangeStandard{" ConfEvNoCollInTimeRangeStandard" , false , " Require kNoCollInTimeRangeStandard selection on Events." };
129- Configurable<bool > ConfEvIsVertexITSTPC{" ConfEvIsVertexITSTPC" , false , " Require kIsVertexITSTPC selection on Events" };
130- Configurable<int > ConfTPCOccupancyMin{" ConfTPCOccupancyMin" , 0 , " Minimum value for TPC Occupancy selection" };
131- Configurable<int > ConfTPCOccupancyMax{" ConfTPCOccupancyMax" , 1000 , " Maximum value for TPC Occupancy selection" };
132- } evtSel_PbPb;
133-
134- struct : o2::framework::ConfigurableGroup {
135- Configurable<bool > ConfTrkSpecialCuts{" ConfTrkSpecialCuts" , false , " Choose for special track cuts" };
136- Configurable<float > ConfTPCFracsClsMax{" ConfTPCFracsCls" , 0.4 , " Maximum value for fraction of shared TPC clusters" };
137- Configurable<float > ConfTPCChi2NClMax{" ConfTPCChi2NCl" , 2.5 , " Maximum value chi2 per cluster for TPC" };
138- Configurable<float > ConfITSChi2NClMax{" ConfITSChi2NCl" , 36 , " Maximum value chi2 per cluster for ITS" };
139- } specialTrkSel;
140- // Filter globalCutFilter = requireGlobalTrackInFilter();
141-
142108 HistogramRegistry qaRegistry{" QAHistos" , {}, OutputObjHandlingPolicy::AnalysisObject};
143109 HistogramRegistry Registry{" Tracks" , {}, OutputObjHandlingPolicy::AnalysisObject};
144- HistogramRegistry FlowRegistry{" Qn" , {}, OutputObjHandlingPolicy::AnalysisObject};
145110
146111 int mRunNumber ;
147112 float mMagField ;
@@ -174,11 +139,6 @@ struct femtoDreamProducerReducedTask {
174139 trackCuts.init <aod::femtodreamparticle::ParticleType::kTrack ,
175140 aod::femtodreamparticle::TrackType::kNoChild ,
176141 aod::femtodreamparticle::cutContainerType>(&qaRegistry, &Registry);
177-
178- if (qnCal.ConfgFlowCalculate ){
179- colCuts.initFlow (&FlowRegistry, qnCal.ConfgQnSeparation );
180- }
181-
182142 mRunNumber = 0 ;
183143 mMagField = 0.0 ;
184144 // / Initializing CCDB
@@ -365,174 +325,8 @@ struct femtoDreamProducerReducedTask {
365325 }
366326 }
367327
368- // Centrality (Multiplicity percentile) obtained from FT0C
369- // Pile-up rejection involved
370- template <bool isMC, bool useCentrality, typename CollisionType, typename TrackType>
371- void fillCollisionsAndTracks_PbPb (CollisionType const & col, TrackType const & tracks)
372- {
373- const auto vtxZ = col.posZ ();
374- const auto spher = colCuts.computeSphericity (col, tracks);
375- int mult = 0 ;
376- int multNtr = 0 ;
377- if (ConfIsRun3) {
378- if constexpr (useCentrality) {
379- mult = col.centFT0C ();
380- } else {
381- mult = 0 .;
382- }
383- multNtr = col.multNTracksPV ();
384- } else {
385- mult = 1 ; // multiplicity percentile is known in Run 2
386- multNtr = col.multTracklets ();
387- }
388- if (ConfEvtUseTPCmult) {
389- multNtr = col.multTPC ();
390- }
391-
392- // / First thing to do is to check whether the basic event selection criteria are fulfilled
393- // / That includes checking if there are any usable tracks in a collision
394- if (!colCuts.isSelectedCollision (col)) {
395- return ;
396- }
397- if (colCuts.isEmptyCollision (col, tracks, trackCuts)) {
398- return ;
399- }
400-
401- // Pileup rejection in PbPb data
402- if (evtSel_PbPb.ConfIsPbPb && evtSel_PbPb.ConfIsUsePileUp &&
403- !colCuts.isPileUpCollisionPbPb (col, evtSel_PbPb.ConfEvNoSameBunchPileup , evtSel_PbPb.ConfEvIsGoodZvtxFT0vsPV ,
404- evtSel_PbPb.ConfEvIsGoodITSLayersAll , evtSel_PbPb.ConfEvNoCollInRofStandard ,
405- evtSel_PbPb.ConfEvNoHighMultCollInPrevRof , evtSel_PbPb.ConfEvNoCollInTimeRangeStandard ,
406- evtSel_PbPb.ConfEvIsVertexITSTPC ,
407- evtSel_PbPb.ConfTPCOccupancyMin , evtSel_PbPb.ConfTPCOccupancyMax )) {
408- return ;
409- }
410-
411- // now the table is filled
412- outputCollision (vtxZ, mult, multNtr, spher, mMagField );
413- colCuts.fillQA (col, mult);
414-
415- // these IDs are necessary to keep track of the children
416- // since this producer only produces the tables for tracks, there are no children
417- std::vector<int > childIDs = {0 , 0 };
418- for (auto & track : tracks) {
419- // / if the most open selection criteria are not fulfilled there is no point looking further at the track
420- if (!trackCuts.isSelectedMinimal (track)) {
421- continue ;
422- }
423- if (specialTrkSel.ConfTrkSpecialCuts
424- && track.tpcFractionSharedCls ()>specialTrkSel.ConfTPCFracsClsMax
425- && track.tpcChi2NCl ()>specialTrkSel.ConfTPCChi2NClMax
426- && track.itsChi2NCl ()>specialTrkSel.ConfITSChi2NClMax ) {
427- continue ;
428- }
429-
430- trackCuts.fillQA <aod::femtodreamparticle::ParticleType::kTrack , aod::femtodreamparticle::TrackType::kNoChild >(track);
431- // an array of two bit-wise containers of the systematic variations is obtained
432- // one container for the track quality cuts and one for the PID cuts
433- auto cutContainer = trackCuts.getCutContainer <true , aod::femtodreamparticle::cutContainerType>(track, track.pt (), track.eta (), sqrtf (powf (track.dcaXY (), 2 .f ) + powf (track.dcaZ (), 2 .f )));
434-
435- // now the table is filled
436- outputParts (outputCollision.lastIndex (),
437- track.pt (),
438- track.eta (),
439- track.phi (),
440- aod::femtodreamparticle::ParticleType::kTrack ,
441- cutContainer.at (femtoDreamTrackSelection::TrackContainerPosition::kCuts ),
442- cutContainer.at (femtoDreamTrackSelection::TrackContainerPosition::kPID ),
443- track.dcaXY (), childIDs, 0 , 0 );
444- if constexpr (isMC) {
445- fillMCParticle (col, track, o2::aod::femtodreamparticle::ParticleType::kTrack );
446- }
447-
448- if (ConfIsDebug) {
449- outputDebugParts (track.sign (),
450- (uint8_t )track.tpcNClsFound (),
451- track.tpcNClsFindable (),
452- (uint8_t )track.tpcNClsCrossedRows (),
453- track.tpcNClsShared (),
454- track.tpcInnerParam (),
455- track.itsNCls (),
456- track.itsNClsInnerBarrel (),
457- track.dcaXY (),
458- track.dcaZ (),
459- track.tpcSignal (),
460- track.tpcNSigmaEl (),
461- track.tpcNSigmaPi (),
462- track.tpcNSigmaKa (),
463- track.tpcNSigmaPr (),
464- track.tpcNSigmaDe (),
465- track.tpcNSigmaTr (),
466- track.tpcNSigmaHe (),
467- track.tofNSigmaEl (),
468- track.tofNSigmaPi (),
469- track.tofNSigmaKa (),
470- track.tofNSigmaPr (),
471- track.tofNSigmaDe (),
472- track.tofNSigmaTr (),
473- track.tofNSigmaHe (),
474- -1 ,
475- track.itsNSigmaEl (),
476- track.itsNSigmaPi (),
477- track.itsNSigmaKa (),
478- track.itsNSigmaPr (),
479- track.itsNSigmaDe (),
480- track.itsNSigmaTr (),
481- track.itsNSigmaHe (),
482- -999 ., -999 ., -999 ., -999 ., -999 ., -999 .,
483- -999 ., -999 ., -999 ., -999 ., -999 ., -999 ., -999 .);
484- }
485- }
486- }
487-
488- // Calculate and separate qn bins
489- // Do and fill cumulant in qn bins
490- template <bool isMC, typename CollisionType, typename TrackType>
491- void fillCollisionsFlow (CollisionType const & col, TrackType const & tracks)
492- {
493- // get magnetic field for run
494-
495- const auto spher = colCuts.computeSphericity (col, tracks);
496- int multNtr = 0 ;
497- if (ConfIsRun3) {
498- multNtr = col.multNTracksPV ();
499- } else {
500- multNtr = col.multTracklets ();
501- }
502- if (ConfEvtUseTPCmult) {
503- multNtr = col.multTPC ();
504- }
505-
506- // / First thing to do is to check whether the basic event selection criteria are fulfilled
507- // / That includes checking if there are any usable tracks in a collision
508- if (!colCuts.isSelectedCollision (col)) {
509- return ;
510- }
511- if (colCuts.isEmptyCollision (col, tracks, trackCuts)) {
512- return ;
513- }
514-
515- // Pileup rejection in PbPb data
516- if (evtSel_PbPb.ConfIsPbPb && evtSel_PbPb.ConfIsUsePileUp &&
517- !colCuts.isPileUpCollisionPbPb (col, evtSel_PbPb.ConfEvNoSameBunchPileup , evtSel_PbPb.ConfEvIsGoodZvtxFT0vsPV ,
518- evtSel_PbPb.ConfEvIsGoodITSLayersAll , evtSel_PbPb.ConfEvNoCollInRofStandard ,
519- evtSel_PbPb.ConfEvNoHighMultCollInPrevRof , evtSel_PbPb.ConfEvNoCollInTimeRangeStandard ,
520- evtSel_PbPb.ConfEvIsVertexITSTPC ,
521- evtSel_PbPb.ConfTPCOccupancyMin , evtSel_PbPb.ConfTPCOccupancyMax )) {
522- return ;
523- }
524-
525- // Calculate and fill qnBins
526- auto qnBin = colCuts.myqnBin (col, qnCal.ConfCentralityMax , qnCal.ConfQnBinSeparator , spher, multNtr, 1 .f );
527- if (qnBin < qnCal.ConfQnBinMin || qnBin > qnCal.ConfQnBinMax ){
528- qnBin = -999 ;
529- }
530- colCuts.fillCumulants (col, tracks);
531- colCuts.doCumulants (col, qnCal.ConfgQnSeparation , qnBin);
532- outputExtQnCollision (qnBin);
533- }
534-
535- void processData (aod::FemtoFullCollision const & col, aod::BCsWithTimestamps const &, aod::FemtoFullTracks const & tracks)
328+ void
329+ processData (aod::FemtoFullCollision const & col, aod::BCsWithTimestamps const &, aod::FemtoFullTracks const & tracks)
536330 {
537331 // get magnetic field for run
538332 getMagneticFieldTesla (col.bc_as <aod::BCsWithTimestamps>());
@@ -571,24 +365,8 @@ struct femtoDreamProducerReducedTask {
571365 fillCollisionsAndTracks<true , false >(col, tracksWithItsPid);
572366 }
573367 PROCESS_SWITCH (femtoDreamProducerReducedTask, processMC_noCentrality, " Provide MC data" , false );
574-
575- void processData_FlowCalc (aod::FemtoFullCollision_CentPbPb const & col,
576- aod::BCsWithTimestamps const &,
577- aod::FemtoFullTracks const & tracks)
578- {
579- // get magnetic field for run
580- getMagneticFieldTesla (col.bc_as <aod::BCsWithTimestamps>());
581- auto tracksWithItsPid = soa::Attach<aod::FemtoFullTracks, aod::pidits::ITSNSigmaEl, aod::pidits::ITSNSigmaPi, aod::pidits::ITSNSigmaKa,
582- aod::pidits::ITSNSigmaPr, aod::pidits::ITSNSigmaDe, aod::pidits::ITSNSigmaTr, aod::pidits::ITSNSigmaHe>(tracks);
583- // fill the tables
584- fillCollisionsAndTracks_PbPb<false , true >(col, tracksWithItsPid);
585- if (qnCal.ConfgQnSeparation ){
586- fillCollisionsFlow<false >(col, tracksWithItsPid);
587- }
588- }
589- PROCESS_SWITCH (femtoDreamProducerReducedTask, processData_FlowCalc,
590- " Provide experimental data with cumulant flow calculation" , false );
591368};
369+
592370WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
593371{
594372 WorkflowSpec workflow{adaptAnalysisTask<femtoDreamProducerReducedTask>(cfgc)};
0 commit comments