ATLAS Offline Software
EventSelectionManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef EVENTSELECTIONMANAGER_H_
6 #define EVENTSELECTIONMANAGER_H_
7 
8 #include <vector>
9 #include <memory>
10 
13 
14 class TFile;
15 
16 namespace EL {
17  class Worker;
18 }
19 
20 namespace xAOD {
21  class SystematicEvent;
22 }
23 
24 namespace top {
25  class Event;
26  class TopConfig;
27  class ParticleLevelEvent;
28 }
29 
30 namespace top {
41  public:
50  explicit EventSelectionManager(const std::vector<SelectionConfigurationData>& selectionConfigData,
51  TFile* outputFile, const std::string& toolLoaderNames,
52  const std::shared_ptr<top::TopConfig>& config, EL::Worker* wk = nullptr);
53 
58 
63 
67 
71  virtual void countInitial(const float mcEventWeight, const float pileupWeight);
75  virtual void countGRL(const float mcEventWeight, const float pileupWeight);
79  virtual void countGoodCalo(const float mcEventWeight, const float pileupWeight);
83  virtual void countPrimaryVertex(const float mcEventWeight, const float pileupWeight);
84 
100  virtual bool apply(top::Event& event, const xAOD::SystematicEvent& currentSystematic);
101 
113  virtual bool applyParticleLevel(const top::ParticleLevelEvent& plEvent);
114 
122  virtual void finalise();
123 
135  virtual void addExtraBranches(std::vector<std::string>& extraBranchList);
136 
144  std::vector<std::string> GetFakesMMConfigs(const std::string& selection) const;
145  private:
147  std::vector<top::EventSelection> m_selections;
148  };
149 }
150 
151 #endif
top::EventSelectionManager::addExtraBranches
virtual void addExtraBranches(std::vector< std::string > &extraBranchList)
To get the mini xAOD really small we need to tell it which branches to save.
Definition: EventSelectionManager.cxx:140
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::EventSelectionManager::apply
virtual bool apply(top::Event &event, const xAOD::SystematicEvent &currentSystematic)
Run through the event selections for each event.
Definition: EventSelectionManager.cxx:100
top::EventSelectionManager
Maybe you want to run multiple selections (e+jets, mu+jets) on the same input files at the same time.
Definition: EventSelectionManager.h:40
Event
Definition: trigbs_orderedMerge.cxx:42
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
top::EventSelectionManager::EventSelectionManager
EventSelectionManager(const EventSelectionManager &rhs)=delete
SelectionConfigurationData.h
top::EventSelectionManager::~EventSelectionManager
virtual ~EventSelectionManager()
Does not need to do anything.
Definition: EventSelectionManager.h:57
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
top::EventSelectionManager::applyParticleLevel
virtual bool applyParticleLevel(const top::ParticleLevelEvent &plEvent)
Execute the event selection using the Particle Level data.
Definition: EventSelectionManager.cxx:118
top::EventSelectionManager::countPrimaryVertex
virtual void countPrimaryVertex(const float mcEventWeight, const float pileupWeight)
Count the number of events passing Primary Vertex.
Definition: EventSelectionManager.cxx:95
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
EL::Worker
Definition: Worker.h:25
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
top::EventSelectionManager::countGoodCalo
virtual void countGoodCalo(const float mcEventWeight, const float pileupWeight)
Count the number of events passing Good Calo.
Definition: EventSelectionManager.cxx:90
top::ParticleLevelEvent
Definition: ParticleLevelEvent.h:24
top::EventSelectionManager::finalise
virtual void finalise()
Call finalise on each tool.
Definition: EventSelectionManager.cxx:134
selection
std::string selection
Definition: fbtTestBasics.cxx:73
top::EventSelectionManager::countGRL
virtual void countGRL(const float mcEventWeight, const float pileupWeight)
Count the number of events passing GRL.
Definition: EventSelectionManager.cxx:85
EventSelection.h
top::EventSelectionManager::GetFakesMMConfigs
std::vector< std::string > GetFakesMMConfigs(const std::string &selection) const
Gives you the lists of the Fakes MM configurations associated to a selection.
Definition: EventSelectionManager.cxx:145
top::EventSelectionManager::EventSelectionManager
EventSelectionManager()=delete
top::EventSelectionManager::m_selections
std::vector< top::EventSelection > m_selections
A vector of EventSelection objects, for doing fancy things.
Definition: EventSelectionManager.h:147
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
top::EventSelectionManager::operator=
EventSelectionManager & operator=(const EventSelectionManager &rhs)=delete
xAOD::SystematicEvent
SystematicEvent A simple xAOD class which we can persist into a mini-xAOD The xAOD EDM is way too com...
Definition: SystematicEvent.h:27
top::EventSelectionManager::countInitial
virtual void countInitial(const float mcEventWeight, const float pileupWeight)
Count the number of initial events.
Definition: EventSelectionManager.cxx:80
top::Event
Very simple class to hold event data after reading from a file.
Definition: Event.h:49