 |
ATLAS Offline Software
|
Associate tracks to the tau candidate.
More...
#include <TauTrackFinder.h>
|
| | TauTrackFinder (const std::string &name) |
| | Constructor and Destructor. More...
|
| |
| | ASG_TOOL_CLASS2 (TauTrackFinder, TauRecToolBase, ITauToolBase) |
| |
| | ~TauTrackFinder () |
| |
| virtual StatusCode | initialize () override |
| | Algorithm functions. More...
|
| |
| virtual StatusCode | executeTrackFinder (xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackCon) const override |
| |
| virtual StatusCode | eventInitialize () override |
| | Event initializer - called at the beginning of each event. More...
|
| |
| virtual StatusCode | execute (xAOD::TauJet &pTau) const override |
| | Execute - called for each tau candidate. More...
|
| |
| virtual StatusCode | executePi0CreateROI (xAOD::TauJet &pTau, CaloConstCellContainer &caloCellContainer, boost::dynamic_bitset<> &map) const override |
| |
| virtual StatusCode | executeVertexFinder (xAOD::TauJet &pTau, const xAOD::VertexContainer *vertexContainer=nullptr) const override |
| |
| virtual StatusCode | executeTrackClassifier (xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackContainer) const override |
| |
| virtual StatusCode | executeShotFinder (xAOD::TauJet &pTau, xAOD::CaloClusterContainer &shotClusterContainer, xAOD::PFOContainer &PFOContainer) const override |
| |
| virtual StatusCode | executePi0ClusterCreator (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer, xAOD::PFOContainer &hadronicPFOContainer, const xAOD::CaloClusterContainer &pCaloClusterContainer) const override |
| |
| virtual StatusCode | executeVertexVariables (xAOD::TauJet &pTau, xAOD::VertexContainer &vertexContainer) const override |
| |
| virtual StatusCode | executePi0ClusterScaler (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer, xAOD::PFOContainer &chargedPFOContainer) const override |
| |
| virtual StatusCode | executePi0nPFO (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer) const override |
| |
| virtual StatusCode | executePanTau (xAOD::TauJet &pTau, xAOD::ParticleContainer &particleContainer, xAOD::PFOContainer &neutralPFOContainer) const override |
| |
| virtual StatusCode | eventFinalize () override |
| | Event finalizer - called at the end of each event. More...
|
| |
| virtual StatusCode | finalize () override |
| | Finalizer. More...
|
| |
| std::string | find_file (const std::string &fname) const |
| |
| virtual StatusCode | readConfig () override |
| |
| virtual void | print () const |
| | Print the state of the tool. 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 | sysInitialize () override |
| | Perform system initialization for an algorithm. 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, V, H > &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< bool > | m_in_trigger {this, "inTrigger", false, "Indicate if the tool is running on trigger"} |
| |
| Gaudi::Property< bool > | m_in_AOD {this, "inAOD", false, "Indicate if the tool is running on AOD"} |
| |
| Gaudi::Property< bool > | m_in_EleRM {this, "inEleRM", false, "Indicate if the tool is running on EleRM routine"} |
| |
| Gaudi::Property< std::string > | m_tauRecToolsTag {this, "calibFolder", "tauRecTools/R22_preprod", "CVMFS path to the tau calibration folder"} |
| |
|
| StatusCode | extrapolateToCaloSurface (xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackCon) const |
| | Extrapolate track eta and phi to the calorimeter middle surface. More...
|
| |
| TauTrackType | tauTrackType (const xAOD::TauJet &tauJet, const xAOD::TrackParticle &trackParticle, const xAOD::Vertex *primaryVertex) const |
| |
| void | getTauTracksFromPV (const xAOD::TauJet &tauJet, const std::vector< const xAOD::TrackParticle * > &vecTrackParticles, const xAOD::Vertex *primaryVertex, const bool &useGhostTracks, const xAOD::JetContainer *jetContainer, std::vector< const xAOD::TrackParticle * > &tauTracks, std::vector< const xAOD::TrackParticle * > &wideTracks, std::vector< const xAOD::TrackParticle * > &otherTracks) const |
| |
| void | removeOffsideTracksWrtLeadTrk (std::vector< const xAOD::TrackParticle * > &tauTracks, std::vector< const xAOD::TrackParticle * > &wideTracks, std::vector< const xAOD::TrackParticle * > &otherTracks, const xAOD::Vertex *tauOrigin, double maxDeltaZ0) const |
| |
| float | getZ0 (const xAOD::TrackParticle *track, const xAOD::Vertex *vertex) const |
| | Some internally used functions. More...
|
| |
| bool | isLargeD0Track (const xAOD::TrackParticle *track) const |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
|
| ToolHandle< Trk::IParticleCaloExtensionTool > | m_caloExtensionTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", "Tool for the extrapolation of charged tracks"} |
| | tools More...
|
| |
| ToolHandle< Trk::ITrackSelectorTool > | m_trackSelectorTool_tau {this, "TrackSelectorToolTau", "", "Tool for track selection"} |
| |
| ToolHandle< Reco::ITrackToVertex > | m_trackToVertexTool {this, "TrackToVertexTool", "Reco::TrackToVertex"} |
| |
| ToolHandle< Trk::ITrackToVertexIPEstimator > | m_trackToVertexIPEstimator {this, "TrackToVertexIPEstimator", ""} |
| |
| Gaudi::Property< double > | m_maxJetDr_tau {this, "MaxJetDrTau", 0.2} |
| |
| Gaudi::Property< double > | m_maxJetDr_wide {this, "MaxJetDrWide", 0.4} |
| |
| Gaudi::Property< bool > | m_applyZ0cut {this, "removeTracksOutsideZ0wrtLeadTrk", false} |
| |
| Gaudi::Property< float > | m_z0maxDelta {this, "maxDeltaZ0wrtLeadTrk", 1000.} |
| |
| Gaudi::Property< bool > | m_removeDuplicateCoreTracks {this, "removeDuplicateCoreTracks", true} |
| |
| Gaudi::Property< bool > | m_bypassExtrapolator {this, "BypassExtrapolator", false} |
| |
| Gaudi::Property< bool > | m_useGhostTracks {this, "useGhostTracks", false} |
| |
| Gaudi::Property< double > | m_ghostTrackDR {this, "ghostTrackDR", 0.25} |
| |
| SG::ReadHandleKey< xAOD::TrackParticleContainer > | m_trackPartInputContainer {this,"Key_trackPartInputContainer", "InDetTrackParticles", "input track particle container key"} |
| |
| SG::ReadHandleKey< xAOD::TrackParticleContainer > | m_largeD0TracksInputContainer {this,"Key_LargeD0TrackInputContainer", "", "input LRT particle container key"} |
| |
| SG::ReadHandleKey< xAOD::JetContainer > | m_jetContainer {this,"Key_jetContainer", "", "Name of the seed jet container, when using ghost matching"} |
| |
| SG::ReadHandleKey< CaloExtensionCollection > | m_ParticleCacheKey {this,"tauParticleCache", "ParticleCaloExtension", "Name of the particle measurement extrapolation cache for TauTrackFinder"} |
| |
| SG::ReadCondHandleKey< InDet::BeamSpotData > | m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" } |
| |
| std::set< CaloSampling::CaloSample > | m_EMSamplings |
| |
| std::set< CaloSampling::CaloSample > | m_HadSamplings |
| |
| 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 |
| |
Associate tracks to the tau candidate.
The tracks have to pass dedicated quality criteria and have to match to a primary vertex consistent with the tau origin.
- Author
- KG Tan Kong..nosp@m.Guan.nosp@m..Tan@.nosp@m.cern.nosp@m..ch
-
Felix Friedrich
Definition at line 39 of file TauTrackFinder.h.
◆ StoreGateSvc_t
◆ TauTrackType
Enumerator defining type of tau track.
| Enumerator |
|---|
| TauTrackCore | |
| TauTrackWide | |
| TauTrackOther | |
| NotTauTrack | |
Definition at line 51 of file TauTrackFinder.h.
◆ TauTrackFinder()
| TauTrackFinder::TauTrackFinder |
( |
const std::string & |
name | ) |
|
◆ ~TauTrackFinder()
| TauTrackFinder::~TauTrackFinder |
( |
| ) |
|
◆ ASG_TOOL_CLASS2()
◆ 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()
◆ eventFinalize()
| StatusCode TauRecToolBase::eventFinalize |
( |
| ) |
|
|
overridevirtualinherited |
◆ eventInitialize()
| StatusCode TauRecToolBase::eventInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
| StatusCode TauRecToolBase::execute |
( |
xAOD::TauJet & |
pTau | ) |
const |
|
overridevirtualinherited |
Execute - called for each tau candidate.
Implements ITauToolBase.
Reimplemented in TauDecayModeNNClassifier, TauCombinedTES, MvaTESVariableDecorator, MvaTESEvaluator, TauWPDecorator, TauAxisSetter, TauGNNEvaluator, TauEleOverlapChecker, TauJetRNNEvaluator, TauCalibrateLC, TauClusterFinder, TauSubstructureVariables, TauVertexedClusterDecorator, TauAODSelector, TauElectronVetoVariables, JetSeedBuilder, TauCellVariables, TauCommonCalcVars, TauIDVarCalculator, and TauAODMuonRemovalTool.
Definition at line 138 of file TauRecToolBase.cxx.
140 return StatusCode::FAILURE;
◆ executePanTau()
◆ executePi0ClusterCreator()
◆ executePi0ClusterScaler()
◆ executePi0CreateROI()
◆ executePi0nPFO()
◆ executeShotFinder()
◆ executeTrackClassifier()
◆ executeTrackFinder()
Reimplemented from TauRecToolBase.
Definition at line 53 of file TauTrackFinder.cxx.
55 std::vector<const xAOD::TrackParticle*> tauTracks;
56 std::vector<const xAOD::TrackParticle*> wideTracks;
57 std::vector<const xAOD::TrackParticle*> otherTracks;
63 if (!trackPartInHandle.isValid()) {
64 ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << trackPartInHandle.key());
65 return StatusCode::FAILURE;
67 trackParticleCont = trackPartInHandle.cptr();
71 std::vector<const xAOD::TrackParticle*> vecTrksLargeD0;
74 if (!trackPartInHandle.isValid()) {
75 ATH_MSG_VERBOSE (
"Could not retrieve HiveDataObj with key " << trackPartInHandle.key());
76 ATH_MSG_VERBOSE (
"LRT container " << trackPartInHandle.key()<<
" is not being used for tau tracks");
79 largeD0TracksParticleCont = trackPartInHandle.cptr();
80 vecTrksLargeD0 = std::vector<const xAOD::TrackParticle*>(largeD0TracksParticleCont->
begin(), largeD0TracksParticleCont->
end());
90 if (!jetContHandle.isValid()) {
91 ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << jetContHandle.key());
92 return StatusCode::FAILURE;
94 jetContainer = jetContHandle.cptr();
97 std::vector<const xAOD::TrackParticle*> vecTrks;
98 vecTrks.reserve( trackParticleCont->
size() );
99 for (
auto trk : *trackParticleCont){
100 if (!
inEleRM()) { vecTrks.push_back(trk); }
103 auto original_id_track_link = acc_originalObject(*trk);
104 if (!original_id_track_link.isValid()) {
108 vecTrks.push_back(*original_id_track_link);
120 bool foundLRTCont =
bool (largeD0TracksParticleCont !=
nullptr);
124 getTauTracksFromPV(pTau, vecTrksLargeD0, pVertex,
false,
nullptr, tauTracks, wideTracks, otherTracks);
133 bool alreadyUsed =
false;
141 if( (*track_it) == tau_trk->track()) alreadyUsed =
true;
144 if(alreadyUsed)
ATH_MSG_INFO(
"Found Already Used track new, now removing: " << *track_it );
145 if (alreadyUsed) track_it = tauTracks.erase(track_it);
152 for (
unsigned int i = 0;
i < tauTracks.size(); ++
i) {
156 <<
" eta " << trackParticle->
eta()
157 <<
" phi " << trackParticle->
phi());
162 tauTrackCon.push_back(
track);
172 track->addTrackLink(linkToTrackParticle);
174 track->setP4(trackParticle->
pt(), trackParticle->
eta(), trackParticle->
phi(), trackParticle->
m());
192 for (
unsigned int i = 0;
i < wideTracks.size(); ++
i) {
196 <<
" eta " << trackParticle->
eta()
197 <<
" phi " << trackParticle->
phi());
200 tauTrackCon.push_back(
track);
210 track->addTrackLink(linkToTrackParticle);
212 track->setP4(trackParticle->
pt(), trackParticle->
eta(), trackParticle->
phi(), trackParticle->
m());
229 for (
unsigned int i = 0;
i < otherTracks.size(); ++
i) {
233 <<
" eta " << trackParticle->
eta()
234 <<
" phi " << trackParticle->
phi());
237 tauTrackCon.push_back(
track);
248 track->addTrackLink(linkToTrackParticle);
250 track->setP4(trackParticle->
pt(), trackParticle->
eta(), trackParticle->
phi(), trackParticle->
m());
251 float dR =
track->p4().DeltaR(pTau.
p4());
282 if(beamSpotHandle.isValid()) {
284 const auto&
cov = beamSpotHandle->beamVtx().covariancePosition();
287 if(!tauTracks.empty()) {
288 vxbkp.
setZ(tauTracks.at(0)->z0());
306 assert (trackLink.getStorableObjectPointer() == &tauTrackCon);
309 dec_z0sinthetaTJVA(*
track) =
track->z0sinThetaTJVA(pTau);
310 dec_d0SigTJVA(*
track) = -999.;
311 dec_z0sinthetaSigTJVA(*
track) = -999.;
315 std::unique_ptr<const Trk::ImpactParametersAndSigma> myIPandSigma
321 dec_d0SigTJVA(*
track) = (myIPandSigma->
sigmad0 != 0.) ?
static_cast<float>( myIPandSigma->
IPd0 / myIPandSigma->
sigmad0 ) : -999.
f;
332 if (
sc.isFailure() && !
sc.isRecoverable()) {
333 ATH_MSG_ERROR(
"couldn't extrapolate tracks to calo surface");
334 return StatusCode::FAILURE;
338 return StatusCode::SUCCESS;
◆ executeVertexFinder()
◆ executeVertexVariables()
◆ 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
◆ extrapolateToCaloSurface()
Extrapolate track eta and phi to the calorimeter middle surface.
Definition at line 436 of file TauTrackFinder.cxx.
443 std::unique_ptr<Trk::CaloExtension> uniqueExtension;
446 assert (trackLink.getStorableObjectPointer() == &tauTrackCon);
449 if( !orgTrack )
continue;
450 trackIndex = orgTrack->
index();
455 float etaHad = -10.0;
456 float phiHad = -10.0;
459 ATH_MSG_DEBUG(
"Try extrapolation of track with pt = " << orgTrack->
pt()
460 <<
", eta " << orgTrack->
eta()
461 <<
", phi" << orgTrack->
phi() );
467 caloExtension = (*particleCache)[trackIndex];
468 ATH_MSG_VERBOSE(
"Getting element " << trackIndex <<
" from the particleCache");
469 if( not caloExtension ){
471 "Calculating with the a CaloExtensionTool");
473 Gaudi::Hive::currentContext(), *orgTrack);
474 caloExtension = uniqueExtension.get();
481 Gaudi::Hive::currentContext(), *orgTrack);
482 caloExtension = uniqueExtension.get();
490 const std::vector<Trk::CurvilinearParameters>& clParametersVector = caloExtension->caloLayerIntersections();
491 if (clParametersVector.empty()) {
496 bool validECal =
false;
497 bool validHCal =
false;
510 etaEM =
cur.position().eta();
511 phiEM =
cur.position().phi();
519 etaHad =
cur.position().eta();
520 phiHad =
cur.position().phi();
523 if( validECal and validHCal )
break;
526 if( not validECal and std::abs(orgTrack->
pt()) < 2.48 ){
530 if( not validHCal and orgTrack->
pt() > 2000. ){
535 <<
" phi="<<orgTrack->
phi()
536 <<
" to ECal eta=" << etaEM
538 <<
" HCal eta=" << etaHad
548 return StatusCode::SUCCESS;
◆ finalize()
| StatusCode TauRecToolBase::finalize |
( |
| ) |
|
|
overridevirtualinherited |
◆ find_file()
| std::string TauRecToolBase::find_file |
( |
const std::string & |
fname | ) |
const |
|
inherited |
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
| ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getName()
| const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
| ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getProperty()
template<class T >
| const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ getTauTracksFromPV()
Definition at line 363 of file TauTrackFinder.cxx.
372 std::vector<const xAOD::TrackParticle*> ghostTracks;
383 for (
uint i = 0;
i < ghostTracks.size();
i++){
385 auto original_id_track_link = acc_originalTrack(*(ghostTracks[
i]));
386 if (!original_id_track_link.isValid()) {
390 ghostTracks[
i] = *original_id_track_link;
400 double dR = pTau.p4().DeltaR(trackParticle->p4());
402 if (
std::find(ghostTracks.begin(), ghostTracks.end(), trackParticle) == ghostTracks.end()) {
406 bool isSeedClosest =
false;
409 TLorentzVector jetLV;
410 jetLV.SetPtEtaPhiM(jetP4.Pt(), jetP4.Eta(), jetP4.Phi(), jetP4.M());
411 double dRjet = trackParticle->p4().DeltaR(jetLV);
414 isSeedClosest = (
jet == pTau.jet());
417 if(!isSeedClosest)
continue;
423 tauTracks.push_back(trackParticle);
425 wideTracks.push_back(trackParticle);
427 otherTracks.push_back(trackParticle);
◆ getZ0()
Some internally used functions.
Definition at line 611 of file TauTrackFinder.cxx.
617 std::unique_ptr<Trk::Perigee> perigee;
626 float z0 = perigee->parameters()[
Trk::z0];
◆ inAOD()
| bool TauRecToolBase::inAOD |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ inEleRM()
| bool TauRecToolBase::inEleRM |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ initialize()
| StatusCode TauTrackFinder::initialize |
( |
| ) |
|
|
overridevirtual |
Algorithm functions.
Reimplemented from TauRecToolBase.
Definition at line 22 of file TauTrackFinder.cxx.
39 ATH_MSG_ERROR (
"Ghost matching is not a valid tau-track association scheme for trigger, use cone association. Aborting.");
40 return StatusCode::FAILURE;
49 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.
◆ inTrigger()
| bool TauRecToolBase::inTrigger |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ isLargeD0Track()
Definition at line 631 of file TauTrackFinder.cxx.
633 const std::bitset<xAOD::NumberOfTrackRecoInfo> patternReco =
track->patternRecoInfo();
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
| const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ 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.
◆ print()
| void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, LundVariablesTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ readConfig()
| StatusCode TauRecToolBase::readConfig |
( |
| ) |
|
|
overridevirtualinherited |
Implements ITauToolBase.
Definition at line 27 of file TauRecToolBase.cxx.
32 #ifndef XAOD_STANDALONE
33 bool configPathDeclared =
false;
34 for (Gaudi::Details::PropertyBase* property : getProperties())
36 if (property->name() ==
"ConfigPath")
38 configPathDeclared =
true;
42 if (!configPathDeclared)
43 #elif defined(XAOD_STANDALONE)
44 PropertyMgr::PropMap_t property_map = getPropertyMgr()->getProperties();
45 if (property_map.find(
"ConfigPath") == property_map.end())
47 # error "What environment are we in?!?"
48 #endif // XAOD_STANDALONE
50 ATH_MSG_INFO(
"No config file path property declared yet, this is not recommended");
51 return StatusCode::SUCCESS;
55 const std::string* config_file_path_property;
58 config_file_path_property = getProperty<std::string>(
"ConfigPath");
59 std::string config_file_path =
find_file(*config_file_path_property);
63 THashList* lList =
env.GetTable();
64 for( Int_t
i = 0; lList &&
i < lList->GetEntries(); ++
i )
68 #ifndef XAOD_STANDALONE
70 const std::type_info*
type =
getProperty(lList->At(
i )->GetName()).type_info();
73 if (*
type ==
typeid(
bool))
75 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
76 else if (*
type ==
typeid(
int))
78 env.GetValue(lList->At(
i )->GetName(),
int(0)));
79 else if (*
type ==
typeid(
float))
81 env.GetValue(lList->At(
i )->GetName(),
float(0)));
82 else if (*
type ==
typeid(
double))
84 env.GetValue(lList->At(
i )->GetName(),
double(0)));
85 else if (*
type ==
typeid(std::string))
87 env.GetValue(lList->At(
i )->GetName(),
""));
94 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
97 env.GetValue(lList->At(
i )->GetName(),
int(0)));
100 env.GetValue(lList->At(
i )->GetName(),
float(0)));
103 env.GetValue(lList->At(
i )->GetName(),
double(0)));
106 env.GetValue(lList->At(
i )->GetName(),
""));
107 #endif // XAOD_STANDALONE
110 #ifndef XAOD_STANDALONE
111 ATH_MSG_FATAL(
"there was a problem to find the correct type enum: "<<
type->name());
114 #endif // XAOD_STANDALONE
115 return StatusCode::FAILURE;
117 if (!
sc.isSuccess()) {
118 ATH_MSG_FATAL(
"failed to set property: " << lList->At(
i )->GetName());
119 return StatusCode::FAILURE;
122 return StatusCode::SUCCESS;
◆ removeOffsideTracksWrtLeadTrk()
Definition at line 553 of file TauTrackFinder.cxx.
562 if (tauTracks.empty())
return;
566 float z0_leadTrk =
getZ0(leadTrack, tauOrigin);
568 if (z0_leadTrk >
MAX-1)
return;
570 ATH_MSG_VERBOSE(
"before z0 cut: #coreTracks=" << tauTracks.size() <<
", #wideTracks=" << wideTracks.size() <<
", #otherTracks=" << otherTracks.size());
575 itr = tauTracks.begin()+1;
576 while (itr!=tauTracks.end()) {
577 float z0 =
getZ0(*itr, tauOrigin);
578 float deltaZ0=
z0 - z0_leadTrk;
581 if ( std::abs(deltaZ0) < maxDeltaZ0 ) {++itr;}
583 otherTracks.push_back(*itr);
584 itr = tauTracks.erase(itr);
589 itr = wideTracks.begin();
590 while (itr!=wideTracks.end()) {
591 float z0 =
getZ0(*itr, tauOrigin);
592 float deltaZ0=
z0 - z0_leadTrk;
595 if ( std::abs(deltaZ0) < maxDeltaZ0 ) { ++itr; }
597 otherTracks.push_back(*itr);
598 itr = wideTracks.erase(itr);
602 ATH_MSG_VERBOSE(
"after z0 cut: #coreTracks=" << tauTracks.size() <<
", #wideTracks=" << wideTracks.size() <<
", #otherTracks=" << otherTracks.size());
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ tauTrackType()
◆ updateVHKA()
◆ m_applyZ0cut
| Gaudi::Property<bool> TauTrackFinder::m_applyZ0cut {this, "removeTracksOutsideZ0wrtLeadTrk", false} |
|
private |
◆ m_beamSpotKey
◆ m_bypassExtrapolator
| Gaudi::Property<bool> TauTrackFinder::m_bypassExtrapolator {this, "BypassExtrapolator", false} |
|
private |
◆ m_caloExtensionTool
◆ m_detStore
◆ m_EMSamplings
◆ m_evtStore
◆ m_ghostTrackDR
| Gaudi::Property<double> TauTrackFinder::m_ghostTrackDR {this, "ghostTrackDR", 0.25} |
|
private |
◆ m_HadSamplings
◆ m_in_AOD
| Gaudi::Property<bool> TauRecToolBase::m_in_AOD {this, "inAOD", false, "Indicate if the tool is running on AOD"} |
|
protectedinherited |
◆ m_in_EleRM
| Gaudi::Property<bool> TauRecToolBase::m_in_EleRM {this, "inEleRM", false, "Indicate if the tool is running on EleRM routine"} |
|
protectedinherited |
◆ m_in_trigger
| Gaudi::Property<bool> TauRecToolBase::m_in_trigger {this, "inTrigger", false, "Indicate if the tool is running on trigger"} |
|
protectedinherited |
◆ m_jetContainer
◆ m_largeD0TracksInputContainer
◆ m_maxJetDr_tau
| Gaudi::Property<double> TauTrackFinder::m_maxJetDr_tau {this, "MaxJetDrTau", 0.2} |
|
private |
◆ m_maxJetDr_wide
| Gaudi::Property<double> TauTrackFinder::m_maxJetDr_wide {this, "MaxJetDrWide", 0.4} |
|
private |
◆ m_ParticleCacheKey
◆ m_removeDuplicateCoreTracks
| Gaudi::Property<bool> TauTrackFinder::m_removeDuplicateCoreTracks {this, "removeDuplicateCoreTracks", true} |
|
private |
◆ m_tauRecToolsTag
| Gaudi::Property<std::string> TauRecToolBase::m_tauRecToolsTag {this, "calibFolder", "tauRecTools/R22_preprod", "CVMFS path to the tau calibration folder"} |
|
protectedinherited |
◆ m_trackPartInputContainer
◆ m_trackSelectorTool_tau
◆ m_trackToVertexIPEstimator
◆ m_trackToVertexTool
◆ m_useGhostTracks
| Gaudi::Property<bool> TauTrackFinder::m_useGhostTracks {this, "useGhostTracks", false} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_z0maxDelta
| Gaudi::Property<float> TauTrackFinder::m_z0maxDelta {this, "maxDeltaZ0wrtLeadTrk", 1000.} |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Type
Property type enumeration.
StatusCode extrapolateToCaloSurface(xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackCon) const
Extrapolate track eta and phi to the calorimeter middle surface.
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
virtual double m() const override final
The invariant mass of the particle..
TauTrackType
Enumerator defining type of tau track.
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
std::string find(const std::string &s)
return a remapped string
size_t nAllTracks() const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackPartInputContainer
Tracking class to hold the extrapolation through calorimeter Layers Both the caloEntryLayerIntersecti...
float charge() const
Returns the charge.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double eta() const
The pseudorapidity ( ) of the particle.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_largeD0TracksInputContainer
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Helper method to sort tracks.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
void removeOffsideTracksWrtLeadTrk(std::vector< const xAOD::TrackParticle * > &tauTracks, std::vector< const xAOD::TrackParticle * > &wideTracks, std::vector< const xAOD::TrackParticle * > &otherTracks, const xAOD::Vertex *tauOrigin, double maxDeltaZ0) const
std::vector< SG::VarHandleKeyArray * > m_vhka
CaloSampling::CaloSample caloSample(TrackParametersIdentifier id) const
CaloSample encoded in id, returns CaloSampling::Unknown if id is not valid
Gaudi::Property< double > m_ghostTrackDR
Helper class to provide constant type-safe access to aux data.
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
void setX(float value)
Sets the x position.
float getZ0(const xAOD::TrackParticle *track, const xAOD::Vertex *vertex) const
Some internally used functions.
bool isEntryToVolume(TrackParametersIdentifier id) const
returns true if the id belongs to the volume entrance
VxType::VertexType vertexType() const
The type of the vertex.
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< float > m_z0maxDelta
Gaudi::Property< bool > m_bypassExtrapolator
std::vector< const T * > getAssociatedObjects(const std::string &name) const
get associated objects as a vector<object> this compact form throws an exception if the object is not...
@ JetConstitScaleMomentum
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
helper class to encode and decode a TrackParametersIdentifier
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
void setZ(float value)
Sets the z position.
void setY(float value)
Sets the y position.
const TauTrackLinks_t & allTauTrackLinks() const
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Gaudi::Property< bool > m_applyZ0cut
const TauTrack * track(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged, int *container_index=0) const
Get the pointer to a given tauTrack associated with this tau /*container index needed by trackNonCons...
void addTauTrackLink(const ElementLink< TauTrackContainer > &tr)
add a TauTrack to the tau
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
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 double phi() const
The azimuthal angle ( ) of the particle.
size_t index() const
Return the index of this element within its container.
@ SiSpacePointsSeedMaker_LargeD0
Gaudi::Property< double > m_maxJetDr_tau
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
tools
TauTrackType tauTrackType(const xAOD::TauJet &tauJet, const xAOD::TrackParticle &trackParticle, const xAOD::Vertex *primaryVertex) const
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer
void setDetail(TauJetParameters::TrackDetail detail, float value)
ToolHandle< Trk::ITrackSelectorTool > m_trackSelectorTool_tau
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
double charge(const T &p)
bool isLargeD0Track(const xAOD::TrackParticle *track) const
StatusCode initialize(bool used=true)
void makePrivateStore()
Create a new (empty) private store for this object.
Gaudi::Property< bool > m_useGhostTracks
TauTrack_v1 TauTrack
Definition of the current version.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Class describing a Vertex.
const Vertex * vertex() const
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< double > m_maxJetDr_wide
virtual FourMom_t p4() const
The full 4-momentum of the particle.
void setDetail(TauJetParameters::Detail detail, int value)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void getTauTracksFromPV(const xAOD::TauJet &tauJet, const std::vector< const xAOD::TrackParticle * > &vecTrackParticles, const xAOD::Vertex *primaryVertex, const bool &useGhostTracks, const xAOD::JetContainer *jetContainer, std::vector< const xAOD::TrackParticle * > &tauTracks, std::vector< const xAOD::TrackParticle * > &wideTracks, std::vector< const xAOD::TrackParticle * > &otherTracks) const
const TrackParticle * track() const
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
Class describing a TrackParticle.
const SG::AuxVectorData * container() const
Return the container holding this element.
setBGCode setTAP setLVL2ErrorBits bool
size_type size() const noexcept
Returns the number of elements in the collection.
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
std::set< CaloSampling::CaloSample > m_EMSamplings
std::set< CaloSampling::CaloSample > m_HadSamplings
Gaudi::Property< bool > m_removeDuplicateCoreTracks
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
SG::ReadHandleKey< CaloExtensionCollection > m_ParticleCacheKey