|
ATLAS Offline Software
|
#include <DecoratePromptLeptonRNN.h>
|
| DecoratePromptLeptonRNN (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () override |
|
const xAOD::TrackParticle * | findMuonTrack (const xAOD::Muon *muon) |
|
const xAOD::Jet * | findClosestTrackJet (const xAOD::TrackParticle *particle, const xAOD::JetContainer &trackJets) |
|
bool | compDummy (const xAOD::IParticle &particle, const std::string &prefix) |
|
bool | prepTrackObject (Prompt::VarHolder &p, const xAOD::TrackParticle &track, const xAOD::TrackParticle &lepton, const xAOD::Jet &trackJet, const xAOD::Vertex &priVtx, const xAOD::EventInfo event) |
|
bool | compScore (const xAOD::IParticle &particle, const std::vector< Prompt::VarHolder > &tracks, const std::string &prefix) |
|
bool | passTrack (Prompt::VarHolder &p) |
|
StatusCode | makeHist (TH1 *&h, const std::string &key, int nbin, double xmin, double xmax) |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
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 |
|
|
Gaudi::Property< std::string > | m_outputStream {this, "outputStream", "", "Path of the ROOT output directory of the histograms for RNN debug"} |
|
Gaudi::Property< std::string > | m_decorationPrefixRNN {this, "decorationPrefixRNN", "", "Prefix of the name for the decorator of RNN to the lepton"} |
|
Gaudi::Property< double > | m_minTrackpT {this, "minTrackpT", 500.0, "pT cut config for the input tracks to RNN"} |
|
Gaudi::Property< double > | m_maxTrackEta {this, "maxTrackEta", 2.5, "abs(eta) cut config for the input tracks to RNN"} |
|
Gaudi::Property< double > | m_maxTrackZ0Sin {this, "maxTrackZ0Sin", 1.0, "Z0sin cut config for the input tracks to RNN"} |
|
Gaudi::Property< double > | m_minTrackLeptonDR {this, "minTrackLeptonDR", 1.0e-6, "Delta R between lepton and track cut config for the input tracks to RNN"} |
|
Gaudi::Property< double > | m_maxTrackLeptonDR {this, "maxTrackLeptonDR", 0.4, "Delta R between lepton and track cut config for the input tracks to RNN"} |
|
Gaudi::Property< double > | m_maxLepTrackJetDR {this, "maxLepTrackJetDR", 0.4, "Maximum distance between lepton and track jet for track jet matching"} |
|
Gaudi::Property< double > | m_maxTrackSharedSiHits {this, "maxTrackSharedSiHits", 1.5, "track shared si hits cut config for the input tracks to RNN"} |
|
Gaudi::Property< unsigned > | m_minTrackSiHits {this, "minTrackSiHits", 6.5, "track silicon detector hits cut config for the input tracks to RNN"} |
|
Gaudi::Property< unsigned > | m_maxTrackSiHoles {this, "maxTrackSiHoles", 2.5, "track holes cut config for the input tracks to RNN"} |
|
Gaudi::Property< unsigned > | m_maxTrackPixHoles {this, "maxTrackPixHoles", 1.5, "track pixel holes cut config for the input tracks to RNN"} |
|
Gaudi::Property< bool > | m_debug {this, "debug", false, "debug statement"} |
|
Gaudi::Property< bool > | m_printTime {this, "printTime", false, "print running time, for debug"} |
|
ToolHandle< IRNNTool > | m_toolRNN |
|
ServiceHandle< ITHistSvc > | m_histSvc |
|
SG::ReadHandleKey< xAOD::IParticleContainer > | m_inputContainerLeptonKey |
|
SG::ReadHandleKey< xAOD::TrackParticleContainer > | m_inputContainerTrackKey |
|
SG::ReadHandleKey< xAOD::JetContainer > | m_inputContainerTrackJetKey |
|
SG::ReadHandleKey< xAOD::VertexContainer > | m_inputContainerPrimaryVerticesKey |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventHandleKey |
|
TStopwatch | m_timerEvent |
|
int | m_countEvent |
|
decoratorFloatMap_t | m_decoratorMap |
|
std::map< std::string, TH1 * > | m_hists |
|
std::unique_ptr< SG::AuxElement::ConstAccessor< unsigned char > > | m_accessQuality |
|
Definition at line 55 of file DecoratePromptLeptonRNN.h.
◆ decoratorFloat_t
◆ decoratorFloatMap_t
◆ StoreGateSvc_t
◆ DecoratePromptLeptonRNN()
Prompt::DecoratePromptLeptonRNN::DecoratePromptLeptonRNN |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ compDummy()
◆ compScore()
Definition at line 362 of file DecoratePromptLeptonRNN.cxx.
369 ATH_MSG_DEBUG(
"compScore - number of tracks: " << tracks.size());
381 const std::map<std::string, double>
results =
m_toolRNN->computeRNNOutput(tracks);
383 for(
const std::pair<const std::string, double>&
v:
results) {
387 const std::string dkey =
prefix +
v.first;
389 ATH_MSG_DEBUG(
"DecoratePromptLeptonRNN compScore - " <<
v.first <<
" = " <<
v.second );
399 ATH_MSG_WARNING(
"CompScore - unknown output label=\"" << dkey <<
"\"");
409 if (hist_status != StatusCode::SUCCESS){
410 ATH_MSG_WARNING(
"DecoratePromptLeptonRNN compScore - failed to make hist");
413 hit =
m_hists.insert(std::map<std::string, TH1*>::value_type(
v.first,
h)).first;
417 hit->second->Fill(
v.second);
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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 Prompt::DecoratePromptLeptonRNN::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 67 of file DecoratePromptLeptonRNN.cxx.
88 ATH_MSG_DEBUG(
"Size of LeptonContainer: " << h_leptons->size());
115 if(bestmatchedGSFElTrack) {
123 ATH_MSG_WARNING(
"execute - failed to find electron or muon: should never happen!");
131 if(!trackLep || !trackJet) {
139 std::vector<Prompt::VarHolder > select_tracks;
143 if(!
prepTrackObject(lepton_obj, *trackLep, *trackLep, *trackJet, *primaryVertex, *event_handle)) {
150 select_tracks.push_back(lepton_obj);
155 ATH_MSG_WARNING(
"Prompt::DecoratePromptLeptonRNN::execute - skip null track pointer - should never happen");
166 select_tracks.push_back(track_obj);
168 ATH_MSG_DEBUG(
"Prompt::DecoratePromptLeptonRNN::execute - passed track pT= " <<
track->pt());
182 ATH_MSG_DEBUG(
"DecoratePromptLeptonRNN::CompScore - " << std::endl
183 <<
"lepton pT= " << lepton->pt()
184 <<
", number of tracks: " << select_tracks.size());
187 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()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode Prompt::DecoratePromptLeptonRNN::finalize |
( |
| ) |
|
|
overridevirtual |
◆ findClosestTrackJet()
◆ findMuonTrack()
◆ initialize()
StatusCode Prompt::DecoratePromptLeptonRNN::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ makeHist()
StatusCode Prompt::DecoratePromptLeptonRNN::makeHist |
( |
TH1 *& |
h, |
|
|
const std::string & |
key, |
|
|
int |
nbin, |
|
|
double |
xmin, |
|
|
double |
xmax |
|
) |
| |
◆ 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.
◆ passTrack()
◆ prepTrackObject()
Definition at line 260 of file DecoratePromptLeptonRNN.cxx.
304 if(
track.pt() > 0.0 && trackJet.
pt() > 0.0) {
315 double d0_significance = -99.;
318 if(
track.definingParametersCovMatrixVec().size() > 0 &&
track.definingParametersCovMatrixVec().at(0) > 0.0) {
320 event.beamPosSigmaX(),
321 event.beamPosSigmaY(),
322 event.beamPosSigmaXY());
325 const double deltaZ0 =
track.z0() +
track.vz() - priVtx.
z();
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_accessQuality
◆ m_countEvent
int Prompt::DecoratePromptLeptonRNN::m_countEvent |
◆ m_debug
Gaudi::Property<bool> Prompt::DecoratePromptLeptonRNN::m_debug {this, "debug", false, "debug statement"} |
◆ m_decorationPrefixRNN
Gaudi::Property<std::string> Prompt::DecoratePromptLeptonRNN::m_decorationPrefixRNN {this, "decorationPrefixRNN", "", "Prefix of the name for the decorator of RNN to the lepton"} |
◆ m_decoratorMap
◆ m_detStore
◆ m_eventHandleKey
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_hists
std::map<std::string, TH1*> Prompt::DecoratePromptLeptonRNN::m_hists |
◆ m_histSvc
ServiceHandle<ITHistSvc> Prompt::DecoratePromptLeptonRNN::m_histSvc |
◆ m_inputContainerLeptonKey
Initial value:{
this, "inputContainerLepton", "",
"Container's name of the lepton that you want to decorate"
}
Definition at line 124 of file DecoratePromptLeptonRNN.h.
◆ m_inputContainerPrimaryVerticesKey
Initial value:{
this, "inputContainerPrimaryVertices", "", "Primary vertex container name"
}
Definition at line 134 of file DecoratePromptLeptonRNN.h.
◆ m_inputContainerTrackJetKey
◆ m_inputContainerTrackKey
◆ m_maxLepTrackJetDR
Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxLepTrackJetDR {this, "maxLepTrackJetDR", 0.4, "Maximum distance between lepton and track jet for track jet matching"} |
◆ m_maxTrackEta
Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxTrackEta {this, "maxTrackEta", 2.5, "abs(eta) cut config for the input tracks to RNN"} |
◆ m_maxTrackLeptonDR
Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxTrackLeptonDR {this, "maxTrackLeptonDR", 0.4, "Delta R between lepton and track cut config for the input tracks to RNN"} |
◆ m_maxTrackPixHoles
Gaudi::Property<unsigned> Prompt::DecoratePromptLeptonRNN::m_maxTrackPixHoles {this, "maxTrackPixHoles", 1.5, "track pixel holes cut config for the input tracks to RNN"} |
◆ m_maxTrackSharedSiHits
Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxTrackSharedSiHits {this, "maxTrackSharedSiHits", 1.5, "track shared si hits cut config for the input tracks to RNN"} |
◆ m_maxTrackSiHoles
Gaudi::Property<unsigned> Prompt::DecoratePromptLeptonRNN::m_maxTrackSiHoles {this, "maxTrackSiHoles", 2.5, "track holes cut config for the input tracks to RNN"} |
◆ m_maxTrackZ0Sin
Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxTrackZ0Sin {this, "maxTrackZ0Sin", 1.0, "Z0sin cut config for the input tracks to RNN"} |
◆ m_minTrackLeptonDR
Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_minTrackLeptonDR {this, "minTrackLeptonDR", 1.0e-6, "Delta R between lepton and track cut config for the input tracks to RNN"} |
◆ m_minTrackpT
Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_minTrackpT {this, "minTrackpT", 500.0, "pT cut config for the input tracks to RNN"} |
◆ m_minTrackSiHits
Gaudi::Property<unsigned> Prompt::DecoratePromptLeptonRNN::m_minTrackSiHits {this, "minTrackSiHits", 6.5, "track silicon detector hits cut config for the input tracks to RNN"} |
◆ m_outputStream
Gaudi::Property<std::string> Prompt::DecoratePromptLeptonRNN::m_outputStream {this, "outputStream", "", "Path of the ROOT output directory of the histograms for RNN debug"} |
◆ m_printTime
Gaudi::Property<bool> Prompt::DecoratePromptLeptonRNN::m_printTime {this, "printTime", false, "print running time, for debug"} |
◆ m_timerEvent
TStopwatch Prompt::DecoratePromptLeptonRNN::m_timerEvent |
◆ m_toolRNN
ToolHandle<IRNNTool> Prompt::DecoratePromptLeptonRNN::m_toolRNN |
Initial value:{
this, "toolRNN", "defaultToolRNN", "Dedicated tool for RNN prediction"
}
Definition at line 117 of file DecoratePromptLeptonRNN.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Gaudi::Property< std::string > m_decorationPrefixRNN
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
std::unique_ptr< SG::AuxElement::ConstAccessor< unsigned char > > m_accessQuality
Gaudi::Property< std::string > m_outputStream
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputContainerTrackKey
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Gaudi::Property< double > m_minTrackLeptonDR
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
Gaudi::Property< unsigned > m_minTrackSiHits
bool prepTrackObject(Prompt::VarHolder &p, const xAOD::TrackParticle &track, const xAOD::TrackParticle &lepton, const xAOD::Jet &trackJet, const xAOD::Vertex &priVtx, const xAOD::EventInfo event)
const xAOD::Jet * findClosestTrackJet(const xAOD::TrackParticle *particle, const xAOD::JetContainer &trackJets)
SG::ReadHandleKey< xAOD::JetContainer > m_inputContainerTrackJetKey
Class providing the definition of the 4-vector interface.
std::string PrintResetStopWatch(TStopwatch &watch)
def timer(name, disabled=False)
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< double > m_maxTrackZ0Sin
StatusCode makeHist(TH1 *&h, const std::string &key, int nbin, double xmin, double xmax)
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
virtual StatusCode sysInitialize() override
Override sysInitialize.
POOL::TEvent event(POOL::TEvent::kClassAccess)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
SG::ReadHandleKey< xAOD::EventInfo > m_eventHandleKey
::StatusCode StatusCode
StatusCode definition for legacy code.
ServiceHandle< ITHistSvc > m_histSvc
std::map< std::string, TH1 * > m_hists
Gaudi::Property< bool > m_printTime
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
float z() const
Returns the z position.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Gaudi::Property< unsigned > m_maxTrackPixHoles
virtual void renounce()=0
bool compScore(const xAOD::IParticle &particle, const std::vector< Prompt::VarHolder > &tracks, const std::string &prefix)
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::ReadHandleKey< xAOD::IParticleContainer > m_inputContainerLeptonKey
bool compDummy(const xAOD::IParticle &particle, const std::string &prefix)
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
DataObjIDColl m_extendedExtraObjects
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Class describing a Vertex.
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
Gaudi::Property< bool > m_debug
decoratorFloatMap_t m_decoratorMap
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const xAOD::TrackParticle * findMuonTrack(const xAOD::Muon *muon)
@ numberOfSCTHits
number of hits in SCT [unit8_t].
SG::ReadHandleKey< xAOD::VertexContainer > m_inputContainerPrimaryVerticesKey
Gaudi::Property< double > m_minTrackpT
AthAlgorithm()
Default constructor:
Gaudi::Property< unsigned > m_maxTrackSiHoles
Gaudi::Property< double > m_maxTrackSharedSiHits
Class describing a TrackParticle.
ToolHandle< IRNNTool > m_toolRNN
Gaudi::Property< double > m_maxLepTrackJetDR
virtual double pt() const
The transverse momentum ( ) of the particle.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Gaudi::Property< double > m_maxTrackEta
bool passTrack(Prompt::VarHolder &p)
Gaudi::Property< double > m_maxTrackLeptonDR