![]() |
ATLAS Offline Software
|
#include <JetNGhostSelector.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 | |
JetNGhostSelector (const std::string ¶ms) | |
bool | apply (const top::Event &) const override |
Apply on reco level. More... | |
bool | applyParticleLevel (const top::ParticleLevelEvent &plEvent) const override |
Apply on particle level. More... | |
std::string | name () const override |
The name is generated in the constructor for this kind of tool. 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 Types | |
enum | Type { c = static_cast<int>('c'), C = static_cast<int>('C'), b = static_cast<int>('b'), B = static_cast<int>('B'), t = static_cast<int>('t'), W = static_cast<int>('W'), Z = static_cast<int>('Z'), H = static_cast<int>('H'), tau, Invalid } |
Private Member Functions | |
std::string | parseType (const std::string ¶ms) |
Private Attributes | |
Type | m_type |
std::string | m_name |
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... | |
Definition at line 16 of file JetNGhostSelector.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.
|
private |
Enumerator | |
---|---|
c | |
C | |
b | |
B | |
t | |
W | |
Z | |
H | |
tau | |
Invalid |
Definition at line 39 of file JetNGhostSelector.h.
|
explicit |
Definition at line 8 of file JetNGhostSelector.cxx.
|
inlineoverridevirtual |
Apply on reco level.
There is no sensible application for a ghost tagging selector at reco level, hence return true for any input.
Implements top::EventSelectorBase.
Definition at line 25 of file JetNGhostSelector.h.
|
overridevirtual |
Apply on particle level.
Will calculate the number of ghost tagged jet for the requested type. Will return true if that number is equal to order larger than the cut value, false otherwise.
Reimplemented from top::EventSelectorBase.
Definition at line 81 of file JetNGhostSelector.cxx.
|
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.
|
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.
|
overridevirtual |
The name is generated in the constructor for this kind of tool.
Reimplemented from top::SignValueSelector.
Definition at line 133 of file JetNGhostSelector.cxx.
|
private |
Definition at line 44 of file JetNGhostSelector.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.
|
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.
|
private |
Definition at line 53 of file JetNGhostSelector.h.
|
privateinherited |
The sign of the cut, filled by the constructor.
Definition at line 171 of file SignValueSelector.h.
|
private |
Definition at line 51 of file JetNGhostSelector.h.