@@ -196,7 +196,9 @@ struct FlattenictyPikp {
196196 Configurable<bool > applyCalibGain{" applyCalibGain" , true , " equalize detector amplitudes" };
197197 Configurable<bool > applyCalibVtx{" applyCalibVtx" , false , " equalize Amp vs vtx" };
198198 Configurable<bool > applyCalibDeDx{" applyCalibDeDx" , true , " calibration of dedx signal" };
199- Configurable<bool > cfgFillQAHisto{" cfgFillQAHisto" , true , " fill QA histograms" };
199+ Configurable<bool > cfgFillTrackQaHist{" cfgFillTrackQaHist" , false , " fill track QA histograms" };
200+ Configurable<bool > cfgFilldEdxQaHist{" cfgFilldEdxQaHist" , false , " fill dEdx QA histograms" };
201+ Configurable<bool > cfgFillNsigmaQAHist{" cfgFillNsigmaQAHist" , false , " fill nsigma QA histograms" };
200202 Configurable<bool > cfgFillChrgType{" cfgFillChrgType" , true , " fill histograms per charge types" };
201203 Configurable<std::vector<float >> paramsFuncMIPposEta{" paramsFuncMIPposEta" , std::vector<float >{-1 .f }, " parameters of pol2" };
202204 Configurable<std::vector<float >> paramsFuncMIPnegEta{" paramsFuncMIPnegEta" , std::vector<float >{-1 .f }, " parameters of pol2" };
@@ -407,63 +409,64 @@ struct FlattenictyPikp {
407409 if (doprocessFlat) {
408410 flatchrg.add (" Events/hVtxZ" , " Measured vertex z position" , HistType::kTH1D , {vtxzAxis});
409411 flatchrg.add (" Events/hFlatVsMultEst" , " hFlatVsMultEst" , HistType::kTH2D , {flatAxis, multAxis});
410-
411- if (cfgFillQAHisto) {
412- flatchrg.add (" Tracks/postSel/hPtPhi" , " ; #it{p}_{T} (GeV/#it{c}); fmod(#varphi,#pi/9)" , {HistType::kTH2D , {ptAxis, phiAxisMod}});
413- // P vs PT vs ETA
414- flatchrg.add (" Tracks/postSel/hPVsPtEta" , " ; #it{p} (GeV/#it{c}); #it{p}_{T} (GeV/#it{c}); #eta;" , {HistType::kTH3D , {pAxis, ptAxis, etaAxis}});
415- flatchrg.addClone (" Tracks/postSel/" , " Tracks/preSel/" );
416- // dEdx MIP, Plateau
417- flatchrg.add (" Tracks/postCalib/all/hMIP" , " ; mult; flat; #eta; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTHnSparseD , {multAxis, flatAxis, etaAxis, dEdxAxis}});
418- flatchrg.add (" Tracks/postCalib/all/hPlateau" , " ; mult; flat; #eta; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTHnSparseD , {multAxis, flatAxis, etaAxis, dEdxAxis}});
419- flatchrg.add (" Tracks/postCalib/all/hMIPVsEta" , " ; #eta; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTH2D , {etaAxis, dEdxAxis}});
420- flatchrg.add (" Tracks/postCalib/all/pMIPVsEta" , " ; #eta; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTProfile , {etaAxis}});
421- flatchrg.add (" Tracks/postCalib/all/hMIPVsPhi" , " ; #varphi; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTH2D , {phiAxis, dEdxAxis}});
422- flatchrg.add (" Tracks/postCalib/all/pMIPVsPhi" , " ; #varphi; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTProfile , {phiAxis}});
423- flatchrg.add (" Tracks/postCalib/all/hMIPVsPhiVsEta" , " ; #varphi; #LT dE/dx #GT_{MIP, primary tracks}; #eta;" , {HistType::kTH3D , {phiAxis, dEdxAxis, etaAxis}});
424- flatchrg.add (" Tracks/postCalib/all/hPlateauVsEta" , " ; #eta; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTH2D , {etaAxis, dEdxAxis}});
425- flatchrg.add (" Tracks/postCalib/all/pPlateauVsEta" , " ; #eta; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTProfile , {etaAxis}});
426- flatchrg.add (" Tracks/postCalib/all/hPlateauVsPhi" , " ; #varphi; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTH2D , {phiAxis, dEdxAxis}});
427- flatchrg.add (" Tracks/postCalib/all/pPlateauVsPhi" , " ; #varphi; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTProfile , {phiAxis}});
428- flatchrg.add (" Tracks/postCalib/all/hPlateauVsPhiVsEta" , " ; #varphi; #LT dE/dx #GT_{Plateau, primary tracks}; #eta;" , {HistType::kTH3D , {phiAxis, dEdxAxis, etaAxis}});
429- if (cfgFillChrgType) {
430- flatchrg.addClone (" Tracks/postCalib/all/" , " Tracks/postCalib/pos/" );
431- flatchrg.addClone (" Tracks/postCalib/all/" , " Tracks/postCalib/neg/" );
432- flatchrg.addClone (" Tracks/postCalib/all/" , " Tracks/preCalib/all/" );
433- flatchrg.addClone (" Tracks/preCalib/all/" , " Tracks/preCalib/pos/" );
434- flatchrg.addClone (" Tracks/preCalib/all/" , " Tracks/preCalib/neg/" );
412+ flatchrg.add (" Tracks/postSel/hPVsPtEta" , " ; #it{p} (GeV/#it{c}); #it{p}_{T} (GeV/#it{c}); #eta;" , {HistType::kTH3D , {pAxis, ptAxis, etaAxis}});
413+ if (cfgFillTrackQaHist || cfgFilldEdxQaHist || cfgFillNsigmaQAHist) {
414+ if (cfgFillTrackQaHist) {
415+ flatchrg.add (" Tracks/postSel/hPtPhi" , " ; #it{p}_{T} (GeV/#it{c}); fmod(#varphi,#pi/9)" , {HistType::kTH2D , {ptAxis, phiAxisMod}});
416+ flatchrg.add (" Tracks/QA/hPtVsWOcutDCA" , " hPtVsWOcutDCA" , HistType::kTH2D , {ptAxis, dcaXYAxis});
417+ flatchrg.add (" Tracks/QA/hPt" , " " , HistType::kTH1D , {ptAxis});
418+ flatchrg.add (" Tracks/QA/hPhi" , " " , HistType::kTH1D , {phiAxis});
419+ flatchrg.add (" Tracks/QA/hEta" , " " , HistType::kTH1D , {etaAxis});
420+ flatchrg.add (" Tracks/QA/hDCAXYvsPt" , " " , HistType::kTH2D , {ptAxis, dcaXYAxis});
421+ flatchrg.add (" Tracks/QA/hDCAZvsPt" , " " , HistType::kTH2D , {ptAxis, dcaZAxis});
422+ // tpc
423+ flatchrg.add (" Tracks/QA/hShTpcClvsPt" , " " , {HistType::kTH2D , {ptAxis, shCluserAxis}});
424+ flatchrg.add (" Tracks/QA/hCrossTPCvsPt" , " " , {HistType::kTH2D , {ptAxis, clTpcAxis}});
425+ flatchrg.add (" Tracks/QA/hTPCCluster" , " N_{cluster}" , HistType::kTH1D , {{200 , -0.5 , 199.5 }});
426+ flatchrg.add (" Tracks/QA/tpcNClsShared" , " ; # shared TPC clusters TPC" , HistType::kTH1D , {{165 , -0.5 , 164.5 }});
427+ flatchrg.add (" Tracks/QA/tpcCrossedRows" , " ; # crossed TPC rows" , HistType::kTH1D , {{165 , -0.5 , 164.5 }});
428+ flatchrg.add (" Tracks/QA/tpcCrossedRowsOverFindableCls" , " ; crossed rows / findable TPC clusters" , HistType::kTH1D , {{60 , 0.7 , 1.3 }});
429+ // its
430+ flatchrg.add (" Tracks/QA/itsNCls" , " ; # ITS clusters" , HistType::kTH1D , {{8 , -0.5 , 7.5 }});
431+ flatchrg.add (" Tracks/QA/hChi2ITSTrkSegment" , " chi2ITS" , HistType::kTH1D , {{100 , -0.5 , 99.5 }});
432+ // tof
433+ flatchrg.add (" Tracks/QA/hTOFPvsBeta" , " Beta from TOF; #it{p} (GeV/#it{c}); #beta" , {HistType::kTH2D , {pAxis, {120 , 0.0 , 1.2 }}});
434+ flatchrg.add (" Tracks/QA/hTOFpi" , " Primary Pions from TOF; #eta; #it{p} (GeV/#it{c}); dEdx" , {HistType::kTHnSparseD , {etaAxis, pAxis, dEdxAxis}});
435+ }
436+ if (cfgFilldEdxQaHist) {
437+ flatchrg.add (" Tracks/postCalib/all/hMIP" , " ; mult; flat; #eta; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTHnSparseD , {multAxis, flatAxis, etaAxis, dEdxAxis}});
438+ flatchrg.add (" Tracks/postCalib/all/hPlateau" , " ; mult; flat; #eta; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTHnSparseD , {multAxis, flatAxis, etaAxis, dEdxAxis}});
439+ flatchrg.add (" Tracks/postCalib/all/hMIPVsEta" , " ; #eta; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTH2D , {etaAxis, dEdxAxis}});
440+ flatchrg.add (" Tracks/postCalib/all/pMIPVsEta" , " ; #eta; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTProfile , {etaAxis}});
441+ flatchrg.add (" Tracks/postCalib/all/hMIPVsPhi" , " ; #varphi; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTH2D , {phiAxis, dEdxAxis}});
442+ flatchrg.add (" Tracks/postCalib/all/pMIPVsPhi" , " ; #varphi; #LT dE/dx #GT_{MIP, primary tracks};" , {HistType::kTProfile , {phiAxis}});
443+ flatchrg.add (" Tracks/postCalib/all/hMIPVsPhiVsEta" , " ; #varphi; #LT dE/dx #GT_{MIP, primary tracks}; #eta;" , {HistType::kTH3D , {phiAxis, dEdxAxis, etaAxis}});
444+ flatchrg.add (" Tracks/postCalib/all/hPlateauVsEta" , " ; #eta; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTH2D , {etaAxis, dEdxAxis}});
445+ flatchrg.add (" Tracks/postCalib/all/pPlateauVsEta" , " ; #eta; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTProfile , {etaAxis}});
446+ flatchrg.add (" Tracks/postCalib/all/hPlateauVsPhi" , " ; #varphi; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTH2D , {phiAxis, dEdxAxis}});
447+ flatchrg.add (" Tracks/postCalib/all/pPlateauVsPhi" , " ; #varphi; #LT dE/dx #GT_{Plateau, primary tracks};" , {HistType::kTProfile , {phiAxis}});
448+ flatchrg.add (" Tracks/postCalib/all/hPlateauVsPhiVsEta" , " ; #varphi; #LT dE/dx #GT_{Plateau, primary tracks}; #eta;" , {HistType::kTH3D , {phiAxis, dEdxAxis, etaAxis}});
449+ if (cfgFillChrgType) {
450+ flatchrg.addClone (" Tracks/postCalib/all/" , " Tracks/postCalib/pos/" );
451+ flatchrg.addClone (" Tracks/postCalib/all/" , " Tracks/postCalib/neg/" );
452+ flatchrg.addClone (" Tracks/postCalib/all/" , " Tracks/preCalib/all/" );
453+ flatchrg.addClone (" Tracks/preCalib/all/" , " Tracks/preCalib/pos/" );
454+ flatchrg.addClone (" Tracks/preCalib/all/" , " Tracks/preCalib/neg/" );
455+ }
435456 }
436- // fillTrackQA
437- flatchrg.add (" Tracks/QA/hPtVsWOcutDCA" , " hPtVsWOcutDCA" , HistType::kTH2D , {ptAxis, dcaXYAxis});
438- flatchrg.add (" Tracks/QA/hPt" , " " , HistType::kTH1D , {ptAxis});
439- flatchrg.add (" Tracks/QA/hPhi" , " " , HistType::kTH1D , {phiAxis});
440- flatchrg.add (" Tracks/QA/hEta" , " " , HistType::kTH1D , {etaAxis});
441- flatchrg.add (" Tracks/QA/hDCAXYvsPt" , " " , HistType::kTH2D , {ptAxis, dcaXYAxis});
442- flatchrg.add (" Tracks/QA/hDCAZvsPt" , " " , HistType::kTH2D , {ptAxis, dcaZAxis});
443- // tpc
444- flatchrg.add (" Tracks/QA/hShTpcClvsPt" , " " , {HistType::kTH2D , {ptAxis, shCluserAxis}});
445- flatchrg.add (" Tracks/QA/hCrossTPCvsPt" , " " , {HistType::kTH2D , {ptAxis, clTpcAxis}});
446- flatchrg.add (" Tracks/QA/hTPCCluster" , " N_{cluster}" , HistType::kTH1D , {{200 , -0.5 , 199.5 }});
447- flatchrg.add (" Tracks/QA/tpcNClsShared" , " ; # shared TPC clusters TPC" , HistType::kTH1D , {{165 , -0.5 , 164.5 }});
448- flatchrg.add (" Tracks/QA/tpcCrossedRows" , " ; # crossed TPC rows" , HistType::kTH1D , {{165 , -0.5 , 164.5 }});
449- flatchrg.add (" Tracks/QA/tpcCrossedRowsOverFindableCls" , " ; crossed rows / findable TPC clusters" , HistType::kTH1D , {{60 , 0.7 , 1.3 }});
450- // its
451- flatchrg.add (" Tracks/QA/itsNCls" , " ; # ITS clusters" , HistType::kTH1D , {{8 , -0.5 , 7.5 }});
452- flatchrg.add (" Tracks/QA/hChi2ITSTrkSegment" , " chi2ITS" , HistType::kTH1D , {{100 , -0.5 , 99.5 }});
453- // tof
454- flatchrg.add (" Tracks/QA/hTOFPvsBeta" , " Beta from TOF; #it{p} (GeV/#it{c}); #beta" , {HistType::kTH2D , {pAxis, {120 , 0.0 , 1.2 }}});
455- flatchrg.add (" Tracks/QA/hTOFpi" , " Primary Pions from TOF; #eta; #it{p} (GeV/#it{c}); dEdx" , {HistType::kTHnSparseD , {etaAxis, pAxis, dEdxAxis}});
456- // nsigma
457- for (int i = 0 ; i < NpartChrg; i++) {
458- const std::string strID = Form (" /%s/%s" , (i < Npart) ? " pos" : " neg" , Pid[i % Npart]);
459- hPtNsigmaTPC[i] = flatchrg.add <TH2>(" Tracks/hPtNsigmaTPC" + strID, " ; p_{T} (GeV/c)" , HistType::kTH2D , {ptAxis, nSigmaTPCAxis});
460- if (cfgStoreThnSparse) {
461- hThPtNsigmaTPC[i] = flatchrg.add <THnSparse>(" Tracks/hThPtNsigmaTPC" + strID, " ; p_{T} (GeV/c)" , HistType::kTHnSparseD , {ptAxis, nSigmaTPCAxis, multAxis, flatAxis});
457+ if (cfgFillNsigmaQAHist) {
458+ for (int i = 0 ; i < NpartChrg; i++) {
459+ const std::string strID = Form (" /%s/%s" , (i < Npart) ? " pos" : " neg" , Pid[i % Npart]);
460+ hPtNsigmaTPC[i] = flatchrg.add <TH2>(" Tracks/hPtNsigmaTPC" + strID, " ; p_{T} (GeV/c)" , HistType::kTH2D , {ptAxis, nSigmaTPCAxis});
461+ if (cfgStoreThnSparse) {
462+ hThPtNsigmaTPC[i] = flatchrg.add <THnSparse>(" Tracks/hThPtNsigmaTPC" + strID, " ; p_{T} (GeV/c)" , HistType::kTHnSparseD , {ptAxis, nSigmaTPCAxis, multAxis, flatAxis});
463+ }
464+ hPtNsigmaTOF[i] = flatchrg.add <TH2>(" Tracks/hPtNsigmaTOF" + strID, " ; p_{T} (GeV/c)" , HistType::kTH2D , {ptAxis, nSigmaTOFAxis});
465+ hPtNsigmaTPCTOF[i] = flatchrg.add <TH2>(" Tracks/hPtNsigmaTPCTOF" + strID, PidChrg[i], HistType::kTH2D , {nSigmaTPCAxis, nSigmaTOFAxis});
462466 }
463- hPtNsigmaTOF[i] = flatchrg.add <TH2>(" Tracks/hPtNsigmaTOF" + strID, " ; p_{T} (GeV/c)" , HistType::kTH2D , {ptAxis, nSigmaTOFAxis});
464- hPtNsigmaTPCTOF[i] = flatchrg.add <TH2>(" Tracks/hPtNsigmaTPCTOF" + strID, PidChrg[i], HistType::kTH2D , {nSigmaTPCAxis, nSigmaTOFAxis});
465467 }
466468 }
469+ flatchrg.addClone (" Tracks/postSel/" , " Tracks/preSel/" );
467470 // FV0 QA
468471 flatchrg.add (" FV0/hFV0AmplWCalib" , " " , HistType::kTH2D , {{48 , -0.5 , 47.5 , " channel" }, {500 , -0.5 , +19999.5 , " FV0 amplitude" }});
469472 flatchrg.add (" FV0/hFV0AmplvsVtxzWoCalib" , " " , HistType::kTH2D , {{30 , -15.0 , +15.0 , " z vtx (cm)" }, {1000 , -0.5 , +39999.5 , " FV0 amplitude" }});
@@ -694,14 +697,16 @@ struct FlattenictyPikp {
694697 for (const auto & track : tracks) {
695698 float dEdx = track.tpcSignal ();
696699 bool posP = (track.sign () * track.tpcInnerParam () > 0 ) ? true : false ;
697- if (cfgFillQAHisto ) {
700+ if (cfgFillTrackQaHist ) {
698701 fillTrackQA<kBefore , true >(track);
699702 }
700703 if (!isGoodTrack (track, magField)) {
701704 continue ;
702705 }
703- if (cfgFillQAHisto ) {
706+ if (cfgFillTrackQaHist ) {
704707 fillTrackQA<kAfter , true >(track);
708+ }
709+ if (cfgFilldEdxQaHist) {
705710 filldEdxQA<kAll , kBefore , true >(track, collision);
706711 if (posP) {
707712 filldEdxQA<kPos , kBefore , true >(track, collision);
@@ -712,7 +717,7 @@ struct FlattenictyPikp {
712717 if (applyCalibDeDx) {
713718 dEdx *= (50.0 / getCalibration (true , track.eta ()));
714719 }
715- if (cfgFillQAHisto ) {
720+ if (cfgFilldEdxQaHist ) {
716721 filldEdxQA<kAll , kAfter , true >(track, collision);
717722 if (posP) {
718723 filldEdxQA<kPos , kAfter , true >(track, collision);
@@ -823,13 +828,13 @@ struct FlattenictyPikp {
823828 phimodn += o2::constants::math::PI / 18.0 ; // to center gap in the middle
824829 phimodn = std::fmod (phimodn, o2::constants::math::PI / 9.0 );
825830
826- if (cfgFillQAHisto ) {
831+ if (cfgFillTrackQaHist ) {
827832 flatchrg.fill (HIST (" Tracks/preSel/hPtPhi" ), track.pt (), phimodn);
828833 }
829834 if (phimodn < fphiCutHigh->Eval (track.pt ()) && phimodn > fphiCutLow->Eval (track.pt ())) {
830835 return false ;
831836 }
832- if (cfgFillQAHisto ) {
837+ if (cfgFillTrackQaHist ) {
833838 flatchrg.fill (HIST (" Tracks/postSel/hPtPhi" ), track.pt (), phimodn);
834839 }
835840 return true ;
@@ -1035,7 +1040,6 @@ struct FlattenictyPikp {
10351040 }
10361041 }
10371042 }
1038-
10391043 flatchrg.fill (HIST (kPrefix ) + HIST (kStatus [ft]) + HIST (" hPVsPtEta" ), track.tpcInnerParam (), track.pt (), track.eta ());
10401044 }
10411045
@@ -1423,7 +1427,7 @@ struct FlattenictyPikp {
14231427 auto v0sPerCollision = v0s.sliceBy (perColV0s, collision.globalIndex ());
14241428 v0sPerCollision.bindExternalIndices (&tracks);
14251429 filldEdx (tracksPerCollision, v0sPerCollision, collision, bcs);
1426- if (cfgFillQAHisto ) {
1430+ if (cfgFillNsigmaQAHist ) {
14271431 fillNsigma<o2::track::PID::Pion>(tracksPerCollision, collision);
14281432 fillNsigma<o2::track::PID::Kaon>(tracksPerCollision, collision);
14291433 fillNsigma<o2::track::PID::Proton>(tracksPerCollision, collision);
0 commit comments