ATLAS Offline Software
|
A tool that selects events with a certain number of good jets. More...
#include <NJetBtagSelector.h>
Public Types | |
enum | Sign { signNOIDEA, signEQ, signLT, signGT, signLTEQ, signGTEQ } |
Many of the tools will be supplied with an equality (or inequality) by the user. More... | |
Public Member Functions | |
NJetBtagSelector (const std::string ¶ms, std::shared_ptr< top::TopConfig > config, bool doTrackJets) | |
bool | apply (const top::Event &event) const override |
This does stuff based on the information in an event. More... | |
const std::string | getFullCutName () |
virtual std::string | name () const override |
The name is generated in the constructor for this kind of tool. More... | |
virtual bool | applyParticleLevel (const top::ParticleLevelEvent &) const |
This does stuff based on the information in a particle level event. More... | |
Protected Member Functions | |
void | checkValueIsInteger () |
Integers are annoying in C++. More... | |
void | checkMultiplicityIsInteger () |
Integers are annoying in C++. More... | |
Sign | sign () const |
Get the sign setup in the constructor. More... | |
double | value () const |
Get the cut value assigned in the constructor. More... | |
std::string | valueString () const |
Get the cut value assigned in the constructor. More... | |
std::string | valueStringDelimReplace () const |
valueString which is manipulated to replace delimiter with new string More... | |
double | multiplicity () const |
Get the cut multiplicity assigned in the constructor. More... | |
Sign | decodesign (std::string ¶ms) |
Take the string params, look for one of the allowed inequalities (or equality) and return that. More... | |
bool | checkFloat (double value, double cut) const |
Compare a cut supplied by the user with the value calculated in the event. More... | |
bool | checkInt (int value, int cut) const |
Compare a cut supplied by the user with the value calculated in the event. More... | |
const std::string | signstring () const |
Convert the sign enum back to a string for use in the name and print outs. More... | |
Private Attributes | |
bool | m_doTrackJets |
std::string | m_name |
Hold the name of the tool, filled by the constructor. More... | |
Sign | m_sign |
The sign of the cut, filled by the constructor. More... | |
double | m_cutvalue |
The value of the cut, filled by the constructor. More... | |
std::string | m_cutvalueString |
The value of the cut in the case it's a string, filled by the constructor. More... | |
double | m_multiplicity |
The multiplicity for cuts that take both a value and a multiplicity e.g. EL_N 25000 >= 2. More... | |
std::string | m_cutvalueStringDelimReplace |
The value of the cut when it is a string, with replacement of delimiter with a replacement substring. More... | |
A tool that selects events with a certain number of good jets.
Definition at line 16 of file NJetBtagSelector.h.
|
inherited |
Many of the tools will be supplied with an equality (or inequality) by the user.
They're decoded from the text input and saved in this 'sign' format.
Enumerator | |
---|---|
signNOIDEA | |
signEQ | |
signLT | |
signGT | |
signLTEQ | |
signGTEQ |
Definition at line 23 of file SignValueSelector.h.
|
explicit |
Definition at line 12 of file NJetBtagSelector.cxx.
|
overridevirtual |
This does stuff based on the information in an event.
The idea is that you implement this to return either true or false based on the information held within top::Event. If this returns true then the event is kept. If it returns false then the event is removed.
top::Event | The current event. |
Implements top::EventSelectorBase.
Definition at line 34 of file NJetBtagSelector.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.
|
protectedinherited |
Compare a cut supplied by the user with the value calculated in the event.
For floating point numbers.
value | The value from the event. |
cut | The cut the user wants to apply. |
Definition at line 133 of file SignValueSelector.cxx.
|
protectedinherited |
Compare a cut supplied by the user with the value calculated in the event.
For integer numbers.
value | The value from the event. |
cut | The cut the user wants to apply. |
Definition at line 159 of file SignValueSelector.cxx.
|
protectedinherited |
Integers are annoying in C++.
Your first thought when reading in an integer is probably just to read it in with cin to an integer variable. This seems to not work, as it'll just read the integer component and ignore the rest of the string. The approach here then is to read it in as a floating point number and ask that number if it is equal to itself rounded down (integers are, fractional numbers are not)
Since the user probably didn't mean to cut on njets >= 2.3 we should interrupt the job and print a useful error message if it doesn't work.
Definition at line 82 of file SignValueSelector.cxx.
|
protectedinherited |
Integers are annoying in C++.
Mostly used by the NLargeJet selectors.
Definition at line 74 of file SignValueSelector.cxx.
|
protectedinherited |
Take the string params, look for one of the allowed inequalities (or equality) and return that.
It also removes the text from the string so the string can then be passed on to some code to extract the numerical value.
params | The string that contains something like ">= 2". It will return the " 2" via the params parameter. |
Definition at line 110 of file SignValueSelector.cxx.
|
inline |
Definition at line 22 of file NJetBtagSelector.h.
|
protectedinherited |
Get the cut multiplicity assigned in the constructor.
This is used for cuts that take a value and a multiplicity, for example EL_N 25000 >= 2 means at least two electrons with pT > 25 GeV. You can chain these together to make non-symmetric cuts. For example EL_N 25000 >= 2 EL_N 40000 >= 1
Definition at line 106 of file SignValueSelector.cxx.
|
overridevirtualinherited |
The name is generated in the constructor for this kind of tool.
Implements top::EventSelectorBase.
Reimplemented in top::JetNGhostSelector.
Definition at line 70 of file SignValueSelector.cxx.
|
protectedinherited |
Get the sign setup in the constructor.
Definition at line 90 of file SignValueSelector.cxx.
|
protectedinherited |
Convert the sign enum back to a string for use in the name and print outs.
Definition at line 184 of file SignValueSelector.cxx.
|
protectedinherited |
Get the cut value assigned in the constructor.
Definition at line 94 of file SignValueSelector.cxx.
|
protectedinherited |
Get the cut value assigned in the constructor.
This is for when the cut is a string
Definition at line 98 of file SignValueSelector.cxx.
|
protectedinherited |
valueString which is manipulated to replace delimiter with new string
Definition at line 102 of file SignValueSelector.cxx.
|
privateinherited |
The value of the cut, filled by the constructor.
Definition at line 174 of file SignValueSelector.h.
|
privateinherited |
The value of the cut in the case it's a string, filled by the constructor.
Definition at line 177 of file SignValueSelector.h.
|
privateinherited |
The value of the cut when it is a string, with replacement of delimiter with a replacement substring.
Definition at line 183 of file SignValueSelector.h.
|
private |
Definition at line 24 of file NJetBtagSelector.h.
|
privateinherited |
The multiplicity for cuts that take both a value and a multiplicity e.g. EL_N 25000 >= 2.
Definition at line 180 of file SignValueSelector.h.
|
privateinherited |
Hold the name of the tool, filled by the constructor.
Definition at line 168 of file SignValueSelector.h.
|
privateinherited |
The sign of the cut, filled by the constructor.
Definition at line 171 of file SignValueSelector.h.