ATLAS Offline Software
|
An example of how to quickly make some plots at a certain point in the cutflow. More...
#include <ExamplePlots.h>
Public Member Functions | |
ExamplePlots (const std::string &name, TFile *outputFile, EL::Worker *wk=nullptr, std::shared_ptr< top::TopConfig > config=nullptr) | |
Setup some example plots. More... | |
virtual bool | apply (const top::Event &event) const override |
Fill the histograms. More... | |
std::string | name () const override |
Return the name for the cutflow table. More... | |
virtual bool | applyParticleLevel (const top::ParticleLevelEvent &) const |
This does stuff based on the information in a particle level event. More... | |
Private Attributes | |
PlotManager | m_hists |
Easy access to histograms. More... | |
std::size_t | m_nominalHashValue |
std::shared_ptr< top::TopConfig > | m_config |
top::ScaleFactorRetriever * | m_sfRetriever |
Static Private Attributes | |
static const double | toGeV = 0.001 |
File units are MeV and normally people like plots in GeV. More... | |
An example of how to quickly make some plots at a certain point in the cutflow.
Definition at line 25 of file ExamplePlots.h.
top::ExamplePlots::ExamplePlots | ( | const std::string & | name, |
TFile * | outputFile, | ||
EL::Worker * | wk = nullptr , |
||
std::shared_ptr< top::TopConfig > | config = nullptr |
||
) |
Setup some example plots.
Add a bunch of histograms.
name | The name of the directory to store histograms in, in the output file. e.g. you might have ee, mumu and emu. |
outputFile | The output file. Needs setting up at the very start so that we can attach the files. |
wk | Only used by EventLoop, ok as nullptr as default. |
Definition at line 24 of file ExamplePlots.cxx.
|
overridevirtual |
Fill the histograms.
Implements top::EventSelectorBase.
Definition at line 138 of file ExamplePlots.cxx.
|
inlinevirtualinherited |
This does stuff based on the information in a particle level event.
The idea is that you implement this to return either true or false, based on the information held within the top::ParticleLevelEvent. If this function returns true, then the event is kept, otherwise it is removed. The function has a default implementation (which returns true) because it is expected that many EventSelector objects do not operate on ParticleLevelEvent objects.
top::ParticleLevelEvent | the current particle level event. |
true | if the event should be kept (i.e. it passed the selector criteria), false otherwise. |
Reimplemented in top::JetNGhostSelector, top::PrintEventSelector, top::PseudoTopRecoRun, top::NElectronNMuonTightSelector, top::NElectronNMuonSelector, top::NFwdElectronSelector, top::HTSelector, top::OSLeptonTightSelector, top::MLLSelector, top::MWTSelector, top::NElectronTightSelector, top::NFwdElectronTightSelector, top::NMuonTightSelector, top::OSLeptonSelector, top::METMWTSelector, top::METSelector, top::MLLWindow, top::NElectronSelector, top::NJetSelector, top::NMuonSelector, top::NPhotonSelector, top::NSoftMuonSelector, top::NTauSelector, top::SSLeptonTightSelector, top::SSLeptonSelector, top::ParticleLevelSelector, top::RecoLevelSelector, top::NVarRCJetSelector, top::NLargeJetSelector, and top::NRCJetSelector.
Definition at line 73 of file EventSelectorBase.h.
|
overridevirtual |
Return the name for the cutflow table.
Implements top::EventSelectorBase.
Definition at line 282 of file ExamplePlots.cxx.
|
private |
Definition at line 64 of file ExamplePlots.h.
|
private |
Easy access to histograms.
Definition at line 59 of file ExamplePlots.h.
|
private |
Definition at line 62 of file ExamplePlots.h.
|
private |
Definition at line 65 of file ExamplePlots.h.
|
staticprivate |
File units are MeV and normally people like plots in GeV.
Definition at line 56 of file ExamplePlots.h.