You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Detectors/AOD/src/AODProducerWorkflowSpec.cxx
+35-9Lines changed: 35 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -904,13 +904,17 @@ void clearMCKeepStore(std::vector<std::vector<std::unordered_map<int, int>>>& st
904
904
}
905
905
906
906
// helper function to add a particle/track to the MC keep store
907
-
voidkeepMCParticle(std::vector<std::vector<std::unordered_map<int, int>>>& store, int source, int event, int track, int value = 1)
907
+
voidkeepMCParticle(std::vector<std::vector<std::unordered_map<int, int>>>& store, int source, int event, int track, int value = 1, bool useSigFilt = false)
908
908
{
909
909
if (track < 0) {
910
910
LOG(warn) << "trackID is smaller than 0. Neglecting";
for (int iCol = 0; iCol < nMCCollisions; iCol++) {
1982
1988
totalNParts += mcParts[iCol].size();
1989
+
1990
+
// if signal filtering enabled, let's check if there are more than one source; otherwise fatalise
1991
+
if (mUseSigFiltMC) {
1992
+
std::vector<int> sourceIDs{};
1993
+
auto& colParts = mcParts[iCol];
1994
+
for (auto colPart : colParts) {
1995
+
int sourceID = colPart.sourceID;
1996
+
if (std::find(sourceIDs.begin(), sourceIDs.end(), sourceID) == sourceIDs.end()) {
1997
+
sourceIDs.push_back(sourceID);
1998
+
}
1999
+
if (sourceIDs.size() > 1) { // we found more than one, exit
2000
+
break;
2001
+
}
2002
+
}
2003
+
if (sourceIDs.size() <= 1) {
2004
+
LOGP(fatal, "Signal filtering cannot be enabled without embedding. Please fix the configuration either enabling the embedding, or turning off the signal filtering.");
0 commit comments