Skip to content
Snippets Groups Projects
Commit 5bf0c5d8 authored by Jon Burr's avatar Jon Burr
Browse files

Fixes suggested by Tim

parent 2c98aae4
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!38981R3 trigger matching
......@@ -59,7 +59,6 @@ namespace Trig
// TODO - detect if we're looking at run 3 data.
// If we are, then setting rerun to true should give a warning as it no
// longer makes sense for run 3
unsigned int condition = rerun ? TrigDefs::Physics | TrigDefs::allowResurrectedDecision : TrigDefs::Physics;
// In what follows, the same comparisons between reco and trigger objects will done
// fairly frequently. As these include DR checks we want to minimise how often we do these
......@@ -73,8 +72,12 @@ namespace Trig
const Trig::ChainGroup *chainGroup = m_trigDecTool->getChainGroup(chain);
for (const std::string &chainName : chainGroup->getListOfTriggers())
{
if (msgLvl(MSG::DEBUG))
ATH_MSG_DEBUG("Chain " << chainName << " was passed? " << m_trigDecTool->isPassed(chainName));
if (!m_trigDecTool->isPassed(chainName, rerun ? TrigDefs::Physics | TrigDefs::allowResurrectedDecision : TrigDefs::Physics))
{
ATH_MSG_DEBUG("Chain " << chainName << " did not pass");
continue;
}
ATH_MSG_DEBUG("Chain " << chainName << " passed");
// Now we have to build up combinations
// TODO - right now we use a filter that passes everything that isn't pointer-equal.
// This will probably need to be fixed to something else later - at least the unique RoI filter
......@@ -83,7 +86,7 @@ namespace Trig
std::vector<std::size_t> multiplicities = chainInfo->leg_multiplicities();
combinations.reserve(multiplicities.size());
// Get all the features for the chain
VecLinkInfo_t chainFeatures = m_trigDecTool->features<xAOD::IParticleContainer>(chainName, condition);
VecLinkInfo_t chainFeatures = m_trigDecTool->features<xAOD::IParticleContainer>(chainName);
ATH_MSG_VERBOSE("Chain " << chainName << " has " << chainFeatures.size() << " features and " << multiplicities.size() << " legs with multiplicities, nFeatures: ");
if (multiplicities.size() == 1)
{
......
......@@ -13,12 +13,25 @@ namespace TrigCompositeUtils
return true;
}
bool uniqueInitialRoIs(const std::vector<LinkInfo<xAOD::IParticleContainer>> &links)
{
std::set<std::pair<uint32_t, uint32_t>> seen;
for (const auto &info : links)
{
LinkInfo<TrigRoiDescriptorCollection> roi = findLink<TrigRoiDescriptorCollection>(info.source, initialRoIString());
if (!seen.insert(std::make_pair(roi.link.persKey(), roi.link.persIndex())).second)
// Insert returns false if that item already exists in it
return false;
}
return true;
}
bool uniqueRoIs(const std::vector<LinkInfo<xAOD::IParticleContainer>> &links)
{
std::set<std::pair<uint32_t, uint32_t>> seen;
for (const auto &info : links)
{
LinkInfo<TrigRoiDescriptorCollection> roi = findLink<TrigRoiDescriptorCollection>(info.source, "initialRoI");
LinkInfo<TrigRoiDescriptorCollection> roi = findLink<TrigRoiDescriptorCollection>(info.source, "roi");
if (!seen.insert(std::make_pair(roi.link.persKey(), roi.link.persIndex())).second)
// Insert returns false if that item already exists in it
return false;
......
......@@ -21,10 +21,14 @@ namespace TrigCompositeUtils
UniqueObjects,
/// Do not allow any two objects to share an RoI
UniqueRoIs,
/// Do not allow any two objects to share an initial RoI
UniqueInitialRoIs
};
/// Helper fucntion that returns true if no objects are repeated
bool uniqueObjects(const std::vector<LinkInfo<xAOD::IParticleContainer>> &links);
/// Helper function that returns true if no objects share an initial RoI
bool uniqueInitialRoIs(const std::vector<LinkInfo<xAOD::IParticleContainer>> &links);
/// Helper function that returns true if no objects share a final RoI
bool uniqueRoIs(const std::vector<LinkInfo<xAOD::IParticleContainer>> &links);
/// Get a lambda corresponding to the specified FilterType enum.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment