ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
TauTrackFinder Class Reference

Associate tracks to the tau candidate. More...

#include <TauTrackFinder.h>

Inheritance diagram for TauTrackFinder:
Collaboration diagram for TauTrackFinder:

Public Types

enum  TauTrackType { TauTrackCore = 0, TauTrackWide = 1, TauTrackOther = 2, NotTauTrack = 3 }
 Enumerator defining type of tau track. More...
 

Public Member Functions

 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
 

Protected Member Functions

bool inTrigger () const
 
bool inAOD () const
 
bool inEleRM () const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

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"}
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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...
 

Private Attributes

ToolHandle< Trk::IParticleCaloExtensionToolm_caloExtensionTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", "Tool for the extrapolation of charged tracks"}
 tools More...
 
ToolHandle< Trk::ITrackSelectorToolm_trackSelectorTool_tau {this, "TrackSelectorToolTau", "", "Tool for track selection"}
 
ToolHandle< Reco::ITrackToVertexm_trackToVertexTool {this, "TrackToVertexTool", "Reco::TrackToVertex"}
 
ToolHandle< Trk::ITrackToVertexIPEstimatorm_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::TrackParticleContainerm_trackPartInputContainer {this,"Key_trackPartInputContainer", "InDetTrackParticles", "input track particle container key"}
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_largeD0TracksInputContainer {this,"Key_LargeD0TrackInputContainer", "", "input LRT particle container key"}
 
SG::ReadHandleKey< xAOD::JetContainerm_jetContainer {this,"Key_jetContainer", "", "Name of the seed jet container, when using ghost matching"}
 
SG::ReadHandleKey< CaloExtensionCollectionm_ParticleCacheKey {this,"tauParticleCache", "ParticleCaloExtension", "Name of the particle measurement extrapolation cache for TauTrackFinder"}
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
 
std::set< CaloSampling::CaloSamplem_EMSamplings
 
std::set< CaloSampling::CaloSamplem_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
 

Detailed Description

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.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TauTrackType

Enumerator defining type of tau track.

Enumerator
TauTrackCore 
TauTrackWide 
TauTrackOther 
NotTauTrack 

Definition at line 51 of file TauTrackFinder.h.

52  {
53  TauTrackCore = 0,
54  TauTrackWide = 1,
55  TauTrackOther = 2,
56  NotTauTrack = 3
57  };

Constructor & Destructor Documentation

◆ TauTrackFinder()

TauTrackFinder::TauTrackFinder ( const std::string &  name)

◆ ~TauTrackFinder()

TauTrackFinder::~TauTrackFinder ( )

Definition at line 19 of file TauTrackFinder.cxx.

19 {}

Member Function Documentation

◆ ASG_TOOL_CLASS2()

TauTrackFinder::ASG_TOOL_CLASS2 ( TauTrackFinder  ,
TauRecToolBase  ,
ITauToolBase   
)

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ eventFinalize()

StatusCode TauRecToolBase::eventFinalize ( )
overridevirtualinherited

Event finalizer - called at the end of each event.

Implements ITauToolBase.

Definition at line 202 of file TauRecToolBase.cxx.

202  {
203  return StatusCode::SUCCESS;
204 }

◆ eventInitialize()

StatusCode TauRecToolBase::eventInitialize ( )
overridevirtualinherited

Event initializer - called at the beginning of each event.

Implements ITauToolBase.

Definition at line 133 of file TauRecToolBase.cxx.

133  {
134  return StatusCode::SUCCESS;
135 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode TauRecToolBase::execute ( xAOD::TauJet pTau) const
overridevirtualinherited

◆ executePanTau()

StatusCode TauRecToolBase::executePanTau ( xAOD::TauJet pTau,
xAOD::ParticleContainer particleContainer,
xAOD::PFOContainer neutralPFOContainer 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in PanTau::PanTauProcessor.

Definition at line 197 of file TauRecToolBase.cxx.

197  {
198  ATH_MSG_ERROR("function not implemented");
199  return StatusCode::FAILURE;
200 }

◆ executePi0ClusterCreator()

StatusCode TauRecToolBase::executePi0ClusterCreator ( xAOD::TauJet pTau,
xAOD::PFOContainer neutralPFOContainer,
xAOD::PFOContainer hadronicPFOContainer,
const xAOD::CaloClusterContainer pCaloClusterContainer 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in TauPi0ClusterCreator.

Definition at line 175 of file TauRecToolBase.cxx.

177  {
178  ATH_MSG_ERROR("function not implemented");
179  return StatusCode::FAILURE;
180 }

◆ executePi0ClusterScaler()

StatusCode TauRecToolBase::executePi0ClusterScaler ( xAOD::TauJet pTau,
xAOD::PFOContainer neutralPFOContainer,
xAOD::PFOContainer chargedPFOContainer 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in TauPi0ClusterScaler.

Definition at line 187 of file TauRecToolBase.cxx.

187  {
188  ATH_MSG_ERROR("function not implemented");
189  return StatusCode::FAILURE;
190 }

◆ executePi0CreateROI()

StatusCode TauRecToolBase::executePi0CreateROI ( xAOD::TauJet pTau,
CaloConstCellContainer caloCellContainer,
boost::dynamic_bitset<> &  map 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in TauPi0CreateROI.

Definition at line 149 of file TauRecToolBase.cxx.

149  {
150  ATH_MSG_ERROR("function not implemented");
151  return StatusCode::FAILURE;
152 }

◆ executePi0nPFO()

StatusCode TauRecToolBase::executePi0nPFO ( xAOD::TauJet pTau,
xAOD::PFOContainer neutralPFOContainer 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in TauPi0ScoreCalculator, and TauPi0Selector.

Definition at line 192 of file TauRecToolBase.cxx.

192  {
193  ATH_MSG_ERROR("function not implemented");
194  return StatusCode::FAILURE;
195 }

◆ executeShotFinder()

StatusCode TauRecToolBase::executeShotFinder ( xAOD::TauJet pTau,
xAOD::CaloClusterContainer shotClusterContainer,
xAOD::PFOContainer PFOContainer 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in TauShotFinder.

Definition at line 170 of file TauRecToolBase.cxx.

170  {
171  ATH_MSG_ERROR("function not implemented");
172  return StatusCode::FAILURE;
173 }

◆ executeTrackClassifier()

StatusCode TauRecToolBase::executeTrackClassifier ( xAOD::TauJet pTau,
xAOD::TauTrackContainer tauTrackContainer 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in tauRecTools::TauTrackRNNClassifier.

Definition at line 165 of file TauRecToolBase.cxx.

165  {
166  ATH_MSG_ERROR("function not implemented");
167  return StatusCode::FAILURE;
168 }

◆ executeTrackFinder()

StatusCode TauTrackFinder::executeTrackFinder ( xAOD::TauJet pTau,
xAOD::TauTrackContainer tauTrackCon 
) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 53 of file TauTrackFinder.cxx.

53  {
54 
55  std::vector<const xAOD::TrackParticle*> tauTracks;
56  std::vector<const xAOD::TrackParticle*> wideTracks;
57  std::vector<const xAOD::TrackParticle*> otherTracks;
58 
59  //Retrieve standard track container
60  const xAOD::TrackParticleContainer* trackParticleCont = nullptr;
61 
63  if (!trackPartInHandle.isValid()) {
64  ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << trackPartInHandle.key());
65  return StatusCode::FAILURE;
66  }
67  trackParticleCont = trackPartInHandle.cptr();
68 
69  //Retrieve LRT container
70  const xAOD::TrackParticleContainer* largeD0TracksParticleCont = nullptr;
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");
77  }
78  else {
79  largeD0TracksParticleCont = trackPartInHandle.cptr();
80  vecTrksLargeD0 = std::vector<const xAOD::TrackParticle*>(largeD0TracksParticleCont->begin(), largeD0TracksParticleCont->end());
81  }
82  }
83 
84 
85 
86  // retrieve the seed jet container when using ghost-matching
87  const xAOD::JetContainer* jetContainer = nullptr;
88  if (! m_jetContainer.empty()) {
90  if (!jetContHandle.isValid()) {
91  ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << jetContHandle.key());
92  return StatusCode::FAILURE;
93  }
94  jetContainer = jetContHandle.cptr();
95  }
96  // in EleRM reco, we need the original track particles
97  std::vector<const xAOD::TrackParticle*> vecTrks;
98  vecTrks.reserve( trackParticleCont->size() );
99  for (auto trk : *trackParticleCont){
100  if (!inEleRM()) { vecTrks.push_back(trk); }
101  else{
102  static const SG::ConstAccessor<ElementLink<xAOD::TrackParticleContainer>> acc_originalObject("ERMOriginalTrack");
103  auto original_id_track_link = acc_originalObject(*trk);
104  if (!original_id_track_link.isValid()) {
105  ATH_MSG_ERROR("Original track link is not valid");
106  continue;
107  }
108  vecTrks.push_back(*original_id_track_link);
109  }
110  }
111 
112  // get the primary vertex
113  const xAOD::Vertex* pVertex = pTau.vertex();
114 
115  // retrieve tracks wrt a vertex
116  // as a vertex is used: tau origin / PV / beamspot / 0,0,0 (in this order, depending on availability)
117 
118  getTauTracksFromPV(pTau, vecTrks, pVertex, m_useGhostTracks, jetContainer, tauTracks, wideTracks, otherTracks);
119 
120  bool foundLRTCont = bool (largeD0TracksParticleCont != nullptr);
121  // additional LRT with vertex association added to tracks
122  if (foundLRTCont){
123  // for now, use cone association for LRTs, not ghost association
124  getTauTracksFromPV(pTau, vecTrksLargeD0, pVertex, false, nullptr, tauTracks, wideTracks, otherTracks);
125  }
126 
127  // remove core and wide tracks outside a maximal delta z0 wrt lead core track
128  if (m_applyZ0cut) {
129  this->removeOffsideTracksWrtLeadTrk(tauTracks, wideTracks, otherTracks, pVertex, m_z0maxDelta);
130  }
131 
133  bool alreadyUsed = false;
134  for (std::vector<const xAOD::TrackParticle*>::iterator track_it = tauTracks.begin(); track_it != tauTracks.end() ;)
135  {
136  alreadyUsed = false;
137  //loop over all up-to-now core tracks
138  for( const xAOD::TauTrack* tau_trk : tauTrackCon ) {
139  //originally it was coreTrack&passTrkSelector
141  if( (*track_it) == tau_trk->track()) alreadyUsed = true;
142  }
143  //if this track has already been used by another tau, don't associate it to this new one
144  if(alreadyUsed) ATH_MSG_INFO( "Found Already Used track new, now removing: " << *track_it );
145  if (alreadyUsed) track_it = tauTracks.erase(track_it);
146  else ++track_it;
147  }
148  }
149 
150  // associate track to tau candidate and calculate charge
151  float charge = 0.;
152  for (unsigned int i = 0; i < tauTracks.size(); ++i) {
153  const xAOD::TrackParticle* trackParticle = tauTracks.at(i);
154 
155  ATH_MSG_VERBOSE(name() << " adding core track nr: " << i
156  << " eta " << trackParticle->eta()
157  << " phi " << trackParticle->phi());
158 
159  charge += trackParticle->charge();
160 
162  tauTrackCon.push_back(track);
163 
164  ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
165  linkToTrackParticle.toContainedElement(*static_cast<const xAOD::TrackParticleContainer*>(trackParticle->container()), trackParticle);
166  if (foundLRTCont && isLargeD0Track(trackParticle)){//Check LRT track and link to container
168  }
169  else {
171  }
172  track->addTrackLink(linkToTrackParticle);
173 
174  track->setP4(trackParticle->pt(), trackParticle->eta(), trackParticle->phi(), trackParticle->m());
177  // in case TrackClassifier is not run, still get sensible results
180 
182  linkToTauTrack.toContainedElement(tauTrackCon, track);
183  pTau.addTauTrackLink(linkToTauTrack);
184 
185  ATH_MSG_VERBOSE(name() << " added core track nr: " << i
186  << " eta " << pTau.track(i)->eta()
187  << " phi " << pTau.track(i)->phi());
188  }
189  // set the charge, which is defined by the core tau tracks only
190  pTau.setCharge(charge);
191 
192  for (unsigned int i = 0; i < wideTracks.size(); ++i) {
193  const xAOD::TrackParticle* trackParticle = wideTracks.at(i);
194 
195  ATH_MSG_VERBOSE(name() << " adding wide track nr: " << i
196  << " eta " << trackParticle->eta()
197  << " phi " << trackParticle->phi());
198 
200  tauTrackCon.push_back(track);
201 
202  ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
203  linkToTrackParticle.toContainedElement(*static_cast<const xAOD::TrackParticleContainer*>(trackParticle->container()), trackParticle);
204  if (foundLRTCont && isLargeD0Track(trackParticle)){//Check LRT track and link to container
206  }
207  else {
209  }
210  track->addTrackLink(linkToTrackParticle);
211 
212  track->setP4(trackParticle->pt(), trackParticle->eta(), trackParticle->phi(), trackParticle->m());
215  // in case TrackClassifier is not run, still get sensible results
216  track->setFlag(xAOD::TauJetParameters::TauTrackFlag::classifiedIsolation, true); // for sake of trigger, reset in TauTrackClassifier
217  track->setFlag(xAOD::TauJetParameters::TauTrackFlag::modifiedIsolationTrack, true); // for sake of trigger, reset in TauTrackClassifier
219 
221  linkToTauTrack.toContainedElement(tauTrackCon, track);
222  pTau.addTauTrackLink(linkToTauTrack);
223  }
224 
225  //These are set again in TauTrackClassifier
226  pTau.setDetail(xAOD::TauJetParameters::nChargedTracks, static_cast<int>(pTau.nTracks()));
228 
229  for (unsigned int i = 0; i < otherTracks.size(); ++i) {
230  const xAOD::TrackParticle* trackParticle = otherTracks.at(i);
231 
232  ATH_MSG_VERBOSE(name() << " adding other track nr: " << i
233  << " eta " << trackParticle->eta()
234  << " phi " << trackParticle->phi());
235 
237  tauTrackCon.push_back(track);
238 
239  ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
240  if (foundLRTCont && isLargeD0Track(trackParticle)){//Check LRT track and link to container
241  linkToTrackParticle.toContainedElement(*static_cast<const xAOD::TrackParticleContainer*>(trackParticle->container()), trackParticle);
243  }
244  else {
245  linkToTrackParticle.toContainedElement(*static_cast<const xAOD::TrackParticleContainer*>(trackParticle->container()), trackParticle);
247  }
248  track->addTrackLink(linkToTrackParticle);
249 
250  track->setP4(trackParticle->pt(), trackParticle->eta(), trackParticle->phi(), trackParticle->m());
251  float dR = track->p4().DeltaR(pTau.p4());
252  if(dR<=0.2) track->setFlag(xAOD::TauJetParameters::TauTrackFlag::coreTrack, true);
255 
257  linkToTauTrack.toContainedElement(tauTrackCon, track);
258  pTau.addTauTrackLink(linkToTauTrack);
259  }
260 
262  // keep track of total number of associated tracks, in case of tau track thinning
263  pTau.setDetail(xAOD::TauJetParameters::nAllTracks, static_cast<int>(pTau.nAllTracks()));
264 
265  ATH_MSG_DEBUG("numTrack: " << "/" << pTau.nTracks());
266  ATH_MSG_DEBUG("charge: " << "/" << pTau.charge());
267 
268  // impact parameter variables w.r.t. tau vertex
269  const xAOD::Vertex* vxcand = nullptr;
270 
271  xAOD::Vertex vxbkp;
272  vxbkp.makePrivateStore();
273 
274  // FIXME: don't we want to use the beamspot in the offline reconstruction too, when there is no reconstructed primary vertex?
275  if (pTau.vertex()!=nullptr && pTau.vertex()->vertexType() != xAOD::VxType::NoVtx) {
276  vxcand = pTau.vertex();
277  }
278  else if (inTrigger()) { // online: use vertex with x-y coordinates from the beamspot and the z from the leading track
279  vxbkp.setX(0); vxbkp.setY(0); vxbkp.setZ(0);
280 
282  if(beamSpotHandle.isValid()) {
283  vxbkp.setPosition(beamSpotHandle->beamPos());
284  const auto& cov = beamSpotHandle->beamVtx().covariancePosition();
285  vxbkp.setCovariancePosition(cov);
286 
287  if(!tauTracks.empty()) {
288  vxbkp.setZ(tauTracks.at(0)->z0());
289  }
290  }
291  else {
292  ATH_MSG_DEBUG("No Beamspot object in tau candidate");
293  }
294  vxcand = & vxbkp;
295  }
296 
297 
298  // this could be replaced with TauTrack::setDetail
299  static const SG::Accessor<float> dec_d0TJVA("d0TJVA");
300  static const SG::Accessor<float> dec_z0sinthetaTJVA("z0sinthetaTJVA");
301  static const SG::Accessor<float> dec_d0SigTJVA("d0SigTJVA");
302  static const SG::Accessor<float> dec_z0sinthetaSigTJVA("z0sinthetaSigTJVA");
303 
304  for(const ElementLink<xAOD::TauTrackContainer>& trackLink : pTau.allTauTrackLinks())
305  {
306  assert (trackLink.getStorableObjectPointer() == &tauTrackCon);
307  xAOD::TauTrack* track = tauTrackCon[trackLink.index()];
308  dec_d0TJVA(*track) = track->track()->d0();
309  dec_z0sinthetaTJVA(*track) = track->z0sinThetaTJVA(pTau);
310  dec_d0SigTJVA(*track) = -999.;
311  dec_z0sinthetaSigTJVA(*track) = -999.;
312 
313  // in the trigger, z0sintheta and corresponding significance are meaningless if we use the beamspot
314  if(vxcand) {
315  std::unique_ptr<const Trk::ImpactParametersAndSigma> myIPandSigma
316  = std::unique_ptr<const Trk::ImpactParametersAndSigma>(m_trackToVertexIPEstimator->estimate(track->track(), vxcand));
317 
318  if(myIPandSigma) {
319  dec_d0TJVA(*track) = myIPandSigma->IPd0;
320  dec_z0sinthetaTJVA(*track) = myIPandSigma->IPz0SinTheta;
321  dec_d0SigTJVA(*track) = (myIPandSigma->sigmad0 != 0.) ? static_cast<float>( myIPandSigma->IPd0 / myIPandSigma->sigmad0 ) : -999.f;
322  dec_z0sinthetaSigTJVA(*track) = (myIPandSigma->sigmaz0SinTheta != 0.) ? static_cast<float>( myIPandSigma->IPz0SinTheta / myIPandSigma->sigmaz0SinTheta ) : -999.f;
323  }
324  }
325  }
326 
327  // extrapolate core tracks to calorimeter surface
328  // store information only in ExtraDetailsContainer
330  {
331  StatusCode sc = extrapolateToCaloSurface(pTau, tauTrackCon);
332  if (sc.isFailure() && !sc.isRecoverable()) {
333  ATH_MSG_ERROR("couldn't extrapolate tracks to calo surface");
334  return StatusCode::FAILURE;
335  }
336  }
337 
338  return StatusCode::SUCCESS;
339 }

◆ executeVertexFinder()

StatusCode TauRecToolBase::executeVertexFinder ( xAOD::TauJet pTau,
const xAOD::VertexContainer vertexContainer = nullptr 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in TauVertexFinder.

Definition at line 155 of file TauRecToolBase.cxx.

155  {
156  ATH_MSG_ERROR("function not implemented");
157  return StatusCode::FAILURE;
158 }

◆ executeVertexVariables()

StatusCode TauRecToolBase::executeVertexVariables ( xAOD::TauJet pTau,
xAOD::VertexContainer vertexContainer 
) const
overridevirtualinherited

Implements ITauToolBase.

Reimplemented in TauVertexVariables.

Definition at line 182 of file TauRecToolBase.cxx.

182  {
183  ATH_MSG_ERROR("function not implemented");
184  return StatusCode::FAILURE;
185 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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()

StatusCode TauTrackFinder::extrapolateToCaloSurface ( xAOD::TauJet pTau,
xAOD::TauTrackContainer tauTrackCon 
) const
private

Extrapolate track eta and phi to the calorimeter middle surface.

Definition at line 436 of file TauTrackFinder.cxx.

438 {
439  Trk::TrackParametersIdHelper parsIdHelper;
440 
441  int trackIndex = -1;
442  const Trk::CaloExtension * caloExtension = nullptr;
443  std::unique_ptr<Trk::CaloExtension> uniqueExtension;
444  for(const ElementLink<xAOD::TauTrackContainer>& trackLink : pTau.allTauTrackLinks())
445  {
446  assert (trackLink.getStorableObjectPointer() == &tauTrackCon);
447  xAOD::TauTrack* tauTrack = tauTrackCon[trackLink.index()];
448  const xAOD::TrackParticle *orgTrack = tauTrack->track();
449  if( !orgTrack ) continue;
450  trackIndex = orgTrack->index();
451 
452  // set default values
453  float etaEM = -10.0;
454  float phiEM = -10.0;
455  float etaHad = -10.0;
456  float phiHad = -10.0;
457 
458  // get the extrapolation into the calo
459  ATH_MSG_DEBUG( "Try extrapolation of track with pt = " << orgTrack->pt()
460  << ", eta " << orgTrack->eta()
461  << ", phi" << orgTrack->phi() );
462 
463  if(!m_ParticleCacheKey.key().empty()){
464  /*get the CaloExtension object*/
465  ATH_MSG_VERBOSE("Using the CaloExtensionBuilder Cache");
467  caloExtension = (*particleCache)[trackIndex];
468  ATH_MSG_VERBOSE("Getting element " << trackIndex << " from the particleCache");
469  if( not caloExtension ){
470  ATH_MSG_VERBOSE("Cache does not contain a calo extension -> "
471  "Calculating with the a CaloExtensionTool");
472  uniqueExtension = m_caloExtensionTool->caloExtension(
473  Gaudi::Hive::currentContext(), *orgTrack);
474  caloExtension = uniqueExtension.get();
475  }
476  }
477  else {
478  /* If CaloExtensionBuilder is unavailable, use the calo extension tool */
479  ATH_MSG_VERBOSE("Using the CaloExtensionTool");
480  uniqueExtension = m_caloExtensionTool->caloExtension(
481  Gaudi::Hive::currentContext(), *orgTrack);
482  caloExtension = uniqueExtension.get();
483  }
484 
485  if (!caloExtension)
486  {
487  ATH_MSG_DEBUG("Track extrapolation failed");
488  }
489  else {
490  const std::vector<Trk::CurvilinearParameters>& clParametersVector = caloExtension->caloLayerIntersections();
491  if (clParametersVector.empty()) {
492  ATH_MSG_DEBUG("Track extrapolation failed");
493  }
494 
495  ATH_MSG_DEBUG("Scanning samplings");
496  bool validECal = false;
497  bool validHCal = false;
498  for( const Trk::CurvilinearParameters& cur : clParametersVector ){
499  ATH_MSG_DEBUG("Sampling " << parsIdHelper.caloSample(cur.cIdentifier()) );
500 
501  // only use entry layer
502  if( not parsIdHelper.isEntryToVolume(cur.cIdentifier()) ) continue;
503 
504  CaloSampling::CaloSample sample = parsIdHelper.caloSample(cur.cIdentifier());
505 
506  // ECal
507  if( not validECal and m_EMSamplings.count(sample))
508  {
509  validECal = true;
510  etaEM = cur.position().eta();
511  phiEM = cur.position().phi();
512  ATH_MSG_DEBUG("Extrapolated to ECal layer " << sample);
513  }
514 
515  // HCal
516  if( not validHCal and m_HadSamplings.count(sample))
517  {
518  validHCal = true;
519  etaHad = cur.position().eta();
520  phiHad = cur.position().phi();
521  ATH_MSG_DEBUG("Extrapolated to HCal layer " << sample);
522  }
523  if( validECal and validHCal ) break;
524  }
525  // EM failure warn if within acceptance
526  if( not validECal and std::abs(orgTrack->pt()) < 2.48 ){
527  ATH_MSG_DEBUG("Failed extrapolation to ECal");
528  }
529  // Had failure warn if enough pt to reach HCal
530  if( not validHCal and orgTrack->pt() > 2000. ){
531  ATH_MSG_DEBUG("Failed extrapolation to HCal");
532  }
533 
534  ATH_MSG_DEBUG( "Extrapolated track with eta=" << orgTrack->eta()
535  << " phi="<<orgTrack->phi()
536  << " to ECal eta=" << etaEM
537  << " phi="<< phiEM
538  << " HCal eta=" << etaHad
539  << " phi="<< phiHad
540  );
541  }
546  }
547 
548  return StatusCode::SUCCESS;
549 
550 }

◆ finalize()

StatusCode TauRecToolBase::finalize ( )
overridevirtualinherited

Finalizer.

Implements ITauToolBase.

Reimplemented in PanTau::PanTauProcessor.

Definition at line 206 of file TauRecToolBase.cxx.

206  {
207  return StatusCode::SUCCESS;
208 }

◆ find_file()

std::string TauRecToolBase::find_file ( const std::string &  fname) const
inherited

Definition at line 19 of file TauRecToolBase.cxx.

19  {
20  std::string full_path;
21  //offline calib files are in GroupData
22  //online calib files are in release
24  if(full_path.empty()) full_path = PathResolverFindCalibFile(fname);
25  return full_path;
26 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

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
ptrThe 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.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ 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
ptrThe 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.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ getTauTracksFromPV()

void TauTrackFinder::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
private

Definition at line 363 of file TauTrackFinder.cxx.

371 {
372  std::vector<const xAOD::TrackParticle*> ghostTracks;
373  if(useGhostTracks) {
374  const xAOD::Jet* seedJet = pTau.jet();
375  if(seedJet) {
376  if(!seedJet->getAssociatedObjects("GhostTrack", ghostTracks)) {
377  ATH_MSG_WARNING("Could not retrieve GhostTrack from seed jet.");
378  }
379  }
380  }
381  // in EleRM reco, we need the original track particles
382  if (inEleRM()){
383  for (uint i = 0; i < ghostTracks.size(); i++){
384  static const SG::ConstAccessor<ElementLink<xAOD::TrackParticleContainer>> acc_originalTrack("ERMOriginalTrack");
385  auto original_id_track_link = acc_originalTrack(*(ghostTracks[i]));
386  if (!original_id_track_link.isValid()) {
387  ATH_MSG_ERROR("Original track link is not valid");
388  continue;
389  }
390  ghostTracks[i] = *original_id_track_link;
391  }
392  }
393 
394  for (const xAOD::TrackParticle *trackParticle : vecTrackParticles) {
395  TauTrackType type = tauTrackType(pTau, *trackParticle, primaryVertex);
396  if(type == NotTauTrack) continue;
397 
398  if(useGhostTracks) {
399  // require that tracks are ghost-matched with the seed jet at large dR(tau,track), to avoid using tracks from another tau
400  double dR = pTau.p4().DeltaR(trackParticle->p4());
401  if (dR > m_ghostTrackDR) {
402  if (std::find(ghostTracks.begin(), ghostTracks.end(), trackParticle) == ghostTracks.end()) {
403  // check whether the jet closest to the track is the current seed jet
404  // if so, recover the track even if not ghost-matched, to improve tau-track association efficiency at low pt (esp. for 3p)
405  double dRmin = 999.;
406  bool isSeedClosest = false;
407  for (const xAOD::Jet* jet : *jetContainer) {
409  TLorentzVector jetLV;
410  jetLV.SetPtEtaPhiM(jetP4.Pt(), jetP4.Eta(), jetP4.Phi(), jetP4.M());
411  double dRjet = trackParticle->p4().DeltaR(jetLV);
412  if(dRjet < dRmin) {
413  dRmin = dRjet;
414  isSeedClosest = (jet == pTau.jet());
415  }
416  }
417  if(!isSeedClosest) continue;
418  }
419  }
420  }
421 
422  if (type == TauTrackCore)
423  tauTracks.push_back(trackParticle);
424  else if (type == TauTrackWide)
425  wideTracks.push_back(trackParticle);
426  else if (type == TauTrackOther)
427  otherTracks.push_back(trackParticle);
428  }
429  std::sort(tauTracks.begin(), tauTracks.end(), TrackSort());
430  std::sort(wideTracks.begin(), wideTracks.end(), TrackSort());
431  std::sort(otherTracks.begin(), otherTracks.end(), TrackSort());
432 }

◆ getZ0()

float TauTrackFinder::getZ0 ( const xAOD::TrackParticle track,
const xAOD::Vertex vertex 
) const
private

Some internally used functions.

Definition at line 611 of file TauTrackFinder.cxx.

612 {
613  float MAX=1e5;
614 
615  if (!track) return MAX;
616 
617  std::unique_ptr<Trk::Perigee> perigee;
618  if (vertex) perigee = m_trackToVertexTool->perigeeAtVertex(Gaudi::Hive::currentContext(), *track, vertex->position());
619  else perigee = m_trackToVertexTool->perigeeAtVertex(Gaudi::Hive::currentContext(), *track); //will use beamspot or 0,0,0 instead
620 
621  if (!perigee) {
622  ATH_MSG_WARNING("Bad track; can't find perigee at vertex.");
623  return MAX;
624  }
625 
626  float z0 = perigee->parameters()[Trk::z0];
627 
628  return z0;
629 }

◆ inAOD()

bool TauRecToolBase::inAOD ( ) const
inlineprotectedinherited

Definition at line 88 of file TauRecToolBase.h.

88 { return m_in_AOD; }

◆ inEleRM()

bool TauRecToolBase::inEleRM ( ) const
inlineprotectedinherited

Definition at line 89 of file TauRecToolBase.h.

89 { return m_in_EleRM; }

◆ initialize()

StatusCode TauTrackFinder::initialize ( )
overridevirtual

Algorithm functions.

Reimplemented from TauRecToolBase.

Definition at line 22 of file TauTrackFinder.cxx.

22  {
23 
24  // retrieve tools
25  ATH_CHECK( m_trackSelectorTool_tau.retrieve() );
26  ATH_CHECK( m_trackToVertexTool.retrieve() );
27  ATH_CHECK( m_caloExtensionTool.retrieve() );
29 
30  // initialize ReadHandleKey
32  // use CaloExtensionTool when key is empty
34  // allow empty for LRT
36 
37  if(m_useGhostTracks) {
38  if(inTrigger()) {
39  ATH_MSG_ERROR ("Ghost matching is not a valid tau-track association scheme for trigger, use cone association. Aborting.");
40  return StatusCode::FAILURE;
41  }
42  ATH_MSG_INFO ("Using ghost matching for tau-track association" << m_ghostTrackDR );
43  // allow empty for trigger
45  }
46 
48 
49  return StatusCode::SUCCESS;
50 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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

Definition at line 87 of file TauRecToolBase.h.

87 { return m_in_trigger; }

◆ isLargeD0Track()

bool TauTrackFinder::isLargeD0Track ( const xAOD::TrackParticle track) const
private

Definition at line 631 of file TauTrackFinder.cxx.

632 {
633  const std::bitset<xAOD::NumberOfTrackRecoInfo> patternReco = track->patternRecoInfo();
635  ATH_MSG_DEBUG("LargeD0Track found");
636  return true;
637  }
638 
639  return false;
640 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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

◆ readConfig()

StatusCode TauRecToolBase::readConfig ( )
overridevirtualinherited

Implements ITauToolBase.

Definition at line 27 of file TauRecToolBase.cxx.

27  {
28  // Sanity check to see if property ConfigPath is declared for a tool. Might be
29  // removed once all tools are updated to have a config path declared.
30  // in athena getProperties returns std::vector<Gaudi::Details::PropertyBase*>
31  // in rc getProperties returns std::map<std::string,Property*>
32 #ifndef XAOD_STANDALONE
33  bool configPathDeclared = false;
34  for (Gaudi::Details::PropertyBase* property : getProperties())
35  {
36  if (property->name() == "ConfigPath")
37  {
38  configPathDeclared = true;
39  break;
40  }
41  }
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())
46 #else
47 # error "What environment are we in?!?"
48 #endif // XAOD_STANDALONE
49  {
50  ATH_MSG_INFO("No config file path property declared yet, this is not recommended");
51  return StatusCode::SUCCESS;
52  }
53 
54  // get configured config path and load file via TEnv
55  const std::string* config_file_path_property;
56  // if (getProperty("ConfigPath", config_file_path).isFailure())
57  // return StatusCode::FAILURE;
58  config_file_path_property = getProperty<std::string>("ConfigPath");
59  std::string config_file_path = find_file(*config_file_path_property);
60  TEnv env;
61  env.ReadFile(PathResolverFindCalibFile(config_file_path).c_str(),kEnvAll);
62 
63  THashList* lList = env.GetTable();
64  for( Int_t i = 0; lList && i < lList->GetEntries(); ++i )
65  {
66  StatusCode sc;
67  // types of properties are handled differently as well
68 #ifndef XAOD_STANDALONE
69  // get type of variable with the entry name
70  const std::type_info* type = getProperty(lList->At( i )->GetName()).type_info();
71 
72  // search for type is needed by env.GetValue function (needs a variable of the correct type as 2nd argument)
73  if (*type == typeid(bool))
74  sc = this->setProperty(lList->At( i )->GetName(),
75  bool(env.GetValue(lList->At( i )->GetName(),bool(true))));
76  else if (*type == typeid(int))
77  sc = this->setProperty(lList->At( i )->GetName(),
78  env.GetValue(lList->At( i )->GetName(),int(0)));
79  else if (*type == typeid(float))
80  sc = this->setProperty(lList->At( i )->GetName(),
81  env.GetValue(lList->At( i )->GetName(),float(0)));
82  else if (*type == typeid(double))
83  sc = this->setProperty(lList->At( i )->GetName(),
84  env.GetValue(lList->At( i )->GetName(),double(0)));
85  else if (*type == typeid(std::string))
86  sc = this->setProperty(lList->At( i )->GetName(),
87  env.GetValue(lList->At( i )->GetName(),""));
88 #else
89  // get type of variable with the entry name
90  Property::Type type = getPropertyMgr()->getProperty(lList->At( i )->GetName())->type();
91 
92  if (type == Property::BOOL)
93  sc = this->setProperty(lList->At( i )->GetName(),
94  bool(env.GetValue(lList->At( i )->GetName(),bool(true))));
95  else if (type == Property::INT)
96  sc = this->setProperty(lList->At( i )->GetName(),
97  env.GetValue(lList->At( i )->GetName(),int(0)));
98  else if (type == Property::FLOAT)
99  sc = this->setProperty(lList->At( i )->GetName(),
100  env.GetValue(lList->At( i )->GetName(),float(0)));
101  else if (type == Property::DOUBLE)
102  sc = this->setProperty(lList->At( i )->GetName(),
103  env.GetValue(lList->At( i )->GetName(),double(0)));
104  else if (type == Property::STRING)
105  sc = this->setProperty(lList->At( i )->GetName(),
106  env.GetValue(lList->At( i )->GetName(),""));
107 #endif // XAOD_STANDALONE
108  else
109  {
110 #ifndef XAOD_STANDALONE
111  ATH_MSG_FATAL("there was a problem to find the correct type enum: "<<type->name());
112 #else
113  ATH_MSG_FATAL("there was a problem to find the correct type enum: "<<type);
114 #endif // XAOD_STANDALONE
115  return StatusCode::FAILURE;
116  }
117  if (!sc.isSuccess()) {
118  ATH_MSG_FATAL("failed to set property: " << lList->At( i )->GetName());
119  return StatusCode::FAILURE;
120  }
121  }
122  return StatusCode::SUCCESS;
123 }

◆ removeOffsideTracksWrtLeadTrk()

void TauTrackFinder::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
private

Definition at line 553 of file TauTrackFinder.cxx.

558 {
559  float MAX=1e5;
560 
561  // need at least one core track to have a leading trk to compare with
562  if (tauTracks.empty()) return;
563 
564  // get lead trk parameters
565  const xAOD::TrackParticle *leadTrack = tauTracks.at(0);
566  float z0_leadTrk = getZ0(leadTrack, tauOrigin);
567 
568  if (z0_leadTrk > MAX-1) return; // bad lead trk -> do nothing
569 
570  ATH_MSG_VERBOSE("before z0 cut: #coreTracks=" << tauTracks.size() << ", #wideTracks=" << wideTracks.size() << ", #otherTracks=" << otherTracks.size());
571 
573 
574  // skip leading track, because it is the reference
575  itr = tauTracks.begin()+1;
576  while (itr!=tauTracks.end()) {
577  float z0 = getZ0(*itr, tauOrigin);
578  float deltaZ0=z0 - z0_leadTrk;
579  ATH_MSG_VERBOSE("core Trks: deltaZ0= " << deltaZ0);
580 
581  if ( std::abs(deltaZ0) < maxDeltaZ0 ) {++itr;}
582  else {
583  otherTracks.push_back(*itr);
584  itr = tauTracks.erase(itr); //remove from core track collection
585  }
586  }
587 
588  // check wide tracks
589  itr = wideTracks.begin();
590  while (itr!=wideTracks.end()) {
591  float z0 = getZ0(*itr, tauOrigin);
592  float deltaZ0=z0 - z0_leadTrk;
593  ATH_MSG_VERBOSE("wide Trks: deltaZ0= " << deltaZ0);
594 
595  if ( std::abs(deltaZ0) < maxDeltaZ0 ) { ++itr; }
596  else {
597  otherTracks.push_back(*itr);
598  itr = wideTracks.erase(itr); //remove from wide track collection
599  }
600  }
601 
602  ATH_MSG_VERBOSE("after z0 cut: #coreTracks=" << tauTracks.size() << ", #wideTracks=" << wideTracks.size() << ", #otherTracks=" << otherTracks.size());
603 
604  // sort again
605  std::sort(tauTracks.begin(), tauTracks.end(), TrackSort());
606  std::sort(wideTracks.begin(), wideTracks.end(), TrackSort());
607  std::sort(otherTracks.begin(), otherTracks.end(), TrackSort());
608 }

◆ renounce()

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> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tauTrackType()

TauTrackFinder::TauTrackType TauTrackFinder::tauTrackType ( const xAOD::TauJet tauJet,
const xAOD::TrackParticle trackParticle,
const xAOD::Vertex primaryVertex 
) const
private

Definition at line 343 of file TauTrackFinder.cxx.

346 {
347  double dR = pTau.p4().DeltaR(trackParticle.p4());
348 
349  if (dR > m_maxJetDr_wide) return NotTauTrack;
350 
351  bool goodTrack = m_trackSelectorTool_tau->decision(trackParticle, primaryVertex);
352 
353  if (goodTrack) {
354  if (dR > m_maxJetDr_tau)
355  return TauTrackWide;
356  else
357  return TauTrackCore;
358  } else
359  return TauTrackOther;
360 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_applyZ0cut

Gaudi::Property<bool> TauTrackFinder::m_applyZ0cut {this, "removeTracksOutsideZ0wrtLeadTrk", false}
private

Definition at line 108 of file TauTrackFinder.h.

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> TauTrackFinder::m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
private

Definition at line 120 of file TauTrackFinder.h.

◆ m_bypassExtrapolator

Gaudi::Property<bool> TauTrackFinder::m_bypassExtrapolator {this, "BypassExtrapolator", false}
private

Definition at line 111 of file TauTrackFinder.h.

◆ m_caloExtensionTool

ToolHandle<Trk::IParticleCaloExtensionTool> TauTrackFinder::m_caloExtensionTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", "Tool for the extrapolation of charged tracks"}
private

tools

Definition at line 101 of file TauTrackFinder.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_EMSamplings

std::set<CaloSampling::CaloSample> TauTrackFinder::m_EMSamplings
private

Definition at line 122 of file TauTrackFinder.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_ghostTrackDR

Gaudi::Property<double> TauTrackFinder::m_ghostTrackDR {this, "ghostTrackDR", 0.25}
private

Definition at line 113 of file TauTrackFinder.h.

◆ m_HadSamplings

std::set<CaloSampling::CaloSample> TauTrackFinder::m_HadSamplings
private

Definition at line 123 of file TauTrackFinder.h.

◆ m_in_AOD

Gaudi::Property<bool> TauRecToolBase::m_in_AOD {this, "inAOD", false, "Indicate if the tool is running on AOD"}
protectedinherited

Definition at line 77 of file TauRecToolBase.h.

◆ m_in_EleRM

Gaudi::Property<bool> TauRecToolBase::m_in_EleRM {this, "inEleRM", false, "Indicate if the tool is running on EleRM routine"}
protectedinherited

Definition at line 78 of file TauRecToolBase.h.

◆ m_in_trigger

Gaudi::Property<bool> TauRecToolBase::m_in_trigger {this, "inTrigger", false, "Indicate if the tool is running on trigger"}
protectedinherited

Definition at line 76 of file TauRecToolBase.h.

◆ m_jetContainer

SG::ReadHandleKey<xAOD::JetContainer> TauTrackFinder::m_jetContainer {this,"Key_jetContainer", "", "Name of the seed jet container, when using ghost matching"}
private

Definition at line 117 of file TauTrackFinder.h.

◆ m_largeD0TracksInputContainer

SG::ReadHandleKey<xAOD::TrackParticleContainer> TauTrackFinder::m_largeD0TracksInputContainer {this,"Key_LargeD0TrackInputContainer", "", "input LRT particle container key"}
private

Definition at line 116 of file TauTrackFinder.h.

◆ m_maxJetDr_tau

Gaudi::Property<double> TauTrackFinder::m_maxJetDr_tau {this, "MaxJetDrTau", 0.2}
private

Definition at line 106 of file TauTrackFinder.h.

◆ m_maxJetDr_wide

Gaudi::Property<double> TauTrackFinder::m_maxJetDr_wide {this, "MaxJetDrWide", 0.4}
private

Definition at line 107 of file TauTrackFinder.h.

◆ m_ParticleCacheKey

SG::ReadHandleKey<CaloExtensionCollection> TauTrackFinder::m_ParticleCacheKey {this,"tauParticleCache", "ParticleCaloExtension", "Name of the particle measurement extrapolation cache for TauTrackFinder"}
private

Definition at line 118 of file TauTrackFinder.h.

◆ m_removeDuplicateCoreTracks

Gaudi::Property<bool> TauTrackFinder::m_removeDuplicateCoreTracks {this, "removeDuplicateCoreTracks", true}
private

Definition at line 110 of file TauTrackFinder.h.

◆ m_tauRecToolsTag

Gaudi::Property<std::string> TauRecToolBase::m_tauRecToolsTag {this, "calibFolder", "tauRecTools/R22_preprod", "CVMFS path to the tau calibration folder"}
protectedinherited

Definition at line 79 of file TauRecToolBase.h.

◆ m_trackPartInputContainer

SG::ReadHandleKey<xAOD::TrackParticleContainer> TauTrackFinder::m_trackPartInputContainer {this,"Key_trackPartInputContainer", "InDetTrackParticles", "input track particle container key"}
private

Definition at line 115 of file TauTrackFinder.h.

◆ m_trackSelectorTool_tau

ToolHandle<Trk::ITrackSelectorTool> TauTrackFinder::m_trackSelectorTool_tau {this, "TrackSelectorToolTau", "", "Tool for track selection"}
private

Definition at line 102 of file TauTrackFinder.h.

◆ m_trackToVertexIPEstimator

ToolHandle<Trk::ITrackToVertexIPEstimator> TauTrackFinder::m_trackToVertexIPEstimator {this, "TrackToVertexIPEstimator", ""}
private

Definition at line 104 of file TauTrackFinder.h.

◆ m_trackToVertexTool

ToolHandle<Reco::ITrackToVertex> TauTrackFinder::m_trackToVertexTool {this, "TrackToVertexTool", "Reco::TrackToVertex"}
private

Definition at line 103 of file TauTrackFinder.h.

◆ m_useGhostTracks

Gaudi::Property<bool> TauTrackFinder::m_useGhostTracks {this, "useGhostTracks", false}
private

Definition at line 112 of file TauTrackFinder.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_z0maxDelta

Gaudi::Property<float> TauTrackFinder::m_z0maxDelta {this, "maxDeltaZ0wrtLeadTrk", 1000.}
private

Definition at line 109 of file TauTrackFinder.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Property::BOOL
@ BOOL
Definition: Property.h:29
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:74
Property::Type
Type
Property type enumeration.
Definition: Property.h:27
TauTrackFinder::extrapolateToCaloSurface
StatusCode extrapolateToCaloSurface(xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackCon) const
Extrapolate track eta and phi to the calorimeter middle surface.
Definition: TauTrackFinder.cxx:436
xAOD::Vertex_v1::setPosition
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
xAOD::TauJetParameters::nIsolatedTracks
@ nIsolatedTracks
Definition: TauDefs.h:323
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
xAOD::TrackParticle_v1::m
virtual double m() const override final
The invariant mass of the particle..
Definition: TrackParticle_v1.cxx:84
TauTrackFinder::TauTrackType
TauTrackType
Enumerator defining type of tau track.
Definition: TauTrackFinder.h:52
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
Property::STRING
@ STRING
Definition: Property.h:33
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MAX
#define MAX(x, y)
Definition: ALFA_SvdCalc.h:28
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
xAOD::TauJet_v3::nAllTracks
size_t nAllTracks() const
Definition: TauJet_v3.cxx:516
SG::Accessor< float >
TauTrackFinder::m_trackPartInputContainer
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackPartInputContainer
Definition: TauTrackFinder.h:115
Trk::CaloExtension
Tracking class to hold the extrapolation through calorimeter Layers Both the caloEntryLayerIntersecti...
Definition: CaloExtension.h:19
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:151
beamspotman.cur
def cur
Definition: beamspotman.py:667
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
xAOD::TauJetParameters::CaloSamplingPhiEM
@ CaloSamplingPhiEM
Definition: TauDefs.h:422
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:78
CaloCell_ID_FCS::TileBar1
@ TileBar1
Definition: FastCaloSim_CaloCell_ID.h:32
xAOD::TauTrack_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
xAOD::TauJet_v3::setCharge
void setCharge(float)
TauTrackFinder::m_largeD0TracksInputContainer
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_largeD0TracksInputContainer
Definition: TauTrackFinder.h:116
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition: TauJet_v3.cxx:488
xAOD::TauJetParameters::classifiedCharged
@ classifiedCharged
Definition: TauDefs.h:406
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:200
TrackSort
Helper method to sort tracks.
Definition: TrackSort.h:24
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
TauTrackFinder::removeOffsideTracksWrtLeadTrk
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
Definition: TauTrackFinder.cxx:553
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TauRecToolBase::m_tauRecToolsTag
Gaudi::Property< std::string > m_tauRecToolsTag
Definition: TauRecToolBase.h:79
Trk::z0
@ z0
Definition: ParamDefs.h:64
TauTrackFinder::NotTauTrack
@ NotTauTrack
Definition: TauTrackFinder.h:56
xAOD::TauJetParameters::CaloSamplingEtaHad
@ CaloSamplingEtaHad
Definition: TauDefs.h:421
Trk::ImpactParametersAndSigma::IPd0
double IPd0
Definition: ITrackToVertexIPEstimator.h:34
asg::AsgTool::getProperty
const T * getProperty(const std::string &name) const
Get one of the tool's properties.
Trk::TrackParametersIdHelper::caloSample
CaloSampling::CaloSample caloSample(TrackParametersIdentifier id) const
CaloSample encoded in id, returns CaloSampling::Unknown if id is not valid
Definition: TrackParametersIdHelper.h:91
TauTrackFinder::m_ghostTrackDR
Gaudi::Property< double > m_ghostTrackDR
Definition: TauTrackFinder.h:113
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
xAOD::TauJetParameters::nAllTracks
@ nAllTracks
Definition: TauDefs.h:325
Trk::ImpactParametersAndSigma::IPz0SinTheta
double IPz0SinTheta
Definition: ITrackToVertexIPEstimator.h:36
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TauRecToolBase::inTrigger
bool inTrigger() const
Definition: TauRecToolBase.h:87
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
xAOD::Vertex_v1::setX
void setX(float value)
Sets the x position.
TauTrackFinder::getZ0
float getZ0(const xAOD::TrackParticle *track, const xAOD::Vertex *vertex) const
Some internally used functions.
Definition: TauTrackFinder.cxx:611
xAOD::TauJetParameters::LargeRadiusTrack
@ LargeRadiusTrack
Definition: TauDefs.h:413
Trk::TrackParametersIdHelper::isEntryToVolume
bool isEntryToVolume(TrackParametersIdentifier id) const
returns true if the id belongs to the volume entrance
Definition: TrackParametersIdHelper.h:81
xAOD::Vertex_v1::vertexType
VxType::VertexType vertexType() const
The type of the vertex.
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:571
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
TauRecToolBase::inEleRM
bool inEleRM() const
Definition: TauRecToolBase.h:89
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TauTrackFinder::m_z0maxDelta
Gaudi::Property< float > m_z0maxDelta
Definition: TauTrackFinder.h:109
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TauTrackFinder::m_bypassExtrapolator
Gaudi::Property< bool > m_bypassExtrapolator
Definition: TauTrackFinder.h:111
Property::DOUBLE
@ DOUBLE
Definition: Property.h:32
xAOD::Jet_v1::getAssociatedObjects
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...
xAOD::JetConstitScaleMomentum
@ JetConstitScaleMomentum
Definition: JetTypes.h:29
xAOD::TrackParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TrackParticle_v1.cxx:130
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
Trk::TrackParametersIdHelper
helper class to encode and decode a TrackParametersIdentifier
Definition: TrackParametersIdHelper.h:18
xAOD::TauJetParameters::passTrkSelector
@ passTrkSelector
Definition: TauDefs.h:405
setProperty
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
Definition: NanobindBindings.cxx:67
xAOD::Vertex_v1::setZ
void setZ(float value)
Sets the z position.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::Vertex_v1::setY
void setY(float value)
Sets the y position.
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:116
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::TauJet_v3::allTauTrackLinks
const TauTrackLinks_t & allTauTrackLinks() const
Definition: TauJet_v3.cxx:392
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::TauJetParameters::nLargeRadiusTracks
@ nLargeRadiusTracks
Definition: TauDefs.h:326
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::TauJetParameters::nChargedTracks
@ nChargedTracks
Definition: TauDefs.h:322
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
TauTrackFinder::m_applyZ0cut
Gaudi::Property< bool > m_applyZ0cut
Definition: TauTrackFinder.h:108
xAOD::TauJet_v3::track
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...
Definition: TauJet_v3.cxx:422
TauRecToolBase::m_in_AOD
Gaudi::Property< bool > m_in_AOD
Definition: TauRecToolBase.h:77
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
xAOD::TauJet_v3::addTauTrackLink
void addTauTrackLink(const ElementLink< TauTrackContainer > &tr)
add a TauTrack to the tau
Definition: TauJet_v3.cxx:523
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
hist_file_dump.f
f
Definition: hist_file_dump.py:140
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ImpactParametersAndSigma::sigmad0
double sigmad0
Definition: ITrackToVertexIPEstimator.h:37
xAOD::TauJetParameters::coreTrack
@ coreTrack
Definition: TauDefs.h:403
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
TauRecToolBase::TauRecToolBase
TauRecToolBase(const std::string &name)
Definition: TauRecToolBase.cxx:125
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
xAOD::TauTrack_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
xAOD::SiSpacePointsSeedMaker_LargeD0
@ SiSpacePointsSeedMaker_LargeD0
Definition: TrackingPrimitives.h:184
TauTrackFinder::m_maxJetDr_tau
Gaudi::Property< double > m_maxJetDr_tau
Definition: TauTrackFinder.h:106
xAOD::TauJetParameters::classifiedIsolation
@ classifiedIsolation
Definition: TauDefs.h:407
TauRecToolBase::m_in_trigger
Gaudi::Property< bool > m_in_trigger
Definition: TauRecToolBase.h:76
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
TauTrackFinder::m_caloExtensionTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
tools
Definition: TauTrackFinder.h:101
TauTrackFinder::tauTrackType
TauTrackType tauTrackType(const xAOD::TauJet &tauJet, const xAOD::TrackParticle &trackParticle, const xAOD::Vertex *primaryVertex) const
Definition: TauTrackFinder.cxx:343
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition: JetTypes.h:17
Property::INT
@ INT
Definition: Property.h:30
TauTrackFinder::m_jetContainer
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer
Definition: TauTrackFinder.h:117
TauTrackFinder::TauTrackCore
@ TauTrackCore
Definition: TauTrackFinder.h:53
xAOD::TauTrack_v1::setDetail
void setDetail(TauJetParameters::TrackDetail detail, float value)
Definition: TauTrack_v1.cxx:164
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
TauTrackFinder::m_trackSelectorTool_tau
ToolHandle< Trk::ITrackSelectorTool > m_trackSelectorTool_tau
Definition: TauTrackFinder.h:102
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
Property::FLOAT
@ FLOAT
Definition: Property.h:31
TauRecToolBase::find_file
std::string find_file(const std::string &fname) const
Definition: TauRecToolBase.cxx:19
TauTrackFinder::m_trackToVertexIPEstimator
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
Definition: TauTrackFinder.h:104
charge
double charge(const T &p)
Definition: AtlasPID.h:991
TauTrackFinder::isLargeD0Track
bool isLargeD0Track(const xAOD::TrackParticle *track) const
Definition: TauTrackFinder.cxx:631
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
TauTrackFinder::TauTrackOther
@ TauTrackOther
Definition: TauTrackFinder.h:55
TauTrackFinder::m_useGhostTracks
Gaudi::Property< bool > m_useGhostTracks
Definition: TauTrackFinder.h:112
xAOD::TauTrack
TauTrack_v1 TauTrack
Definition of the current version.
Definition: TauTrack.h:16
xAOD::TauJetParameters::CaloSamplingPhiHad
@ CaloSamplingPhiHad
Definition: TauDefs.h:423
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:321
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:66
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::ImpactParametersAndSigma::sigmaz0SinTheta
double sigmaz0SinTheta
Definition: ITrackToVertexIPEstimator.h:39
TauTrackFinder::TauTrackWide
@ TauTrackWide
Definition: TauTrackFinder.h:54
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::TauJet_v3::vertex
const Vertex * vertex() const
std::sort
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.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TauTrackFinder::m_maxJetDr_wide
Gaudi::Property< double > m_maxJetDr_wide
Definition: TauTrackFinder.h:107
xAOD::TauTrack_v1
Definition: TauTrack_v1.h:27
xAOD::TauJet_v3::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: TauJet_v3.cxx:96
xAOD::TauJetParameters::modifiedIsolationTrack
@ modifiedIsolationTrack
Definition: TauDefs.h:412
xAOD::TauJet_v3::charge
float charge() const
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
xAOD::TauJet_v3::setDetail
void setDetail(TauJetParameters::Detail detail, int value)
Definition: TauJet_v3.cxx:309
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
xAOD::TauJetParameters::wideTrack
@ wideTrack
Definition: TauDefs.h:404
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
TauTrackFinder::getTauTracksFromPV
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
Definition: TauTrackFinder.cxx:363
xAOD::TauTrack_v1::track
const TrackParticle * track() const
TauTrackFinder::m_trackToVertexTool
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
Definition: TauTrackFinder.h:103
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
xAOD::TauJetParameters::CaloSamplingEtaEM
@ CaloSamplingEtaEM
Definition: TauDefs.h:420
python.DataFormatRates.env
env
Definition: DataFormatRates.py:32
SG::DataProxy
Definition: DataProxy.h:45
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:27
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TauRecToolBase::m_in_EleRM
Gaudi::Property< bool > m_in_EleRM
Definition: TauRecToolBase.h:78
xAOD::Vertex_v1::setCovariancePosition
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
TauTrackFinder::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: TauTrackFinder.h:120
TauTrackFinder::m_EMSamplings
std::set< CaloSampling::CaloSample > m_EMSamplings
Definition: TauTrackFinder.h:122
TauTrackFinder::m_HadSamplings
std::set< CaloSampling::CaloSample > m_HadSamplings
Definition: TauTrackFinder.h:123
TauTrackFinder::m_removeDuplicateCoreTracks
Gaudi::Property< bool > m_removeDuplicateCoreTracks
Definition: TauTrackFinder.h:110
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
fitman.k
k
Definition: fitman.py:528
xAOD::TauJetParameters::unclassified
@ unclassified
Definition: TauDefs.h:410
TauTrackFinder::m_ParticleCacheKey
SG::ReadHandleKey< CaloExtensionCollection > m_ParticleCacheKey
Definition: TauTrackFinder.h:118