ATLAS Offline Software
Loading...
Searching...
No Matches
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.
 ASG_TOOL_CLASS2 (TauTrackFinder, TauRecToolBase, ITauToolBase)
 ~TauTrackFinder ()
virtual StatusCode initialize () override
 Algorithm functions.
virtual StatusCode executeTool (xAOD::TauJet &pTau, const EventContext &ctx, xAOD::TauTrackContainer &tauTrackCon) const override
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &) const override
 Execute - called for each tau candidate.
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &, CaloConstCellContainer &, boost::dynamic_bitset<> &) const override
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &, const xAOD::VertexContainer *) const override
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &, xAOD::VertexContainer &) const override
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &, xAOD::CaloClusterContainer &, xAOD::PFOContainer &) const override
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &, xAOD::PFOContainer &, xAOD::PFOContainer &, const xAOD::CaloClusterContainer &) const override
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &, xAOD::PFOContainer &, xAOD::PFOContainer &) const override
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &, xAOD::PFOContainer &) const override
virtual StatusCode executeTool (xAOD::TauJet &, const EventContext &, xAOD::ParticleContainer &, xAOD::PFOContainer &) const override
virtual StatusCode eventInitialize () override
 Event initializer - called at the beginning of each event.
virtual StatusCode eventFinalize () override
 Event finalizer - called at the end of each event.
virtual StatusCode finalize () override
 Finalizer.
std::string find_file (const std::string &fname) const
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

bool inTrigger () const
bool inAOD () const
bool inEleRM () const
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

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< StoreGateSvc > StoreGateSvc_t

Private Member Functions

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 (const EventContext &ctx, 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 EventContext &ctx, const xAOD::TrackParticle *track, const xAOD::Vertex *vertex) const
 Some internally used functions.
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>

Private Attributes

ToolHandle< Trk::ITrackSelectorTool > m_trackSelectorTool_tau {this, "TrackSelectorToolTau", "", "Tool for track selection"}
 tools
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool {this, "TrackToVertexTool", "Reco::TrackToVertex"}
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator {this, "TrackToVertexIPEstimator", ""}
Gaudi::Property< double > m_maxJetDr_tau {this, "MaxJetDrTau", 0.2}
Gaudi::Property< double > m_maxJetDr_wide {this, "MaxJetDrWide", 0.4}
Gaudi::Property< float > m_z0maxDelta {this, "maxDeltaZ0wrtLeadTrk", 1000.}
Gaudi::Property< bool > m_removeDuplicateCoreTracks {this, "removeDuplicateCoreTracks", true}
Gaudi::Property< bool > m_useGhostTracks {this, "useGhostTracks", false}
Gaudi::Property< double > m_ghostTrackDR {this, "ghostTrackDR", 0.25}
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackPartInputContainer {this,"Key_trackPartInputContainer", "InDetTrackParticles", "input track particle container key"}
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_largeD0TracksInputContainer {this,"Key_LargeD0TrackInputContainer", "", "input LRT particle container key"}
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer {this,"Key_jetContainer", "", "Name of the seed jet container, when using ghost matching"}
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
bool m_applyZ0cut = false
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
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 38 of file TauTrackFinder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TauTrackType

Enumerator defining type of tau track.

Enumerator
TauTrackCore 
TauTrackWide 
TauTrackOther 
NotTauTrack 

Definition at line 50 of file TauTrackFinder.h.

Constructor & Destructor Documentation

◆ TauTrackFinder()

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

Constructor and Destructor.

Definition at line 13 of file TauTrackFinder.cxx.

13 :
14 TauRecToolBase(name)
15{}
TauRecToolBase(const std::string &name)

◆ ~TauTrackFinder()

TauTrackFinder::~TauTrackFinder ( )

Definition at line 17 of file TauTrackFinder.cxx.

17{}

Member Function Documentation

◆ ASG_TOOL_CLASS2()

TauTrackFinder::ASG_TOOL_CLASS2 ( TauTrackFinder ,
TauRecToolBase ,
ITauToolBase  )

◆ declareGaudiProperty()

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 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

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

◆ eventFinalize()

StatusCode TauRecToolBase::eventFinalize ( )
overridevirtualinherited

Event finalizer - called at the end of each event.

Implements ITauToolBase.

Definition at line 123 of file TauRecToolBase.cxx.

123 {
124 return StatusCode::SUCCESS;
125}

◆ eventInitialize()

StatusCode TauRecToolBase::eventInitialize ( )
overridevirtualinherited

Event initializer - called at the beginning of each event.

Implements ITauToolBase.

Definition at line 36 of file TauRecToolBase.cxx.

36 {
37 return StatusCode::SUCCESS;
38}

◆ evtStore()

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.

◆ executeTool() [1/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext &  ) const
overridevirtual

Execute - called for each tau candidate.

Reimplemented from TauRecToolBase.

Definition at line 43 of file TauRecToolBase.cxx.

42 {
43 ATH_MSG_ERROR("function not implemented");
44 return StatusCode::FAILURE;
45}
#define ATH_MSG_ERROR(x,...)

◆ executeTool() [2/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext & ,
CaloConstCellContainer & ,
boost::dynamic_bitset<> &  ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 49 of file TauRecToolBase.cxx.

56 {
57 ATH_MSG_ERROR("function not implemented");
58 return StatusCode::FAILURE;
59}

◆ executeTool() [3/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext & ,
const xAOD::VertexContainer *  ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 54 of file TauRecToolBase.cxx.

64 {
65 ATH_MSG_ERROR("function not implemented");
66 return StatusCode::FAILURE;
67}

◆ executeTool() [4/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext & ,
xAOD::CaloClusterContainer & ,
xAOD::PFOContainer &  ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 66 of file TauRecToolBase.cxx.

86 {
87 ATH_MSG_ERROR("function not implemented");
88 return StatusCode::FAILURE;
89}

◆ executeTool() [5/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext & ,
xAOD::ParticleContainer & ,
xAOD::PFOContainer &  ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 86 of file TauRecToolBase.cxx.

118 {
119 ATH_MSG_ERROR("function not implemented");
120 return StatusCode::FAILURE;
121}

◆ executeTool() [6/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext & ,
xAOD::PFOContainer &  ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 82 of file TauRecToolBase.cxx.

110 {
111 ATH_MSG_ERROR("function not implemented");
112 return StatusCode::FAILURE;
113}

◆ executeTool() [7/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext & ,
xAOD::PFOContainer & ,
xAOD::PFOContainer &  ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 77 of file TauRecToolBase.cxx.

103 {
104 ATH_MSG_ERROR("function not implemented");
105 return StatusCode::FAILURE;
106}

◆ executeTool() [8/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext & ,
xAOD::PFOContainer & ,
xAOD::PFOContainer & ,
const xAOD::CaloClusterContainer &  ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 71 of file TauRecToolBase.cxx.

95 {
96 ATH_MSG_ERROR("function not implemented");
97 return StatusCode::FAILURE;
98}

◆ executeTool() [9/10]

StatusCode TauRecToolBase::executeTool ( xAOD::TauJet & ,
const EventContext & ,
xAOD::VertexContainer &  ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 58 of file TauRecToolBase.cxx.

71 {
72 ATH_MSG_ERROR("function not implemented");
73 return StatusCode::FAILURE;
74}

◆ executeTool() [10/10]

StatusCode TauTrackFinder::executeTool ( xAOD::TauJet & pTau,
const EventContext & ctx,
xAOD::TauTrackContainer & tauTrackCon ) const
overridevirtual

Reimplemented from TauRecToolBase.

Definition at line 53 of file TauTrackFinder.cxx.

55 {
56
57 std::vector<const xAOD::TrackParticle*> tauTracks;
58 std::vector<const xAOD::TrackParticle*> wideTracks;
59 std::vector<const xAOD::TrackParticle*> otherTracks;
60
61 //Retrieve standard track container
62 const xAOD::TrackParticleContainer* trackParticleCont = nullptr;
63
64 SG::ReadHandle<xAOD::TrackParticleContainer> trackPartInHandle( m_trackPartInputContainer, ctx );
65 if (!trackPartInHandle.isValid()) {
66 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << trackPartInHandle.key());
67 return StatusCode::FAILURE;
68 }
69 trackParticleCont = trackPartInHandle.cptr();
70
71 //Retrieve LRT container
72 const xAOD::TrackParticleContainer* largeD0TracksParticleCont = nullptr;
73 std::vector<const xAOD::TrackParticle*> vecTrksLargeD0;
74 if (! m_largeD0TracksInputContainer.empty()) {
75 SG::ReadHandle<xAOD::TrackParticleContainer> trackPartInHandle( m_largeD0TracksInputContainer, ctx );
76 if (!trackPartInHandle.isValid()) {
77 ATH_MSG_VERBOSE ("Could not retrieve HiveDataObj with key " << trackPartInHandle.key());
78 ATH_MSG_VERBOSE ("LRT container " << trackPartInHandle.key()<<" is not being used for tau tracks");
79 }
80 else {
81 largeD0TracksParticleCont = trackPartInHandle.cptr();
82 vecTrksLargeD0 = std::vector<const xAOD::TrackParticle*>(largeD0TracksParticleCont->begin(), largeD0TracksParticleCont->end());
83 }
84 }
85
86
87
88 // retrieve the seed jet container when using ghost-matching
89 const xAOD::JetContainer* jetContainer = nullptr;
90 if (! m_jetContainer.empty()) {
91 SG::ReadHandle<xAOD::JetContainer> jetContHandle( m_jetContainer, ctx );
92 if (!jetContHandle.isValid()) {
93 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << jetContHandle.key());
94 return StatusCode::FAILURE;
95 }
96 jetContainer = jetContHandle.cptr();
97 }
98 // in EleRM reco, we need the original track particles
99 std::vector<const xAOD::TrackParticle*> vecTrks;
100 vecTrks.reserve( trackParticleCont->size() );
101 for (auto trk : *trackParticleCont){
102 if (!inEleRM()) { vecTrks.push_back(trk); }
103 else{
104 static const SG::ConstAccessor<ElementLink<xAOD::TrackParticleContainer>> acc_originalObject("ERMOriginalTrack");
105 auto original_id_track_link = acc_originalObject(*trk);
106 if (!original_id_track_link.isValid()) {
107 ATH_MSG_ERROR("Original track link is not valid");
108 continue;
109 }
110 vecTrks.push_back(*original_id_track_link);
111 }
112 }
113
114 // get the primary vertex
115 const xAOD::Vertex* pVertex = pTau.vertex();
116
117 // retrieve tracks wrt a vertex
118 // as a vertex is used: tau origin / PV / beamspot / 0,0,0 (in this order, depending on availability)
119
120 getTauTracksFromPV(pTau, vecTrks, pVertex, m_useGhostTracks, jetContainer, tauTracks, wideTracks, otherTracks);
121
122 bool foundLRTCont = bool (largeD0TracksParticleCont != nullptr);
123 // additional LRT with vertex association added to tracks
124 if (foundLRTCont){
125 // for now, use cone association for LRTs, not ghost association
126 getTauTracksFromPV(pTau, vecTrksLargeD0, pVertex, false, nullptr, tauTracks, wideTracks, otherTracks);
127 }
128
129 // remove core and wide tracks outside a maximal delta z0 wrt lead core track
130 if (m_applyZ0cut) {
131 this->removeOffsideTracksWrtLeadTrk(ctx, tauTracks, wideTracks, otherTracks, pVertex, m_z0maxDelta);
132 }
133
135 bool alreadyUsed = false;
136 for (std::vector<const xAOD::TrackParticle*>::iterator track_it = tauTracks.begin(); track_it != tauTracks.end() ;)
137 {
138 alreadyUsed = false;
139 //loop over all up-to-now core tracks
140 for( const xAOD::TauTrack* tau_trk : tauTrackCon ) {
141 //originally it was coreTrack&passTrkSelector
143 if( (*track_it) == tau_trk->track()) alreadyUsed = true;
144 }
145 //if this track has already been used by another tau, don't associate it to this new one
146 if(alreadyUsed) {
147 ATH_MSG_INFO( "Found Already Used track new, now removing: " << *track_it );
148 track_it = tauTracks.erase(track_it);
149 } else ++track_it;
150 }
151 }
152
153 // associate track to tau candidate and calculate charge
154 float charge = 0.;
155 for (unsigned int i = 0; i < tauTracks.size(); ++i) {
156 const xAOD::TrackParticle* trackParticle = tauTracks.at(i);
157
158 ATH_MSG_VERBOSE(name() << " adding core track nr: " << i
159 << " eta " << trackParticle->eta()
160 << " phi " << trackParticle->phi());
161
162 charge += trackParticle->charge();
163
165 tauTrackCon.push_back(track);
166
167 ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
168 linkToTrackParticle.toContainedElement(*static_cast<const xAOD::TrackParticleContainer*>(trackParticle->container()), trackParticle);
169 if (foundLRTCont && isLargeD0Track(trackParticle)){//Check LRT track and link to container
171 }
172 else {
174 }
175 track->addTrackLink(linkToTrackParticle);
176
177 track->setP4(trackParticle->pt(), trackParticle->eta(), trackParticle->phi(), trackParticle->m());
180 // in case TrackClassifier is not run, still get sensible results
183
185 linkToTauTrack.toContainedElement(tauTrackCon, track);
186 pTau.addTauTrackLink(linkToTauTrack);
187
188 ATH_MSG_VERBOSE(name() << " added core track nr: " << i
189 << " eta " << pTau.track(i)->eta()
190 << " phi " << pTau.track(i)->phi());
191 }
192 // set the charge, which is defined by the core tau tracks only
193 pTau.setCharge(charge);
194
195 for (unsigned int i = 0; i < wideTracks.size(); ++i) {
196 const xAOD::TrackParticle* trackParticle = wideTracks.at(i);
197
198 ATH_MSG_VERBOSE(name() << " adding wide track nr: " << i
199 << " eta " << trackParticle->eta()
200 << " phi " << trackParticle->phi());
201
203 tauTrackCon.push_back(track);
204
205 ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
206 linkToTrackParticle.toContainedElement(*static_cast<const xAOD::TrackParticleContainer*>(trackParticle->container()), trackParticle);
207 if (foundLRTCont && isLargeD0Track(trackParticle)){//Check LRT track and link to container
209 }
210 else {
212 }
213 track->addTrackLink(linkToTrackParticle);
214
215 track->setP4(trackParticle->pt(), trackParticle->eta(), trackParticle->phi(), trackParticle->m());
218 // in case TrackClassifier is not run, still get sensible results
219 track->setFlag(xAOD::TauJetParameters::TauTrackFlag::classifiedIsolation, true); // for sake of trigger, reset in TauTrackClassifier
220 track->setFlag(xAOD::TauJetParameters::TauTrackFlag::modifiedIsolationTrack, true); // for sake of trigger, reset in TauTrackClassifier
222
224 linkToTauTrack.toContainedElement(tauTrackCon, track);
225 pTau.addTauTrackLink(linkToTauTrack);
226 }
227
228 //These are set again in TauTrackClassifier
229 pTau.setDetail(xAOD::TauJetParameters::nChargedTracks, static_cast<int>(pTau.nTracks()));
231
232 for (unsigned int i = 0; i < otherTracks.size(); ++i) {
233 const xAOD::TrackParticle* trackParticle = otherTracks.at(i);
234
235 ATH_MSG_VERBOSE(name() << " adding other track nr: " << i
236 << " eta " << trackParticle->eta()
237 << " phi " << trackParticle->phi());
238
240 tauTrackCon.push_back(track);
241
242 ElementLink<xAOD::TrackParticleContainer> linkToTrackParticle;
243 if (foundLRTCont && isLargeD0Track(trackParticle)){//Check LRT track and link to container
244 linkToTrackParticle.toContainedElement(*static_cast<const xAOD::TrackParticleContainer*>(trackParticle->container()), trackParticle);
246 }
247 else {
248 linkToTrackParticle.toContainedElement(*static_cast<const xAOD::TrackParticleContainer*>(trackParticle->container()), trackParticle);
250 }
251 track->addTrackLink(linkToTrackParticle);
252
253 track->setP4(trackParticle->pt(), trackParticle->eta(), trackParticle->phi(), trackParticle->m());
254 float dR = track->p4().DeltaR(pTau.p4());
258
260 linkToTauTrack.toContainedElement(tauTrackCon, track);
261 pTau.addTauTrackLink(linkToTauTrack);
262 }
263
265 // keep track of total number of associated tracks, in case of tau track thinning
266 pTau.setDetail(xAOD::TauJetParameters::nAllTracks, static_cast<int>(pTau.nAllTracks()));
267
268 ATH_MSG_DEBUG("numTrack: " << "/" << pTau.nTracks());
269 ATH_MSG_DEBUG("charge: " << "/" << pTau.charge());
270
271 // impact parameter variables w.r.t. tau vertex
272 const xAOD::Vertex* vxcand = nullptr;
273
274 xAOD::Vertex vxbkp;
275 vxbkp.makePrivateStore();
276
277 // FIXME: don't we want to use the beamspot in the offline reconstruction too, when there is no reconstructed primary vertex?
278 if (pTau.vertex()!=nullptr && pTau.vertex()->vertexType() != xAOD::VxType::NoVtx) {
279 vxcand = pTau.vertex();
280 }
281 else if (inTrigger()) { // online: use vertex with x-y coordinates from the beamspot and the z from the leading track
282 vxbkp.setX(0); vxbkp.setY(0); vxbkp.setZ(0);
283
284 SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey, ctx };
285 if(beamSpotHandle.isValid()) {
286 vxbkp.setPosition(beamSpotHandle->beamPos());
287 const auto& cov = beamSpotHandle->beamVtx().covariancePosition();
288 vxbkp.setCovariancePosition(cov);
289
290 if(!tauTracks.empty()) {
291 vxbkp.setZ(tauTracks.at(0)->z0());
292 }
293 }
294 else {
295 ATH_MSG_DEBUG("No Beamspot object in tau candidate");
296 }
297 vxcand = & vxbkp;
298 }
299
300
301 // this could be replaced with TauTrack::setDetail
302 static const SG::Accessor<float> dec_d0TJVA("d0TJVA");
303 static const SG::Accessor<float> dec_z0sinthetaTJVA("z0sinthetaTJVA");
304 static const SG::Accessor<float> dec_d0SigTJVA("d0SigTJVA");
305 static const SG::Accessor<float> dec_z0sinthetaSigTJVA("z0sinthetaSigTJVA");
306
307 for(const ElementLink<xAOD::TauTrackContainer>& trackLink : pTau.allTauTrackLinks())
308 {
309 assert (trackLink.getStorableObjectPointer() == &tauTrackCon);
310 xAOD::TauTrack* track = tauTrackCon[trackLink.index()];
311 dec_d0TJVA(*track) = track->track()->d0();
312 dec_z0sinthetaTJVA(*track) = track->z0sinThetaTJVA(pTau);
313 dec_d0SigTJVA(*track) = -999.;
314 dec_z0sinthetaSigTJVA(*track) = -999.;
315
316 // in the trigger, z0sintheta and corresponding significance are meaningless if we use the beamspot
317 if(vxcand) {
318 std::unique_ptr<const Trk::ImpactParametersAndSigma> myIPandSigma
319 = std::unique_ptr<const Trk::ImpactParametersAndSigma>(m_trackToVertexIPEstimator->estimate(ctx, track->track(), vxcand));
320
321 if(myIPandSigma) {
322 dec_d0TJVA(*track) = myIPandSigma->IPd0;
323 dec_z0sinthetaTJVA(*track) = myIPandSigma->IPz0SinTheta;
324 dec_d0SigTJVA(*track) = (myIPandSigma->sigmad0 != 0.) ? static_cast<float>( myIPandSigma->IPd0 / myIPandSigma->sigmad0 ) : -999.f;
325 dec_z0sinthetaSigTJVA(*track) = (myIPandSigma->sigmaz0SinTheta != 0.) ? static_cast<float>( myIPandSigma->IPz0SinTheta / myIPandSigma->sigmaz0SinTheta ) : -999.f;
326 }
327 }
328 }
329
330 return StatusCode::SUCCESS;
331}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_INFO(x,...)
double charge(const T &p)
Definition AtlasPID.h:1003
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
bool inEleRM() const
bool inTrigger() const
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackPartInputContainer
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
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_largeD0TracksInputContainer
Gaudi::Property< float > m_z0maxDelta
Gaudi::Property< double > m_maxJetDr_tau
Gaudi::Property< bool > m_useGhostTracks
void removeOffsideTracksWrtLeadTrk(const EventContext &ctx, 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
Gaudi::Property< bool > m_removeDuplicateCoreTracks
bool isLargeD0Track(const xAOD::TrackParticle *track) const
float charge() const
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition TauJet_v3.cxx:96
void setCharge(float)
const TauTrack * track(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged, int *container_index=0) const
Get the pointer to a given tauTrack associated with this tau /*container index needed by trackNonCons...
void setDetail(TauJetParameters::Detail detail, int value)
const Vertex * vertex() const
size_t nAllTracks() const
const TauTrackLinks_t & allTauTrackLinks() const
void addTauTrackLink(const ElementLink< TauTrackContainer > &tr)
add a TauTrack to the tau
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double m() const override final
The invariant mass of the particle..
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .).
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float charge() const
Returns the charge.
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
void setZ(float value)
Sets the z position.
void setX(float value)
Sets the x position.
void setY(float value)
Sets the y position.
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
VxType::VertexType vertexType() const
The type of the vertex.
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauTrack_v1 TauTrack
Definition of the current version.
Definition TauTrack.h:16
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
setBGCode setTAP setLVL2ErrorBits bool
JetContainer_v1 JetContainer
Definition of the current "jet container version".

◆ 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

◆ finalize()

StatusCode TauRecToolBase::finalize ( )
overridevirtualinherited

Finalizer.

Implements ITauToolBase.

Reimplemented in PanTau::PanTauProcessor.

Definition at line 127 of file TauRecToolBase.cxx.

127 {
128 return StatusCode::SUCCESS;
129}

◆ 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
23 full_path = PathResolverFindCalibFile(m_tauRecToolsTag+"/"+fname);
24 if(full_path.empty()) full_path = PathResolverFindCalibFile(fname);
25 return full_path;
26}
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Gaudi::Property< std::string > m_tauRecToolsTag

◆ 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::Event 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::Event, 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 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ 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::Event 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::Event, 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 355 of file TauTrackFinder.cxx.

363{
364 std::vector<const xAOD::TrackParticle*> ghostTracks;
365 if(useGhostTracks) {
366 const xAOD::Jet* seedJet = pTau.jet();
367 if(seedJet) {
368 if(!seedJet->getAssociatedObjects("GhostTrack", ghostTracks)) {
369 ATH_MSG_WARNING("Could not retrieve GhostTrack from seed jet.");
370 }
371 }
372 }
373 // in EleRM reco, we need the original track particles
374 if (inEleRM()){
375 static const SG::ConstAccessor<ElementLink<xAOD::TrackParticleContainer>> acc_originalTrack("ERMOriginalTrack");
376 for (uint i = 0; i < ghostTracks.size(); i++){
377 auto original_id_track_link = acc_originalTrack(*(ghostTracks[i]));
378 if (!original_id_track_link.isValid()) {
379 ATH_MSG_ERROR("Original track link is not valid");
380 continue;
381 }
382 ghostTracks[i] = *original_id_track_link;
383 }
384 }
385
386 for (const xAOD::TrackParticle *trackParticle : vecTrackParticles) {
387 TauTrackType type = tauTrackType(pTau, *trackParticle, primaryVertex);
388 if(type == NotTauTrack) continue;
389
390 if(useGhostTracks) {
391 // require that tracks are ghost-matched with the seed jet at large dR(tau,track), to avoid using tracks from another tau
392 double dR = pTau.p4().DeltaR(trackParticle->p4());
393 if (dR > m_ghostTrackDR) {
394 if (std::find(ghostTracks.begin(), ghostTracks.end(), trackParticle) == ghostTracks.end()) {
395 // check whether the jet closest to the track is the current seed jet
396 // if so, recover the track even if not ghost-matched, to improve tau-track association efficiency at low pt (esp. for 3p)
397 double dRmin = 999.;
398 bool isSeedClosest = false;
399 for (const xAOD::Jet* jet : *jetContainer) {
401 TLorentzVector jetLV;
402 jetLV.SetPtEtaPhiM(jetP4.Pt(), jetP4.Eta(), jetP4.Phi(), jetP4.M());
403 double dRjet = trackParticle->p4().DeltaR(jetLV);
404 if(dRjet < dRmin) {
405 dRmin = dRjet;
406 isSeedClosest = (jet == pTau.jet());
407 }
408 }
409 if(!isSeedClosest) continue;
410 }
411 }
412 }
413
414 if (type == TauTrackCore)
415 tauTracks.push_back(trackParticle);
416 else if (type == TauTrackWide)
417 wideTracks.push_back(trackParticle);
418 else if (type == TauTrackOther)
419 otherTracks.push_back(trackParticle);
420 }
421 std::sort(tauTracks.begin(), tauTracks.end(), TrackSort());
422 std::sort(wideTracks.begin(), wideTracks.end(), TrackSort());
423 std::sort(otherTracks.begin(), otherTracks.end(), TrackSort());
424}
#define ATH_MSG_WARNING(x,...)
unsigned int uint
TauTrackType tauTrackType(const xAOD::TauJet &tauJet, const xAOD::TrackParticle &trackParticle, const xAOD::Vertex *primaryVertex) const
Gaudi::Property< double > m_ghostTrackDR
TauTrackType
Enumerator defining type of tau track.
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...
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Jet_v1 Jet
Definition of the current "jet version".
@ JetConstitScaleMomentum
Definition JetTypes.h:29
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition JetTypes.h:17

◆ getZ0()

float TauTrackFinder::getZ0 ( const EventContext & ctx,
const xAOD::TrackParticle * track,
const xAOD::Vertex * vertex ) const
private

Some internally used functions.

Definition at line 486 of file TauTrackFinder.cxx.

487{
488 float MAX=1e5;
489
490 if (!track) return MAX;
491
492 std::unique_ptr<Trk::Perigee> perigee;
493 if (vertex) perigee = m_trackToVertexTool->perigeeAtVertex(ctx, *track, vertex->position());
494 else perigee = m_trackToVertexTool->perigeeAtVertex(ctx, *track); //will use beamspot or 0,0,0 instead
495
496 if (!perigee) {
497 ATH_MSG_WARNING("Bad track; can't find perigee at vertex.");
498 return MAX;
499 }
500
501 return static_cast<float>(perigee->parameters()[Trk::z0]);
502}
#define MAX(x, y)
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
@ z0
Definition ParamDefs.h:64

◆ inAOD()

bool TauRecToolBase::inAOD ( ) const
inlineprotectedinherited

Definition at line 116 of file TauRecToolBase.h.

116{ return m_in_AOD; }
Gaudi::Property< bool > m_in_AOD

◆ inEleRM()

bool TauRecToolBase::inEleRM ( ) const
inlineprotectedinherited

Definition at line 117 of file TauRecToolBase.h.

117{ return m_in_EleRM; }
Gaudi::Property< bool > m_in_EleRM

◆ initialize()

StatusCode TauTrackFinder::initialize ( void )
overridevirtual

Algorithm functions.

Reimplemented from TauRecToolBase.

Definition at line 20 of file TauTrackFinder.cxx.

20 {
21
22 // retrieve tools
24
25 if(!m_trackToVertexTool.empty()){
26 ATH_CHECK( m_trackToVertexTool.retrieve() );
27 m_applyZ0cut = true;
28 }
29
31
32 // initialize ReadHandleKey
34 // allow empty for LRT
36
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
47 ATH_CHECK( m_beamSpotKey.initialize(inTrigger()) );
48
49 return StatusCode::SUCCESS;
50}
#define ATH_CHECK
Evaluate an expression and check for errors.
ToolHandle< Trk::ITrackSelectorTool > m_trackSelectorTool_tau
tools

◆ 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 115 of file TauRecToolBase.h.

115{ return m_in_trigger; }
Gaudi::Property< bool > m_in_trigger

◆ isLargeD0Track()

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

Definition at line 504 of file TauTrackFinder.cxx.

505{
506 const std::bitset<xAOD::NumberOfTrackRecoInfo> patternReco = track->patternRecoInfo();
508 ATH_MSG_DEBUG("LargeD0Track found");
509 return true;
510 }
511
512 return false;
513}
@ SiSpacePointsSeedMaker_LargeD0

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ 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

◆ removeOffsideTracksWrtLeadTrk()

void TauTrackFinder::removeOffsideTracksWrtLeadTrk ( const EventContext & ctx,
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 427 of file TauTrackFinder.cxx.

433{
434 float MAX=1e5;
435
436 // need at least one core track to have a leading trk to compare with
437 if (tauTracks.empty()) return;
438
439 // get lead trk parameters
440 const xAOD::TrackParticle *leadTrack = tauTracks.at(0);
441 float z0_leadTrk = getZ0(ctx, leadTrack, tauOrigin);
442
443 if (z0_leadTrk > MAX-1) return; // bad lead trk -> do nothing
444
445 ATH_MSG_VERBOSE("before z0 cut: #coreTracks=" << tauTracks.size() << ", #wideTracks=" << wideTracks.size() << ", #otherTracks=" << otherTracks.size());
446
447 std::vector<const xAOD::TrackParticle*>::iterator itr;
448
449 // skip leading track, because it is the reference
450 itr = tauTracks.begin()+1;
451 while (itr!=tauTracks.end()) {
452 float z0 = getZ0(ctx, *itr, tauOrigin);
453 float deltaZ0=z0 - z0_leadTrk;
454 ATH_MSG_VERBOSE("core Trks: deltaZ0= " << deltaZ0);
455
456 if ( std::abs(deltaZ0) < maxDeltaZ0 ) {++itr;}
457 else {
458 otherTracks.push_back(*itr);
459 itr = tauTracks.erase(itr); //remove from core track collection
460 }
461 }
462
463 // check wide tracks
464 itr = wideTracks.begin();
465 while (itr!=wideTracks.end()) {
466 float z0 = getZ0(ctx, *itr, tauOrigin);
467 float deltaZ0=z0 - z0_leadTrk;
468 ATH_MSG_VERBOSE("wide Trks: deltaZ0= " << deltaZ0);
469
470 if ( std::abs(deltaZ0) < maxDeltaZ0 ) { ++itr; }
471 else {
472 otherTracks.push_back(*itr);
473 itr = wideTracks.erase(itr); //remove from wide track collection
474 }
475 }
476
477 ATH_MSG_VERBOSE("after z0 cut: #coreTracks=" << tauTracks.size() << ", #wideTracks=" << wideTracks.size() << ", #otherTracks=" << otherTracks.size());
478
479 // sort again
480 std::sort(tauTracks.begin(), tauTracks.end(), TrackSort());
481 std::sort(wideTracks.begin(), wideTracks.end(), TrackSort());
482 std::sort(otherTracks.begin(), otherTracks.end(), TrackSort());
483}
float getZ0(const EventContext &ctx, const xAOD::TrackParticle *track, const xAOD::Vertex *vertex) const
Some internally used functions.

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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)

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ 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 asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

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

338{
339 double dR = pTau.p4().DeltaR(trackParticle.p4());
340
341 if (dR > m_maxJetDr_wide) return NotTauTrack;
342
343 bool goodTrack = m_trackSelectorTool_tau->decision(trackParticle, primaryVertex);
344
345 if (goodTrack) {
346 if (dR > m_maxJetDr_tau)
347 return TauTrackWide;
348 else
349 return TauTrackCore;
350 } else
351 return TauTrackOther;
352}
Gaudi::Property< double > m_maxJetDr_wide
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.

◆ updateVHKA()

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

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_applyZ0cut

bool TauTrackFinder::m_applyZ0cut = false
private

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

115{ this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_ghostTrackDR

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

Definition at line 109 of file TauTrackFinder.h.

109{this, "ghostTrackDR", 0.25};

◆ 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 105 of file TauRecToolBase.h.

105{this, "inAOD", false, "Indicate if the tool is running on AOD"};

◆ 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 106 of file TauRecToolBase.h.

106{this, "inEleRM", false, "Indicate if the tool is running on EleRM routine"};

◆ 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 104 of file TauRecToolBase.h.

104{this, "inTrigger", false, "Indicate if the tool is running on trigger"};

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

113{this,"Key_jetContainer", "", "Name of the seed jet container, when using ghost matching"};

◆ m_largeD0TracksInputContainer

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

Definition at line 112 of file TauTrackFinder.h.

112{this,"Key_LargeD0TrackInputContainer", "", "input LRT particle container key"}; //Expecting InDetLargeD0TrackParticles (offline tracks) if using LRT used

◆ m_maxJetDr_tau

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

Definition at line 104 of file TauTrackFinder.h.

104{this, "MaxJetDrTau", 0.2};

◆ m_maxJetDr_wide

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

Definition at line 105 of file TauTrackFinder.h.

105{this, "MaxJetDrWide", 0.4};

◆ m_removeDuplicateCoreTracks

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

Definition at line 107 of file TauTrackFinder.h.

107{this, "removeDuplicateCoreTracks", true};

◆ 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 107 of file TauRecToolBase.h.

107{this, "calibFolder", "tauRecTools/R22_preprod", "CVMFS path to the tau calibration folder"};

◆ m_trackPartInputContainer

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

Definition at line 111 of file TauTrackFinder.h.

111{this,"Key_trackPartInputContainer", "InDetTrackParticles", "input track particle container key"};

◆ m_trackSelectorTool_tau

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

tools

Definition at line 100 of file TauTrackFinder.h.

100{this, "TrackSelectorToolTau", "", "Tool for track selection"};

◆ m_trackToVertexIPEstimator

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

Definition at line 102 of file TauTrackFinder.h.

102{this, "TrackToVertexIPEstimator", ""};

◆ m_trackToVertexTool

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

Definition at line 101 of file TauTrackFinder.h.

101{this, "TrackToVertexTool", "Reco::TrackToVertex"};

◆ m_useGhostTracks

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

Definition at line 108 of file TauTrackFinder.h.

108{this, "useGhostTracks", false};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_z0maxDelta

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

Definition at line 106 of file TauTrackFinder.h.

106{this, "maxDeltaZ0wrtLeadTrk", 1000.};

The documentation for this class was generated from the following files: