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 > &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 > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &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_storeInOtherTrks {this, "StoreRemovedCoreWideTracksInOtherTracks", true}
 
Gaudi::Property< bool > m_removeDuplicateCoreTracks {this, "removeDuplicateCoreTracks", true}
 
Gaudi::Property< bool > m_bypassSelector {this, "BypassSelector", false}
 
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)

Constructor and Destructor.

Definition at line 16 of file TauTrackFinder.cxx.

◆ ~TauTrackFinder()

TauTrackFinder::~TauTrackFinder ( )

Definition at line 23 of file TauTrackFinder.cxx.

23  {
24 }

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 > &  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 > &  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 > &  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 > &  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 > &  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 58 of file TauTrackFinder.cxx.

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

◆ 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 443 of file TauTrackFinder.cxx.

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

◆ 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 370 of file TauTrackFinder.cxx.

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

◆ getZ0()

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

Some internally used functions.

Definition at line 618 of file TauTrackFinder.cxx.

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

◆ 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 27 of file TauTrackFinder.cxx.

27  {
28 
29  // retrieve tools
30  ATH_CHECK( m_trackSelectorTool_tau.retrieve() );
31  ATH_CHECK( m_trackToVertexTool.retrieve() );
32  ATH_CHECK( m_caloExtensionTool.retrieve() );
34 
35  // initialize ReadHandleKey
37  // use CaloExtensionTool when key is empty
39  // allow empty for LRT
41 
42  if(m_useGhostTracks) {
43  if(inTrigger()) {
44  ATH_MSG_ERROR ("Ghost matching is not a valid tau-track association scheme for trigger, use cone association. Aborting.");
45  return StatusCode::FAILURE;
46  }
47  ATH_MSG_INFO ("Using ghost matching for tau-track association" << m_ghostTrackDR );
48  // allow empty for trigger
50  }
51 
53 
54  return StatusCode::SUCCESS;
55 }

◆ 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 638 of file TauTrackFinder.cxx.

639 {
640  const std::bitset<xAOD::NumberOfTrackRecoInfo> patternReco = track->patternRecoInfo();
642  ATH_MSG_DEBUG("LargeD0Track found");
643  return true;
644  }
645 
646  return false;
647 }

◆ 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 560 of file TauTrackFinder.cxx.

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

◆ 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 348 of file TauTrackFinder.cxx.

351 {
352  double dR = pTau.p4().DeltaR(trackParticle.p4());
353 
354  if (dR > m_maxJetDr_wide) return NotTauTrack;
355 
356  bool goodTrack = true;
357  if(!m_bypassSelector)
358  goodTrack = m_trackSelectorTool_tau->decision(trackParticle, primaryVertex);
359 
360  if (goodTrack) {
361  if (dR > m_maxJetDr_tau)
362  return TauTrackWide;
363  else
364  return TauTrackCore;
365  } else
366  return TauTrackOther;
367 }

◆ 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 122 of file TauTrackFinder.h.

◆ m_bypassExtrapolator

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

Definition at line 113 of file TauTrackFinder.h.

◆ m_bypassSelector

Gaudi::Property<bool> TauTrackFinder::m_bypassSelector {this, "BypassSelector", false}
private

Definition at line 112 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 124 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 115 of file TauTrackFinder.h.

◆ m_HadSamplings

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

Definition at line 125 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 119 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 118 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 120 of file TauTrackFinder.h.

◆ m_removeDuplicateCoreTracks

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

Definition at line 111 of file TauTrackFinder.h.

◆ m_storeInOtherTrks

Gaudi::Property<bool> TauTrackFinder::m_storeInOtherTrks {this, "StoreRemovedCoreWideTracksInOtherTracks", 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 117 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 114 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:73
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:443
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:83
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:392
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:554
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
TauTrackFinder::m_trackPartInputContainer
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackPartInputContainer
Definition: TauTrackFinder.h:117
Trk::CaloExtension
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
Definition: CaloExtension.h:18
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
beamspotman.cur
def cur
Definition: beamspotman.py:671
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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:77
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:118
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition: TauJet_v3.cxx:526
xAOD::TauJetParameters::classifiedCharged
@ classifiedCharged
Definition: TauDefs.h:406
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
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:560
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:115
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:618
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:570
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:27
TauTrackFinder::m_bypassExtrapolator
Gaudi::Property< bool > m_bypassExtrapolator
Definition: TauTrackFinder.h:113
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:129
TauTrackFinder::m_bypassSelector
Gaudi::Property< bool > m_bypassSelector
Definition: TauTrackFinder.h:112
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
xAOD::Vertex_v1::setZ
void setZ(float value)
Sets the z position.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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:420
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
xAOD::TauJetParameters::nChargedTracks
@ nChargedTracks
Definition: TauDefs.h:322
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:450
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:563
python.xAODType.dummy
dummy
Definition: xAODType.py:4
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
TauTrackFinder::m_storeInOtherTrks
Gaudi::Property< bool > m_storeInOtherTrks
Definition: TauTrackFinder.h:110
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:581
xAOD::SiSpacePointsSeedMaker_LargeD0
@ SiSpacePointsSeedMaker_LargeD0
Definition: TrackingPrimitives.h:183
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:348
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:119
TauTrackFinder::TauTrackCore
@ TauTrackCore
Definition: TauTrackFinder.h:53
xAOD::TauTrack_v1::setDetail
void setDetail(TauJetParameters::TrackDetail detail, float value)
Definition: TauTrack_v1.cxx:178
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:221
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:538
TauTrackFinder::isLargeD0Track
bool isLargeD0Track(const xAOD::TrackParticle *track) const
Definition: TauTrackFinder.cxx:638
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:172
TauTrackFinder::TauTrackOther
@ TauTrackOther
Definition: TauTrackFinder.h:55
TauTrackFinder::m_useGhostTracks
Gaudi::Property< bool > m_useGhostTracks
Definition: TauTrackFinder.h:114
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:431
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:67
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:97
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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:337
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::TauJetParameters::wideTrack
@ wideTrack
Definition: TauDefs.h:404
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
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:370
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:512
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:44
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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:122
TauTrackFinder::m_EMSamplings
std::set< CaloSampling::CaloSample > m_EMSamplings
Definition: TauTrackFinder.h:124
readCCLHist.float
float
Definition: readCCLHist.py:83
TauTrackFinder::m_HadSamplings
std::set< CaloSampling::CaloSample > m_HadSamplings
Definition: TauTrackFinder.h:125
TauTrackFinder::m_removeDuplicateCoreTracks
Gaudi::Property< bool > m_removeDuplicateCoreTracks
Definition: TauTrackFinder.h:111
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:120