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
@@ -931,13 +931,17 @@ void clearMCKeepStore(std::vector<std::vector<std::unordered_map<int, int>>>& st
931
931
}
932
932
933
933
// helper function to add a particle/track to the MC keep store
934
-
voidkeepMCParticle(std::vector<std::vector<std::unordered_map<int, int>>>& store, int source, int event, int track, int value = 1)
934
+
voidkeepMCParticle(std::vector<std::vector<std::unordered_map<int, int>>>& store, int source, int event, int track, int value = 1, bool useSigFilt = false)
935
935
{
936
936
if (track < 0) {
937
937
LOG(warn) << "trackID is smaller than 0. Neglecting";
for (int iCol = 0; iCol < nMCCollisions; iCol++) {
1995
2001
totalNParts += mcParts[iCol].size();
2002
+
2003
+
// if signal filtering enabled, let's check if there are more than one source; otherwise fatalise
2004
+
if (mUseSigFiltMC) {
2005
+
std::vector<int> sourceIDs{};
2006
+
auto& colParts = mcParts[iCol];
2007
+
for (auto colPart : colParts) {
2008
+
int sourceID = colPart.sourceID;
2009
+
if (std::find(sourceIDs.begin(), sourceIDs.end(), sourceID) == sourceIDs.end()) {
2010
+
sourceIDs.push_back(sourceID);
2011
+
}
2012
+
if (sourceIDs.size() > 1) { // we found more than one, exit
2013
+
break;
2014
+
}
2015
+
}
2016
+
if (sourceIDs.size() <= 1) {
2017
+
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