ATLAS Offline Software
Loading...
Searching...
No Matches
Tool_TauConstituentGetter.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
7
11
13
15
16 ATH_MSG_INFO(" initialize()");
17 m_init=true;
18
20
21 ATH_CHECK( m_Tool_InputConverter.retrieve() );
22
23 return StatusCode::SUCCESS;
24}
25
26
31 std::vector<TauConstituent*>& outputConstituents) const {
32
33 //loop over charged PFOs
34 for(unsigned int iChrgPFO=0; iChrgPFO<tauJet->nProtoChargedPFOs(); iChrgPFO++) {
35
36 //convert to tau constituent
37 PanTau::TauConstituent* curConst = nullptr;
38 ATH_CHECK(m_Tool_InputConverter->ConvertToTauConstituent(tauJet->protoChargedPFO( iChrgPFO ), curConst, tauJet) );
39 if(curConst == nullptr) {
40 ATH_MSG_DEBUG("Problems converting charged PFO into tau constituent -> skip PFO");
41 continue;
42 }
43
44 //add to list of tau constituents
45 outputConstituents.push_back(curConst);
46
47 }//end loop over charged PFOs
48
49 // Pi0 tagged PFOs are not collected!
50
51 //loop over neutral PFOs
52 for(unsigned int iNeutPFO=0; iNeutPFO<tauJet->nProtoNeutralPFOs(); iNeutPFO++) {
53
54 //convert to tau constituent
55 PanTau::TauConstituent* curConst = nullptr;
56 ATH_CHECK( m_Tool_InputConverter->ConvertToTauConstituent(tauJet->protoNeutralPFO( iNeutPFO ), curConst, tauJet) );
57 if(curConst == nullptr) {
58 ATH_MSG_DEBUG("Problems converting neutral PFO into tau constituent -> skip PFO");
59 continue;
60 }
61
62 //add to list of tau constituents
63 outputConstituents.push_back(curConst);
64
65 }//end loop over charged PFOs
66
67 return StatusCode::SUCCESS;
68}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
static StatusCode bindToolHandle(ToolHandle< T > &, std::string)
Input object for PanTau.
Tool_TauConstituentGetter(const std::string &name)
Gaudi::Property< std::string > m_Tool_InputConverterName
ToolHandle< PanTau::ITool_InputConverter > m_Tool_InputConverter
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
virtual StatusCode GetTauConstituents(const xAOD::TauJet *tauJet, std::vector< TauConstituent * > &outputList) const
Function to get the PFOs for a given TauJet object (Shots in each PFO etc are collected in "ConvertTo...
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
const PFO * protoChargedPFO(size_t i) const
Get the pointer to a given cellbased_charged PFO associated with this tau.
size_t nProtoChargedPFOs() const
Get the number of cellbased_charged PFO particles associated with this tau.
const PFO * protoNeutralPFO(size_t i) const
Get the pointer to a given cellbased_neutral PFO associated with this tau.
size_t nProtoNeutralPFOs() const
Get the number of cellbased_neutral PFO particles associated with this tau.
TauJet_v3 TauJet
Definition of the current "tau version".