ATLAS Offline Software
|
ChargeFilter can filter objects upon their charge. More...
#include <ChargeFilter.h>
Public Member Functions | |
ChargeFilter () | |
Default constructor: More... | |
ChargeFilter (const ChargeFilter< T > &rhs) | |
Copy constructor: More... | |
virtual | ~ChargeFilter () |
Destructor: More... | |
ChargeFilter< T > & | operator= (const ChargeFilter< T > &rhs) |
Assignment operator: More... | |
virtual bool | isAccepted (const T *element) const |
Main filter method. More... | |
double | charge () const |
Returns the charge the filter is looking for. More... | |
void | setFilter (const IFilterCuts *filter) |
Copies the IFilterCuts properties of the given object to the current IFilterCuts object (ie: it copies the required charge() to the current object) More... | |
void | setCharge (const ChargeType &charge) |
Set the filter to look for the given charge. More... | |
bool | operator() (const T *element) const |
Protected Attributes | |
std::optional< ChargeType > | m_charge |
The charge the filter is looking for. More... | |
ChargeFilter can filter objects upon their charge.
One can only require a charge (not a range in charges). But it could be extended to a range.
Definition at line 31 of file ChargeFilter.h.
ChargeFilter< T >::ChargeFilter |
Default constructor:
Definition at line 103 of file ChargeFilter.h.
ChargeFilter< T >::ChargeFilter | ( | const ChargeFilter< T > & | rhs | ) |
Copy constructor:
Definition at line 110 of file ChargeFilter.h.
|
virtual |
double ChargeFilter< T >::charge |
Returns the charge the filter is looking for.
Definition at line 154 of file ChargeFilter.h.
|
virtual |
Main filter method.
This method takes the decision whether or not the filter has to accept the element. It returns true or false accordingly if the charge of the particle matchs the one of the filter, it is accepted. If no cut has been defined, it returns true by default.
Check if a charge cut has been set-up
The charge cut is un-initialized so by convention we return true;
Otherwise return true by convention
Implements IFilter< T >.
Definition at line 133 of file ChargeFilter.h.
|
inline |
void ChargeFilter< T >::setCharge | ( | const ChargeType & | charge | ) |
Set the filter to look for the given charge.
charge | : the charge the filter will be looking for. |
Definition at line 181 of file ChargeFilter.h.
|
virtual |
Copies the IFilterCuts properties of the given object to the current IFilterCuts object (ie: it copies the required charge() to the current object)
Implements IFilterCuts.
Definition at line 163 of file ChargeFilter.h.
|
protected |
The charge the filter is looking for.
It is unitialized by default (in the std::optional sense)
Definition at line 95 of file ChargeFilter.h.