Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions PWGDQ/Core/MCSignalLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,16 @@
signal = new MCSignal(name, "Inclusive jpsi", {prong}, {-1});
return signal;
}
if (!nameStr.compare("Helium3")) {
if (!nameStr.compare("Helium3Primary")) {
MCProng prong(1, {1000020030}, {true}, {false}, {0}, {0}, {false});
signal = new MCSignal(name, "Helium3", {prong}, {-1});
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
signal = new MCSignal(name, "Helium3Primary", {prong}, {-1});
return signal;
}
if (!nameStr.compare("Helium3FromTransport")) {
MCProng prong(1, {1000020030}, {true}, {false}, {0}, {0}, {false});
prong.SetSourceBit(0, MCProng::kProducedInTransport);
signal = new MCSignal(name, "Helium3FromTransport", {prong}, {-1});
return signal;
}
if (!nameStr.compare("nonPromptJpsi")) {
Expand Down Expand Up @@ -1787,7 +1794,7 @@

if (prongs.size() == 0) {
LOG(fatal) << "No prongs were defined for this MCSignal!";
return signals;

Check warning on line 1797 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
}

// Check that we have as many prongs defined as the size of the common ancestors array
Expand Down Expand Up @@ -1862,13 +1869,13 @@
return false;
}
}
}

Check warning on line 1872 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (prongJSON->HasMember("excludeSource")) {
if (prongJSON->FindMember("excludeSource")->value.GetArray().Size() != nSigned) {
LOG(fatal) << "Size of the excludeSource array must be equal to n in MCProng JSON definition";
return false;
}
int iElem = 0;

Check warning on line 1878 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto& ii : prongJSON->FindMember("excludeSource")->value.GetArray()) {
if (!ii.IsArray()) {
LOG(fatal) << "The excludeSource field should be an array of arrays of bool";
Expand All @@ -1881,7 +1888,7 @@
iElem++;
}
}
// Check the useAND on source bit map

Check warning on line 1891 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (prongJSON->HasMember("useANDonSourceBitMap")) {
if (prongJSON->FindMember("useANDonSourceBitMap")->value.GetArray().Size() != nSigned) {
LOG(fatal) << "Size of the useANDonSourceBitMap array must be equal to n in MCProng JSON definition";
Expand Down Expand Up @@ -1959,13 +1966,13 @@
}

// get the array of booleans for the excludePDG option, defaults to false
std::vector<bool> excludePDG;

Check warning on line 1969 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (prongJSON->HasMember("excludePDG")) {
for (auto& ii : prongJSON->FindMember("excludePDG")->value.GetArray()) {
excludePDG.push_back(ii.GetBool());
LOG(debug) << "exclude pdg " << ii.GetBool();
}
} else {

Check warning on line 1975 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (int i = 0; i < n; i++) {
excludePDG.push_back(false);
}
Expand All @@ -1973,7 +1980,7 @@

// get the source bits, and transform from string to int
std::vector<std::vector<int>> sourceBitsVec;
if (prongJSON->HasMember("sourceBits")) {

Check warning on line 1983 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto& ii : prongJSON->FindMember("sourceBits")->value.GetArray()) {
std::vector<int> sourceBits;
for (auto& iii : ii.GetArray()) {
Expand All @@ -1986,9 +1993,9 @@
// prepare the exclusion source options if specified
std::vector<std::vector<bool>> excludeSourceVec;
if (prongJSON->HasMember("excludeSource")) {
for (auto& ii : prongJSON->FindMember("excludeSource")->value.GetArray()) {

Check warning on line 1996 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
std::vector<bool> excludeSource;
for (auto& iii : ii.GetArray()) {

Check warning on line 1998 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
excludeSource.push_back(iii.GetBool());
LOG(debug) << "exclude source bit " << iii.GetBool();
}
Expand All @@ -1998,7 +2005,7 @@

// prepare the useANDonSourceBitMap vector, defaults to true for each generation
std::vector<bool> useANDonSourceBitMap;
if (prongJSON->HasMember("useANDonSourceBitMap")) {

Check warning on line 2008 in PWGDQ/Core/MCSignalLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto& ii : prongJSON->FindMember("useANDonSourceBitMap")->value.GetArray()) {
useANDonSourceBitMap.push_back(ii.GetBool());
LOG(debug) << "use AND on source map " << ii.GetBool();
Expand Down
6 changes: 0 additions & 6 deletions PWGDQ/TableProducer/tableMakerMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,6 @@ struct TableMakerMC {
for (auto& cut : fMuonCuts) {
if (cut.IsSelected(VarManager::fgValues)) {
trackTempFilterMap |= (uint8_t(1) << i);
(reinterpret_cast<TH1I*>(fStatsList->At(2)))->Fill(static_cast<float>(i));
}
i++;
}
Expand Down Expand Up @@ -811,7 +810,6 @@ struct TableMakerMC {
for (auto& cut : fMuonCuts) {
if (cut.IsSelected(VarManager::fgValues)) {
trackTempFilterMap |= (uint8_t(1) << i);
fHistMan->FillHistClass(Form("Muons_%s", cut.GetName()), VarManager::fgValues);
if (fIsAmbiguous && isAmbiguous == 1) {
fHistMan->FillHistClass(Form("Ambiguous_Muons_%s", cut.GetName()), VarManager::fgValues);
}
Expand Down Expand Up @@ -1322,10 +1320,6 @@ struct TableMakerMC {
for (auto& cut : fMuonCuts) {
if (cut.IsSelected(VarManager::fgValues)) {
trackTempFilterMap |= (uint8_t(1) << i);
if (fConfigQA) {
fHistMan->FillHistClass(Form("Muons_%s", cut.GetName()), VarManager::fgValues);
}
(reinterpret_cast<TH1I*>(fStatsList->At(2)))->Fill(static_cast<float>(i));
}
i++;
}
Expand Down
Loading