2121#include " PWGDQ/Core/HistogramsLibrary.h"
2222#include " PWGDQ/Core/MCSignal.h"
2323#include " PWGDQ/Core/MCSignalLibrary.h"
24- #include " PWGDQ/Core/MuonMatchingMlResponse.h"
2524#include " PWGDQ/Core/VarManager.h"
2625#include " PWGDQ/DataModel/ReducedInfoTables.h"
2726#include " PWGDQ/DataModel/ReducedTablesAlice3.h"
2827
29- #include " ALICE3/DataModel/OTFPIDTrk.h"
3028#include " ALICE3/DataModel/OTFRICH.h"
3129#include " ALICE3/DataModel/OTFTOF.h"
3230#include " ALICE3/DataModel/collisionAlice3.h"
3331#include " ALICE3/DataModel/tracksAlice3.h"
3432#include " Common/CCDB/TriggerAliases.h"
35- #include " Common/DataModel/Centrality.h"
3633#include " Common/DataModel/CollisionAssociationTables.h"
3734#include " Common/DataModel/EventSelection.h"
3835#include " Common/DataModel/McCollisionExtra.h"
3936#include " Common/DataModel/Multiplicity.h"
4037#include " Common/DataModel/TrackSelectionTables.h"
4138
42- #include " CommonDataFormat/InteractionRecord.h"
43- #include " DataFormatsGlobalTracking/RecoContainer.h"
44- #include " DataFormatsGlobalTracking/RecoContainerCreateTracksVariadic.h"
45- #include " DataFormatsITSMFT/ROFRecord.h"
46- #include " DataFormatsParameters/GRPObject.h"
47- #include " DetectorsBase/GeometryManager.h"
48- #include " DetectorsBase/Propagator.h"
49- #include " DetectorsVertexing/PVertexerParams.h"
50- #include " DetectorsVertexing/VertexTrackMatcher.h"
5139#include " Framework/ASoA.h"
5240#include " Framework/ASoAHelpers.h"
5341#include " Framework/AnalysisDataModel.h"
5442#include " Framework/AnalysisTask.h"
5543#include " Framework/DataTypes.h"
5644#include " Framework/runDataProcessing.h"
57- #include " MathUtils/Primitive2D.h"
58- #include " ReconstructionDataFormats/PrimaryVertex.h"
59- #include " ReconstructionDataFormats/VtxTrackIndex.h"
60- #include " ReconstructionDataFormats/VtxTrackRef.h"
6145
6246#include " THashList.h"
6347#include " TList.h"
@@ -131,7 +115,6 @@ struct Alice3DQTableMaker {
131115 Configurable<bool > fConfigDetailedQA {" cfgDetailedQA" , false , " If true, include more QA histograms (BeforeCuts classes)" };
132116 Configurable<std::string> fConfigAddEventHistogram {" cfgAddEventHistogram" , " " , " Comma separated list of histograms" };
133117 Configurable<std::string> fConfigAddTrackHistogram {" cfgAddTrackHistogram" , " " , " Comma separated list of histograms" };
134- Configurable<std::string> fConfigAddMuonHistogram {" cfgAddMuonHistogram" , " " , " Comma separated list of histograms" };
135118 Configurable<std::string> fConfigAddMCTruthHistogram {" cfgAddMCTruthHistogram" , " " , " Comma separated list of histograms" };
136119 Configurable<std::string> fConfigAddJSONHistograms {" cfgAddJSONHistograms" , " " , " Histograms in JSON format" };
137120 } fConfigHistOutput ;
@@ -161,7 +144,7 @@ struct Alice3DQTableMaker {
161144 DefineCuts ();
162145
163146 fHistMan = new HistogramManager (" analysisHistos" , " aa" , VarManager::kNVars );
164- fHistMan ->SetUseDefaultVariableNames (kTRUE );
147+ fHistMan ->SetUseDefaultVariableNames (true );
165148 fHistMan ->SetDefaultVarNames (VarManager::fgVariableNames, VarManager::fgVariableUnits);
166149
167150 if (fConfigHistOutput .fConfigQA && fConfigHistOutput .fConfigDetailedQA ) {
@@ -185,7 +168,7 @@ struct Alice3DQTableMaker {
185168 }
186169
187170 if (fConfigHistOutput .fConfigQA ) {
188- for (auto & cut : fTrackCuts ) {
171+ for (const auto & cut : fTrackCuts ) {
189172 histClasses += Form (" TrackBarrel_%s;" , cut->GetName ());
190173 }
191174 }
@@ -208,20 +191,20 @@ struct Alice3DQTableMaker {
208191 if (addMCSignalsStr != " " ) {
209192 std::vector<MCSignal*> addMCSignals = dqmcsignals::GetMCSignalsFromJSON (addMCSignalsStr.Data ());
210193
211- for (auto & mcIt : addMCSignals) {
194+ for (const auto & mcIt : addMCSignals) {
212195 if (mcIt) {
213196 fMCSignals .push_back (mcIt);
214197 }
215198 }
216199 }
217200
218- for (auto & mcIt : fMCSignals ) {
201+ for (const auto & mcIt : fMCSignals ) {
219202 if (fConfigHistOutput .fConfigQA ) {
220203 histClasses += Form (" MCTruth_%s;" , mcIt->GetName ());
221204 }
222205 if (fDoDetailedQA ) {
223206 if (isProcessSkimmingEnabled) {
224- for (auto & cut : fTrackCuts ) {
207+ for (const auto & cut : fTrackCuts ) {
225208 histClasses += Form (" TrackBarrel_%s_%s;" , cut->GetName (), mcIt->GetName ());
226209 }
227210 }
@@ -248,7 +231,7 @@ struct Alice3DQTableMaker {
248231 TString addEvCutsStr = fConfigCuts .fConfigEventCutsJSON .value ;
249232 if (addEvCutsStr != " " ) {
250233 std::vector<AnalysisCut*> addEvCuts = dqcuts::GetCutsFromJSON (addEvCutsStr.Data ());
251- for (auto & cutIt : addEvCuts) {
234+ for (const auto & cutIt : addEvCuts) {
252235 fEventCut ->AddCut (cutIt);
253236 }
254237 }
@@ -265,7 +248,7 @@ struct Alice3DQTableMaker {
265248 TString addTrackCutsStr = fConfigCuts .fConfigTrackCutsJSON .value ;
266249 if (addTrackCutsStr != " " ) {
267250 std::vector<AnalysisCut*> addTrackCuts = dqcuts::GetCutsFromJSON (addTrackCutsStr.Data ());
268- for (auto & t : addTrackCuts) {
251+ for (const auto & t : addTrackCuts) {
269252 fTrackCuts .push_back (reinterpret_cast <AnalysisCompositeCut*>(t));
270253 }
271254 }
@@ -308,7 +291,7 @@ struct Alice3DQTableMaker {
308291
309292 // create statistics histograms (event, tracks, muons, MCsignals)
310293 fStatsList .setObject (new TList ());
311- fStatsList ->SetOwner (kTRUE );
294+ fStatsList ->SetOwner (true );
312295 std::vector<TString> eventLabels{" Collisions before filtering" , " Before cuts" , " After cuts" };
313296 TH2I* histEvents = new TH2I (" EventStats" , " Event statistics" , eventLabels.size (), -0.5 , eventLabels.size () - 0.5 , o2::aod::evsel::kNsel + 1 , -0.5 , (float )o2::aod::evsel::kNsel + 0.5 );
314297 int ib = 1 ;
@@ -327,8 +310,9 @@ struct Alice3DQTableMaker {
327310 for (auto cut = fTrackCuts .begin (); cut != fTrackCuts .end (); cut++, ib++) {
328311 histTracks->GetXaxis ()->SetBinLabel (ib, (*cut)->GetName ());
329312 }
330- const char * v0TagNames[5 ] = {" Photon conversion" , " K^{0}_{s}" , " #Lambda" , " #bar{#Lambda}" , " #Omega" };
331- for (int ib = 0 ; ib < 5 ; ib++) {
313+ constexpr int nV0Tags = 5 ;
314+ const char * v0TagNames[nV0Tags] = {" Photon conversion" , " K^{0}_{s}" , " #Lambda" , " #bar{#Lambda}" , " #Omega" };
315+ for (int ib = 0 ; ib < nV0Tags; ib++) {
332316 histTracks->GetXaxis ()->SetBinLabel (fTrackCuts .size () + 1 + ib, v0TagNames[ib]);
333317 }
334318 fStatsList ->Add (histTracks);
@@ -351,7 +335,7 @@ struct Alice3DQTableMaker {
351335 // one has to do a mapping of the old vs new indices so that the skimmed labels are properly updated.
352336 VarManager::ResetValues (0 , VarManager::kNVars );
353337
354- for (auto & mcCollision : mcCollisions) {
338+ for (const auto & mcCollision : mcCollisions) {
355339 VarManager::FillEventAlice3<gkEventMcFillMap>(mcCollision);
356340
357341 fHistMan ->FillHistClass (" Event_MCTruth" , VarManager::fgValues);
@@ -375,11 +359,11 @@ struct Alice3DQTableMaker {
375359 uint16_t mcflags = static_cast <uint16_t >(0 ); // flags which will hold the decisions for each MC signal
376360 int trackCounter = 0 ;
377361
378- for (auto & mctrack : mcTracks) {
362+ for (const auto & mctrack : mcTracks) {
379363 // check all the requested MC signals and fill the decision bit map
380364 mcflags = 0 ;
381365 int i = 0 ;
382- for (auto & sig : fMCSignals ) {
366+ for (const auto & sig : fMCSignals ) {
383367 bool checked = false ;
384368 if constexpr (soa::is_soa_filtered_v<aod::McParticles>) {
385369 auto mctrack_raw = mcTracks.rawIteratorAt (mctrack.globalIndex ());
@@ -580,13 +564,13 @@ struct Alice3DQTableMaker {
580564 int i = 0 ; // runs over the MC signals
581565 int j = 0 ; // runs over the track cuts
582566 // check all the specified signals and fill histograms for MC truth matched tracks
583- for (auto & sig : fMCSignals ) {
567+ for (const auto & sig : fMCSignals ) {
584568 if (sig->CheckSignal (true , mctrack)) {
585569 mcflags |= (static_cast <uint16_t >(1 ) << i);
586570 // If detailed QA is on, fill histograms for each MC signal and track cut combination
587571 if (fDoDetailedQA ) {
588572 j = 0 ;
589- for (auto & cut : fTrackCuts ) {
573+ for (const auto & cut : fTrackCuts ) {
590574 if (trackTempFilterMap & (uint8_t (1 ) << j)) {
591575 fHistMan ->FillHistClass (Form (" TrackBarrel_%s_%s" , cut->GetName (), sig->GetName ()), VarManager::fgValues); // fill the reconstructed truth
592576 }
@@ -668,7 +652,7 @@ struct Alice3DQTableMaker {
668652
669653 std::vector<int > mothers;
670654 if (mctrack.has_mothers ()) {
671- for (auto & m : mctrack.mothersIds ()) {
655+ for (const auto & m : mctrack.mothersIds ()) {
672656 if (m < mcParticles.size ()) { // protect against bad mother indices
673657 if (fLabelsMap .find (m) != fLabelsMap .end ()) {
674658 mothers.push_back (fLabelsMap .find (m)->second );
0 commit comments