|
ATLAS Offline Software
|
Go to the documentation of this file.
10 using namespace TopEventSelectionTools;
13 JetCleaningSelector::JetCleaningSelector(
const std::string&
level, std::shared_ptr<top::TopConfig>
config) :
25 <<
"Should be LooseBad or TightBad");
26 throw std::runtime_error (
"JetCleaningSelector: Cannot continue");
36 if (
m_config->useParticleFlowJets()) {
38 "JetCleaningSelector: This cleaning configuration is not available for particle-flow jets. The only available configuration is\n JETCLEAN LooseBad");
42 if (!
m_config->useParticleFlowJets()) {
58 if (
m_config->isTruthDxAOD())
return true;
60 if (
m_config->useParticleFlowJets()) {
62 "DFCommonJets_eventClean_LooseBad"),
63 "JetCleaningSelector: DFCommonJets_eventClean_LooseBad not available in EventInfo. Needed for particle-flow jets cleaning");
64 bool result =
event.m_info->auxdataConst<
char>(
"DFCommonJets_eventClean_LooseBad");
84 for (
const auto*
const jetPtr :
event.m_jets) {
99 if (
m_config->useBadBatmanCleaning()) {
116 const unsigned int runNumber =
event.m_info->runNumber();
124 "DFCommonJets_isBadBatman"),
125 "JetCleaningSelector: DFCommonJets_isBadBatman not available in EventInfo. Needed for BadBatman cleaning");
126 const bool result =
event.m_info->auxdataConst<
char>(
"DFCommonJets_isBadBatman");
TopConfig A simple configuration that is NOT a singleton.
std::string name() const override
Print the name of the tool and level.
std::shared_ptr< top::TopConfig > m_config
ToolHandle< IJetSelector > m_jetCleaningToolLooseBad
The jet cleaning tools.
POOL::TEvent event(POOL::TEvent::kClassAccess)
bool m_useEventLevelJetCleaningTool
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
ToolHandle< ECUtils::IEventCleaningTool > m_jetEventCleaningToolLooseBad
The jet event cleaning tools.
ToolHandle< ECUtils::IEventCleaningTool > m_jetEventCleaningToolTightBad
ToolHandle< IJetSelector > m_jetCleaningToolTightBad
bool checkBadBatman(const top::Event &event) const
A helper function to check if the event passes BadBatman cleaning in a specified range (from config) ...
Very simple class to hold event data after reading from a file.
bool apply(const top::Event &event) const override
Only accept the event if the tool says all the jets are okay.
std::string m_level
The level to configure to, so we can print it in the name.