|
16 | 16 | // The skimmed MC stack includes the MC truth particles corresponding to the list of user specified MC signals (see MCsignal.h) |
17 | 17 | // and the MC truth particles corresponding to the reconstructed tracks selected by the specified track cuts on reconstructed data. |
18 | 18 |
|
19 | | -#include <iostream> |
20 | | -#include <string> |
21 | | -#include <map> |
22 | | -#include <memory> |
23 | | -#include <vector> |
24 | | -#include "TList.h" |
25 | | -#include "Framework/AnalysisTask.h" |
26 | | -#include "Framework/AnalysisDataModel.h" |
27 | | -#include "Framework/ASoAHelpers.h" |
28 | | -#include "Framework/ASoA.h" |
29 | | -#include "Framework/DataTypes.h" |
30 | | -#include "Framework/runDataProcessing.h" |
31 | | -#include "Common/DataModel/Multiplicity.h" |
32 | | -#include "Common/DataModel/EventSelection.h" |
33 | | -#include "Common/DataModel/Centrality.h" |
34 | | -#include "Common/CCDB/TriggerAliases.h" |
35 | | -#include "PWGDQ/DataModel/ReducedInfoTables.h" |
36 | | -#include "PWGDQ/Core/VarManager.h" |
37 | | -#include "PWGDQ/Core/HistogramManager.h" |
38 | | -#include "PWGDQ/Core/AnalysisCut.h" |
39 | 19 | #include "PWGDQ/Core/AnalysisCompositeCut.h" |
40 | | -#include "PWGDQ/Core/HistogramsLibrary.h" |
| 20 | +#include "PWGDQ/Core/AnalysisCut.h" |
41 | 21 | #include "PWGDQ/Core/CutsLibrary.h" |
| 22 | +#include "PWGDQ/Core/HistogramManager.h" |
| 23 | +#include "PWGDQ/Core/HistogramsLibrary.h" |
42 | 24 | #include "PWGDQ/Core/MCSignal.h" |
43 | 25 | #include "PWGDQ/Core/MCSignalLibrary.h" |
44 | | -#include "Common/DataModel/PIDResponse.h" |
45 | | -#include "Common/DataModel/TrackSelectionTables.h" |
| 26 | +#include "PWGDQ/Core/VarManager.h" |
| 27 | +#include "PWGDQ/DataModel/ReducedInfoTables.h" |
| 28 | + |
| 29 | +#include "Common/CCDB/TriggerAliases.h" |
| 30 | +#include "Common/DataModel/Centrality.h" |
46 | 31 | #include "Common/DataModel/CollisionAssociationTables.h" |
| 32 | +#include "Common/DataModel/EventSelection.h" |
| 33 | +#include "Common/DataModel/Multiplicity.h" |
| 34 | +#include "Common/DataModel/PIDResponseTOF.h" |
| 35 | +#include "Common/DataModel/PIDResponseTPC.h" |
| 36 | +#include "Common/DataModel/TrackSelectionTables.h" |
| 37 | + |
| 38 | +#include "CCDB/BasicCCDBManager.h" |
47 | 39 | #include "DataFormatsParameters/GRPMagField.h" |
48 | 40 | #include "DataFormatsParameters/GRPObject.h" |
| 41 | +#include "DetectorsBase/GeometryManager.h" |
| 42 | +#include "DetectorsBase/Propagator.h" |
49 | 43 | #include "Field/MagneticField.h" |
| 44 | +#include "Framework/ASoA.h" |
| 45 | +#include "Framework/ASoAHelpers.h" |
| 46 | +#include "Framework/AnalysisDataModel.h" |
| 47 | +#include "Framework/AnalysisTask.h" |
| 48 | +#include "Framework/DataTypes.h" |
| 49 | +#include "Framework/runDataProcessing.h" |
| 50 | + |
50 | 51 | #include "TGeoGlobalMagField.h" |
51 | | -#include "DetectorsBase/Propagator.h" |
52 | | -#include "DetectorsBase/GeometryManager.h" |
53 | | -#include "CCDB/BasicCCDBManager.h" |
| 52 | +#include "TList.h" |
| 53 | + |
| 54 | +#include <iostream> |
| 55 | +#include <map> |
| 56 | +#include <memory> |
| 57 | +#include <string> |
| 58 | +#include <vector> |
54 | 59 |
|
55 | 60 | using std::cout; |
56 | 61 | using std::endl; |
@@ -653,7 +658,7 @@ struct TableMakerMC { |
653 | 658 | track.c1PtY(), track.c1PtZ(), track.c1PtSnp(), track.c1PtTgl(), track.c1Pt21Pt2()); |
654 | 659 | } |
655 | 660 | } // end loop over reconstructed tracks |
656 | | - } // end if constexpr (static_cast<bool>(TTrackFillMap)) |
| 661 | + } // end if constexpr (static_cast<bool>(TTrackFillMap)) |
657 | 662 |
|
658 | 663 | // Maps for the MFT-muon matching index |
659 | 664 | std::map<int, int> newMFTTableSize; // key : oldMFTIndex, value: size of the table-1 at step key |
@@ -864,9 +869,9 @@ struct TableMakerMC { |
864 | 869 | newMatchIndex[muon.index()] = newEntryNb[matchIdx]; // update the match for this muon to the updated entry of the match |
865 | 870 | newMatchIndex[muon.index()] += muonBasic.lastIndex() + 1 - newEntryNb[muon.index()]; // adding the offset of muons, muonBasic.lastIndex() start at -1 |
866 | 871 |
|
867 | | - if (static_cast<int>(muon.trackType()) == 0) { // for now only do this to global tracks |
868 | | - newMatchIndex[matchIdx] = newEntryNb[muon.index()]; // add the updated index of this muon as a match to mch track |
869 | | - newMatchIndex[matchIdx] += muonBasic.lastIndex() + 1 - newEntryNb[muon.index()]; // adding the offset, muonBasic.lastIndex() start at -1 |
| 872 | + if (static_cast<int>(muon.trackType()) == 0) { // for now only do this to global tracks |
| 873 | + newMatchIndex[matchIdx] = newEntryNb[muon.index()]; // add the updated index of this muon as a match to mch track |
| 874 | + newMatchIndex[matchIdx] += muonBasic.lastIndex() + 1 - newEntryNb[muon.index()]; // adding the offset, muonBasic.lastIndex() start at -1 |
870 | 875 | } |
871 | 876 | } else { |
872 | 877 | newMatchIndex[muon.index()] = -1; |
@@ -915,7 +920,7 @@ struct TableMakerMC { |
915 | 920 | muonLabels(fNewLabels.find(mctrack.index())->second, muon.mcMask(), mcflags); |
916 | 921 | } |
917 | 922 | } // end if constexpr (static_cast<bool>(TMuonFillMap)) |
918 | | - } // end loop over collisions |
| 923 | + } // end loop over collisions |
919 | 924 |
|
920 | 925 | // Loop over the label map, create the mother/daughter relationships if these exist and write the skimmed MC stack |
921 | 926 | for (const auto& [newLabel, oldLabel] : fNewLabelsReversed) { |
@@ -1276,7 +1281,7 @@ struct TableMakerMC { |
1276 | 1281 | track.c1PtY(), track.c1PtZ(), track.c1PtSnp(), track.c1PtTgl(), track.c1Pt21Pt2()); |
1277 | 1282 | } |
1278 | 1283 | } // end loop over reconstructed tracks |
1279 | | - } // end if constexpr (static_cast<bool>(TTrackFillMap)) |
| 1284 | + } // end if constexpr (static_cast<bool>(TTrackFillMap)) |
1280 | 1285 |
|
1281 | 1286 | if constexpr (static_cast<bool>(TMuonFillMap)) { |
1282 | 1287 | // build the muon tables |
@@ -1454,7 +1459,7 @@ struct TableMakerMC { |
1454 | 1459 | muonLabels(fNewLabels.find(mctrack.index())->second, muon.mcMask(), mcflags); |
1455 | 1460 | } |
1456 | 1461 | } // end if constexpr (static_cast<bool>(TMuonFillMap)) |
1457 | | - } // end loop over collisions |
| 1462 | + } // end loop over collisions |
1458 | 1463 |
|
1459 | 1464 | // Loop over the label map, create the mother/daughter relationships if these exist and write the skimmed MC stack |
1460 | 1465 | for (const auto& [newLabel, oldLabel] : fNewLabelsReversed) { |
|
0 commit comments