Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
an algorithm for performing track-vertex selection on leptons
More...
#include <AsgLeptonTrackSelectionAlg.h>
|
StatusCode | initialize () override |
|
StatusCode | execute (const EventContext &ctx) const override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
SysListHandle | m_systematicsList {this} |
| the systematics list we run More...
|
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey {this, "eventInfo", "EventInfo", "the name of the EventInfo object to retrieve"} |
| the EventInfo key More...
|
|
SG::ReadHandleKey< xAOD::VertexContainer > | m_primaryVerticesKey {this, "primaryVertices", "PrimaryVertices", "the name of the PrimaryVertex container to retrieve"} |
| the PrimaryVertex key More...
|
|
SysReadHandle< xAOD::IParticleContainer > | m_particlesHandle |
| the particle container we run on More...
|
|
SysReadSelectionHandle | m_preselection |
| the preselection we apply to our input More...
|
|
SysWriteSelectionHandle | m_selectionHandle |
| the accessor for m_selectionDecoration More...
|
|
ServiceHandle< ISelectionNameSvc > | m_nameSvc {"SelectionNameSvc", "AsgLeptonTrackSelectionAlg"} |
| the ISelectionNameSvc More...
|
|
asg::AcceptInfo | m_accept |
| the asg::AcceptInfo we are using More...
|
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
|
Gaudi::Property< float > | m_maxD0Significance {this, "maxD0Significance", 0, "maximum d0 significance (or 0 for no cut)"} |
| algorithm properties More...
|
|
Gaudi::Property< float > | m_maxDeltaZ0SinTheta {this, "maxDeltaZ0SinTheta", 0, "maximum Delta z0 sin theta (or 0 for no cut)"} |
|
Gaudi::Property< int > | m_nMinPixelHits {this, "nMinPixelHits", -1, "minimum number of required Pixel hits (or -1 for no cut)"} |
|
Gaudi::Property< int > | m_nMaxPixelHits {this, "nMaxPixelHits", -1, "maximum number of required Pixel hits (or -1 for no cut)"} |
|
Gaudi::Property< int > | m_nMinSCTHits {this, "nMinSCTHits", -1, "minimum number of required SCT hits (or -1 for no cut)"} |
|
Gaudi::Property< int > | m_nMaxSCTHits {this, "nMaxSCTHits", -1, "maximum number of required SCT hits (or -1 for no cut)"} |
|
an algorithm for performing track-vertex selection on leptons
Originally I meant to implement this as an IAsgSelectionTool, but since this needs other objects besides the lepton itself, I made it into an algorithm. Technically this could also be addressed by retrieving those extra objects in the seleciton tool, but this seemed like potential overkill, given that the selection tools may be called very frequently and are not really doing any form of heavy lifting at all. Still, at some point we may decide to change this into a selection tool instead (06 Aug 18).
Definition at line 41 of file AsgLeptonTrackSelectionAlg.h.
◆ StoreGateSvc_t
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode CP::AsgLeptonTrackSelectionAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
override |
Definition at line 71 of file AsgLeptonTrackSelectionAlg.cxx.
90 if (primaryVertex ==
nullptr)
106 float deltaZ0SinTheta = -999;
110 std::size_t cutIndex {0};
119 return StatusCode::FAILURE;
122 acceptData.setCutResult (cutIndex ++,
track !=
nullptr);
124 if (
track !=
nullptr) {
129 }
catch (
const std::runtime_error &) {
130 acceptData.setCutResult (cutIndex ++,
false);
133 const double vertex_z = primaryVertex ? primaryVertex->z() : 0;
147 acceptData.setCutResult (cutIndex++,
accept);
159 acceptData.setCutResult (cutIndex++,
accept);
168 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ filterPassed()
◆ finalize()
StatusCode EL::AnaReentrantAlgorithm::finalize |
( |
| ) |
|
|
protectedinherited |
finalize this algorithm
This gets called after event processing has finished. The last event may no longer be in memory, and the code should not try to access it.
Definition at line 102 of file AnaReentrantAlgorithm.cxx.
105 return StatusCode::SUCCESS;
◆ initialize()
StatusCode CP::AsgLeptonTrackSelectionAlg::initialize |
( |
| ) |
|
|
override |
Definition at line 26 of file AsgLeptonTrackSelectionAlg.cxx.
33 return StatusCode::FAILURE;
38 return StatusCode::FAILURE;
41 m_accept.
addCut (
"trackRetrieval",
"whether the track retrieval failed");
43 m_accept.
addCut (
"maxD0Significance",
"maximum D0 significance cut");
45 m_accept.
addCut (
"maxDeltaZ0SinTheta",
"maximum Delta z0 sin theta cut");
47 m_accept.
addCut (
"numPixelHits",
"Minimum and/or maxiumum Pixel hits");
49 m_accept.
addCut (
"numSCTHits",
"Minimum and/or maxiumum SCT hits");
66 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isClonable()
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
◆ sysExecute()
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_accept
◆ m_detStore
◆ m_eventInfoKey
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_maxD0Significance
Gaudi::Property<float> CP::AsgLeptonTrackSelectionAlg::m_maxD0Significance {this, "maxD0Significance", 0, "maximum d0 significance (or 0 for no cut)"} |
|
private |
◆ m_maxDeltaZ0SinTheta
Gaudi::Property<float> CP::AsgLeptonTrackSelectionAlg::m_maxDeltaZ0SinTheta {this, "maxDeltaZ0SinTheta", 0, "maximum Delta z0 sin theta (or 0 for no cut)"} |
|
private |
◆ m_nameSvc
◆ m_nMaxPixelHits
Gaudi::Property<int> CP::AsgLeptonTrackSelectionAlg::m_nMaxPixelHits {this, "nMaxPixelHits", -1, "maximum number of required Pixel hits (or -1 for no cut)"} |
|
private |
◆ m_nMaxSCTHits
Gaudi::Property<int> CP::AsgLeptonTrackSelectionAlg::m_nMaxSCTHits {this, "nMaxSCTHits", -1, "maximum number of required SCT hits (or -1 for no cut)"} |
|
private |
◆ m_nMinPixelHits
Gaudi::Property<int> CP::AsgLeptonTrackSelectionAlg::m_nMinPixelHits {this, "nMinPixelHits", -1, "minimum number of required Pixel hits (or -1 for no cut)"} |
|
private |
◆ m_nMinSCTHits
Gaudi::Property<int> CP::AsgLeptonTrackSelectionAlg::m_nMinSCTHits {this, "nMinSCTHits", -1, "minimum number of required SCT hits (or -1 for no cut)"} |
|
private |
◆ m_particlesHandle
Initial value:{
this, "particles", "", "the asg collection to run on"}
the particle container we run on
Definition at line 76 of file AsgLeptonTrackSelectionAlg.h.
◆ m_preselection
Initial value:{
this, "preselection", "", "the preselection to apply"}
the preselection we apply to our input
Definition at line 81 of file AsgLeptonTrackSelectionAlg.h.
◆ m_primaryVerticesKey
◆ m_selectionHandle
Initial value:{
this, "selectionDecoration", "trackSelection", "the decoration for the asg selection"}
the accessor for m_selectionDecoration
Definition at line 86 of file AsgLeptonTrackSelectionAlg.h.
◆ m_systematicsList
SysListHandle CP::AsgLeptonTrackSelectionAlg::m_systematicsList {this} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
the EventInfo key
void setBits(const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet &sys) const
set the selection decoration
SysReadSelectionHandle m_preselection
the preselection we apply to our input
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
ServiceHandle< ISelectionNameSvc > m_nameSvc
the ISelectionNameSvc
Gaudi::Property< int > m_nMaxPixelHits
Gaudi::Property< int > m_nMinSCTHits
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode accept(const xAOD::Muon *mu)
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
SelectionType selectionFromAccept(const asg::AcceptData &accept)
the selection decoration made from the given AcceptData object
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Gaudi::Property< float > m_maxDeltaZ0SinTheta
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Class providing the definition of the 4-vector interface.
float nPixelHits(const U &p)
std::string getLabel() const
get the name/label of the decoration
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< int > m_nMinPixelHits
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVerticesKey
the PrimaryVertex key
::StatusCode initialize()
intialize this property
bool getBool(const SG::AuxElement &element, const CP::SystematicSet &sys) const
get the selection as a bool
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
float nSCTHits(const U &p)
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
SysWriteSelectionHandle m_selectionHandle
the accessor for m_selectionDecoration
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SysListHandle m_systematicsList
the systematics list we run
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
asg::AcceptInfo m_accept
the asg::AcceptInfo we are using
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
SysReadHandle< xAOD::IParticleContainer > m_particlesHandle
the particle container we run on
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Class describing a TrackParticle.
Gaudi::Property< int > m_nMaxSCTHits
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
Gaudi::Property< float > m_maxD0Significance
algorithm properties