|
ATLAS Offline Software
|
Associate tracks to the tau candidate.
More...
#include <TauTrackFinder.h>
|
| TauTrackFinder (const std::string &name) |
| Constructor and Destructor. More...
|
|
| ASG_TOOL_CLASS2 (TauTrackFinder, TauRecToolBase, ITauToolBase) |
|
| ~TauTrackFinder () |
|
virtual StatusCode | initialize () override |
| Algorithm functions. More...
|
|
virtual StatusCode | executeTrackFinder (xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackCon) const override |
|
virtual StatusCode | eventInitialize () override |
| Event initializer - called at the beginning of each event. More...
|
|
virtual StatusCode | execute (xAOD::TauJet &pTau) const override |
| Execute - called for each tau candidate. More...
|
|
virtual StatusCode | executePi0CreateROI (xAOD::TauJet &pTau, CaloConstCellContainer &caloCellContainer, boost::dynamic_bitset<> &map) const override |
|
virtual StatusCode | executeVertexFinder (xAOD::TauJet &pTau, const xAOD::VertexContainer *vertexContainer=nullptr) const override |
|
virtual StatusCode | executeTrackClassifier (xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackContainer) const override |
|
virtual StatusCode | executeShotFinder (xAOD::TauJet &pTau, xAOD::CaloClusterContainer &shotClusterContainer, xAOD::PFOContainer &PFOContainer) const override |
|
virtual StatusCode | executePi0ClusterCreator (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer, xAOD::PFOContainer &hadronicPFOContainer, const xAOD::CaloClusterContainer &pCaloClusterContainer) const override |
|
virtual StatusCode | executeVertexVariables (xAOD::TauJet &pTau, xAOD::VertexContainer &vertexContainer) const override |
|
virtual StatusCode | executePi0ClusterScaler (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer, xAOD::PFOContainer &chargedPFOContainer) const override |
|
virtual StatusCode | executePi0nPFO (xAOD::TauJet &pTau, xAOD::PFOContainer &neutralPFOContainer) const override |
|
virtual StatusCode | executePanTau (xAOD::TauJet &pTau, xAOD::ParticleContainer &particleContainer, xAOD::PFOContainer &neutralPFOContainer) const override |
|
virtual StatusCode | eventFinalize () override |
| Event finalizer - called at the end of each event. More...
|
|
virtual StatusCode | finalize () override |
| Finalizer. More...
|
|
std::string | find_file (const std::string &fname) const |
|
virtual StatusCode | readConfig () override |
|
virtual void | print () const |
| Print the state of the tool. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
Gaudi::Property< bool > | m_in_trigger {this, "inTrigger", false, "Indicate if the tool is running on trigger"} |
|
Gaudi::Property< bool > | m_in_AOD {this, "inAOD", false, "Indicate if the tool is running on AOD"} |
|
Gaudi::Property< bool > | m_in_EleRM {this, "inEleRM", false, "Indicate if the tool is running on EleRM routine"} |
|
Gaudi::Property< std::string > | m_tauRecToolsTag {this, "calibFolder", "tauRecTools/R22_preprod", "CVMFS path to the tau calibration folder"} |
|
|
StatusCode | extrapolateToCaloSurface (xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackCon) const |
| Extrapolate track eta and phi to the calorimeter middle surface. More...
|
|
TauTrackType | tauTrackType (const xAOD::TauJet &tauJet, const xAOD::TrackParticle &trackParticle, const xAOD::Vertex *primaryVertex) const |
|
void | getTauTracksFromPV (const xAOD::TauJet &tauJet, const std::vector< const xAOD::TrackParticle * > &vecTrackParticles, const xAOD::Vertex *primaryVertex, const bool &useGhostTracks, const xAOD::JetContainer *jetContainer, std::vector< const xAOD::TrackParticle * > &tauTracks, std::vector< const xAOD::TrackParticle * > &wideTracks, std::vector< const xAOD::TrackParticle * > &otherTracks) const |
|
void | removeOffsideTracksWrtLeadTrk (std::vector< const xAOD::TrackParticle * > &tauTracks, std::vector< const xAOD::TrackParticle * > &wideTracks, std::vector< const xAOD::TrackParticle * > &otherTracks, const xAOD::Vertex *tauOrigin, double maxDeltaZ0) const |
|
float | getZ0 (const xAOD::TrackParticle *track, const xAOD::Vertex *vertex) const |
| Some internally used functions. More...
|
|
bool | isLargeD0Track (const xAOD::TrackParticle *track) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &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...
|
|
|
ToolHandle< Trk::IParticleCaloExtensionTool > | m_caloExtensionTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", "Tool for the extrapolation of charged tracks"} |
| tools More...
|
|
ToolHandle< Trk::ITrackSelectorTool > | m_trackSelectorTool_tau {this, "TrackSelectorToolTau", "", "Tool for track selection"} |
|
ToolHandle< Reco::ITrackToVertex > | m_trackToVertexTool {this, "TrackToVertexTool", "Reco::TrackToVertex"} |
|
ToolHandle< Trk::ITrackToVertexIPEstimator > | m_trackToVertexIPEstimator {this, "TrackToVertexIPEstimator", ""} |
|
Gaudi::Property< double > | m_maxJetDr_tau {this, "MaxJetDrTau", 0.2} |
|
Gaudi::Property< double > | m_maxJetDr_wide {this, "MaxJetDrWide", 0.4} |
|
Gaudi::Property< bool > | m_applyZ0cut {this, "removeTracksOutsideZ0wrtLeadTrk", false} |
|
Gaudi::Property< float > | m_z0maxDelta {this, "maxDeltaZ0wrtLeadTrk", 1000.} |
|
Gaudi::Property< bool > | m_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::TrackParticleContainer > | m_trackPartInputContainer {this,"Key_trackPartInputContainer", "InDetTrackParticles", "input track particle container key"} |
|
SG::ReadHandleKey< xAOD::TrackParticleContainer > | m_largeD0TracksInputContainer {this,"Key_LargeD0TrackInputContainer", "", "input LRT particle container key"} |
|
SG::ReadHandleKey< xAOD::JetContainer > | m_jetContainer {this,"Key_jetContainer", "", "Name of the seed jet container, when using ghost matching"} |
|
SG::ReadHandleKey< CaloExtensionCollection > | m_ParticleCacheKey {this,"tauParticleCache", "ParticleCaloExtension", "Name of the particle measurement extrapolation cache for TauTrackFinder"} |
|
SG::ReadCondHandleKey< InDet::BeamSpotData > | m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" } |
|
std::set< CaloSampling::CaloSample > | m_EMSamplings |
|
std::set< CaloSampling::CaloSample > | m_HadSamplings |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Associate tracks to the tau candidate.
The tracks have to pass dedicated quality criteria and have to match to a primary vertex consistent with the tau origin.
- Author
- KG Tan Kong..nosp@m.Guan.nosp@m..Tan@.nosp@m.cern.nosp@m..ch
-
Felix Friedrich
Definition at line 39 of file TauTrackFinder.h.
◆ StoreGateSvc_t
◆ TauTrackType
Enumerator defining type of tau track.
Enumerator |
---|
TauTrackCore | |
TauTrackWide | |
TauTrackOther | |
NotTauTrack | |
Definition at line 51 of file TauTrackFinder.h.
◆ TauTrackFinder()
TauTrackFinder::TauTrackFinder |
( |
const std::string & |
name | ) |
|
◆ ~TauTrackFinder()
TauTrackFinder::~TauTrackFinder |
( |
| ) |
|
◆ ASG_TOOL_CLASS2()
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ eventFinalize()
StatusCode TauRecToolBase::eventFinalize |
( |
| ) |
|
|
overridevirtualinherited |
◆ eventInitialize()
StatusCode TauRecToolBase::eventInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TauRecToolBase::execute |
( |
xAOD::TauJet & |
pTau | ) |
const |
|
overridevirtualinherited |
Execute - called for each tau candidate.
Implements ITauToolBase.
Reimplemented in TauDecayModeNNClassifier, MvaTESVariableDecorator, TauCombinedTES, MvaTESEvaluator, TauWPDecorator, TauAxisSetter, TauEleOverlapChecker, TauJetRNNEvaluator, TauClusterFinder, TauCalibrateLC, TauGNNEvaluator, TauSubstructureVariables, TauVertexedClusterDecorator, TauAODSelector, TauElectronVetoVariables, JetSeedBuilder, TauCellVariables, TauCommonCalcVars, TauIDVarCalculator, and TauAODLeptonRemovalTool.
Definition at line 138 of file TauRecToolBase.cxx.
140 return StatusCode::FAILURE;
◆ executePanTau()
◆ executePi0ClusterCreator()
◆ executePi0ClusterScaler()
◆ executePi0CreateROI()
◆ executePi0nPFO()
◆ executeShotFinder()
◆ executeTrackClassifier()
◆ executeTrackFinder()
Reimplemented from TauRecToolBase.
Definition at line 58 of file TauTrackFinder.cxx.
60 std::vector<const xAOD::TrackParticle*> tauTracks;
61 std::vector<const xAOD::TrackParticle*> wideTracks;
62 std::vector<const xAOD::TrackParticle*> otherTracks;
68 if (!trackPartInHandle.isValid()) {
69 ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << trackPartInHandle.key());
70 return StatusCode::FAILURE;
72 trackParticleCont = trackPartInHandle.cptr();
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");
84 largeD0TracksParticleCont = trackPartInHandle.cptr();
85 vecTrksLargeD0 = std::vector<const xAOD::TrackParticle*>(largeD0TracksParticleCont->
begin(), largeD0TracksParticleCont->
end());
95 if (!jetContHandle.isValid()) {
96 ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << jetContHandle.key());
97 return StatusCode::FAILURE;
99 jetContainer = jetContHandle.cptr();
102 std::vector<const xAOD::TrackParticle*> vecTrks;
103 vecTrks.reserve( trackParticleCont->
size() );
104 for (
auto trk : *trackParticleCont){
105 if (!
inEleRM()) { vecTrks.push_back(trk); }
108 auto original_id_track_link = acc_originalObject(*trk);
109 if (!original_id_track_link.isValid()) {
113 vecTrks.push_back(*original_id_track_link);
125 bool foundLRTCont =
bool (largeD0TracksParticleCont !=
nullptr);
129 getTauTracksFromPV(pTau, vecTrksLargeD0, pVertex,
false,
nullptr, tauTracks, wideTracks, otherTracks);
138 bool alreadyUsed =
false;
146 if( (*track_it) == tau_trk->track()) alreadyUsed =
true;
149 if(alreadyUsed)
ATH_MSG_INFO(
"Found Already Used track new, now removing: " << *track_it );
150 if (alreadyUsed) track_it = tauTracks.erase(track_it);
157 for (
unsigned int i = 0;
i < tauTracks.size(); ++
i) {
161 <<
" eta " << trackParticle->
eta()
162 <<
" phi " << trackParticle->
phi());
167 tauTrackCon.push_back(
track);
177 track->addTrackLink(linkToTrackParticle);
179 track->setP4(trackParticle->
pt(), trackParticle->
eta(), trackParticle->
phi(), trackParticle->
m());
197 for (
unsigned int i = 0;
i < wideTracks.size(); ++
i) {
201 <<
" eta " << trackParticle->
eta()
202 <<
" phi " << trackParticle->
phi());
205 tauTrackCon.push_back(
track);
215 track->addTrackLink(linkToTrackParticle);
217 track->setP4(trackParticle->
pt(), trackParticle->
eta(), trackParticle->
phi(), trackParticle->
m());
234 for (
unsigned int i = 0;
i < otherTracks.size(); ++
i) {
238 <<
" eta " << trackParticle->
eta()
239 <<
" phi " << trackParticle->
phi());
242 tauTrackCon.push_back(
track);
253 track->addTrackLink(linkToTrackParticle);
255 track->setP4(trackParticle->
pt(), trackParticle->
eta(), trackParticle->
phi(), trackParticle->
m());
256 float dR =
track->p4().DeltaR(pTau.
p4());
287 if(beamSpotHandle.isValid()) {
289 const auto&
cov = beamSpotHandle->beamVtx().covariancePosition();
292 if(!tauTracks.empty()) {
293 vxbkp.
setZ(tauTracks.at(0)->z0());
311 assert (trackLink.getStorableObjectPointer() == &tauTrackCon);
314 dec_z0sinthetaTJVA(*
track) =
track->z0sinThetaTJVA(pTau);
315 dec_d0SigTJVA(*
track) = -999.;
316 dec_z0sinthetaSigTJVA(*
track) = -999.;
320 std::unique_ptr<const Trk::ImpactParametersAndSigma> myIPandSigma
337 if (
sc.isFailure() && !
sc.isRecoverable()) {
338 ATH_MSG_ERROR(
"couldn't extrapolate tracks to calo surface");
339 return StatusCode::FAILURE;
343 return StatusCode::SUCCESS;
◆ executeVertexFinder()
◆ executeVertexVariables()
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extrapolateToCaloSurface()
Extrapolate track eta and phi to the calorimeter middle surface.
Definition at line 443 of file TauTrackFinder.cxx.
450 std::unique_ptr<Trk::CaloExtension> uniqueExtension;
453 assert (trackLink.getStorableObjectPointer() == &tauTrackCon);
456 if( !orgTrack )
continue;
457 trackIndex = orgTrack->
index();
462 float etaHad = -10.0;
463 float phiHad = -10.0;
466 ATH_MSG_DEBUG(
"Try extrapolation of track with pt = " << orgTrack->
pt()
467 <<
", eta " << orgTrack->
eta()
468 <<
", phi" << orgTrack->
phi() );
474 caloExtension = (*particleCache)[trackIndex];
475 ATH_MSG_VERBOSE(
"Getting element " << trackIndex <<
" from the particleCache");
476 if( not caloExtension ){
478 "Calculating with the a CaloExtensionTool");
480 Gaudi::Hive::currentContext(), *orgTrack);
481 caloExtension = uniqueExtension.get();
488 Gaudi::Hive::currentContext(), *orgTrack);
489 caloExtension = uniqueExtension.get();
497 const std::vector<Trk::CurvilinearParameters>& clParametersVector = caloExtension->caloLayerIntersections();
498 if (clParametersVector.empty()) {
503 bool validECal =
false;
504 bool validHCal =
false;
517 etaEM =
cur.position().eta();
518 phiEM =
cur.position().phi();
526 etaHad =
cur.position().eta();
527 phiHad =
cur.position().phi();
530 if( validECal and validHCal )
break;
533 if( not validECal and std::abs(orgTrack->
pt()) < 2.48 ){
537 if( not validHCal and orgTrack->
pt() > 2000. ){
542 <<
" phi="<<orgTrack->
phi()
543 <<
" to ECal eta=" << etaEM
545 <<
" HCal eta=" << etaHad
555 return StatusCode::SUCCESS;
◆ finalize()
StatusCode TauRecToolBase::finalize |
( |
| ) |
|
|
overridevirtualinherited |
◆ find_file()
std::string TauRecToolBase::find_file |
( |
const std::string & |
fname | ) |
const |
|
inherited |
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ getTauTracksFromPV()
Definition at line 370 of file TauTrackFinder.cxx.
379 std::vector<const xAOD::TrackParticle*> ghostTracks;
390 for (
uint i = 0;
i < ghostTracks.size();
i++){
392 auto original_id_track_link = acc_originalTrack(*(ghostTracks[
i]));
393 if (!original_id_track_link.isValid()) {
397 ghostTracks[
i] = *original_id_track_link;
407 double dR = pTau.p4().DeltaR(trackParticle->p4());
409 if (
std::find(ghostTracks.begin(), ghostTracks.end(), trackParticle) == ghostTracks.end()) {
413 bool isSeedClosest =
false;
416 TLorentzVector jetLV;
417 jetLV.SetPtEtaPhiM(jetP4.Pt(), jetP4.Eta(), jetP4.Phi(), jetP4.M());
418 double dRjet = trackParticle->p4().DeltaR(jetLV);
421 isSeedClosest = (
jet == pTau.jet());
424 if(!isSeedClosest)
continue;
430 tauTracks.push_back(trackParticle);
432 wideTracks.push_back(trackParticle);
434 otherTracks.push_back(trackParticle);
◆ getZ0()
Some internally used functions.
Definition at line 618 of file TauTrackFinder.cxx.
624 std::unique_ptr<Trk::Perigee> perigee;
633 float z0 = perigee->parameters()[
Trk::z0];
◆ inAOD()
bool TauRecToolBase::inAOD |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ inEleRM()
bool TauRecToolBase::inEleRM |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ initialize()
StatusCode TauTrackFinder::initialize |
( |
| ) |
|
|
overridevirtual |
Algorithm functions.
Reimplemented from TauRecToolBase.
Definition at line 27 of file TauTrackFinder.cxx.
44 ATH_MSG_ERROR (
"Ghost matching is not a valid tau-track association scheme for trigger, use cone association. Aborting.");
45 return StatusCode::FAILURE;
54 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ inTrigger()
bool TauRecToolBase::inTrigger |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ isLargeD0Track()
Definition at line 638 of file TauTrackFinder.cxx.
640 const std::bitset<xAOD::NumberOfTrackRecoInfo> patternReco =
track->patternRecoInfo();
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ print()
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ readConfig()
StatusCode TauRecToolBase::readConfig |
( |
| ) |
|
|
overridevirtualinherited |
Implements ITauToolBase.
Definition at line 27 of file TauRecToolBase.cxx.
32 #ifndef XAOD_STANDALONE
33 bool configPathDeclared =
false;
34 for (Gaudi::Details::PropertyBase* property : getProperties())
36 if (property->name() ==
"ConfigPath")
38 configPathDeclared =
true;
42 if (!configPathDeclared)
43 #elif defined(XAOD_STANDALONE)
44 PropertyMgr::PropMap_t property_map = getPropertyMgr()->getProperties();
45 if (property_map.find(
"ConfigPath") == property_map.end())
47 # error "What environment are we in?!?"
48 #endif // XAOD_STANDALONE
50 ATH_MSG_INFO(
"No config file path property declared yet, this is not recommended");
51 return StatusCode::SUCCESS;
55 const std::string* config_file_path_property;
58 config_file_path_property = getProperty<std::string>(
"ConfigPath");
59 std::string config_file_path =
find_file(*config_file_path_property);
63 THashList* lList =
env.GetTable();
64 for( Int_t
i = 0; lList &&
i < lList->GetEntries(); ++
i )
68 #ifndef XAOD_STANDALONE
70 const std::type_info*
type =
getProperty(lList->At(
i )->GetName()).type_info();
73 if (*
type ==
typeid(
bool))
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(),
""));
93 sc = this->setProperty(lList->At(
i )->GetName(),
94 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
96 sc = this->setProperty(lList->At(
i )->GetName(),
97 env.GetValue(lList->At(
i )->GetName(),
int(0)));
99 sc = this->setProperty(lList->At(
i )->GetName(),
100 env.GetValue(lList->At(
i )->GetName(),
float(0)));
102 sc = this->setProperty(lList->At(
i )->GetName(),
103 env.GetValue(lList->At(
i )->GetName(),
double(0)));
105 sc = this->setProperty(lList->At(
i )->GetName(),
106 env.GetValue(lList->At(
i )->GetName(),
""));
107 #endif // XAOD_STANDALONE
110 #ifndef XAOD_STANDALONE
111 ATH_MSG_FATAL(
"there was a problem to find the correct type enum: "<<
type->name());
114 #endif // XAOD_STANDALONE
115 return StatusCode::FAILURE;
117 if (!
sc.isSuccess()) {
118 ATH_MSG_FATAL(
"failed to set property: " << lList->At(
i )->GetName());
119 return StatusCode::FAILURE;
122 return StatusCode::SUCCESS;
◆ removeOffsideTracksWrtLeadTrk()
Definition at line 560 of file TauTrackFinder.cxx.
569 if (tauTracks.empty())
return;
573 float z0_leadTrk =
getZ0(leadTrack, tauOrigin);
575 if (z0_leadTrk >
MAX-1)
return;
577 ATH_MSG_VERBOSE(
"before z0 cut: #coreTracks=" << tauTracks.size() <<
", #wideTracks=" << wideTracks.size() <<
", #otherTracks=" << otherTracks.size());
582 itr = tauTracks.begin()+1;
583 while (itr!=tauTracks.end()) {
584 float z0 =
getZ0(*itr, tauOrigin);
585 float deltaZ0=
z0 - z0_leadTrk;
588 if ( std::abs(deltaZ0) < maxDeltaZ0 ) {++itr;}
591 itr = tauTracks.erase(itr);
596 itr = wideTracks.begin();
597 while (itr!=wideTracks.end()) {
598 float z0 =
getZ0(*itr, tauOrigin);
599 float deltaZ0=
z0 - z0_leadTrk;
602 if ( std::abs(deltaZ0) < maxDeltaZ0 ) { ++itr; }
605 itr = wideTracks.erase(itr);
609 ATH_MSG_VERBOSE(
"after z0 cut: #coreTracks=" << tauTracks.size() <<
", #wideTracks=" << wideTracks.size() <<
", #otherTracks=" << otherTracks.size());
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ tauTrackType()
Definition at line 348 of file TauTrackFinder.cxx.
352 double dR = pTau.p4().DeltaR(trackParticle.
p4());
356 bool goodTrack =
true;
◆ updateVHKA()
◆ m_applyZ0cut
Gaudi::Property<bool> TauTrackFinder::m_applyZ0cut {this, "removeTracksOutsideZ0wrtLeadTrk", false} |
|
private |
◆ m_beamSpotKey
◆ m_bypassExtrapolator
Gaudi::Property<bool> TauTrackFinder::m_bypassExtrapolator {this, "BypassExtrapolator", false} |
|
private |
◆ m_bypassSelector
Gaudi::Property<bool> TauTrackFinder::m_bypassSelector {this, "BypassSelector", false} |
|
private |
◆ m_caloExtensionTool
◆ m_detStore
◆ m_EMSamplings
◆ m_evtStore
◆ m_ghostTrackDR
Gaudi::Property<double> TauTrackFinder::m_ghostTrackDR {this, "ghostTrackDR", 0.25} |
|
private |
◆ m_HadSamplings
◆ m_in_AOD
Gaudi::Property<bool> TauRecToolBase::m_in_AOD {this, "inAOD", false, "Indicate if the tool is running on AOD"} |
|
protectedinherited |
◆ m_in_EleRM
Gaudi::Property<bool> TauRecToolBase::m_in_EleRM {this, "inEleRM", false, "Indicate if the tool is running on EleRM routine"} |
|
protectedinherited |
◆ m_in_trigger
Gaudi::Property<bool> TauRecToolBase::m_in_trigger {this, "inTrigger", false, "Indicate if the tool is running on trigger"} |
|
protectedinherited |
◆ m_jetContainer
◆ m_largeD0TracksInputContainer
◆ m_maxJetDr_tau
Gaudi::Property<double> TauTrackFinder::m_maxJetDr_tau {this, "MaxJetDrTau", 0.2} |
|
private |
◆ m_maxJetDr_wide
Gaudi::Property<double> TauTrackFinder::m_maxJetDr_wide {this, "MaxJetDrWide", 0.4} |
|
private |
◆ m_ParticleCacheKey
◆ m_removeDuplicateCoreTracks
Gaudi::Property<bool> TauTrackFinder::m_removeDuplicateCoreTracks {this, "removeDuplicateCoreTracks", true} |
|
private |
◆ m_storeInOtherTrks
Gaudi::Property<bool> TauTrackFinder::m_storeInOtherTrks {this, "StoreRemovedCoreWideTracksInOtherTracks", true} |
|
private |
◆ m_tauRecToolsTag
Gaudi::Property<std::string> TauRecToolBase::m_tauRecToolsTag {this, "calibFolder", "tauRecTools/R22_preprod", "CVMFS path to the tau calibration folder"} |
|
protectedinherited |
◆ m_trackPartInputContainer
◆ m_trackSelectorTool_tau
◆ m_trackToVertexIPEstimator
◆ m_trackToVertexTool
◆ m_useGhostTracks
Gaudi::Property<bool> TauTrackFinder::m_useGhostTracks {this, "useGhostTracks", false} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_z0maxDelta
Gaudi::Property<float> TauTrackFinder::m_z0maxDelta {this, "maxDeltaZ0wrtLeadTrk", 1000.} |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Type
Property type enumeration.
StatusCode extrapolateToCaloSurface(xAOD::TauJet &pTau, xAOD::TauTrackContainer &tauTrackCon) const
Extrapolate track eta and phi to the calorimeter middle surface.
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
virtual double m() const override final
The invariant mass of the particle..
TauTrackType
Enumerator defining type of tau track.
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
std::string find(const std::string &s)
return a remapped string
size_t nAllTracks() const
Helper class to provide type-safe access to aux data.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackPartInputContainer
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
float charge() const
Returns the charge.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double eta() const
The pseudorapidity ( ) of the particle.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_largeD0TracksInputContainer
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Helper method to sort tracks.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
void removeOffsideTracksWrtLeadTrk(std::vector< const xAOD::TrackParticle * > &tauTracks, std::vector< const xAOD::TrackParticle * > &wideTracks, std::vector< const xAOD::TrackParticle * > &otherTracks, const xAOD::Vertex *tauOrigin, double maxDeltaZ0) const
std::vector< SG::VarHandleKeyArray * > m_vhka
CaloSampling::CaloSample caloSample(TrackParametersIdentifier id) const
CaloSample encoded in id, returns CaloSampling::Unknown if id is not valid
Gaudi::Property< double > m_ghostTrackDR
Helper class to provide constant type-safe access to aux data.
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
void setX(float value)
Sets the x position.
float getZ0(const xAOD::TrackParticle *track, const xAOD::Vertex *vertex) const
Some internally used functions.
bool isEntryToVolume(TrackParametersIdentifier id) const
returns true if the id belongs to the volume entrance
VxType::VertexType vertexType() const
The type of the vertex.
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< float > m_z0maxDelta
Gaudi::Property< bool > m_bypassExtrapolator
std::vector< const T * > getAssociatedObjects(const std::string &name) const
get associated objects as a vector<object> this compact form throws an exception if the object is not...
@ JetConstitScaleMomentum
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Gaudi::Property< bool > m_bypassSelector
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
helper class to encode and decode a TrackParametersIdentifier
void setZ(float value)
Sets the z position.
void setY(float value)
Sets the y position.
const TauTrackLinks_t & allTauTrackLinks() const
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< bool > m_applyZ0cut
const TauTrack * track(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged, int *container_index=0) const
Get the pointer to a given tauTrack associated with this tau /*container index needed by trackNonCons...
void addTauTrackLink(const ElementLink< TauTrackContainer > &tr)
add a TauTrack to the tau
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Gaudi::Property< bool > m_storeInOtherTrks
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual double phi() const
The azimuthal angle ( ) of the particle.
size_t index() const
Return the index of this element within its container.
@ SiSpacePointsSeedMaker_LargeD0
Gaudi::Property< double > m_maxJetDr_tau
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
tools
TauTrackType tauTrackType(const xAOD::TauJet &tauJet, const xAOD::TrackParticle &trackParticle, const xAOD::Vertex *primaryVertex) const
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer
void setDetail(TauJetParameters::TrackDetail detail, float value)
ToolHandle< Trk::ITrackSelectorTool > m_trackSelectorTool_tau
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
double charge(const T &p)
bool isLargeD0Track(const xAOD::TrackParticle *track) const
StatusCode initialize(bool used=true)
void makePrivateStore()
Create a new (empty) private store for this object.
Gaudi::Property< bool > m_useGhostTracks
TauTrack_v1 TauTrack
Definition of the current version.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Class describing a Vertex.
const Vertex * vertex() const
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
Gaudi::Property< double > m_maxJetDr_wide
virtual FourMom_t p4() const
The full 4-momentum of the particle.
void setDetail(TauJetParameters::Detail detail, int value)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void getTauTracksFromPV(const xAOD::TauJet &tauJet, const std::vector< const xAOD::TrackParticle * > &vecTrackParticles, const xAOD::Vertex *primaryVertex, const bool &useGhostTracks, const xAOD::JetContainer *jetContainer, std::vector< const xAOD::TrackParticle * > &tauTracks, std::vector< const xAOD::TrackParticle * > &wideTracks, std::vector< const xAOD::TrackParticle * > &otherTracks) const
const TrackParticle * track() const
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
Class describing a TrackParticle.
const SG::AuxVectorData * container() const
Return the container holding this element.
setBGCode setTAP setLVL2ErrorBits bool
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
std::set< CaloSampling::CaloSample > m_EMSamplings
std::set< CaloSampling::CaloSample > m_HadSamplings
Gaudi::Property< bool > m_removeDuplicateCoreTracks
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
SG::ReadHandleKey< CaloExtensionCollection > m_ParticleCacheKey